Skip to main content

feature_calculators.FeatureComputationOptions

feature_calculators.FeatureComputationOptions(
    features_to_compute=None,
    output_dir=None,
    scratch_dir=None,
    skip_saved_computation=False,
    save_waveforms=False,
    recompute_channels=False,
    include_trajectory=True,
    require_trajectory=False,
    lf_k_filter=False,
    skip_lf_destripe=False,
    channel_labels=None,
    feature_params=None,
    extra_kwargs=dict(),
)

Options controlling one OOP feature-computation call.

Attributes: features_to_compute (Sequence[str] | None): Feature families to compute. None computes every supported feature for the available streams. output_dir (Path | None): Root directory for probe/snippet outputs. When None, no feature files or channel files are written. scratch_dir (Path | None): Scratch directory for downstream feature routines such as waveform extraction. skip_saved_computation (bool): Reuse existing feature files in the snippet directory when possible. save_waveforms (bool): Save waveform arrays when waveform features are computed. recompute_channels (bool): Rewrite channels.pqt even if it exists. include_trajectory (bool): Try to add trajectory-derived coordinates. require_trajectory (bool): Raise an error when trajectory metadata is missing. lf_k_filter (bool | None): Spatial filter mode forwarded to LF destriping in compute_features_from_raw. skip_lf_destripe (bool): Skip ibldsp.voltage.destripe_lfp entirely and use the raw LF snippet as-is for feature computation. False reproduces today’s behavior. Set True for a source whose LF has already been destriped/CAR’d/decimated upstream (e.g. a pre-processed compressed or checkpoint source), where re-running destriping would reapply CAR/highpass/bad-channel-interpolation with geometry/timing assumptions designed for the native (un-decimated) LF rate. channel_labels (np.ndarray | None): Explicit per-channel bad-channel labels. When provided, this overrides the calculator’s automatic label resolution (stored labels / cbin / snippet detection) – e.g. pass np.zeros(n_channels) to disable bad-channel handling. None keeps the automatic behavior. feature_params (FeatureParams | Mapping | None): Per-feature parameters forwarded to compute_features_from_raw. Accepts a FeatureParams or a nested dict (e.g. {"csd": {"scale": False}}), which is normalized to FeatureParams on init. None uses the engine defaults for every family. extra_kwargs (Mapping[str, Any]): Extra keyword arguments forwarded to compute_features_from_raw.