Back to the main page.

Bug 778 - cfg.megscale cfg.eegscale don't work with ft_databrowser

Status CLOSED DUPLICATE
Reported 2011-06-24 18:27:00 +0200
Modified 2013-01-17 10:45:55 +0100
Product: FieldTrip
Component: plotting
Version: unspecified
Hardware: PC
Operating System: Linux
Importance: P4 major
Assigned to: Roemer van der Meij
URL:
Tags:
Depends on:
Blocks:
See also:

Diego Lozano Soldevilla - 2011-06-24 18:27:28 +0200

The modification of sensor's scale seems to not work in ft_databrowser when one want to plot MEG and EEG channels together. Using only data with unique type of sensors (only with MEG channels or only with EEG channels) doesn't work neither. One can change the scale with the GUI but not when one uses 2 types of sensor (i.e. MEG and EEG).


Jörn M. Horschig - 2011-06-25 16:22:33 +0200

Hey Diego, We restrucured the code of the databrowser and temporarily called that function ft_databrowser_new. Dould you please try out ft_databrowser_new and see whether that problem remains?


Jan-Mathijs Schoffelen - 2011-06-25 18:36:01 +0200

(In reply to comment #1) > Hey Diego, > > We restrucured the code of the databrowser and temporarily called that function > ft_databrowser_new. Dould you please try out ft_databrowser_new and see whether > that problem remains? Hi Jorn, I tried with ft_databrowser_new and I get the same problem. In both ft_databrowser and ft_databrouwser_new I only see the use of cfg.megscale or cfg.eegscale into the subfunction redraw_cb but not in the main code (that's it, before the all subfunctions). If I'm right, redraw_cb only works in the ft_databrowser's GUI and I would expect the use of the cfg.*scale information before the use of the GUI. I do this: [chNum,X,Y,Width,Height,Lbl,Rem] = textread('CTF151.lay','%f %f %f %f %f %q %q'); Lbl=Lbl(1:3:151,:); for elec = 1:size(eog.label,1) Lbl(end+1,:)= eog.label(elec);%here there're EEG057 and EEG058, my EOGchannels end meog = ft_appenddata([], meg, eog); cfg = []; cfg.continuous = 'no'; cfg.trl = eog.cfg.trl; cfg.viewmode = 'vertical'; cfg.channel = Lbl; cfg.eegscale = 4e-5; cfg.megscale = 1e-15; artif = ft_databrowser_new(cfg,meog);


Jörn M. Horschig - 2011-07-06 15:41:50 +0200

If you need this urgently, please tell me and I can fix this. Sorry that this has rather low priority for me at the moment. I could fix it quickly, but there are other bugs waiting for a longer time ;)


Diego Lozano Soldevilla - 2011-07-06 15:47:58 +0200

(In reply to comment #3) > If you need this urgently, please tell me and I can fix this. Sorry that this > has rather low priority for me at the moment. I could fix it quickly, but there > are other bugs waiting for a longer time ;) I don't need it urgently Jorn ;)


Jörn M. Horschig - 2011-09-06 13:46:44 +0200

I just had a look at it, and I don't see what is not working for you. Could you show me on your pc?


Jörn M. Horschig - 2012-06-20 15:20:06 +0200

Hey Diego, are you still having these problems? Best, Jörn


Diego Lozano Soldevilla - 2012-06-21 14:30:07 +0200

(In reply to comment #6) Hi Jorn, No I don't. Thanks Jorn! Diego


Jörn M. Horschig - 2012-06-21 14:47:25 +0200

actually, I didn't do anything, but I guess it got fixed while in the flow of some other bugs ;) sorry for letting you wait that long


Jörn M. Horschig - 2012-08-23 14:02:12 +0200

bug closing time (http://www.youtube.com/watch?v=xGytDsqkQY8)


Diego Lozano Soldevilla - 2012-09-04 15:54:02 +0200

Created attachment 304 toy data one trial


Diego Lozano Soldevilla - 2012-09-04 15:54:49 +0200

(In reply to comment #9) Hi Jorn, The scale thing seems to appear again. This is my input(attached one trial data toy example): cfg = []; cfg.continuous = 'no'; cfg.ploteventlabels = 'type=value'; cfg.trl = ft_findcfg(meog.cfg,'trl'); cfg.viewmode = 'vertical'; cfg.megscale = 1e-13; cfg.eegscale = 5e-8; artif = ft_databrowser(cfg,meog); The wierd thing is that I checked if the scale multiplication is done (line 1410 and 1426) and it's the case.. By the way, the cfg.ploteventlabels doesn't work because I cannot see the triggers in the browser Diego


Jörn M. Horschig - 2012-09-04 16:01:48 +0200

I'm gonna delegate this to Roemer who changed stuff in the scaling a few weeks ago. Roemer, if you do not feel like working on this, just assign it back to me


Roemer van der Meij - 2012-09-04 16:18:58 +0200

I'll look into it. (the changes I made were only done at maxabs defaulting though)


Roemer van der Meij - 2012-09-06 11:46:01 +0200

Hi Diego, It works fine in your example data if I use these settings: cfg.megscale = 1e8 cfg.eegscale = 4e1 The data is multiplied with the number in cfg.xxxscale, not divided. So in your case the difference between the eeg/meg was increased instead of decreased.


Diego Lozano Soldevilla - 2012-09-06 12:57:32 +0200

(In reply to comment #14) Opps... Now is clear. However, when I select a subsample of MEG channels (to visualize better the channels of interest) the scale do not work no matter the inputs you introduce. Could you reproduce it? %For example, Im interested in some MEG channels: browserchans(:,1) = meog.label(1:5:size(meog.label,1),1); %and I want to plot them in the databrowser with the EEG channels cfg = []; cfg.continuous = 'no'; cfg.ploteventlabels = 'type=value'; cfg.plotlabels = 'yes'; %cfg.trl = ft_findcfg(meog.cfg,'trl'); cfg.viewmode = 'vertical'; cfg.megscale = 1e8; cfg.eegscale = 4e1; cfg.channel = {browserchans{:} 'EEG057' 'EEG058'}; artif = ft_databrowser(cfg,meog); Thanks Roemer!


Roemer van der Meij - 2012-09-06 13:44:26 +0200

Hey Diego, Ah, this I can replicate. It turns out something is going wrong in determining which channels are MEG channels because of using only a subset of channels. I made a new bug out of this, bug 1701, and added you as cc. I don't know of a way to circumvent this yet atm. *** This bug has been marked as a duplicate of bug 1701 ***


Diego Lozano Soldevilla - 2012-09-06 13:52:28 +0200

(In reply to comment #16) Ok No problem! D


Roemer van der Meij - 2013-01-17 10:45:55 +0100

bug closing time