feature_computation.destripe_ap_lf
feature_computation.destripe_ap_lf(
raw_ap,
raw_lf,
fs_ap=None,
fs_lf=None,
geometry=None,
channel_labels=None,
neuropixel_version=1,
ap_k_filter=False,
lf_k_filter=False,
nshank=1,
skip_lf_destripe=False,
)Destripe raw AP and LF snippets with ibldsp.
Single source of truth for destriping, shared by :func:compute_features_from_raw and :meth:ephysatlas.feature_calculators.base.BaseFeatureCalculator.get_destriped_snippet, so the feature engine and the debug/inspection path cannot diverge.
Args: raw_ap, raw_lf (np.ndarray | None): Raw AP/LF arrays shaped (n_channels, n_samples); None skips that band. fs_ap, fs_lf (float): Sampling frequencies (Hz). geometry (dict): Channel geometry passed to ibldsp. channel_labels (np.ndarray | None): Bad-channel labels. neuropixel_version (int): Neuropixels version. ap_k_filter (bool): Spatial-filter mode for AP destriping. lf_k_filter (bool | None): Spatial-filter mode for LF destriping. nshank (int): Number of probe shanks. skip_lf_destripe (bool): Skip ibldsp.voltage.destripe_lfp and use raw_lf as-is for des_lf. For an LF source that has already been destriped/CAR’d/decimated upstream, so destriping isn’t reapplied with geometry/timing assumptions designed for the native (un-decimated) LF rate.
Returns: tuple[np.ndarray | None, np.ndarray | None]: (des_ap, des_lf).