esi-neuroscience / oephys2nwb

Export Open Ephys binary data to NWB 2.0
BSD 3-Clause "New" or "Revised" License
3 stars 2 forks source link

ValueError: Found no valid event channels in settings.xml file #15

Open MKVarun opened 1 year ago

MKVarun commented 1 year ago

Hey I'm trying to use oephys2nwb to convert Binary data from openephys 0.4.5 to NWB but I'm getting this error when trying to convert.

RuthKassahun commented 1 year ago

I have the same issue. Have you managed to find a work around?

pantaray commented 1 year ago

Hi! Sorry for being so slow. Which version of oephys2nwb are you using (installed from GitHub or PyPI)?

RuthKassahun commented 1 year ago

Thank you for your response. I have tried both with Github and pypl.

def get_evt_channel_info(self):
        """
        Helper method that fetches/parsers event channels found in settings.xml
        """

        # Get XML element and fetch channels
        editor = self.xml_get("SIGNALCHAIN/PROCESSOR/EDITOR")
        chanList = []
        chanGroups = []
        for chan in editor.iter("EVENT_CHANNEL"):

In this part of the code, my settings.xml couldn't find EVENT_CHANNEL and replaced it with EVENTCHANNEL The EVENTCHANNEL inside has this the following attributes

<EVENTCHANNEL name="0" number="0"/>

For a reference my folder looks like this:


2021-04-09_20-36-07/
├── video_record.mp4
├── settings.xml
└── experiment
    ├── recording
    │   ├──structure.oebin
    │   ├──continuous
    │   │   ├── Neuropix-PXI-100.0
    │   │         ├── continuous.dat
    │   │         ├── timestamps.npy
    │   │   ├── Neuropix-PXI-100.1
    │   │         ├── continuous.dat
    │   │         ├── timestamps.npy
    │   │   ├── NI-DAQmx-104.0
    │   │         ├── continuous.dat
    │   │         ├── timestamps.npy
    │   └── events
    │       ├── Message_Center-904.0
    │       │         ├── TEXT_group_1
    │       │               ├── channels.npy
    │       │               ├── text.npy
    │       │               ├──timestamps.npy
    │       ├──Neuropix-PXI-100.0
    │       │         ├── TTL_1
    │       │               ├── channel_states.npy
    │       │               ├── channels.npy
    │       │               ├── full_words
    │       │               ├──timestamps.npy
    │       └── NI-DAQmx-104.0
    │       │         ├── TTL_1
    │       │               ├── channel_states.npy
    │       │               ├── channels.npy
    │       │               ├── full_words
    │       │               ├──timestamps.npy
pantaray commented 1 year ago

Thank you for the detailed setup! Any chance you could provide (parts of) your settings.xml? And what version of the Open Ephys GUI are you using? A lot has changed in the syntax of settings.xml files generated by GUI version 0.6.+ (released June last year), see, e.g. here

RuthKassahun commented 1 year ago

Please kindly find both settings.xml and structure.oebin file here. For this recording we have used Open Ephys 0.4.6

RuthKassahun commented 1 year ago

Hello @pantaray, just following up if there could be any suggestions for a workaround. Thanks!

pantaray commented 1 year ago

@RuthKassahun Thanks for the xml! I'm pretty swamped right now, I'll look into it next week.

pantaray commented 1 year ago

Hi @RuthKassahun! I've started working on a new release of oephys2nwb. The current development changes are in the dev branch - the above xml error should be fixed now. Thank you for also sending along the structure.oebin file! This was tremendously helpful for figuring out the updated continuous structure in your json. I'll have to further adapt the reading routine to make this work with your data. I'll keep you posted!

RuthKassahun commented 1 year ago

Hi @pantaray Thank you so much for taking the time to work on the issue. I will use the dev branch and let you know how it works out.