Skip to content

Conversation

@lepmik
Copy link
Contributor

@lepmik lepmik commented Jul 28, 2017

Dear NEO team,

We are currently developing an alternative to HDF5 called exdir. Shortly it is an API that allows you to store data and metadata in an hierarchical structure similar to HDF5. Groups are represented as directories with data sets stored in .npy files and metatada in .yaml files. We aim to keep the simplicity of HDF5 and alleviate known issues such as mentioned in this blog post with a syntax equal to h5py. We are currently finishing the documentation and writing a paper detailing the project.

We use exdir on daily basis with NEO and ExdirIO which conforms to the NWB structure. As exdir is getting more mature we feel that it is time to get feedback on this IO. To use the NWB structure and NEO together was not straightforward and we had to make some compromises. Some of the limitations which maybe should be implemented in this IO is:

  • One NWB dataset is stored as a block, but can only contain one Segment. We have been a bit back and forth with this, but since you need a Block to contain a ChannelIndex a NWB dataset should be represented as a Block. To have multiple Segments one could define this as Epochs, but those would have to point to multiple datasets or similar which we felt was to much work to implement for the time being.

  • Units can only contain a single SpikeTrain, this follows mainly from the single Segment limitation.

  • AnalogSignals are either stored as LFP if AnalogSignal.description == 'LFP' or just as a AnalogSignal which is not fully defined in the NWB structure. Here NWB also defines filtered signals, which is unclear to me how should be implemented in this IO.

We tried to run NWBIO to compare output but was unfortunately not able to do that due to errors. Ideally the NWBIO and the ExdirIO could be merged, where the user can chose which backend to use (exdir or h5py). We were originally hoping to base this ExdirIO on the NWB backend, but that was not possible since no nwb python api existed at that time. We are hoping to get an nwb exdir python package implemented in the future.

@coveralls
Copy link

coveralls commented Jul 28, 2017

Coverage Status

Coverage decreased (-1.1%) to 49.071% when pulling 8393d11 on CINPLA:exdirio into 22e01f2 on NeuralEnsemble:master.

@coveralls
Copy link

coveralls commented Jul 28, 2017

Coverage Status

Coverage decreased (-1.05%) to 49.166% when pulling f7adbb7 on CINPLA:exdirio into 22e01f2 on NeuralEnsemble:master.

@coveralls
Copy link

coveralls commented Jul 31, 2017

Coverage Status

Coverage decreased (-1.04%) to 49.171% when pulling 50b15eb on CINPLA:exdirio into 22e01f2 on NeuralEnsemble:master.

@samuelgarcia samuelgarcia added this to the 0.5.2 milestone Aug 23, 2017
@apdavison
Copy link
Member

I understand that a new version of the NWB standard, together with a new Python library that can both read and write NWB files, will be released at the SfN meeting. I have put further work on NWBIO on hold until the new version comes out.

Concerning multiple Segments, in NWBIO I mapped Neo Segments to NWB Epochs.

Concerning signals, I mapped AnalogSignal to NWB's MultiChannelTimeSeries.

On the subject of this PR, is it ready to merge, or did you just create it as a focus for discussion?

@lepmik
Copy link
Contributor Author

lepmik commented Aug 30, 2017 via email

@apdavison apdavison modified the milestones: 0.5.2, future Sep 26, 2017
@samuelgarcia
Copy link
Contributor

@lepmik
Hi Mikkel.
Sorry for so long delay.
Thank you for this PR.
I like very much this idea of exdirio.
I have similar code (binary for all arrays + metata in json + aarray description in json) in tridesclous to replace HDF5.
It is very simpe and flexible.
About this PR I have 2 coments:

  • since 1 year neo have a rawio layer that simplify the code of IO and that is more efficient for reading
    because it expose time slice and channel slice. The exdirio should be written at the level and not deal
    with neo objects directly. It would be more efficient
  • The tree should match latest NWB or should be able to track several NWB version (harder situation).

I propose to postpone this PR for later.

Best

Samuel

@lepmik
Copy link
Contributor Author

lepmik commented Nov 16, 2018

Hi! We are in contact with NWB NeurodataWithoutBorders/pynwb#629 discussing ways to implement Exdir as an alternative backend. I think if the exdir should be combined with the nwb structure in a neo io it should be in the nwbio or similar.

If you are interested in something similar to the old hdf5io we could use exdir there as well.

Anyway, this PR was mainly intended to give you a taste of exdir, so you may close it at your convenience.

@samuelgarcia
Copy link
Contributor

@lepmik : this PR is pretty old for now.
Unless you want to port it to rawio I propose to close for now.

@lepmik
Copy link
Contributor Author

lepmik commented Jan 25, 2022 via email

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants