cogpy.io.sidecars

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

Functions

propagate_sidecars(input_lfp, output_lfp, *)

Symlink sidecars next to output_lfp when they exist for input_lfp.

read_json_metadata(path, *[, required_keys])

Read a JSON sidecar file and optionally validate required keys.

resolve_channel_count(meta)

Resolve total channel count from a BIDS-iEEG JSON sidecar.

sidecar_channels(lfp_path)

Return the _channels.tsv sidecar path for a given LFP file.

sidecar_electrodes(lfp_path)

Return the _electrodes.tsv sidecar path for a given LFP file.

sidecar_json(lfp_path)

Return the .json sidecar path for a given LFP file.

sidecar_xml(lfp_path)

Return the .xml sidecar path for a given LFP file.

update_sampling_frequency_json(meta, ...[, ...])

Write updated JSON sidecar with new SamplingFrequency and optional extra fields.

write_json_metadata(path, meta)

Write a dict as a formatted JSON sidecar file.