Vector EKG / ReasonOS

Trace an ECG observation to its source

ReasonOS links saved observations to specific measurements and marks them for review when their evidence changes.

ECG workspace

Choose a case, mark two points, and check what the interval tells you.

Local files stay in this browser tab
Opening reference recording…RECORDED REFERENCE · Verifying source

Opening and checking recording…

Project background, other exercises and sources
How the recording connects to heart activity and lead geometry
The electrical view

One lead measures one projection

Follow the cyan vector to its violet projection and the moving point on your digitally traced ECG.

Loading the digitized recording…

Independent calipers, interpretation worksheet, and reference cases

Recorded ECG workspace

The original waveform image, its device report, and your pixel-based measurements.

Recording A · lead II rhythm strip

Recorded pixels
12G₁G₂

Drag 1 and 2 onto the features you want to measure. The purple ruler sets the local paper direction and scale; the photograph’s tilt is retained.

Next image click places marker 1.
Selected pixel interval144 px
Grid calibration pendingSet the grid span below
Calibrate the grid and record a measurement

Place G₁ and G₂ on a horizontal grid span near the selected beat. Five large boxes span 25 mm. Initial markers are movable starting positions.

Grid 1
Grid 2
Marker 1
Marker 2
Projected interval 144.04 image pixels divided by 8 pixels per millimetre and 25 millimetres per second gives 720.2 milliseconds. This is a preview until the grid is confirmed.

Recorded evidence and calculation trace · 0 events
{
  "states": [
    {
      "id": "state-000-source",
      "sequence": 0,
      "summary": "ECG workspace opened"
    }
  ],
  "trace": [],
  "journal": {
    "id": "reasonos-portfolio-logical-clock",
    "entries": [
      {
        "eventId": "entry-1",
        "traceId": "reasonos-portfolio-logical-clock",
        "sequence": 1,
        "recordedAt": "2000-01-01T00:00:00.000Z",
        "previousHash": null,
        "eventHash": "6cb9c32dc90a0e888bf08ab2dd403292574a06da31374dcd20ee276316a4aa24",
        "event": {
          "type": "actor.registered",
          "actor": {
            "id": "learner",
            "kind": "learner",
            "label": "learner",
            "version": null,
            "authority": null
          }
        }
      },
      {
        "eventId": "entry-2",
        "traceId": "reasonos-portfolio-logical-clock",
        "sequence": 2,
        "recordedAt": "2000-01-01T00:00:00.000Z",
        "previousHash": "6cb9c32dc90a0e888bf08ab2dd403292574a06da31374dcd20ee276316a4aa24",
        "eventHash": "48d263583ade1b7e9b4a6605864ce5c993b92debb1c5e9c1b54d4bcf5eb1e89f",
        "event": {
          "type": "actor.registered",
          "actor": {
            "id": "system",
            "kind": "system",
            "label": "system",
            "version": null,
            "authority": null
          }
        }
      },
      {
        "eventId": "entry-3",
        "traceId": "reasonos-portfolio-logical-clock",
        "sequence": 3,
        "recordedAt": "2000-01-01T00:00:00.000Z",
        "previousHash": "48d263583ade1b7e9b4a6605864ce5c993b92debb1c5e9c1b54d4bcf5eb1e89f",
        "eventHash": "15080e148414a1975c71f9c54caf777f04b6f7821f937c1c4e99b11a675f6ca3",
        "event": {
          "type": "state.seeded",
          "state": {
            "id": "state-000-source",
            "category": "External",
            "role": "source",
            "causalStage": "source",
            "domainId": "ecg",
            "schemaVersion": "1.0.0",
            "payload": {
              "summary": "ECG workspace opened"
            },
            "provenance": {
              "id": "source-provenance",
              "source": "ECG workspace",
              "method": "Workspace registration; source inspection follows",
              "actorId": "system",
              "witnessType": "reference-derived",
              "verificationStatus": "unverified",
              "observedAt": "2000-01-01T00:00:00.000Z",
              "recordedAt": "2000-01-01T00:00:00.000Z",
              "domainId": "ecg",
              "domainVersion": "0.5.0",
              "modelVersion": null,
              "revisionOf": null,
              "confidence": null,
              "confidenceBasis": null,
              "sourceRefs": [
                "ECG workspace"
              ]
            },
            "createdAt": "2000-01-01T00:00:00.000Z"
          }
        }
      }
    ]
  }
}
Recording source and image coordinates

