Note that this reference documentation is identical to the help that is displayed in Matlab when you type “help ft_analysisprotocol”.
FT_ANALYSISPROTOCOL tries to reconstruct the complete analysis protocol that was used to create an arbitrary FieldTrip data structure. It will create a Matlab script (as text file) and a flowchart with a graphical representation. Use as ft_analysisprotocol(cfg, data) where the first cfg input contains the settings that apply to the behaviour of this particular function and the second data input argument can be the output of any FieldTrip function, e.g. FT_PREPROCESSING, FT_TIMELOCKANALYSIS, FT_SOURCEANALYSIS, FT_FREQSTATISTICS or whatever you like. Alternatively, for the second input argument you can also only give the configuration of the processed data (i.e. "data.cfg") instead of the full data. The configuration options that apply to the behaviour of this function are cfg.feedback = 'no', 'text', 'gui' or 'yes', whether text and/or graphical feedback should be presented (default = 'yes') cfg.showinfo = string or cell array of strings, information to display in the gui boxes, can be any combination of 'functionname', 'revision', 'matlabversion', 'computername', 'username', 'calltime', 'timeused', 'memused', 'workingdir', 'scriptpath' (default = 'functionname', only display function name). Can also be 'all', show all info. Please note that if you want to show a lot of information, this will require a lot of screen real estate. cfg.filename = string, filename of m-file to which the script will be written (default = []) cfg.remove = cell-array with strings, determines which objects will be removed from the configuration prior to writing it to file. For readibility of the script, you may want to remove the large objectssuch as event structure, trial definition, source positions cfg.keepremoved = 'yes' or 'no', determines whether removed fields are completely removed, or only replaced by a short textual description (default = 'no') This function uses the nested cfg and cfg.previous that are present in the data structure. It will use the configuration and the nested previous configurations to climb all the way back into the tree. This funtction will print a complete Matlab script to screen (and optionally to file). Furthermore, it will show an interactive graphical flowchart representation of the steps taken during the analysis. In the flowchart you can click on one of the steps to see the configuration details of that step. Note that the nested cfg and cfg.previous in your data might not contain all details that are required to reconstruct a complete and valid analysis script.
Share this page: