Telescope¶
Overview¶
The Telescope defines the entrance pupil geometry of the simulated instrument — shape, diameter, central obstruction, and optional spider arms. It is a required argument when constructing most other OOPAO classes (Atmosphere, DeformableMirror, Pyramid, etc.), because it carries the pupil definition, pixel scale, and AO loop sampling time.
Note
In the current version of OOPAO, the Source object is the primary carrier of the electromagnetic (EM) field and phase. Each source maintains its own independent OPD and EM field, which is what all relay() methods operate on. The Telescope.OPD property is retained for backward compatibility only and should not be relied upon in new code.
The propagation chain¶
Light propagation in OOPAO is driven by the __mul__ (*) operator, which is defined on Source and Asterism. Writing ngs * obj calls obj.relay(ngs) under the hood. Every core OOPAO class implements a relay() method that receives the source and operates directly on its EM field.
A full propagation chain is simply a sequence of * operations:
ngs * tel * wfs # relay called on tel, then on wfs
When multiple sources are grouped in an Asterism, the same mechanics apply — __mul__ iterates relay() over each source independently, so every source accumulates its own EM field:
ast * tel * wfs # relay called on tel and wfs for each source in ast
The ** operator resets the source EM field to its initial (unaberrated) state before starting the propagation. Use it to ensure a clean propagation from scratch:
ngs ** tel * wfs # reset ngs EM field, then propagate through tel and wfs
Key concepts¶
Pupil mask — binary (or user-supplied reflectivity) 2-D array defining the aperture geometry.
OPD (backward compatibility) — 2-D optical path difference map in metres, still present on the Telescope but no longer the primary OPD carrier. New code should read OPD from the source object directly.
relay() — the method every core class implements to act on a source’s EM field. Called automatically by the
*operator; rarely called directly by users.samplingTime — AO loop period in seconds, used by the
Atmosphereto advance phase screens.
Quick start¶
from OOPAO.Telescope import Telescope
from OOPAO.Source import Source
# Create a VLT-like 8-m telescope at 1 kHz
tel = Telescope(resolution=240, diameter=8.0, samplingTime=1e-3,
centralObstruction=0.14)
# Add four spider vanes (angles in degrees, thickness in metres)
tel.apply_spiders(angle=[0, 90, 180, 270], thickness_spider=0.05)
# Propagate a source through the telescope and WFS
ngs = Source('H', magnitude=8)
ngs * tel * wfs
# Reset EM field and re-propagate cleanly
ngs ** tel * wfs
# Compute a PSF (zero-padding factor = 2)
tel.computePSF(zeroPaddingFactor=2)
# Print the current optical path
tel.print_optical_path()
API reference¶
- class OOPAO.Telescope.Telescope(resolution, diameter, samplingTime=0.001, centralObstruction=0.0, fov=0.0, pupil=None, pupilReflectivity=1.0, display_optical_path=False)[source]¶
Defines the entrance pupil of the telescope.
- Parameters:
resolution (int) – Number of pixels across the pupil diameter.
diameter (float) – Physical diameter of the telescope in metres.
samplingTime (float) – AO loop period in seconds (
1 / loop_frequency). Used by theAtmosphereto advance phase screens. Default0.001.centralObstruction (float) – Fractional diameter of the central obstruction (0–1). Default
0.0.fov (float) – Field of view in arcseconds. Required for off-axis multi-source simulations. Default
0.0.pupil (numpy.ndarray or None) – User-defined binary pupil mask (2-D array). Overrides the automatic circular mask. Default
None.pupilReflectivity (float or numpy.ndarray) – Uniform reflectivity scalar or 2-D map matching the pupil. Default
1.0.display_optical_path (bool) – If
True, prints the optical path each time light is propagated to a WFS. DefaultFalse.
Key properties
- OPD: numpy.ndarray¶
2-D optical path difference map in metres. Retained for backward compatibility only — the authoritative OPD is stored on the
Sourceobject.
- pupil: numpy.ndarray¶
Binary 2-D pupil mask (1 inside aperture, 0 outside).
- pupilLogical: numpy.ndarray¶
1-D boolean index of valid (illuminated) pixels, used to vectorise operations over the pupil.
- src: Source or Asterism¶
Reference to the last source (or asterism) propagated through this telescope.
- PSF: numpy.ndarray¶
Last PSF computed by
computePSF().
Methods
- relay(src)[source]¶
Core propagation method. Called automatically by
src * tel. Applies the telescope pupil and OPD to the source EM field.
- apply_spiders(angle, thickness_spider, offset_X=None, offset_Y=None)[source]¶
Carve spider vanes into the pupil mask.
- Parameters:
angle (list[float]) – List of vane angles in degrees. Length determines the number of spiders.
thickness_spider (float) – Vane width in metres.
offset_X (list[float] or None) – Per-vane X offset in metres. Default
None(no offset).offset_Y (list[float] or None) – Per-vane Y offset in metres. Default
None(no offset).
- computePSF(zeroPaddingFactor)[source]¶
Compute the PSF as the squared modulus of the Fourier transform of the complex pupil field. Result stored in
PSF.- Parameters:
zeroPaddingFactor (int) – Zero-padding factor applied before the FFT. A value of 2 yields Shannon-sampled PSFs.
- print_optical_path()[source]¶
Print the ordered list of optical elements the source has been propagated through.
Operator summary
Expression
Effect
ngs * telCall
tel.relay(ngs); applies pupil to source EM fieldngs ** telReset
ngsEM field, then calltel.relay(ngs)ast * telCall
tel.relay(src)for each source in the asterismtel + atmCouple atmosphere;
tel.OPDfollowsatm.OPD(legacy)tel - atmDecouple atmosphere (legacy)
ngs * tel * wfsFull propagation chain: telescope then WFS