From 5ffd6a54eaa38453429059c41b56f317cac5a706 Mon Sep 17 00:00:00 2001 From: towsey Date: Fri, 12 Jun 2020 14:44:34 +1000 Subject: [PATCH] Finished debugging Australasian Pipit and tests Issue #321 --- .../Towsey.AnthusNovaeseelandiae.yml | 21 ++++++++----------- .../Recognizers/AustralPipitTests.cs | 6 +++--- 2 files changed, 12 insertions(+), 15 deletions(-) diff --git a/src/AnalysisConfigFiles/RecognizerConfigFiles/Towsey.AnthusNovaeseelandiae.yml b/src/AnalysisConfigFiles/RecognizerConfigFiles/Towsey.AnthusNovaeseelandiae.yml index 886d36538..73761f0f3 100644 --- a/src/AnalysisConfigFiles/RecognizerConfigFiles/Towsey.AnthusNovaeseelandiae.yml +++ b/src/AnalysisConfigFiles/RecognizerConfigFiles/Towsey.AnthusNovaeseelandiae.yml @@ -17,14 +17,11 @@ Profiles: FrameSize: 512 FrameStep: 256 WindowFunction: HANNING - #BgNoiseThreshold: 0.0 # min and max of the freq band to search MinHertz: 2000 MaxHertz: 7000 MinBandwidthHertz: 500 MaxBandwidthHertz: 5000 - #MinDuration: 0.1 - #MaxDuration: 0.5 DecibelThreshold: 9.0 #################### POST-PROCESSING of EVENTS ################### @@ -33,8 +30,8 @@ Profiles: # 1: Combine overlapping events CombineOverlappingEvents: true -# 2: Combine syllables that possibly belong to the saem strophe. -# Can also use this to "mop up" events in neighbourhood - for later removal. +# 2: Combine syllables that possibly belong to the same strophe. +# Can also use this to "mop up" events in neighbourhood - these can be removed later. CombinePossibleSyllableSequence: true SyllableStartDifference: 0.25 SyllableHertzGap: 3000 @@ -45,16 +42,16 @@ NeighbourhoodUpperHertzBuffer: 0 NeighbourhoodDbThreshold: 9.0 # C: Options to save results files -# 4: Available options for saving data files (case-sensitive): [False/Never | True/Always | WhenEventsDetected] +# 4: Available options for saving spectrograms (case-sensitive): [False/Never | True/Always | WhenEventsDetected] +# "True" is useful when debugging but "WhenEventsDetected" is required for operational use. +#SaveSonogramImages: True +SaveSonogramImages: WhenEventsDetected + +# 5: Available options for saving data files (case-sensitive): [False/Never | True/Always | WhenEventsDetected] 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. -# 5: Available options for saving -SaveSonogramImages: True -#SaveSonogramImages: WhenEventsDetected -# DisplayCsvImage is obsolete - ensure it remains set to: false +# 6: DisplayCsvImage is obsolete - ensure it remains set to: false DisplayCsvImage: false ## End section for AnalyzeLongRecording diff --git a/tests/Acoustics.Test/AnalysisPrograms/Recognizers/AustralPipitTests.cs b/tests/Acoustics.Test/AnalysisPrograms/Recognizers/AustralPipitTests.cs index 9d057826b..68b3c2a2b 100644 --- a/tests/Acoustics.Test/AnalysisPrograms/Recognizers/AustralPipitTests.cs +++ b/tests/Acoustics.Test/AnalysisPrograms/Recognizers/AustralPipitTests.cs @@ -66,17 +66,17 @@ public void TestRecognizer() Assert.IsInstanceOfType(events[2], typeof(CompositeEvent)); var ev = (CompositeEvent)events[2]; - // event 2 should be a composite event. + // events[2] should be a composite event. Assert.AreEqual(16.656, ev.EventStartSeconds); Assert.AreEqual(17.008, ev.EventEndSeconds); Assert.AreEqual(3596, ev.BandWidthHertz); - // event 2 should contain 5 component events + // This event should contain 5 component events var componentEvents = ev.ComponentEvents; Assert.AreEqual(5, componentEvents.Count); // This tests that the component tracks are correctly combined. - //THis can also be tested somewhere else, starting with just the comosite event in json file. + //This can also be tested somewhere else, starting with just the comosite event in json file. var points = EventExtentions.GetCompositeTrack(componentEvents).ToArray(); Assert.AreEqual(16.672, points[1].Seconds.Minimum); Assert.AreEqual(5425, points[1].Hertz.Minimum);