Skip to content

ENH: integration with NEO #870

Closed
Closed

Description

@dengemann

(Not for 0.7)

The NEO project does lots of IO and time series processing

https://github.com/NeuralEnsemble/python-neo

We should explore with the NEO authors how we could work together / make the packages more interoperable if they aren't already / explore where combining functionality might yield interesting perspectives / etc.

cc @samuelgarcia

Activity

  1. dengemann commented on Nov 5, 2013

    @dengemann
    MemberAuthor

    Also this is highly related to #542

  2. samuelgarcia commented on Nov 5, 2013

    @samuelgarcia

    Hi all,
    thank you for inviting me in the discussion.

    I think coding new IO in neo could be a great idea. So you would only to add a wrapper from neo object to mne objects. I do not figure out how compatible are the 2 APIS.
    Note that we are (slowly) in discussion for a new neo 0.4 with better API and an easier set of objects.
    Could be good if some of you could follow the discussion. The maling list is here [email protected]

    Best

    samuel

  3. dengemann commented on Nov 5, 2013

    @dengemann
    MemberAuthor

    thank you for inviting me in the discussion.

    great to have you, feel free to ping others involved in your API/IO refactoring to join.

    So you would only to add a wrapper from neo object to mne objects.

    I think if it's not about persistency it should not be too difficult, i.e., time consuming.

    I do not figure out how compatible are the 2 APIS.

    Me neither, we should explore ;-). As we already discussed privately, my impression was that besides very general functionality related to filtering, time-frequency processing and visualization which is tightly integrated with numpy arrays MNE is very domain specific to the M/EEG business. This practically means that to make a fully working MNE object / take advantage full advantage of MNE you need to setup an info dictionary that complies with a certain API.

    https://github.com/mne-tools/mne-python/blob/master/mne/fiff/meas_info.py

    While setting certain fields to {None, an empty list, an empty string} is possible to create a working object, at least you need to specify the number of channels, the channel names and a list of coil information dicts that again complies with a certain API and that is represented in https://github.com/mne-tools/mne-python/blob/master/mne/fiff/constants.py.
    This is actually not that difficult but you need to know what the exact task is. We were discussing in #542 to add a Raw abstract base class that makes it easier to specify objects for custom data. This is certainly related.
    Now I'm not sure how NEO objects are organized and at which level wrapping is feasible.
    The normal MNE object-life cycle looks like this

    `Raw->Epochs->Evoked->STC'

    Probably Raw and Epochs are the interesting API access points. A second question would be related to the type of data. Currently we only support continuos data, so I would not have any idea how to support spike data from NEO, etc.

  4. samuelgarcia commented on Nov 5, 2013

    @samuelgarcia

    I will try to have a look.
    Read this carefully http://pythonhosted.org/neo/core.html.
    You should get the neo object model easily.

    Spike is quite specific to extra cellular recording.
    neo.AnalogSignal <-> mne.Raw
    neo.EpochArray <-> mne.Epochs
    could be a starting point.

    The main discussion could be around neo.Segment with is a "chunk" of dataset.

    Samuel

  5. agramfort commented on Nov 5, 2013

    @agramfort
    SponsorMember

    indeed that's a good start. A good project for the next codejam :)

  6. dengemann commented on Nov 5, 2013

    @dengemann
    MemberAuthor

    @samuelgarcia to see what it means practically to subclass Raw / instantiate a proper info e.g. see the BTI to FIFF importer:

    https://github.com/mne-tools/mne-python/blob/master/mne/fiff/bti/raw.py#L995

    Also the repr method of our info can be informative:

    https://github.com/mne-tools/mne-python/blob/master/mne/fiff/meas_info.py#L36

    See it in action by hitting print raw.info and you see which fields are expected.

    Once more, the different API stages

    Numpy arrays as input:

    • mne.stats
    • mne.time_frequency (most functions)
    • a few mne.viz functions
    • mne.filter

    The rest takes objects as input although most of the time only the info attribute is the reason for that. What you get for free once you have a proper MNE object besides additional convenience functions for visualization and managing experimental logic is IO, that is saving to FIF.

  7. dengemann commented on Dec 11, 2013

    @dengemann
    MemberAuthor

    Btw. folks, @apdavison and I have met last week in Jülich and we were discussing this issue. As a result, we decided to work on this at the end of January during the forthcoming Jülich CodeJam http://www.fz-juelich.de/ias/jsc/EN/Expertise/Workshops/Conferences/CodeJam2014/_node.html.
    I hope we'll be done with Py3k and IO(#542) by then.

    cc @samuelgarcia @agramfort @Eric89GXL @mluessi

    Btw. @samuelgarcia @apdavison I was just about opening a twin issue at https://github.com/NeuralEnsemble/python-neo/

    To my surprise it seems you guys don't have a public issue tracker on GitHub?

  8. agramfort commented on Dec 12, 2013

    @agramfort
    SponsorMember

    great. Let me do my best to be there for the codejam.

  9. samuelgarcia commented on Dec 12, 2013

    @samuelgarcia

    Hi mne list,
    for personal reasons I will attend only monday (maybe tuesday morning?).
    So if you plan to come in Julich, maybe we should plan already a meeting
    on Monday afternoon.

    The issue tracker was in kept in the last forge (a trac) wa planed to
    move but it has not been done.
    I will talk with Andrew.

    best

    Samuel

    Le 11/12/2013 23:18, Denis A. Engemann a écrit :

    Btw. folks, @apdavison https://github.com/apdavison and I have met
    last week in Jülich and we were discussing this issue. As a result, we
    decided to work on this at the end of January during the forthcoming
    Jülich CodeJam
    http://www.fz-juelich.de/ias/jsc/EN/Expertise/Workshops/Conferences/CodeJam2014/_node.html.
    I hope we'll be done with Py3k and IO(#542
    #542) by then.

    cc @samuelgarcia https://github.com/samuelgarcia @agramfort
    https://github.com/agramfort @Eric89GXL
    https://github.com/Eric89GXL @mluessi https://github.com/mluessi

    Btw. @samuelgarcia https://github.com/samuelgarcia @apdavison
    https://github.com/apdavison I was just about opening a twin issue
    at https://github.com/NeuralEnsemble/python-neo/

    To my surprise it seems you guys don't have a public issue tracker on
    GitHub?

    —
    Reply to this email directly or view it on GitHub
    #870 (comment).

  10. apdavison commented on Dec 12, 2013

    @apdavison

    About the issue tracker: our current issue tracker is at http://neuralensemble.org/trac/neo

    The task of migrating the existing tickets to GitHub has been on my to-do list for some time. I've even written a script that will do most of the work, I just haven't got round to finishing the job. Thanks for putting it back on my radar!

  11. larsoner commented on Apr 20, 2015

    @larsoner
    Member

    I think we have decent integration via the *Array classes, feel free to reopen if people have further needs

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions