glass-dev / glass

Generator for Large Scale Structure
https://glass.readthedocs.io
MIT License
31 stars 7 forks source link

ENH(fields): compute effective spectra of a simulation #146

Closed ntessore closed 8 months ago

ntessore commented 8 months ago

Adds a function effective_cls() which takes a list of weights for each shell and the angular matter power spectrum and returns an array of the effective spectra for when matter shells are combined using the given weights. This can be used to exactly predict what the angular power spectra coming out of a simulation will be after discretisation.

To obtain the angular galaxy power spectrum, a new function position_weights() computes the weights corresponding to positions_from_delta(). To obtain the angular convergence power spectrum, a new function multi_plane_weights() computes the weights corresponding to MultiPlaneConvergence.

Closes: #130 Added: A new function effective_cls() which combines power spectra using a list of weights, which models what happens in the simulation. Added: A new function position_weights() that returns weights for effective_cls() to model the result of positions_from_delta(). Added: A new function multi_plane_weights() that returns weights for effective_cls() to model the result of MultiPlaneConvergence.