Skip to content

mef3io-coregistration 0.4.0

Released 2026-11-09.

Highlights

In plain words: once two recordings are aligned, you can now save the result as a new recording. One new MEF 3.0 session holds the channels you pick from both files, all on the reference clock, ready for any tool that reads MEF 3.0. Your original files are only read.

  • Write a coregistered session. New export_coregistered(result, out, file_a, file_b, ...) (mef3io_coregistration.export) writes a brand-new MEF 3.0 session from a saved result and the two recordings. Reference channels keep their samples and times; moving channels are resampled (the band-limited path the readers use) onto a uniform grid on the reference clock at their own rate; gaps stay gaps. You choose which recording is the reference (the opposite of the result's own direction uses the inverse clock map), which channels of either recording to include, and how many threads to use (n_threads, mef3io's one thread rule, passed to the reader, the writer and the resampling). Memory is bounded (chunks with the filter margins); the stored values and times do not depend on the chunk size or the thread count. Progress and cancel are supported; the session is written next to the output, read back and verified, then renamed into place. An existing output is never touched, and a cancelled or failed run removes only what it created. Beyond the span the clock map was measured over the export refuses by default, or trims or extrapolates on request (out_of_span). (How-to)
  • Channel length comes from the block index. Exports, and (fixed in #6, issue #5) every reader, now size each channel from the recording's block index, never from the start and end times in the file headers, which some recorders write short or late. Such files used to lose their last or first block when read. Opening a result still checks the files by their start and end times (within 1 s); a file matches if either its block-index span or its header span does, so a result saved by 0.3.x on such a file still opens, and new results store the block-index span.
  • mef3io 2.3 or newer. The dependency is now mef3io>=2.3.0,<3 (multi-channel Reader.read and Writer.write_many, which the export uses).

Upgrading

  • Install mef3io 2.3 or newer: pip install -U mef3io-coregistration brings it.
  • Nothing else changes: every result and mapping saved by 0.3.x opens unchanged, also for files whose header times are off (the file check accepts the header span old results stored).
  • If you read a file whose header times were short or late, reads now return every sample; the start and end times info() reports come from the block index (the header's are kept as start_time_header / end_time_header).

Full list of changes: v0.3.1...v0.4.0