# GAL-FINGERPRINT-I — Galaxy Structural Identity and Stability Audit

**Protocol status:** ACCEPTED AND REGISTERED  
**Project:** `UNNS_GALAXY_STRUCTURAL_FINGERPRINTS_v0_1`  
**Protocol version:** `0.1`  
**Prepared:** 2026-07-26  
**Accepted:** 2026-07-26  
**Primary chamber:** STRUC-I v1.0.4  
**Primary sample:** frozen SPARC primary sample of 121 galaxies

---

## Registration record

This protocol was explicitly accepted on **2026-07-26**. Its scientific question, frozen primary sample, primary distance, perturbation definitions, stop rules, and verdict thresholds are registered and may not be altered in response to observed outcomes. Engineering corrections remain limited to making the accepted procedure executable without changing its scientific content.

## 1. Registered question

> Do complete STRUC-I response curves define reproducible galaxy identities under native chamber repetition, single-radius deletion, matched point-count thinning, matched radial-coverage truncation, and declared baryonic-preparation changes?

The audit tests the complete fingerprint

\[
\mathcal F_G(\kappa)
=
[\rho_G(\kappa), A_{\kappa,G}(\kappa), \nu_G(\kappa)].
\]

The primary confirmatory representation is the complete \(\rho_G(\kappa)\) curve. The combined three-channel representation and PCA-score representation are frozen sensitivity analyses.

A positive result in this protocol supports a **reproducible, sampling-robust structural fingerprint under the tested controls**. It does not establish a fully intrinsic physical property because the current source package does not provide a defensible uncertainty model for the baryonic component curves.

---

## 2. Existing-asset audit

### 2.1 Authoritative sample and hashes

The primary sample remains exactly the 121 names in:

```
inputs/sample_lists/primary_121.txt
```

Selection rule:

```
SPARC quality flag Q ≤ 2
and at least 10 valid observed radial points
```

Frozen hashes:

```
primary_121.txt
SHA256 a2cff5356218021afe284f90926623fbcd6329e7b830b3cdea6c4bc41ec56b64

struc_i_primary_121_profiles.csv
SHA256 80e787c266c2442ab28a57dfc9b2a754b200e4059229e1664660e0cf69121133

repeat_01/struc_I.zip
SHA256 c533cafdea26e8338ffb4db4e64cca429c42b77ae7be63e5f6fad00db9642972
```

No galaxy may be added to or removed from the primary analysis after protocol acceptance.

### 2.2 Status of `repeat_01`

`outputs/exports/struc_i/repeat_01/` is accepted as a genuine STRUC-I multi-batch run and becomes **repeat R1**.

Audit findings:

- all 121 frozen primary galaxies are present;
- every primary galaxy has a complete 40-point κ curve;
- the R1 primary curves exactly reproduce the current 4,840-row consolidated profile table after canonical κ alignment;
- one JSON/CSV batch pair, files `(6)` and `(7)`, is byte-identical and must be treated as one batch, not two runs;
- `NGC4085` appears twice inside one export, but it is not in the primary 121-galaxy sample and does not affect the primary audit.

The duplicate files must remain preserved as direct chamber exports. Deduplication occurs only in the audit manifest through SHA256 identity.

### 2.3 Canonical source locations

Direct chamber output exports remain under:

```
outputs/exports/struc_i/
outputs/exports/struc_perc_i/
```

They must not be called raw data.

The legacy `runs/raw/` copies are read-only historical package assets and are not valid ingestion sources for GAL-FINGERPRINT-I.

### 2.4 Reproducibility limitations found in the package

Two engineering issues must be repaired only after this protocol is accepted:

1. `tests/validate_package.py` completes its checks but fails while serializing a NumPy/Pandas boolean under the current Python environment.
2. The included `analysis/curve_atlas/scripts/build_curve_atlas.py` does not reproduce every atlas artifact currently present in the output folders.

