-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
[MRG+1] Deprecate stim channel synthesis #5712
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
[MRG+1] Deprecate stim channel synthesis #5712
Conversation
434d763 to
c7abe15
Compare
|
@massich will you have time for this today? If not, I can do it. It's potentially the last blocker for release |
|
let's see where it brings us. I doubt massich has time today.
Maybe we'll merge after the release but it's good to see how
much it makes us deprecate lines.
|
|
So far, I've deprecated a private function to see its ripples. These are the test that break. What I know so far:In brainvision, the stim channel is always synthesized at In edf, we do can control the stim channel, by calling eeglab is really similar to brainvision. The stim channel is always synthetized (it even have the same allocation). The most conservative approach:In 0.17:
In 0.18:
In 0.19:
The most agressive approach:In 0.17:
In 0.18:
|
|
I would rather take the aggressive approach. The stim channel synthesis complicates our codebase and provides unsatisfactory solutions for users. We really should move to the annotation->event path ASAP I think |
|
We were discussing with @agramfort in the blackboard and we thought that the best approach was: 0.17:
0.18:
0.19:
What you propose as a different timeline? |
|
To be faster I would do: 0.17:
0.18:
0.19:
|
|
That works for me. Instead of syncing in 0.17 and then let them die, you
let them fade in their own schedule. But it seems that we won't break users
code either.
That's fine with me. I'm AFK, can you push a proposal in this PR? thx
…On Wed, Nov 14, 2018, 18:32 Eric Larson ***@***.***> wrote:
To be faster I would do:
0.17:
- Add parameter to bv/eeglab: default None (acts like True), say
accepted values in docstring are True | False
- deprecation warning for all readers that synth will be disabled in
0.18
0.18:
- bv/eeglab, the only accepted value in docstring is False (but our
default is None, acts like False), if they pass False, warn them to stop
passing the parameter
- remove synth for all readers, remove param for edf
0.19:
- remove param for bv/eeglab
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#5712 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AGt-496VES0faHM4f3uCEU1BNJ6t2DGEks5uvFOXgaJpZM4Ydv70>
.
|
|
@massich and @larsoner you're saying almost the same thing except
that @larsoner's proposal allows to deprecated the edf stim channel
generation one release earlier.
So as long we don't break people's code and we give one release cycle for
people to adjust fine with me.
@larsoner seems like you're in the starting blocks to do this?
|
c7abe15 to
909125a
Compare
Codecov Report
@@ Coverage Diff @@
## master #5712 +/- ##
==========================================
+ Coverage 88.61% 88.61% +<.01%
==========================================
Files 369 369
Lines 69462 69498 +36
Branches 11678 11691 +13
==========================================
+ Hits 61556 61588 +32
- Misses 5055 5058 +3
- Partials 2851 2852 +1 |
|
Okay plan is laid out in |
| ~~~ | ||
|
|
||
| - Deprecate ``mne.io.read_annotations_eeglab`` by `Joan Massich`_ | ||
| - Deprecated separate reading of annotations and synthesis of STI014 channels in readers by `Joan Massich`_: |
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.
@mmagnuski this is the outline of the changes that would affect read_raw_eeglab and related functions. We should figure out if everything will still work for you!
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.
Here is a more readable version:
https://10219-1301584-gh.circle-artifacts.com/0/html/whats_new.html#api
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.
Thanks, I will try to test on a variety of files during the weekend.
| dtype_bytes = _fmt_byte_dict[fmt] | ||
| offsets = None | ||
| n_samples = n_samples // (dtype_bytes * (info['nchan'] - 1)) | ||
| n_samples = n_samples // (dtype_bytes * n_data_ch) |
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.
How is this better than before?
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.
Sometimes you need the -1 sometimes you don't
| "that do not follow the BrainVision format. For more " | ||
| "information, see the docstring of read_raw_brainvision." | ||
| .format(len(dropped), dropped[:5])) | ||
| self._create_event_ch(events, n_samples) |
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.
Might be a good time to refactor and share this with the similar code in the EEGLAB reader.
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.
These lines will be removed as soon as 0.17 is released so it's not worth it
|
Heavens ... I will try to look more later. |
massich
left a comment
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.
Looks great! I loved that you used match=foobar to document what should be captured by pytest.deprecated_call.
Thx a lot
|
I'll go ahead and merge this one! THX all |
Stim channel is synthesized by: