filt_car_() - JaneliaSciComp/JRCLUST GitHub Wiki
Performs filtering using P.vcFilter setting, and global common average referencing (CAR) using P.vcCommonRef setting. Note that local CAR is performed by spkwav_car_() after spiking event detection.
Syntax
- [mnWav2, vnWav2_mean] = filt_car_(mnWav2, P)
- [mnWav2, vnWav2_mean] = filt_car_(mnWav2, P, mnWav1_pre, mnWav1_post, fTrim_pad)
Input
- mnWav2: raw traces (nSamples_load x nSites: int16)
- P: Parameters struct
- mnWav1_pre: raw traces preceding the current traces (mnWav2) to be padded for edge-safe filtering (length: P.nPad_filt).
- mnWav1_post: raw traces following the current traces (mnWav2) to be padded for edge-safe filtering (Length: P.nPad_filt).
- fTrim_pad: flag to trim the padding or not (default: 1).
Output
- mnWav2: filtered and CAR subtracted waveform
- vnWav2_mean: mean across all sites excluding bad sites (P.viSiteZero)
Operations
- Filter according to the filter setting (P.vcFilter)
- wav_car_(): Calculate and subtract the common average reference) if P.vcCommonRef == 'mean'. Skipped if vcCommonRef == 'none'.