Source: /images/reasonos/asp-001-recording-a.webp · 2200 × 1180 pixels. SHA-256: b867797c34d1ef502d46e07c9daacbd1b5836ecdc3d3774152f8f19a59dede2e. Public recording A corresponds to archive file public/cases/recording-b.png. The waveform image is unchanged; rulers and markers are overlays. Local grid calibration accounts for tilt and an explicit pixel bound, with perspective varying across the photographed page.

Read a different recorded ECG

Four human-validated reference recordings · 12 simultaneous leads · native 500 Hz samples.

0 attempts · 0 annotation matches

Inspect rhythm and conduction before revealing the reference annotation. Pin at least two leads and explain the observations supporting your choice.

Loading the recorded signal and verifying its source digest…

Reference dataset, calibration, and reuse

PTB-XL v1.0.3: four anonymous, human-validated records from folds 9/10. Original WFDB samples and headers are preserved. Gain and baseline convert ADC counts to mV; checksums verify loading. Lead panels share time and voltage scales. Annotation matches are practice feedback, not a competency score.

Wagner et al. (2020), PTB-XL: A Large Publicly Available ECG Dataset; dataset release 1.0.3. PhysioNet attribution: Pollard et al. (2026), PhysioNet as a global platform for biomedical research. Reused under CC BY 4.0. Four records selected; source samples unchanged. Source files, annotations, and publisher-verified digests.

How a lead works · separate idealized vector model

Turn the vector

The cyan axis is the lead’s measurement direction.

Toward the positive endPositive projectionPoint above the baseline

1 Electrical direction

Selected lead: II
Lead II +VectorAlong lead−

2 Lead II records this voltage

25 mm/s · 10 mm/mV
This point: +0.732 mV0 mV1 mV040080012001600200024002800Time / ms
Cyan: the voltage at this instant. White: the ECG over time.
235 ms · 0.732 mV
The calculation for this pointVector strength 1.018 millivolts times alignment cosine 0.719 times lead scale 1 gives +0.732 millivolts. Displayed numbers are rounded.
Or inspect a wave:
Change lead or inspect the vector calculation
Amber: the heart’s net electrical vector. Cyan: its component along lead II.
Current signal coordinatesCurrent frontal signal coordinates: 0.978, 0.28 millivolts equivalent.

A scaled signal vector, not a measured dipole moment. Electrode reference: RA + LA + LL = 0.

Selected lead · same time coordinateLead II is its lead-field vector dotted with the current signal vector, giving 0.732 millivolts. Values rounded for display.

The component toward lead II’s positive direction produces a positive deflection. Lead coefficients are dimensionless; the displayed values are rounded.

Next: measure the ECG and test a claim Calipers → measurement → evidence → decision

Measure the QRS width, then ask whether its whole uncertainty interval is below 120 ms. ReasonOS records the evidence and each accepted or rejected step.

Interval measurement

90 msWorst-case interval bound ±4 ms
Interval equals coordinate separation divided by 12 SVG units per millimetre and 25 millimetres per second, giving 90 milliseconds.

Record the current source calibration before admitting a measurement. Model fiducials are explicit source metadata, not an automatic clinical onset detector.

Evidence-conditioned claim

Claim: the recorded QRS duration is below 120 ms. The rule evaluates the last recorded QRS measurement, not unrecorded caliper edits.

No QRS record
Calibration recordedMeasurement belongs to current sourceOrdered, finite intervalEntire uncertainty interval below 120 ms

Required evidence is absent, stale, or spans the cutoff. This is a duration criterion, not a rhythm or patient diagnosis.

Source parameters, paper calibration, and endpoint uncertainty

Changing the source or calibration leaves prior records intact and makes them stale for the new source. The ±2ε interval bound follows from two independently bounded endpoints; it is not a statistical confidence interval.

Reasoning graph

1 states · 0 attempted transformations · 0 rejected. Select an event to inspect its actual checks.

Source

Record calibration and an interval, then evaluate the claim. A rejected attempt remains in the graph without creating a state. Revisions and source changes retain their earlier evidence.

Structured trace and replay integrity

