Metadata-Version: 2.4
Name: autoarray
Version: 2026.7.3.648
Summary: PyAuto Data Structures
Author-email: James Nightingale <James.Nightingale@newcastle.ac.uk>, Richard Hayes <richard@rghsoftware.co.uk>
License: MIT
Project-URL: Homepage, https://github.com/PyAutoLabs/PyAutoArray
Keywords: cli
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering :: Physics
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: autoconf==2026.7.3.648
Requires-Dist: astropy<=7.2.0,>=5.0
Requires-Dist: decorator>=4.0.0
Requires-Dist: dill>=0.3.1.1
Requires-Dist: matplotlib>=3.7.0
Requires-Dist: scipy<=1.17.1
Requires-Dist: scikit-image<=0.26.0
Requires-Dist: scikit-learn<=1.8.0
Requires-Dist: tqdm
Provides-Extra: jax
Requires-Dist: autoconf[jax]; extra == "jax"
Provides-Extra: optional
Requires-Dist: autoarray[jax]; extra == "optional"
Requires-Dist: numba; extra == "optional"
Requires-Dist: nufftax<0.5.0,>=0.4.0; python_version >= "3.12" and extra == "optional"
Requires-Dist: pynufft; extra == "optional"
Requires-Dist: tensorflow-probability==0.25.0; extra == "optional"
Provides-Extra: test
Requires-Dist: pytest; extra == "test"
Provides-Extra: dev
Requires-Dist: pytest; extra == "dev"
Requires-Dist: black; extra == "dev"
Requires-Dist: numba; extra == "dev"
Requires-Dist: nufftax<0.5.0,>=0.4.0; python_version >= "3.12" and extra == "dev"
Requires-Dist: pynufft==2022.2.2; extra == "dev"
Dynamic: license-file

# PyAutoArray

**PyAutoArray** (package `autoarray`) is the low-level data-structure and
numerical-utility layer of the [PyAuto](https://github.com/PyAutoLabs)
ecosystem. It provides masks, arrays, (y,x) coordinate grids,
imaging/interferometer datasets, inversions/pixelizations for source
reconstruction, and convolution/over-sampling operators.

`PyAutoGalaxy` and `PyAutoLens` build directly on autoarray: every grid a
profile consumes, every masked image a fit operates on, and the linear-algebra
inversions behind pixelized source reconstruction are autoarray objects. The
package supports both a NumPy and an opt-in JAX (`xp=jnp`) backend.

## Install

```bash
pip install autoarray
```

## Examples

A masked 2D array tied to a pixel scale:

```python
import autoarray as aa

arr = aa.Array2D.no_mask(values=[[1.0, 2.0], [3.0, 4.0]], pixel_scales=0.1)
arr.shape_native        # (2, 2)
arr.native[0, 0]        # 1.0
```

A circular mask and the (y,x) coordinate grid of its unmasked pixels:

```python
mask = aa.Mask2D.circular(shape_native=(50, 50), pixel_scales=0.1, radius=2.0)
mask.pixels_in_mask     # 1264

grid = aa.Grid2D.from_mask(mask=mask)       # shape (1264, 2)
uniform = aa.Grid2D.uniform(shape_native=(10, 10), pixel_scales=0.1)
```

A normalized Gaussian PSF convolver:

```python
convolver = aa.Convolver.from_gaussian(
    shape_native=(11, 11), pixel_scales=0.1, sigma=1.0, normalize=True
)
convolver.kernel.shape_native       # (11, 11)
convolver.kernel.array.sum()        # 1.0
```

## Links

- Source & tests: [`autoarray/`](autoarray), [`test_autoarray/`](test_autoarray)
- Decorators & JAX deep dive: [`docs/agents/jax_and_decorators.md`](docs/agents/jax_and_decorators.md)
- Agent/contributor instructions: [`AGENTS.md`](AGENTS.md)
- Ecosystem: [PyAutoLabs on GitHub](https://github.com/PyAutoLabs)
