neuralset.extractors.neuro.FnirsExtractor¶
- class neuralset.extractors.neuro.FnirsExtractor(*, event_types: Literal['Fnirs'] = 'Fnirs', aggregation: Literal['single', 'sum', 'mean', 'first', 'middle', 'last', 'cat', 'stack', 'trigger'] = 'single', allow_missing: bool = False, frequency: Literal['native'] | float = 'native', offset: float = 0.0, baseline: tuple[float, float] | None = None, picks: Annotated[tuple[str, ...], MinLen(min_length=1)] = ('fnirs',), apply_proj: bool = False, filter: tuple[float | None, float | None] | None = None, apply_hilbert: bool = False, notch_filter: float | list[float] | None = None, drop_bads: bool = False, mne_cpus: int = -1, infra: MapInfra = MapInfra(folder=None, cluster=None, logs='{folder}/logs/{user}/%j', job_name=None, timeout_min=120, nodes=1, tasks_per_node=1, cpus_per_task=10, gpus_per_node=None, mem_gb=None, max_pickle_size_gb=None, slurm_constraint=None, slurm_partition=None, slurm_account=None, slurm_qos=None, slurm_use_srun=False, slurm_additional_parameters=None, conda_env=None, workdir=None, permissions=511, version='1', keep_in_ram=True, max_jobs=128, min_samples_per_job=1, forbid_single_item_computation=False, mode='cached'), scaler: None | Literal['RobustScaler', 'StandardScaler'] = None, scale_factor: float | None = None, clamp: float | None = None, fill_non_finite: float | None = None, bipolar_ref: tuple[list[str], list[str]] | None = None, channel_order: Literal['unique', 'original'] = 'unique', allow_maxshield: bool = False, distance_threshold: float | None = None, compute_optical_density: bool = False, scalp_coupling_index_threshold: float | None = None, apply_tddr: bool = False, compute_heamo_response: bool = False, partial_pathlength_factor: float = 0.1, enhance_negative_correlation: bool = False)[source][source]¶
Functional Near-Infrared Spectroscopy (fNIRS) feature extractor.
Provides preprocessing and handling of fNIRS data using functions from mne.preprocessing.nirs, including channel selection, optical density conversion, haemodynamic response computation, and signal enhancement.
The order of preprocessing, if specified, is as follows: 1. Channel selection 2. Drop bad channels 3. Exclude channels based on source-detector distance 4. Convert raw intensity data to optical density 5. Exclude channels based on scalp coupling index 6. Apply Temporal Derivative Distribution Repair (TDDR) to reduce motion artifacts 7. Compute haemodynamic responses from optical density 8. Band-pass filtering 9. Enhance negatively correlated signals 10. Resampling 11. Scaling All steps executed with extractor.prepare()
- Parameters:
picks (default=("fnirs",)) – Channels to select for analysis, picks “fnirs” channels by default.
distance_threshold (float | None, default=None) – Minimum source-detector distance for channel selection. Channels with distances below this threshold will be excluded.
compute_optical_density (bool, default=False) – Whether to convert raw intensity data to optical density.
scalp_coupling_index_threshold (float | None, default=None) – Minimum scalp coupling index for channel inclusion. Requires compute_optical_density=True.
apply_tddr (bool, default=False) – Whether to apply Temporal Derivative Distribution Repair to reduce motion artifacts.
compute_heamo_response (bool, default=False) – Whether to compute haemodynamic responses from optical density. Requires compute_optical_density=True.
partial_pathlength_factor (float, default=0.1) – Partial pathlength factor used in the Beer-Lambert law for haemodynamic response calculation.
enhance_negative_correlation (bool, default=False) – Whether to enhance negatively correlated signals. Requires compute_heamo_response=True.
Notes
Filtering, resampling, scaling are applied if filter or frequency attributes are set (see parent class).