Stray Light (Flare)

Stray Light (Flare) Configuration File

Background Testing Calculation Testing With Imatest Inputs Outputs

 


Current Documentation
View previous documentation
View legacy documentation
All documentation versions

Table of Contents

The Config File

The “config” file (configuration file) is an optional input for Stray Light (Flare) analysis in Imatest Master 22.2. Users who want to extract the most meaning out of their data can use a config file as input, allowing for additional outputs and analysis options. The config file (or StrayLightConfig object) is a required input for analysis in Imatest IT 22.2.

The config file is a JSON-encoded text file that defines meta information about each of the image files to analyze, including the path to the image files and the position/angle of the light source associated with each image. During analysis, this meta information is associated with the data, allowing for generation of analysis plots (e.g., stray light stats plotted as a function of light source field angle) and better output labeling. This labeling can be important because it lends itself to better results organization/management and because certain standards require the information be reported (e.g., IEEE-P2020). Config files can be programmatically generated with relative ease, as most programming languages have tools for working with and producing the JSON (JavaScript Object Notation) text format.

A screenshot of an example config file (JSON-encoded text file) to use as input for Imatest Stray Light (Flare) analysis. This config file is formatted to be human-readable and is being viewed in an application called Sublime Text.

In Imatest Master, users can select config files as input as if they were an input image or, alternatively, by selecting a directory that includes one or more config files.  The config file must be formatted with the JSON schema / properties defined below and must use “.slconf” as the file extension.  

The properties of the config file are:

  • captures: An array of captureconfig objects, representing information about each capture position.
  • run_name: Information about the run. This is used to name batch outputs. Note: inclusion of the following characters may result in failure to save .fits output files (metric images and masks): “(*:<>?[|
  • comment: A comment about the meta data of the run. This is used for record keeping.
  • version: The version of the config format.

The properties of each captureconfig object are:

  • image_paths: The path to the image (file) to analyze.
  • source_field_angle_deg: The field angle of the light source in degrees.
  • source_azimuth_angle_deg: The azimuth angle of the light source in degrees.
  • source_comment: A comment about the capture, e.g., source is out of the FOV.

In stray light testing, azimuth angle and field angle represent the position of the light source with respect to the camera or device under test.

Azimuth angle and field angle represent the position of the light source with respect to the camera. For the purpose of stray light testing, a field angle of zero should coincide with an optical center in image space. For comprehensive testing, it is recommended that the analysis include images where the light source is positioned at field angles beyond the camera’s maximum field of view.

Official JSON schema are defined below.

Config file JSON schema

JSON-encoded text string for config.schema.json:

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "config.schema",
  "type": "object",
  "properties": {
    "captures": {
      "description": "Information about each capture position.", 
      "type": "array",
      "items": [
        {"$ref": "captureconfig.schema"
        }
      ]
    },
    "run_name": {
      "description": "Information about the run. This is used to name batch outputs.",
      "type": "string"
    },
    "comment": {
      "description": "A comment about the meta data of the run. This is used for record keeping.",
      "type": "string"
    },
    "version": {
      "description": "The version of the config format.", 
      "type": "integer", 
      "properties": {
         "minimum": 1,
         "maximum": 1
      }
    }
  },
  "required": [
    "captures",
    "run_name",
    "version"
  ],
  "unevaluatedProperties": false
}

 

“captureconfig” object JSON schema

JSON-encoded text string for captureconfig.schema.json:

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "captureconfig.schema",
  "type": "object",
  "properties": {
    "image_paths": {
      "description": "The path to the image to analyze.",
      "type": "string"
    },
    "source_field_angle_deg": {
      "description": "The field angle of the source in degrees.",
      "type": "number", 
      "minimum": 0, 
      "maximum": 180
    },
    "source_azimuth_angle_deg": {
      "description": "The azimuth angle of the source in degrees.",
      "type": "number", 
      "minimum": 0, 
      "exclusiveMaximum": 360
    },
    "source_comment": {
      "description": "A comment about the capture, e.g., source is out of the FOV.",
      "type": "string"
    }
  },
  "required": [
    "image_paths"
  ],
  "unevaluatedProperties": false
}