Releases: Jammy2211/PyAutoLens
November 2024 update
Small bug fixes and optimizations for Euclid lens modeling pipeline.
November 2024
Minor release with stability updates and one main feature.
-
Extra Galaxies API for modeling multiple galaxies at once: https://github.com/Jammy2211/autolens_workspace/blob/release/notebooks/features/extra_galaxies.ipynb
-
Multiwavelength lens modeling with SLaM multi wavelength pipelines: https://github.com/Jammy2211/autolens_workspace/tree/main/scripts/advanced/chaining/slam/multi
-
More improvements to Point source solver and Shape solver.
-
Sensitivity mapping improvements which will be fully documented in the future.
September 2024
This release updates all projects to support Python 3.12, with support tested for Python 3.9 - 3.12 and 3.11 regarded as most stable.
This includes many project dependency updates:
https://github.com/rhayes777/PyAutoFit/blob/main/requirements.txt
https://github.com/rhayes777/PyAutoFit/blob/main/optional_requirements.txt
https://github.com/Jammy2211/PyAutoGalaxy/blob/main/requirements.txt
https://github.com/Jammy2211/PyAutoGalaxy/blob/main/optional_requirements.txt
https://github.com/Jammy2211/PyAutoLens/blob/main/requirements.txt
https://github.com/Jammy2211/PyAutoLens/blob/main/optional_requirements.txt
Workspace Restructure:
This release has a workspace restructure, which is now grouped at a high level by tasks (e.g. modeling
, simulators
) rather than datasets:
https://github.com/Jammy2211/autolens_workspace
The readthedocs have been greatly simplified and include a new user guide to help navigate the new workspace:
https://pyautolens.readthedocs.io/en/latest/overview/overview_2_new_user_guide.html
PyAutoLens:
- Point source modeling significantly improved with triangle tracing method, image plane chi squared supported: https://github.com/Jammy2211/autolens_workspace/tree/release/notebooks/modeling/point_source
- Shape based point-source modeling for magnification calculations: #300
- Improved Cosmology wrapper to support new
astropy
and easier to use in models: Jammy2211/PyAutoGalaxy#193 - Ellipse Fitting: https://github.com/Jammy2211/autogalaxy_workspace/tree/release/notebooks/advanced/misc/ellipse
PyAutoFit:
https://github.com/rhayes777/PyAutoFit/pulls?q=is%3Apr+is%3Aclosed
- Improvements to HowToFit lectures: rhayes777/PyAutoFit#1022
- Support for NumPy arrays in model composition and prior creation, for example creating an
ndarray
of inputshape
where each value is a free parameter in the seach: rhayes777/PyAutoFit#1021 - Name of
optimize
searches renamed tomle
, for maximum likelihood estimator, with improvements to visualization: rhayes777/PyAutoFit#1029 - Improvement to sensitivity mapping functionality and results: https://github.com/rhayes777/PyAutoFit/pulls?q=is%3Apr+is%3Aclosed
- More improvements to JAX Pytree interface, documentation still to come.
May 2024
PyAutoFit:
Nautilus
now outputs results on the fly: rhayes777/PyAutoFit#961- Output latent samples of a model-fit, which are parameters derived from a model which may be marginalized over:
PR: rhayes777/PyAutoFit#994
Example: https://github.com/Jammy2211/autofit_workspace/blob/release/notebooks/cookbooks/analysis.ipynb
model.info
file displays complex models in a more concise and readable way: rhayes777/PyAutoFit#1012- All samples with a weight below an input value are now removed from
samples.csv
to save hard disk space: rhayes777/PyAutoFit#979 - Documentation describing autofit scientific workflow: rhayes777/PyAutoFit#1011
- Refactor visualization into stand alone module: rhayes777/PyAutoFit#995
- Refactor how results are returned after a search: rhayes777/PyAutoFit#989
- Improved parallelism logging: rhayes777/PyAutoFit#1009
- Likelihood consistency check now performed internally: rhayes777/PyAutoFit#987
- Generation of initial search samples is now performed in parallel: rhayes777/PyAutoFit#997
- No longer store
search_internal
on hard-disk. simplifying source code internals: rhayes777/PyAutoFit#938 - Multiple small bug fixes and improvements to interface.
PyAutoGalaxy / PyAutoLens:
- Remove
Plane
object and replace withGalaxies
object - Shapelets improvements: Jammy2211/PyAutoGalaxy#173
- Adaptive over sampling of grids for a pixelization: Jammy2211/PyAutoGalaxy#168
BasisPlotter
which plots each basis (e.g. each Gaussian of an MGE): Jammy2211/PyAutoGalaxy#173- Plot mappings between source and image plane of a pixelization as lines: Jammy2211/PyAutoGalaxy#172
- For multi-wavelength datasets model offsets between each dataset: Jammy2211/PyAutoGalaxy#171
- Modeling of background sky: Jammy2211/PyAutoGalaxy#170
- Improvements to use of adapt images for adaptive pixelizations: Jammy2211/PyAutoGalaxy#160
- Improved angle conversions for computing errors on mass profile and shear angles from
ell_comps
: Jammy2211/PyAutoGalaxy#169 - Remove
sub_size
from all classes (e.g.Array2D
,Mask2D
) to simplify API. MaternKernel
added: Jammy2211/PyAutoGalaxy#148- Refactor of tracer module: #255
January 2024 (2024.1.27.4)
- Log10 plots implemented in 1D and 2D, which show certain quantities (e.g. galaxy convergence) more clear and include contours showing log10 values:
- Improved subplots including addition of log10 panels:
Pixelization
API now has separate entry for animage_mesh
, defining how the source pixel centres are computed (E.g. using a KMeans clustering) and themesh
is now just the method (e.g.Delaunay
):
pixelization = al.Pixelization(
image_mesh=al.image_mesh.Overlay(shape=(25, 25)),
mesh=al.mesh.Delaunay(),
regularization=al.reg.Constant(coefficient=1.0),
)
-
Implemented
Hilbert
image-mesh which is a significant improvement onKMeans
clustering for creating the distribution of source pixels for a pixelization and inversion. -
Simplified
adapt_dataset
API to now only pass via anAdaptImage
class, which is not passed asGalaxy
attributes anymore but instead through theFitImaging
object. -
Removed
SetupAdapt
object and passimage_mesh_pixels
as an integer through pipelines. -
Added Exponential / Gaussian smoothing kernels for regularization documented in Vernardos 2022 (https://arxiv.org/abs/2202.09378)
October 2023 (2023.10.23.3)
- Support for Python 3.11 by updating requirement on core libraries (e.g.
numpy
,scipy
,scikit-learn
). - Fix issues with sqlite database following switch from
.pickle
outputs to.json
/.fits
/.csv
. - Database use of
Samples
object much more efficient. - Methods to output classes to hard-disk (e.g.
output_to_json
,from_json
,to_dict
) are now all handled and called fromautoconf
. - Fix bug where
nautilus
parallel fits sometimes crashed. - Fix bug where
nautilus
single CPU fits did not work.
September (v2023.9.18.4)
This release implements two major changes to PyAutoLens:
Nautilus:
For the past ~3 years, lens model fitting has used the nested sampling algorithm Dynesty.
Recently, a new nested sampler, Nautilus (https://nautilus-sampler.readthedocs.io/en/stable/), was released, which uses machine-learning based techniques to improve sampling.
Extensive testing of lens modeling with Nautilus has revealed that it:
- Speeds up the fitting of simple lens models by ~x2 - x3.
- Speeds up the fitting of complex lens models by ~x3 - x5+.
- Is more robust and reliable (e.g less likely to infer a local maxima, can fit more complex lens models).
- Controlled predominantly by just one parameter
n_live
, so is simpler to use thandynesty
. - Parallelization using Python
multiprocessing
is more efficient thandynesty
and now supports proper error handling.
Nautilus
is therefore now the default lens modeler, with all workspace examples updated accordingly.
NOTE: Nautilus
does not currently support on-the-fly output and to get the results of a lens model mid-fit a user can instead cancel the run (e.g. via Ctrl + C) and restart it, where the maximum likelihood model will be output.
Results Output
Result metadata was previously output as .pickle
files, which were not human readable and depended on project imports, hurting backwards compatibility.
All metadata is now output as human readable .json
files and dataset as .fits
files, making it a lot more straight forward for a user to interpret how data is stored internally within PyAutoLens:
Here is an example of the search.json
file:
All internal functionality (e.g. the sqlite database) has been updated to use these files.
All workspace documentation has been updated accordingly.
Other:
imaging/modeling/features
split to make linear light profiles and multi gaussian expansion more visible.- Improved HowToLens tutorial 5 on linear light profiles.
- Power law with multipole parameterization updated, now supports multipoles of any order (Jammy2211/PyAutoGalaxy#115).
- Update certain requirements (e.g. PyYAML) to mitigate installation issues (rhayes777/PyAutoConf#41).
- Lots of quality-of-life improvements thoughout the code bases.
July (2023.5.7.2)
Bug fixes for new MacOS parallelization.
No new features.
June 2023 (2023.6.18.3)
-
Fixes bug so that the
all_at_end_png
andall_at_end_fits
visualization configuration options now actually do output all images at the end of a model-fit as.png
and.fits
files. -
Fixes bug so that pixelized source reconstructions are output as
.fits
files at the end. -
Fixes bug so that visuals at end display correctly.
June 2023 (2023.6.12.5)
- Visualization now outputs publication quality plots by default (e.g. less whitespace, bigger tick labels, units):
Jammy2211/PyAutoGalaxy#96
#216
- Improved visualization of
FitImaging
andFitInterferometer
subpots:
- Profiling tools implemented, with documentation and examples added to workspace:
PowerLawMultipole
method generalized to all multipoles:
- Critical Curves / Caustic plotter separating if there are more than one, and options to customize tangential and radial separately:
SMBH
andSMBHBinary
super massive black hole mass profiles implemented:
Jammy2211/PyAutoGalaxy#98
Jammy2211/PyAutoGalaxy#99
- Fix issues associated with visualization of linear light profiles and
Basis
objects:
Jammy2211/PyAutoGalaxy#102
#217
PowerLaw
potential_2d_from
method faster:
ExternalShear
now haspotential_2d_from
method implemented:
- Removal of a number of unused legacy features (e.g. hyper galaxy noise scaling).