Stray Light (Flare)

Stray Light (Flare) Settings

Background Testing Calculation Testing With Imatest Inputs Outputs

 


Current Documentation
View previous documentation
View legacy documentation
All documentation versions

Table of Contents

Calculation Settings

Calculation-related settings for stray light analysis:

Setting

Description

Options / Value type

[straylight] INI field and valid enum values

Normalization Settings

Normalization

The type of normalization to perform.

Choose one of the following options:

  • None: perform no normalization. Results will be in digital numbers.

  • On-Axis: Normalize with an on-axis reference image. This corresponds to Point Source Rejection Ratio (PSRR). Using this option requires the On-Axis Normalization options below.

normalization

  • 0: None

  • 3: On-axis

ND Measurement Type

The type of neutral density measurement used for the on-axis reference capture.

Setting only available for On-Axis Normalization.

Choose one of the following options:

  • None: No ND filter is used for the reference image

  • ND Density: ND filter(s) are used. The value is the total density of filters.

  • ND Transmission: ND filter(s) are used. The value is the total transmission ([0-1] units) of the filters

normalization_on_axis_nd_type

  • 0: None

  • 1: ND Density

  • 2: ND Transmission

ND Measurement Value

The value of neutral density measurement used for the on-axis reference capture. Units are determined by ND Measurement Type.

Setting only available for On-Axis Normalization.

Double (greater than 0)

normalization_on_axis_nd_value

Image Filename

The fully-qualified path to the on-axis reference image.

Setting only available for On-Axis Normalization.

Path to a valid image file

normalization_on_axis_filename

Mask Calculation Settings

Mask Method

The methodology for masking out the light source in the image(s)

Choose one of the following options:

  • 2-pass Circle (radius): The light source is first localized in the image via image processing -based methods. Then, a circle of specified radius is placed at the center of the localized region and is used as the mask for the image.

mask_options_method

  • 13: 2-pass Circle (radius)

Mask Radius

The radius in pixels for the mask.

Double (greater than 0)

mask_options_radius

Level Threshold Type

The type of threshold used for localizing the light source in the image.

Choose one of the following options

  • Value: The threshold in digital numbers.

  • Percentage of Max: The threshold is a % of the maximum value [0-1]

mask_options_image_processing_level_thresh_type

  • 0: Value

  • 1: Percentage of Max

Image Close Radius

The radius of an image close morphology step. This helps to remove holes in the mask. Set to 0 to skip this step.

Double (greater than 0)

mask_options_image_processing_image_close_radius

Multiple CC Strategy

The strategy for how to deal with multiple connected components when computing the mask.

Choose one of the following options:

  • Don’t Mask: If multiple CCs are found, assume the source is not in the image.

  • Pick Biggest: Pick the largest of the connected components.

mask_options_image_processing_multiple_cc_strategy

  • 1: Don’t Mask

  • 2: Pick Biggest

Other Calculation Settings

Calculation

The type of stray light calculation.

Choose one of the following options:

  • Normal: Calculation is image divided by normalization factor.

  • Reciprocal: Calculation is normalization factor divided by image.

Note: 0 is a valid digital number for image data. If choosing reciprocal, any image with 0’s in it will get infinity for the calculated stray light. Summary statistics (e.g., mean, max) of data containing infinity become meaningless. As such Normal is recommended.

calculation

  • 0: Normal

  • 1: Reciprocal

Crop LRTB

The number of pixels to crop off the left, right, top, and bottom of the image.

Double (list of four values greater than or equal to 0)

crop_lrtb

Percentile Ranks

The percential ranks [0-100] (e.g., 95 = 95th percential) to calculate.

Double (list of values greater than 0, less than 100)

pctl_ranks100

Output Settings

Output-related settings for stray light analysis:

Setting

Description

Options / Value type

[straylight] INI field and valid enum values

Standard Output Settings

Output Directory

