Back to the main page.

Bug 1448 - mask in ft_singleplotTFR

Status CLOSED FIXED
Reported 2012-04-26 23:11:00 +0200
Modified 2012-05-04 10:23:43 +0200
Product: FieldTrip
Component: plotting
Version: unspecified
Hardware: PC
Operating System: Windows
Importance: P3 normal
Assigned to: Roemer van der Meij
URL:
Tags:
Depends on:
Blocks:
See also:

- 2012-04-26 23:11:40 +0200

Hello I use the mask to hide none significant data when I plot my time-freq analysis. Previous version of FT are working ok when the mask field is define in cfg.maskparameter (like version 20110118). But with more recent version I got an error message from line 376 saying that data.(cfg.maskparameter) do not exist. Thanks fro your help M.


Robert Oostenveld - 2012-04-26 23:19:36 +0200

Dear Manuel Can you attach the input cfg and the input data that you are passing into ft_singleplotTFR to this bug report (e.g. by saving them both in a single mat file). That helps us in quickly determining what the cause of the problem might be. thanks Robert


Roemer van der Meij - 2012-04-27 10:43:21 +0200

Hi Manuel, I'll assign it to me, I looked into this before. Some small data and cfg that reproduces the bug would be incredibly helpful in fixing it. It is probably due to the mask field being lost somewhere along the lines in several consecutive function calls within the plotting code. It is a bit difficult to predict because it depends on so many things, so some data would be really helpful. Cheers, Roemer


Robert Oostenveld - 2012-04-27 13:18:05 +0200

Created attachment 260 screenshot of part of the multiplotER figure Hi Roemer, For your information: yesterday evening I have made changes to the highlighting/masking in ft_plot_vector and ft_muliplotER. Specifically I implemented the "difference" option. These changes should not be in any way related, but I wanted to attend you to them anyway. Robert


- 2012-04-27 17:01:04 +0200

Created attachment 261 FT data structure containing Dear Robert and Roemer Please find attached some data organized in the FT way. You will see a .powspctrm, .pcispctrm and .ppiscptrm containing respectively power, phase concentration index and phase consistency index. Each of them has is how additional p-value and corresponding mask matrix (named xxx_p and xxx_mask). I copy below a script that plot those in different subplot. I have the impression that the mask is not assign to 'data' in the ft_singleplotTFR. I wonder if this is not due to ft_checkdata. By the way I wrote several functions for my self to compute non parametrics statistics (randomisation/permutation) for erp and tf analysis. I do my best to keep the FT spirit when I do such coding. I will be happy to share those with the community if there is any interest from your side. In science Manuel %% Plot Baseline stats load 'TF_Mwlt_fourier_89'; cfg =[]; cfg.channel = '1'; cfg.xlim = [-0.5 0.5]; cfg.ylim = [3 50]; cfg.showlabels = 'yes'; cfg.maskstyle = 'opacity'; cfg.renderer = 'opengl'; cfg.colormap = jet; subplot(3,1,1) cfg.baseline = 'yes'; cfg.baseline = [-0.5 -0.4]; cfg.baselinetype = 'relchange'; cfg.parameter = 'powspctrm'; % cfg.maskparameter = 'pow_mask'; cfg.zlim = [-1 1]; eval(['ft_singleplotTFR(cfg,' [ 'TF_Mwlt_fourier_V_BlStats' ] ');']); subplot(3,1,2) cfg.baseline = 'no'; cfg.parameter = 'pcispctrm'; cfg.zlim = [0 0.25]; % cfg.maskparameter = 'pci_mask'; eval(['ft_singleplotTFR(cfg,' [ 'TF_Mwlt_fourier_V_BlStats' ] ');']); subplot(3,1,3) cfg.baseline = 'no'; cfg.parameter = 'ppispctrm'; cfg.zlim = [0 0.25]; % cfg.maskparameter = 'ppi_mask'; eval(['ft_singleplotTFR(cfg,' [ 'TF_Mwlt_fourier_V_BlStats' ] ');']);


Roemer van der Meij - 2012-05-01 12:45:29 +0200

(In reply to comment #4) Hi Manuel, Thanks for the attached data and script. I made sure the mask-parameters are kept in the data now, it should work in the latest fieldtrip version (which will be on the ftp-server tonight). Could you confirm that it is fixed? Thanks again for the report! I'll let Robert reply on how people can contribute code, I don't know how we are doing it at this point in time. Best, Roemer


- 2012-05-03 17:59:40 +0200

(In reply to comment #5) Hi Roemer, I checked with version #fieldtrip-20120502. Works well and looks great! Thanks you very much! Manuel