Adaptive Optics Configuration Tools

Top  Previous  Next

This section of the LightLike User's manual discusses the mathematical background and provide usage instructions for a set of Matlab-based procedures whose purpose is to create and analyze adaptive optics (AO) configurations.  These AO configuration tools serve the following purposes:

1.To generate suitably formatted AO input data for LightLike simulation runs.

2.To study AO issues such as wavefront reconstruction, generation of deformable mirror influence functions, and so forth, with or without allied use of LightLike.

3.To assist in analyzing experimental data, either independently or in concert with LightLike simulated data.

The AO configuration tools consist principally of Matlab m-files, and are meant to be used from the Matlab command window.  The tools contain a number of alternatives for computing the same type of end result.  For example, facilities are provided for performing both zonal and modal reconstruction, with a variety of options for each category.  The present document will attempt to cover all the significant options included in the AO tools.  For historical reasons, the AO tools do not comprise a perfectly integrated set, and they do not present a completely unified user interface.  In the present document, we will clarify the principal ways of using the toolset, and the principal alternatives that exist for performing the same functions.

If the user employs the AO tools to provide input to a LightLike simulation system, then the tools calculations typically constitute a preprocessing step performed prior to the running of a LightLike simulation system.  A typical task would be the specification of a wavefront sensor (WFS) and deformable mirror (DM) geometry, and the subsequent computation of DM influence functions and reconstructor matrices.  These are all one-time tasks, to be completed prior to the execution of LightLike simulation runs.  These tasks are setup operations that should be considered part of the complete process of constructing a LightLike system and defining its input parameters.  The difference is that the AO tools make no use of the TVE (TimeLike Visual Editor) environment.  The connection between the AO tools functions and the  LightLike simulation run is that certain data vectors and matrices computed by the AO tools are intended to be read into LightLike subsystems via the subsystem input parameter lists.  Two key examples are the subsystems HartmannWfsDft and DeformableMirror, which require AO geometry and influence matrix data to do their jobs.

As noted above, the AO tools functions are also useful for various AO analyses independent of any particular LightLike simulation.  The tools functions can be used to study various mathematical issues related to wavefront reconstruction algorithms, or they can be used to analyze experimental WFS data, entirely within the Matlab environment.

One of the chief restrictions of the AO tools is that the whole set is built around a slope-measuring WFS,  such as a Hartmann-Shack sensor.  However, the tools interact in such a way that user customization is relatively straightforward.

Table 1 very briefly summarizes the main sequences of AO tools functions available to carry out two principal overall tasks.  The most general task is the derivation of a reconstructor matrix to drive the DM actuators for a given WFS-DM geometry.  A more restricted task is the derivation of a reconstructed wavefront (WF) when we simply sense the optical field but are not interested in driving a DM.  The restricted task differs from the general one in that DM influence functions never enter the picture.  The restricted task is not necessarily a simple subset of the general one, because an algorithm that determines DM actuator commands in terms of WFS measurements does not necessarily form an explicit reconstruction of the wavefront as an intermediate step. Table 1 serves as a quick reference guide to the available procedures, which are individually explained in detail as the configuration guide unfolds.

TASK

AO TOOLS FUNCTION SEQUENCE

COMMENTS




WF reconstruction, no DM,

zonal

aogeom

lsfptos

aorecon

(a)  Use of lsfptos must be followed (manually) by the correction factor (1/dxyact).

(b)  aorecon has several options, each leading to a different reconstructor.

WF reconstruction, no DM,

modal (Gavrielides)

aogeom

slope2mod

mod2opd


WF reconstruction, no DM,

Southwell

aogeom

Documentation of this option is under construction.





Reconstruction with DM,

zonal

aogeom

aoinf

aorecon

A specialty option is the waffle-constrained reconstructor:  this substitutes lsfptosw for aoinf.

Reconstruction with DM,

modal (Gavrielides)

aogeom

