[FieldTrip] Combine multiple blocks

Gaur, Pramod p.gaur at ulster.ac.uk
Mon Nov 19 19:19:55 CET 2018

Dear Team,

I have a quick concern, I have a cognitive task and recorded three blocks. Is there any way in which I can combine all the three blocks before the preprocessing. I have alternate to preprocess the blocks separately and then combining them. In this case, I lose the data_MEG_filt                   .grad.chanpos location.

cfg = [];
    cfg.dataset = filename;
    % % cfg = ft_definetrial(cfg);
    cfg.trialdef.eventtype = 'STI101';
    %cfg.trialdef.eventtype = 'gui';
    cfg.trialdef.eventvalue = [16 17 18 32 33 34]% 17 18];% put your own
    cfg.trialdef.prestim        = prestim;
    cfg.trialdef.poststim       = poststim;
    %     cfg.length                  = 1;
    cfg                         = ft_definetrial(cfg);

    % read in the data from the magnetometer
    % cfg.channel = {'MEGMAG','STI101'};
    cfg.channel                 = {'MEG'};%,'-MEG2331','-MEG0122'};%%{'MEG*2','MEG*3'};%selected_sensors;%{'MEG'};%
    % cfg.lpfilter                = 'yes';
    % cfg.lpfreq                  = 40;
    % cfg.hpfilter                = 'yes';
    % cfg.hpfreq                  = 1;
    cfg.continuous              = 'yes';
    cfg.detrend                 = 'no';
    cfg.demean                  = 'yes';
    cfg.dftfilter               = 'yes';
    % cfg.dftfreq                 =[50 100 150];% power line noise
    cfg.bpfreq        = [1 48];
    cfg.metric                  = 'zvalue';
    cfg.layout                  = 'neuromag306all.lay';
    cfg.baselinewindow = [-0.5 0];
    data_MEG_filt                   = ft_preprocessing(cfg);

    if isempty(data_MEG_filt)
    grad = data.grad;
    cfg = [];
    data_MEG_filt = ft_appenddata(cfg, data_MEG_filt,data);

Any advice will be highly appreciated.

[Ulster University]
Dr Pramod Gaur
Research Assistant in Neuro-Imaging Technology
School of Computing, Engineering and Intelligent Systems
Magee Campus
E: p.gaur at ulster.ac.uk<mailto:p.gaur at ulster.ac.uk>  W: www.ulster.ac.uk<http://www.ulster.ac.uk/>
Social:  Twitter: @SceisUni<https://twitter.com/SceisUni>
Facebook: @UlsterUniComputingEngineeringIntelligentSystems<https://www.facebook.com/UlsterUniComputingEngineeringIntellientSystems/>

[cid:image004.jpg at 01D3EDDB.BF0D58A0]

This email and any attachments are confidential and intended solely for the use of the addressee and may contain information which is covered by legal, professional or other privilege. If you have received this email in error please notify the system manager at postmaster at ulster.ac.uk and delete this email immediately. Any views or opinions expressed are solely those of the author and do not necessarily represent those of Ulster University.
The University's computer systems may be monitored and communications carried out on them may be recorded to secure the effective operation of the system and for other lawful purposes. Ulster University does not guarantee that this email or any attachments are free from viruses or 100% secure. Unless expressly stated in the body of a separate attachment, the text of email is not intended to form a binding contract. Correspondence to and from the University may be subject to requests for disclosure by 3rd parties under relevant legislation.
The Ulster University was founded by Royal Charter in 1984 and is registered with company number RC000726 and VAT registered number GB672390524.The primary contact address for Ulster University in Northern Ireland is Cromore Road, Coleraine, Co. Londonderry BT52 1SA
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20181119/a2b603c1/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 37467 bytes
Desc: image001.jpg
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20181119/a2b603c1/attachment-0002.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.jpg
Type: image/jpeg
Size: 3389 bytes
Desc: image003.jpg
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20181119/a2b603c1/attachment-0003.jpg>

More information about the fieldtrip mailing list