Vignetting Correction#

Concept#

Optical vignetting describes the drop in brightness towards the edge of images captured through an optical path. The vignetting correction module applies measured calibration maps to undo the effects of optical vignetting. Vignetting calibration maps are spacecraft and polarizer-state dependent, and are measured pre-flight and updated using starfield measurements during commissioning and during the life of the mission.

For an input data array (I) and corresponding vignetting correction array (VG), the corrected data array (I’) for each corresponding pixel i,j is computed via:

\[I'_{i,j} = I_{i,j} / VG_{i,j}\]

Applying correction#

The correction is carried out primarily in the punchbowl.level1.vignette.correct_vignetting_task function:

punchbowl.level1.vignette.correct_vignetting_task(data_object: ~ndcube.ndcube.NDCube, vignetting_path: <module 'pathlib' from '/home/docs/.asdf/installs/python/3.12.3/lib/python3.12/pathlib.py'>) NDCube

Prefect task to correct the vignetting of an image.

Vignetting is a reduction of an image’s brightness or saturation toward the periphery compared to the image center, created by the optical path. The Vignetting Module will transform the data through a flat-field correction map, to cancel out the effects of optical vignetting created by distortions in the optical path. This module also corrects detector gain variation and offset.

Correction maps will be 2048*2048 arrays, to match the input data, and built using the starfield brightness pattern. Mathematical Operation:

I’_{i,j} = I_i,j * FF_{i,j}

Where I_{i,j} is the number of counts in pixel i, j. I’_{i,j} refers to the modified value. FF_{i,j} is the small-scale flat field factor for pixel i, j. The correction mapping will take into account the orientation of the spacecraft and its position in the orbit.

Uncertainty across the image plane is calculated using the modelled flat-field correction with stim lamp calibration data. Deviations from the known flat-field are used to calculate the uncertainty in a given pixel. The uncertainty is convolved with the input uncertainty layer to produce the output uncertainty layer.

Parameters:
  • data_object (PUNCHData) – data on which to operate

  • vignetting_path (pathlib) – path to vignetting function to apply to input data

Returns:

modified version of the input with the vignetting corrected

Return type:

PUNCHData

If you wish to incorporate this as a Prefect task in a custom pipeline, using something like the punchbowl.level1.vignette.correct_vignetting_task is recommended.

Deriving correction#

Vignetting correction calibration files are derived pre-flight from measurements, and will be updated during commissioning using starfield brightness data, via a separate module.