Repository navigation
OpenEphys reader for legacy format. - #580
Conversation
|
Hello @samuelgarcia! Thanks for updating the PR.
Comment last updated on October 10, 2018 at 10:51 Hours UTC |
|
Here is the PR for OpenEphy in neo The basic usage at neo.rawio level is from neo.rawio.openephysrawio import OpenEphysRawIO
dirname = '/path/to/OpenEphys_SampleData_1'
reader = OpenEphysRawIO(dirname=dirname)
reader.parse_header()
print(reader)
raw_sig = reader.get_analogsignal_chunk(block_index=0, seg_index=0, i_start=None, i_stop=None)
print(raw_sig.shape, raw_sig.dtype)
scaled_sig = reader.rescale_signal_raw_to_floatThis give Here is the neo.io level with neo objects from neo.io import OpenEphysIO
reader = OpenEphysIO(dirname=dirname)
seg = reader.read_segment()
anasig = seg.analogsignals[0]
print(anasig.name, anasig.shape, anasig.units)Give |
|
@Palaeocortex @jsiegle
Everything in memmap so load in memory on demand 👍 I have some problems in the dataset from @Palaeocortex because the CH32 do not have the good file length (size not modulo 1024) and the first timestamp is not the same as other channel. I will implement spikes (and waveform) soon. |
|
OK. it is done. @JuliaSprenger @apdavison : this is ready for review. @Palaeocortex @jsiegle : could you test it and/or have a look in the code ? Before merging I am still waiting new dataset with multi segment. |
|
from #433 @Palecortex said:
@jsiegle: could you confirm that ? In the corrupted dataset the CH32 start one record later (1024 samples). |
|
There are two options here—either clip the channels to match the channel with the smallest number of samples, or fill the missing values with NaNs. If the missing segment is short, I would recommend the first option, since it's easier from a user perspective. Also, I've uploaded an example data set with multiple stops & starts here: https://www.dropbox.com/s/i27lpeyou4a8e3j/Open%20Ephys%20Sample%20Data%20%28multiple%20starts%29.zip?dl=0 Recording is re-started once (resulting in samples appended to the end of the original files), and acquisition is re-started once (creating a new set of files for each channel). |
|
@jsiegle Thank you very much for this new file. I have just anderstand the situation which is more complicated that I thought.
The 2. is already implemented. Segment list is a list of file. I propose to NOT implemented the recording pause situation (1.) for the moment. So this new actual datset will raise an error for now. I will try to implemented the case of the dataset from @Paleocortex (smaller files for CH32) but I will do it with the clipping method. I will display a warning in that case. |
|
@jsiegle @Palaeocortex : new problem with the datasetyou provide me. The situation is worth that only a first timestamp not aligned. The file "100_CH32.continuous" have very strange 'timestamp : the diff timestamp between each record but here should 1024 but here we 900 or 1200 Here the first 5 recordblock: The first columns is timestamps. How can we explain that ???? All files are now hosted here at gnode I affraid that I won't be able to cover such difficult situations in the IO. |
|
I didn't dig so deep into the files and the OE scripts just loaded the files, I cannot contribute to solving this problem unfortunately... |
|
I anderstand totally. Note that this file with CH32 is probabliy corruted and not time aligned with others. I hope it is a isolated case and you don't have too much data like this one... Thank you for helping. |
|
Thanks. |
No description provided.