Replay verifies the supplied kernel’s SHA-256 hash chain and reruns both kernel and ECG plugin checks. It does not independently establish medical truth. A hash chain detects changed records; it is not an authenticated clinical signature. Journal times are deterministic logical ticks, not ECG acquisition times.

[]
Full derivations: six leads, QRS axis, QT correction, and evidence paths

Limb-lead identities

The six limb leads are linear projections of two independent frontal signal coordinates, with the augmented lead-field scale retained.Einthoven residual: lead I plus III minus II is zero to numerical precision.

RA, LA, and LL are electrode potentials. I = LA − RA; II = LL − RA; III = LL − LA. Each augmented lead compares one electrode with the mean of the other two. The algebraic identities do not require an equilateral torso; interpreting these coefficients as spatial lead fields does.

Mean QRS axis

The mean QRS axis is the direction of the integrated QRS signal vector, 9 degrees in this ideal lead model. Augmented aVF is scaled by two over square root three before combining with lead I.

A denotes signed QRS area in mV·ms; T_QRS is the QRS duration in milliseconds. The axis above comes from the entire modeled QRS, not the instantaneous arrow or an unscaled atan2 of I and aVF. A zero resultant has no defined direction.

Lead voltage equals the lead-field magnitude times signal-vector magnitude times the cosine of the angle between them.

φ is the angle between the selected lead field and signal vector. The actual body has spatially varying lead fields; this model uses idealized fixed frontal fields.

QT correction and rate dependence

Bazett correction for the source-reference intervals gives 420 milliseconds.Fridericia correction for the source-reference intervals gives 406 milliseconds.200400600600 ms1400 msQT fixed at 380 ms

Source-reference QT and RR come from the model fiducials. Cyan: Bazett; violet: Fridericia. Neither curve is a diagnosis. Rate correction has method-dependent bias, particularly away from its reference rate.

Alternative evidence pathways

Compute a weighted Jaccard score for each independently coherent reference path and use the maximum, rather than mixing requirements from different paths.

Lead I/aVF quadrant method: 0 · candidate · 0 expert traces

Vector angle method: 0 · candidate · 0 expert traces

Selected steps represent a preview of pathway coverage, not confirmed patient findings. The supplied ECG plugin defines the quadrant and vector-angle methods separately. The kernel’s original MinMax scorer evaluates both. A complete alternative path can score one without following the other method.

These are authored candidate methods, not validated expert consensus. Their coverage score is neither a probability of disease nor proof of a normal axis.

Model: prescribed finite-support P, QRS, and T components; equal-sided frontal lead geometry; traces plotted at 500 samples/s. This is not a cardiac-cell or volume-conductor solver. Six limb leads contain two independent signals; V1–V6 require additional chest measurements and are not synthesized here. Clinical source recordings remain separate below.

Source comparison

Paired 12-lead recordings

The original waveform images and transcribed device values are paired below. Measurements made above retain their own image coordinates, calibration, and source identity.

CASE ASP-001Paired 12-lead source recording

Self-contributed · de-identified derivative · waveform pixels preserved

RECORDING A12 leads + long lead II
De-identified first 12-lead ECG source recording with a long lead II rhythm strip
RECORDING B12 leads + long lead II
De-identified second 12-lead ECG source recording with a long lead II rhythm strip
RecordingRatePRQRSQT / QTcP / QRS / T axes
A82 bpm149 ms83 ms357 / 396 ms-3° / 39° / 53°
B81 bpm155 ms80 ms357 / 394 ms12° / 40° / 55°
MACHINE-DERIVED · UNCONFIRMED

The values above are transcribed from the device report. They are comparison inputs, not adjudicated measurements or diagnostic truth.

ReasonOS 0.3.0 · Vector EKG 0.5.0 + laboratory extension

What ReasonOS can establish

The source-connected example tests a bounded QRS-duration statement. It preserves the pixels and assumptions behind a finding and rejects the unsupported jump from a short QRS to a normal ECG.

QuestionEvidence in this implementation
Can a reviewer reproduce the calculation?Source identity, ruler, raw endpoints, placement bound, and accepted or rejected events are retained and replayed.
Are the boundaries clinically correct?They are learner-selected. Reproducible arithmetic does not adjudicate an onset, a baseline, or an interpretation.
Does the rule establish a normal ECG?No. The connected workflow implements a duration-only rule. Rhythm, morphology, ST–T findings and clinical context require their own evidence.
Does this improve clinical care?Not yet measured. The next test is a comparative clinician-reader study of accuracy, omissions, time, confidence and review burden.

