[FieldTrip] Error ussingg ft_appendspike

María Alejandra Korovaichuk alejandra.korovaichuk at ctb.upm.es
Thu Feb 14 13:57:57 CET 2019


Hi again,
This is my question (I hope now would be much clear):
I am trying to do a "preprocessing and analysis of spike+local field
potential data". I followed the tutorial and everything was nice and clear
with your data.
However I found some issues with my own data.
My LFP data is a .mat file and I tranformed it into a  FT data structure.
The only thing I don't have is the header (hdr), because the original
recording came from a .dat file from Inomed recordings. Anyway, even
without the header I am able to plot the data and to see it.
The spikes were sorted with wave_clus so here I don't have any issue, FT
open it and I can work with them perfectly.

The step I am following are:
1) Read the LFP and spikes files with FT. No problem so far except for the
header in the LFP file
2) Define trial and preprocessing of both files separately
3) read and select the spike
4)The first problem is here in: construct a cfg.trl matrix to preprocess
the LFP. I can preprocess like a continuous data (1 column of voltages and
the sampling freq):

load(fullfile(data_dir,'lfp.mat'));
        cfg = [];
        cfg.continuous  = 'yes';
        cfg.channel=lfp_FT.label;
        cfg.padding   = 10;
        cfg.dftfreq   = [50-1*(1/10):(1/10):50+1*(1/10) ]; % filter out 50
hz line noise
        cfg.bsfilter = 'yes';

data_lfp  = ft_preprocessing(cfg, lfp_FT); % read in the LFP

I tried many ways following the different tutorials and nothing works
properly because even when FT let me ADD THE TRIAL INFORMATION
"artificially" into my data_lfp, later on it would show me the
Error using ft_appendspike (line 112): could not find the trial information
in the continuous data"

I plot both files and the spikes match perfectly with the lfp data, so
Matlab is reading them well, but I am doing something  wrong when I try to
create the lfp FT structure.

Thanks for your help,

Maria

El jue., 14 feb. 2019 a las 11:29, María Alejandra Korovaichuk (<
alejandra.korovaichuk at ctb.upm.es>) escribió:

> Hi,
>
> I am trying to append LFP data (from a continous matlab file), with a
> spike data (from wave_clus), into one large file to do some analysis.
>
> I tried many options but I always have the same error (Error using
> ft_appendspike (line 112)
>
> could not find the trial information in the continuous data)
>
> I add all the requiered info manually in order to read it but there is
> something missing I can't find.
>
> Any help is welcome, thanks!
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20190214/87ec760f/attachment-0002.html>
-------------- next part --------------
_______________________________________________
fieldtrip mailing list
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
https://doi.org/10.1371/journal.pcbi.1002202


More information about the fieldtrip mailing list