Back to the main page.
Bug 600 - ft_singleplotTFR: mask is not set properly
Status | CLOSED FIXED |
Reported | 2011-04-27 00:41:00 +0200 |
Modified | 2011-05-05 21:24:24 +0200 |
Product: | FieldTrip |
Component: | plotting |
Version: | unspecified |
Hardware: | Macintosh |
Operating System: | Mac OS |
Importance: | P1 normal |
Assigned to: | Craig Richter |
URL: | |
Tags: | |
Depends on: | |
Blocks: | |
See also: |
Matt Mollison - 2011-04-27 00:41:58 +0200
I'm using fieldtrip-20110426. On line 378 of ft_singleplotTFR, the variable 'mask' is multiplied by something called 'mdata', but mdata doesn't exist, and thus an error is thrown. I don't know what it should be instead of mdata (maybe datamatrix?). I found this by using ft_multiplotTFR to plot cluster analysis data with avgoverfreq='no', and interactive='yes', trying to more closely examine an individual electrode.
Jan-Mathijs Schoffelen - 2011-04-27 07:11:06 +0200
Hi Craig, Could you have a look at this? Could it be related to your recent changes? Thanks. PS: if you think this has nothing to do with your changes, let me know.
Craig Richter - 2011-04-27 10:04:17 +0200
This my fault. Are you using any kind of masking in you cfg? I will fix it. It is a relic of code that is in there. There is no mdata variable ever created, as I recall. I will remove this entirely..
Matt Mollison - 2011-04-27 15:50:25 +0200
Yes, I'm using the statistical mask from the ft_freqstatistics cluster analysis (and cfg.maskparameter = 'mask';).
Craig Richter - 2011-04-27 17:57:19 +0200
Hi Matt and Jan-Mathijs, This issues should be resolved now and new updated copies of ft_multiplotTFR and ft_singleplotTFR have been uploaded. The functionality that you are using with these is largely new (as I understand it, correct me if I'm wrong JM). I've been working on it over the past couple of weeks so that statistical masks can be displayed on the TFR data. This is undocumented (so I should document it), but here is the gist: using cfg.maskalpha you can set the alpha value of the mask such that 0 will make masked regions completely black, and 1 will leave them unchanged. I find that 0.5 looks good, and is in agreement with previous publications using this style. cfg.masknans will mask the nans as black if set to 'yes', and leave them their typical blue if set to 'no' (default) All of this is consistent between both single and multiplotTFR. Let me know if you have further problems or recommendations so that I can improve the code.