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

cogpy.io.converters

Schema-first converters and file-format conversion utilities.

cogpy.io.ecephys_io

BIDS ECEPHYS reader for electrophysiology .dat files.

cogpy.io.ecog_io

ECoG file I/O: load, save, and convert grid ECoG recordings.

cogpy.io.ieeg_io

BIDS iEEG reader for intracranial EEG .dat files.

cogpy.io.ieeg_sidecars

BIDS iEEG sidecar readers — JSON metadata, channel TSVs, electrode TSVs.

cogpy.io.load_meta

Parse and write XML metadata for OpenEphys-style recordings.

cogpy.io.save_utils

cogpy.io.sidecars

BIDS-style sidecar management: JSON metadata, channel/electrode TSVs, and symlink propagation.

cogpy.io.xml_anat_map

Anatomical channel remapping from OpenEphys XML metadata.

cogpy.io.xml_io

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