Neither issue invalidates the existing chamber exports or consolidated primary curves. The registered audit must nevertheless have a complete, self-contained reconstruction path for its own derived products.

---

## 3. Scope

### Included

- unchanged-ladder STRUC-I repetition;
- single-radius deletion;
- point-count matching;
- radial-coverage matching at fixed point count;
- disk and bulge mass-to-light sensitivity;
- source-identification tests;
- within-versus-between distances;
- geometry-matched impostor tests;
- gap-order and uniform-range null ladders;
- repeat-coordinate ICC and neighbour stability.

### Excluded from v1

- STRUC-PERC-I reruns;
- physical naming of clusters or response modes;
- causal astrophysical interpretation;
- interpolation or extrapolation;
- unsigned replacement of the signed gas term;
- perturbation of baryonic component velocities using `e_Vobs`;
- invented covariance matrices;
- selection of favourable subgroups after results are known.

STRUC-PERC-I remains a separate descriptive connectivity product and is not part of the primary identity gate.

---

## 4. Frozen STRUC-I execution settings

Every registered STRUC-I execution uses the existing instrument unchanged:

```
Instrument                 STRUC-I v1.0.4
κ minimum                  0.01
κ maximum                  1.0
κ steps                    40, logarithmically spaced
Monte Carlo runs           2000 per κ point
Perturbation               δᵢ ~ Uniform[-ε, ε]
Scale                      ε = κ × median(positive adjacent gaps)
Maximum ladder length      2000
Input ordering             numerical ascending
Interpolation              forbidden
Extrapolation              forbidden
```

The canonical κ grid is aligned by ordered position after validating the exported values against the expected 40-point grid. CSV rounding must not create a false mismatch with the higher-precision JSON grid.

Both JSON and CSV exports are mandatory for every chamber batch.

---

## 5. Randomness and seed policy

### 5.1 Native chamber randomness

STRUC-I v1.0.4 uses the browser-native `Math.random()` generator and exposes no seed control.

Therefore:

```
CHAMBER_SEED_POLICY = NATIVE_UNSEEDED_BROWSER_RNG
```

No fictitious chamber seed may be assigned. Independence is represented by repeat ID, chamber timestamp, input hashes, export hashes, and separate chamber executions.

Five unchanged-ladder passes are frozen:

```
R1  existing repeat_01
R2  repeat_02
R3  repeat_03
R4  repeat_04
R5  repeat_05
```

R2–R5 must each contain exactly one valid complete profile for every primary galaxy after exact-file deduplication.

### 5.2 Controlled generation seeds

Generated ladder variants use NumPy `Generator(PCG64)` with these fixed seeds:

```
Random stratified thinning   91001, 91002, 91003
Gap-order nulls              92001, 92002, 92003, 92004, 92005
Uniform-range nulls          93001, 93002, 93003, 93004, 93005
Label permutations           94001
Cluster bootstrap            95001
```

Deterministic branches have no seed.

---

## 6. Reference fingerprints

After R1–R5 are complete, the reference fingerprint for galaxy \(G\) is the coordinate-wise mean of its five repeat curves.

For repeat-validation itself, leakage is prevented by leave-one-repeat-out evaluation:

\[
\bar{\mathcal F}^{(-r)}_G
=
\frac{1}{4}
\sum_{s\neq r}\mathcal F^{(s)}_G.
\]

Repeat \(r\) is queried against the 121 reference centroids formed from the other four repeats.

Because R1 existed before protocol registration, a separate prospective sensitivity report must also query R2–R5 against the fixed R1 gallery.

---

## 7. Primary curve representation and distance

### 7.1 Primary representation

The primary representation is the complete 40-point \(\rho(\kappa)\) curve.

For each κ coordinate \(j\), reference centroids are standardized across the 121 galaxies:

\[
z_{G,j}
=
\frac{\rho_{G,j}-\mu_j}{\max(\sigma_j,10^{-6})}.
\]

