Skip to content

Include the HEALPix pixel window in map-based pseudo-Cℓ bandpower windows - #366

Open
cailmdaley wants to merge 1 commit into
developfrom
fix/pseudo-cl-pixel-window
Open

cailmdaley wants to merge 1 commit into
developfrom
fix/pseudo-cl-pixel-window

Conversation

@cailmdaley

Copy link
Copy Markdown
Collaborator

For a spectrum measured on HEALPix maps, the bandpowers NaMaster returns are W·(pw²·C_ℓ): pixelisation smooths the field by the pixel window pw(ℓ), and the mode-coupling inversion does not undo it. The pseudo-Cℓ SACC stored W alone, so anything that predicts the data through the SACC window (a SACC likelihood, the Smokescreen Cℓ_EE shift in #253) compared the measurement to W·C_ℓ. This PR puts pw²(ℓ) into the stored window for map-based spectra.

What changes

  • bandpower_window_from_workspace(wsp, nside=None) multiplies W by hp.pixwin(nside)**2 when nside is given.
  • pseudo_cl_to_sacc and PseudoClMixin.pseudo_cl_to_sacc_part forward nside; calculate_pseudo_cl_map passes its map nside. The catalogue-based path passes none: it has no pixels, so its window is unchanged.

Effect on results

  • Workflow products: none. generate_pseudo_cl.py, generate_pseudo_cl_cov.py and papers/cosmo_val all use cell_method="catalog".
  • Map-based SACCs (cell_method="map", the CosmologyValidation default): at the configured nside = 1024, ℓ_max = 2·nside = 2048, pw² suppresses the prediction by 0.09% at ℓ = 100, 2.2% at 500, 8.5% at 1000 and 32% at 2047. The top powspace bands are the ones a fit through the old window got wrong.
  • The Gaussian-covariance fiducial in calculate_pseudo_cl_eb_cov already multiplies by pw², so the covariance and the window now agree.

Interaction with #253

The blinding shift is ΔCℓ_EE passed through the SACC window (PRD #241 §4). Once both land, the shift and the data it conceals use the same window, pw² included, for map-based spectra.

Verified

test_pseudo_cl_to_sacc_real_namaster checks the map-based window equals pw²(ℓ)·W against a real NaMaster workspace (rtol 1e-12). Container suite: 306 passed, 1 xfailed.

— Claude (Opus) on behalf of Cail.

🤖 Generated with Claude Code

bandpower_window_from_workspace(wsp, nside=) multiplies NaMaster's
decoupling window by pw²(ℓ) for a spectrum of HEALPix maps at nside, so
the SACC window maps a theory C_ℓ to the measured bandpower. The map-based
cosmo_val path passes its nside through pseudo_cl_to_sacc_part and
pseudo_cl_to_sacc; the catalogue-based path has no pixel window and passes
none.

With the blinding PR (#253) the Cℓ_EE shift is computed through the SACC
window as written. On its own that is consistent (data and shift share the
window); once both land, this fix corrects the data and the shift together.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant