Skip to main content

Psi-Continuum v2: cosmological framework and joint likelihood analysis for the Psi-CDM model.

Project description

Psi-Continuum v2

A Minimal One-Parameter Extension of ΛCDM

Author: Dmitry Vasilevich Klimov Status: Research Prototype (v0.2.0) https://psi-continuum.org/docs/v2

License: MIT Python Reproducible Status

Overview

Psi-Continuum (ΨCDM) is a minimal phenomenological extension of ΛCDM that introduces one additional parameter ε₀, modifying late-time expansion while retaining ΛCDM as an exact limit.

Background expansion is written as:

$H_{\Psi}(z) = H_{\Lambda}(z)\left(1 + \frac{\varepsilon_{0}}{1+z}\right)$

where g(z) is chosen such that:

  • g(0) = 1 → parameter interpretable as a fractional deformation of dark energy,
  • g(z → ∞) → 0 → model preserves early ΛCDM behaviour.

If ε₀ = 0 → ΨCDM reduces to ΛCDM.

This repository includes:

  • ΛCDM and ΨCDM background cosmology
  • Pantheon+ HF supernovae loader + full covariance χ²
  • H(z) cosmic chronometer compilation
  • SDSS DR12 BAO consensus
  • DESI DR2 Gaussian BAO likelihood
  • Joint likelihood and χ² breakdown
  • ε₀ scanning, minimization, comparison with ΛCDM
  • Publication-grade figure generation
  • A complete reproducible pipeline (run_all.py)

Main Scientific Results

  • Pantheon+ HF slightly prefers ε₀ < 0
  • DESI DR2 BAO strongly prefers ε₀ > 0
  • Joint background fit (SN + H(z) + SDSS DR12 BAO + DESI DR2) yields:

ε₀_best = +0.031 ± 0.010

Total Δχ² improvement relative to ΛCDM: −6.9

This means ΨCDM provides a statistically better description of late-time background data while remaining indistinguishable from ΛCDM at early times.

Repository Structure

psi-continuum-v2/
├── .github
│   └── workflows
│       └── tests.yml
├── CITATION.cff
├── CONTRIBUTING.md
├── LICENSE
├── MANIFEST.in
├── README.md
├── data
│   ├── bao
│   │   ├── BAO_consensus_covtot_dM_Hz.txt
│   │   └── sdss_DR12Consensus_bao.dat
│   ├── desi
│   │   └── dr2
│   │       ├── desi_gaussian_bao_ALL_GCcomb_cov.txt
│   │       └── desi_gaussian_bao_ALL_GCcomb_mean.txt
│   ├── hz
│   │   └── HZ_compilation.csv
│   └── pantheon_plus
│       ├── Pantheon+SH0ES.dat
│       └── Pantheon+SH0ES_STAT+SYS.cov
├── psi_continuum_v2
│   ├── analysis
│   │   ├── check
│   │   │   ├── check_bao_dr12_data.py
│   │   │   ├── check_desi_dr2_data.py
│   │   │   ├── check_hz_data.py
│   │   │   ├── check_models.py
│   │   │   └── check_pantheonplus_data.py
│   │   ├── pipeline
│   │   │   └── joint_fit_psicdm.py
│   │   ├── plots
│   │   │   └── make_publication_plots.py
│   │   ├── scans
│   │   │   └── scan_eps_psicdm.py
│   │   ├── styles
│   │   │   └── psi_style.mplstyle
│   │   └── tests
│   │       ├── bao_desi_dr2_test.py
│   │       ├── eps_best_joint_test.py
│   │       ├── hz_test_psicdm.py
│   │       ├── sn_test_lcdm_pplus_simple.py
│   │       └── sn_test_psicdm_pplus.py
│   ├── check_data.py
│   ├── cli
│   │   ├── menu.py
│   │   └── run_all.py
│   ├── cosmology
│   │   ├── background
│   │   │   ├── distances.py
│   │   │   ├── lcdm.py
│   │   │   └── psicdm.py
│   │   ├── constants.py
│   │   ├── data_loaders
│   │   │   ├── bao_loader.py
│   │   │   ├── covariance_loader.py
│   │   │   ├── desi_loader.py
│   │   │   ├── hz_loader.py
│   │   │   ├── pantheonplus_loader.py
│   │   │   └── validators.py
│   │   ├── likelihoods
│   │   │   ├── bao_likelihood.py
│   │   │   ├── hz_likelihood.py
│   │   │   ├── joint_likelihood.py
│   │   │   └── sn_likelihood.py
│   │   └── models
│   │       ├── lcdm_params.py
│   │       └── psicdm_params.py
│   ├── data_manager
│   │   ├── download.py
│   │   └── sources.py
│   ├── tests
│   │   └── test_check_data.py
│   └── utils
│       ├── paths.py
│       └── style.py
└──pyproject.toml