Read the concrete capability assessment and evaluation protocol. It distinguishes software tests from clinical benefit and specifies the evidence needed to evaluate usefulness.

How the evidence engine records its decisions
INPUTState NObserved evidence
ATTEMPTTransformationActor + provenance
EVALUATEConstraintsPure predicates
ADMITState N+1New immutable state
REJECTNo new stateAttempt remains visible
TRACEAccepted and rejected events retained.
Both outcomes enter the trace. Only an admitted transformation adds a state.
Kernel objects and the ECG plugin boundary
KERNELDomain-independentIndependent of ECG vocabulary
01

State

What currently exists

02

Transformation

An attempted change

03

Constraint

A rule that admits or rejects

04

Trace

The append-only record

05

Provenance

Source, method, and lineage

06

Actor

Who or what made the change

REASONOS KERNEL / 0.3.0

Structure

  • Immutable states
  • Attempted transformations
  • Constraint results
  • Replayable traces
  • Actor and provenance
typed plugin contractversioned · deterministic

VECTOR EKG / 0.5.0 + laboratory extension

ECG calculations

  • Leads and coordinates
  • Calibration
  • Intervals and axis
  • Candidate pathways
  • ECG constraints
The kernel evaluates structural validity. The plugin owns ECG vocabulary and domain rules.

Snapshots and their nested records are frozen. Input states must exist and precede their output; revision targets must be named inputs. Actor and witness types are checked. The example has no expert-authored observations or attention-tracking channel.

Replay guarantees and evidence vocabulary

The supplied kernel verifies a SHA-256 event chain. Replay reruns the transformation rules and ECG plugin and compares the resulting event, identifiers, constraints, and state with the recorded event. The ECG plugin recomputes its verdict from recorded inputs. Medical observations still require independent review; the hash chain is not an authenticated signature or clinical validation.

Observed

Directly marked or measured from the source.

Inferred

Derived from admitted observations under an explicit rule.

Contradicted

Conflicts with another admitted finding.

Unresolved

Available evidence remains insufficient or discordant.

Excluded

A candidate explanation fails a required criterion.

Confirmed

A defined review process supports the claim. Not used diagnostically here.

The executable duration rule requires calibration for the current source, an admitted QRS measurement, ordered endpoints, and an uncertainty interval entirely below the stated cutoff. A source change invalidates reuse for the new source; it never rewrites the old record.

Scientific model

Definitions and approximations

Recorded-image measurements and report-derived calculations retain their source inputs. The expandable vector lesson uses a separate mathematical model of lead geometry.

Source

The primary workspace uses the contributed ECG photographs and values transcribed from their printed device reports. Calipers operate on the unchanged waveform pixels. The separate vector lesson generates its own P, QRS, and T components.

Geometry

The six limb leads use two scaled frontal signal coordinates and fixed lead fields. A real torso is neither an equilateral triangle nor a uniform conductor. Chest leads require additional measurements.

Measurement

Image calipers retain source-pixel coordinates. A local grid ruler supplies paper direction and pixels per millimetre. The recorded endpoint bound propagates through both interval placement and grid calibration. The model lesson uses its own declared SVG scale.

Inference

The domain rule evaluates a duration statement against recorded evidence. Path overlap is a weighted set comparison, not a diagnostic probability or an expert consensus score.

The browser kernel (0.3.0) and ECG plugin (0.5.0) are carried forward from the supplied ReasonOS master source. The laboratory adds the synchronized signal model, calibrated measurement display, and a bounded-duration rule. Source checksums and adaptations

AHA/ACCF/HRS · ECG technology (2007)

Acquisition, calibration, signal fidelity, and measurement definitions. Model fiducials here are prescribed rather than detected from a clinical recording.

Scope and clinical-use status

This is educational research software with synthetic calculations and an independently contributed source case. Clinical validity, learning benefit, regulatory clearance, and authorization for patient care have not been established. The source images, simulated signals, learner observations, and application calculations retain distinct provenance.

Documented research record