Skip to content

Commit

Permalink
tweak bittern recognizer
Browse files Browse the repository at this point in the history
Issue #297
  • Loading branch information
towsey committed May 7, 2020
1 parent 2cd4bfe commit e52411a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ Profiles:
MaxHertz: 200
MinDuration: 0.2
MaxDuration: 1.0
DecibelThreshold: 6.0
DecibelThreshold: 3.0

#Combine each pair of Boobook syllables as one event
#CombineProximalSimilarEvents: false
CombinePossibleSyllableSequence: false
CombinePossibleSyllableSequence: true
SyllableStartDifference: 3.0
SyllableHertzGap: 100

Expand All @@ -45,8 +45,9 @@ SaveIntermediateWavFiles: Never
SaveIntermediateCsvFiles: false
# Available options (case-sensitive): [False/Never | True/Always | WhenEventsDetected]
# "True" is useful when debugging but "WhenEventsDetected" is required for operational use.
SaveSonogramImages: True
#SaveSonogramImages: WhenEventsDetected
#SaveSonogramImages: True
SaveSonogramImages: WhenEventsDetected

# DisplayCsvImage is obsolete - ensure it remains set to: false
DisplayCsvImage: false
## End section for AnalyzeLongRecording
Expand Down
10 changes: 8 additions & 2 deletions src/AnalysisPrograms/Recognizers/Birds/BotaurusPoiciloptilus.cs
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,18 @@ public override RecognizerResults Recognize(
newEvents = events;
}

//filter the events for duration
//filter the events for duration in seconds
var minimumEventDuration = 0.5;
if (genericConfig.CombinePossibleSyllableSequence)
{
minimumEventDuration = 2.0;
}

var filteredEvents = new List<EventCommon>();
foreach (var ev in newEvents)
{
var eventDuration = ((SpectralEvent)ev).EventDurationSeconds;
if (eventDuration < 11.0)
if (eventDuration > minimumEventDuration && eventDuration < 11.0)
{
filteredEvents.Add(ev);
}
Expand Down

0 comments on commit e52411a

Please sign in to comment.