PyAutoArray: Arrays, Grids and Masks for Astronomy
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.
Getting Started
Install the package:
pip install autoarray
Create 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)
Explore Further
Community and Contributing
Ask questions, suggest improvements and share your work in PyAutoLabs Discussions, or chat with us on Slack.
To contribute, see the contribution guide.
License
See the license.
me next to you / and you next to me