Core Module#
Core module for loading, organizing, and analyzing EEG data.
This module provides the fundamental building blocks for the NeuRodent analysis pipeline, handling everything from raw data loading to feature extraction.
Typical Workflow:
from neurodent import visualization
# 1. Organize recordings for an animal
ao = visualization.AnimalOrganizer(
data_path, animal_id, mode="nest",
)
# 2. Run windowed feature analysis
war = ao.compute_windowed_analysis(
features=['psdband', 'cohere'],
window_s=5,
multiprocess_mode="dask",
)
# 3. Access results (WindowAnalysisResult)
df = war.result # pandas DataFrame with all features
war.save_pickle_and_json('output/')
The lower-level classes can also be used directly:
from neurodent import core
# Load a single recording
lro = core.LongRecordingOrganizer(day_folder_path)
# Analyze in fragments
analyzer = core.LongRecordingAnalyzer(lro, fragment_len_s=5)
rms = analyzer.compute_rms(fragment_index=0)
psd = analyzer.compute_psdband(fragment_index=0)
What Gets Computed:
Power features: RMS, amplitude variance, band power (delta, theta, alpha, beta, gamma)
Connectivity: Coherence, imaginary coherence, Pearson correlation between channels
Spikes: Spike counts via frequency-domain detection
See Also:
Basic Usage Tutorial - Getting started guide
Windowed Analysis Tutorial - Detailed analysis examples
neurodent.constants- Configure frequency bands and parameters
Classes#
Stores metadata information for neural recordings. |
|
Construct a long recording from various file formats or an existing recording object. |
|
Class for analyzing LongRecordings by breaking them into smaller time windows (fragments). |
|
Static class for analyzing fragments of EEG data. |
|
Static class for frequency-domain spike detection using STFT and SNEO. |