SilverLabUCL / PySilverLabNWB

Python tools for working with Silver Lab data in the NWB2 format
MIT License
1 stars 0 forks source link

Add option to create NWB file from metadata.yml only #41

Closed pgleeson closed 4 years ago

pgleeson commented 4 years ago

The current create_nwb_file() assumes there will be a path pointing to Labview headers etc. It would be nice though if there could be a method to initiate an NWBFile only from the contents of the metadata.yml file, with everything parsed in.

In this way we can add in any other "recommended" values (e.g. extra py version info in notes) to make it easier to view/debug on NWBE etc. and this can be the default way we start generating NWB files here say: https://github.com/OpenSourceBrain/NWBShowcase

ageorgou commented 4 years ago

There is the add_core_metadata method, but it requires the NWBFile to be already created.

From a quick look, we could move some things around so that all the required information is gathered before any LabView data is read, and add a method which will only do the the basic setup. This would then be an alternative to import_labview_folder, which is the main entrypoint at the moment.

jonc125 commented 4 years ago

We also discussed whether the metadata editor and NWB-creation-from-yaml would be worth extracting as a separate package. I think initially these should be separate entry-points within the one package, but we could split them in the future if there was demand.

ageorgou commented 4 years ago

Revisiting this, it looks like creating the NWBFile requires the start date and time of the experiment, which is not stored in the metadata but retrieved from the speed data. We would therefore need to specify that when creating the file from metadata, or add it to the file.

The metadata file can store information for multiple sessions, one per user. We need a way to select which one we want to "import", or else assume/enforce that there will only ever be one in the file.

I also assume that it would be useful to allow the user to specify a particular metadata file, rather than rely on the default location where the GUI editor creates it (according to their platform)?

pgleeson commented 4 years ago

Looks good!

ageorgou commented 4 years ago

Continued in #52, closing!