Autolens

Latest version: v2024.5.16.0

Safety actively analyzes 630360 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 5

2024.5.16.0

**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

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](https://github.com/Jammy2211/PyAutoGalaxy/assets/23455639/c2cb65b1-64b1-4d65-b3db-83dd4f12a3a1)

- Improved subplots including addition of log10 panels:

![image](https://github.com/Jammy2211/PyAutoGalaxy/assets/23455639/b95a81f2-1428-4e75-b03e-a709963280e2)

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

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.

2023.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](https://github.com/Jammy2211/PyAutoLens/assets/23455639/ffd454dc-47e1-42fb-8e2a-fa807c221247)

Here is an example of the `search.json` file:

![image](https://github.com/Jammy2211/PyAutoLens/assets/23455639/96015619-22fc-47a9-af3f-c050a7d5e267)

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.

2023.7.5.2

Bug fixes for new MacOS parallelization.

No new features.

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.

Page 1 of 5

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.