Skip to main content

Synthetic interaction matrix generator for adaptive optics systems

Project description

SynIM

Synthetic Interaction Matrix generator for Adaptive Optics systems

Documentation Status License: MIT

Overview

SynIM is a Python package for computing synthetic interaction matrices, projection matrices, and covariance matrices for adaptive optics (AO) systems. It supports both Single Conjugate AO (SCAO), Laser Tomography AO (LTAO), Ground Layer AO (GLAO) and Multi-Conjugate AO (MCAO) configurations with Shack-Hartmann sensors. It also supports GPU acceleration. Some of its functionalities are provided by SPECULA.

Key Features

  • 🔧 Interaction matrices for DM-WFS combinations (SCAO/MCAO)
  • 📊 Projection matrices for DM-Layer tomography (MCAO/LTAO)
  • 📈 Covariance matrices for MMSE reconstructor optimization
  • ⚙️ YAML/PRO configuration with automatic parameter parsing
  • 💾 SPECULA-compatible FITS format for data exchange
  • 🎯 Smart caching to minimize redundant computations
  • 🚀 GPU acceleration via CuPy for high-performance computation

Documentation

Full documentation available at: synim.readthedocs.io

Slope Computation Methods

SynIM supports two slope computation methods for interaction matrices:

  • derivatives (default): compute numerical derivatives on the transformed phase
  • gtilt (optional): compute G-tilt from phase differences in each subaperture

The default behavior is unchanged (derivatives). To enable G-tilt, pass slope_method='gtilt' when calling the low-level interaction-matrix APIs.

Example:

from synim.synim import interaction_matrix

im = interaction_matrix(
  pup_diam_m=pup_diam_m,
  pup_mask=pup_mask,
  dm_array=dm_array,
  dm_mask=dm_mask,
  dm_height=dm_height,
  dm_rotation=dm_rotation,
  wfs_nsubaps=wfs_nsubaps,
  wfs_fov_arcsec=wfs_fov_arcsec,
  gs_pol_coo=gs_pol_coo,
  gs_height=gs_height,
  slope_method='gtilt',
)

Requirements

  • Python ≥ 3.8
  • numpy, scipy, matplotlib
  • specula - AO simulation framework
  • cupy - GPU acceleration (optional, requires CUDA)

Contributing to SynIM

To contribute to SynIM, 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 SynIM in your research, please cite:

@software{synim2025,
  author = {Agapito, Guido},
  title = {SynIM: Synthetic Interaction Matrix Generator},
  year = {2025},
  url = {https://github.com/ArcetriAdaptiveOptics/SynIM}
}

License

MIT License - see LICENSE file for details.

Authors

  • Guido Agapito - INAF - Osservatorio Astrofisico di Arcetri

Acknowledgments

It was built as part of the MORFEO project.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

synim-1.1.1.tar.gz (188.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

synim-1.1.1-py3-none-any.whl (78.4 kB view details)

Uploaded Python 3

File details

Details for the file synim-1.1.1.tar.gz.

File metadata

  • Download URL: synim-1.1.1.tar.gz
  • Upload date:
  • Size: 188.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for synim-1.1.1.tar.gz
Algorithm Hash digest
SHA256 df6c9566e75e9b94884fbd5ef81c67a47038097aa2ef0343da6a84c7d5c1ea46
MD5 b054e542d768b2acb508cd4997f876a6
BLAKE2b-256 6634c9dcb0159e1da319ee25d43e0be244fa1dede8a345aacc73a9cb09efa274

See more details on using hashes here.

Provenance

The following attestation bundles were made for synim-1.1.1.tar.gz:

Publisher: publish.yml on ArcetriAdaptiveOptics/SynIM

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file synim-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: synim-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 78.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for synim-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7ec2fba2030754ee735e6cb3e931221cc99c5558b6d902337c8b3e15b9e12aaf
MD5 543d2597177c31c3f8e80713ec3b7466
BLAKE2b-256 d65357812f549fa2163eef1a00a0fbf1f54c0e6709d976fa7e22aa5810a95e9e

See more details on using hashes here.

Provenance

The following attestation bundles were made for synim-1.1.1-py3-none-any.whl:

Publisher: publish.yml on ArcetriAdaptiveOptics/SynIM

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page