You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 20, 2024. It is now read-only.
Repository navigation
This repository was archived by the owner on Mar 20, 2024. It is now read-only.
Import continuous data recorded by neuropixels #89
Hi.
I'm using open-ephys GUI and neuropixels.
I recorded 50 min of LFP and SPK.
'Continuous.dat' file of the LFP is around 3G. I have 48G RAM on my computer.
According to the advice of using memmapfile, I tried to use it. But still, I have trouble with importing LFP data to Matlab.
The error message indicates 'out of memory.'
I can't figure out how to map memory in Matlab.
Could you help me out?
Without slitting recording time, Is it possible to select a certain set of electrodes out of 384 total electrodes?
I've been trying to select a certain set of electrodes using Recording Node, but it doesn't help.
Using load_open_ephys_binary.m, the following code should create a memory map of the .dat file, rather than loading it into memory (the 2 indicates the index of the recorded file, which is likely 1 for the AP band, and 2 for the LFP band):
D = load_open_ephys_binary(<path_to_oebin_file>, 'continuous', 2, 'mmap')
Then, you can select a range of electrodes or samples with the following line:
Glad it worked! Just keep in mind that the memory-mapped values are 16-bit integers, and must be multiplied by 0.195 in order to convert to the true sample values in microvolts. This will automatically change the data type to "double" (which takes up 4x more memory), so you should only do this on a small subset of the data at a time.
I'm trying to load the 'continuous.dat' file, but I can't locate the structure.oebin file-what could have gone wrong/can I just import a standard oebin file for these recordings?
I'm not sure what might have gone wrong in this case. But this file shouldn't change between experiments, so you can just re-use one from a previous recording.
hmm ok now I'm getting this error:
Error using load_open_ephys_binary (line 74)
Data folder not found
And it looks like the script is looking for a file called Neuropix-PXI-100.1 which I also don't have in my output from NPX extractor, did I do something wrong during the extraction?
If the folder names are different, just replace the folder_name entries in the .oebin file to match with the names of your actual data directories. The first one is the AP Band, the second one is the LFP Band
Activity
jsiegle commentedon Dec 8, 2020
Using
load_open_ephys_binary.m, the following code should create a memory map of the .dat file, rather than loading it into memory (the2indicates the index of the recorded file, which is likely 1 for the AP band, and 2 for the LFP band):Then, you can select a range of electrodes or samples with the following line:
Let me know if that works, and if not we can keep trying to troubleshoot!
obsee commentedon Dec 9, 2020
It's working!!!
I missed '' for the mmap. It is quite embarrassing.
Thanks.
jsiegle commentedon Dec 9, 2020
Glad it worked! Just keep in mind that the memory-mapped values are 16-bit integers, and must be multiplied by 0.195 in order to convert to the true sample values in microvolts. This will automatically change the data type to "double" (which takes up 4x more memory), so you should only do this on a small subset of the data at a time.
macayladonegan commentedon Feb 3, 2021
I'm trying to load the 'continuous.dat' file, but I can't locate the structure.oebin file-what could have gone wrong/can I just import a standard oebin file for these recordings?
jsiegle commentedon Feb 3, 2021
I'm not sure what might have gone wrong in this case. But this file shouldn't change between experiments, so you can just re-use one from a previous recording.
macayladonegan commentedon Feb 3, 2021
I actually can't find one from any of the recordings I've done- can you think of another work around?
jsiegle commentedon Feb 3, 2021
Have you been using the NPX extractor or recording directly to the Binary format?
Either way, let me know how many probes are in your experiment, and I can send you an .oebin file that will work.
macayladonegan commentedon Feb 3, 2021
NPX extractor, just 1. thank you!
jsiegle commentedon Feb 3, 2021
Ok, try this one!
structure.oebin.zip
macayladonegan commentedon Feb 3, 2021
hmm ok now I'm getting this error:
Error using load_open_ephys_binary (line 74)
Data folder not found
And it looks like the script is looking for a file called Neuropix-PXI-100.1 which I also don't have in my output from NPX extractor, did I do something wrong during the extraction?
jsiegle commentedon Feb 3, 2021
If the folder names are different, just replace the
folder_nameentries in the .oebin file to match with the names of your actual data directories. The first one is the AP Band, the second one is the LFP Band