The normalization parameters are fitted only from the appropriate reference gallery and then held fixed for its queries.

### 7.2 Primary distance

The primary distance is equal-log-κ root-mean-square Euclidean distance:

\[
D_\rho(G,H)
=
\sqrt{
\frac{1}{40}
\sum_{j=1}^{40}
(z_{G,j}-z_{H,j})^2
}.
\]

The κ grid is logarithmic, so equal coordinate weighting is equal weighting over sampled log κ.

This metric may not be replaced after outcomes are viewed.

### 7.3 Frozen sensitivity distances

**Combined curve distance**

```
channel 1   ρ
channel 2   1 − Aκ
channel 3   νnorm = ν / ceil((n − 1)/2)
```

Each channel is standardized per κ against the reference gallery. The combined distance is the square root of the mean of the three channel-specific mean squared distances, giving equal total weight to each channel.

**PCA-score distance**

- fit PCA only on standardized reference-gallery ρ curves;
- retain exactly the first three PCs;
- project all query curves without refitting;
- use Euclidean distance in the three score coordinates.

The three-PC choice is frozen before the registered run and is not altered according to later explained variance.

---

## 8. Perturbation branches

## 8.1 Branch R — native repeat stability

Population:

```
121 galaxies × 5 repeat passes
```

R1 exists. R2–R5 remain to be generated after acceptance.

Purpose: estimate native STRUC-I Monte Carlo variation and establish whether the instrument can reproduce source identity before any observational or sampling branch is interpreted.

---

## 8.2 Branch L — single-radius deletion

Radial positions are ordered by observed radius before deletion. The ladder is then rebuilt from the remaining prepared baryonic values using the frozen sort-unique rule.

Rules:

```
n ≤ 12   delete every radius once
n > 12   delete five fixed radial-rank positions
```

For \(n>12\), the deleted 1-based ranks are:

\[
1+\operatorname{round}(q(n-1)),
\qquad
q\in\{0,0.25,0.50,0.75,1.00\}.
\]

Duplicate rank selections, if any, are collapsed before execution.

Frozen expected count from the current primary sample:

```
782 deletion realizations
```

Purpose: measure sensitivity to individual observed measurements, with exhaustive testing concentrated in the sparsest profiles.

---

## 8.3 Branch T — matched point-count thinning

### Primary deterministic thinning

Every primary galaxy is reduced to exactly 10 observed radial positions.

The selected 1-based radial ranks are:

\[
1+\operatorname{round}\left(\frac{j(n-1)}{9}\right),
\qquad j=0,\ldots,9.
\]

This keeps both radial endpoints and spreads the retained measurements across the complete observed radial range.

### Random stratified sensitivity

Three additional n=10 realizations are generated with seeds 91001–91003:

- retain the first and last radial points;
- divide the interior radial ranks into eight contiguous strata;
- select one point uniformly from each non-empty stratum;
- for n=10, the realization is necessarily identical to the original profile.

Purpose: separate source identity from ladder length while retaining full radial coverage.

Frozen maximum count:

```
121 deterministic realizations
363 random sensitivity realizations
```

---

## 8.4 Branch C — matched radial coverage at fixed count

All primary galaxies have at least eight valid observed points at:

\[
R/R_{\max}\le 0.85.
\]

For each galaxy, construct a paired n=8 comparison:

1. **FULL8** — eight evenly spaced radial ranks over the full observed radial range;
2. **INNER85_8** — eight evenly spaced radial ranks among points satisfying \(R/R_{\max}\le0.85\).

Both ladders have the same point count. The principal contrast is therefore the removal of the outermost radial coverage, not unequal n.

Frozen count:

```
242 realizations
```

---

## 8.5 Branch M — baryonic-preparation sensitivity

The signed gas contribution is unchanged.

The baseline remains:

```
Υdisk = 0.5
Υbulge = 0.7
```

