Back to the main page.

Bug 2975 - ft_applymontage does not deal with timelocked data with keeptrials='yes'

Reported 2015-10-01 14:41:00 +0200
Modified 2015-10-01 14:44:37 +0200
Product: FieldTrip
Component: forward
Version: unspecified
Hardware: All
Operating System: All
Importance: P5 minor
Assigned to: Johanna
Depends on:
See also:

Johanna - 2015-10-01 14:41:39 +0200

Hi all, If you enter into ft_applymontage data that is the output of ft_timelockanalysis with keeptrials='yes' e.g. ans = avg: [63x3770 double] var: [63x3770 double] time: [1x3770 double] dof: [63x3770 double] label: {63x1 cell} trial: [58x63x3770 double] trialinfo: [58x29 double] cfg: [1x1 struct] dimord: 'rpt_chan_time' then the inputtype is found as 'raw' (due to the presence of a trial field) but then later crashes due to that data.trial is not a cell array, but instead a 3D matrix. It's an easy fix that I'm happy to do, but which is preferred? A) Allow this data to be found as 'raw' and then in the switch/case 'raw' section (around line 454) add this line to convert to raw: data=ft_checkdata(data,'datatype','raw'); or B) Detect data as timelock and not allow it? or C) Detect data as timelock and create new inputtype 'tlock' and switch/case section for this? (with both keeptrials=yes and keeptrials=no options allowed?) Cheers, Johanna