Back to the main page.

Bug 127 - error using flag for improved freqanalysis

Status CLOSED FIXED
Reported 2010-08-16 11:59:00 +0200
Modified 2010-08-19 14:55:40 +0200
Product: FieldTrip
Component: core
Version: unspecified
Hardware: PC
Operating System: Linux
Importance: P1 normal
Assigned to: Roemer van der Meij
URL:
Tags:
Depends on:
Blocks:
See also:

Stephen Whitmarsh - 2010-08-16 11:59:42 +0200

entering a third input in freqanalysis: ft_freqanalysis(cfg, DataPlanarM,1) gives the following confusing error. And yes, it does not give a problem when i remove the flag, and indeed i did not specify any padding. best, S ??? Error using ==> specest_mtmconvol at 67 the padding that you specified is shorter than the data Error in ==> ft_freqanalysis at 277 [spectrum,ntaper,foi,toi] = specest_mtmconvol(dat, time, 'timeoi', cfg.toi, 'timwin', cfg.t_ftimwin, options{:}); Error in ==> do_TFRs_MM_back at 65 TFR_FPain = ft_freqanalysis(cfg, DataPlanarM,1);


Roemer van der Meij - 2010-08-18 10:05:34 +0200

Hi Stephen, Thanks for reporting! I changed a call to size(x,2) to numel when determining ntrials, that should fix it if you had data.trail cell-array as a trialx1 array (don't know why it wasn't like this in the first place). Does that fix it for you? BTW, the dpss part using variable time-windows is still not perfect. I haven't looked into it yet, but there is quite some difference to the old implementation in some cases. For Hanning windows it seems fine atm, but I am hoping for confirmation from other. Cheers, Roemer


Roemer van der Meij - 2010-08-18 10:06:27 +0200

