Skip to main content

TIPTOP-iPy

A Python wrapper for the ESO TIPTOP adaptive optics PSF simulation microservice.

$ pip install git+https://github.com/astronomyk/tiptop_ipy.git

Basic Usage

List the available instrument templates:

>>> from tiptop_ipy import TipTop

>>> TipTop.list_instruments()
['ANDES', 'ERIS', 'ERIS_LGS', 'HARMONI_SCAO', 'HarmoniLTAO_1', ...]

Create a TipTop object and generate a PSF:

>>> eris = TipTop("ERIS")
>>> result = eris.generate_psf()
>>> result.writeto("eris.fits", overwrite=True)

The result object provides convenient access to the PSF data:

>>> result.psf.shape
(1, 256, 256)

>>> result.strehl
array([0.891])

>>> result.fwhm
array([44.1])

Playing with parameters

Parameters are accessed using tuple indexing on the TipTop object:

>>> eris["atmosphere"]
{'Cn2Weights': [0.59, 0.02, ...], 'Cn2Heights': [30, 140, ...], 'Seeing': 0.8, ...}

>>> eris["atmosphere", "Seeing"]
0.8

Values can be updated using the same syntax. For example, we can ask TIPTOP to generate two PSFs (on-axis, 10" off-axis):

>>> eris["sources_science", "Zenith"] = [0, 10]
>>> eris["sources_science", "Azimuth"] = [0, 180]
>>> result = eris.generate_psf()

>>> result.plot()

To see what you've changed from the template defaults:

>>> eris.diff()
{'sources_science': {'Zenith': ([0], [0, 10]), 'Azimuth': ([0], [0, 180])}}

To reset back to the original template:

>>> eris.reset()

PSF FITS file format

The TIPTOP server returns a FITS file with 5 HDUs:

>>> eris = TipTop("ERIS")
>>> result = eris.generate_psf()
>>> result
TipTopResult(1 wavelength(s), 1 position(s), 5 HDUs, Strehl=0.891)

HDU 0: PrimaryHDU — header with config parameters and timing
HDU 1: ImageHDU   — PSF CUBE (N, FOV, FOV)
HDU 2: ImageHDU   — OPEN-LOOP PSF (FOV, FOV)
HDU 3: ImageHDU   — DIFFRACTION LIMITED PSF (FOV, FOV)
HDU 4: ImageHDU   — Radial profiles

Strehl ratios, FWHM values, and coordinates are read from the PSF CUBE header cards.

Documentation

Full documentation is available at tiptop-ipy.readthedocs.io.

For details on the TIPTOP configuration parameters, see the TIPTOP documentation.

For bug reports and feature requests, please use the GitHub issues page.

Metadata

Release files for tiptop-ipy 0.2.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 tiptop-ipy 0.2.0
File Size Uploaded
tiptop_ipy-0.2.0.tar.gz 35.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tiptop-ipy 0.2.0
File Interpreter ABI Platform
tiptop_ipy-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 93.3 kB

Release files / tiptop_ipy-0.2.0.tar.gz

Download URL tiptop_ipy-0.2.0.tar.gz
Size 35.3 kB
Tags Source
SHA-256 checksum
How to use checksums
2a40e8a622d51ab205be797f67915df17c62482597cfaf142af93e48c8ba5e58
BLAKE2b-256 checksum
How to use checksums
0e7a2bcc9702235e7e015f575d591997d4d6e24fcb4a31e39378a61403c0d1ba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release files / tiptop_ipy-0.2.0-py3-none-any.whl

Download URL tiptop_ipy-0.2.0-py3-none-any.whl
Size 58.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2ad16792afc87bccc86e049232a9624c6cf4eefb0b21e3b7e05864e0c7474152
BLAKE2b-256 checksum
How to use checksums
8a50281856ef5d58e0fe0b00f86f540695314b99bc9c837014347a19514ee725
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

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