Skip to content

Commit

Permalink
Colateral damage
Browse files Browse the repository at this point in the history
Changes required in order deal with side effects of the pervious commit.
All this is in part resolution of Issue #199.
Yet TODO: Still need to check that Concatenation methods concatenate all the available grey scale spectrograms.
  • Loading branch information
towsey committed Dec 18, 2018
1 parent ae5f673 commit e9c9141
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 11 deletions.
2 changes: 0 additions & 2 deletions src/AudioAnalysisTools/Indices/IndexCalculate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -387,8 +387,6 @@ public static IndexCalculateResult Analysis(
deciBelSpectrogram = SNR.RemoveNeighbourhoodBackgroundNoise(deciBelSpectrogram, nhThreshold: 2.0);

// iii: CALCULATE noise reduced AVERAGE DECIBEL SPECTRUM
// TODO: The method to calculate POW by averaging decibel values should be depracated. It is now replaced by index PMN.
spectralIndices.POW = SpectrogramTools.CalculateAvgSpectrumFromSpectrogram(deciBelSpectrogram);
spectralIndices.PMN = SpectrogramTools.CalculateAvgDecibelSpectrumFromSpectrogram(deciBelSpectrogram);

// iv: CALCULATE SPECTRAL COVER.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// <copyright file="IndexCalculateTest.cs" company="QutEcoacoustics">
// <copyright file="IndexCalculateTest.cs" company="QutEcoacoustics">
// All code in this file and all associated files are the copyright and property of the QUT Ecoacoustics Research Group (formerly MQUTeR, and formerly QUT Bioacoustics Research Group).
// </copyright>

Expand Down Expand Up @@ -183,13 +183,6 @@ public void TestOfSpectralIndices()
expectedVector = Binary.Deserialize<double[]>(expectedSpectrumFile);
CollectionAssert.That.AreEqual(expectedVector, spectralIndices.EVN, AllowedDelta);

// POW
expectedSpectrumFile = new FileInfo(resourcesDir + "\\POW.bin");

// Binary.Serialize(expectedSpectrumFile, spectralIndices.POW);
expectedVector = Binary.Deserialize<double[]>(expectedSpectrumFile);
CollectionAssert.That.AreEqual(expectedVector, spectralIndices.POW, AllowedDelta);

// RHZ
expectedSpectrumFile = new FileInfo(resourcesDir + "\\RHZ.bin");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public void TestImagesHaveCorrectLength(double renderScale, int expectedWidth)
// create some fake spectra
int duration = (int)(recordingDuration.TotalSeconds / dataScale.TotalSeconds);
var spectra = new Dictionary<string, double[,]>();
foreach (var key in SpectralIndexValues.GetKeys())
foreach (var key in SpectralIndexValues.Keys)
{
spectra.Add(key, new double[256, duration]);
var bgnKey = nameof(SpectralIndexValues.BGN);
Expand Down

0 comments on commit e9c9141

Please sign in to comment.