I'm sorry to bother you. Recently, I was learning how to use brainstorm to process the EEG signals collected by Plexon. Unfortunately, I encountered some problems, so I took the liberty to write to you and hope to get your help.
When I record the RAW data collected by Plexon, it can be imported into brainstrom to work normally, but the sampling rate of the RAW data is 30000. If I want to record for a long time, the amount of data is too large. Therefore, I choose to record LFP ( Raw data is upsampled, and the sampling rate becomes 1000).
However, when I import the recorded LFP data, brainstorm cannot work normally, that is, the EEG data will be lost. The error is as follows:
** Error: Line 265: 数组索引必须为正整数或逻辑值(Array index must be a positive integer or logical value)。
**
** Call stack:
** >panel_time.m>GetTimeUnit at 265
** >panel_time.m>UpdatePanel at 146
** >panel_time.m at 31
** >bst_memory.m>LoadDataFile at 811
** >bst_memory.m at 72
** >view_timeseries.m at 107
** >tree_callbacks.m at 250
** >bst_call.m at 28
** >panel_protocols.m>CreatePanel/protocolTreeClicked_Callback at 123
** >bst_call.m at 28
** >panel_protocols.m>@(h,ev)bst_call(@protocolTreeClicked_Callback,h,ev) at 73
**
I also uploaded the data. The first one is the raw data. Importing it into brainstrom can work normally. The second is to downsample the data to 1000 Hz. Importing it into brainstorm can not work normally.
With the short file uploaded here, this reader returns an empty list of values for all the continuous channels.
In in_fopen_plexon.m, line 92: one_channel.ContinuousChannels(CHANNELS_SELECTED(1)).Values is empty. Therefore, the file is considered empty and no data can be read from it.
@maojie Could it be that this downsampled file contains only some waveform and spike information, and no continuous data?
I'm not sure what this means, or why this choice of not using the PlexonSDK for both file formats was initially made.
Rewriting the Brainstorm .plx reader using the PlexonSDK might be possible, but would require recoding everything because the structures of the two readers are very different. Additionally, this would not be possible without a proper set of test files.
Dear Francois,
I'm not sure about the answer to this question, but when I use NeuroExplorer to convert PLX files to mat format, there is data in it.
What puzzles me more is that I re collected raw data today. When I imported it into brainstorm, I found that the data was also lost. But my import process is as like as last time, it is really confusing.
Could you please help me? I upload the data collected today to the cloud disk. You can download it at the following link: https://drive.google.com/drive/folders/1HWljybxajIpZzPfn9o1iHRgssDTgr2is?usp=sharing
Looking forward to your reply.
Best,
Zhang maojie
I will start working on this project again and take care of the invasive neurophysiology issues. @francois feel free to tag me on them.
Initially (2016?) we supported only .plx. Maybe the PlexonSDK was not freely available back then. But honestly, I can't really remember why we did this. Might be worth rewriting the .plx/.pl2 for the PlexonSDK.
I'll look into it and also check @maojie 's dataset
Dear mpompolas,
Thank you for all your help. If you have any questions about the dataset, please do not hesitate to contact me immediately.
Best,
Zhang maojie
Please note that your recent updates do not allow loading the .plx files that have been posted on this page.
The error is the following:
** Error: Line 117: Index exceeds the number of array elements. Index must not exceed 0.
**
** Call stack:
** >in_fopen_plexon.m at 117
** >in_fopen.m at 155
** >import_raw.m at 126
** >bst_call.m at 28
** >tree_callbacks.m>@(h,ev)bst_call(@import_raw,[],[],iSubject) at 660
fullread - if 0, reads only the file header
% if 1, reads the entire file
This function needs at least once to be called with a full read option (fullread =1) after a Matlab restart.
I guess while I tested the functions to build the importers I tried that option!
Every subsequent call can be done with the parameter set to 0 for reading just the header as was done on the commit..
For small example files it's ok to go with either 0 or 1.
However, since in invasive neurophysiology the data we encounter can be very big files I am very hesitant to enable a full file read by default.
We have three options:
introduce a tiny .plx file with the Brainstorm distribution (just a few samples). This would allow the importer to do a full load of this tiny file in order for the mex file to get initialized (someone needs to provide this file).
do a try/catch to try the first time for the importer to load the entire file after a restart, and every subsequent loading will be done with just the header (if the first file to be loaded is huge, this means trouble).
Try to find a way to initialize the mexPlex without a full load.
I think this is even more complicated than what you described: there is something wrong with the mex-file mexPlex. With fullread=0, the output depends on the previous call to mexPlex with fullread=1.
Example below, based only on the example files from the Plexon SDK.
This shows the contents of variable evcounts for the first file 16sp_lfp_with_2coords.plx, read with fullread=0. Before, another file is read with fullread=1.