Skip to content

Training data generation with CLASS#7

Open
HTJense wants to merge 23 commits into
mainfrom
classy
Open

Training data generation with CLASS#7
HTJense wants to merge 23 commits into
mainfrom
classy

Conversation

@HTJense
Copy link
Copy Markdown
Owner

@HTJense HTJense commented Mar 31, 2026

Work in progress for a CLASS interface. Will merge this when it is close enough to parity with the CAMB interface.

Thanks to Alex Nemtinova for initiating this and aiding me in fixing bugs relating to my ignorance when it comes to CLASS.

To match CAMB parity, we will need auto-generation of:

  • derived parameter handling
  • CMB power spectra (both lensed and unlensed)
  • CMB lensing spectra
  • linear matter power spectra
  • non-linear matter power spectra
  • H(z) (and other background) evolution
  • sigma8(z) evolution
  • angular diameter distances

On top of that, it might be nice to:

  • automatically infer lmax for cmb spectra
  • automatically infer the necessity of unlensed/lensing/lensed power spectra computation

The automatic setting inference is currently done via the "auto: True" flag in the extra_args block in the yaml. It's probably better to have everything done by the end user however, as class has too many accuracy settings that could realistically be inferred by the code (at least for camb, the only real parameter that has to be inferred is the redshift grid for quantities that vary with redshift, like sigma8(z)). It might be easier to parse the parameters and halt if there's an inconsistency (like lmax_calculated < lmax_requested), rather than try to parse the requested parameters and modifying the settings accordingly...

All work should be limited to writing the spectra_classy.py file, as the remaining interfacing is handled automatically by the pipeline from there.

@HTJense HTJense marked this pull request as ready for review April 21, 2026 14:21
@HTJense
Copy link
Copy Markdown
Owner Author

HTJense commented Apr 21, 2026

In principle most of the things we would like to see from class should be present. I tried generating a few (O(10^3) samples) minimal NNs to check that the behaviour is correct, and I think it matches most of the CAMB interface now.

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