Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue292 spectral centroid #330

Merged
merged 4 commits into from
Jul 7, 2020
Merged

Issue292 spectral centroid #330

merged 4 commits into from
Jul 7, 2020

Conversation

towsey
Copy link
Contributor

@towsey towsey commented Jul 6, 2020

Title of PR

Issue #292 Spectral Centroid

What is the purpose of this PR?
To incorporate calculation of Spectral centroid as summary index into master.

Changes

Calculation of centroid and associated unit tests.

Visual Changes

An additional track should be added into the image of the summary indices.

Closes #292

towsey added 3 commits July 5, 2020 19:51
Issue #292 SC is to be used as a summary index.
Issue #292 Write various methods to calculate the spectral centroid of a spectrum and accompanying unit tests of the methods.
…the Summary Indices

Issue #292 Incorporate calculation of the Spectral Centroid into calculation of the Summary Indices. Also incorporate the calculation into unit test of summary indices.
@codecov
Copy link

codecov bot commented Jul 6, 2020

Codecov Report

Merging #330 into master will increase coverage by 0.11%.
The diff coverage is 90.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #330      +/-   ##
==========================================
+ Coverage   29.19%   29.31%   +0.11%     
==========================================
  Files         474      475       +1     
  Lines       68728    68794      +66     
==========================================
+ Hits        20066    20165      +99     
+ Misses      48662    48629      -33     
Impacted Files Coverage Δ
...AnalysisTools/Indices/InitialiseIndexProperties.cs 16.66% <ø> (ø)
src/TowseyLibrary/DataTools.cs 19.18% <50.00%> (+0.32%) ⬆️
src/AudioAnalysisTools/SpectralCentroid.cs 91.52% <91.52%> (ø)
src/AudioAnalysisTools/Indices/IndexCalculate.cs 91.30% <100.00%> (+0.07%) ⬆️
...c/AudioAnalysisTools/Indices/SummaryIndexValues.cs 96.33% <100.00%> (+0.06%) ⬆️
...Tools/StandardSpectrograms/AmplitudeSpectrogram.cs 82.35% <100.00%> (+82.35%) ⬆️
...sTools/StandardSpectrograms/SpectrogramSettings.cs 8.33% <0.00%> (+8.33%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fb81a88...058b9a4. Read the comment docs.

Copy link
Member

@atruskie atruskie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only minor suggestion I have to make is that we should include a citation in the documentation of the SpectralCentroid class

@atruskie
Copy link
Member

atruskie commented Jul 6, 2020

Also there'a failing unit test at Acoustics.Test.Shared.CsvTests.TestBaseTypesAreNotSerializedAsArray() - that test is just testing CSV output, you'll just need to add your new column to the expected string.

Issue #292 Added in reference to literature to justify calculation of the spectral centroid and fix a failing unit test.
@towsey
Copy link
Contributor Author

towsey commented Jul 7, 2020 via email

@atruskie atruskie merged commit f3a2b11 into master Jul 7, 2020
@atruskie atruskie deleted the Issue292_SpectralCentroid branch July 7, 2020 10:55
@towsey towsey restored the Issue292_SpectralCentroid branch July 10, 2020 02:01
@atruskie atruskie deleted the Issue292_SpectralCentroid branch July 30, 2020 01:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Calculate a new Summary Index - spectral centroid
2 participants