PyAutoLens: Open Source Strong Gravitational Lensing
PyAutoFit:
Nautilus
now outputs results on the fly: https://github.com/rhayes777/PyAutoFit/pull/961
PR: https://github.com/rhayes777/PyAutoFit/pull/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: https://github.com/rhayes777/PyAutoFit/pull/1012
samples.csv
to save hard disk space: https://github.com/rhayes777/PyAutoFit/pull/979
search_internal
on hard-disk. simplifying source code internals: https://github.com/rhayes777/PyAutoFit/pull/938
PyAutoGalaxy / PyAutoLens:
Plane
object and replace with Galaxies
objectBasisPlotter
which plots each basis (e.g. each Gaussian of an MGE): https://github.com/Jammy2211/PyAutoGalaxy/pull/173
ell_comps
: https://github.com/Jammy2211/PyAutoGalaxy/pull/169
sub_size
from all classes (e.g. Array2D
, Mask2D
) to simplify API.MaternKernel
added: https://github.com/Jammy2211/PyAutoGalaxy/pull/148
Pixelization
API now has separate entry for an image_mesh
, defining how the source pixel centres are computed (E.g. using a KMeans clustering) and the mesh
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 on KMeans
clustering for creating the distribution of source pixels for a pixelization and inversion.
Simplified adapt_dataset
API to now only pass via an AdaptImage
class, which is not passed as Galaxy
attributes anymore but instead through the FitImaging
object.
Removed SetupAdapt
object and pass image_mesh_pixels
as an integer through pipelines.
Added Exponential / Gaussian smoothing kernels for regularization documented in Vernardos 2022 (https://arxiv.org/abs/2202.09378)
numpy
, scipy
, scikit-learn
)..pickle
outputs to .json
/ .fits
/ .csv
.Samples
object much more efficient.output_to_json
, from_json
, to_dict
) are now all handled and called from autoconf
.nautilus
parallel fits sometimes crashed.nautilus
single CPU fits did not work.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:
n_live
, so is simpler to use than dynesty
.multiprocessing
is more efficient than dynesty
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.Bug fixes for new MacOS parallelization.
No new features.
Fixes bug so that the all_at_end_png
and all_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.
https://github.com/Jammy2211/PyAutoGalaxy/pull/96 https://github.com/Jammy2211/PyAutoLens/pull/216
FitImaging
and FitInterferometer
subpots:https://github.com/Jammy2211/PyAutoGalaxy/pull/96
https://github.com/Jammy2211/PyAutoGalaxy/pull/110
PowerLawMultipole
method generalized to all multipoles:https://github.com/Jammy2211/PyAutoGalaxy/pull/103
https://github.com/Jammy2211/PyAutoGalaxy/pull/92
SMBH
and SMBHBinary
super massive black hole mass profiles implemented:https://github.com/Jammy2211/PyAutoGalaxy/pull/98 https://github.com/Jammy2211/PyAutoGalaxy/pull/99
Basis
objects:https://github.com/Jammy2211/PyAutoGalaxy/pull/102 https://github.com/Jammy2211/PyAutoLens/pull/217
PowerLaw
potential_2d_from
method faster:https://github.com/Jammy2211/PyAutoGalaxy/pull/108
ExternalShear
now has potential_2d_from
method implemented:https://github.com/Jammy2211/PyAutoGalaxy/pull/109
This is the latest version, which primarily brings in stability upgrades and fixes bugs.
This is a major release, which updates many aspects of the API, switches configuration files to YAML, requirements, etc.
API Changes:
Ell
tag, for conciseness / readability. For example, EllSersic
is now just Sersic
, and EllIsothermal
is now Isothermal
.Sph
prefix is now a suffix, for example SphSersic
is now SersicSph
and SphIsothermal
is now Isothermal
.parameter has been shorted to
ell_comps`.ExternalShear
input has been changed from elliptical_components
to gamma_1
and gamma_2
(the shear is still defined the same, where in the olversion version elliptical_components[0] = gamma_2
and elliptical_components[1] = gamma_1
.manual_
API for data structures (e.g. Array2D
, Grid2D
) has been removed.Yaml Configs
.yaml
, which is provided with the autolens_workspace (https://github.com/Jammy2211/autolens_workspace/tree/release/config).Linear Light Profiles / Basis / Multi Gaussian Expansion
Linear light profiles are now supported, which are identical to ordinary light profiles but the intensity
parameter is solved for via linear algebra. This means lower dimensionality models can be fitted, making dynesty converge more reliably:
Fits use a Basis
object composed of many linear light profiles are supports, for example using a Multi Gaussian Expansion of 20+ Gaussians to fit the lens's light:
These features are described fully in the following HowToLens
tutorial:
API Documentation
API documentation on readthedocs is now being written, which is still a work in progress but more useable than it was previously (https://pyautolens.readthedocs.io/en/latest/api/data.html).
SLaM V2
The Source, Light and Mass (SLaM) pipelines have been updated to a version 2, which simplifies the pipelines and makes the API more concise (https://github.com/Jammy2211/autolens_workspace/tree/release/slam).
Requirements
The requirements of many projects have been updated to their latest versions, most notably dynesty v2.0.2
.