# RBFL / RBFT SPARC Reproducibility Package

This package provides a reviewer-facing reproducibility entry point for the SPARC phase-diagnostic component of the RBFL/RBFT workflow.

Start here:

```text
00_START_HERE.md
```

Fast check:

```bash
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
bash run_minimal_sparc_phase_test.sh
python run_quick_check.py
```

Windows users can run:

```cmd
run_minimal_sparc_phase_test.bat
python run_quick_check.py
```

## Core no-cheat rule

The law layer is locked and is not refit per galaxy:

```text
v_f^4 = G M_b a_Theta
```

The phase detector is a measuring device. It computes:

```text
Phi(r) = V_obs^2 / V_bar^2
y(r)   = ln Phi(r)
B_y    = y_outer - y_inner
```

The main reproducibility check is whether the baryonic structural proxy `Psi_bar` correlates with radial phase drift `B_y_outer_minus_inner_lnPhi`.

## Main quickstart outputs

```text
outputs/03_phase_correlations/phase_structure_correlations.csv
figures/phase_structure_Psi_bar_vs_By.png
```

## Full workflow

```bash
bash run_all.sh
python run_quick_check.py
```

The full workflow also recreates lensing-pilot and Bullet proxy summary files. It does not include full observed Bullet convergence-map fitting, real observed arc inversion, or cosmological tests.

## Package contents

```text
00_START_HERE.md                     Plain-English entry point
QUICKSTART_FOR_REVIEWERS.md          Step-by-step run instructions
EXPECTED_RESULTS.md                  Expected headline metrics
METHOD_SUMMARY.md                    Minimal mathematical method summary
run_minimal_sparc_phase_test.sh      macOS/Linux minimal run script
run_minimal_sparc_phase_test.bat     Windows minimal run script
run_quick_check.py                   Prints reproduced headline results
scripts/                             Pipeline scripts
outputs/                             Generated and included outputs
figures/                             Generated and included figures
data/                               SPARC and curated pilot input tables
```
## Recommended one-command reviewer run

```bash
python reproduce_sparc_phase.py
```

This runs the minimal SPARC reproduction from the included raw SPARC tables and prints the headline numbers.

