Back to the main page.
Bug 3378 - ft_singleplotTFR: mask is set to all ones
Status | CLOSED FIXED |
Reported | 2017-12-01 16:52:00 +0100 |
Modified | 2018-01-26 09:52:16 +0100 |
Product: | FieldTrip |
Component: | plotting |
Version: | unspecified |
Hardware: | PC |
Operating System: | Linux |
Importance: | P5 normal |
Assigned to: | Jan-Mathijs Schoffelen |
URL: | |
Tags: | |
Depends on: | |
Blocks: | |
See also: |
Mathis Kaiser - 2017-12-01 16:52:19 +0100
Using the current git revision on R2017b, I noticed that using a logical mask fails in ft_singleplotTFR, as no parts of the plot are masked out. I tracked the problem down to line 334f: maskmatrix( maskmatrix) = 1; maskmatrix(~maskmatrix) = cfg.maskalpha; When maskmatrix is logical, every nonzero element will be converted to true, so the second line just fills up the mask with ones when using e.g. cfg.maskalpha = 0.5. A possible fix would be to change line 334 to maskmatrix = double(maskmatrix); Please let me know if I should submit a pull request.
Jan-Mathijs Schoffelen - 2017-12-04 09:19:59 +0100
Thanks for catching this. Yes, let's please take this to github.
Jan-Mathijs Schoffelen - 2017-12-04 09:20:26 +0100
We can document the resolution here in the end.
Mathis Kaiser - 2017-12-04 12:12:06 +0100
I submitted a PR (#600). While I'm here: I'm assuming Bugzilla is still the right way to submit bugs, or are you transitioning to Github?!
Jan-Mathijs Schoffelen - 2018-01-05 14:03:21 +0100
This has been addressed