Print

Print


Hi Jessica,

You can use spm_eeg_crop to remove the channels you don't need. I think it would be useful to get to the bottom of that error. I CC Joe Dien who had done the latest code fixing and might be able to look into this.

Vladimir

On Mon, Nov 2, 2015 at 3:36 AM, Jessica Schrouff <[log in to unmask]> wrote:
Dear Vladimir,

Thanks for your answer.

I tried the codes you sent but unfortunately it didn't work (still the same error, dimension mismatch). I did what you suggested in a previous email and I am converting the whole file (which works fine), then I am splitting it (as I want to downsample the brain activity but not the event or the mike channels) in 2 files. When splitting, I go channel by channel (to avoid running out of memory), using selectdata. This is however extremely slow. I guess if I build blocks of time points, with all channels, it might be a bit faster, but I'm wondering if there is another/faster way/function to do what I want to do (i.e. convert the file and obtain 2 files from it).

Thank you for your help.
Best regards,
Jessica


Le 25/09/2015 12:18, Vladimir Litvak a écrit :
Dear Jessica,

On Thu, Sep 24, 2015 at 6:13 PM, Jessica Schrouff <[log in to unmask]> wrote:
Dear SPM users and developers,

I am trying to convince my team to switch to a SPM pre-processing pipeline for our intracranial EEG data. We however keep on getting errors when trying to perform simple operations:

1 - convert edf using a list of channels: I reported this issue previously. I then resorted to the solution offered, i.e. convert all then selectdata, but...

2 - convert edf using all channels: using the batch to convert an edf file (all channels, continuous) results in an error at line 398 of spm_eeg_convert. It seems that it cannot create the file_array because dim is [0 0]. From what I saw, it first gets the deader and sets D.data to [] (hence the [0 0] dimensions). When it creates the file array, it tries to set a.dim (in the file_array code, nargin>=2) to the number of channels and time points (which are correct), but fails saying that 'dim' needs to be an integer positive.
(Matlab R2015a, SPM12 with latest updates).


Not sure about this problem, but try putting attached read_edf.m in SPM/external/fieldtrip/fileio/private and ft_read_data.m in SPM/external/fieldtrip/fileio and then selecting a channel subset should work. See if that helps.
 

3 - prepare faces versus scrambled faces EEG dataset. A student is starting to use SPM and I suggested she uses the public EEG dataset and follows the tutorial. She had an error when loading the sfp file in the prepare step. Her Matlab windows just crashes and she needs to kill it.

Again this is something that'd be difficult to solve without being able to reproduce the problem. I suggest you try to trace in the debugger at which line the problem happens. 
 

(4, less important) - multiple warnings with the GUIs during the display of MEEG objects with the latest versions of Matlab (R2014b), saying we should switch to the latest uitable component. The display window does not show the signal anymore (white axes) if we zoom then try to scroll at a later time point.

I think Guillaume was working on some of this but the fixes might not be in the web version yet. You can write him to [log in to unmask] and ask to get the latest in-house version.
 

I also have a question: can we input channel coordinates in 3d without fiducials? We have 3d coordinates of intracranial electrodes that we don't want to flatten to 2d but rather use to plot on a 3d mesh. To avoid keeping separate files, I would like to get that information in the MEEG object. I tried different things but it would always fail, asking me for fiducials and trying to compute the 2d flattened coordinates of the channels.

If it's just about keeping something in the object and you don't want SPM to use it you can treat the D object as a struct and store anything there.

e.g.

D = spm_eeg_load
D.blahblah = [1 2 3 4 5 6];
save(D);
disp(D.blahblah)

Best,

Vladimir

 

Can you please help with these multiple issues?

Thank you,
Best regards,
Jessica





Avast logo

L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast.
www.avast.com