Release notes¶
These notes document the changes between individual GLASS releases.
2024.2 (15 Nov 2024)¶
All GLASS user functionality is now available directly from the main
glass
namespace. No more imports!Changes to the functions dealing with Gaussian spectra:
gaussian_gls()
was renamed toglass.discretized_cls()
, which better reflects what the function does.The implicit call to
glass.discretized_cls()
was removed fromglass.lognormal_gls()
. Callglass.discretized_cls()
explicitly with the desiredncorr=
,lmax=
, andnside=
parameters.
redshifts_from_nz()
is deprecated in favour ofglass.redshifts()
, as the former is almost never the right choice: the two-point statistics in a linear bias model are coming from the shells, so the redshift distribution is implicitly the same as the radial profile of the shells.Several fixes to
glass.ellipticity_ryden04()
.Added a FITS catalogue writer tool
glass.write_catalog()
.Much improved documentation with docstring for all functions.
Examples now live in the main GLASS repository and documentation.
GLASS is now fully typed and passes mypy.
Python 3.13 is now supported. Python 3.8 and NumPy 1.21 are no longer supported.
The
glass.core.constants
module was removed.
2024.1 (16 Jul 2024)¶
Further changes to the
partition()
function.The output of
partition()
now has the shells axis as its first. This means that the new output is the transpose of the previous output.A new
partition(..., method="nnls")
method that computes a partition with non-negative contributions for each shell. This is now the default. The"nnls"
method works much better than"lstsq"
since it does not introduce small negative densities, and should almost always be preferred.Both
partition(method="nnls")
andpartition(method="lstsq")
now have an additional integral constraint so that the sum of the partition recovers the integral of the input function.The
partition()
function now works correctly with functions having extra axes.
A new function
combine()
that evaluates the linear combination of radial window functions with given weights. This function is the inverse ofpartition()
and can be used to obtain the effect of the discretisation on, e.g., a redshift distribution.There is now a way to compute the effective angular power spectra that can be expected from a GLASS simulation, including all discretisations and approximations.
A new function
effective_cls()
which combines power spectra using a list of weights. This function essentially models the linear combinations that happen in the simulation.A new function
position_weights()
that returns weights foreffective_cls()
to model the result ofpositions_from_delta()
.A new function
multi_plane_weights()
that returns weights foreffective_cls()
to model the result ofMultiPlaneConvergence
.
A new function
redshifts()
to sample redshifts following a radial window function. This should always be preferred to the existingredshifts_from_nz()
function, since the redshift distribution entering the two-point statistics is in fact fixed by the window functions.
2023.7 (1 Aug 2023)¶
New radial window functions
linear_windows()
andcubic_windows()
, which correspond to linear and cubic spline interpolation of radial functions, respectively. These are overlapping window functions, and it has been difficult to obtain accurate matter power spectra so far.The
partition()
function now returns an array of weights to approximate a given function by the window functions. This is necessary to obtain an accurate fit of redshift distributions by overlapping window functions. For example, to get the array of galaxy densities in each shells fromdndz
, one would now do:ngal = partition(z, dndz, shells)
A new function
getcl()
was added to return angular power spectra by index from a list using GLASS ordering.The
gaussian_phz()
function now accepts bounds usinglower=
andupper=
keyword parameters.
2023.6 (30 Jun 2023)¶
There is some support for simulating the deflections due to weak gravitational lensing:
The
deflect()
function applies deflections to positions.The
from_convergence()
function returns one or more other lensing fields given the convergence.The
shear_from_convergence()
function is deprecated in favour offrom_convergence()
.
The
glass
module is no longer a namespace package. The newglass.ext
namespace is reserved for extensions instead. This is done to follow best practices, so that a bad extension can no longer break all of GLASS by mistake. Theglass.all
meta-module is no longer necessary.The point sampling functions
positions_from_delta()
anduniform_positions()
now return an iterator over points. This has lead to orders-of-magnitude improvements in memory use and performance when simulating galaxies at Euclid/LSST densities.The ellipticity sampling functions
ellipticity_gaussian()
andellipticity_intnorm()
accept array inputs.A bug causing incorrect results from
effective_bias()
has been fixed.
2023.5 (31 May 2023)¶
The point sampling functions in
glass.points
now accept extra dimensions, and will broadcast leading axes across their inputs. They also return an additional scalar or array with the counts of sampled galaxies.The redshift sampling function
glass.galaxies.redshifts_from_nz()
now supports array input for thecounts
argument. It accepts e.g. the number of galaxies returned by the position sampling.The profiling functionality in
glass.user
was removed in favour of external packages.
2023.2 (1 Mar 2023)¶
New user functions
glass.user.save_cls()
andglass.user.load_cls()
to save and load angular power spectra in the GLASS format.Some type hints were added to library functions. These are mostly perfunctory at this time, but there is interest in adding proper typing support in the future, including use of the Array API.
The
glass.matter
module was removed in favour of the more appropriately-namedglass.shells
module for shell definitions.Instead of using an array of shell boundaries and separate
MatterWeights
, shells are now entirely defined by aglass.shells.RadialWindow
window function.Many functions have an improved interface thanks to the previous point:
The
glass.math.restrict_interval
function has been replaced byglass.shells.restrict()
, as shells are now defined by window functions instead of sharp intervals.The
glass.points.effective_bias()
function now takes a window function as input and computes its effective bias parameter.The
glass.galaxies.constant_densities
anddensity_from_dndz
functions have been removed, since densities can now easily be partitioned by window functions usingglass.shells.restrict()
andglass.shells.partition()
.The
zmin
andzmax
parameters ofglass.galaxies.redshifts_from_nz
have been removed for the same reason.The
glass.lensing.multi_plane_weights
function, which computed all lensing weights at once, is replaced by theadd_window
method ofglass.lensing.MultiPlaneConvergence
, which adds a convergence plane given by aRadialWindow
at its effective redshift.The
glass.lensing.multi_plane_matrix()
function now takes a sequence ofRadialWindow
. It no longer returns the list of source redshifts, since these are now independently available as the effective redshifts of the windows.
The arguments of the
MultiPlaneConvergence
methodadd_plane
have been renamed tozsrc
andwlens
from the more ambiguousz
andw
(which could be confused with “window”). The propertiesz
andw
that returned these values have been similarly changed.
2023.1 (31 Jan 2023)¶
Initial wide release for GLASS paper
This was the initial full release of GLASS, coinciding with the release of preprint arXiv:2302.01942.