Skip to content

Commit

Permalink
ENH - document magscale/gradscale more consistently
Browse files Browse the repository at this point in the history
robertoostenveld committed Dec 19, 2024
1 parent 0f27278 commit 3901097
Showing 4 changed files with 11 additions and 4 deletions.
4 changes: 2 additions & 2 deletions ft_multiplotER.m
Original file line number Diff line number Diff line change
@@ -23,10 +23,10 @@
% cfg.maskfacealpha = mask transparency value between 0 and 1
% cfg.xlim = 'maxmin', 'maxabs', 'zeromax', 'minzero', or [xmin xmax] (default = 'maxmin')
% cfg.ylim = 'maxmin', 'maxabs', 'zeromax', 'minzero', or [ymin ymax] (default = 'maxmin')
% cfg.gradscale = number, scaling to apply to the MEG gradiometer channels prior to display
% cfg.magscale = number, scaling to apply to the MEG magnetometer channels prior to display
% cfg.channel = Nx1 cell-array with selection of channels (default = 'all'), see FT_CHANNELSELECTION for details
% cfg.refchannel = name of reference channel for visualising connectivity, can be 'gui'
% cfg.magscale = number, scaling to apply to the MEG magnetometer channels prior to display
% cfg.gradscale = number, scaling to apply to the MEG gradiometer channels prior to display
% cfg.baseline = 'yes', 'no' or [time1 time2] (default = 'no'), see FT_TIMELOCKBASELINE or FT_FREQBASELINE
% cfg.trials = 'all' or a selection given as a 1xN vector (default = 'all')
% cfg.axes = string, 'yes' or 'no' whether to draw x- and y-axes for each graph (default = 'yes')
2 changes: 2 additions & 0 deletions ft_topoplotER.m
Original file line number Diff line number Diff line change
@@ -24,6 +24,8 @@
% cfg.baseline = 'yes','no' or [time1 time2] (default = 'no'), see FT_TIMELOCKBASELINE or FT_FREQBASELINE
% cfg.baselinetype = 'absolute' or 'relative' (default = 'absolute')
% cfg.trials = 'all' or a selection given as a 1xN vector (default = 'all')
% cfg.magscale = number, scaling to apply to the MEG magnetometer channels prior to display
% cfg.gradscale = number, scaling to apply to the MEG gradiometer channels prior to display
% cfg.colormap = string, or Nx3 matrix, see FT_COLORMAP
% cfg.marker = 'on', 'labels', 'numbers', 'off'
% cfg.markersymbol = channel marker symbol (default = 'o')
2 changes: 2 additions & 0 deletions ft_topoplotTFR.m
Original file line number Diff line number Diff line change
@@ -21,6 +21,8 @@
% cfg.baseline = 'yes','no' or [time1 time2] (default = 'no'), see FT_TIMELOCKBASELINE or FT_FREQBASELINE
% cfg.baselinetype = 'absolute' or 'relative' (default = 'absolute')
% cfg.trials = 'all' or a selection given as a 1xN vector (default = 'all')
% cfg.magscale = number, scaling to apply to the MEG magnetometer channels prior to display
% cfg.gradscale = number, scaling to apply to the MEG gradiometer channels prior to display
% cfg.colormap = string, or Nx3 matrix, see FT_COLORMAP
% cfg.marker = 'on', 'labels', 'numbers', 'off'
% cfg.markersymbol = channel marker symbol (default = 'o')
7 changes: 5 additions & 2 deletions private/topoplot_common.m
Original file line number Diff line number Diff line change
@@ -363,9 +363,12 @@
bivariate_common(cfg, varargin{:});
return
end

% Apply channel-type specific scaling
tmpcfg = keepfields(cfg, {'parameter', 'chanscale', 'ecgscale', 'eegscale', 'emgscale', 'eogscale', 'gradscale', 'magscale', 'megscale', 'mychan', 'mychanscale'});
fn = fieldnames(cfg);
fn = setdiff(fn, {'skipscale', 'showscale', 'gridscale'}); % these are for the layout and plotting, not for CHANSCALE_COMMON
fn = fn(endsWith(fn, 'scale') | startsWith(fn, 'mychan') | strcmp(fn, 'channel') | strcmp(fn, 'parameter'));
tmpcfg = keepfields(cfg, fn);
data = chanscale_common(tmpcfg, data);


0 comments on commit 3901097

Please sign in to comment.