Skip to main content

OperandoMerge

Heterogeneous instruments. One reproducible experiment timeline.

CI Python 3.10+ License: MIT

OperandoMerge aligns reactor loggers, MFCs, high-frequency MS, sparse GC, XRD, Raman, FTIR, and other CSV/XLSX logs without hiding where values came from. It uses channel semantics to interpolate continuous measurements, hold stepwise setpoints causally, and keep event/discrete samples strictly discrete.

Actual OperandoMerge before-and-after showcase

The figure is generated from the repository's real five-instrument synthetic workflow. Purple GC values exist only at 120, 300, and 480 s: the other 298 canonical rows remain missing rather than receiving invented chromatograms.

Install

Python 3.10 or newer is required. PyPI publication is prepared but is not yet available, so install from the public source repository:

python -m pip install "operandomerge @ git+https://github.com/hdkim99/OperandoMerge.git"

For development:

git clone https://github.com/hdkim99/OperandoMerge.git
cd OperandoMerge
python -m pip install -e '.[dev]'

30-second showcase

mkdir -p showcase-output

operandomerge inspect examples/showcase/reactor_logger.csv

operandomerge merge examples/showcase/config.json \
  --excel showcase-output/operandomerge-showcase.xlsx \
  --plot showcase-output/alignment-cli.png

Expected CLI summary:

Merged 5 dataset(s), 301 timeline row(s); QC: 0 error(s), 0 warning(s)

The Excel report contains complete merged, metadata, provenance, qc, and configuration sheets. To regenerate the source CSVs and showcase figures from their deterministic equations:

python examples/showcase/generate_showcase.py --output-dir showcase-output

Launch the same workflow through the desktop UI with:

operandomerge-gui

Python's Tk bindings are included with python.org installers. Some distro or Homebrew Python builds require their matching optional Tk package, such as python3-tk on Debian/Ubuntu.

What is being aligned?

The showcase represents one 600 s catalyst experiment with deliberately different clocks and sampling intervals:

Instrument Raw sampling Alignment evidence Result semantics
Reactor logger 10 s absolute UTC experiment origin temperature/pressure, continuous
MFC controller 20 s local event at 100 s = experiment event at 120 s H₂/Ar flow, stepwise
MS 2 s known 8 s transport delay m/z 44/28, continuous
GC three injections 12 s sampling + 18 s analysis delay compositions, discrete samples
XRD 60 s −5 s clock offset + 15 s analysis delay phase stepwise; lattice discrete

The raw clocks and applied corrections remain in metadata/provenance. See the showcase definition for hand-checkable invariants.

Scientific rules

The canonical coordinate is experiment_time_s:

experiment_time_s = source_time_s + alignment_offset_s - total_delay_s
total_delay_s = manual + sampling + transport + dead_volume + analysis

A positive delay means a reported value corresponds to an earlier physical event, so it is subtracted. Reference-event alignment uses target_event_time_s - source_event_time_s. Absolute timestamps use an explicit ISO-8601 experiment origin when provided; otherwise the earliest absolute record becomes zero.

Channel semantic Available policy Scientific constraint
continuous linear, nearest, none bounded by measured range; no extrapolation
stepwise previous, none causal hold; never takes a future setpoint
event exact timestamp only never interpolated
discrete_sample exact timestamp only never interpolated

For every emitted value, provenance identifies the source file, column, row, original timestamp, offset, delay, and interpolation method. Linear values retain both bracketing source rows/timestamps.

GUI and Python API

The GUI workflow is: add files → map clocks/channels → assign channel semantics → enter offsets/delays/events → choose the timeline → preview → inspect values/QC → export. Controls are converted to the same configuration models used by the CLI; the GUI contains no independent scientific formulas.

from pathlib import Path

from operandomerge.config import load_config
from operandomerge.export import export_excel
from operandomerge.service import MergeService

datasets, policy = load_config(Path("examples/showcase/config.json"))
result = MergeService().run(datasets, policy)
export_excel(result, Path("operandomerge-showcase.xlsx"))