(In reply to comment #0) > entering a third input in freqanalysis: ft_freqanalysis(cfg, DataPlanarM,1) > > gives the following confusing error. And yes, it does not give a problem when i > remove the flag, and indeed i did not specify any padding. > > best, > S > > ??? Error using ==> specest_mtmconvol at 67 > the padding that you specified is shorter than the data > > Error in ==> ft_freqanalysis at 277 > [spectrum,ntaper,foi,toi] = specest_mtmconvol(dat, time, 'timeoi', > cfg.toi, 'timwin', cfg.t_ftimwin, options{:}); > > Error in ==> do_TFRs_MM_back at 65 > TFR_FPain = ft_freqanalysis(cfg, DataPlanarM,1); Hi Stephen, Thanks for reporting! I changed a call to size(x,2) to numel when determining ntrials, that should fix it if you had data.trail cell-array as a trialx1 array (don't know why it wasn't like this in the first place). Does that fix it for you? BTW, the dpss part using variable time-windows is still not perfect. I haven't looked into it yet, but there is quite some difference to the old implementation in some cases. For Hanning windows it seems fine atm, but I am hoping for confirmation from other. Cheers, Roemer


Robert Oostenveld - 2010-08-18 12:25:40 +0200

test comment


Roemer van der Meij - 2010-08-18 12:27:29 +0200

(In reply to comment #3) > test comment comment received


Roemer van der Meij - 2010-08-18 13:22:00 +0200

(In reply to comment #2) > (In reply to comment #0) > > entering a third input in freqanalysis: ft_freqanalysis(cfg, DataPlanarM,1) > > > > gives the following confusing error. And yes, it does not give a problem when i > > remove the flag, and indeed i did not specify any padding. > > > > best, > > S > > > > ??? Error using ==> specest_mtmconvol at 67 > > the padding that you specified is shorter than the data > > > > Error in ==> ft_freqanalysis at 277 > > [spectrum,ntaper,foi,toi] = specest_mtmconvol(dat, time, 'timeoi', > > cfg.toi, 'timwin', cfg.t_ftimwin, options{:}); > > > > Error in ==> do_TFRs_MM_back at 65 > > TFR_FPain = ft_freqanalysis(cfg, DataPlanarM,1); > > > Hi Stephen, > > Thanks for reporting! I changed a call to size(x,2) to numel when determining > ntrials, that should fix it if you had data.trail cell-array as a trialx1 array > (don't know why it wasn't like this in the first place). Does that fix it for > you? > > BTW, the dpss part using variable time-windows is still not perfect. I haven't > looked into it yet, but there is quite some difference to the old > implementation in some cases. For Hanning windows it seems fine atm, but I am > hoping for confirmation from other. > > Cheers, > Roemer Could you quickly run your script again to see if that caused the problem? I'm not really sure, could be somewhere in deeper code... Cheers, Roemer


Stephen Whitmarsh - 2010-08-18 13:47:33 +0200

Hi Roemer, I'm afraid the problem persists... You're welcome to come by if you want to look for the problem here. (In reply to comment #5) > (In reply to comment #2) > > (In reply to comment #0) > > > entering a third input in freqanalysis: ft_freqanalysis(cfg, DataPlanarM,1) > > > > > > gives the following confusing error. And yes, it does not give a problem when i > > > remove the flag, and indeed i did not specify any padding. > > > > > > best, > > > S > > > > > > ??? Error using ==> specest_mtmconvol at 67 > > > the padding that you specified is shorter than the data > > > > > > Error in ==> ft_freqanalysis at 277 > > > [spectrum,ntaper,foi,toi] = specest_mtmconvol(dat, time, 'timeoi', > > > cfg.toi, 'timwin', cfg.t_ftimwin, options{:}); > > > > > > Error in ==> do_TFRs_MM_back at 65 > > > TFR_FPain = ft_freqanalysis(cfg, DataPlanarM,1); > > > > > > Hi Stephen, > > > > Thanks for reporting! I changed a call to size(x,2) to numel when determining > > ntrials, that should fix it if you had data.trail cell-array as a trialx1 array > > (don't know why it wasn't like this in the first place). Does that fix it for > > you? > > > > BTW, the dpss part using variable time-windows is still not perfect. I haven't > > looked into it yet, but there is quite some difference to the old > > implementation in some cases. For Hanning windows it seems fine atm, but I am > > hoping for confirmation from other. > > > > Cheers, > > Roemer > > Could you quickly run your script again to see if that caused the problem? I'm > not really sure, could be somewhere in deeper code... > > Cheers, > Roemer


Roemer van der Meij - 2010-08-18 14:03:37 +0200

Hmmm, that's odd, I can't replicate it here. Are you sure you are using the home/common version? I did find a bug related to padding, but that code wouldn't be reached if you didn't specify padding (you sure your cfg.pad is not an empty matrix?). I'll be at the DCCN next Wednesday :) (In reply to comment #6) > Hi Roemer, I'm afraid the problem persists... > You're welcome to come by if you want to look for the problem here. > > > (In reply to comment #5) > > (In reply to comment #2) > > > (In reply to comment #0) > > > > entering a third input in freqanalysis: ft_freqanalysis(cfg, DataPlanarM,1) > > > > > > > > gives the following confusing error. And yes, it does not give a problem when i > > > > remove the flag, and indeed i did not specify any padding. > > > > > > > > best, > > > > S > > > > > > > > ??? Error using ==> specest_mtmconvol at 67 > > > > the padding that you specified is shorter than the data > > > > > > > > Error in ==> ft_freqanalysis at 277 > > > > [spectrum,ntaper,foi,toi] = specest_mtmconvol(dat, time, 'timeoi', > > > > cfg.toi, 'timwin', cfg.t_ftimwin, options{:}); > > > > > > > > Error in ==> do_TFRs_MM_back at 65 > > > > TFR_FPain = ft_freqanalysis(cfg, DataPlanarM,1); > > > > > > > > > Hi Stephen, > > > > > > Thanks for reporting! I changed a call to size(x,2) to numel when determining > > > ntrials, that should fix it if you had data.trail cell-array as a trialx1 array > > > (don't know why it wasn't like this in the first place). Does that fix it for > > > you? > > > > > > BTW, the dpss part using variable time-windows is still not perfect. I haven't > > > looked into it yet, but there is quite some difference to the old > > > implementation in some cases. For Hanning windows it seems fine atm, but I am > > > hoping for confirmation from other. > > > > > > Cheers, > > > Roemer > > > > Could you quickly run your script again to see if that caused the problem? I'm > > not really sure, could be somewhere in deeper code... > > > > Cheers, > > Roemer


Stephen Whitmarsh - 2010-08-18 14:23:30 +0200

I just tried again with an updated (revision 1526) Fieldtrip in my own version. Oh, and i did not specify any padding. Cheers, S


Roemer van der Meij - 2010-08-19 14:23:21 +0200

It should work now, could you check again? :) (In reply to comment #8) > I just tried again with an updated (revision 1526) Fieldtrip in my own version. > Oh, and i did not specify any padding. > > Cheers, > S


Stephen Whitmarsh - 2010-08-19 14:48:58 +0200

Its running! (In reply to comment #9) > It should work now, could you check again? :) > > > (In reply to comment #8) > > I just tried again with an updated (revision 1526) Fieldtrip in my own version. > > Oh, and i did not specify any padding. > > > > Cheers, > > S


Stephen Whitmarsh - 2010-08-19 14:50:01 +0200

Its runs. - resolved