# Felisyn configuration and analysis verification

Completed 12 October 2026, Europe/Vienna. This package supports journal notes [09](https://www.felisyn.com/journal/matching-the-recording-configuration) and [10](https://www.felisyn.com/journal/checking-the-analysis-on-saved-data).

Two work packages are complete: comparison of the archived model configuration with the released parameter trees, and numerical agreement of independent analysis helpers with the original calculation on a retained small-model datastore. No new neural simulation or full-model benchmark was executed.

## Results and interpretation

- All four archived cortical recorder definitions match the general `param` configuration; none matches `param_spont`.
- The full parameter comparison has 25 structural difference records against `param` and 47 against `param_spont`. These are path-level comparison records, not counts of biological changes.
- Twelve added `self_connections: true` fields require historical default/compatibility investigation. Other records concern empty stimulator dictionaries, distribution wrappers and storage fields. Delay ranges remain numerically unchanged.
- The pinned Mozaik controller uses PyNN seed 5 and its default Mozaik seed 513 for these parameters. The parameter named `mpi_seed: 1023` is not consumed by that controller. This finding does not recover the original runtime revision.
- NoStimulation stimulus trial is hard-coded to 0 independently of run-level trial. The inspected model's run-level trial declaration does not set seeds.
- Forty-eight finite mean/SD comparisons passed with `atol=1e-10`, `rtol=1e-12`; maximum absolute difference was 7.105427357601002e-15. These tolerances address numerical analysis only.
- Four 105 ms spontaneous segments contributed 266 recorded spike trains, 12,788 unique eligible within-population pairs and 30 analog neurons per variable. All recorded cells met the >=7-spike rule; no pair was undefined. Pairs are not independent replicates.
- Analog sampling is 1 ms, 105 samples per neuron, from 0 through 104 ms. Conductance is converted from µS to nS; voltage retains its sign.
- The original 105 ms histogram has ten 10.5 ms bins at nominal width 10 ms. All eight retained cortical 210 ms grating controls have 21 bins of exactly 10 ms. The new explicit `upstream_range` option mirrors the original; strict divisibility remains the default.
- All twelve synthetic helper tests passed. Original datastore file hashes were unchanged by analysis.

This is software verification on one short fixture. It does not establish independent biological validity, reproduction of the full published network, or a functioning controller. Original raw Figure 4 arrays, exact SDs and counts remain unrecovered. The previously documented 4.09-versus-3.56 nS source discrepancy remains unresolved.

## Source identities and rights

1. Antolík et al. (2024), *A comprehensive data-driven model of cat primary visual cortex*, PLOS Computational Biology 20(8), e1012342. DOI: https://doi.org/10.1371/journal.pcbi.1012342. Article published under CC BY. The three new diagrams are original renderings of configuration and method facts, not copied paper figures or animal recordings.
2. LSV1M v1.0: `04bf11b72ff5f78e66f28e037016e8e33b09c12e`, https://github.com/CSNG-MFF/mozaik-models/tree/04bf11b72ff5f78e66f28e037016e8e33b09c12e/LSV1M. Retained files in `sources/lsv1m`; repository MIT license in that directory.
3. Mozaik v0.4.0: `f5c09a0eccc5786daf78881d883bbce586a00e6d`, https://github.com/antolikjan/mozaik/tree/f5c09a0eccc5786daf78881d883bbce586a00e6d. Selected original source files and CeCILL 2.0 license in `sources/`.
4. Author archive: run `6723d916744974749499b1a6`, https://v1model.arkheia.org/6723d916744974749499b1a6/parameters. Public API base `https://v1model.arkheia.org:8028`, discovered in its public frontend. Only GET requests were used. Creation field: 22 March 2024; submission field: 31 October 2024. Retained metadata are attributed to the authors; no new license is asserted for the archive.
5. Actual small-model run: `20261007T235207Z-8aa25b84`, reported 8 October in Vienna. Original [execution package](https://www.felisyn.com/research/execution-003/execution-evidence.zip), [manifest](https://www.felisyn.com/research/execution-003/manifest.json), [environment](https://www.felisyn.com/research/execution-003/evidence/runtime/environment.json) and [reproduction instructions](https://www.felisyn.com/research/execution-003/README.md). The existing compatible environment was reused without package changes.

`sources/retrieval-public.json` records retrieval URLs, times, response identities and saved hashes. `/simulation_runs` returned multiple runs: only the selected run is distributed here, extracted and reserialized as `archive-run.json`. The response hash identifies the full retrieved response; the saved hash identifies the selected JSON. Associated collections retain their selected-run responses. Metadata lists are not a complete timestamped execution history. Four protocols are listed, including size tuning absent from the release's general `create_experiments` function.

## Reproduce the structural comparison

The package already includes both resolved trees. With Python 3:

```sh
python compare_parameters.py
```

To regenerate the resolved trees, use the pinned compatible Mozaik environment. In a disposable working directory, copy `sources/lsv1m` to a subdirectory named `model`, then run:

```sh
python resolve_parameters.py --root /absolute/path/to/disposable-directory
```

This loads parameters through Mozaik, including references and distribution objects, and serializes `.to_dict()`. It does not construct the network. Copy its two `resolved-*.json` outputs to `sources/` before comparison. Dictionary keys are compared recursively; Python numeric equality treats equal int/float values as equal, and matching JSON sequences compare elementwise. Missing fields are distinguished from present values. No claim is made that schema equality alone proves equal simulator behavior.

`fetch_archive.py` can refetch the selected public metadata; it writes a new `retrieval-reproduced.json` so the original retrieval receipt is retained. For a provenance-preserving repeat, run it in a copy of this package. The external archive can change independently.

## Replay the portable recordings

Requires Python and NumPy. The export is gzip-compressed JSON containing the actual selected spike times and analog arrays with IDs, units and timing metadata:

```sh
python replay_export.py
```

This recomputes the independent helpers and compares them with the saved upstream numbers. It does not rerun Mozaik. The local replay result is retained in `checks/portable-replay.json`.

## Repeat the original two-path analysis

Use the compatible environment and original datastore from execution-003. Inspect the source hashes before loading simulator-specific pickle files. Invoke the pinned Mozaik checkout and the retained LSV1M source:

```sh
python -m unittest -v test_metrics.py
python validate_datastore.py \
  --framework /absolute/path/to/pinned/mozaik \
  --datastore /absolute/path/to/original/datastore \
  --figure-source sources/lsv1m/visualization_functions.py \
  --output /absolute/path/to/new-analysis-output
```

The harness calls `TestModel.load_datastore`, never `setup_class`, which would run the simulation. It does not call `save`. It computes required upstream firing-rate, analog, PSTH, correlation and population analyses in memory, refreshing snapshot views after adding results. It extracts the unchanged numerical statements of `SpontStatisticsOverview.subplot` through line 549 with Python AST, appending only a return of locals. It does not run the complete publication analysis/plot pipeline.

Recorded spike IDs must agree with raw spike-train ordering and correlation-matrix IDs. Windows, analog sample timing and units are checked before summarization. The receipt records the source-file hash, all original datastore file hashes, finite-value flags, both outputs, differences, counts and bin widths. Each metric's mean and SD uses the original population convention (`ddof=0`). The original undefined-correlation-to-zero convention is retained and its affected-pair count is reported.

The pinned environment used Python 3.9.20 and NumPy as reported in `checks/analysis-parity.json`. The earlier environment package contains the full dependency lock and source revisions. Existing packages were reused. The 12-test log in this package is from that Linux environment.

## Attempts and changes

1. `analysis-attempt-01.log`: test-loader import failed because the framework root was missing from the import path. No numerical comparison completed.
2. `analysis-attempt-02.log`: reference analysis lookup failed because a datastore view had a stale analysis-result list. No successful agreement claim was made.
3. `analysis-attempt-03.log`: corrected view refreshes; all 48 finite comparisons passed. The retained original data were unchanged.

`metrics.py` is a new version of the helper from benchmark-004. The older version remains preserved there. This version adds explicit full-range binning, reports nominal and effective widths, and names the output `pairwise_correlation` rather than claiming every bin is exactly 10 ms. Synthetic edge tests cover cases absent from this active recording fixture.

## Diagrams and integrity

Run `python draw_diagrams.py` with NumPy and Matplotlib. PNG outputs are 1920 × 1200; SVG versions are also supplied. The script reads `recording-comparison.json` and `checks/analysis-parity.json`. Grid dots are sample locations, time rectangles are bin intervals, and the pathway diagram describes the verified computation. None is generated microscopy or invented activity.

`manifest.json` lists SHA-256 and byte count for every distributed evidence file except the manifest and ZIP themselves. `validation-evidence.zip` contains the listed files plus the manifest. Publication receipts and X draft materials are separate from the research evidence manifest. Source licenses remain attached; Felisyn does not claim authorship of the underlying model or framework.

## Candidate next full-model run

Use `run_spont.py` with `param/defaults`, run trial 0, 16 MPI ranks, one thread per rank, and the full 40,320 ms protocol as a declared reconstruction candidate. First resolve or explicitly declare historical self-connection/default choices, freeze the environment and measurement contract, preserve the source discrepancy, and determine whether a quantitative claim is supportable from available reference data. This recipe is not certified as the exact historical run and has not been executed. Larger compute and any eventual token operation are outside this package.
