Skip to content

Parameters struct (P)

James Jun edited this page Dec 26, 2017 · 19 revisions

Parameter file format

Recording file format

Name Default Value Description
vcFile '' Raw recording file path (leave empty if multiple files are sorted together)
csFile_merge {} List of recording files to merge (leave empty if single file is used)
sort_file_merge 1 Sort files by the 0: alphabetical order, 1: metafile, 2: file created time, 3: file modified time, 4: numerical order in the file names
vcFile_prm '' Current parameter file path (.prm) if set empty
template_file '' Template parameter file path (.prm). Parameters in this file override the default parameter file (default.prm), but get overridden is by the parameter file.
probe_file '' Probe file to use (.prb). Default search location: ./prb/
nChans 120 # channels stored
vcDataType 'int16' Raw data format. Choices: {'int16', 'uint16', 'int32', 'uint32', 'single', 'double'}
sRateHz 25000 Sampling rate (Hz)
uV_per_bit 0.305176 Bit scaling factor (uV/bit)
fTranspose_bin 1 Set to 1 if the samples from the same time step is written to the file contiguously.
fInverse_file 0 Set to 1 to flip the polarity of the signal. Set to 0 if spikes have negative going polarity.
header_offset 0 File header offset (in bytes). Set to 0 if there is header info (e.g. WHISPER format)

Execution parameters

Name Default Value Description
version 'v3.x.x' JRCLUST version. Updated on "month" "day", "year"
fVerbose 0 Verbose flag, set to 0 to suppress displaying extra information
fParfor 1 Use Multiple CPU cores (if parallel processing toolbox is installed)
fGpu 1 Use GPU if parallel processing toolbox is installed
iGpu 1 Use specific GPU ID (run 'gpuDevice()' to retrieve the list of GPUs)
MAX_BYTES_LOAD [] Default memory loading block size (bytes)
MAX_LOAD_SEC [] Maximum loading duration (seconds). This overrides "MAX_BYTES_LOAD".
MAX_LOG 10 Maximum number of histories to track for 'manual' GUI
nSamples_gpu 250000 Number of samples to process in GPU at a time. Reduce this number if GPU crashes for high-channel arrays
vcFile_thresh '' Name of .mat file taht stores the spike detection threshold in 'vnThresh_site' variable. Created by 'preview' GUI
sec_per_load_preview 1 Recording duration (sec) per continuous segment to preview
nLoads_max_preview 30 Number of time segments to load for preview
offset_sec_preview 0 Time offset (sec) to apply to the preview
fCacheRam 1 Cache spike waveform information in RAM. Uses more RAM but faster
fRamCache 1 Cache both raw and filtered spike waveforms in RAM (greater memory demand)

Display parameters (Affects display only, (*):Can be modified in the manual GUI)

