-
Hi I'm trying to load files from this open repository shared by the barry lab https://www.dropbox.com/sh/zdanporcx0v3s10/AADa3Cy2siUd0Co3B7yyGNBga?dl=0 When trying to load the file with from pynwb import NWBHDF5IO, NWBFile, TimeSeries
raw_io = NWBHDF5IO("Markus Frey - R2470_experiment_1.nwb", "r")
nwb_in = raw_io.read()
TypeError: Missing NWB version in file. The file is not a valid NWB file. Is there any way I can open the file? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
I have not had a chance to look at the file, but the fact that the NWB version is missing seems to indicate that the file is likely a NWB version 1.x file. PyNWB and MatNWB support NWB 2.0 and up (see https://nwb-overview.readthedocs.io/en/latest/faq.html#nwb-1-vs-2). I can take a look later to further confirm. If the file is indeed 1.x then you should still be able to open the file directly via HDF5. Here a list of HDF5 tools that are useful inspect the raw HDF5 file https://nwb-overview.readthedocs.io/en/latest/tools/hdftools/hdftools.html#analysistools-hdftools In Python you can also use
The HDF5 tools are not aware of the NWB schema, so they are missing PyNWB convenience functionality, but they should get you access to the data. |
Beta Was this translation helpful? Give feedback.
-
Hi, thanks for the reply, I managed to get the data with h5py 😀
tor. 21. des. 2023, 21:19 skrev Oliver Ruebel ***@***.***>:
… I have not had a chance to look at the file, but the fact that the NWB
version is missing seems to indicate that the file is likely a NWB version
1.x file. PyNWB and MatNWB support NWB 2.0 and up (see
https://nwb-overview.readthedocs.io/en/latest/faq.html#nwb-1-vs-2). I can
take a look later to further confirm. If the file is indeed 1.x then you
should still be able to open the file directly via HDF5.
Here a list of HDF5 tools that are useful inspect the raw HDF5 file
https://nwb-overview.readthedocs.io/en/latest/tools/hdftools/hdftools.html#analysistools-hdftools
In Python you can also use h5py directly to open the file.
import h5py
nwb_file = h5py.File("Markus Frey - R2470_experiment_1.nwb", "r")
The HDF5 tools are not aware of the NWB schema, so they are missing PyNWB
convenience functionality, but they should get you access to the data.
—
Reply to this email directly, view it on GitHub
<#65 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA2CP4BN4ASGS6UQQIYHORDYKSKUXAVCNFSM6AAAAABA6RIUMOVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM3TSMRRHAYTA>
.
You are receiving this because you authored the thread.Message ID:
<NeurodataWithoutBorders/helpdesk/repo-discussions/65/comments/7921810@
github.com>
|
Beta Was this translation helpful? Give feedback.
I have not had a chance to look at the file, but the fact that the NWB version is missing seems to indicate that the file is likely a NWB version 1.x file. PyNWB and MatNWB support NWB 2.0 and up (see https://nwb-overview.readthedocs.io/en/latest/faq.html#nwb-1-vs-2). I can take a look later to further confirm. If the file is indeed 1.x then you should still be able to open the file directly via HDF5.
Here a list of HDF5 tools that are useful inspect the raw HDF5 file https://nwb-overview.readthedocs.io/en/latest/tools/hdftools/hdftools.html#analysistools-hdftools In Python you can also use
h5py
directly to open the file.