Skip to content

Commit

Permalink
feat: enable range filter for file analysis
Browse files Browse the repository at this point in the history
- Implemented filtering of species based on the probability of occurence in geographic region and date
  • Loading branch information
tphakala committed Dec 19, 2024
1 parent ad4cb9e commit e727ac3
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion internal/analysis/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,16 @@ func processAudioFile(settings *conf.Settings, audioInfo *myaudio.AudioInfo) ([]
if err != nil {
return err
}
allNotes = append(allNotes, notes...)

// Filter notes based on included species list
var filteredNotes []datastore.Note
for _, note := range notes {
if settings.IsSpeciesIncluded(note.ScientificName) {
filteredNotes = append(filteredNotes, note)
}
}

allNotes = append(allNotes, filteredNotes...)

// advance predStart by 3 seconds - overlap
predStart = predStart.Add(time.Duration((3.0 - bn.Settings.BirdNET.Overlap) * float64(time.Second)))
Expand Down

0 comments on commit e727ac3

Please sign in to comment.