# cullanhowlett/homogeneity architecture

> Architecture diagram of the GitHub repository cullanhowlett/homogeneity, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-21). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/cullanhowlett/homogeneity
- Repository: https://github.com/cullanhowlett/homogeneity

## Overview

Homogeneity is a research codebase for measuring the transition scale to large-scale homogeneity in DESI DR1 galaxies and quasars. Its main workflow computes mean scaled counts from survey data or mocks, fits correlation-dimension models to those measurements, then compares or plots inferred homogeneity scales. Separate branches generate and analyze toy distributions, test model-independent fit choices, and rescale full-shape results to matter. The graph follows README-documented capabilities and source-index references; unsampled implementations are represented by their listed script paths, without inferring unshown calls.

Main entry points: [`fit_mock_average_desilike.py`](https://github.com/cullanhowlett/homogeneity/blob/main/fit_mock_average_desilike.py) (Full-shape mean fit), [`python_routines.py`](https://github.com/cullanhowlett/homogeneity/blob/main/python_routines.py) (Data and fit routines), [`script_NERSC_data.py`](https://github.com/cullanhowlett/homogeneity/blob/main/script_NERSC_data.py) (Data counts), [`script_NERSC.py`](https://github.com/cullanhowlett/homogeneity/blob/main/script_NERSC.py) (Abacus counts)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_measurement["Measurements"]
  node_mean_data["Data counts"]
  node_mean_abacus["Abacus counts<br/>[script_NERSC.py]"]
  node_mean_ez["EZmock counts"]
end

subgraph group_toy["Toy models"]
  node_generate_toys["Generate distributions"]
  node_compute_toys["Toy counts"]
  node_plot_toys["Toy plots<br/>[plot_toy_models.py]"]
end

subgraph group_independent["Model-independent fits"]
  node_routines["Data and fit routines<br/>[python_routines.py]"]
  node_fit_data["Fit data<br/>[fit_data.py]"]
  node_fit_binning["Binning scans"]
  node_fit_scalecuts["Scale-cut scans"]
  node_fit_mockavg["Fit mock average"]
  node_fit_mockind["Fit mock realizations"]
end

subgraph group_fullshape["Full-shape fits"]
  node_desilike["Correlation-dimension theory"]
  node_fit_data_full["Full-shape data fit"]
  node_fit_avg_full["Full-shape mean fit"]
  node_fit_ind_full["Full-shape realization fits"]
  node_rescale_mock["Rescale mock results<br/>[rescale_MSC.py]"]
  node_rescale_data["Rescale data results"]
end

subgraph group_analysis["Comparisons and plots"]
  node_plot_data["Data fit plots<br/>[plot_fit_data.py]"]
  node_plot_full["Full-shape fit plots"]
  node_plot_rh["Theory parameter plots<br/>[plot_RH.py]"]
  node_compare_rh["Chain comparison"]
  node_redshift["Redshift comparison"]
end

node_researcher(("Researcher"))
node_desi[("DESI data")]
node_mockdata[("Abacus and EZmocks")]

node_researcher -->|"runs"| node_mean_data
node_desi -->|"catalogues"| node_mean_data
node_researcher -->|"runs"| node_mean_abacus
node_mockdata -->|"mock inputs"| node_mean_abacus
node_researcher -->|"runs"| node_mean_ez
node_mockdata -->|"mock inputs"| node_mean_ez
node_researcher -->|"runs"| node_generate_toys
node_generate_toys -->|"generates particles for"| node_compute_toys
node_compute_toys -->|"results plotted by"| node_plot_toys
node_mean_data -.->|"counts fitted by"| node_fit_data
node_mean_abacus -.->|"counts fitted by"| node_fit_mockavg
node_fit_data -->|"uses"| node_routines
node_fit_mockavg -->|"uses"| node_routines
node_fit_binning -->|"uses"| node_routines
node_fit_scalecuts -.->|"uses"| node_routines
node_fit_mockind -.->|"uses"| node_routines
node_mean_data -.->|"counts fitted by"| node_fit_data_full
node_mean_abacus -.->|"counts fitted by"| node_fit_avg_full
node_fit_data_full -.->|"uses theory"| node_desilike
node_fit_avg_full -->|"uses theory"| node_desilike
node_fit_avg_full -->|"uses"| node_routines
node_fit_ind_full -.->|"uses theory"| node_desilike
node_fit_avg_full -->|"chains compared by"| node_compare_rh
node_fit_avg_full -->|"results plotted by"| node_plot_full
node_fit_avg_full -.->|"results rescaled by"| node_rescale_mock
node_fit_data_full -.->|"results rescaled by"| node_rescale_data
node_rescale_data -->|"rescaled data plotted by"| node_plot_full
node_desilike -.->|"theory explored by"| node_plot_rh
node_fit_avg_full -.->|"results compared by"| node_redshift
node_fit_data -.->|"fits plotted by"| node_plot_data

click node_mean_data "https://github.com/cullanhowlett/homogeneity/blob/main/script_NERSC_data.py"
click node_mean_abacus "https://github.com/cullanhowlett/homogeneity/blob/main/script_NERSC.py"
click node_mean_ez "https://github.com/cullanhowlett/homogeneity/blob/main/script_NERSC_EZmock.py"
click node_generate_toys "https://github.com/cullanhowlett/homogeneity/blob/main/generate_toy_models.py"
click node_compute_toys "https://github.com/cullanhowlett/homogeneity/blob/main/compute_toy_models.py"
click node_plot_toys "https://github.com/cullanhowlett/homogeneity/blob/main/plot_toy_models.py"
click node_routines "https://github.com/cullanhowlett/homogeneity/blob/main/python_routines.py"
click node_fit_data "https://github.com/cullanhowlett/homogeneity/blob/main/fit_data.py"
click node_fit_binning "https://github.com/cullanhowlett/homogeneity/blob/main/fit_data_binning.py"
click node_fit_scalecuts "https://github.com/cullanhowlett/homogeneity/blob/main/fit_data_scalecuts.py"
click node_fit_mockavg "https://github.com/cullanhowlett/homogeneity/blob/main/fit_mock_average.py"
click node_fit_mockind "https://github.com/cullanhowlett/homogeneity/blob/main/fit_mock_individual.py"
click node_desilike "https://github.com/cullanhowlett/homogeneity/blob/main/desilike_routines.py"
click node_fit_data_full "https://github.com/cullanhowlett/homogeneity/blob/main/fit_data_desilike.py"
click node_fit_avg_full "https://github.com/cullanhowlett/homogeneity/blob/main/fit_mock_average_desilike.py"
click node_fit_ind_full "https://github.com/cullanhowlett/homogeneity/blob/main/fit_mock_individual_desilike.py"
click node_rescale_mock "https://github.com/cullanhowlett/homogeneity/blob/main/rescale_MSC.py"
click node_rescale_data "https://github.com/cullanhowlett/homogeneity/blob/main/rescale_MSC_data.py"
click node_plot_data "https://github.com/cullanhowlett/homogeneity/blob/main/plot_fit_data.py"
click node_plot_full "https://github.com/cullanhowlett/homogeneity/blob/main/plot_fit_data_desilike.py"
click node_plot_rh "https://github.com/cullanhowlett/homogeneity/blob/main/plot_RH.py"
click node_compare_rh "https://github.com/cullanhowlett/homogeneity/blob/main/compare_RH_desilike.py"
click node_redshift "https://github.com/cullanhowlett/homogeneity/blob/main/plot_homogeneity_vs_redshift.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_mean_data,node_mean_abacus,node_mean_ez toneBlue
class node_generate_toys,node_compute_toys,node_plot_toys,node_desi,node_mockdata toneAmber
class node_routines,node_fit_data,node_fit_binning,node_fit_scalecuts,node_fit_mockavg,node_fit_mockind toneMint
class node_desilike,node_fit_data_full,node_fit_avg_full,node_fit_ind_full,node_rescale_mock,node_rescale_data toneRose
class node_plot_data,node_plot_full,node_plot_rh,node_compare_rh,node_redshift,node_researcher toneIndigo
```

## Components

### Measurements

- [Data counts](https://github.com/cullanhowlett/homogeneity/blob/main/script_NERSC_data.py): `script_NERSC_data.py`
- [Abacus counts](https://github.com/cullanhowlett/homogeneity/blob/main/script_NERSC.py): `script_NERSC.py`
- [EZmock counts](https://github.com/cullanhowlett/homogeneity/blob/main/script_NERSC_EZmock.py): `script_NERSC_EZmock.py`

### Toy models

- [Generate distributions](https://github.com/cullanhowlett/homogeneity/blob/main/generate_toy_models.py): `generate_toy_models.py`
- [Toy counts](https://github.com/cullanhowlett/homogeneity/blob/main/compute_toy_models.py): `compute_toy_models.py`
- [Toy plots](https://github.com/cullanhowlett/homogeneity/blob/main/plot_toy_models.py): `plot_toy_models.py`

### Model-independent fits

- [Data and fit routines](https://github.com/cullanhowlett/homogeneity/blob/main/python_routines.py): `python_routines.py`
- [Fit data](https://github.com/cullanhowlett/homogeneity/blob/main/fit_data.py): `fit_data.py`
- [Binning scans](https://github.com/cullanhowlett/homogeneity/blob/main/fit_data_binning.py): `fit_data_binning.py`
- [Scale-cut scans](https://github.com/cullanhowlett/homogeneity/blob/main/fit_data_scalecuts.py): `fit_data_scalecuts.py`
- [Fit mock average](https://github.com/cullanhowlett/homogeneity/blob/main/fit_mock_average.py): `fit_mock_average.py`
- [Fit mock realizations](https://github.com/cullanhowlett/homogeneity/blob/main/fit_mock_individual.py): `fit_mock_individual.py`

### Full-shape fits

- [Correlation-dimension theory](https://github.com/cullanhowlett/homogeneity/blob/main/desilike_routines.py): `desilike_routines.py`
- [Full-shape data fit](https://github.com/cullanhowlett/homogeneity/blob/main/fit_data_desilike.py): `fit_data_desilike.py`
- [Full-shape mean fit](https://github.com/cullanhowlett/homogeneity/blob/main/fit_mock_average_desilike.py): `fit_mock_average_desilike.py`
- [Full-shape realization fits](https://github.com/cullanhowlett/homogeneity/blob/main/fit_mock_individual_desilike.py): `fit_mock_individual_desilike.py`
- [Rescale mock results](https://github.com/cullanhowlett/homogeneity/blob/main/rescale_MSC.py): `rescale_MSC.py`
- [Rescale data results](https://github.com/cullanhowlett/homogeneity/blob/main/rescale_MSC_data.py): `rescale_MSC_data.py`

### Comparisons and plots

- [Data fit plots](https://github.com/cullanhowlett/homogeneity/blob/main/plot_fit_data.py): `plot_fit_data.py`
- [Full-shape fit plots](https://github.com/cullanhowlett/homogeneity/blob/main/plot_fit_data_desilike.py): `plot_fit_data_desilike.py`
- [Theory parameter plots](https://github.com/cullanhowlett/homogeneity/blob/main/plot_RH.py): `plot_RH.py`
- [Chain comparison](https://github.com/cullanhowlett/homogeneity/blob/main/compare_RH_desilike.py): `compare_RH_desilike.py`
- [Redshift comparison](https://github.com/cullanhowlett/homogeneity/blob/main/plot_homogeneity_vs_redshift.py): `plot_homogeneity_vs_redshift.py`

### Other components

- **Researcher**
- **DESI data**
- **Abacus and EZmocks**

## Connections

- Researcher → Data counts: runs (evidence: `README.md`)
- DESI data → Data counts: catalogues (evidence: `README.md`)
- Researcher → Abacus counts: runs (evidence: `README.md`)
- Abacus and EZmocks → Abacus counts: mock inputs (evidence: `README.md`)
- Researcher → EZmock counts: runs (evidence: `README.md`)
- Abacus and EZmocks → EZmock counts: mock inputs (evidence: `README.md`)
- Researcher → Generate distributions: runs (evidence: `README.md`)
- Generate distributions → Toy counts: generates particles for (evidence: `README.md`)
- Toy counts → Toy plots: results plotted by (evidence: `README.md`)
- Data counts → Fit data: counts fitted by
- Abacus counts → Fit mock average: counts fitted by
- Fit data → Data and fit routines: uses (evidence: `fit_data.py`)
- Fit mock average → Data and fit routines: uses (evidence: `fit_mock_average.py`)
- Binning scans → Data and fit routines: uses (evidence: `fit_data_binning.py`)
- Scale-cut scans → Data and fit routines: uses (evidence: `fit_data_scalecuts.py`)
- Fit mock realizations → Data and fit routines: uses (evidence: `fit_mock_individual.py`)
- Data counts → Full-shape data fit: counts fitted by
- Abacus counts → Full-shape mean fit: counts fitted by
- Full-shape data fit → Correlation-dimension theory: uses theory
- Full-shape mean fit → Correlation-dimension theory: uses theory (evidence: `fit_mock_average_desilike.py`)
- Full-shape mean fit → Data and fit routines: uses (evidence: `fit_mock_average_desilike.py`)
- Full-shape realization fits → Correlation-dimension theory: uses theory
- Full-shape mean fit → Chain comparison: chains compared by (evidence: `compare_RH_desilike.py`)
- Full-shape mean fit → Full-shape fit plots: results plotted by (evidence: `plot_fit_data_desilike.py`)
- Full-shape mean fit → Rescale mock results: results rescaled by (evidence: `rescale_MSC.py`)
- Full-shape data fit → Rescale data results: results rescaled by
- Rescale data results → Full-shape fit plots: rescaled data plotted by (evidence: `plot_fit_data_desilike.py`)
- Correlation-dimension theory → Theory parameter plots: theory explored by (evidence: `plot_RH.py`)
- Full-shape mean fit → Redshift comparison: results compared by (evidence: `plot_homogeneity_vs_redshift.py`)
- Fit data → Data fit plots: fits plotted by
