pyimpspec already parses BioLogic's .mpt text export, but not the raw binary .mpr files that EC-Lab produces by default. Users currently have to manually export each measurement to .mpt first, and archives that only kept the .mpr can't be read at all.
Would you accept a parser for .mpr? The format is undocumented and version-dependent, so the cleanest approach is to delegate parsing to the existing galvani package as an optional dependency (lazy import, with a clear error directing users to pip install galvani or to export .mpt). The magnitude/phase → impedance conversion and multi-sweep splitting are handled by the existing dataframe_to_data_sets helper, so the parser is small.
Two things I'd value your call on:
- Optional vs. hard dependency for
galvani (I've assumed optional/lazy-imported).
- Test fixture: only EC-Lab hardware can write
.mpr, so a fixture matching the shared control spectrum can't be generated programmatically. I can supply a representative .mpr, or you may prefer to add one of your own that encodes the standard control spectrum. The test I wrote skips gracefully when no data*.mpr fixture is present.
I have a working implementation + test ready to submit as a PR.
pyimpspec already parses BioLogic's
.mpttext export, but not the raw binary.mprfiles that EC-Lab produces by default. Users currently have to manually export each measurement to.mptfirst, and archives that only kept the.mprcan't be read at all.Would you accept a parser for
.mpr? The format is undocumented and version-dependent, so the cleanest approach is to delegate parsing to the existinggalvanipackage as an optional dependency (lazy import, with a clear error directing users topip install galvanior to export.mpt). The magnitude/phase → impedance conversion and multi-sweep splitting are handled by the existingdataframe_to_data_setshelper, so the parser is small.Two things I'd value your call on:
galvani(I've assumed optional/lazy-imported)..mpr, so a fixture matching the shared control spectrum can't be generated programmatically. I can supply a representative.mpr, or you may prefer to add one of your own that encodes the standard control spectrum. The test I wrote skips gracefully when nodata*.mprfixture is present.I have a working implementation + test ready to submit as a PR.