Back to the main page.
Bug 138 - loadvar and savevar shoudl default to a meaningful variable name and not to 'data'
Status | CLOSED FIXED |
Reported | 2010-09-02 09:26:00 +0200 |
Modified | 2011-01-26 15:38:29 +0100 |
Product: | FieldTrip |
Component: | core |
Version: | unspecified |
Hardware: | PC |
Operating System: | Mac OS |
Importance: | P1 normal |
Assigned to: | Arjen Stolk |
URL: | |
Tags: | |
Depends on: | |
Blocks: | |
See also: |
Robert Oostenveld - 2010-09-02 09:26:50 +0200
the variable name used for loadvar and savevar should be consistent with the docoumentation. E.g. data after preprocessing, freq after freqanalysis and stat after statistics. To do: - make a list of the variable names used in the documentation (the help of the function). Check whether those are consistent. Document it at http://fieldtrip.fcdonders.nl/code_guidelines - discuss with other developers - ensure that the function documentation is consistent with the guidelines - change the loadvar and savevar calls in the ft_xxx functions to adhere to the guidelines below some linux command line code that can help Use the following to identify the function description from the documentation. for functions with output manzana> grep -h '% *\[.*\] = ft_.*' ft_*.m % [data] = ft_preprocessing(cfg, data) % [ev] = ft_recodeevent(cfg, data) % [ev] = ft_recodeevent(cfg, event, trl) % [data] = ft_rejectcomponent(cfg, comp) % [data] = ft_rejectcomponent(cfg, comp, data) % [data] = ft_rejectvisual(cfg, data) % [data] = ft_resampledata(cfg, data) % [data] = ft_scalpcurrentdensity(cfg, data) ... for functions without output manzana> grep '% *ft_.*' ft_*.m % ft_multiplotCC(cfg, data) % ft_multiplotER(cfg, data) % ft_multiplotER(cfg, data, data2, ..., dataN) % ft_multiplotTFR(cfg, data) % ft_sinlgeplotER(cfg, data) % ft_singleplotER(cfg, data1, data2, ..., dataN) % ft_singleplotTFR(cfg,data) % ft_sliceinterp(cfg, interp) % ft_sourceplot(cfg, data) % ft_spikefixdmafile(cfg); ... manzana> grep loadvar ft_*.m ft_appenddata.m: varargin{i} = loadvar(cfg.inputfile{i}, 'data'); % read datasets from array inputfile ft_artifact_clip.m: data = loadvar(cfg.inputfile, 'data'); ft_artifact_eog.m: data = loadvar(cfg.inputfile, 'data'); ft_artifact_jump.m: data = loadvar(cfg.inputfile, 'data'); .. manzana> grep savevar *.m ft_appenddata.m: savevar(cfg.outputfile, 'data', data); % use the variable name "data" in the output file ft_artifact_threshold.m: savevar(cfg.outputfile, 'data', data); % use the variable name "data" in the output file ft_channelnormalise.m: savevar(cfg.outputfile, 'data', dataout); % use the variable name "data" in the output file ft_channelrepair.m: savevar(cfg.outputfile, 'data', interp); % use the variable name "data" in the output file ft_combineplanar.m: savevar(cfg.outputfile, 'data', data); % use the variable name "data" in the output file ...
Arjen Stolk - 2010-11-03 11:19:58 +0100
Still yet to resolve: * ft_sourceinterpolate in combination with ft_sourceplot What is the desired output? Interp is documented in the help, but sourceplot can plot both interp and source * ft_volumenormalise output should be 'norm'? Changes to loadvar: ft_clusterplot loadvar(~, data) to loadvar(~, stat) ft_freqbaseline loadvar(~, data) to loadvar(~, freq) ft_freqdescriptives loadvar(~, data) to loadvar(~, freq) ft_freqgrandaverage loadvar(~, data) to loadvar(~, freq) ft_freqstatistics loadvar(~, data) to loadvar(~, freq) ft_prepare_localspheres loadvar(~, data) to loadvar(~, mri) ft_prepare_mesh loadvar(~, data) to loadvar(~, mri) ft_prepare_singlesphere loadvar(~, data) to loadvar(~, mri) ft_rejectcomponent loadvar(~, data) to loadvar(~, comp) ft_sourcedescriptives loadvar(~, data) to loadvar(~, source) ft_sourcegrandaverage loadvar(~, data) to loadvar(~, source): 2x ft_sourceinterpolate loadvar(~, data) to loadvar(~, mri) ft_volumedownsample loadvar(~, data) to loadvar(~, source) ft_volumenormalise loadvar(~, data) to loadvar(~, interp) ft_volumerealign loadvar(~, data) to loadvar(~, mri) ft_volumereslice loadvar(~, data) to loadvar(~, mri) ft_volumesegment loadvar(~, data) to loadvar(~, mri) ft_volumewrite loadvar(~, data) to loadvar(~, volume) Changes to savevar: ft_componentanalsysis savevar(~, data) to savevar(~, comp) ft_freqanalysis savevar(~, data) to savevar(~, freq) ft_freqbaseline savevar(~, data) to savevar(~, freq) ft_freqdescriptives savevar(~, data) to savevar(~, freq) ft_freqgrandaverage savevar(~, data) to savevar(~, freq) ft_freqinterpolate savevar(~, data) to savevar(~, freq) ft_freqstatistics savevar(~, data) to savevar(~, stat) ft_sourceanalysis savevar(~, data) to savevar(~, source) ft_sourcedescriptives savevar(~, data) to savevar(~, source) ft_sourcegrandaverage savevar(~, data) to savevar(~, source): 2x ft_timelockstatistics savevar(~, data) to savevar(~, stat) ft_volumedownsample savevar(~, data) to savevar(~, source) ft_volumerealign savevar(~, data) to loadvar(~, mri) ft_volumereslice savevar(~, data) to loadvar(~, mri) ft_volumesegment savevar(~, data) to loadvar(~, segment)
Robert Oostenveld - 2011-01-26 15:37:09 +0100
I closed all bugs that were resolved prior and including 2011-01-25. All resolved bugs should have been discussed by now, therefore we don't want to see them again in the next meeting. Instead, in the next meeting we want to see the recent improvements and fixes.