.plx file import - Line 83: Index exceeds matrix dimensions

Just installed Brainstorm in the hopes that I could take a look at my .plx files. However, I cannot seem to import the data. I went through the process outlined in the "Importing raw e-phys data" guide, but when I get to the "Import recordings" step, select EEG:Plexon (*.plx), then navigate to any of my raw files I get the same error:

Error in_fopen_plexon.m - Line 83: Index exceeds matrix dimensions.
Call stack:

in_fopen_plexon.m at 83
in_fopen.m at 140
import_raw.m at 126
bst_call.m at 28
tree_callbacks.m<@(h,ev)bst_call(@import_raw) at 496

For the record, these recordings were obtained as 8-channel recordings which were then post-processed through Plexon's Offline Sorter. Unfortunately, I had to return the equipment to my old lab that would have let me try getting this down to single channel recordings, so I can't test what's causing the issue. In addition, I currently only have access to the post-processed files, so I can't test whether the unedited files directly from the recording would have produced the same error.

1 Like

Our Plexon reader is very new and probably need some adjustments to handle correctly all the possible types of .plx files. The error your reported occurs on the Brainstorm side, not from the compiled C reader, so it should be easy to fix.

Could you please share an example file .plx file so we can try to fix the Brainstorm reader?
Thanks

Here's one that was stitched together from a pre-manipulation baseline recording session and a post-manipulation recording session (there was a 1hr break): https://drive.google.com/open?id=1USa3KGasP25wCOxoaTRYKScLxxnbSC0m

Here's one that was recorded in a single session: https://drive.google.com/open?id=1u2ZUMrOu01jSHtllLr5sJ0Zymbd4PLKt

Thank you for the example files.

These .plx files do not contain any continuous recordings, but only the detected events. I added a clearer error message in the reader. We can read the information from these files with the function readPLXFileC, but I don't know how this could be used in Brainstorm at the moment.

What kind of information were you expecting to read from these files with Brainstorm, and how were you expecting to display or process it?

@MartinC @mpompolas Any other suggestions?

Those files should contain information about waveform features as well as timestamps for events and unit activity.

In offline sorter I had been able to see waveforms which I could use to perform PCA and define units. In Neuroexplorer those files contained all of the info I needed to look at perievent histograms and such. I could also extract features for each waveform with MexPlex in MatLab, but I have trouble figuring out how to use that extracted data.

The thing that I actually need to do to finish up an old abandoned manuscript is simply to get a good estimate of baseline activity for 1-6 units on 1-7 channels per file, with approximately 120 files. Previously when I went to calculate z-scores using the data I had extracted from Nex, I found that my baseline estimates seemed to have artificially low variability, so I need to double check that issue.

I guess I'd also like to see if there's a way to improve clustering or better present the peri-event information - I don't know what the brainstorm software is capable of so I just wanted to play around to get started.

Here's the output I get from MexPlex function "readall" in matlab for the second linked file before it encounters an error (I have no idea why, but there are tons of errors that pop up with the matlab packages and my data):
readall
Opened File Name: ...\Documents\OD Files\325 - Sorted\ep325_RI30_day3_050316-02.plx
Version: 106
Frequency : 40000
Comment :
Date/Time : 5/ 3/2016 13:40: 1
Duration : 2733.0277
Num Pts Per Wave : 24
Num Pts Pre-Threshold : 8
Data type : Single Electrode
Spike Peak Voltage (mV) : 3000
Spike A/D Resolution (bits) : 12
Slow A/D Peak Voltage (mV) : 5000
Slow A/D Resolution (bits) : 12

Just added code to the original readall function to get the waveform, now stored under "allwave". I'll post it when I can, I think the forum is mad that I've put up too many links to google drive, so I can't link to that host?

Hi @dopameanie
the way that the neurophysiology toolbox has been designed, is to provide analytical solutions from raw data, all the way to spiking and LFP activity.

The assumption however, is that the raw data is imported (or LFP data with the spiking information in some cases).

I downloaded your datasets, and as @Francois mentioned, there don't seem to be any continuous data present besides the spiking information. There are no tools at this point that can deal with just the spikes and no continuous data.

You can try to import the raw .plx data (if you still have them) and you should be able to follow the steps described in the tutorial. Specifically for Plexon data, you can even spike-sort them through Plexon's spike-sorter and then import them in Brainstorm, so there is no need to use the spike-sorters we have embedded in the neurophysiology toolbox.

Konstantinos