Back to the main page.
Bug 121 - selectdata with tf-data as input with avgoverfreq for a given foilim gives in the output xxx.freq which is not the average of the requested range
Status | CLOSED FIXED |
Reported | 2010-07-24 13:52:00 +0200 |
Modified | 2010-07-26 09:26:56 +0200 |
Product: | FieldTrip |
Component: | core |
Version: | unspecified |
Hardware: | PC |
Operating System: | Mac OS |
Importance: | P1 normal |
Assigned to: | Jan-Mathijs Schoffelen |
URL: | |
Tags: | |
Depends on: | |
Blocks: | |
See also: |
Jan-Mathijs Schoffelen - 2010-07-24 13:52:14 +0200
q = selectdata(GA3back,'avgoverfreq','yes','foilim',[1 10],'avgovertime','yes','toilim',[-3 0.5]); q = label: {59x1 cell} freq: 50.5000 time: -1.2500 dimord: 'chan_freq_time' powspctrm: [59x1 double] cfg: [1x1 struct] The first question (to Stephen) would be: what's the frequency axis in q? Second question: is only the freq-axis wrong in the output, or also the data?
Stephen Whitmarsh - 2010-07-24 14:18:51 +0200
(In reply to comment #0) > q = selectdata(GA3back,'avgoverfreq','yes','foilim',[1 > 10],'avgovertime','yes','toilim',[-3 0.5]); > > q = > > label: {59x1 cell} > freq: 50.5000 > time: -1.2500 > dimord: 'chan_freq_time' > powspctrm: [59x1 double] > cfg: [1x1 struct] > > The first question (to Stephen) would be: what's the frequency axis in q? > Second question: is only the freq-axis wrong in the output, or also the data? (original) data.freq = [1 100]; Only the freq in the output is off, the rest seems ok (e.g. averaging over channels & time).
Jan-Mathijs Schoffelen - 2010-07-24 14:42:15 +0200
the following script reproduces the bug: fieldtrip/testing/test_selectdata_freqdata it seems as if averaging across frequencies does not work correctly
Jan-Mathijs Schoffelen - 2010-07-24 14:59:03 +0200
Actually, there is something fundamentally wrong with how the flags are set in lines 86-92. the strmatch command had the input arguments entered in the wrong order, causing it sometimes to return a 0, even when foilim (toilim etc) was specified. I swapped the order and it seems to work alright now. Stephen, could you do an svn update and report back to me (through bugzilla following the bug's lifecycle and putting the stuff to verified if it works)?