Skip to content

mef3io 1.2.0

Released 2026-10-15

Highlights

  • Open a damaged recording. Reader(path, strict=False) skips a segment that cannot be read instead of refusing the whole session; its span reads as NaN and it is listed in Reader.problems (with an UnreadableSegmentWarning). Strict remains the default, because a skipped segment looks exactly like a real recording gap. Also in MATLAB and the C API.
  • Annotations at every level. Reader.records() now also reads segment-level records, with level="session" | "channel" | "segment" | "all" and a segment= argument. All standard MEF record types are decoded, including seizure (Seiz) records with their per-channel onsets.
  • Where a file came from. Every file mef3io writes records which mef3io version created it, which last changed it, and what was done (create, append, repair, recovery). Read it via Reader.segments(ch)[i]["provenance"]. No dates are stored.
  • Faster cached opens. Reader(cache=...) now opens long sessions with many segments in about a tenth of a second or less, with a small cache file; before, it could be slower than opening without the cache.
  • New Benchmarks page.

Fixes

  • Annotation times in sessions with a recording-time offset (meflib-style anonymization) are read and written correctly at every level, and writes never store the real date. A write that would reveal it is refused.
  • If a block's start time or sample count in the index disagrees with the block itself, mef3io now follows the block (as meflib does) instead of turning real samples into NaN, and reports it with a BlockCopyWarning and in read_raw()["block_copy_mismatches"]. Healthy files read exactly as before.
  • A damaged annotation file raises (or, with strict=False, is skipped and listed in problems) instead of silently returning fewer records.
  • MATLAB: an invalid argument (for example a text or fractional segment number) now gives a clean error instead of crashing MATLAB, and non-ASCII text round-trips correctly on Windows.

Upgrading

  • If you used Reader(cache=...) with encrypted sessions on 1.1.x, delete your mef3io cache folder; 1.2.0+ never caches encrypted sessions and removes such snapshots when it next opens that session with cache=.
  • records("ch1") now returns that channel's segment-level records as well as its channel-level ones. records() still returns session-level records only.
  • A Writer opened with only the level-1 password can no longer append to an encrypted session; use the level-2 password.
  • mef3io.cache.invalidate() has been removed; a stale cache is detected and ignored automatically.
  • After a repair or recovery that changed an older segment, the report may include an informational provenance.last-segment note. Code that expects an empty findings list after repair should allow for it.