Recent Releases of PyAutoLens

PyAutoLens - May 2025

  • Results workflow API, which generates .csv, .png and .fits files of large libraries of results for quick and efficient inspection:

https://github.com/Jammy2211/autolens_workspace/tree/main/notebooks/results/workflow

  • Visualization now outputs .fits files corresponding to each subplot, which more concisely contain all information of a fit and are used by the above workflow API.

  • Visualization Simplified, removing customization of individual image outputs.

  • Remove Analysis summing API, replacing all dataset combinations with AnalysisFactor and FactorGraphModel API used for graphical modeling:

https://github.com/Jammy2211/autolensworkspace/blob/main/notebooks/advanced/multi/modeling/starthere.ipynb

  • Pixelized source reconstruction output as a .csv file which can be loaded and interpolated for better source science analysis.

  • Double source plane lens modeling now outputs individual subplot_fit for each plane.

  • Latent variable API bug fixes and now used in some test example scripts.

Scientific Software - Peer-reviewed - Python
Published by Jammy2211 8 months ago

PyAutoLens - January 2025

The main updates are visualization of Delaunay mesh's using Delaunah triangles and a significant refactoring of over sampling, with the primary motivation to make the code much less complex for the ongoing JAX implementation.

There have also been more improvements to point source modeling, including JAX functionality, which will be documented fully in the near future.

What's Changed

  • Feature/disable noise by @Jammy2211 in https://github.com/Jammy2211/PyAutoLens/pull/324
  • feature/delaunay_visual by @Jammy2211 in https://github.com/Jammy2211/PyAutoLens/pull/323
  • feature/inversionnoisemap by @Jammy2211 in https://github.com/Jammy2211/PyAutoLens/pull/325
  • feature/positionslhmass_centre by @Jammy2211 in https://github.com/Jammy2211/PyAutoLens/pull/326
  • feature/triangle array typing by @rhayes777 in https://github.com/Jammy2211/PyAutoLens/pull/328
  • feature/array testing by @rhayes777 in https://github.com/Jammy2211/PyAutoLens/pull/327
  • Feature/over sampling refactor by @Jammy2211 in https://github.com/Jammy2211/PyAutoLens/pull/332
  • remove max containing size from solver by @rhayes777 in https://github.com/Jammy2211/PyAutoLens/pull/329
  • feature/andrew implementation by @rhayes777 in https://github.com/Jammy2211/PyAutoLens/pull/331

Full Changelog: https://github.com/Jammy2211/PyAutoLens/compare/2024.11.13.2...2025.1.18.7

Scientific Software - Peer-reviewed - Python
Published by Jammy2211 11 months ago

PyAutoLens - November 2024 update

Small bug fixes and optimizations for Euclid lens modeling pipeline.

Scientific Software - Peer-reviewed - Python
Published by Jammy2211 about 1 year ago

PyAutoLens - November 2024

Minor release with stability updates and one main feature.

  • Extra Galaxies API for modeling multiple galaxies at once: https://github.com/Jammy2211/autolensworkspace/blob/release/notebooks/features/extragalaxies.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.

Scientific Software - Peer-reviewed - Python
Published by Jammy2211 about 1 year ago

PyAutoLens - 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/optionalrequirements.txt https://github.com/Jammy2211/PyAutoGalaxy/blob/main/requirements.txt https://github.com/Jammy2211/PyAutoGalaxy/blob/main/optionalrequirements.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/overview2newuserguide.html

PyAutoLens:

  • Point source modeling significantly improved with triangle tracing method, image plane chi squared supported: https://github.com/Jammy2211/autolensworkspace/tree/release/notebooks/modeling/pointsource
  • Shape based point-source modeling for magnification calculations: https://github.com/Jammy2211/PyAutoLens/pull/300
  • Improved Cosmology wrapper to support new astropy and easier to use in models: https://github.com/Jammy2211/PyAutoGalaxy/pull/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: https://github.com/rhayes777/PyAutoFit/pull/1022
  • Support for NumPy arrays in model composition and prior creation, for example creating an ndarray of input shape where each value is a free parameter in the seach: https://github.com/rhayes777/PyAutoFit/pull/1021
  • Name of optimize searches renamed to mle, for maximum likelihood estimator, with improvements to visualization: https://github.com/rhayes777/PyAutoFit/pull/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.