Registered one-factor variants:

```
D_LOW     Υdisk = 0.4, Υbulge = 0.7
D_HIGH    Υdisk = 0.6, Υbulge = 0.7
B_LOW     Υdisk = 0.5, Υbulge = 0.6
B_HIGH    Υdisk = 0.5, Υbulge = 0.8
```

Disk variants apply to all 121 galaxies.

Bulge variants apply only to galaxies with a non-zero bulge component. The current primary sample contains 30 such galaxies. Duplicate no-bulge realizations must not be generated.

Frozen count:

```
242 disk variants
60 bulge variants
302 total realizations
```

---

## 8.6 Branch U — observational uncertainty status

A full observational-uncertainty Monte Carlo is **not identifiable from the current package**.

Reasons:

- `e_Vobs` is an uncertainty on observed circular velocity, not on `Vgas`, `Vdisk`, or `Vbulge`;
- the fingerprint ladder is constructed from the baryonic component model, not from `Vobs`;
- distance, inclination, and luminosity uncertainties are present at catalogue level, but the package does not specify a valid transformation and covariance model for propagating them into every radial baryonic component.

Therefore no random error may be injected into the baryonic ladder under the label “observational uncertainty.”

Protocol qualifier:

```
OBSERVATIONAL_UNCERTAINTY_NOT_TESTED
```

A later extension requires either component-level uncertainties or a separately justified physical propagation model.

---

## 9. Null models and ordinary controls

## 9.1 Label-permutation null

Source labels are permuted 10,000 times with seed 94001. The complete retrieval procedure is repeated without changing distances.

Purpose: establish the chance distribution of top-1, top-5, and rank statistics.

## 9.2 Gap-order null

For each galaxy and each of five seeds:

- compute the exact positive adjacent-gap sequence;
- randomly permute the gaps;
- reconstruct the ladder from the original minimum;
- preserve n, minimum, maximum, total range, and the complete gap multiset.

Purpose: test whether source retrieval persists after destroying the observed order of local gap sizes while retaining elementary gap statistics.

Frozen count:

```
605 null ladders
```

## 9.3 Uniform-range null

For each galaxy and each of five seeds:

- preserve n, minimum, and maximum;
- keep the two endpoints;
- draw and sort n−2 interior values uniformly over the original range.

Purpose: test identity attributable only to n and total range.

Frozen count:

```
605 null ladders
```

## 9.4 Geometry-matched impostors

For each source galaxy, define ten impostor galaxies using Euclidean distance in a standardized ordinary-control space fitted on the 121 reference profiles:

```
log ladder size
profile range
median gap
gap IQR
gap variance
log radial span
median normalized radial gap
normalized radial-gap variance
```

The matched retrieval test uses the true source plus these ten impostors. Match construction uses no chamber outcome coordinates.

---

## 10. Required measurements

Every branch reports:

```
own-source distance
nearest-wrong-source distance
own / nearest-wrong distance ratio
source rank
strict top-1 accuracy
top-5 accuracy
pairwise within/between distance ratio
geometry-matched top-1 accuracy
geometry-matched top-5 accuracy
distance margin to nearest wrong source
```

A strict top-1 success requires the true source to be the unique minimum-distance reference. Ties containing the true source are reported separately and do not count as strict top-1 successes.

Additional measurements:

- ICC(2,1), absolute agreement, for the first three reference-fitted ρ PCs across R1–R5;
- top-5 nearest-neighbour Jaccard stability across repeats;
- top-5 neighbour stability under each perturbation branch;
- cluster-bootstrap 95% confidence intervals resampled by galaxy;
- observed-minus-null retrieval differences;
- branch failure rates and invalid execution counts.

---

## 11. Bounded verdict system

A final verdict is assigned hierarchically.

### 11.1 Execution gate

A branch is valid only when:

