Stray Light (Flare) Analysis

Stray Light (Flare) Outputs

Stray Light (Flare) AnalysisStray Light OutputsStray Light SettingsStray Light Configuration File

Current Documentation
View previous documentation
View legacy documentation
All documentation versions

Table of Contents

Overview of Stray Light Outputs

  • Stray light metric images

    • Stray light metric image FITS file(s) containing floating point metric image data. Each pixel in the input image(s) is normalized to represent the chosen stray light metric (e.g., PSRR). The stray light metric images are the primary output from the analysis.

    • Corresponding mask image FITS file(s) containing the binary mask image that was used to mask out the light source in the associated stray light metric image

    • Note: The stray light metric image data and mask image are also included in the HDF5 standard output file

  • Color-mapped stray light metric image plots

    • Per-image color-mapped stray light metric image plots (saved as image files). These plots provide an easy way to view the stray light metric images.

    • Movie files (GIF, AVI, MP4) that show an animation of the full set of color-mapped stray light metric image plots

  • Stray light metric image histograms

    • Per-image stray light metric image histograms (saved as image files). These histograms represent the distribution of the metric (e.g., PSRR) from the stray light metric image data.

    • Movie files (GIF, AVI, MP4) that show an animation of the full set of stray light metric image histograms

  • Analysis plots (note: analysis plots require use of a config file as input)

    • Level plots: stray light metric image statistics plotted as a function of light source field angle

    • Count plots: stray light metric image counts (number of pixels) plotted as a function of light source field angle

  • Standard output files (JSON, CSV, HDF5)

    • JSON-encoded text file containing structured stray light analysis inputs and results including per-image stats and summary / multi-image stats (values equivalent to CSV)

    • CSV file containing tabulated stray light analysis inputs and results including per-image stats and summary / multi-image stats (values equivalent to JSON)

    • HDF5 file containing structured stray light analysis input and results (values equivalent to JSON and CSV), as well as the full set of input image data, output stray light metric image data, and binary mask image data.

Stray Light Metric Images

The primary output from the stray light analysis are stray light metric images.

A snapshot of a stray light metric image with values ranging from 0 (black) to 1 (white) representing the PSRR metric. The highest level of stray light immediately surrounds the light source object.

Each pixel in the input image is normalized to represent the chosen stray light metric (e.g., PSRR). The result is a stray light metric image. The method of normalization depends on the chosen metric. The light source object itself is masked out in the metric images because it is not considered to be stray light.

For the Point Source Rejection Ratio (PSRR) metric, the normalization factor is derived from an on-axis reference image of the light source. The mean level (digital number) within the imaged light source object from the on-axis image is used to normalize the rest of the image data (for all input images), excluding the light source object itself.

The stray light metric images can be output as FITS files and as color-mapped plots (saved as image files). The metric image FITS files contain the floating point metric image data which can be used for further analysis.  The color-mapped metric image plots provide an easy/convenient way to view the stray light metric images. Users can also access the metric image data within the structured HDF5 output file.

Stray light metric image FITS files

Flexible Image Transport System (FITS) is a file format designed for storing and manipulating scientific image data. The FITS file format is commonly used within the astronomy community and, therefore, many software tools/applications already exist for analyzing FITS file image data. These tools can be used to tease out information from the stray light metric images, for example, by manipulating the color and scaling of the image data.

Users have the option to output stray light metric image FITS files, starting in Imatest 22.2. The metric image FITS files contain floating point data with values corresponding to the calculated stray light metric. Users who want to make the most out of their stray light metric images can use the FITS file output to perform supplemental stray light analysis. For example, the metric image FITS files can be read into the user’s programming language of choice for further data processing, or into one of many existing FITS viewer applications. 

SAOImageDS9 is one example of a commonly-used, free, open-source FITS file viewing application. SAOImageDS9 is used by amateur and professional astronomers alike, for analyzing scientific image data such as from the James Webb Space Telescope (JWST).