Scientific Software - Peer-reviewed - Python
Published by Jammy2211 over 1 year ago

PyAutoLens - May 2024

PyAutoFit:

  • Nautilus now outputs results on the fly: https://github.com/rhayes777/PyAutoFit/pull/961
  • Output latent samples of a model-fit, which are parameters derived from a model which may be marginalized over:

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
  • All samples with a weight below an input value are now removed from samples.csv to save hard disk space: https://github.com/rhayes777/PyAutoFit/pull/979
  • Documentation describing autofit scientific workflow: https://github.com/rhayes777/PyAutoFit/pull/1011
  • Refactor visualization into stand alone module: https://github.com/rhayes777/PyAutoFit/pull/995
  • Refactor how results are returned after a search: https://github.com/rhayes777/PyAutoFit/pull/989
  • Improved parallelism logging: https://github.com/rhayes777/PyAutoFit/pull/1009
  • Likelihood consistency check now performed internally: https://github.com/rhayes777/PyAutoFit/pull/987
  • Generation of initial search samples is now performed in parallel: https://github.com/rhayes777/PyAutoFit/pull/997
  • No longer store search_internal on hard-disk. simplifying source code internals: https://github.com/rhayes777/PyAutoFit/pull/938
  • Multiple small bug fixes and improvements to interface.

PyAutoGalaxy / PyAutoLens:

  • Remove Plane object and replace with Galaxies object
  • Shapelets improvements: https://github.com/Jammy2211/PyAutoGalaxy/pull/173
  • Adaptive over sampling of grids for a pixelization: https://github.com/Jammy2211/PyAutoGalaxy/pull/168
  • BasisPlotter which plots each basis (e.g. each Gaussian of an MGE): https://github.com/Jammy2211/PyAutoGalaxy/pull/173
  • Plot mappings between source and image plane of a pixelization as lines: https://github.com/Jammy2211/PyAutoGalaxy/pull/172
  • For multi-wavelength datasets model offsets between each dataset: https://github.com/Jammy2211/PyAutoGalaxy/pull/171
  • Modeling of background sky: https://github.com/Jammy2211/PyAutoGalaxy/pull/170
  • Improvements to use of adapt images for adaptive pixelizations: https://github.com/Jammy2211/PyAutoGalaxy/pull/160
  • Improved angle conversions for computing errors on mass profile and shear angles from ell_comps: https://github.com/Jammy2211/PyAutoGalaxy/pull/169
  • Remove sub_size from all classes (e.g. Array2D, Mask2D) to simplify API.
  • MaternKernel added: https://github.com/Jammy2211/PyAutoGalaxy/pull/148
  • Refactor of tracer module: https://github.com/Jammy2211/PyAutoLens/pull/255

Scientific Software - Peer-reviewed - Python
Published by Jammy2211 over 1 year ago

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:

image

  • Improved subplots including addition of log10 panels:

image

  • 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)

Scientific Software - Peer-reviewed - Python
Published by Jammy2211 almost 2 years ago

PyAutoLens - 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 from autoconf.
  • Fix bug where nautilus parallel fits sometimes crashed.
  • Fix bug where nautilus single CPU fits did not work.

Scientific Software - Peer-reviewed - Python
Published by Jammy2211 about 2 years ago

PyAutoLens - 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 than dynesty.
  • Parallelization using Python 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:

image

Here is an example of the search.json file:

