Drop-in spikeglx.Reader for HDF5-packed LFP-compressed files.
Chunks are decompressed on demand. No sync trace is available; read() with sync=True returns None as the second element. Data is returned in volts (float32) in the same (n_samples, n_channels) convention as spikeglx.Reader.
The HDF5 layout is ///meta and ///chunks/. A file may contain multiple recordings and/or multiple scale levels. When a file contains exactly one recording the key is auto-detected; otherwise pass recording=.
Parameters
Name
Type
Description
Default
h5_file
path - like
HDF5 archive produced by compress_to_h5.
required
recording
str or None
Recording key (top-level group name). Auto-detected when the file contains exactly one recording; raises ValueError for multi-recording files.
None
scale
int
Resolution level to open. 0 = base (full LFP rate). Default 0.
0
bin_channels
int
Number of adjacent channels to sum together on every read. 1 (default) means no binning. When set, nc, shape, and geometry all reflect the binned dimension, and slicing (sr[0:2500, :]) returns (n_samples, nc // bin_channels) without any extra arguments.
List recording keys at the root of an H5 file written by compress_to_h5.
Parameters
Name
Type
Description
Default
h5_file
path - like
required
Returns
Name
Type
Description
list of str
saturation_times
LFPackReader.saturation_times()
Saturation interval table with session-clock start/stop times.
Converts start_sample/stop_sample (raw-rate, recording-aligned) to start_time/stop_time (session-clock seconds, matching times) via the same sample-rate ratio and _sample_to_time used by times — never divide the raw samples by a raw sample rate by hand, and never re-derive the affine formula independently of .times (it would silently diverge on any scale with real non-linear sync structure).
Returns
Name
Type
Description
pandas.DataFrame with columns start_sample, stop_sample, start_time,