cogpy.io
File I/O for electrophysiology formats: binary LFP, Zarr, HDF5, BIDS-iEEG, and XML anatomy maps. I/O functions load data into xarray and save results back to disk — they never do heavy compute.
Guide: How to load ECoG data | Design: Architecture And Scope (compute vs I/O separation)
Submodules
Schema-first converters and file-format conversion utilities. |
|
BIDS ECEPHYS reader for electrophysiology |
|
ECoG file I/O: load, save, and convert grid ECoG recordings. |
|
BIDS iEEG reader for intracranial EEG |
|
BIDS iEEG sidecar readers — JSON metadata, channel TSVs, electrode TSVs. |
|
Parse and write XML metadata for OpenEphys-style recordings. |
|
BIDS-style sidecar management: JSON metadata, channel/electrode TSVs, and symlink propagation. |
|
Anatomical channel remapping from OpenEphys XML metadata. |
|
OpenEphys XML metadata parser and writer. |
I/O subpackage — file readers, writers, and format converters.
- Generic modules (usable by anyone):
converters, save_utils, sidecars
Lab-internal modules (assume specific recording setups and directory layouts used in the Bhatt Lab; included for convenience but not part of the stable public API):
ecog_io, ecephys_io, ieeg_io, ieeg_sidecars, load_meta, xml_io, xml_anat_map
Example
from cogpy.io import ieeg_io, ecephys_io