image

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 (https://github.com/Jammy2211/PyAutoGalaxy/pull/115).
  • Update certain requirements (e.g. PyYAML) to mitigate installation issues (https://github.com/rhayes777/PyAutoConf/pull/41).
  • Lots of quality-of-life improvements thoughout the code bases.

Scientific Software - Peer-reviewed - Python
Published by Jammy2211 over 2 years ago

PyAutoLens - July (2023.5.7.2)

Bug fixes for new MacOS parallelization.

No new features.

Scientific Software - Peer-reviewed - Python
Published by Jammy2211 over 2 years ago

PyAutoLens - June 2023 (2023.6.18.3)

  • 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.

Scientific Software - Peer-reviewed - Python
Published by Jammy2211 over 2 years ago

PyAutoLens - June 2023 (2023.6.12.5)

  • Visualization now outputs publication quality plots by default (e.g. less whitespace, bigger tick labels, units):

https://github.com/Jammy2211/PyAutoGalaxy/pull/96 https://github.com/Jammy2211/PyAutoLens/pull/216

  • Improved visualization of FitImaging and FitInterferometer subpots:

https://github.com/Jammy2211/PyAutoGalaxy/pull/96

  • Profiling tools implemented, with documentation and examples added to workspace:

https://github.com/Jammy2211/PyAutoGalaxy/pull/110

  • PowerLawMultipole method generalized to all multipoles:

https://github.com/Jammy2211/PyAutoGalaxy/pull/103

  • Critical Curves / Caustic plotter separating if there are more than one, and options to customize tangential and radial separately:

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

  • Fix issues associated with visualization of linear light profiles and 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

  • Removal of a number of unused legacy features (e.g. hyper galaxy noise scaling).

https://github.com/Jammy2211/PyAutoLens/pull/219

Scientific Software - Peer-reviewed - Python
Published by Jammy2211 over 2 years ago

PyAutoLens - March 2023 (2023.3.21.5)

This is the latest version, which primarily brings in stability upgrades and fixes bugs.

Scientific Software - Peer-reviewed - Python
Published by Jammy2211 almost 3 years ago

PyAutoLens - 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 Ell tag, for conciseness / readability. For example, EllSersic is now just Sersic, and EllIsothermal is now Isothermal.
  • The Sph prefix is now a suffix, for example SphSersic is now SersicSph and SphIsothermal is now Isothermal.
  • The `elliptical_components parameter has been shorted to ell_comps.
  • The 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.
  • 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 autolensworkspace (https://github.com/Jammy2211/autolensworkspace/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:

https://github.com/Jammy2211/autolensworkspace/blob/release/scripts/imaging/modeling/lightparametriclinearmasstotal_sourceparametric_linear.py

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:

https://github.com/Jammy2211/autolensworkspace/blob/release/scripts/imaging/modeling/lightparametriclinearmasstotal_sourceparametric_linear.py

These features are described fully in the following HowToLens tutorial:

https://github.com/Jammy2211/autolensworkspace/blob/release/scripts/howtolens/chapter2lensmodeling/tutorial5linear_profiles.py

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.

Scientific Software - Peer-reviewed - Python
Published by Jammy2211 almost 3 years ago

PyAutoLens - July 11 2022 Release

  • autolens_workspace now has advanced packages 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/autolensworkspace/blob/release/scripts/imaging/modeling/advanced/lightparametricoperatedmasstotal_sourceparametric.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 (https://github.com/rhayes777/PyAutoFit/pull/562). The example tutorial script for this feature is not written yet.

Scientific Software - Peer-reviewed - Python
Published by Jammy2211 over 3 years ago

PyAutoLens - May 2022

Multiwavelength lens modeling:

  • https://pyautolens.readthedocs.io/en/latest/overview/overview7multi_wavelength.html
  • https://github.com/Jammy2211/autolens_workspace/tree/release/notebooks/multi

Full Likelihood description notebook:

  • https://github.com/Jammy2211/autolenslikelihoodfunction

PyAutoGalaxy full release:

  • https://github.com/Jammy2211/PyAutoGalaxy

Scientific Software - Peer-reviewed - Python
Published by Jammy2211 over 3 years ago

PyAutoLens - March 30 2022

  • Support for Python 3.9, 3.10.
  • LogGaussianPrior implemented.
  • Can output Galaxy, Plane, Tracer to and from json via output_to_json and from_json methods.

Added a step-by-step guide to the log_likelihood_function:

https://github.com/Jammy2211/autolensworkspace/blob/release/notebooks/imaging/modeling/loglikelihood_function/inversion.ipynb

Scientific Software - Peer-reviewed - Python
Published by Jammy2211 over 3 years ago

PyAutoLens - March 2022

Documentation showing how to analyze the results of a lens model fit now available on workspace:

https://github.com/Jammy2211/autolens_workspace/tree/release/notebooks/results

Scientific Software - Peer-reviewed - Python
Published by Jammy2211 almost 4 years ago

PyAutoLens - Winter 2022 Release

The primary new functionality are new source-plane pixelization (Delaunay triangulations and a Voronoi mesh) and regularization schemes which:

  • Use interpolation when pairing source-pixels to traced image-pixels.
  • Use a derivate evaluation scheme to derive the regularization.

These offer a general improvement to the quality of lens modeling using inversions and they correspond to the following classes:

https://pyautolens.readthedocs.io/en/latest/api/generated/autoarray.inversion.pixelizations.DelaunayMagnification.html#autoarray.inversion.pixelizations.DelaunayMagnification

https://pyautolens.readthedocs.io/en/latest/api/generated/autoarray.inversion.pixelizations.DelaunayBrightnessImage.html#autoarray.inversion.pixelizations.DelaunayBrightnessImage

https://pyautolens.readthedocs.io/en/latest/api/generated/autoarray.inversion.pixelizations.VoronoiNNMagnification.html#autoarray.inversion.pixelizations.VoronoiNNMagnification

https://pyautolens.readthedocs.io/en/latest/api/generated/autoarray.inversion.pixelizations.VoronoiNNBrightnessImage.html#autoarray.inversion.pixelizations.VoronoiNNBrightnessImage

Other features include:

  • Directly fitting a lens model to a lens model quantity (e.g. the deflection angles, convergence) as opposed to using data (https://github.com/Jammy2211/autolensworkspace/tree/release/scripts/misc/modelquantity).

  • Cored steep elliptical (CSE) implementation of various stellar and dark matter mass profiles for deflection calculation speed up (https://arxiv.org/pdf/2106.11464.pdf).

  • Simulating lens datasets where the source signal-to-noise ratio is an input (https://github.com/Jammy2211/autolensworkspace/blob/release/notebooks/imaging/simulators/misc/manualsignaltonoise_ratio.ipynb).

Scientific Software - Peer-reviewed - Python
Published by Jammy2211 almost 4 years ago

PyAutoLens - 2021.10.14.21

Note on backwards compatibility

The unique identifers of certain lens model will change as a result of this release, meaning that backwards compatibility may not be possible. We have a tool which updates the identifiers to this version such that existing results can be updated and retained, please contact me on SLACK if this is necessary.

Function Renames

Many core functions have been renamed for conciseness, for example:

deflections_2d_from_grid -> deflections_2d_from convergence_2d_from_grid -> convergence_2d_from

This should not impact general use and the workspace has been updated with new templates using these functions.

Double Source Plane Lens Inversions

Reconstruction of multiple strong lensed sources at different redshifts (e.g. double Einstein ring systems) is now supported, including full model-fitting pipelines. The API for this is a natural extension of the existing API whereby multiple sources are allocated a Pixelization and Regularization:

lens = af.Model( al.Galaxy, redshift=0.5, bulge=af.Model(al.lp.EllSersic), mass=af.Model(al.mp.EllIsothermal) ) source_0 = af.Model( al.Galaxy, redshift=1.0, mass=al.mp.SphericalIsothermal, pixelization=al.pix.VoronoiMagnification, regularization=al.reg.Constant, ) source_1 = af.Model( al.Galaxy, redshift=2.0, pixelization=al.pix.VoronoiMagnification, regularization=al.reg.Constant, ) model = af.Collection(galaxies=af.Collection(lens=lens, source_0=source_0, source_1=source_1))

The following workspace examples demonstrate double source modeling and visualization further:

https://github.com/Jammy2211/autolensworkspace/blob/release/scripts/imaging/modeling/masstotalsourcesisparametricsourceparametric.py https://github.com/Jammy2211/autolensworkspace/blob/release/scripts/imaging/chaining/doubleeinsteinring.py https://github.com/Jammy2211/autolensworkspace/blob/release/scripts/imaging/chaining/pipelines/doubleeinstein_ring.py

https://github.com/Jammy2211/autolensworkspace/blob/release/scripts/plot/plotters/InversionPlotter.py https://github.com/Jammy2211/autolensworkspace/blob/release/scripts/plot/plotters/FitImagingPlotter.py

Signal To Noise Light Profile Simulations

A class of signal-to-noise based light profiles, accessible via the command al.lp_snr, are now available. When used to simulate strtong lens imaging, these light profiles automatically adjust their intensity parameter based on the noise properties simulation to give the desired signal to noise ratio:

bulge=al.lp_snr.EllSersic( signal_to_noise_ratio=50.0, centre=(0.0, 0.0), elliptical_comps=al.convert.elliptical_comps_from(axis_ratio=0.9, angle=45.0), effective_radius=0.6, sersic_index=3.0, ),

When combined with a Tracer the signal to noise of the light profile's image is adjusted based on the ray-traced image, thus it fully accounts for magnification when setting the signal to noise.

A full description of this feature can be found at this link:

https://github.com/Jammy2211/autolensworkspace/blob/release/scripts/imaging/simulators/misc/manualsignaltonoise_ratio.py

W-Tilde Inversion Imaging Formalism

All Imaging Inversion analysis uses a new formalism for the linear algebra, which provides numerically equivalent results to the previous formalism (which is still implemented and used in certain scenarions).

The W-tilde formalism provides a > x3 speed up on high resolution imaging datasets. For example, for HST images with a pixel scale of 0.05" and a circular mask of 3.5", this formalism speeds up the overall run-time of a fit (e.g. one evaluation of the log likelihood function) from 4.8 seconds to 1.55 seconds. For higher resolution data or bigger masks an even more significant speed up is provided.

Users so not need to do anything to activate this formalism, it is now the default method used when an inversion is performed.

Implicit Preloading

Imaging and Interferometer analysis now use implicit preloading, whereby before a model-fit the model is inspected and preloadsare automatically generated for the parts aspects of the model-fit which do not change between each lens model. Previously, these would have been recomputed for every model fit, making the log likelihood evaluation time longer than necessary.

Example quantities which are stored via implicit preloading are:

  • If the light profiles of all galaxies are fixed, their corresponding blurred image-plane image is preloaded and reused for every lens model fit.
  • If the mass profiles of all galaxies are fixed, the deflection angles and ray-tracing do not change. Preloading is used to avoid repeated computation.
  • Numerous aspects of the linear algebra of an inversion can be preloaded depending on which parts of the model do or do not vary.

This will provide significantl speed up for certain lens model fits.

Scientific Software - Peer-reviewed - Python
Published by Jammy2211 about 4 years ago

PyAutoLens - 2021.8.12.1

  • Fixed installation issues due to requirement clashes with scipy.
  • Database and aggregator support GridSearch model-fits, primarily for dark matter subhalo scanning models.
  • Aggregator supports generation of tracers and fits which are drawn randomly from the PDF, for error estimation.
  • Visualization of 1D light profile, mass profile and galaxy profile quantities with errors via the aggregator.
  • More visualization tools, described at https://github.com/Jammy2211/autolens_workspace/tree/release/scripts/plot

Scientific Software - Peer-reviewed - Python
Published by Jammy2211 over 4 years ago

PyAutoLens - Minor fix on pyquad import

Removed the use of pyquad from the EllipticalIsothermal mass profile's potential_2d_from_grid method.

Scientific Software - Peer-reviewed - Python
Published by Jammy2211 over 4 years ago

PyAutoLens - Switch to Date Versioning Scheme

This release switches our versionin scheme to dates of the format year.month.day.release. This version is shared across all PyAuto projects.

There is no major new functionality in this release.

Scientific Software - Peer-reviewed - Python
Published by Jammy2211 over 4 years ago

PyAutoLens - v1.15.3

This release brings in a number of features for improved model-fitting, all of which come from an updated to PyAutoFit:

  • First class support for parallel Dynesty and Emcee model-fits. Previously, parallel fits were slow due to communication overheads, which are now handled correctly with PyAutoFit. One can expect a speed up close to the number of CPUs, for example a fit on 4 CPUs should take ~x4 less time to run. The API to perform a parallel fit is as follows:

search = af.DynestyStatic( path_prefix=path.join("imaging", "modeling"), name="mass[sie]_source[bulge]", unique_tag=dataset_name, nlive=50, number_of_cores=1, # Number of cores controls parallelization )

  • In-built visualization tools for a non-linear search, using each non-linear search's inbuilt visualization libraries. Examples of each visualization are provided at the following link:

https://github.com/Jammy2211/autolens_workspace/tree/release/scripts/plot/search

  • Updated to the unique tag generation, which control the output model folder based on the model, search and name of the dataset.

  • Improved database tools for querying, including queries based on the name of the specific fit of the non-linear search and the dataset name unique tag.

Scientific Software - Peer-reviewed - Python
Published by Jammy2211 over 4 years ago

PyAutoLens - v1.15.2

  • Improved visualization for interferometer modeling, including dirty image, noise-map, residuals, etc.
  • Unique identifier now uses specific settings of a search.

Scientific Software - Peer-reviewed - Python
Published by Jammy2211 over 4 years ago

PyAutoLens - v1.15.1

MAJOR RELEASE:

This release is a major overhaul of the PyAutoLens lens modeling API, and as such means that all results are not backwards compatible. Do not update to this version of autolens if you need to use previous results!

The main purpose of this release are major changes to the PyAutoLens source code that utilize the ‘.sqlite’ database output feature. Large suits of lens modeling results can be output directly to a ‘sqlite’ database, such that the results of model-fits to many tens of thousands of lenses can be efficiently loaded and manipulated in a Jupyter notebook. For those who have used the Aggregator, the Aggregator now interacts with the database.

The database has allowed us to remove some core components and features of PyAutoLens, in particular the removal of phases, output-path tagging and Setup objects. The new API for these features is nevertheless easily recognisable for existing users, and the autolens_workspace contains numerous example scripts for the new API.

Over the next month, we will be fully testing the database feature and are likely to make a number of changes to it. Therefore, if you wish to use the database now you should speak to me on SLACK first.

Phase Removal:

Phases have been completed removing from PyAutoLens, meaning that the PhaseImaging object used to perform model-fitting no longer exists. The following code which would have been used to perform a model fit:

``` phase = al.PhaseImaging( search=af.DynestyStatic(name="phase[example]",nlivepoints=50), galaxies=dict(lens=lensgalaxymodel, source=sourcegalaxymodel), )

result = phase.run(dataset=imaging, mask=mask) ```

Is now performed as follows: search = af.DynestyStatic(name="search[example]", nlive=50) analysis = al.AnalysisImaging(dataset=imaging) result = search.fit(model=model, analysis=analysis) Tagging Removal + Unique Identifier:

The tagging of output folders, where their name was customized based on the model fitted and search used, has been removed. This has been replaced with a unique identifier string which forms the inner folder of the model-fit output path.

This makes the output paths of results consist of many less folders.

SQLite Database:

The database moves the results that are output from the output folder to a ‘.sqlite’ database file, which can then be access like the Aggregator. This database runs significantly faster than the aggregator and supports advanced queries. Information on the database can be found in the database folder on the workspace.

Pipelines + SLaM:

The removal of phases and use of a unique identifier has allowed us to completely change how pipelines runner scripts are written, in a significantly more concise and readable way. If you are familiar with pipelines, the new API should be instantly familiar, but allows for a lot more customization is how the model-fit is performed. An example of a SLAM runner is linked to below:

HowToLens:

I have improved the HowToLens lectures (chapter 1 in particular) and updated them for the new API. In particular, chapter 2 now focused on just lens modeling whereas chapter 3 focused entirely on search chaining + pipelines.

GalaxyModel Removal:

The GalaxyModel object has been removed, and can now be created via the af.Model command: lens_galaxy_model = af.Model(al.Galaxy, redshift=0.5, mass=al.mp.SphIsothermal) 1D Data Structures + Figures:

One dimensional data structures (e.g. Array1D, Grid1D) have been added. These can be input into Profile objects to compute quantities like the convergence in 1D, e.g. convergence_1d_from_grid(grid=grid).

If a 2D gird is input into a 1D function, the 2D grid is projected to 1D from the centre of the profile and along its major axis, such that this quantity can be cleanly plotted in 1D.

One dimensional plots of the convergence and potential are now accessible in ProfilePlotter and GalaxyPlotter objects.

Name changes:

The following names of objects have been changed:

`Elliptical` -> `Ell` (e.g. `EllipticalIsothermal` -> `ElIIsothermal`) `Sphericall` -> `Sph` (e.g. `SphericalIsothermal` -> `SphIsothermal`) `CollectionPriorModel` -> `Collection` `PriorModel` -> `Model` `image_from_grid` -> `image_2d_from_grid` `convergence_from_grid` -> `convergence_2d_from_grid` `potential_from_grid` -> `potential_2d_from_grid` `deflections_from_grid` -> `deflections_2d_from_grid`

Scientific Software - Peer-reviewed - Python
Published by Jammy2211 over 4 years ago

PyAutoLens - Journal of Open Source Software Zenodo Release

Tagged release for PyAutoLens JOSS submission.

Scientific Software - Peer-reviewed - Python
Published by Jammy2211 almost 5 years ago

PyAutoLens -

API changes:

A number of data structure objects have been renamed to make their dimensionality explicit (e.g. Grid -> Grid2D , Array -> Array2D). The method in2d of data structures is now called native whereas in1d is now slim.

Visualization:

  • Major visualization refactor with minor change to Plotter API.
  • Methods which wrap matploitlib methods now have a dedicated config file for default settings.
  • Visuals can be manually added to any figure, or plotted via Include. plotter methods are now Plotter classes instead of plotter functions.
  • A complete API reference guide of the new visualization tools can be found at autolens_workspace/notebooks/plot. This includes examples of how to plot every object and how to customize every matplotlib method that is called.

Decomposed Lens Modeling pipelines:

Although decomposed (e.g. stellar + dark) modeling has been feasible in PyAutoLens for a while, the SLaM pipelines on the autolens_workspace have now been comprehensively tested on mock and real datasets and are ready for generic adoption to any science use-case.

See autolensworkspace/notebooks/advanced/slam/withlens_light for example pipelines.

Interferometer:

Support for interferometer analysis with PyLops is now fully functionality, which makes analysing millions of visibilities with pixelized sources feasible.

Scientific Software - Peer-reviewed - Python
Published by Jammy2211 almost 5 years ago

PyAutoLens - Fleshed out API

A fleshed out API with tutorials is provided. Fully functional lensing pipelines for parameterised lens model fitting can now be written.

Scientific Software - Peer-reviewed - Python
Published by rhayes777 about 7 years ago

PyAutoLens - Basic CLI

AutoLens can now be installed and used in a basic way to run the profile only pipeline.

pip install autolens autolens pipeline profile --image=data/integration/hst_0/ --pixel-scale=0.05

Scientific Software - Peer-reviewed - Python
Published by rhayes777 over 7 years ago