These pages present information about yao
, a Monte-Carlo simulation
tool for Adaptive optics (AO) systems.
is open source released under the GPLv3. You are welcome
to use it, expand it and even distribute it, but please link back
to this page, as I am releasing updates semi-regularly. You are
also most welcome to contribute your changes, or submit bug reports.
You can checkout yorick using (install pages here):
git clone https://github.com/frigaut/yao.git
is a Monte-Carlo AO simulation tool. It uses a number of custom developed functions to simulate wavefront sensors (WFS), deformable mirrors (DM) and many other aspects of an AO loop.
- Coded in yorick, a open-source scripting language similar to IDL or Matlab. The core, CPU intensive routines are coded in C. Yorick and the YAO plugins are written in ANSI-C, which makes them portable on many platforms. YAO should run on any *nix platform, including Linux, Mac OsX, BSD, cygwin, etc... It may also work on Windows, but I have never tried.
ON or OFF axis, are supported. It is also possible to add your own WFS.
are supported. The altitude of conjugation is adjustable. It is
also possible to add your own
- Various reconstructors:
least-square with truncation (SVD) and MMSE. MMSE can use
either full matrix or sparse methods (fast). Users can use their own code to compute the reconstructor
- An arbitrary number of WFSs and DMs
can be used, with the possibility of mixing types. It is therefore
possible to simulate single DM systems, as well as single non-zero
conjugate, GLAO and MCAO systems. WFS and DM can be grouped in
subsystems, to isolate behavior, as can typically be found in
LGS high order and NGS TT control in LGS systems.
- It supports Natural and Laser Guide
Stars (or a mix). LGS support include spot blurring and elongation
with a user supplied LGS profile (there are templates), uplink jitter
correction and more.
- It supports photon noise, background noise and dark current, read-out noise and excess noise factor.
- It uses a multi-layered atmospheric model, with geometrical propagation only.
- The loop execution has been optimized
for speed: the critical routines have been coded in
C. Yorick is thus used as a convenient "glue" between lower
levels optimized C calls. Overall, this is rather efficient: A
simple 6x6 Shack-Hartmann system (geometrical model, no
diffraction) runs at over 3300
iterations/seconds on modern machines (about 530it/sec
for a full diffractive 6x6 SHWFS). That's including turbulent phase
computation, wavefront sensing, reconstruction, calculation of
the DM shape and PSF/performance estimation. A 64x64
Shack-Hartmann (full diffraction model) system runs at about 29
iterations/s for an 30-m telescope. A 188 curvature system runs
at over 269 iterations/s (see the this
entry for more details). Medium-size AO systems for ELTs
can also be simulated. It takes more time and RAM, but is still quite
performant: On a 4GHz i7 iMac, simulating the GMT LTAO system
(6 LGS WFS each 60x60 subapertures, including spot elongation) runs at
6 iterations/seconds and uses 1.5 GB of RAM.
YAO can be used in parallel mode, using the yorick svipc plugin.
post in the news. On modern hardware, it is now possible to
simulate up to 200x200 SHWFS. A 64x64 SHWFS runs
at 23 iterations/s.
- Straightforward scriptability to
probe parameter space.
- An (optional) GTK GUI provides a
convenient interface. One can, e.g., change some of the system parameters
while the loop is running. This provides
an educational approach to Adaptive Optics (newbies can play with the
parameters and immediately sees how the system reacts) and can also
provides a quick way to investigate the stability conditions for a newly
designed system, before entering more serious Monte-carlo simulations.
Note that because the GUI is GTK-based, it requires the gnome libraries.
These come automatically in Linux and BSD, but are a bit more challenging
to install on OsX (but possible with
Note that the GUI is not essential to run YAO.
- Arbitrary aperture shape (defined through a user plugin). Disk with
central obstruction is the stock pupil, but examples are provided to
create segmented or GMT like pupils.
- Partitioning of DMs and WFSs in independent subsystems (e.g. for
separate control of TT in LGS systems)
- 2 methods for Shack-Hartmann:
- Simple gradient average, no noise, very fast: This allow to do
tests of the noiseless performance of a system, for quick performance
evaluation of system dimensioning
- Full propagation, with subaperture image
formation. Includes adjustable subaperture and pixel size,
photon and read-out noise, bias and flat field errors,
thresholding, convolution by a gaussian kernel and image
elongation in the case of LGS. Proper overlap between
subapertures and possibility to put a field stop with
adjustable shape, size and position.
- Separately adjustable integration time for each sensor
- Adjustable frame delay (in integer unit of the quantum loop time)
- Anisoplanatism modes for MCAO
- Leaky integrator control law, up to 10th
- DM hysteresis
- DM saturation
- Separate loop gain per DM
- Adjustable DM sensitivity (micron/volt) to hook to real systems
- Adjustable subaperture and actuator validation thresholds
- Adjustable multi-wavelength, multi-position performance estimate
- "Skip and reset" along the phase screens at adjustable interval, to
reach statistically significant performance estimates faster
- Uplink tip-tilt correction for LGS
- Adjustable LGS Elongation
- Rayleigh Fratricide effect for multiple sodium beacon systems
- Extrapolated actuators
- Centroid Gain optimization, using LGS dithering (only for LGS +
- Parametrizable vibration spectrum: white, 1/f, peaks with
adjustable rms and width
- Lots of internal variables are accessible from the outside of the
program for debugging/implementation of new features
- Dependency on FFTW for the
fast FFT C implementation.
- Dependencies on the following yorick packages: yutils
(general utilities, v≥1.3), imutil (image manipulation,
v≥0.5), and optional dependencies of soy (sparse operations with yorick, v≥1.2), ylapack and svipc (v0.9)
- There is no GUI to configure the systems. The parfile has to be edited manually, which in my view is not a big deal and actually allows for more compact and clever parfiles, as yorick loops can be used to set repetitive variables.
- Wavefront propagation uses straight rays passing through turbulence layers and DMs. This does not model scintillation or pupil distortion due to high-altitude DMs.
Where to start?
Browse this site. Have a look at the manual
If you like what you see, go to the
page and follow the instructions.
Once the package is installed, follow the manual instruction, and
use the examples parameter files to create your own parfile to model