[FieldTrip] error with ft_appenddata

Wong-Barnum, Mona mona at sdsc.edu
Wed Oct 19 00:45:15 CEST 2016


Thanks Jan for your help!

I ended up doing the following steps:

addpath /path/to/fieldtrip
ft_defaults

cfg1 = [];
cfg1.dataset = '1.fif';
data1 = ft_preprocessing ( cfg1 );

cfg2 = [];
cfg2.dataset = '2.fif';
data2 = ft_preprocessing ( cfg2 );

cfg3 = [];
cfg3.dataset = '3.fif';
data3 = ft_preprocessing ( cfg3 );

cfg=[];
data = ft_appenddata ( cfg, data1, data2, data3 )

save stitched.mat data -v7.3


Which worked.

If you see any other problem that I may have missed, please feel free to educate me.

Thanks!

Mona


On Oct 5, 2016, at 5:21 PM, Schoffelen, J.M. (Jan Mathijs) <jan.schoffelen at donders.ru.nl<mailto:jan.schoffelen at donders.ru.nl>> wrote:

Hi Mona,

If you directly use the output of ft_read_data as input into ft_appenddata, it won’t work. The reason is that ft_appenddata expects in the input (data#) matlab structures that are generated by ft_preprocessing. Ft_read_data outputs a numeric data matrix, which is only part of the ft_preprocessing generated output. Have you something like this yet?:

cfg = [];
cfg.dataset = ;somefiffile.fif’;
data = ft_preprocessing(cfg);

Best

Jan-Mathijs

On 05 Oct 2016, at 23:06, Wong-Barnum, Mona <mona at sdsc.edu<mailto:mona at sdsc.edu>> wrote:


I’m getting a runtime error with ft_appenddata:

data = ft_appenddata ( cfg, data1, data2, data3, data4, data5, data6, data7, data8, data9, data10, data11, data12, data13, data14 )


Error using ft_checkdata (line 468) This function requires raw+comp or raw data as input.

Error in ft_appenddata (line 80) varargin{i} = ft_checkdata(varargin{i}, 'datatype', {'raw+comp', 'raw'}, 'feedback', 'no');

Error in stitch (line 45) data = ft_appenddata ( cfg, data1, data2, data3, data4, data5, data6, data7, data8, data9, data10, data11, data12, data13, data14, data15, data16, data17, data18, data19, data20 )

Error in run (line 96) evalin('caller', [script ';']);

I have Neuromag data and was able to read the files into data# using ft_read_data.

In the documentation, it says cfg can be empty so I declared it by "cfg = ‘’;” before the ft_appenddata call; is that ok?

Any help/suggstions/tips regarding the ft_appenddata error would be appreciated.  Thanks!

Mona


*********************************************
    Mona Wong
    Web & iPad Application Developer
    San Diego Supercomputer Center

    "To handle yourself, use your head;
    to handle others, use your heart."

-- Eleanor Roosevelt
*********************************************

_______________________________________________
fieldtrip mailing list
fieldtrip at donders.ru.nl<mailto:fieldtrip at donders.ru.nl>
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip

_______________________________________________
fieldtrip mailing list
fieldtrip at donders.ru.nl<mailto:fieldtrip at donders.ru.nl>
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip

*********************************************
    Mona Wong
    Web & iPad Application Developer
    San Diego Supercomputer Center

    "Strive not to be a success, but
    rather to be of value."
                                --- Albert Einstein
*********************************************

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20161018/df4b482a/attachment-0001.html>


More information about the fieldtrip mailing list