Back to the main page.

Bug 624 - ft_timelockanalysis doesn't work with cfg.vartrllength=1 anymore

Status CLOSED FIXED
Reported 2011-04-29 16:39:00 +0200
Modified 2011-06-29 16:48:12 +0200
Product: FieldTrip
Component: core
Version: unspecified
Hardware: PC
Operating System: Windows
Importance: P1 normal
Assigned to: Johanna
URL:
Tags:
Depends on:
Blocks:
See also:

Johanna - 2011-04-29 16:39:05 +0200

After removal of cfg.latency, the 'if' statements for cfg.vartrllength=1 around line 254 don't make sense anymore. Only 1 or 2 trials will match the criteria of: if (begsamplelatency(i)> latency(1) || endsamplelatency(i) <latency(2)) since 'latency' now is defined as the min of all begsamples and the max of all endsamples. (I have typically called ft_timelockanalysis to compute covariance, not for .avg)


Johanna - 2011-06-29 10:55:04 +0200

I added an error and a warning against this as a patch for now, but will work on 'bigger picture' changes via the other bug 656.


Johanna - 2011-06-29 12:23:53 +0200

Redo of bugfix: If cfg.covariance = 'yes' and cfg.vartrllength=1, then it will look at cfg.covariancewindow to determine if to use that trial. If not, then that trial will also not be used for 'avg' computation, and a warning is printed. If cfg.covariance = 'no' and cfg.vartrllength=1, all trials will be used as if cfg.vartrllength=2.