Instructions for Stray Light (Flare) Analysis in Imatest

Current Documentation
View previous documentation
View legacy documentation
All documentation versions


Stray light (flare) documentation pages

Introduction: Intro to stray light testing and normalized stray lightOutputs from Imatest stray light analysis | History

Background: Examples of stray lightRoot Causes | Test overview | Test factors | Test ConsiderationsGlossary

Calculations: Metric image | Normalization methodsLight source mask methods | Summary Metrics | Analysis Channels | Saturation

Instructions: High-level Imatest analysis instructions (Master and IT) | Computing normalized stray light with Imatest | Motorized Gimbal instructions

Settings: Settings list and INI keys/values | Standards and Recommendations | Configuration file input

Page Contents

This page provides high-level instructions for analyzing images of a stray light source in Imatest.

Advanced instructions for computing normalized stray light with Imatest can be found here.

Procedure for Batch/Auto analysis with Imatest Master

  1. Starting with the “Select Images” step of the Workflow, select the image(s) to analyze for stray light

    1. To import the images, click “SELECT IMAGES” to hand-select a series of image files, or click “SELECT FOLDERS” to select a directory of images. Alternatively, select a config file as input or a directory containing a config file. 

      1. See the Stray Light Configuration File page for information on the config file, including the required JSON schema and formatting.

      2. Note: Within a single Imatest run, all images under test must be of the same size (array size and number of channels).
      3. Note: Users cannot select a mix of image files and config files as input within a single Imatest stray light analysis run. 

      4. Note: If using a config file as input, certain meta information defined within will be associated with each of the images to analyze (e.g., angle of the light source with respect to the camera), enabling better labeling of outputs. 
  2. Click “Next” to move on to the “Select Analysis” step of the Workflow and select the Stray Light analysis module (Analysis options > Stray Light / Flare > Stray Light Source)

    Starting in version 22.2, users of Imatest Master can find Stray Light analysis under the “Stray Light / Flare” section of the analysis options screen

  3. Configure the Stray Light analysis settings by clicking the gear icon.

    1. See the Stray Light Settings page for a list and description of each setting

    2. See the Stray Light Calculations page for more information on the calculation methods and settings

    3. See the Stray Light Normalization page for more information on normalization methods and settings

    4. See the Stray Light Source Masking page for more information on mask methods and settings

  4. Click “ANALYZE” to run the analysis

    1. Wait while Imatest calculates results and generates output figures/files

  5. Examine the resulting figures and output files

    1. See the Stray Light Outputs page for information on the various outputs

Procedure for Batch/Auto analysis with Imatest IT

  1. Install and setup the Imatest IT library for a compatible programming language

  2. Configure the Stray Light analysis settings using Imatest Master to save the settings to an Imatest INI file.

    1. Alternatively, users can manually configure an Imatest INI file by hand or programmatically

    2. See the Stray Light Settings page for a list of valid INI key-value pairs for each setting

  3. Import and initialize the Imatest IT library within your own custom program
  4. Using the Imatest IT library, call stray light analysis on the images you want to test for stray light

    1. Stray light analysis in Imatest IT requires an Imatest INI file and stray light config file (or StrayLightConfig object) as input

    2. Sample code for stray light analysis and generation of a StrayLightConfig object can be found in the Imatest IT install “samples\…\stray_light” directory. For example, located in “C:\Program Files\Imatest\v22.2\IT\samples\python\stray_light”.

      Screenshot of the stray light Python sample found in the Imatest IT install directory (“stray_light_example.py”). Users of Imatest IT can perform stray light analysis programmatically. This sample program demonstrates stray light analysis using an INI file and a StrayLightConfig object as input. Here, the program is opened in the PyCharm IDE.

    3. A separate Python sample script that demonstrates control of the Imatest Motorized Gimbal for capturing stray light images, programmatic generation of a config file, and optional stray light analysis can be found in the Imatest IT install “samples\hardware” directory. For example, located in “C:\Program Files\Imatest\v22.2\IT\samples\python\hardware\motorized_gimbal” 

      1. This same hardware sample code can be found on Imatest’s “hardware-samples” Github repository

      2. See the Stray Light Configuration File page for information on the config file, including the required JSON schema and formatting.

  5. Examine the resulting figures and output files

    1. See the Stray Light Outputs page for information on the various outputs