Skip to main content

SPECULA

Python AO end-to-end simulator

SPECULA is a Python-based, object-oriented software derived from PASSATA and developed by the Adaptive Optics group at the Arcetri Observatory for end-to-end Monte-Carlo simulations of adaptive optics systems. It can be accelerated using GPU-CUDA via CuPy.

See the documentation here: specula.readthedocs.io

Directories

  • docs: contains the documentation.
  • config: contains functions and parameter files to calibrate and run a closed loop of an adaptive optics system (single-conjugated, multi-conjugated, natural, laser, ...).
  • specula: the main library, structured as follows:
    • data: data required by utility functions.
    • data_objects: classes that wrap the data and provide methods to access them.
    • display: classes for data visualization.
    • lib: utility functions used by multiple objects.
    • processing_objects: classes that model the simulation elements as a function of inputs and time.
    • scripts: various scripts.
  • test: contains functions to test SPECULA using the unittest framework.

Requirements

  • Python 3.10+
  • numpy
  • scipy
  • matplotlib
  • flask
  • flask-socketio
  • socketio
  • scikit-image
  • cupy (for GPU acceleration, optional: pip install "cupy-cuda13x[ctk]" or "cupy-cuda12x[ctk]", see the installation docs)
  • astro-seeing
  • symao
  • synim

Optional libraries

Some features require additional libraries:

  • orthogram: for automatic block diagram creation (see orthogram, requires pycairo)
  • control: for conversion of transfer function system in SPECULA format and vice-versa and analysis of transfer function

Contributing to SPECULA

To contribute to SPECULA, follow these steps:

  1. Fork this repository.
  2. Create a branch: git checkout -b <branch_name>
  3. Make your changes and add tests for the new functionality.
  4. Commit your changes: git commit -m '<commit_message>'
  5. Push to the branch: git push
  6. Create the pull request.

We require tests for all new features to ensure the stability of the project.

Citation

If you use SPECULA in your research, please cite:

@article{specula2026,
  author = {Fabio Rossi and Alfio Puglisi and Guido Agapito},
  title = {{Introducing a new generation adaptive optics simulation framework: from PASSATA to SPECULA}},
  volume = {12},
  journal = {Journal of Astronomical Telescopes, Instruments, and Systems},
  number = {1},
  publisher = {SPIE},
  pages = {019001},
  year = {2026},
  doi = {10.1117/1.JATIS.12.1.019001},
  URL = {https://doi.org/10.1117/1.JATIS.12.1.019001}
}

Metadata

Release files for specula 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for specula 1.1.0
File Size Uploaded Provenance
specula-1.1.0.tar.gz 18.7 MB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for specula 1.1.0
File Interpreter ABI Platform
specula-1.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 19.3 MB

Release files / specula-1.1.0.tar.gz

Download URL specula-1.1.0.tar.gz
Size 18.7 MB
Tags Source
SHA-256 checksum
How to use checksums
5d839c2c68e94916513954b0c48628eccdaafe0843ae0096232d80fe48378b1a
BLAKE2b-256 checksum
How to use checksums
cb5a3e27c403c9853ec56b4f1b300311203f3c193ff9b1cc03bd5ed515c75633
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.

Transparency log

Release files / specula-1.1.0-py3-none-any.whl

Download URL specula-1.1.0-py3-none-any.whl
Size 600.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
59aed1b0d5ae140cb0071a9c0ce1947cc4f76aca6a806ede2bcf0686de772eb5
BLAKE2b-256 checksum
How to use checksums
43d0729fbad80b16aeb6c86ec4a1178cd08425b36888c9af591f91d1dbbe37c9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.

Transparency log

Security for specula 1.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for specula-1.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page