Repository navigation
Make PyPREP's random channel picks match MATLAB PREP's for the same random seeds - #62
Merged
Merged
Conversation
22 of 23 tasks
Collaborator
Author
|
Argh, I keep accidentally making style mistakes. Gotta fix VSCode's linting setup to automatically catch this stuff... |
Collaborator
Author
|
@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. |
Collaborator
Author
|
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)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Description
Closes #61. This PR does two main things:
randsamplefunction 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