Skip to content

Add free-free f2 small-scale template generation notebook#256

Open
zonca wants to merge 1 commit intogalsci:mainfrom
zonca:freefree_f2
Open

Add free-free f2 small-scale template generation notebook#256
zonca wants to merge 1 commit intogalsci:mainfrom
zonca:freefree_f2

Conversation

@zonca
Copy link
Copy Markdown
Member

@zonca zonca commented Mar 25, 2026

Free-free f2 small-scale template

This PR adds a notebook that generates a high-resolution (nside=2048) free-free intensity template (f2) by injecting statistically consistent small-scale structure into the Hutschenreuter et al. (2024) Emission Measure map.

Method summary

  1. Convert the Emission Measure map to brightness temperature at 30 GHz using the Gaunt-factor formalism (Dickinson+ 2003, Draine 2011)
  2. Transform to log-space with a data-driven epsilon floor
  3. Fit a power-law to the angular power spectrum in the ℓ = 30–150 range
  4. Extrapolate small-scale power with a sigmoid high-pass filter
  5. Build a spatially-varying modulation map from patch-based spectral analysis
  6. Combine large and small scales using power-conserving harmonic cross-fade filters (f_LS² + f_SS² = 1)
  7. Transform back to linear space

Output files

Three FITS maps are produced:

  • ff_highres_map_nside2048_f2_30GHz.fits — the final free-free template at 30 GHz (μK_RJ)
  • ff_modulation_map_nside128_f2_30GHz.fits — spatially-varying modulation map
  • ff_HE_map_nside256_30GHz.fits — input Hutschenreuter & Enßlin map converted to brightness temperature

The output files are available at NERSC:

Executed notebook

The fully executed notebook (with all outputs and plots at nside=2048) is available here:
https://gist.github.com/zonca/22ca2c4e94e6756a6c87f7bde489c294

The notebook in this PR has outputs stripped to keep the file size small in git.

Looking for reviewers

We are looking for a reviewer who can help assess whether this new f2 template is suitable for use in PySM simulations — in particular, whether the small-scale power injection, the large/small-scale transition, and the spatial modulation produce physically reasonable results compared to the existing f1 template.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@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

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