You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Two of the most important data classes, mne.Epochs and mne.Evoked, are available directly in mne. However, the class for continuous data is available as mne.io.Raw and not mne.Raw (because all read_raw_* readers also live in mne.io). For consistency, I propose to make mne.io.Raw available as mne.Raw (but keep mne.io.Raw for backward compatibility). WDYT?
+1 from me because IMO the three most important classes that represent data (Raw, Epochs, Evoked) should live together. @larsoner there is at least one read_raw_* function which produces an Epochs object (read_raw_eeglab()). @agramfort I'd rather move less important things into submodules and have these three classes in the root.
+1 because it seems natural to have the three main classes available from mne. @cbrnr's arguments make sense to me. But I won't personally spend time to get this done, so I guess I am a +0.5
@cbrnr's argument makes sense to me too, but I agree with @agramfort that the root namespace is over-crowded. I would not do this as a one-off change, but I would consider doing this as part of a larger namespace overhaul, done after careful consideration/planning, and with a longer-than-normal deprecation cycle.
Reacted by Clemens Brunner, Richard Höchenberger and Mikolaj Magnuski
In a similar vein - what do you think about having read_epochs in mne.io? I always found it a bit strange that all io function are in mne.io but not read_epochs.
Not sure if we can document this better or something... it seems like this
idea comes up at least once a year in different forms.
maybe our problem is to have put "almost everything" in the mne namespace
and end users are
not used to do `from mne import submodule` then submodule.my_function
I personally think it's a trade-off but I tend to believe the mne namespace
is already too crowded...
Thanks @larsoner, although I'm not sure I get the ".io is for raw io" argument in the context of read_epochs - we have mne.io.read_epochs_fieldtrip and mne.io.read_epochs_eeglab and mne.io.read_epochs_kit, but for some reason mne.read_epochs and not mne.io.read_epochs :) .
But it is interesting to see that the mne.io.Raw controversy is almost as old as mne :)
we have mne.io.read_epochs_fieldtrip and mne.io.read_epochs_eeglab and mne.io.read_epochs_kit
These officially are meant to live in the mne namespace, the fact that they show up in mne.io is a (perhaps unhappy) accident I think, see where they're documented:
We could remove them from mne.io and have them only in mne.* but at this point people might rely on them being in mne.io... but I'd rather not add more non-raw I/O there.
Haha, for me that is a rather a happy accident 😄 - but my understanding has previously been that mne.io is for reading raw and epochs, especially for foreign (non-mne) formats. But ok, I understand now and will have to live with this knowledge. ;)
Activity
larsoner commentedon Jul 12, 2021
-1 from me, I think if we think of
mne.ioas being for "raw IO" and all of ourmne.io.read_raw*functions live there, the class should, tooagramfort commentedon Jul 13, 2021
cbrnr commentedon Jul 13, 2021
+1 from me because IMO the three most important classes that represent data (
Raw,Epochs,Evoked) should live together. @larsoner there is at least oneread_raw_*function which produces anEpochsobject (read_raw_eeglab()). @agramfort I'd rather move less important things into submodules and have these three classes in the root.sappelhoff commentedon Jul 13, 2021
+1 because it seems natural to have the three main classes available from
mne. @cbrnr's arguments make sense to me. But I won't personally spend time to get this done, so I guess I am a +0.5drammock commentedon Jul 13, 2021
@cbrnr's argument makes sense to me too, but I agree with @agramfort that the root namespace is over-crowded. I would not do this as a one-off change, but I would consider doing this as part of a larger namespace overhaul, done after careful consideration/planning, and with a longer-than-normal deprecation cycle.
mmagnuski commentedon Oct 26, 2021
In a similar vein - what do you think about having
read_epochsinmne.io? I always found it a bit strange that alliofunction are inmne.iobut notread_epochs.larsoner commentedon Oct 26, 2021
Quoting @agramfort all the way back in 2013:
Not sure if we can document this better or something... it seems like this idea comes up at least once a year in different forms.
agramfort commentedon Oct 26, 2021
mmagnuski commentedon Oct 26, 2021
Thanks @larsoner, although I'm not sure I get the "
.iois for raw io" argument in the context ofread_epochs- we havemne.io.read_epochs_fieldtripandmne.io.read_epochs_eeglabandmne.io.read_epochs_kit, but for some reasonmne.read_epochsand notmne.io.read_epochs:) .But it is interesting to see that the
mne.io.Rawcontroversy is almost as old as mne :)larsoner commentedon Oct 26, 2021
These officially are meant to live in the mne namespace, the fact that they show up in
mne.iois a (perhaps unhappy) accident I think, see where they're documented:https://mne.tools/dev/generated/mne.read_epochs_fieldtrip.html#mne.read_epochs_fieldtrip
We could remove them from
mne.ioand have them only inmne.*but at this point people might rely on them being inmne.io... but I'd rather not add more non-raw I/O there.mmagnuski commentedon Oct 26, 2021
Haha, for me that is a rather a happy accident 😄 - but my understanding has previously been that
mne.iois for reading raw and epochs, especially for foreign (non-mne) formats. But ok, I understand now and will have to live with this knowledge. ;)larsoner commentedon Feb 21, 2022
Closing since I think we've converged on not changing this