A burst of readings can shift a voltage average
Reader contents and reproduction instructions

This is a complete offline experiment with synthetic records constructed from a declared held command. No sensor, physical voltage source, circuit or microcontroller was used. Host tests check the supplied numerical code, not a physical waveform, instrument or clock. Target compilation/execution and native publication are unperformed.

Open preview.html for the styled standalone article with a local category-menu example. Hypertext Markup Language (HTML) is the page format; article.css controls appearance. article.html contains the article body alone, including the entire program. All teaching files are local after extraction. External links lead to official references or existing Tricky Circuit pages.

Requirements: Python 3.9 or later, standard library only. The delivered host tests used Python 3.9.6. No additional Python package or network access is needed to run the numerical exercise.

From this extracted directory:
  python3 -m unittest discover -s code -p 'test_*.py'
  python3 code/time_average.py summary data/synthetic-sparse.csv --method hold --max-gap-s 10
  python3 code/time_average.py summary data/synthetic-burst.csv --method hold --max-gap-s 10
  python3 code/time_average.py summary data/synthetic-sparse.csv --method linear --max-gap-s 10
  python3 code/time_average.py summary data/synthetic-regular.csv --method hold --max-gap-s 0.11

To regenerate all three synthetic records in a NEW directory:
  python3 code/time_average.py demo new-demo-directory
An existing directory is refused. Demo files do not contain physical measurements.

To write a fresh interval audit while analyzing a record:
  python3 code/time_average.py summary data/synthetic-sparse.csv --method hold --max-gap-s 10 --audit-out new-audit.csv
The audit file must not already exist. Every interval lists its duration, endpoints, model mean and volt-second area. No rows are sorted, skipped, filled or extrapolated. Invalid records fail before a new audit is created.

For your own files use the exact comma-separated values (CSV) header:
  t_s,voltage_v
Use seconds and volts, with at least two finite rows and strictly increasing timestamps. The first timestamp may be zero; a nonpositive interval is refused. Choose hold or linear explicitly. Hold applies row i to [t_i,t_(i+1)), and the last row adds no subsequent duration. Linear joins adjacent pairs with straight segments. The recorded window runs only from the first to last timestamp. Both modes require an explicit positive finite max-gap-s. A gap limit is a rejection policy and gives no hidden-signal error guarantee. The ordinary row mean includes every endpoint row; the duration mean uses interval weights.

The scaled mean and summed interval areas use floating-point arithmetic. Detected range failures are refused, including the supplied peer-regression underflow cases; exact decimal or arbitrary-precision behavior is not promised. The volt-second integral is not energy. Read the full article before interpreting an unknown sensor record as a known held command.

data/synthetic-comparison.json gives calculated results for both models. data/record-review-blank.csv is a blank worksheet for your own assumptions/results; it is not a measurement log. code/test_time_average.py contains 27 behavior tests; evidence/host-tests.txt and host-verification.json record their actual host run. A deliberately broken duration-weight calculation is rejected by the supplied suite; its clean summary is included, while raw failure tracebacks remain external project evidence.

assets/ contains two original editable Scalable Vector Graphics (SVG) figures and their full-size Portable Network Graphics (PNG) renderings. research/build_figures.py regenerates the SVGs using only the standard library and supplied synthetic CSVs. The delivered PNGs are ready to view. A compatible SVG renderer can export changed diagrams; font/renderer differences can change raster pixels without changing the graph's geometry.

source-index.json lists the owned teaching files and primary links. NIST weighted-mean and quadrature documents and official Python interfaces were checked. Raw primary PDF/web snapshots are retained outside this public reader as research evidence; they are linked rather than redistributed. No owner workstation paths, credentials, raw third-party documents, native post IDs or affiliate links are included. Independent technical/root layout acceptance, registry counts and any later native delivery are separate project records, not author self-acceptance.
