# Geometry–resonance benchmark

**Status: reproducible synthetic demonstration. No new empirical result.**

This package checks the ideal one-dimensional cavity relation `f_n = n v / (2 L)`. It is a local benchmark relevant to H01, not a test that geometry is ontologically prior to matter or energy. The numerical calculation requires only Python 3.9 or later. No apparatus is needed to run it. An empirical extension needs an existing resonance dataset or a suitably reviewed laboratory study, with boundary conditions, dimensions, mode identity, propagation-speed information, calibration and environmental conditions recorded.

## Run

```sh
python analysis.py
python analysis.py my-measurements.csv
python analysis.py --generate-demo
```

The default command analyzes the supplied CSV and prints actual computed metrics. The second analyzes your own file. The third deterministically recreates the demonstration and analyzes it.

## Demonstration and columns

Twelve independent synthetic readings use true lengths from 0.15 to 1.05 m, mode n=1 and generating speed 343.2 m/s. Length observations receive independent Gaussian noise with standard deviation 0.00012 m; frequency observations receive independent Gaussian noise with standard deviation 0.35 Hz. The generator is in `analysis.py`, with seed 20261018. These numbers demonstrate a calculation; they are not asserted as a real instrument specification.

Required columns are `dataset_kind`, unique `sample_id`, `length_m`, positive integer `mode`, `frequency_hz`, `sigma_frequency_hz` and `sigma_length_m`. Standard uncertainties must be nonnegative, and frequency uncertainty strictly positive. Input frequencies and lengths must be positive and finite. At least four observations and three distinct n/(2L) values are required. Real uncertainties require calibration evidence and a measurement model.

## Analysis and assumptions

The independent coordinate is x=n/(2L), so a zero-intercept weighted fit of frequency against x estimates propagation speed. For n=1 this is equivalently frequency against inverse length, with slope v/2. Twenty effective-variance iterations account approximately for small independent length and frequency errors using `sigma_f² + [n v sigma_L/(2 L²)]²`. This is an approximate small-error treatment, not a complete errors-in-variables likelihood. Conditional uncertainty of fitted v comes from the supplied variances and design.

The script reports fitted speed, conditional standard uncertainty, unweighted frequency RMSE, reduced chi-squared and maximum standardized residual. An additional free-intercept regression is a diagnostic for offset-like misspecification, not a selected alternative physical theory. The fixed reference speed is known from the generator; for empirical use it must be replaced through a documented protocol with an independently justified reference and uncertainty.

Expected demonstration values are approximately v=343.131286 m/s, standard uncertainty 0.092128 m/s, frequency RMSE 0.425232 Hz and reduced chi-squared 1.245344. Reproduction checks the calculation. It does not discover these values in nature.

## Proposed empirical protocol

Define cavity boundary conditions, mode assignment and a range with resolvable predicted shifts before inspecting the decisive measurements. Independently characterize propagation speed and length. Randomize acquisition order and repeat independent runs so drift can be separated from the geometry change. Store environmental conditions and the full acquisition record. Predict new lengths or modes after calibration, rather than fitting and judging the same observations exclusively.

A useful local result is a predicted mode shift consistent with the conventional model and the complete uncertainty budget. A proposed anomaly needs a prespecified residual dependence, independent replication and comparisons with boundary corrections, damping, dispersion, temperature, geometry error and instrument drift. The present code excludes these effects. A poor fit therefore identifies inadequacy of this simple measurement model; it does not identify new physics.

## Source connections

- `methods-method-kac`: spectral geometry background, DOI 10.2307/2313748.
- `geometry-g-buckingham`: dimensional similarity, DOI 10.1103/PhysRev.4.345.
- `methods-method-uncertainty`: NIST uncertainty guidance, DOI 10.6028/NIST.tn.1297.

These references support the background and method. The package and its protocol are project proposals, not work endorsed by the cited authors.

## Files and provenance

- `analysis.py`: Python 3 standard library only. No network calls or optional packages.
- `synthetic-demo.csv`: generated demonstration, never an experimental observation.
- `blank-measurements.csv`: header-only schema; intentionally contains no data.
- `preregistration-template.json`: editable planning record, not an independently timestamped registration.
- `expected-results.json`: output captured by actually running the bundled demonstration.

Run from any directory using the path to `analysis.py`. An optional CSV argument selects another dataset. The script prints JSON and leaves the input unchanged. `--generate-demo` regenerates the bundled synthetic CSV using a fixed seed; use a copy if you need to preserve a modified demonstration.

The `dataset_kind` field must describe the real provenance of every row. Use `synthetic_demo` for the supplied example. Set `measured` only for observations actually collected and documented. Mixed labels are reported, not silently treated as an experiment. Copy the blank schema before entering observations; never relabel the supplied synthetic values as measurements.

Expected numerical outputs are a software benchmark, not an empirical success criterion. Small last-digit differences across Python implementations can be compared with an absolute tolerance of 1e-7. No script makes a claim about universal memory, a parent universe, new propulsion or a unified theory.
