Skip to content

Make mne.io.Raw available as mne.Raw #9560

Closed

Description

@cbrnr

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?

Activity

  1. larsoner commented on Jul 12, 2021

    @larsoner
    Member

    -1 from me, I think if we think of mne.io as being for "raw IO" and all of our mne.io.read_raw* functions live there, the class should, too

  2. agramfort commented on Jul 13, 2021

    @agramfort
    SponsorMember
  3. cbrnr commented on Jul 13, 2021

    @cbrnr
    ContributorAuthor

    +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.

  4. sappelhoff commented on Jul 13, 2021

    @sappelhoff
    Member

    +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

  5. drammock commented on Jul 13, 2021

    @drammock
    Member

    @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.

  6. added and removed on Jul 13, 2021
  7. mmagnuski commented on Oct 26, 2021

    @mmagnuski
    Member

    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.

  8. larsoner commented on Oct 26, 2021

    @larsoner
    Member

    what do you think about having read_epochs in mne.io?

    Quoting @agramfort all the way back in 2013:

    well the meaning of io is raw io in my mind.

    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.

  9. agramfort commented on Oct 26, 2021

    @agramfort
    SponsorMember
  10. mmagnuski commented on Oct 26, 2021

    @mmagnuski
    Member

    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 :)

  11. larsoner commented on Oct 26, 2021

    @larsoner
    Member

    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:

    https://mne.tools/dev/generated/mne.read_epochs_fieldtrip.html#mne.read_epochs_fieldtrip

    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.

  12. mmagnuski commented on Oct 26, 2021

    @mmagnuski
    Member

    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. ;)

  13. larsoner commented on Feb 21, 2022

    @larsoner
    Member

    Closing since I think we've converged on not changing this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions