A multithreading computer program performs phase-retrieval and -unwrapping calculations to extract accurate image phase maps from noisy image magnitude fields generated by adaptive optics. [As used here, "phase retrieval" signifies the calculation of phase map modulo 2µ, while "unwrapping" signifies the elimination of the integer-multiple-of-2µ phase ambiguity.] The program includes a MATLAB front-end script integrated with a multithreaded computing kernel in a set of C routines. The MATLAB script controls the flow of computations and provides a graphical user interface. Major computations are performed in C routines, wherein multiple computing threads are generated to parallelize the computations. The MATLAB script starts the C routines through a function call using MATLAB's MEX interface, and the results of the computations are returned from C routines to the MATLAB script. The program parallelizes the computations whenever multiple central processing units (CPUs) are available; this feature reduces the execution time significantly. Because MATLAB is popular in engineering computing, and increasing numbers of computers are equipped with multiple CPUs and multithreading software libraries, this program has significance beyond the original adaptive-optics application as an example of how to do high-performance engineering computing at relatively low cost.

This program was written by Scott Basinger, John Lou, and David Redding of Caltech for NASA's Jet Propulsion Laboratory. For further information, access the Technical Support Package (TSP) free on-line at www.nasatech.com/tsp  under the Software category.

This software is available for commercial licensing. Please contact Don Hart of the California Institute of Technology at (818) 393-3425. Refer to NPO-20848.



This Brief includes a Technical Support Package (TSP).
Document cover
Multithreading Program for Retrieval of Optical Phase Fields

(reference NPO-20848) is currently available for download from the TSP library.

Don't have an account?



Overview

The document presents a technical support package detailing a multithreading computer program developed for phase-retrieval and unwrapping calculations, primarily aimed at enhancing adaptive optics applications. This software was created by Scott Basinger, John Lou, and David Redding from Caltech for NASA’s Jet Propulsion Laboratory (JPL) and is designed to extract accurate image phase maps from noisy image magnitude fields generated by adaptive optics systems.

The program employs a robust algorithm to retrieve high-quality images in real-time, particularly for the Next Generation Space Telescope (NGST) Project. It integrates a MATLAB front-end script with a multithreaded computing kernel implemented in C. The MATLAB script manages the computational flow and provides a graphical user interface (GUI), while the heavy computational tasks are executed in C routines. This structure allows the program to utilize multiple computing threads, significantly speeding up execution times. For instance, a simulation that would typically take about two hours in MATLAB can be completed in approximately eight minutes using this software.

The document emphasizes the importance of this software in the context of adaptive optics, where rapid execution is crucial for designing and testing algorithms. The ability to parallelize computations on systems with multiple CPUs not only enhances performance but also demonstrates a practical application of high-performance engineering computing on relatively low-cost hardware.

Furthermore, the document highlights the broader implications of this software framework beyond its original application. Given MATLAB's popularity in engineering fields and the increasing availability of multi-CPU workstations, the program serves as a valuable example of how to effectively leverage available computing resources for complex engineering tasks.

The software is available for commercial licensing, and interested parties are directed to contact Don Hart at Caltech for further information. The document also includes a disclaimer regarding the use of trade names and the lack of endorsement by the U.S. Government or JPL.

In summary, this technical support package outlines a significant advancement in adaptive optics computation, showcasing a multithreaded approach that enhances performance and efficiency, with potential applications extending beyond its initial purpose.