pta
Compute the mean response associated with a particular stimulus pattern.
Options:
- simple - write PTA PSTH, can do peak stats.
- multi - advanced analysis for multi-dim stim (like ran_sin). (Simple patterns require only 'multiflag' below)
- stimulus - write PTA average of STIMULUS - to check for stimulus correlation to itself (e.g., trigger on m-seq pattern 00011 to see what comes after it). Probably only works for single pattern (e.g. "pattern xxxxx").
- raster - write raster plots and PSTH. The PSTH is simply the count of the number of spikes at each millisecond bin.
- write_stim - plot the stimulus sequence for all trials in the first group, then exit. A HACK.
- peak_stat - compute statistics of PTA peak, and var/mean for count. The PTA is smoothed with a Gaussian of SD 'sigma' if 'sigma' is > 0.0 before statistics are extracted. The window for the statistics is defined by 'peak0' and 'peakn'. If these are not set, the default stat window is 2*width, starting at tpeak - width.
cell cond peak tpeak left right width t_mean t_SD prob n mean var var/mean
- cell - input filename w/o path?
- cond - description of the group of trials
- peak - maximum spike probability (within 1 ms bin), peak is found w/i "pta_start", "pta_period" window.
- tpeak - time of peak (ms)
- left - time of left half-rise (ms)
- right - time of right half-rise (ms)
- width - 'right' - 'left' (ms)
- t_mean - mean of first spike times
- t_SD - SD of first spike times
- prob - probability of at least one spike in window
- n - number of times the pattern was found
- mean - spike count mean
- var - variance of spike count
- var/mean - ratio of spike count var/mean (or \N if mean=0)
- precision - compute SD to first spike and probability of response within the time window. PTA window is analysis window. The resulting output file has the following line format:
cellname mean SD reliability n condition
- cellname - input filename w/o path?
- mean - mean of first spike times
- SD - SD of first spike times
- reliability - probability of at least one spike in window
- n - number of times the pattern was found
- condition - description of the group of trials
- pndiff - compare null -> pref and pref -> null transitions.
- terndiff - plot differences of PTA for a list of ternary patterns.
- plotnbit - plot PTA for all patterns with n bits.
- trialnum [k] - process only trial k in group. k = -2 indicates to use last trial in group. k= -1 is default, i.e., process entire group.
Parameter definitions:
- pta_start - Start time for averaging window.
- pta_period - Duration of averaging window.
- sem_flag - (0) 1-SEM instead of SD for *float* PTAs.
- toffset - Offset time added to stimulus onset time for PTA.
- pta_scale_samp - 0-no scaling (prob), 1-scale by sampling (spk/s)
- stim_chan [chan_name] - get stimulus from named channel.
- pattern - Pattern to search for. If using 0,1,2,3... set ternary to 4. Use with outtype simple.
- pat_invert - exchange `1' and `0', or `p' and `n'.
- pattern_range -
- nbit -
- deriv -
- ternary
- 0 - interpret stim as 0,1 (-1 gets set to 0)
- 1 - interpret stim as -1,0,1
- 4 - interpret stim as single digits: 0,1,2,3,...
- gaussian -
- multiflag - (0) 1-multi-dimensional stimuli, e.g. 'ran_sin'
When this flag is set to 1, the pattern parameter should be given as a string of the following form:
pattern o1p1-o2p2-bwhich is a list of stimulus identifiers separated by dashes. Each identifier is either 'b', standing for a blank (or control) stimulus, or it specifies several numbers, which are indices into the multi-dimensional stimulus (indices start at 1). The letters 'o' and 'p' can be any letters, and should be chosen as a useful memory aid.Also, the parameter stim_type should be specified and stim_dt (see documentation for the sta_multi analysis type).
- seedname - Specify name of randomization seed parameter [seed is default]
- stim_dual_to_4state - If there are two random sequences that are the same except for the seed, then this can specify the second seed name, and the stimulus will be turned into a 4-value stimulus (0,1,2,3).
- jmin -
- jmax -
- discflag -
- sampling -
- sigma -
- start_chan -
- start_value -
- peak0 - (default 0) behavior is analysis dependent.
- peakn - (default 0) behavior is analysis dependent. If this value is non-zero, peak statistics will be computed.
- peak_frac1 - (default 0.05) to find 5%, or other, rise to peak.
- peak_frac2 - (default 0.5) to find 50%, or other, rise to peak.
- peak_mark - (def 0) 1-plot three markers to indicate peak stats.
- plot_diff - followed by a list of (paired) plot index values, or '0' to print a list of plot indices and pattern values. CURRENTLY WORKING FOR 'SURR4ST' ONLY, NOT FOR 'PTA'.
- The .stat file will contain for each plot:
- stat filename
- input filename without path
- pattern difference string, e.g., 02-00
- number of times the first pattern was found.
- time of rise to 'peak_frac1' (float)
- time of rise to 'peak_frac2' (float)
- time of peak (int)
Example:
# # PTA analysis for all conditions in a matrix file. # Time zero is second sync. # pta group 2 min_wvln max_jump peak_stat start_chan sync0 start_value 2 pta_start 0 pta_period 100 pattern 0000110