Problems with extracting LFP from raw e-phys data

Our file is too big (our .dat file is 96 or 128 channels) to extract the LFPs from the whole file , and it gives us an error in line 250: bst_bandpass_hfilter. Can we extract just a number of selected channels instead of all of them?
thanks

The error occurred as the Despike option was selected
https://neuroimage.usc.edu/brainstorm/e-phys/RawToLFP#With_Bayesian_Spike_Removal

and there was a small bug in it.
The bug is now corrected in: Bugfix: Incorrect data shape in Despike (spike removal) · brainstorm-tools/brainstorm3@3526f5a · GitHub

Please update your Brainstorm and try again

Thank you very much, I did the update and unselect the Despike option, but it just copies the raw file without extracting the "link to LFP file". Am I doing something wrong?
Thanks


basically we have a copy of the raw file in a new folder instead the "link to LFP"
Also in the command window in MATLAB it tells us the condition of the folder already exists even if the folder is creating during the process

Also, following the procedures in the tutorial, importing the conditions, and trying to do Spike-LFP coherence it gives us an error saying we don't have the spiking events (in the tutorial it says that they should be contained in the new bst file)

Also, trying to re-sort the raw file and then convert that to LFP, it gives me that error


and unselecting the despike option it gives me a copy of the raw file

The name "Link to LFP file" was removed from Brainstorm almost a year ago.
While the file is called "Link to raw file" it does contain the LFP (as per the name of the folder). It is not a copy, you can check that by opening the file and verifying that the downsampling was performed.

This seems to be related to the unsuccessful creations of LFP files (before the bugfix).
To fix that:

  1. For that Subject delete the "_LFP" raw node folders in the Brainstorm GUI
  2. Then close Brainstorm
  3. Go to the brainstorm database directory /data/SUBJECT/ and delete the @rawFOLDERNAME_LFP directories.
  4. Start Brainstorm and try to create the LFP

Do you have installed the Optimization Toolbox? It's required for the Despike option

Thank you very much for the help, we just installed the optimization toolbox.
The problem with LFPs is that, after the sorting it says that we can not do the Spike-LFP coherence because it didn't find the spikes in it even if we did the spike sorting before. We did a bandpass from 300-3000Hz for the spike sorting and then trying to extract the LFPs from the original raw it gives us that error trying to do the analyis as if we even didn't do the sorting


Can I import the spiking events directly in the raw?

The error "No spike event in this file" is evoked if at least one of the files used as input does not have any spike for any channel.

Can you check the imported trials to verify that all of they have at least one spike?

Yes, i tried to export the spikes event in .mrk file and import them in the other raw, but it still gets me the same error. Is this procedure wrong

The events in the raw file are not the trouble, there are events with the name Spikes Channel XXX, right?

The trouble is with the imported LFP epoch. The error indicates that in at least one of the epochs there are not spike events. Explore the imported LFP epochs to find such epochs, for example, the top and bottom figures show LFP epochs with and without spike events respectively. When the bottom LFP epoch is included to compute the spike coherence it produces the reported error.

Ok, so when i import the LFP epochs from the raw LFP it doesn't keep me saved the spikes channel i imported? So do I have to do that per every single trial or there's a smarter/faster way?

I fixed it, but even with the thresold it gives me in the graph the whole frequencies instead the 0.5/150hz i set in the bandpass. Can I fix it?

No, when importing all the events are kept. However it can be that spikes where not detected around the event that you used to import.

Coherence is computed up to 0 to half the sampling frequency.