[FieldTrip] ft_redefinetrial problem

qi li lihqih at gmail.com
Fri Jan 13 23:26:08 CET 2012


Hi Jan,

FYI. The error message is as follows,

the input is raw data with 275 channels and 16 trials
Using the gradiometer configuration from the dataset.
undoing the G3BR balancing
Reference to non-existent field 'pnt'.

Error in channelposition (line 234)
      pnt = sens.pnt;

Error in ft_neighbourselection (line 110)
        [sens.pnt, sens.label] = channelposition(sens);

Error in onetrialintotrials (line 100)
  cfg.neighbours = ft_neighbourselection(cfg, triggered_trials);

Another similar problem arises when you have done  PCA and want to remove
some components.

You command is as follows,
cfg=[];
cfg.topo=comp.topo;
cfg.topolabel=comp.topolabel;
comp_o=ft_componentanalysis(cfg,data_I4);
cfg=[];
cfg.component=[1];
data_I4c=ft_rejectcomponent(cfg,comp_o)

Errors pop up,

Reference to non-existent field 'invcomp'.

Error in ft_rejectcomponent (line 181)
  [junk, remove]    = match_str(comp.label, tmp.balance.invcomp.labelnew);

Both error in 1223 version.

I hope this information is useful.

Thanks!

Qi



On Fri, Jan 13, 2012 at 2:12 PM, jan-mathijs schoffelen <
jan.schoffelen at donders.ru.nl> wrote:

> What is the stack of the error? I.e. in what line of what function (and
> calling functions) does it occur?
>
> Jan-Mathijs
>
> On Jan 13, 2012, at 5:58 PM, qi li wrote:
>
> Hi All,
>
> Thanks a lot for your help! The codes look like this
>
> cfg=[];
> cfg.trl=trial; %user defined 20*3 matrix
> triggered_trials=ft_redefinetrial(cfg,triggered_trials);
>
>
>  cfg = [];
>   cfg.method = 'triangulation';
>   cfg.neighbours = ft_neighbourselection(cfg,   triggered_trials);
>
> The error message is 'sen.pnt' not found. I am using 1223 version.
>
> Qi
>
> On Thu, Jan 12, 2012 at 4:09 PM, jan-mathijs schoffelen <
> jan.schoffelen at donders.ru.nl> wrote:
>
>> Hi guys,
>>
>> I agree with Nathan that some additional information would be
>> helpful. The 'problem' Qi relates to (at least the issue with the hdr.grad)
>> is a change in the way the sensor-array is defined in FT. A while ago we
>> changed the .pnt/.ori naming scheme into .chanpos/.coilpos/.coilori to make
>> the distinction between channels and coils more transparent. There is a
>> thread on this mailing list about it and more documentation can be found on:
>>
>>
>> http://fieldtrip.fcdonders.nl/faq/how_are_electrodes_magnetometers_or_gradiometers_described
>>
>> In general this change should not affect your analysis, unless you are
>> relying on outdated code, or custom-written code which expects the
>> .pnt/.ori fields still to be present.
>>
>> If you want to chop up your data into short fixed length segment, you
>> should use ft_redefinetrial with the options: cfg.length and cfg.overlap.
>>
>> BW,
>>
>> JM
>>
>> On Jan 12, 2012, at 10:02 PM, Nathan Weisz wrote:
>>
>> Hi Qi,
>>
>> providing some code, including some output may actually help …
>>
>> I am unaware of ft_redifinetrial altering the contents of your hdr field
>> (i admit i have never paid attention to it), but even if it did how does
>> this affect your subsequent analysis steps? e.g. at least to my knowledge,
>> FT looks for data.grad (instead of data.hdr.grad) e.g. for plotting, source
>> analysis etc. so if you add your grad info via ft_read_sens, then
>> everything should be fine …
>>
>> otherwise, if the original hdr content is so important, then save it as a
>> temporary variable and add it to your redefined trial later.
>>
>> but perhaps i have totally misunderstood your problem. in that case see
>> introductory remark on code.
>>
>> good luck,
>> n
>>
>> On 12.01.2012, at 17:20, qi li wrote:
>>
>> Hi,
>>
>> I have a fixed length experiment raw. I  apply ft_redefinetrial with
>> cfg.trl to epoch it into many segments. When this step is done, the
>> output.hdr.grad has different fields from the input field. More
>> specifically the pnt and ori field are gone thus cause trouble for the
>> later analysis.*  *I am using 12/23 version, is there a bug or it is
>> suppose to be so.
>>
>> If I only want to separate the long data into segments, which command can
>> change only the time window while keeping all the other parameters
>> unchanged?
>>
>> Thanks!
>>
>> Qi
>>
>>
>> _______________________________________________
>> fieldtrip mailing list
>> fieldtrip at donders.ru.nl
>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>>
>>
>> _______________________________________________
>> fieldtrip mailing list
>> fieldtrip at donders.ru.nl
>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>>
>>
>>   Jan-Mathijs Schoffelen, MD PhD
>>
>> Donders Institute for Brain, Cognition and Behaviour,
>> Centre for Cognitive Neuroimaging,
>> Radboud University Nijmegen, The Netherlands
>>
>> Max Planck Institute for Psycholinguistics,
>> Nijmegen, The Netherlands
>>
>> J.Schoffelen at donders.ru.nl
>> Telephone: +31-24-3614793
>>
>>
>> _______________________________________________
>> fieldtrip mailing list
>> fieldtrip at donders.ru.nl
>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>>
>
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>
>
> Jan-Mathijs Schoffelen, MD PhD
>
> Donders Institute for Brain, Cognition and Behaviour,
> Centre for Cognitive Neuroimaging,
> Radboud University Nijmegen, The Netherlands
>
> Max Planck Institute for Psycholinguistics,
> Nijmegen, The Netherlands
>
> J.Schoffelen at donders.ru.nl
> Telephone: +31-24-3614793
>
>
> _______________________________________________
> 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/20120113/abfaac52/attachment.html>


More information about the fieldtrip mailing list