PyAutoArray provides arrays, masks, coordinate grids and numerical tools for astronomical imaging and interferometer data. It powers the data handling and image reconstruction in PyAutoGalaxy and PyAutoLens.
If you want to model galaxies or gravitational lenses, start with PyAutoGalaxy or PyAutoLens. Use PyAutoArray directly when you need these building blocks in your own Python code.
Install the package:
pip install autoarrayCreate a two-dimensional array with a pixel scale:
import autoarray as aa
image = aa.Array2D.no_mask(
values=[[1.0, 2.0], [3.0, 4.0]],
pixel_scales=0.1,
)Create a circular mask and a grid of coordinates for its unmasked pixels:
mask = aa.Mask2D.circular(
shape_native=(50, 50),
pixel_scales=0.1,
radius=2.0,
)
grid = aa.Grid2D.from_mask(mask=mask)- Galaxy modeling examples — see arrays, grids and masks used in galaxy analysis.
- Lensing examples — explore their use in gravitational lens modeling.
- Source code — explore the data structures and numerical tools.
- Tests — find focused examples of individual components.
Ask questions, suggest improvements and share your work in PyAutoLabs Discussions, or chat with us on Slack.
To contribute, see the contribution guide.
See the license.