Figures generated by the publication pipeline are saved under:

results/figures/publication/main_figures/ results/figures/publication/appendix/

add

results/figures/bao/


Installation

Installation Options

  • Installation via PyPI (recommended)
  • Installation from source (clone repository)

Installation via PyPI (recommended)

You can install Psi-Continuum v2 directly from PyPI:

pip install psi-continuum-v2

This installs only the code of the package. All scientific datasets must be downloaded manually and placed into a local data/ directory (see Section “Preparing the data/ Directory”).

Interactive CLI

psi-cli

Menu options:

  • Download datasets
  • Check datasets
  • Run full analysis pipeline
  • Open documentation
  • Show project paths

This is the recommended entry point for new users.

Automatic dataset download

Psi-Continuum v2 includes a built-in downloader:

psi-download-data

This command creates data/ automatically and fetches all required datasets from the official GitHub mirror.

After installation you can check whether your data directory is correctly set up:

python -m psi_continuum_v2.check_data

If data files are missing, the tool will print clear MISSING messages and instructions on where to place them.

To run analysis scripts installed via pip:

python -m psi_continuum_v2.analysis.sn_test_psicdm_pplus

1. Clone the repository

git clone https://github.com/dmitrylife/psi-continuum-v2.git
cd psi-continuum-v2

2. Create virtual environment

python3 -m venv sci_venv
source sci_venv/bin/activate

3. Install dependencies

pip install -r requirements.txt

4. (Optional) Install the package as editable

pip install -e .

If you installed the package via pip (rather than cloning the repository), you must create a data/ directory in your current working directory, with the dataset layout shown in Section 5.

5. Preparing the data/ Directory

The data/ directory is intentionally excluded from both the GitHub repository and the PyPI package.
Users must download all datasets manually and place them in the directory structure shown below.

The expected directory layout is:

data/
├── bao
│   ├── BAO_consensus_covtot_dM_Hz.txt
│   └── sdss_DR12Consensus_bao.dat
├── desi
│   └── dr2
│       ├── desi_gaussian_bao_ALL_GCcomb_cov.txt
│       └── desi_gaussian_bao_ALL_GCcomb_mean.txt
├── hz
│   └── HZ_compilation.csv
└── pantheon_plus
    ├── Pantheon+SH0ES.dat
    └── Pantheon+SH0ES_STAT+SYS.cov

You may download these datasets from their original public sources:

  • Pantheon+ HF supernova sample
  • Cosmic chronometer H(z) compilation
  • SDSS DR12 BAO consensus
  • DESI DR2 Gaussian BAO data

Place all files exactly under the paths shown above.

Quick data status check

After creating the data/ directory, you can quickly check that all required files are visible to the package:

psi-check-data

or, equivalently:

python -m psi_continuum_v2.check_data

This command will report, for each dataset, whether the expected files are present, for example:

Pantheon+ SH0ES   OK
H(z) compilation  MISSING   → please place HZ_compilation.csv into ./data/hz/
SDSS DR12 BAO     OK
DESI DR2 BAO      MISSING   → please place DESI DR2 Gaussian files into ./data/desi/dr2/

When installed via pip, the tool looks for the data/ directory in your current working folder.

If some files are missing, the analysis scripts will raise a clear FileNotFoundError with instructions on where to place the data.

Now modules can be executed as:

python -m psi_continuum_v2.analysis.sn_test_psicdm_pplus

Running the Full Pipeline

Execute all analysis scripts sequentially:

./run_all.py

This runs:

  1. check_models.py
  2. sn_test_lcdm_pplus_simple.py
  3. sn_test_psicdm_pplus.py
  4. hz_test_psicdm.py
  5. bao_desi_dr2_test.py
  6. joint_fit_psicdm.py
  7. scan_eps_psicdm.py
  8. eps_best_joint_test.py
  9. make_publication_plots.py

This script automatically loads the psi_style.mplstyle file to ensure consistent formatting.

Logs produced in:

results/logs/

Running Individual Scripts

Example:

python -m psi_continuum_v2.analysis.hz_test_psicdm

Examples

Minimal demonstration scripts live in:

examples/

Run example:

python examples/example_sn.py

Output Structure

