There is a newer version of the record available.

Published April 15, 2021 | Version v1.15.1
Software Open

Jammy2211/PyAutoLens: v1.15.1

  • 1. RGH Software
  • 2. Durham University
  • 3. The University of Nottingham
  • 4. http://estallidos.ciemat.es
  • 5. @github

Description

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]",n_live_points=50),
    galaxies=dict(lens=lens_galaxy_model, source=source_galaxy_model),
)

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`

Files

Jammy2211/PyAutoLens-v1.15.1.zip

Files (6.4 MB)

Name Size Download all
md5:5312b6d3c01611d244b0e08a0ac4bcb5
6.4 MB Preview Download

Additional details

Related works