Skip to content

Commit

Permalink
Renamed BGNoiseNeighbourhood
Browse files Browse the repository at this point in the history
Now uses proper casing
  • Loading branch information
atruskie committed Nov 7, 2017
1 parent 6080a45 commit 1c43162
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
#


# BGNoiseNeighbourhood: units=seconds (default IndexCalculationDuration = 60 seconds)
# BgNoiseNeighbourhood: units=seconds (default IndexCalculationDuration = 60 seconds)
# BG noise for any location is calculated by extending the region of index calculation from 5 seconds before start to 5 sec after end of current index interval.
# Ten seconds is considered a minimum interval to obtain a reliable estimate of BG noise.
# The BG noise interval is not extended beyond start or end of recording segment.
# Consequently for a 60sec Index calculation duration, the BG noise is calculated form the 60sec segment only.
BGNoiseNeighbourhood: 5
BgNoiseNeighbourhood: 5
DoNoiseReduction: true
BgNoiseThreshold: 3.0
SonogramBackgroundThreshold: 4.0
Expand Down
6 changes: 3 additions & 3 deletions AudioAnalysis/AnalysisConfigFiles/Towsey.Acoustic.HiRes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ SegmentOverlap: 0
# The Timespan (in seconds) over which summary and spectral indices are calculated
IndexCalculationDuration: 0.1

# BGNoiseNeighbourhood: units=seconds (default IndexCalculationDuration = 60 seconds)
# BgNoiseNeighbourhood: units=seconds (default IndexCalculationDuration = 60 seconds)
# BG noise for any location is calculated by extending the region of index calculation from 5 seconds before start to 5 sec after end of current index interval.
# Ten seconds is considered a minimum interval to obtain a reliable estimate of BG noise.
# The BG noise interval is not extended beyond start or end of recording segment.
# Consequently for a 60sec Index calculation duration, the BG noise is calculated form the 60sec segment only.
BGNoiseNeighbourhood: 5
BgNoiseNeighbourhood: 5

# Resample rate must be 2 X the desired Nyquist
ResampleRate: 22050
Expand Down Expand Up @@ -68,7 +68,7 @@ TileImageOutput: false
# prefix_20140101T235959+Z.mp3
# prefix_20140101-235959+1000.mp3
# prefix_20140101-235959+Z.mp3
RequireDateInFilename: false
RequireDateInFilename: true

IndexPropertiesConfig: './IndexPropertiesConfig.HiRes.yml'
EventThreshold: 0.2
Expand Down
4 changes: 2 additions & 2 deletions AudioAnalysis/AnalysisConfigFiles/Towsey.Acoustic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ SegmentOverlap: 0
# The Timespan (in seconds) over which summary and spectral indices are calculated
IndexCalculationDuration: 60.0

# BGNoiseNeighbourhood: units=seconds (default IndexCalculationDuration = 60 seconds)
# BgNoiseNeighbourhood: units=seconds (default IndexCalculationDuration = 60 seconds)
# BG noise for any location is calculated by extending the region of index calculation from 5 seconds before start to 5 sec after end of current index interval.
# Ten seconds is considered a minimum interval to obtain a reliable estimate of BG noise.
# The BG noise interval is not extended beyond start or end of recording segment.
# Consequently for a 60sec Index calculation duration, the BG noise is calculated form the 60sec segment only.
BGNoiseNeighbourhood: 5
BgNoiseNeighbourhood: 5

# Resample rate must be 2 X the desired Nyquist
ResampleRate: 22050
Expand Down
4 changes: 2 additions & 2 deletions AudioAnalysis/AnalysisConfigFiles/Towsey.AcousticMarine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ SegmentOverlap: 0
# The Timespan (in seconds) over which summary and spectral indices are calculated
IndexCalculationDuration: 15.0

# BGNoiseNeighbourhood: units=seconds (default IndexCalculationDuration = 60 seconds)
# BgNoiseNeighbourhood: units=seconds (default IndexCalculationDuration = 60 seconds)
# BG noise for any location is calculated by extending the region of index calculation from 5 seconds before start to 5 sec after end of current index interval.
# Ten seconds is considered a minimum interval to obtain a reliable estimate of BG noise.
# The BG noise interval is not extended beyond start or end of recording segment.
# Consequently for a 60sec Index calculation duration, the BG noise is calculated form the 60sec segment only.
BGNoiseNeighbourhood: 1
BgNoiseNeighbourhood: 1

# Resample rate must be 2 X the desired Nyquist
ResampleRate: 64000
Expand Down
2 changes: 1 addition & 1 deletion AudioAnalysis/AnalysisPrograms/AcousticIndices.cs
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ public static AcousticIndicesParsedConfiguration FromConfigFile(dynamic configur
TimeSpan bgNoiseNeighborhood;
try
{
int bgnNh = configuration[AnalysisKeys.BGNoiseNeighbourhood];
int bgnNh = configuration[AnalysisKeys.BgNoiseNeighbourhood];
bgNoiseNeighborhood = TimeSpan.FromSeconds(bgnNh);
}
catch (Exception ex)
Expand Down
2 changes: 1 addition & 1 deletion AudioAnalysis/AudioAnalysisTools/AnalysisKeys.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public static class AnalysisKeys
// KEYS TO PARAMETERS IN CONFIG FILE
public const string AnnotateSonogram = "AnnotateSonogram";
public const string AnalysisName = "AnalysisName";
public const string BGNoiseNeighbourhood = "BgNoiseNeighbourhood";
public const string BgNoiseNeighbourhood = "BgNoiseNeighbourhood";
public const string CallDuration = "CallDuration";
public const string DctDuration = "DctDuration";
public const string DctThreshold = "DctThreshold";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ public static IndexCalculateConfig GetConfig(dynamic dynamicConfig, bool writePa

double duration = (double?)dynamicConfig[AnalysisKeys.IndexCalculationDuration] ?? DefaultIndexCalculationDurationInSeconds;
config.IndexCalculationDuration = TimeSpan.FromSeconds(duration);
duration = (double?)dynamicConfig[AnalysisKeys.BGNoiseNeighbourhood] ?? 5.0;
duration = (double?)dynamicConfig[AnalysisKeys.BgNoiseNeighbourhood] ?? 5.0;
config.BgNoiseBuffer = TimeSpan.FromSeconds(duration);
string stringvalue = (string)dynamicConfig["FrequencyScale"];
config.SetTypeOfFreqScale(stringvalue);
Expand Down

0 comments on commit 1c43162

Please sign in to comment.