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
Make PyPREP's random channel picks match MATLAB PREP's for the same random seeds #62
Conversation
Argh, I keep accidentally making style mistakes. Gotta fix VSCode's linting setup to automatically catch this stuff... |
@sappelhoff Okay, finally fixed the unit tests! Apparently bad-by-flat channels get removed entirely from the data during NoisyChannels, so I wasn't triggering the 'num_good_chans' < 'ransac_sample_size' like I thought I would. Double-checked and MATLAB PREP does the same thing, so no additional changes needed to match it. |
Made one additional change to better match MATLAB PREP: instead of rounding (0.25 * number of channels) up, they round it to the nearest integer, so I tweaked PyPREP to do the same. Here's the relevant MatPREP code: ransacSubset = round(noisyOut.ransacChannelFraction*size(data, 2)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks :)
PR Description
Closes #61. This PR does two main things:
randsample
function so that we can generate identical random channel picks using the same random seedI also adjusted the "too few channels" exceptions to be more informative, based on the second change. Let me know if you have any questions!
Merge Checklist
closes #<issue-number>
to automatically close an issue