The path to the save results to. Note: inclusion of the following characters may result in failure to save .fits output files (metric images and masks): “(*:<>?[|

Path to a valid output directory

output_dir

Results Files

The results files to save.

Choose one or more of the following options:

  • JSON

  • CSV

  • HDF5

result_files

  • 1: JSON

  • 2: CSV

  • 4: HDF5

Intermediate File Settings

Save Mask

Enable to save out a file containing the mask of the source for each image.

Boolean

save_mask

Mask Prefix

A string to be prepended to the mask file(s).

String

mask_prefix

Mask Postfix

A string to be appended to the mask file(s).

String

mask_postfix

Save Metric Image

Enable to save out a file containing the metric image(s).

Boolean

save_metric_image

Metric Image Prefix

A string to be prepended to the metric image file(s).

String

metric_image_prefix

Metric Image Postfix

A string to be appended to the metric image file(s)

String

metric_image_postfix

Level Plot Settings

Note: two or more images are required to produce this plot. 

Save Options

How should level summary plot(s) be created?

Choose one or more of the following options:

  • Save: Save plot(s) to disk

  • Display: Display plot(s) as part of run.

level_plot_options_mode_options

  • 1: Save

  • 2: Display

Save Types

The image formats to save the plot as. At least one is required to save the plot.

Choose one or more of the following options:

  • JPEG 24-bit (.jpg)

  • PNG 24-bit (.png)

  • TIFF 24-bit [compressed] (.tif)

  • TIFF 24-bit [not compressed] (.tif)

  • BMP 8-bit [256 color, uses a fixed colormap] (.bmp)

  • HDF 24-bit (.hdf)

  • PBM 1-bit (.pbm)

  • PCX 24-bit color [three 8-bit planes] (.pcx)

  • PGM (.pgm)

  • PPM (.ppm)

  • Full page Portable Document Format [PDF] color (.pdf)

  • Encapsulated PostScript [EPS] Level 2 color (.eps)

  • SVG [scalable vector graphics] (.svg)

  • Full-page PostScript [PS] Level 2 color (.ps)

  • MATLAB Figure (.fig)

level_plot_options_mode_save_types

  • 1: JPEG 24-bit (.jpg)

  • 2: PNG 24-bit (.png)

  • 4: TIFF 24-bit [compressed] (.tif)

  • 8: TIFF 24-bit [not compressed] (.tif)

  • 16: BMP 8-bit [256 color, uses a fixed colormap] (.bmp)

  • 32: HDF 24-bit (.hdf)

  • 64: PBM 1-bit (.pbm)

  • 128: PCX 24-bit color [three 8-bit planes] (.pcx)

  • 256: PGM (.pgm)

  • 512: PPM (.ppm)

  • 1024: Full page Portable Document Format [PDF] color (.pdf)

  • 2048: Encapsulated PostScript [EPS] Level 2 color (.eps)

  • 4096: SVG [scalable vector graphics] (.svg)

  • 8192: Full-page PostScript [PS] Level 2 color (.ps)

  • 16384: MATLAB Figure (.fig)

Groups

How to group the data within a plot. At least one is required to produce this plot.

Choose one or more of the following options:

  • All: All channels will be in the same plot.

  • By Channel: A separate plot will be made for each channel.

level_plot_options_groups

  • 1: All

  • 2: By Channel

Y Data

The data to plot on level summary plot(s)

Choose one or more of the following options:

  • Minimum

  • Minimum (Non-0)

  • Maximum

  • Mean

  • Median

  • RMS

  • Std. Dev.

level_plot_options_y_data

  • 1: Minimum

  • 2: Minimum (Non-0)

  • 4: Maximum

  • 8: Mean

  • 16: Median

  • 32: RMS

  • 64: Std. Dev.

Include Percentiles

Enable to include percentiles on the level summary plot(s).

Boolean

level_plot_options_include_pctls

Y-Axis Scale

The scaling of the y-axis of the plot.

Choose one of the following options:

  • Linear

  • Log

level_plot_options_y_axis_scale

  • 0: Linear

  • 1: Log

Count Plot Settings

Note: two or more images are required to produce this plot. 

Save Options

How should level summary plot(s) be created?

(Same options as Level plot)

count_plot_options_mode_options

Save Types

The image formats to save the plot as. At least one is required to save the plot.

(Same options as Level plot)

count_plot_options_mode_save_types

Groups

How to group the data within a plot. At least one is required to produce this plot.

(Same options as Level plot)

count_plot_options_groups

Y Data

The data to plot on level summary plot(s)

Choose one or more of the following options:

  • Total Count: The number/count of pixels in the region of interest

  • Source Count: The number/count of pixels in the masked region (the light source object)

count_plot_options_y_data

  • 1: Total Count

  • 2: Source Count

Y-Axis Scale

The scaling of the y-axis of the plot.

(Same options as Level plot)

count_plot_options_y_axis_scale

Metric Videos Settings

Save Video Formats

The formats to save the metric image video as. Note: MP4 is not available on Linux.

Choose one or more of the following options:

  • MP4

  • AVI

  • GIF

metric_video_opts_video_formats

  • 1: MP4

  • 2: AVI

  • 4: GIF

Save Image Formats:

The image formats to save each frame of the metric image video as.

Choose one or more of the following options:

  • PNG

  • JPEG

  • TIFF

metric_video_opts_image_formats

  • 1: PNG

  • 2: JPEG

  • 4: TIFF

Video Frame Rate

The framerate in frames per second for the metric video.

Double (greater than 0, less than 40)

metric_video_opts_frame_rate

Base Name

A string to prepend to the metric video file.

String

metric_video_opts_basename

Histogram Video Settings

Save Video Formats

The formats to save the histogram image video as.

(Same options as Metric Video)

hist_video_opts_video_formats

Save Image Formats

The image formats to save each frame of the histogram video as.

(Same options as Metric Video)

hist_video_opts_image_formats

Video Frame Rate

The framerate in frames per second for the histogram video.

Double (greater than 0, less than 40)

hist_video_opts_frame_rate

Base Name

A string to prepend to the histogram video file.

String

hist_video_opts_basename

Other Video Settings

Frame Scaling

How to scale the frames of the video.

Choose one of the following options:

  • Global: All frames have the same scaling.

  • Per-Subset: All frames of the same subset (channel) have the same scaling.

  • Per-Image: Each frame of the video will have its own scale.

frame_scaling

Video Output Scale

How to scale the data before making video(s).

Choose one of the following options:

  • Linear: No scaling.

  • Log10: Take the log10 of the data.

  • dB: Convert to decibels.

video_output_scale

Plot Output Scale

How to scale the data before making the summary metric plot(s).

(Same options as Video Output Scale)

plot_output_scale

Histogram Output Scale

How to scale the data before taking a histogram.

(Same options as Video Output Scale)

hist_scale

Video Prefix

A prefix added to the video filename(s).

String

video_prefix

Video Postfix

A postfix added to the video filename(s).

String

video_postfix