[FieldTrip] Combine multiple blocks

Stephen Whitmarsh stephen.whitmarsh at gmail.com
Tue Nov 20 09:43:48 CET 2018


Pramod,

*If *you can use MaxFilter (on NeuroMag system), you can also consider
using  MaxFilter to artificially align sensors locations to sensor position
of e.g. the first recording. See their manual for that. However, I agree
with Jan-Mathijs that that's technically questionable and probably
unnecessary, and that combining blocks e.g. on source level, if data
quality permits, would be a more proper approach.

Cheers,
Stephen

On Tue, 20 Nov 2018 at 09:36, Schoffelen, J.M. (Jan Mathijs) <
jan.schoffelen at donders.ru.nl> wrote:

> Pramod,
>
> Your queries are lacking detail:  i.e. there is no detail as to what you
> actually want to do (e.g. type of source reconstruction etc.), nor any
> detail about what you have tried yourself so far. Therefore, it is hard to
> give constructive feedback/directions.
>
> I suggest to first try and get a running pipeline to do source
> reconstruction using data from a single block. Then it’s relatively
> straightforward to extend this to a multiple block setting, where the exact
> sensible directions to take depend on the source reconstruction algorithm
> and the quality of the data per block. One possibility would be, as I
> already mentioned, to recover a more or less useable grad structure, using
> ft_average_sens. Alternatively, you could do the source reconstruction per
> block, and combine afterwards.
>
> Good luck,
> Jan-Mathijs
>
>
>
> J.M.Schoffelen, MD PhD
> Senior Researcher, VIDI-fellow - PI, language in interaction
> Telephone: +31-24-3614793
> Physical location: room 00.028
> Donders Centre for Cognitive Neuroimaging, Nijmegen, The Netherlands
>
> On 19 Nov 2018, at 23:04, Gaur, Pramod <p.gaur at ulster.ac.uk> wrote:
>
> Hi Jan-Mathijs,
>
> I want to do source analysis. I have 3 blocks with 40 trials each for one
> subject and want to do the source analysis. Yes, you pointed it correctly “*ft_appenddata
> throws the grad-field away, since it recognizes that the channel (and coil)
> positions are different in each of the runs.*” Please advise me how to do
> the source analysis on them.
>
> Best regards,
> Pramod
>
> *From:* fieldtrip [mailto:fieldtrip-bounces at science.ru.nl
> <fieldtrip-bounces at science.ru.nl>] *On Behalf Of *Schoffelen, J.M. (Jan
> Mathijs)
> *Sent:* 19 November 2018 19:51
> *To:* FieldTrip discussion list <fieldtrip at science.ru.nl>
> *Subject:* Re: [FieldTrip] Combine multiple blocks
>
> 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> 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  *W:* 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 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
>
>
>
>
> 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*
> _______________________________________________
> fieldtrip mailing list
> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> https://doi.org/10.1371/journal.pcbi.1002202
>
>
>
> _______________________________________________
> 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/20181120/7ce20ffb/attachment.html>


More information about the fieldtrip mailing list