[FieldTrip] Recombining Trials for Source Analysis

Lorenzo Magazzini magazzinil at gmail.com
Mon Apr 18 11:24:48 CEST 2016


Hi Robert,

I'm not sure, but my guess would be that you need to adjust the .time field
in your data_clean_rs structure, so that it matches the length of the
.trial field.

Best wishes,
Lorenzo




Lorenzo Magazzini

PhD Student

magazzinil at cardiff.ac.uk


CUBRIC Building
Maindy Road

Cardiff
CF24 4HQ



On 18 April 2016 at 10:13, Seymour, Robert (Research Student) <
seymourr at aston.ac.uk> wrote:

> Dear Fieldtrippers,
>
>
> I am trying to use an LCMV beamformer to project 5 minutes of resting
> state data to the source level. During my data cleaning procedure I segment
> my continuous recording into 1 second "trials" and reject those with high
> amplitudes (using the ft_rejectvisual summary window). However I would then
> like to recombine these "trials" (to make 1 long "trial") before I do
> ft_timelockanalysis. Is there a way to do this whilst keeping the Fieldtrip
> structure intact . My current code is below:
>
>
> % Segment into 1s chunks. Input is preprocessed variable called data.
>
> cfg = [];
>
> cfg.length = 1;
>
> cfg.overlap = 0;
>
> data_segmented = ft_redefinetrial(cfg,data);
>
>
> % Reject deviant trials
>
> cfg = [];
>
> cfg.method = 'summary';
>
> cfg.keepchannel = 'yes';
>
> cfg.channel = 'MEGMAG';
>
> clean1 = ft_rejectvisual(cfg,data_segmented);
>
> % Now load this
>
> cfg.channel = 'MEGGRAD';
>
> clean2 = ft_rejectvisual(cfg,clean1);
>
> data_clean_rs = clean2
>
>
> clear clean1 clean2
>
> save data_clean_rs data_clean_rs
>
>
> % Now to recombine trials
>
> data_clean_rs.trial = horzcat(data_clean_rs.trial{1,:}); % (This distorts
> the fieldtrip structure meaning ft_timelockanalysis doesn't work)
>
>
>
> Many thanks,
>
>
> Robert
>
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20160418/b17bfe49/attachment-0002.html>


More information about the fieldtrip mailing list