## sr

Make plots of mean firing rate (and continuous data - partially implemented) across trials. Error bars show plus and minus one standard error (or standard deviation) around the mean.The parameters that varies over the set of desired tuning curves should be used as the grouping parameters.

Now, the 'tcode' field, which typically holds the stimulus number or ID value, can be used for grouping. See 'Tcode Grouping' below.

The "condition" statements should be used to select only those stimuli which are members of the tuning curve(s) to be plotted and to exclude baseline or other stimuli.

In the regular parameter section, two baselines may be established using the names "baseline0" and "baseline1", using the format:

baseline0 groupdef [param_name] [param_val] ... [param_name] [param_val] baseline1 groupdef [param_name] [param_val] ... [param_name] [param_val]If the baseline rate is to be computed from a particular period across all trials, then set the parameters 'bstart' and 'bperiod' to define such an epoch during the trial. When defined, this baseline rate will be subtracted from the tuning curve.

## Output types

appendappend stats to file.plotxplot output.data_appendappend the values to one line of the outfile, separating the values with a space, and ending the line with a newline.datacolumns of floats (no plot headers) *** SO FAR, ONLY W/ TSEQ OPTION ***.trial_dataprint the spike rate value for each trial in each group.sr_v_durforvariable duration(vardur) analysis, make a scatter plot of spike rate vs. epoch duration for each group. There must be avardurparameter specified in the .nda file.translation_invar- for translation invariance analysis. See example .nda script below, which includes comments. An xplot file is written that contains three plots: the average firing rate, the maximum firing rate, and the r-value, all as a function of position. The r-value is computed between the responses of all stimuli at the reference position (typically 0.0) and all other positions. Thus, the r-value at 0.0 (or the reference position, if it is not 0.0) should be 1, by construction.

pop_chan_mean- append the channel name and mean response. For use withnda_pop. Useful for writing a list of responses for all channels within a population.## Parameters

Examples are given below.

xaxis_convertori_mirror - Causes a mirroring of x-axis values, assuming they are in degrees of visual angle.sem_flagstandard error on the mean - by default, this is 1, set it to 0 if you want standard deviation error bars.norm_maxIf set, the tuning curve (after possibly subtracting a baseline) is scaled so that its maximum value is 'norm_max'.bstartStart time of epoch for across-trial baseline computation.bperiodDuration of epoch for across-trial baseline computation.avg_flag(0) If 1, append an across-group average to stat file.f1_param[pname] - if defined, 'pname' must contain the TF in Hz as a var or const param. The F1 amplitude will be computed in stead of DC rate. For sinusoidal modulation from 0 to 100 spk/s, F1=DC=50spk/s. For half-wave rectified modulation from 0 to 100 spk/s, F1=50spk/s, DC<50.## Tcode Grouping

TSEQ_0followed by a list of integers (0,1,...) causes a tuning curve to be plotted for the stimulus numbers in the list. TSEQ_1, etc. may be used for additional tuning curves.TSEQ_0_NAMEfollowed by a string specifies a plot name.TSEQ_0_Xfollowed by a list of float or integer values specifies the x-axis. The number of values must match that of TSEQ_0. If this is not specified, the value of the last grouping parameter is used for the x-axis.See example below## Example - single tuning curve:

# # "ori" varies, ampl is 0 for background stimulus. # sr group 1 ori plot xaxis_convert ori_mirror baseline0 groupdef ampl 0 condition param_range ampl 1 1024## Example - set of tuning curves (matrix):

# # "dt" and "dr" vary. A set of plots for each "dt" as a function # of "dr" is produced. Reversing the group parameters changes the # axes of the tuning curves. # sr group 2 dt dr plot baseline0 groupdef ampl 0 condition param_range ampl 1 1024## Example - Translation invariance

# # This SR analysis output type assumes that the first parameter (in the list # following "group" below) is a position parameter, for example 'cx' or 'cy', # and the other parameters (following 'cx' below) define the space of stimuli # that have been shown at each position. In this example, the 'direction' # has been varied at each 'cx' position. An alternative example of the # 'group' line could be: # # group 3 cx shape_id rotation # # which would indicated that a variety of shapes were shown at different # rotations at each 'cx' position. # sr group 2 cx direction translation_invar chan s2 corr_reference 0.0 # This is an optional parameter that defaults to 0.0 # if it is not included in the .nda file. # It determines the x-axis value that will be used as # the reference point to compute r-values for all other # x-axis positions. # # This condition is used to select a y-position ('cy') value, in case 'cy' # also varies in the file. If it does not, then this value is not needed. # condition param_val cy 0.0## Example - Tcode Sequences:

# # Three tuning curves are specified. # 'dir' will be the default x-axis. # sr group 3 ori ampl dir plot start 0 period 2000 TSEQ_0 0 1 2 3 4 5 6 7 TSEQ_0_NAME griffiths TSEQ_0_X 20 21 22 23 24 25 26 27 TSEQ_1 8 9 10 11 12 13 14 15 TSEQ_2 16 17 18 19 20 21 22 23 TSEQ_2_NAME island