Skip to main content

feature_computation.compute_features_from_destriped

feature_computation.compute_features_from_destriped(
    des_ap,
    des_lf,
    fs_ap=None,
    fs_lf=None,
    geometry=None,
    channel_labels=None,
    des_lf_no_car=None,
    features_to_compute=None,
    output_dir=Path('.'),
    scratch_dir=None,
    feature_params=None,
    **kwargs,
)

Compute features from already-destriped AP/LF arrays.

This is the feature-computation half of :func:compute_features_from_raw (which destripes and then calls this). Call it directly to compute features on pre-destriped or cached data without re-destriping.

Args: des_ap, des_lf (np.ndarray | None): Destriped AP/LF arrays shaped (n_channels, n_samples); None skips that band’s features. fs_ap, fs_lf (float): Sampling frequencies (Hz). geometry (dict): Channel geometry with "x"/"y". channel_labels (np.ndarray, optional): Bad-channel labels; defaults to zeros. des_lf_no_car (np.ndarray, optional): LF destriped with no common-average reference (k_filter=None). When provided, rms_lf_no_car is added to the LF features; it cannot be derived from des_lf alone. features_to_compute (list, optional): Feature families to evaluate. None computes all families supported by the supplied bands. output_dir (Path, optional): Where per-feature parquet files are written. scratch_dir (Path, optional): Scratch location for waveform extraction. feature_params (optional): Duck-typed FeatureParams (.lf/.csd). **kwargs: Extra options such as skip_saved_computation / save_waveforms.

Returns: pd.DataFrame: Outer-joined feature table keyed by channel.

Raises: ValueError: If neither band is supplied or an unsupported family is requested.