Name Default Value Description
tlim [0, .2] Time range to display
nTime_traces 1 Number of time segments to display. Set to 1 to show one continuous time segment
nSkip_show 1 Show 1 in n samples when plotting traces
fSpike_show 1 show spikes in the trace view (*)
maxAmp 250 Amplitude range in uV (initial setting, changeable in UI) (*)
nShow 200 Maximum number of traces to show [D?# spikes to show]
corrLim [.9 1] Correlation color plot range
nSpk_show 30 show spike waveforms for manual clustering
nShow_proj 500 Max. number of spikes to show in the projection view
vcFet_show 'vpp' Feature to show in time plot {'vpp', 'cov', 'pca'} (*)
mrColor_proj [.75 .75 .75; 0 0 0; 1 0 0] background, selected, comparison color
vcFilter_show '' Filter to apply in the "traces" view. Choices: {'', 'bandpass', 'sgdiff'}. '' uses vcFilter setting.

Pre-processing (run "jrc spikesort" after change)

Name Default Value Description
tlim_load [] Time range to load in sec (uses all time range if set to empty)
vcFilter 'ndiff' Filter types: {'ndiff', 'sgdiff', 'bandpass', 'fir1', 'user', 'none'}
nDiff_filt 2 Differentiation filter for vcFilter='sgdiff', ignored otherwise. Set to [] to disable. 2n+1 samples used for centered differentiation
freqLim [300, 3000] Frequency cut-off limit for vcFilter='bandpass', ignored otherwise.
filtOrder 3 Bandpass filter order
fEllip 1 Use Elliptic filter. set to 0 for Butterworth filter. Only valid for vcFilter='bandpass'.
vnFilter_user [] User-specified filter kernel. Used if vcFilter='user' is set.
fft_thresh 0 Automatically remove frequency outliers (unit:MAD, 10 recommended, 0 to disable). Verify by
freqLimNotch {} Notch filter frequency range to exclude manually. {[start1, end1], [start2,
vcCommonRef 'mean' common reference mode {'none', 'mean', 'median', 'whiten'}
viSiteZero [] Site# to ignore manually
nPad_filt 100 Number of samples to overlap between multiple loading (filter edge safe).
gain_boost 1 multiply the raw recording by this gain to boost uV per bit
thresh_corr_bad_site [] Automatically reject bad sites based on the max. correlation with neighboring sites using raw waveforms. Set to [] to disable

Spike detection and grouping (run "jrc spikesort" after change)

Name Default Value Description
qqFactor 5 Spike detection thresold (Threshold = qqFactor*S, S = med(x-med(x))/.6745). (RQ Quiroga'04)
qqSample 4 Median subsample factor (1 every n)
spkThresh_uV [] Manual threshold (applies to all channels)
spkThresh_max_uV [] maximum absolute amp. allowed
spkLim_ms [-.25, .75] Time range to capture the filtered spike waveforms
spkLim_raw_ms [] Raw spike waveform range, setting to [] will use spkLim_ms
maxSite [] Auto-calculated by maxDist_site_spk_um if empty. nSites_spk = 1+2*maxSite-nSite_ref)
spkRefrac_ms .25 Detection refractory period in milliseconds
vcSpatialFilter 'none' Spatial filter for detection {'mean', 'imec2', 'subtract', 'csd'}
fSaveEvt 1 Flag to save event file
fDetectBipolar 0 bipolar amplitude detection (0 means negative)
fSaveRawSpk 0 Save spike detected per site (saves minimum peak)
blank_thresh [] reject spikes exceeding the channel mean after filtering (MAD unit), ignored if [] or 0
blank_period_ms 5 (miliseconds) Duration of blanking when the common mean exceeds a threhold (blank_thresh)
nneigh_min_detect 0 Min. number of neighbors near the spike below threshold. choose between [0,1,2]
maxDist_site_um 50 Radius of spike event merging. Keep spikes that has most negative peaks within x um radius.
maxDist_site_spk_um 70 Max. radius for extracting waveforms. Used if maxSite=[] and nSites_ref=[]

Feature extraction (run "jrc spikesort" after change)

Name Default Value Description
vcFet 'gpca' Feature list: {'gpca', 'cov', 'vpp', 'vmin', 'vminmax', 'energy', 'pca'}
nPcPerChan 1 number of principal components per chan.
nSites_ref [] set to 0 for global referencing (move to feature section)
vcSpkRef 'nmean' Subtract mean of the spiking event sites {'nmean', 'none'}
fInterp_fet 1 Interpolate the waveforms for feature projection to find the optimal delay (2x interp). Set to 0 to disable

Clustering (run "jrc sort" after change)

Name Default Value Description
nTime_clu 4 Number of time periods to perform separate clustering (later to be merged after clustering)
dc_percent 2 used for distribution cutting
fRepeat_clu 0 Flag for whether to repeat clustering for the bottom half of the cluster amplitudes
nThreads 128 number of GPU threads for clustering
nC_max 45 (read-only) Set by the CUDA code. Maximum number of dimensions per event
fSpatialMask_clu 0 Apply spatial mask calculated from the distances between sites to the peak site (half-scale: P.maxDist_site_um). circa v3.1.10
min_sites_mask 5 Minimum number of sites to have to apply spatial mask. Used if fSpatialMask_clu==1. circa v3.1.10

Post-cluster auto-merging parameters (run "jrc auto" after change)

Name Default Value Description
delta1_cut .6 RL cluster: delta cut-off. Increasing this will produce less clusters.
rho_cut -2.5 RL cluster: rho cut-off. Decreasing (more negative) this will produce more clusters.
maxWavCor .98 merge if waveform correlation is greater than maxWavCor (set to 1 to disable).
min_count 30 Minimum cluster size (min_count will be set to 2*#features if lower).
nRepeat_merge 10 # of repeats for average unit raw waveform based merging
vcDetrend_postclu 'global' 'none', 'hidehiko', 'global', 'local', 'logz'
thresh_mad_clu 7.5 This sets the MAD score threshold to remove outlier spikes for each cluster.
maxCluPerSite 20 Maximum clusters per site allowed if local detrending is used.
fDrift_merge 1 Compute multiple waveforms at three drift locations based on the spike position (CoM).
nInterp_merge 1 Interpolation factor for the mean unit waveforms, set to 1 to disable
maxDist_site_merge_um 35 Max. distance separation of the peak sites to consider merging
spkLim_factor_merge 1 Waveform range for computing the correlation. spkLim_factor_merge <= spkLim_raw_factor_merge. circa v3.1.8

Trial

Name Default Value Description
vcFile_trial '' .mat or .csv file containing timestamp in seconds unit. use any variable name.
thresh_trial [] Threshold to detect trial event timing from the TTL pulse. If empty, half between min and max is used.
tRefrac_trial .001 Trial timestamp refractory period (sec), disable duplicate events
tlim_psth [-1 5] Time range to display PSTH (in seconds)
tbin_psth .01 Time bin for the PSTH histogram (in seconds)
xtick_psth .2 PSTH time tick mark spacing (in seconds)
fAverageTrial_psth 1 plot individual trials
nSmooth_ms_psth 50 PSTH smoothing time window (in milliseconds)
rateLim_psth [] range range in Hz

Firing rate estimation for unit

Name Default Value Description
sRateHz_rate 1000 Resampling rate for the firing rate
filter_sec_rate 2 Time period to determine the firing rate
filter_shape_rate 'triangle' {'triangle', 'rectangle'} kernel shape for temporal averaging

Aux channel

Name Default Value Description
vcFile_aux '' Aux channel file
sRateHz_aux [] sampling rate for aux file
iChan_aux [] Aux channel # to correlate with the unit firing rate
vcLabel_aux '' Label for the aux channel
vrScale_aux 1 Scale factor for the aux input
nClu_show_aux 10 Max # clusters to show for aux vs. firing rate correlation

LFP

Name Default Value Description
vcFile_lfp '' LFP file
sRateHz_lfp 2500 Target LFP sampling rate (Hz)
nSkip_lfp [] downsample factor used to determine sRateHz_lfp if sRateHz_lfp==[]
Clone this wiki locally