outputDatastruct = dataBind_analyze(datastruct, 'aux_name', 'resample', 'min_samples', 'linear_time', 'window', 'baseline', 'mean_signal', 'nesting_level', 'blocks_as_trials', 'test_to_perform', 'keep_single_trials') '' = parameter-value pairs
Call this function to specify analysis parameters for auxiliary data that was bound to an easyFunction datastruct using dataBind. These analysis parameters will be used by easyScore to splice the auxiliary data according to trials/nesting blocks when scoring is performed.
D = dataBind_analyze(datastruct,param1,val1,param2,val2...) returns a datastruct identical to the input datastruct, except with the auxiliary data analysis parameters stored in a struct in the analysis_params field of datastruct.aux_data.'aux_name'. The required parameter values are as indicated: 'aux_name' String. The name of the auxiliary data to have these analysis parameters attached to. This name must correspond to a field in the aux_data field of the input datastruct. Default: '' 'resample' Boolean. A flag to specify if the auxiliary data should be resampled to a desired time spacing between elements of the timestamps vector. 'resample' can be specified as a boolean false or as a positive numeric precision. If set to false or 0, no resampling of the auxiliary data will be performed. If set to a positive number and the 'linear_time' parameter is set to false, 'resample' will specify the desired frequency in Hz of resampled points. If set to a positive number and 'linear_time' is set to true, 'resample specifies a scale factor for how many evenly spaced data points are desired. Default: false 'min_samples' Scalar. A numeric scalar between 0 and 1. This parameter specifies the percentage of samples that must be present in a trial (as determined by the sampling rate) for it to be included. Dropped trials will have the spliced aux_data set to NaN's. Default: 0 'linear_time' Boolean. A boolean indicating the time units that will be used to splice the data during the analysis stage. If set to false, the data will be spliced relative to trial events using time units of seconds which may introduce some background data interpolation. If set to true, the data will be spliced by discrete timepoint indices of the resulting timeseries object. The value of this parameter directly influences the interpretation of the 'window', 'baseline', and 'resample' parameters. Default: false 'window' 2-Element Array. The 2-element period, relative to event onsets from which signals should be sampled. If 'linear_time' is set to true, this period is indexed from zero and should be described in terms of time units equal to the sampling rate of signals. If 'linear_time' is set to false, the 'window' will instead be interpreted as a time range in units of seconds. To set the window to be the entire prompt duration for each trial, supply a blank matrix (). If the window does not contain any auxiliary data points, the aux_data for that trial will be reported as NaN. Default:  'baseline' Scalar or 2-Element Array. A numeric value or range relative to trial onset for which events will be normalized to within their window. When 'linear_time' is set to true, the 'baseline' is interpreted as timepoint values (e.g. -1 meaning one indexed value before the event). If 'linear_time' is set to false, the 'baseline' value is interpreted in units of seconds. If a range of values is specified, the mean signal from those timepoints will be used in subtraction. If left empty, normalization is not performed. When the baseline region lies outside of the auxiliary data's time vector, extrapolation will not be performed and the data for that trial will be populated with NaN. Default:  'mean_signal' Boolean. A boolean specifying whether or not the mean signal within the window should be used rather than the raw signal. Default: false 'nesting_level' Integer. The level of nesting which easyScore will consider when splicing the auxiliary data into chunks for analysis. Enter 0 to omit nesting analysis and return only ppt_results. Default: 0 'blocks_as_trials' Integer. Scalar integer indicating whether or not an entire block/subblock group should be treated as a single trial. Blocks are processed up to the level of nesting provided by this parameter, and a value of 0 corresponds to not collapsing any blocks. Default: 0 'test_to_perform' String. A string specifying the statistical measure to be performed on the auxiliary data for the analysis output. This function is used to summarize multiple trials for purposes of the summary created in easyScore. This can be given as a string or a function handle to a function on the path. If multiple tests are desired, this parameter can be supplied as a cell array of strings or function handles. Default:  'keep_single_trials' Boolean. A boolean specifying whether or not spliced data will be retained for individual trials in the trial table of the datastruct after scoring with easyScore. If set to true when 'blocks_as_trials' is nonzero, all non-first-trials of each relevant block will be reported as NaN. Default: false
'outputDatastruct' will contain a new field 'analysis_params' within the existing aux_data field that corresponds to aux_name. This 'analysis_params' field will be a struct containing the parameters to be used by easyScore to analyze the data.