Back to the main page.

Bug 987 - make ft_selectdata test script

Status CLOSED FIXED
Reported 2011-09-22 18:09:00 +0200
Modified 2013-10-26 18:15:56 +0200
Product: FieldTrip
Component: core
Version: unspecified
Hardware: PC
Operating System: Windows
Importance: P1 normal
Assigned to: Jan-Mathijs Schoffelen
URL:
Tags:
Depends on:
Blocks: 1021
See also:

Stephen Whitmarsh - 2011-09-22 18:09:35 +0200

First, however, the following: 1) dimlength only recognizes hardcoded fields, (cov, powspctrm), not user specified, e.g. 'stat' which would be common in a 'second level statistic'. So in the case I enter a series (becoming the rpt) of datastructures in freqstatistics, all containing dimord = 'chan_freq', with only a .stat field as the data, it cannot infer the dimensionality (i.e. dimlength). However, freqstatistics was called with cfg.parameter = 'stat'. This is however not passed over to dimlength in selectdata. Problem occurs (recursively) at dimlength line 46 and 116 2) Also, it there are problems swallowing one-dimensional data. Still is high on my wishlist since now i have to add a dimension (_freq) and an extra field (.freq). Please let me know if I need to elaborate. Cheers, Stephen


Stephen Whitmarsh - 2011-10-17 19:22:45 +0200

As it is now ft_selectdata is a little bit inconsistent when it comes to dealing with out-of-bounds or invalid input parameters. I see how it would be the best one can do considering relaxed use by higher functions, but to give some examples: - breaks when nonexistent channel is used (perhaps do a check?) - no errors (or warning) when toilim do not overlap with data.time, but instead returns single timepoint closest to toilim. I.e. if toilim = [-12 -10] but data.time = [-8 0] (as with testdata), it returns data.time = -8 (and corresponding values). - no errors (or warning) when frequencies do not exist and similar behaviour as with toilim. Although great if you know the behaviour, a user might not e.g. expect a requested toilim out of bounds to be returned with data not from within those limits. What say ye?


Jan-Mathijs Schoffelen - 2013-10-26 17:54:11 +0200

Test function exists. Closing this one; add functionality to the test function while addressing other bugs related to ft_selectdata


Jan-Mathijs Schoffelen - 2013-10-26 17:54:26 +0200

Test function exists. Closing this one; add functionality to the test function while addressing other bugs related to ft_selectdata


Jan-Mathijs Schoffelen - 2013-10-26 17:54:43 +0200

Now finally changing status of this bug