Releases: PyAutoLabs/PyAutoLens
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:
PixelizationAPI now has separate entry for animage_mesh, defining how the source pixel centres are computed (E.g. using a KMeans clustering) and themeshis 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
Hilbertimage-mesh which is a significant improvement onKMeansclustering for creating the distribution of source pixels for a pixelization and inversion. -
Simplified
adapt_datasetAPI to now only pass via anAdaptImageclass, which is not passed asGalaxyattributes anymore but instead through theFitImagingobject. -
Removed
SetupAdaptobject and passimage_mesh_pixelsas 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
.pickleoutputs to.json/.fits/.csv. - Database use of
Samplesobject 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
nautilusparallel fits sometimes crashed. - Fix bug where
nautilussingle 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
multiprocessingis more efficient thandynestyand 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/featuressplit 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 (PyAutoLabs/PyAutoGalaxy#115).
- Update certain requirements (e.g. PyYAML) to mitigate installation issues (PyAutoLabs/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_pngandall_at_end_fitsvisualization configuration options now actually do output all images at the end of a model-fit as.pngand.fitsfiles. -
Fixes bug so that pixelized source reconstructions are output as
.fitsfiles 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):
PyAutoLabs/PyAutoGalaxy#96
#216
- Improved visualization of
FitImagingandFitInterferometersubpots:
- Profiling tools implemented, with documentation and examples added to workspace:
PowerLawMultipolemethod generalized to all multipoles:
- Critical Curves / Caustic plotter separating if there are more than one, and options to customize tangential and radial separately:
SMBHandSMBHBinarysuper massive black hole mass profiles implemented:
PyAutoLabs/PyAutoGalaxy#98
PyAutoLabs/PyAutoGalaxy#99
- Fix issues associated with visualization of linear light profiles and
Basisobjects:
PyAutoLabs/PyAutoGalaxy#102
#217
PowerLawpotential_2d_frommethod faster:
ExternalShearnow haspotential_2d_frommethod implemented:
- Removal of a number of unused legacy features (e.g. hyper galaxy noise scaling).
March 2023 (2023.3.27.1)
March 2023 (2023.3.21.5)
This is the latest version, which primarily brings in stability upgrades and fixes bugs.
January 2023
This is a major release, which updates many aspects of the API, switches configuration files to YAML, requirements, etc.
API Changes:
- All elliptical light profiles and mass profiles no longer prefix with the
Elltag, for conciseness / readability. For example,EllSersicis now justSersic, andEllIsothermalis nowIsothermal. - The
Sphprefix is now a suffix, for exampleSphSersicis nowSersicSphandSphIsothermalis nowIsothermal. - The ``elliptical_components
parameter has been shorted toell_comps`. - The
ExternalShearinput has been changed fromelliptical_componentstogamma_1andgamma_2(the shear is still defined the same, where in the olversion versionelliptical_components[0] = gamma_2andelliptical_components[1] = gamma_1. - The
manual_API for data structures (e.g.Array2D,Grid2D) has been removed.
Yaml Configs
- Configuration files now support
.yaml, which is provided with the autolens_workspace (https://github.com/Jammy2211/autolens_workspace/tree/release/config). - The workspace configuration files are now fully documented,.
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.
July 11 2022 Release
-
autolens_workspace now has
advancedpackages which make navigation simpler for new users to find beginner scritps. -
Redesign of position based lens mass model resampling. This feature now uses a likelihood penalty term based API, which includes a new default approach which traces (y,x) coordinates of multiple images from the image plane to the source plane and decreases the likelihood based on how far part in the source-plane they are (as opposed to resampling the mass model). See this doc for a full descritipon (https://pyautolens.readthedocs.io/en/latest/general/demagnified_solutions.html).
-
If the position-based likelihood penalty term is not included in a fit using an
Inversion(e.g. pixelized source reconstruction) an exception is raised, because the fit will likely cause a demagnified solution. This can be disabled manually (see https://pyautolens.readthedocs.io/en/latest/general/demagnified_solutions.html). -
LightProfileOperated objects implemented, which are already convolved with the imaging dataset's PSF for modeling point source components in a galaxy (see https://github.com/Jammy2211/autolens_workspace/blob/release/scripts/imaging/modeling/advanced/light_parametric_operated__mass_total__source_parametric.py).
-
Numba is now an optional installation, see this doc page for a full description (https://pyautolens.readthedocs.io/en/latest/installation/numba.html).
-
Starting point API for starting an MCMC fit with walkers in certain positions or maximum likelihood estimator fit with a start point implemented (PyAutoLabs/PyAutoFit#562). The example tutorial script for this feature is not written yet.