- every expected galaxy/realization is accounted for;
- each profile has exactly 40 ordered κ points;
- instrument version and settings match the protocol;
- input and export hashes are recorded;
- exact duplicate files are identified by hash;
- no duplicated primary galaxy profile remains within a repeat or realization;
- non-finite curve coordinates are absent.

Failure that cannot be repaired from preserved exports yields:

```
INVALID_EXECUTION
```

### 11.2 Instrument reproducibility gate

The repeat branch passes when all are true:

```
strict top-1 accuracy                  ≥ 0.90
top-5 accuracy                         ≥ 0.98
median own/nearest-wrong ratio         ≤ 0.67
median ICC across ρ PC1–PC3            ≥ 0.85
minimum ICC among ρ PC1–PC3            ≥ 0.70
```

If valid execution fails this gate:

```
INSTRUMENT_NOISE_DOMINATED
```

### 11.3 Primary branch pass rule

A primary perturbation branch passes when all are true:

```
strict top-1 accuracy                  ≥ 0.75
top-5 accuracy                         ≥ 0.95
median own/nearest-wrong ratio         ≤ 0.80
geometry-matched top-1 accuracy        ≥ 0.60
```

The primary branches are:

```
L   single-radius deletion
T   deterministic n=10 thinning
C   FULL8 versus INNER85_8 coverage test
M   declared M/L sensitivity
```

Random thinning is a sensitivity branch and may not replace deterministic T.

### 11.4 Final verdicts

**REPRODUCIBLE_SAMPLING_ROBUST_FINGERPRINT**

- instrument gate passes;
- all four primary branches pass;
- observed pooled top-1 accuracy exceeds each chamber-null top-1 accuracy by at least 0.20;
- the bootstrap 95% lower confidence bound for the observed-minus-null difference is above zero.

**MIXED_STRUCTURAL_AND_SAMPLING_SIGNAL**

- instrument gate passes;
- two or three primary branches pass, or all pass but the null-separation requirement fails.

**SAMPLING_DOMINATED**

- instrument gate passes;
- point-count thinning or radial-coverage control fails;
- at most one primary branch passes, or null retrieval approaches observed retrieval.

**NON_REPRODUCIBLE_UNDER_TESTED_PERTURBATIONS**

- instrument gate passes;
- source identity fails broadly across perturbations without a specific point-count/coverage explanation.

**INSTRUMENT_NOISE_DOMINATED**

- valid repeat executions fail the instrument reproducibility gate.

**INVALID_EXECUTION**

- required execution-integrity conditions are not met.

Every non-invalid verdict carries the qualifier:

```
OBSERVATIONAL_UNCERTAINTY_NOT_TESTED
```

The verdict name `INTRINSIC_STRUCTURAL_FINGERPRINT` is deliberately not available in protocol v1.

---

## 12. Sequential execution and stop rules

The audit is executed in gates to avoid unnecessary chamber work.

### Gate A — engineering pilot

Run the non-inferential pilot described in Section 13.

### Gate B — repeats

Complete R2–R5 and evaluate the instrument reproducibility gate.

If Gate B fails, stop. Do not generate sampling, preparation, or null branches.

### Gate C — primary perturbations

Run L, deterministic T, C, and M.

If none of the primary branches passes, stop and assign the bounded negative verdict.

### Gate D — sensitivity and nulls

Only after Gate C:

- run the three random thinning realizations;
- run gap-order nulls;
- run uniform-range nulls;
- complete geometry-matched and permutation analyses.

Negative results are retained. No branch is tuned until it becomes positive.

---

## 13. Engineering pilot

The pilot is excluded from all confirmatory metrics.

### 13.1 Pilot selection rule

Using only ordinary pre-chamber controls:

- divide the primary sample into three ladder-size strata;
- divide it into four profile-range strata;
- select the galaxy nearest the control-space centre of each of the 12 cells;
- break ties alphabetically.

Frozen pilot panel:

