The Python framework that turns WEAVE Level 1 data into quality controlled Level 2 products.
PyAPS is the official Python implementation of the WEAVE Advanced Processing System (APS). It is part of the Science Processing and Analysis system of the WEAVE survey. PyAPS receives Level 1 data from the Core Processing System and produces quality controlled Level 2 products.
WEAVE observes with fibres in multi object mode and with integral field units (mIFU and LIFU). PyAPS gives all of these one processing path. Scientific modules receive a consistent spectral object, while PyAPS keeps the observing geometry, the calibration, the processing history and the spatial relationships that each product needs.
Standard wrappers prepare and check the inputs of established astronomical packages, monitor how they run, check their outputs and assemble traceable Level 2 products. The framework can also host contributed software from the survey science teams without changes to the rest of the pipeline. Work runs locally or under the Slurm workload manager, so the same code serves routine observations and large data releases.
This public package contains the processing framework: the runner that builds and executes the workflow, the scientific modules and wrappers, the handling of calibration and templates, and the interactive explorer. The operations layer that runs the official system for the survey, such as its database and job management and data transfer, is maintained separately and is not part of this package.
Getting started
PyAPS is the WEAVE processing pipeline. It needs Python 3.12 or newer (3.12 is the production target; the test suite also passes on 3.14); the survey's own processing system runs it on Python 3.12. The pipeline calls a number of scientific packages, some of them installed from GitHub, so install it with the pipeline option. A plain install without that option is the lighter set of packages needed only to open products in the interactive explorer.
git clone https://github.com/camcead/PyAPS.git
cd PyAPS
python3 -m pip install -e ".[pipeline]"
python3 py/PyAPS/aps_runner.py -h
aps-explorerTo reproduce the tested environment exactly: pip install -r requirements-lock-20261006.txt && pip install --no-deps -e .
The repository README describes every installation option, the environment variables and the calibration and template files.
How to cite
Please cite the software with the DOI of the version you used. For the version described in the paper: Molaeinezhad, A. and WEAVE APS Team, PyAPS: Python-based Advanced Processing System for WEAVE, version 2.0 (publication snapshot, tag v2.0-rasti), Zenodo, https://doi.org/10.5281/zenodo.23250780.
All versions: https://doi.org/10.5281/zenodo.23042510. Machine-readable: CITATION.cff in the repository.
Software versions
The Level 2 benchmarks, the stellar comparisons and the timing tests in the paper were produced with the software stack named in the paper (Redrock 0.22 series, RVSpecFit 0.9.3, FERRE 5.1.1, pPXF 9.4.x, NumPy 2.3.4) and were not rerun with this release. The release itself was tested with Python 3.12.12, Redrock 0.22.2.post1195, RVSpecFit 0.9.4.dev14, pPXF 9.5.0, NumPy 2.5.3, SciPy 1.18.1 and Astropy 8.0.1 (FERRE 5.1.3 runs on the production system).
Key features
One data model
Fibre spectra at several stacking levels and reconstructed LIFU and mIFU cubes share one data and memory model, for every arm and resolution mode.
Careful classification
Quality aware spectral preparation and guarded class routing, together with fibre aware propagation of the line spread function.
Wrapped scientific software
Standard wrappers prepare inputs, monitor runs and resource use, check outputs and assemble traceable Level 2 products.
Contributed software
The framework hosts codes from the survey science teams without changes elsewhere in the pipeline.
From a laptop to a survey
Shared arrays, cached calibrations and parallel work at target, arm and patch level. Runs locally or under Slurm.
Interactive explorer
Browse Level 1 and Level 2 products in a web application, on your own computer or as a shared service.
Paper
PyAPS: A Unified and Scalable Processing Framework for the WEAVE Spectroscopic Survey
Molaeinezhad et al.
In preparationReleases
Version 2.0
Latest 9 October 2026The version label stays 2.0, the version cited in the paper. This snapshot supersedes the earlier public release and adds: the corrected Redrock per-arm solve with the --rr_solver switch, one aperture convention (A_world/B_world are full axis lengths) with the gal_aperture_factor option, NumPy 2 and cache fixes in the Level 2 jobs, an environment checker and configuration templates. It requires Python 3.12 or newer; the test suite passes (217 passed, 0 failed).
Previous versions (1)
Version 2.0 - first public release (superseded)
29 September 2026PyAPS 2.0 is the public release series described in the accompanying paper. This first public release is a standalone, installable package built on the earlier 1.9 development version. It adds documented installation options, settings through environment variables, a multi user explorer image and automated tests on Python 3.9 to 3.12 (imports, explorer and unit tests; the processing checks that need WEAVE data are run separately).
Extra information
Technical details that support the paper: data formats, module interfaces, scientific methods and operations.
L1 product depth and stacking hierarchy
The stacking depths of Level 1 data and how the stacking level records which observations contribute to an input.
Resolution-calibration inputs at the L1/APS boundary
The calibration products that bring wavelength solutions and line spread information into PyAPS.
Static and dynamic data model
The APSOB, APSTARG and APSSPEC objects: what is fixed by design, what is read at run time and in which order objects are built.
Module input/output contracts
For each scientific module, the inputs it receives from PyAPS, the outputs it returns and the meaning of the quality flags.
From an input product to the executed modules
How the product type decides which modules run, the fallback rules and how the integral field branches are chosen.
L1-to-L2 routes through APSOB
The routes from Level 1 input to Level 2 output through APSOB, with the contract at each step.
IFU ExGal configuration parameters
The binning, stellar fitting and emission line parameters that control integral field extragalactic analysis.
Scientific engines and configuration contracts
How each scientific engine is configured and run, including the settings used for Redrock, RVSpecFit and FERRE.
APS Explorer coverage and deployment
Which product families the explorer displays and how it is deployed for one user or as a shared service.
Modular scientific-software integration
How PyAPS manages execution around the scientific engines and how contributed software is added.
Execution, products and traceability
How processing is exchanged and automated, and how each product records where it came from.
On-sky LSF ingestion and resolution propagation
How the measured line spread function is read from calibration data and carried to each fibre, spaxel and bin.
Verification and scientific validation
The checks used to verify PyAPS and the scientific validation of its measurements, with historical capacity planning, local loading tests and development optimisation measurements.