slope2mod

mod2opd

aoinf

aorecon


Table 1:  Summary of AO tools sequences for major overall tasks

 

Outputs of the AO configuration tools

As one possible example, consider the sequence of functions aogeom-aoinf-aorecon (see Table 1, task "Reconstruction with DM, zonal)". aogeom is a Matlab-based graphical user interface (GUI) which assists the user in defining the geometry of an AO system that contains a DM and a Hartmann or Shack-Hartmann WFS.  Using aogeom, the user defines the geometric layout of DM actuators and WFS subapertures, as well as the shape and extent of the DM actuator influence function.  The resulting information is stored in a .mat  file for processing by aoinf, a Matlab function which computes the DM optical path difference (OPD) and slope influence function matrices.  The output of aoinf is another .mat file, which can then be processed by aorecon, a Matlab function that computes least-squares or "pseudo-inverse" solutions of a matrix system.  All the results of this three-step process can be stored to a final .mat file.  This composite file can later be used as input to LightLike simulation runs, by using the DMModel class constructor in the LightLike Runset Editor.

aoflow

Figure 1:  Example of a complete AO system configuration

In the above example, a .mat data file is generated at each major step of the configuration process.  This does not necessarily apply to all AO tools procedures.  In some cases, one simply generates data vectors or arrays in the Matlab workspace which are passed as inputs to subsequent tools routines.  However, the final results of the configuration process, which are needed as input to a LightLike simulation system, must always be saved in a .mat file.

An important option to remember is that the final .mat file (the one to be read by the LightLike simulation) is allowed to contain any number of reconstructor matrices pertaining to the same AO geometry configuration.  For a given AO geometry, it is usually useful to collect in one file several different reconstructor matrices that correspond to different options in the sequence of procedures that yield a reconstructed wavefront or reconstructed DM actuator commands.

 

Customizing the AO configuration process

It may happen that a user is satisfied with some of the LightLike AO tools, but wishes to substitute custom-designed procedures for certain steps.  For example, the user may be interested in a special mirror with very specific influence functions, or perhaps a novel reconstruction algorithm.  As long as the required variable names and/or .mat  files are used and generated by the substitute routines, users can substitute their own computational routines for any or all of the AO tools routines. For example, to do zonal reconstruction with a DM, the tools sequence aogeom-aoinf-aorecon is provided.  If desired, a user could replace aogeom with a new Matlab routine that generates the geometry information, and use that routine to generate the .mat input file for aoinf.  As another example, a user might be satisfied with aogeom, but might want to replace aoinf with a custom routine to compute influence functions, and finally use the existing aorecon to generate a reconstructor.  The fundamental limitations are:  (1) to use any of the existing tools procedures, users must interface with them by supplying the expected contents;  (2) influence functions and reconstructors must be implemented as matrix multiplications;  (3) the custom user routines must of course be consistent with any specific assumptions or limitations in any AO tools routines that are used.

Most generally, a user could perform all AO configuration steps in custom fashion, and simply supply a final .mat file for reading by the LightLike runset.  The format of all the possible variables that could be used by LightLike library subsystems is summarized in the section .mat Interface File Contents.

 

Setting the Matlab Path


The LightLike AO configuration utilities are based in Matlab.  Before they can be used, the following directories must be in the Matlab path:

%TIMELIKE_DIR%\mfiles\aogeom.tbx   (the main aogeom routines)

%TIMELIKE_DIR%\mfiles\aocomp.tbx   (the remaining computational routines)

where %TIMELIKE_DIR% specifies the top-level directory in which LightLike is stored. For version 2000.11 %TIMELIKE_DIR% is usually c:\Program Files\TimeLike Systems\TimeLike.  The Matlab path can be set using the path command in Matlab or the Set Path utility (accessed from the File menu).  See Matlab documentation for more information.

When the above two directories have been added to the Matlab path, the AO tools routines can be invoked from any working directory.