results/
├── figures
│   ├── bao
│   │   ├── desi_dr2_DH.png
│   │   ├── desi_dr2_DM.png
│   │   └── desi_dr2_DV.png
│   ├── data_checks
│   │   ├── bao_dr12_DM_check.png
│   │   ├── bao_dr12_Hz_check.png
│   │   ├── desi_dr2_DH_check.png
│   │   ├── desi_dr2_DM_check.png
│   │   └── desi_dr2_DV_check.png
│   ├── hz
│   │   ├── hz_psicdm_chi2_eps_scan.png
│   │   └── hz_psicdm_test.png
│   ├── model_checks
│   │   ├── lcdm_Ez.png
│   │   ├── lcdm_Hz.png
│   │   ├── lcdm_dL.png
│   │   ├── psicdm_eps_scan_Ez.png
│   │   └── psicdm_vs_lcdm_Ez.png
│   ├── publication
│   │   ├── appendix
│   │   │   ├── bao_desi_raw.png
│   │   │   ├── bao_dr12_raw.png
│   │   │   ├── hz_only_chi2_scan.png
│   │   │   ├── hz_quality_checks.png
│   │   │   ├── model_lcdm_Ez_Hz_dL.png
│   │   │   ├── model_psicdm_Ez_scan.png
│   │   │   └── sn_histograms.png
│   │   ├── main_figures
│   │   │   ├── fig1_Ez_comparison.png
│   │   │   ├── fig2_SN_Hubble.png
│   │   │   ├── fig3_BAO_DR12_multipanel.png
│   │   │   ├── fig4_BAO_DESI_multipanel.png
│   │   │   ├── fig5_BAO_fits_LCDM_vs_PsiCDM.png
│   │   │   ├── fig6_Hz_dataset.png
│   │   │   ├── fig7_joint_chi2_eps.png
│   │   │   └── fig8_delta_chi2_contributions.png
│   │   ├── summary
│   │   │   └── poster_summary.png
│   │   └── talk_figures
│   │       ├── talk_bao.png
│   │       ├── talk_sn.png
│   │       └── talk_summary.png
│   ├── scan
│   │   └── eps_scan_total.png
│   └── sn
│       ├── pantheonplus_hf_chi2_eps_scan.png
│       ├── pantheonplus_hf_hubble_diagram.png
│       └── pantheonplus_hf_residuals.png
├── tables
│   ├── bao
│   │   └── desi_dr2_chi2.txt
│   ├── hz
│   │   └── hz_psicdm_chi2.txt
│   ├── joint
│   │   ├── eps_best_joint.txt
│   │   └── joint_fit_summary.txt
│   ├── scan
│   │   └── eps_scan_psicdm.txt
│   └── sn
│       ├── chi2_eps_scan.txt
└──     └── pantheonplus_hf_chi2_lcdm.txt

Plotting Style

All publication-ready figures use the custom Matplotlib style:

  • psi_continuum_v2/analysis/styles/

contains the file:

  • textpsi_style.mplstyle

This style enforces consistent fonts, line widths, grids, color palette, and overall layout across all figures generated by the analysis pipeline (make_publication_plots.py).


Scientific Roadmap

Planned upgrades:

  • MCMC inference using emcee
  • Full DESI DR2 non-Gaussian BAO likelihood
  • Growth-rate constraints (fσ₈)
  • CMB distance-prior incorporation
  • Perturbation-theory extension of ΨCDM
  • Exploration of functional forms of g(z)

License

This project is licensed under the terms of the MIT License. See the LICENSE file for details.


Citation

If you use Psi-Continuum v2 in academic work:

Dmitry Vasilevich Klimov (2025).
Psi–Continuum Cosmology v2: A Minimal One–Parameter Extension of ΛCDM.
Zenodo. DOI: 10.5281/zenodo.17879744

Machine-readable citation is provided in CITATION.cff.


Contact

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

psi_continuum_v2-0.2.2.tar.gz (46.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

psi_continuum_v2-0.2.2-py3-none-any.whl (63.8 kB view details)

Uploaded Python 3

File details

Details for the file psi_continuum_v2-0.2.2.tar.gz.

File metadata

  • Download URL: psi_continuum_v2-0.2.2.tar.gz
  • Upload date:
  • Size: 46.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for psi_continuum_v2-0.2.2.tar.gz
Algorithm Hash digest
SHA256 b3c439e0e7f82bfb0926549760464dbf2e59542629dfbae87bf72b8001a46d2f
MD5 f96f6509b4780342d390d558608d4966
BLAKE2b-256 724eb3babf9471658a0b86668c7b922f0528711bde5ce4b2581a9740523faed8

See more details on using hashes here.

File details

Details for the file psi_continuum_v2-0.2.2-py3-none-any.whl.

File metadata

File hashes

Hashes for psi_continuum_v2-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9c0a6418dc24005dd66523eb00fe787a1782bd86b7083e1a6c1554ac2ffba40c
MD5 81e7551dfafe5f45089c277acbbb69b5
BLAKE2b-256 750ffcddee901cd3c3eb986e6b3d7d73ad898e3f896a00250805e67048aaf1b7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page