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

Exclude noise smaller then notes from analysis #43

Merged
merged 10 commits into from
Aug 14, 2019

Conversation

asearfos
Copy link
Owner

No description provided.

asearfos added 6 commits June 27, 2019 12:43
… first onset, after last offset or smaller than or equal to note threshold size. Before the size of the note was being used (essentially length of bounding box), now the area (number of pixels with signal) is being used.
… was overwriting the labeled matrix making other measurements impossible. Length of notes was producing empty values.
… the change made to analysis). Noise is any signal before first onset, after last offset or smaller than or equal to note threshold size.
… to all be colored white but for now left it the same as was before (dark blue).
@asearfos
Copy link
Owner Author

asearfos commented Jun 30, 2019

@JamesPino I found an error with the new analysis. The function get_square can end up having an empty array for non_zero (and therefore no size) if a syllable is smaller than the note threshold. This seems to happen infrequently but from two possible different reasons. 1) The user accidentally left onsets and offsets around a piece of noise (which should not be a syllable anyways) and therefore turned to 0's when the threshold is applied during clean_sonogram or 2) The user tried to parse a really noisy file and so the syllable is so unconnected that all of the pieces are smaller than the note size threshold and therefore are noise and become 0's in clean_sonogram.

Thinking maybe the best solution would be to throw an error and skip the file (like it already does) but provide a specific error rather than the automatic confusing one it does now. Maybe something like "A syllable in this file was considered to be noise (less than note threshold) and therefore analysis is not possible. Consider segmenting again in Chipper using the previous gzip or redetermining note size for this file to visualize the issue." I thought about just deleting the syllable from the list but I think this will give the user crap data that they may never go check if we do that.

Wanted your input on this as well as where to add the error catch. Could be in get_square, checking size of non_zero but thought this is after a lot of processing so wasn't sure if it would be better to catch earlier. If you could make this call and add it that would be great! I'll slack you a couple of examples.

@asearfos asearfos merged commit 61d6a3f into master Aug 14, 2019
@asearfos asearfos deleted the exclude_noise_smaller_then_notes_from_analysis branch August 19, 2019 14:48
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.

None yet

2 participants