Skip to content

Releases: Jammy2211/PyAutoLens

June 2023 (2023.6.12.5)

07 Jun 10:56
Compare
Choose a tag to compare
  • Visualization now outputs publication quality plots by default (e.g. less whitespace, bigger tick labels, units):

Jammy2211/PyAutoGalaxy#96
#216

  • Improved visualization of FitImaging and FitInterferometer subpots:

Jammy2211/PyAutoGalaxy#96

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

Jammy2211/PyAutoGalaxy#110

  • PowerLawMultipole method generalized to all multipoles:

Jammy2211/PyAutoGalaxy#103

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

Jammy2211/PyAutoGalaxy#92

  • SMBH and SMBHBinary 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:

Jammy2211/PyAutoGalaxy#108

  • ExternalShear now has potential_2d_from method implemented:

Jammy2211/PyAutoGalaxy#109

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

#219

March 2023 (2023.3.27.1)

March 2023 (2023.3.21.5)

21 Mar 18:49
Compare
Choose a tag to compare

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

January 2023

15 Jan 18:03
Compare
Choose a tag to compare

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_componentsparameter has been shorted toell_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

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/autolens_workspace/blob/release/scripts/imaging/modeling/light_parametric_linear__mass_total__source_parametric_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/autolens_workspace/blob/release/scripts/imaging/modeling/light_parametric_linear__mass_total__source_parametric_linear.py

These features are described fully in the following HowToLens tutorial:

https://github.com/Jammy2211/autolens_workspace/blob/release/scripts/howtolens/chapter_2_lens_modeling/tutorial_5_linear_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.

July 11 2022 Release

10 Jul 21:56
Compare
Choose a tag to compare

May 2022

March 30 2022

30 Mar 16:06
Compare
Choose a tag to compare
  • 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/autolens_workspace/blob/release/notebooks/imaging/modeling/log_likelihood_function/inversion.ipynb

March 2022

21 Mar 13:00
Compare
Choose a tag to compare

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

Winter 2022 Release

14 Feb 19:33
Compare
Choose a tag to compare

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:

2021.10.14.21

14 Oct 20:51
Compare
Choose a tag to compare

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/autolens_workspace/blob/release/scripts/imaging/modeling/mass_total__source_sis_parametric__source_parametric.py
https://github.com/Jammy2211/autolens_workspace/blob/release/scripts/imaging/chaining/double_einstein_ring.py
https://github.com/Jammy2211/autolens_workspace/blob/release/scripts/imaging/chaining/pipelines/double_einstein_ring.py

https://github.com/Jammy2211/autolens_workspace/blob/release/scripts/plot/plotters/InversionPlotter.py
https://github.com/Jammy2211/autolens_workspace/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/autolens_workspace/blob/release/scripts/imaging/simulators/misc/manual_signal_to_noise_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.