Repository navigation
MRG: Add .baseline attribute to mne.Evoked - #8156
Conversation
|
Maybe @larsoner wants to share some early comments: "That's good, keep on going" / "💩, you got it all wrong!" |
|
Can you make the plot as @agramfort suggested here? Maybe this isn't necessary after all. |
|
@hoechenberger 0.21 is getting closer. Need help pushing this one over the line? Looks like it's close already |
|
@larsoner I will pick up working on this tomorrow, so I'm confident it can be included in the next release |
04010d4 to
f053e21
Compare
|
@larsoner I've started adding some tests, will add more tonight. I/O roundtrip is still failing. Will ring you up if I cannot get this sorted out ;) |
|
Currently finishing this up, got I/O working. But now I'm wondering: evokeds = read_evokeds(...)
evokeds = [e.apply_baseline(...) for e in evokeds]instead of just evokeds = read_evokeds(..., baseline=...)But then again, one typically baseline-corrects on the Epochs level already, right? And the new For a single Evoked, one can simply chain the methods: evoked = read_evokeds(..., condition='foo').apply_baseline(...)Still, I wanted to ask again: do you think it's okay to deprecate the |
|
I'm okay with reverting the deprecation. It's pretty low-burden to keep it around, and the code is super old so the deprecation pain is pretty high for little gain. |
And what to do in cases where a baseline is stored on disk, and the user passes a Would you see any advantages in removing the param? |
I don't see a need to issue a warning, we allow re-baselining. We can just say in the docstring that passing a baseline param is equivalent to doing
Only that ideally there should be one clear way to do things, and all of our instances having an |
|
Failures are real: |
|
I believe I have addressed all comments. Documentation build will probably still fail, but code tests should come back positive. |
|
I'm still fighting with the docstrings, I simply cannot get all tests to pass locally 😭 |
|
This is Good To Merge from my end. Travis finished successfully on the last commit before those docstring wars. |
|
Thanks for working through this @hoechenberger ! |
This reverts commit 7f34517.
For more consistency with Epochs. This was originally a part of mne-toolsGH-8156.
* ENH: Add Evoked.tmin, Evoked.tmax For more consistency with Epochs. This was originally a part of GH-8156. * Comma
* Add .baseline attribute to mne.Evoked * Add some tests * Fix tmin, tmax handling * Add tmin, tmax properties * Fix test * Fix tests, Dipole I/O * Fix docstring * Fix topomap plotting test * Fix typo in docstring * Fix LCMV tests * Fix inverse test * Fix bug in average_movements, add Epochs tests * Fix Report test * Fix I/O roundtrip and remove deprecation * Better documentation, add changelog entry * Hopefully fix remaining tests * Only set Evoked.baseline if it has changed * BF: Only update Epochs.baseline on actual rescale * Better comment * Doc build * Fix docstring * Add versionadded * Update doc/changes/latest.inc * Fix docstring formatting * Enable I/O roundtrip tests * Rearrange code to make it easier to understand * Be more specific about which exceptions to catch * Use tuples * Typo * Fix logging and tests * Better documentation * Disallow removal of applied baseline * Fix logging * Add changelog entry * Fix docstrings * Fix docstrings * Re-raise exception if we did not expect it * Better logging & fix * Typos * Uses rounded times * Amend changelong * Docstrings [skip travis] * Better docstring [skip travis] * Docstrings [skipt travis] * Hopefully fix docstrings!!!! 🤬💩😵 [skip travis] * Revert debugging changes [skip travis]
* Revert "MRG: Add .baseline attribute to mne.Evoked (mne-tools#8156)" This reverts commit 7f34517. * Restore verbose kwarg
* ENH: Add Evoked.tmin, Evoked.tmax For more consistency with Epochs. This was originally a part of mne-toolsGH-8156. * Comma
Add
Evoked.baseline. x-ref #8147This is in an early proof-of-concept stage: I haven't even run / adjusted the tests yet…