CMB-spectrum emulator competition: pre-generated training data, Wishart-likelihood scoring, and CPU timing harness built on classy_szfast.
Project description
cmbemu
A CMB power-spectrum emulator competition: pre-generated training/test data,
Wishart-likelihood scoring, and a CPU timing harness built on
classy_sz / classy_szfast.
Install
pip install cmbemu
Quickstart
import cmbemu as cec
# (1) Fetch the pre-generated datasets (cached under ~/.cache/cmbemu)
train = cec.load_train()
test = cec.load_test()
# (2) Optionally generate more spectra to study data-scaling
extra = cec.generate_data(n=20_000, seed=42, save_to="extra.npz")
# (3) Define your emulator
class MyEmulator:
def predict(self, params: dict) -> dict:
# params has keys: omega_b, omega_cdm, H0, tau_reio,
# ln10^{10}A_s, n_s.
# Returns a dict with keys tt, te, ee (len lmax_cmb+1)
# and pp (len lmax_pp+1).
...
# (4) Score
result = cec.get_score(MyEmulator())
print(result["combined_S"], result["mae_total"]["mae"], result["timing"]["t_cpu_ms_mean"])
See scoring.md for the full likelihood and score definitions.
Hardware note
Timing is done CPU-only, single-threaded warm sequential calls — this
mimics how an emulator is used inside a typical MCMC chain. Before running
get_score with strict_cpu=True, export:
export JAX_PLATFORMS=cpu
export CUDA_VISIBLE_DEVICES=
Project layout
src/cmbemu/— the installable packagescripts/— internal dataset-building and diagnostic scriptsscoring.md— formal score definitionSTATUS.md— current state of the competition design
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cmbemu-0.1.0a1.tar.gz.
File metadata
- Download URL: cmbemu-0.1.0a1.tar.gz
- Upload date:
- Size: 17.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4681de94c8deed78521c88d720a455b02161b08d4140684fd8ac3550ecc82917
|
|
| MD5 |
8f53caa237e13c98cda3cb489ca01120
|
|
| BLAKE2b-256 |
f7e0fb44bce30e270911cc39927d6b77ea733b8c880872add32d400a258c3541
|
Provenance
The following attestation bundles were made for cmbemu-0.1.0a1.tar.gz:
Publisher:
publish.yml on borisbolliet/cmbemu
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cmbemu-0.1.0a1.tar.gz -
Subject digest:
4681de94c8deed78521c88d720a455b02161b08d4140684fd8ac3550ecc82917 - Sigstore transparency entry: 1350623734
- Sigstore integration time:
-
Permalink:
borisbolliet/cmbemu@d410897b875eeb123feae54ac2065c560e326b9e -
Branch / Tag:
refs/tags/v0.1.0a1 - Owner: https://github.com/borisbolliet
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d410897b875eeb123feae54ac2065c560e326b9e -
Trigger Event:
push
-
Statement type:
File details
Details for the file cmbemu-0.1.0a1-py3-none-any.whl.
File metadata
- Download URL: cmbemu-0.1.0a1-py3-none-any.whl
- Upload date:
- Size: 22.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a5f1e83be141a921f5db502fd070731e7a386eac9ec0d8de70b25c43f9ef8736
|
|
| MD5 |
db19ff67836c06205f214b5afb4ec247
|
|
| BLAKE2b-256 |
eaa4175306c84c03ba0d4b61f52885905d9c5420d9f24daa6bd76c9bdc9084d9
|
Provenance
The following attestation bundles were made for cmbemu-0.1.0a1-py3-none-any.whl:
Publisher:
publish.yml on borisbolliet/cmbemu
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cmbemu-0.1.0a1-py3-none-any.whl -
Subject digest:
a5f1e83be141a921f5db502fd070731e7a386eac9ec0d8de70b25c43f9ef8736 - Sigstore transparency entry: 1350623806
- Sigstore integration time:
-
Permalink:
borisbolliet/cmbemu@d410897b875eeb123feae54ac2065c560e326b9e -
Branch / Tag:
refs/tags/v0.1.0a1 - Owner: https://github.com/borisbolliet
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d410897b875eeb123feae54ac2065c560e326b9e -
Trigger Event:
push
-
Statement type: