FrequencyDomainSpikeDetector#
- class neurodent.core.FrequencyDomainSpikeDetector[source]#
Bases:
objectStatic class for frequency-domain spike detection using STFT and SNEO.
This detector implements a multi-stage pipeline: 1. Preprocessing (bandpass + notch filtering) 2. STFT analysis at specific frequency bands 3. SNEO detection with multi-band consensus voting 4. Spike refinement and morphological validation 5. Temporal clustering and deduplication
- DEFAULT_PARAMS = {'baseline_ms': 500.0, 'bp': [3.0, 40.0], 'cluster_gap_ms': 80.0, 'freq_slices': [10.0, 20.0], 'k_sigma': 3.0, 'notch': 60.0, 'notch_q': 30.0, 'search_ms': 160.0, 'smooth_len': 5, 'smooth_window': 7, 'sneo_percentile': 99.99, 'vote_k': 2, 'window_s': 0.125}#
- static detect_spikes_recording(recording: BaseRecording, detection_params: dict | None = None, max_length: int | None = None, multiprocess_mode: Literal['dask', 'serial'] = 'serial') tuple[list[ndarray], mne.io.RawArray][source]#
Detect spikes in a recording using frequency-domain analysis.
- Parameters:
recording (
si.BaseRecording) – The recording to analyzedetection_params (
dict, optional) – Detection parameters. Uses DEFAULT_PARAMS if Nonemax_length (
int, optional) – Maximum length in samples to analyzemultiprocess_mode (
Literal["dask", "serial"]) – Processing mode
- Returns:
- (spike_indices_per_channel, mne_raw_with_annotations)
spike_indices_per_channel: List of arrays with spike sample indices per channel
mne_raw_with_annotations: MNE RawArray with spike annotations
- Return type:
tuple