API Reference#

This is the complete API reference for NeuRodent.

Modules#

Core Module#

Shared low-level helpers used across every analysis stage.

neurodent.core holds only cross-cutting utilities (neurodent.core.utils) and animal-metadata resolution (neurodent.core.metadata). It is the shared floor of the package: every stage may import it, and it imports nothing above constants.

The stage classes live in their own top-level packages:

  • neurodent.loadingLongRecordingOrganizer, AnimalOrganizer

  • neurodent.analysisLongRecordingAnalyzer, AnalysisPipeline, spike detection

  • neurodent.resultsWindowAnalysisResult, FrequencyDomainSpikeAnalysisResult, ZeitgeberAnalysisResult

  • neurodent.plottingAnimalPlotter, ExperimentPlotter, ZeitgeberPlotter

The headline classes are also lazily importable from the top level, e.g. from neurodent import AnimalOrganizer.

RecordingMetadata

Stores metadata information for neural recordings.

LongRecordingOrganizer

Construct a long recording from various file formats or an existing recording object.

LongRecordingAnalyzer

Class for analyzing LongRecordings by breaking them into smaller time windows (fragments).

FragmentAnalyzer

Static class for analyzing fragments of EEG data.

FrequencyDomainSpikeDetector

Static class for frequency-domain spike detection using STFT and SNEO.

Visualization Module#

AnimalOrganizer

Organizes and analyzes recording data from a single animal across multiple sessions.

WindowAnalysisResult

Wrapper for output of windowed analysis.

FrequencyDomainSpikeAnalysisResult

Wrapper for frequency-domain spike detection results.

AnimalPlotter

Class for plotting results from an AnimalOrganizer/WindowAnalysisResult.

ExperimentPlotter

A class for creating various plots from a list of multiple experimental datasets.

Constants#

Constants used throughout NeuRodent.

This module centralizes all configuration values, feature definitions, and lookup tables used by the neurodent.core and the stage packages (loading, analysis, results, plotting) modules.

Quick Reference:

from neurodent import constants

# Frequency bands (Hz ranges)
constants.FREQ_BANDS
# {'delta': (1, 4), 'theta': (4, 8), 'alpha': (8, 13), 'beta': (13, 25), 'gamma': (25, 40)}

# Available features
constants.LINEAR_FEATURES   # ['rms', 'ampvar', 'psdtotal', 'nspike', ...]
constants.LINEAR_2D_FEATURES  # ['psdslope']
constants.BAND_FEATURES     # ['psdband', 'psdfrac', 'logpsdband', 'logpsdfrac']
constants.MATRIX_FEATURES   # ['cohere', 'zcohere', 'imcoh', 'zimcoh', 'pcorr', 'zpcorr']

# Global settings
constants.GLOBAL_SAMPLING_RATE  # 1000 Hz
constants.LINE_FREQ             # 60 Hz (for notch filter)

# Colorblind-friendly colors
constants.OKABE_ITO_COLORS["blue"]   # '#0072B2'
constants.OKABE_ITO_COLORS["orange"] # '#E69F00'

Customization:

To override defaults, import and modify before running analysis:

from neurodent.constants import config
config.GLOBAL_SAMPLING_RATE = 500  # If your data is 500 Hz

See Also:

analysis

config

Global configuration constants for neurodent.

mappings

Channel and metadata mapping constants.

plotting

Plotting style constants.