Skip to content

Commit

Permalink
Create a new class to contain methods that filter lists of acoustic E…
Browse files Browse the repository at this point in the history
…vents

Issue #370
  • Loading branch information
towsey authored and atruskie committed Oct 14, 2020
1 parent 55fda89 commit cc951ab
Show file tree
Hide file tree
Showing 4 changed files with 386 additions and 373 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,14 @@ public override RecognizerResults Recognize(
// 1: Filter the events for duration in seconds
var minimumEventDuration = 0.1;
var maximumEventDuration = 0.4;
combinedResults.NewEvents = EventExtentions.FilterOnDuration(combinedResults.NewEvents, minimumEventDuration, maximumEventDuration);
combinedResults.NewEvents = EventFilters.FilterOnDuration(combinedResults.NewEvents, minimumEventDuration, maximumEventDuration);
PipitLog.Debug($"Event count after filtering on duration = {combinedResults.NewEvents.Count}");

// 2: Filter the events for bandwidth in Hertz
double average = 3500;
double sd = 600;
double sigmaThreshold = 3.0;
combinedResults.NewEvents = EventExtentions.FilterOnBandwidth(combinedResults.NewEvents, average, sd, sigmaThreshold);
combinedResults.NewEvents = EventFilters.FilterOnBandwidth(combinedResults.NewEvents, average, sd, sigmaThreshold);
PipitLog.Debug($"Event count after filtering on bandwidth = {combinedResults.NewEvents.Count}");

combinedResults.NewEvents = FilterEventsOnFrequencyProfile(combinedResults.NewEvents);
Expand Down
4 changes: 2 additions & 2 deletions src/AnalysisPrograms/Recognizers/Birds/CisticolaExilis.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,14 @@ public override RecognizerResults Recognize(
// 1: Filter the events for duration in seconds
var minimumEventDuration = 0.1;
var maximumEventDuration = 0.25;
combinedResults.NewEvents = EventExtentions.FilterOnDuration(combinedResults.NewEvents, minimumEventDuration, maximumEventDuration);
combinedResults.NewEvents = EventFilters.FilterOnDuration(combinedResults.NewEvents, minimumEventDuration, maximumEventDuration);
CisticolaLog.Debug($"Event count after filtering on duration = {combinedResults.NewEvents.Count}");

// 2: Filter the events for bandwidth in Hertz
double average = 600;
double sd = 150;
double sigmaThreshold = 3.0;
combinedResults.NewEvents = EventExtentions.FilterOnBandwidth(combinedResults.NewEvents, average, sd, sigmaThreshold);
combinedResults.NewEvents = EventFilters.FilterOnBandwidth(combinedResults.NewEvents, average, sd, sigmaThreshold);
CisticolaLog.Debug($"Event count after filtering on bandwidth = {combinedResults.NewEvents.Count}");

// 3: Filter on COMPONENT COUNT in Composite events.
Expand Down
Loading

0 comments on commit cc951ab

Please sign in to comment.