A screenshot of the SAOImageDS9 application. A stray light metric image FITS file has been manipulated with logarithmic scaling and the “b” colormap to better reveal certain stray light artifacts.

Color-mapped stray light metric image plots

Users have the option to output color-mapped stray light metric image plots (saved as image files) representing the result of each individual input image under test. Users can also output the same plots as a movie (GIF, AVI, MP4) to show an animation of the full set of metric image plots.

The color-mapped stray light metric image plots provide a quick and easy way to assess stray light, especially when viewed as a movie. Users who want to further inspect their stray light metric images can do so by looking into the associated metric image data (from the corresponding FITS file or HDF5 output) and/or by making use of the abundance of other derived output statistics (e.g., from the JSON output or from other plots).

A color-mapped stray light metric image plot is one possible output from Imatest 22.2 Stray Light (Flare) analysis. Here, the plotted metric is Point Source Rejection Ratio (PSRR). Each pixel in the input image has been normalized to represent PSRR. The light source object in the center of the metric image is masked out because it is not stray light. A specific kind of stray light artifact called “petal flare” is clearly visible and quantified via the PSRR metric scaling.

Stray light metric image histograms

Users have the option to output stray light metric image histograms (saved as image files) representing the distribution of the metric (e.g., PSRR) from the stray light metric image data. Users can also output the same histograms as a movie (GIF, AVI, MP4) to show an animation of the full set of metric image histograms.

The metric image histograms can provide meaningful high-level insight into the data. For example, by comparing individual histograms users may be able to identify which images or light source angles lead to unwanted distributions of stray light. 

A GIF of a series of stray light metric image histograms is one possible output from Imatest 22.2 Stray Light (Flare) analysis. Each histogram shows the distribution of the metric from the corresponding stray light metric image data. Here, the metric is Point Source Rejection Ratio (PSRR). The amount and intensity of stray light changes depending on the angle of the light source.

Stray light analysis plots

Users have the option to output certain meta analysis plots (saved as image files) when using a config file as input to Imatest Stray Light (Flare) analysis. 

These plots can provide meaningful high-level insight into the data. For example, users can select an abundance of key summary statistics to plot as a function of light source field angle. These summary statistics could be used as pass-fail criteria, for example. The same statistics can be included in the standard output files (JSON, CSV, HDF5) in a vectorized format for external plotting or supplemental analysis. 

A stray light level plot showing various statistics (derived from a series of stray light metric images) plotted as a function of light source field angle. Here, the plotted aggregations are 95th percentile, 75th percentile, and 50th percentile of the Point Source Rejection Ratio (PSRR) metric within a series of stray light metric images. The stray light appears to jump at certain light source field angles at the very edge of the camera’s FOV. This style of plot output is only available when using a config file (defining the per-image light source angles) as input to the analysis.

Standard output files (JSON, CSV, HDF5)

Users have the option to output several standard output files (JSON, CSV, HDF5) that contain structured stray light analysis inputs and results including per-image stats and summary / multi-image stats. The HDF5 file (.h5) contains the full set of input image data, output metric image data, and binary mask image data in addition to the same outputs as the JSON and CSV. 

Hierarchical Data Format (HDF) is a set of file formats (including HDF5) for storing and organizing large amounts of data. For example, NASA uses the HDF format for their Earth observation mission data. Starting in Imatest 22.2, users can optionally access all of their stray light data within a HDF5 standard output file, for the purpose of external analysis and/or data distribution. HDF5 can be read using an external application or programmatically with most programming languages. 

A screenshot of free, open-source HDFView application. The stray light output structure can be navigated by using the pane on the left. Here, a stray light metric image, accessible from within the output structure, is opened for viewing.

When using a config file as input to the analysis, users will be provided with additional vectorized versions of their results, providing easier access to the data for plotting or any other supporting analysis. See the Stray Light Configuration file page for additional information on use of a config file for stray light analysis.