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

Params.sine_range_percent is relative number, not percentage #5

Open
froemschied opened this issue Jul 17, 2020 · 1 comment
Open

Comments

@froemschied
Copy link
Contributor

Params.sine_range_percent = 2; % tolerance to merge harmonically-related frequencies

Naming and default value (sine_range_percent = 2) of Params.sine_range_percent suggest it can take values 0-100, but in SineSegmenter.m it is used as a relative number (range 0-1). Using the default parameter will result in matchesAny=true (SineSegmenter.m, line 103) for all cases, such that the segmenter doesn't actually check for harmonics.

Possible solution:

  1. add a check for parameter range to segmentSong.m (after line 16) and enforce range 0-1
  2. rename parameter e.g. to Params.sine_range_relative
@postpop
Copy link
Contributor

postpop commented Jul 26, 2020

Thanks for raising the issue and sorry about the late reply.
Naming was inherited from the original version of FSS and is indeed misleading.

Renaming the parameter to Params.sine_range_relative would probably best. This may break older custom parameter files but afaik people in the lab only changed pulse parameters, not the sine parameters.

Can you push that fix or make a pull request? Thanks!

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

No branches or pull requests

2 participants