cogpy.base
Core schemas and thin wrappers.
This module introduces a minimal, project-local schema for common neural signals.
For now the focus is ECoG/iEEG grids represented as xarray.DataArray.
Why a schema?
Many CogPy utilities assume a few conventions:
- a time dimension named "time"
- for grid ECoG: spatial dimensions named "AP" and "ML"
- a sampling rate available as sig.fs (either as a 0D coordinate named
"fs"or an attributeattrs["fs"])
This file provides small helpers to standardize/validate those conventions and an optional thin wrapper class that makes common preprocessing operations discoverable as methods while still delegating to the existing functional APIs.
Functions
|
Ensure |
|
Ensure |
|
Return sampling rate in Hz from a signal (coordinate or attrs). |
|
Return a signal with ensured |
|
Validate that a DataArray follows the minimal ECoG schema. |
Classes
|
Thin wrapper around |
|
Dimension/coordinate names used across the codebase. |