measure_cmb_power_spectrum
Compute binned CMB TT, EE, TE, or BB power spectra from a HEALPix map and mask for custom Planck-map analysis, with optional cross-spectrum handling to reduce noise bias.
Instructions
Measure the CMB TT (optionally EE/TE/BB) power spectrum FROM A MAP (from map to power spectrum).
Use this for your own spectrum from Planck maps (instead of the released bandpowers).
Pseudo-C_ell via healpy anafast of the (apodised) masked map, divided by fsky = <w^2>,
the Gaussian beam^2 and the HEALPix pixel window^2; monopole/dipole removed. Binned in
Delta-ell = 30 bins like the PLA TT file; errors are Knox cosmic-variance only (no noise
term). Auto-spectra carry noise bias (SMICA: noticeable above ell ~ 1000), so pass the
hm1/hm2 pair for a cross-spectrum. Heavy, dispatchable (set_dispatch). Sanity: first
peak at ell ~ 220 with D_ell ~ 5700-5800 muK^2; within a few % of Planck TT at 30<ell<1500.
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>",
"map_file": "<map_file>",
"mask_file": "<mask_file>"
},
"name": "measure_cmb_power_spectrum"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lmax | No | Max multipole (<= 2*nside is safe). | |
| method | No | anafast pseudo-C_ell / fsky (default) or pymaster MASTER if installed. | anafast |
| apod_deg | No | Mask apodisation FWHM [deg] (0 = binary). | |
| map_file | Yes | HEALPix map FITS from fetch_cmb_map (muK). | |
| bin_width | No | Bin width (30 = PLA TT binning). | |
| map_file2 | No | Optional second map with independent noise (hm2 when map_file is hm1) -> cross-spectrum without noise bias. Recommended for ell > 1000. | |
| mask_file | Yes | Mask FITS from fetch_cmb_map. | |
| output_dir | Yes | Directory for the binned CSV / npz / JSON. | |
| polarization | No | Also EE/BB/TE (needs an I/Q/U map). | |
| beam_fwhm_arcmin | No | Gaussian beam FWHM of the map (Planck PR3 SMICA/Commander: 5). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| files | Yes | ||
| status | Yes | ||
| message | Yes | ||
| metadata | Yes |