Back to the main page.
Bug 1074 - for discussion in the FT meeting
Status | CLOSED FIXED |
Reported | 2011-10-26 10:55:00 +0200 |
Modified | 2011-11-11 11:20:00 +0100 |
Product: | FieldTrip |
Component: | core |
Version: | unspecified |
Hardware: | PC |
Operating System: | Mac OS |
Importance: | P1 normal |
Assigned to: | Robert Oostenveld |
URL: | |
Tags: | |
Depends on: | |
Blocks: | |
See also: |
Robert Oostenveld - 2011-10-26 10:55:32 +0200
ft_timelockstatistics has the following section % set the defaults if ~isfield(cfg, 'inputfile'), cfg.inputfile = []; end if ~isfield(cfg, 'outputfile'), cfg.outputfile = []; end % % check if the input data is valid for this function % for i=1:length(varargin) % % FIXME at this moment (=10 May) this does not work, because the input might not always have an avg % % See freqstatistics % %varargin{i} = ft_checkdata(varargin{i}, 'datatype', 'timelock', 'feedback', 'no'); % end
Robert Oostenveld - 2011-10-26 10:56:16 +0200
ft_multiplotTFR has the following section % the call with multiple inputs is done by ft_topoplotIC and recursively by ft_topoplotTFR itself if Ndata>1 && ~isnumeric(varargin{end}) for k=1:Ndata if k>1 % create a new figure for the additional input arguments % ensure new figures are all in the same size/position p = get(gcf, 'Position'); f = figure(); set(f, 'Position', p); end ft_topoplotTFR(cfg, varargin{1:Ndata}, indx); indx = indx + 1; end return end
Robert Oostenveld - 2011-10-26 11:00:44 +0200
ft_volumenormalise has the following section % load mri if second input is a string if ischar(interp), fprintf('reading source MRI from file\n'); interp = ft_read_mri(interp); if ~isfield(interp, 'coordsys') && ft_filetype(filename, 'ctf_mri') % based on the filetype assume that the coordinates correspond with CTF convention interp.coordsys = 'ctf'; end end
Robert Oostenveld - 2011-10-26 11:04:09 +0200
ft_timelockanalysis contains % convert average to raw data for convenience, the output will be an average again % the purpose of this is to allow for repeated baseline correction, filtering and other preproc options that timelockanalysis supports data = data2raw(data);
Robert Oostenveld - 2011-10-26 11:05:01 +0200
(In reply to comment #3) > ft_timelockanalysis contains > ... and it contains % preprocess the data, i.e. apply filtering, baselinecorrection, etc. fprintf('applying preprocessing options\n'); data = ft_preprocessing(cfg.preproc, data); which I believe should be conditional on ~isempty(cfg.preproc)
Robert Oostenveld - 2011-10-26 11:19:11 +0200
(In reply to comment #2) > ft_volumenormalise has the following section > > % load mri if second input is a string > if ischar(interp), > fprintf('reading source MRI from file\n'); > interp = ft_read_mri(interp); > if ~isfield(interp, 'coordsys') && ft_filetype(filename, 'ctf_mri') > % based on the filetype assume that the coordinates correspond with CTF > convention > interp.coordsys = 'ctf'; > end > end this is also the case in sourceinterpolate
Robert Oostenveld - 2011-10-26 11:44:56 +0200
ft_preprocessing has the following if nargin==0 help(mfilename); return elseif nargin==1 && isequal(cfg, 'help') help(mfilename); return elseif nargin==1 && isequal(cfg, 'guidelines') guidelines(mfilename); return end this could be implemented in general as ft_preamble help
Robert Oostenveld - 2011-10-26 11:48:08 +0200
ft_prepare_leadfield has the following hasdata = (nargin>1); if isfield(cfg,'grad') || isfield(cfg,'elec') data = []; % clear for memory reasons and because we won't use it % need to check if data.grad and cfg.grad are same? % need to warn/error user that we use cfg.grad and not data.grad? this is a common pattern, there is also gradfile/elecfile -> find a common solution
Robert Oostenveld - 2011-10-26 11:54:16 +0200
ft_multiplotTFR contains the following, which won't work according to me... ?? % Set the defaults: cfg = ft_getopt(cfg, 'baseline', 'no'); cfg = ft_getopt(cfg, 'baselinetype', 'absolute'); cfg = ft_getopt(cfg, 'trials', 'all'); cfg = ft_getopt(cfg, 'xlim', 'maxmin'); cfg = ft_getopt(cfg, 'ylim', 'maxmin'); cfg = ft_getopt(cfg, 'zlim', 'maxmin'); ...
Robert Oostenveld - 2011-10-26 11:56:54 +0200
ft_multiplotER had the following, but why is interactive not supported with inputfile? if hasdata % do nothing elseif hasinputfile if ischar(cfg.inputfile) cfg.inputfile = {cfg.inputfile}; end for i = 1:numel(cfg.inputfile) varargin{i} = loadvar(cfg.inputfile{i}, 'data'); % read datasets end if isfield(cfg, 'interactive') && strcmp(cfg.interactive, 'yes'), warning('switching off interactive mode, this is not supported when loading an inputfile from disk'); end end
Robert Oostenveld - 2011-10-26 12:04:18 +0200
ft_movieplotTFR does the following, which means that the cfg defaults are not updated % set the defaults xlim = ft_getopt(cfg, 'xlim', 'maxmin'); ylim = ft_getopt(cfg, 'ylim', 'maxmin'); zlim = ft_getopt(cfg, 'zlim', 'maxmin'); xparam = ft_getopt(cfg, 'xparam','time'); yparam = ft_getopt(cfg, 'yparam'); % default is dealt with below parameter = ft_getopt(cfg, 'parameter', 'powspctrm'); % use power as default inputfile = ft_getopt(cfg, 'inputfile', []); samperframe = ft_getopt(cfg, 'samperframe', 1); framespersec = ft_getopt(cfg, 'framespersec', 5); framesfile = ft_getopt(cfg, 'framesfile', []); moviefreq = ft_getopt(cfg, 'moviefreq', []); movietime = ft_getopt(cfg, 'movietime', []); movierpt = ft_getopt(cfg, 'movierpt', 1); interactive = ft_getopt(cfg, 'interactive', 'yes'); dointeractive = istrue(interactive);
Robert Oostenveld - 2011-10-26 15:03:25 +0200
(In reply to comment #0) had already been fixed in ft_datatype, so not needed any more. I uncommented it.
Robert Oostenveld - 2011-10-26 15:09:53 +0200
(In reply to comment #2) has been fixed, also in ft_sourceinterpolate
Robert Oostenveld - 2011-10-26 15:54:23 +0200
comment #0 up to comment #10 have been dealt with, either by fixing the code or by reassigning it as separate bug (to Jan-Mathijs and to Jorn)