```
NGC4010
UGC00731
NGC4214
NGC3769
UGC08286
NGC4183
UGC05721
UGC02885
UGC07524
NGC5985
NGC4013
UGC03580
```

The panel spans low, middle, and high ladder sizes and all four profile-range strata. It includes both bulge-free and bulge-bearing galaxies.

### 13.2 Pilot checks

The pilot verifies:

- deterministic ladder naming;
- manifest-to-file mapping;
- six-slot chamber batching;
- JSON/CSV pairing;
- canonical κ alignment;
- n=8 and n=10 input acceptance;
- exact implementation of deletion, thinning, coverage, M/L, and null rules;
- duplicate-file detection;
- complete consolidation;
- distance and source-rank calculation;
- reproducible rerun of derived tables from preserved inputs and exports.

The pilot may change only engineering details needed to make the registered procedure executable. It may not change the primary scientific question, sample, distance, branch definitions, or verdict thresholds because of favourable or unfavourable pilot outcomes.

---

## 14. Folder destinations

After acceptance, create only this bounded structure:

```
analysis/gal_fingerprint_i/
├── protocol/
├── pilot/
└── outputs/
    ├── tables/
    ├── figures/
    └── reports/

inputs/ladders/struc_i/gal_fingerprint_i/
├── pilot/
├── deletion/
├── thinning/
├── coverage/
├── ml_sensitivity/
├── null_gap_order/
└── null_uniform_range/

outputs/exports/struc_i/
├── repeat_01/
├── repeat_02/
├── repeat_03/
├── repeat_04/
├── repeat_05/
└── gal_fingerprint_i/
    ├── pilot/
    ├── deletion/
    ├── thinning/
    ├── coverage/
    ├── ml_sensitivity/
    ├── null_gap_order/
    └── null_uniform_range/

runs/gal_fingerprint_i/
├── manifests/
└── consolidated/
```

Existing `repeat_01` remains exactly where it is. Direct chamber exports are never moved into `runs/`.

---

## 15. Required permanent products

### Manifests

```
run_manifest.csv
input_ladder_manifest.csv
export_file_manifest.csv
export_audit.csv
```

Minimum run-manifest fields:

```
protocol_version
branch
realization_id
repeat_id
galaxy_id
source_galaxy_id
generation_rule
generation_seed
n_source
n_realization
radial_coverage_min
radial_coverage_max
upsilon_disk
upsilon_bulge
input_path
input_sha256
json_export_path
json_sha256
csv_export_path
csv_sha256
chamber_timestamp
instrument_version
mc_runs
kappa_min
kappa_max
kappa_steps
execution_status
exclusion_reason
```

### Consolidated tables

```
profiles_long.csv
repeat_reference_centroids.csv
distance_results.csv
source_retrieval_results.csv
branch_summary.csv
icc_results.csv
neighbor_stability.csv
null_results.csv
invalid_execution_log.csv
```

### Final records

```
GAL_FINGERPRINT_I_RESULT_RECORD.json
GAL_FINGERPRINT_I_RESULT_RECORD.md
GAL_FINGERPRINT_I_FINAL_REPORT.md
```

No empty placeholder files are created.

---

## 16. Acceptance consequence

Acceptance of this protocol authorizes only:

1. the bounded folder additions in Section 14;
2. correction of the two identified engineering reproducibility defects;
3. construction of one tested execution/consolidation pipeline that preserves STRUC-I logic;
4. the engineering pilot;
5. registered chamber execution in the sequential order of Section 12.

It does not authorize physical interpretation, class naming, or expansion into later project phases.

---

## v0.3 project interpretation

This document contributes to the galaxy structural-fingerprint programme. Numerical, technical, protocol, or provenance content above is preserved. The canonical interpretation is that the fingerprints are reproducible, organized, and galaxy-specific; sampling, coverage, and baryonic-preparation dependence describe the transformation of fingerprint expression and do not erase the structural finding.

