Common Referencing
- process_nwb.common_referencing.CAR(X, mean_frac=0.95, round_func=<ufunc 'ceil'>, precision='single')[source]
Compute the common average reference across channels.
- Parameters
X (ndarray, (n_time, n_channels)) – Input timeseries.
mean_frac (float) – Fraction of the channels to include in the mean. Between 0 and 1. mean_frac must include at least one channel. mean_frac = 1 is equivalent to the mean. Lower fractions interpolate between the mean and the median.
round_func (callable) – Function which specifies how to round to the channel number.
precision (str) – Either single for float32/complex64 or double for float/complex.
- Returns
avg – Common average reference.
- Return type
ndarray, (n_time, 1)
- process_nwb.common_referencing.store_subtract_CAR(elec_series, processing, mean_frac=0.95, round_func=<ufunc 'ceil'>, precision='single')[source]
Compute and subtract the common average (mean) reference across channels.
- Parameters
elec_series (ElectricalSeries) – ElectricalSeries to process.
processing (Processing module) – NWB Processing module to save processed data.
mean_frac (float) – Fraction of the channels to include in the mean. Between 0 and 1. mean_frac must include at least one channel. mean_frac = 1 is equivalent to the mean. Lower fractions interpolate between the mean and the median.
round_func (callable) – Function which specifies how to round to the channel number.
precision (str) – Either single for float32/complex64 or double for float/complex.
- Returns
X_CAR (ndarray, (n_time, n_channels)) – X with CAR removed.
elec_series_CAR (ElectricalSeries) – ElectricalSeries that holds X_CAR.
- process_nwb.common_referencing.subtract_CAR(X, mean_frac=0.95, round_func=<ufunc 'ceil'>, precision='single')[source]
Compute and subtract the common average (mean) reference across channels.
- Parameters
X (ndarray, (n_time, n_channels)) – Input timeseries.
mean_frac (float) – Fraction of the channels to include in the mean. Between 0 and 1. mean_frac must include at least one channel. mean_frac = 1 is equivalent to the mean. Lower fractions interpolate between the mean and the median.
round_func (callable) – Function which specifies how to round to the channel number.
precision (str) – Either single for float32/complex64 or double for float/complex.
- Returns
Xp – Common average reference.
- Return type
ndarray, (n_time, n_channels)