[FieldTrip] Combine multiple blocks

Schoffelen, J.M. (Jan Mathijs) jan.schoffelen at donders.ru.nl
Mon Nov 19 20:50:58 CET 2018


Pramod,

I don’t understand how ‘combining all the three blocks before the preprocessing’ would help you to preserve the channel positions. Apparently, these are different for each of the blocks in your case. It’s also not clear to me, why this is causes problem in your specific case.

Anyway, ft_appenddata throws the grad-field away, since it recognizes that the channel (and coil) positions are different in each of the runs.
If you still want to obtain some kind of ‘average’ representation of the channel position, you can use ft_average_sens. If the positions are not altogether too different, it might be OK to average the positions across blocks, although technically it’s of course incorrect to do so. Yet, if for each of the blocks you have applied block-specific spatial transformations (e.g. maxfilter) then it’s a different story altogether, and things will become hairy very rapidly.

Best wishes,

Jan-Mathijs


On 19 Nov 2018, at 19:19, Gaur, Pramod <p.gaur at ulster.ac.uk<mailto:p.gaur at ulster.ac.uk>> wrote:

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)
    data_MEG_filt=data;
    grad = data.grad;
    else
    cfg = [];
    data_MEG_filt = ft_appenddata(cfg, data_MEG_filt,data);
    end


Any advice will be highly appreciated.


<image001.jpg>
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/>


<image003.jpg>





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<mailto: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
_______________________________________________
fieldtrip mailing list
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
https://doi.org/10.1371/journal.pcbi.1002202

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20181119/bdea2ec7/attachment-0002.html>


More information about the fieldtrip mailing list