Supported, experimental, planned

Supported in 0.1.1:

  • multiple CSV/XLSX inputs and one selected worksheet per dataset;
  • absolute/injection timestamps, elapsed seconds/minutes, and midnight-wrapping instrument-local clocks;
  • absolute, elapsed, manual-offset, and reference-event alignment;
  • explicit manual/sampling/transport/dead-volume/analysis delays;
  • union or named-reference timeline, type-aware merging, QC, provenance, figures, CSV bundle, Excel, CLI, Tk GUI, and public Python API; and
  • Python 3.10+ packaging with scientific/unit/integration/showcase regressions.

Experimental:

  • automatic GUI time-column guesses, which must be reviewed;
  • robust-MAD possible-outlier warnings; and
  • the interchange draft, which documents concepts but is not a stable cross-project contract.

Planned, not implemented:

  • cross-correlation alignment. It will not be added until candidate offsets have quantitative confidence, multi-channel agreement, a visual approval step, and complete provenance;
  • vendor-native binary adapters;
  • automatic dead-volume calculation from apparatus geometry; and
  • configurable regular target grids.

Assumptions and limitations

  • OperandoMerge cannot prove that two clock events represent the same physical event. Users must justify every offset and delay.
  • Signal units are preserved as source metadata/names but are not converted or dimensionally validated in this release.
  • Numeric channels are required for resampling. Categorical phase labels should be encoded as documented numeric states or retained outside the merged value table.
  • On a named reference timeline, off-grid event/discrete measurements remain absent rather than being snapped or interpolated.
  • Duplicate times are reported by QC; numeric merging deterministically uses the final row at that time while raw files remain untouched.
  • GUI tables preview up to 500 rows; exports always contain the complete result.
  • Synthetic curves demonstrate synchronization behavior, not validated reactor kinetics, mass balances, or diffraction physics.

Validation details are in scientific validation, and every JSON setting is described in the configuration reference.

Related tools

These are independent repositories. Direct interoperability is planned, not currently claimed:

  • Ordifile — chromatographic file conversion
  • ReactorCheck — catalytic reactor calculation and QC
  • TPxLab — temperature-programmed characterization analysis

Development and citation

ruff check .
mypy src
pytest
python -m build

Contributions are welcome under CONTRIBUTING.md. Cite the software using CITATION.cff. The project is MIT-licensed; the dependency license review records compatibility.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

operandomerge-0.1.1.tar.gz (274.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

operandomerge-0.1.1-py3-none-any.whl (25.8 kB view details)

Uploaded Python 3

File details

Details for the file operandomerge-0.1.1.tar.gz.

File metadata

  • Download URL: operandomerge-0.1.1.tar.gz
  • Upload date:
  • Size: 274.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for operandomerge-0.1.1.tar.gz
Algorithm Hash digest
SHA256 f0af1a649b091eec6685d799a6a0084dba478259b2723e342a8e2e8f9989f1b8
MD5 28a783f7320918064ac0e5e9aa7adfc0
BLAKE2b-256 c4aa10ba84868201b2aa34db34cec07a476d00217393f3b1eb600457b2093dcc

See more details on using hashes here.

Provenance

The following attestation bundles were made for operandomerge-0.1.1.tar.gz:

Publisher: release.yml on hdkim99/OperandoMerge

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file operandomerge-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: operandomerge-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 25.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for operandomerge-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 49a1f9a4550910356a9b3efe518885362184f4b2f6fb8ec41cba6daa50f5dc90
MD5 4937ddf21dd088793545da95ba42a30d
BLAKE2b-256 90862bf9955a096f926038f7aa56bf23b05d6c82b12239c0e628f4a2865e8fc0

See more details on using hashes here.

Provenance

The following attestation bundles were made for operandomerge-0.1.1-py3-none-any.whl:

Publisher: release.yml on hdkim99/OperandoMerge

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.1.3

2 files

0.1.2

2 files

This release

0.1.1 This release

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page