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

Update mne.pick_channels() to mne.pick() #154

Merged
merged 4 commits into from
Jan 17, 2024

Conversation

sjg2203
Copy link
Contributor

@sjg2203 sjg2203 commented Jan 15, 2024

Update mne.pick_channels() to mne.pick(), as mne.pick_channels() is a legacy function.

I wasn't sure how to deal with the changelog as I only updated mne.pick() which works just like mne.pick_channels().

@raphaelvallat, if you have a moment to review?

Updated mne.pick_channels() to mne.pick()
Copy link
Owner

@raphaelvallat raphaelvallat left a comment

Choose a reason for hiding this comment

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

Thank you! I'll wait for the CI tests to pass and merge. The PR will be included in the release notes of the next stable version. However, I just released a new version of YASA so I don't think there will be another one in the next couple of months.

@raphaelvallat
Copy link
Owner

Unit tests are failing because pick does not have argument ordered=, unlike pick_channels:

>       raw_pick = raw.copy().pick(ch_names, ordered=True)
E       TypeError: pick() got an unexpected keyword argument 'ordered'

Could you verify on your own data that pick returns the channels in the specified order? (e.g. as if using .pick_channels(..., ordered=True)

Fixed ```ordered=True``` issue with mne.pick()
@sjg2203
Copy link
Contributor Author

sjg2203 commented Jan 16, 2024

Just tested it and both returned the same. mne.pick() orders the channels based their order in ch_names.
I removed ordered=True as it is not available in mne.pick()

Unit tests are failing because pick does not have argument ordered=, unlike pick_channels:

>       raw_pick = raw.copy().pick(ch_names, ordered=True)
E       TypeError: pick() got an unexpected keyword argument 'ordered'

Could you verify on your own data that pick returns the channels in the specified order? (e.g. as if using .pick_channels(..., ordered=True)

@raphaelvallat
Copy link
Owner

Thank you! Merging now

@raphaelvallat raphaelvallat merged commit ae9ccc7 into raphaelvallat:master Jan 17, 2024
15 checks passed
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.

2 participants