compute_cmb_residuals
Compute chi-squared and residuals for CMB bandpower data against an LCDM theory spectrum, using full covariance/windows when available; reports chi2, N, and PTE.
Instructions
chi2 of one experiment's bandpowers against an LCDM theory spectrum, plus residuals.
Uses the full covariance when the release has one (ACT DR6 TT/TE/EE block, all lensing
datasets, with Hartlap factors) and the bandpower windows when available; otherwise the
diagonal errors (Planck/SPT plotting products: chi2 is INDICATIVE, correlations ignored;
Planck unbinned uses the mean of the asymmetric errors). Reports chi2, N, PTE.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"output_dir": "<output_dir>"
},
"name": "compute_cmb_residuals"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| binned | No | Planck: binned (True) or unbinned (False). | |
| dataset | No | Spectrum dataset (lensing datasets use spectrum PP). | planck_pr3 |
| ell_max | No | Drop bandpowers above this ell (0 = no cut). | |
| ell_min | No | Drop bandpowers below this ell. | |
| spectrum | No | TT, TE, EE, BB or PP. | TT |
| output_dir | Yes | Directory for the residual CSV. | |
| theory_file | No | Theory CSV from compute_lcdm_theory_spectrum; default = bundled Planck 2018 best fit. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| files | Yes | ||
| status | Yes | ||
| message | Yes | ||
| metadata | Yes |