Skip to content

Harmonic space paper resubmission - #466

Open
sachaguer wants to merge 2 commits into
developfrom
papers/harmonic_space_resubmission
Open

sachaguer wants to merge 2 commits into
developfrom
papers/harmonic_space_resubmission

Conversation

@sachaguer

Copy link
Copy Markdown
Contributor

This PR is the modification of the scripts used to generate the plots of the harmonic space paper.

Nothing particular to review, just asking for a thumb up.

@review-notebook-app

Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

🔴 ruff — residual issues after autofix

@sachaguer — I pushed cacdf0c with the formatting and safe lint fixes, but these need a human and still block the merge into develop:

Residual ruff check . (after autofix)

papers/harmonic/2025_09_11_validation_cov_cell.py:873:19: F821 Undefined name `cov_sim_gaussian`
papers/harmonic/2025_09_11_validation_cov_cell.py:878:19: F821 Undefined name `cov_sim_gaussian`
papers/harmonic/2025_09_26_plot_contours_cl_vs_xi.ipynb:cell 3:33:9: E722 Do not use bare `except`
papers/harmonic/2025_10_28_plot_whisker.ipynb:cell 3:34:9: E722 Do not use bare `except`
papers/harmonic/2025_10_28_plot_whisker.ipynb:cell 4:12:1: E722 Do not use bare `except`
papers/harmonic/2025_10_28_plot_whisker.ipynb:cell 4:19:1: E722 Do not use bare `except`
papers/harmonic/2025_10_28_plot_whisker.ipynb:cell 4:24:1: E722 Do not use bare `except`
papers/harmonic/2025_10_28_plot_whisker.ipynb:cell 4:29:1: E722 Do not use bare `except`
Found 8 errors.

Residual ruff format --check . (after autofix)

✅ clean


CI run · Updates on every push and turns green when ruff passes — nothing else to do.

@cailmdaley cailmdaley left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Sacha. I read the diff against develop and re-ran 2025_10_08_plot_data_vectors.py and 2025_10_28_plot_whisker.ipynb on candide in the CI container, against your outputs and chains. Once the import below was patched, both figures come out matching the paper versions. Three things stop the scripts from reproducing the figures from the repo, so I'm requesting changes. Each is a small fix.

Blocking

  1. sp_validation.utils_cosmo_val doesn't exist on develop or on this branch, so psf_leakage_cell.py, validation_cov_cell.py and plot_data_vectors.py all fail at import. SquareRootScale is in sp_validation.plots; the old from sp_validation.rho_tau import SquareRootScale also still works, because rho_tau re-exports it.
  2. plot_contours_cl_vs_xi.ipynb relies on an uncommitted change. It passes chain_type="apriori" for the prior-volume chain, but the apriori branch exists only in your working copy of cosmo_inference/scripts/chain_postprocessing.py, which git status shows as modified. On develop the call falls through to the polychord path. That path drops the last 4 columns instead of 2 and takes column −1 as the weight, so the "Prior volume" contour comes out wrong with no error. Please commit that change to chain_postprocessing.py in this PR.
  3. ruff gate: validation_cov_cell.py:873,878 uses cov_sim_gaussian, which is never defined. You probably meant covs["B"]["cov_gaussian"]; that cell writes the cov_gaussian_sims_{BB,EB}.npy files, so the blind matters. The remaining errors are bare except: in the two notebooks; except Exception: fixes them.

Non-blocking

  • The new σ-normalised leakage plot in psf_leakage_cell.py divides by pseudo_cl_cov_g_ng_iNKA_SP_v1.4.6.3_leak_corr_B.fits (dated 24 Feb). The other scripts use the _B_leak_corr naming. pseudo_cl_cov_g_ng_iNKA_SP_v1.4.6.3_B_leak_corr.fits (dated 5 Mar) differs from it by up to 10% on the diagonal, peaking around ℓ≈150–500. Please check that the plot uses the covariance the paper uses.
  • The whisker plot's −2.18σ (corr.) is hard-coded. A comment saying where the number comes from would let someone else regenerate it.
  • With usetex, the | separator in the data-vector χ² annotations renders as an em dash. $|$ gives a bar.

Claude (Opus) on behalf of Cail

@cailmdaley

Copy link
Copy Markdown
Collaborator

@sachaguer feel free to ignore any of these that are only creating useful work, and feel free to merge when you're happy!

@sachaguer

sachaguer commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor Author

Thanks @cailmdaley, I will just clean the missing scripts that I did not move completely to make sure that the script runs. I will ignore the less relevant points.

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.

2 participants