CR2RE Pipeline Reference Manual 1.6.10
Functions
Strehl Computation

Function to compute the Strehl ratio on an image. More...

Functions

hdrl_parameter * hdrl_strehl_parameter_create (double wavelength, double m1_radius, double m2_radius, double pixel_scale_x, double pixel_scale_y, double flux_radius, double bkg_radius_low, double bkg_radius_high)
 Creates Strehl Parameters object.
 
cpl_boolean hdrl_strehl_parameter_check (const hdrl_parameter *self)
 Check that the parameter is a Strehl parameter.
 
double hdrl_strehl_parameter_get_wavelength (const hdrl_parameter *p)
 Access the wavelength in the Strehl parameter.
 
double hdrl_strehl_parameter_get_m1 (const hdrl_parameter *p)
 Access the primary mirror radius in the Strehl parameter.
 
double hdrl_strehl_parameter_get_m2 (const hdrl_parameter *p)
 Access the obstruction radius in the Strehl parameter.
 
double hdrl_strehl_parameter_get_pixel_scale_x (const hdrl_parameter *p)
 Access the image X pixel scale in the Strehl parameter.
 
double hdrl_strehl_parameter_get_pixel_scale_y (const hdrl_parameter *p)
 Access the image Y pixel scale in the Strehl parameter.
 
double hdrl_strehl_parameter_get_flux_radius (const hdrl_parameter *p)
 Access the total flux radius in the Strehl parameter.
 
double hdrl_strehl_parameter_get_bkg_radius_low (const hdrl_parameter *p)
 Access the background region internal radius in the Strehl parameter.
 
double hdrl_strehl_parameter_get_bkg_radius_high (const hdrl_parameter *p)
 Access the background region external radius in the Strehl parameter.
 
cpl_parameterlist * hdrl_strehl_parameter_create_parlist (const char *base_context, const char *prefix, hdrl_parameter *par)
 Create parameter list for the Strehl computation.
 
hdrl_parameter * hdrl_strehl_parameter_parse_parlist (const cpl_parameterlist *parlist, const char *prefix)
 Parse parameter list to create input parameters for the Strehl.
 
hdrl_strehl_result hdrl_strehl_compute (const hdrl_image *himg, hdrl_parameter *params)
 This function computes the Strehl ratio.
 

Detailed Description

Function to compute the Strehl ratio on an image.

The most commonly used metrics for evaluating the AO correction is the Strehl ratio. The Strehl ratio is defined as the ratio of the peak image intensity from a point source compared to the maximum attainable intensity using an ideal optical system limited only by diffraction over the telescope aperture. The Strehl ratio is very frequently used to perform the quality control of the scientific data obtained with the AO assisted instrumentation.

The calculation is performed by calling the top-level function hdrl_strehl_compute() and the parameters passed to this function can be created by calling hdrl_strehl_parameter_create().

Function Documentation

◆ hdrl_strehl_compute()

hdrl_strehl_result hdrl_strehl_compute ( const hdrl_image *  himg,
hdrl_parameter *  params 
)

This function computes the Strehl ratio.

Parameters
himginput hdrl image
paramsinput hdrl parameters
See also
hdrl_strehl_parameter_create()

The raw image is assumed to be pre-processed to remove the instrument signatures (bad pixels, etc.) and the natural noise sources (sky background, etc.). Nethertheless this function allows also the user to correct a residual background by setting the parameters bkg_radius_low, bkg_radius_high. The PSF is identified and its integrated flux (controlled by the parameter flux_radius) is normalized to 1. The PSF baricenter is computed and used to generate the ideal PSF (with integrated flux normalized to 1) which takes into account the telescope pupil characteristics (radius m1, central obstruction, m2, ...), the wavelength wavelength, at which the image has been obtained and the related pixel scale (pixel_scale_x, pixel_scale_y,). Finally the Strehl ratio is computed dividing the maximum intensity of the image PSF by the maximum intensity of the ideal PSF and the associated error is also computed.

Definition at line 1326 of file hdrl_strehl.c.

◆ hdrl_strehl_parameter_check()

cpl_boolean hdrl_strehl_parameter_check ( const hdrl_parameter *  self)

Check that the parameter is a Strehl parameter.

Parameters
selfThe parameter to check
Returns
True or False

Definition at line 221 of file hdrl_strehl.c.

Referenced by hdrl_strehl_parameter_create_parlist().

◆ hdrl_strehl_parameter_create()

hdrl_parameter * hdrl_strehl_parameter_create ( double  wavelength,
double  m1_radius,
double  m2_radius,
double  pixel_scale_x,
double  pixel_scale_y,
double  flux_radius,
double  bkg_radius_low,
double  bkg_radius_high 
)

Creates Strehl Parameters object.

Parameters
wavelengthNominal filter wavelength [m]
m1_radiusprimary mirror radius [m]
m2_radiusobstruction radius [m]
pixel_scale_ximage X pixel scale in [arcsec]
pixel_scale_yimage Y pixel scale in [arcsec]
flux_radiusradius used to sum the flux [arcsec]
bkg_radius_lowradius used to determine the background [arcsec]
bkg_radius_highradius used to determine the background [arcsec]
Returns
The Strehl parameters object. It needs to be deallocated with hdrl_parameter_delete()
See also
hdrl_parameter_delete()
hdrl_strehl_compute() The method creates a parameter to compute the Strehl

Definition at line 188 of file hdrl_strehl.c.

Referenced by hdrl_strehl_parameter_parse_parlist().

◆ hdrl_strehl_parameter_create_parlist()

cpl_parameterlist * hdrl_strehl_parameter_create_parlist ( const char *  base_context,
const char *  prefix,
hdrl_parameter *  par 
)

Create parameter list for the Strehl computation.

Parameters
base_contextbase context of parameter (e.g. recipe name)
prefixprefix of parameter, may be an empty string
parhdrl_parameter defining the defaults
See also
hdrl_strehl_parameter_create()

Creates a parameter list with the Strehl parameters:

  • base_context.prefix.wavelength
  • base_context.prefix.m1
  • base_context.prefix.m2
  • base_context.prefix.pixel-scale-x
  • base_context.prefix.pixel-scale-y
  • base_context.prefix.flux-radius
  • base_context.prefix.bkg-radius-low
  • base_context.prefix.bkg-radius-high

The CLI aliases omit the base_context.

Definition at line 360 of file hdrl_strehl.c.

References hdrl_strehl_parameter_check(), hdrl_strehl_parameter_get_bkg_radius_high(), hdrl_strehl_parameter_get_bkg_radius_low(), hdrl_strehl_parameter_get_flux_radius(), hdrl_strehl_parameter_get_m1(), hdrl_strehl_parameter_get_m2(), hdrl_strehl_parameter_get_pixel_scale_x(), hdrl_strehl_parameter_get_pixel_scale_y(), and hdrl_strehl_parameter_get_wavelength().

◆ hdrl_strehl_parameter_get_bkg_radius_high()

double hdrl_strehl_parameter_get_bkg_radius_high ( const hdrl_parameter *  p)

Access the background region external radius in the Strehl parameter.

Parameters
pThe Strehl parameter
Returns
The background region external radius value

Definition at line 331 of file hdrl_strehl.c.

Referenced by hdrl_strehl_parameter_create_parlist().

◆ hdrl_strehl_parameter_get_bkg_radius_low()

double hdrl_strehl_parameter_get_bkg_radius_low ( const hdrl_parameter *  p)

Access the background region internal radius in the Strehl parameter.

Parameters
pThe Strehl parameter
Returns
The background region internal radius value

Definition at line 317 of file hdrl_strehl.c.

Referenced by hdrl_strehl_parameter_create_parlist().

◆ hdrl_strehl_parameter_get_flux_radius()

double hdrl_strehl_parameter_get_flux_radius ( const hdrl_parameter *  p)

Access the total flux radius in the Strehl parameter.

Parameters
pThe Strehl parameter
Returns
The total flux radius value

Definition at line 303 of file hdrl_strehl.c.

Referenced by hdrl_strehl_parameter_create_parlist().

◆ hdrl_strehl_parameter_get_m1()

double hdrl_strehl_parameter_get_m1 ( const hdrl_parameter *  p)

Access the primary mirror radius in the Strehl parameter.

Parameters
pThe Strehl parameter
Returns
The primary mirror radius value

Definition at line 247 of file hdrl_strehl.c.

Referenced by hdrl_strehl_parameter_create_parlist().

◆ hdrl_strehl_parameter_get_m2()

double hdrl_strehl_parameter_get_m2 ( const hdrl_parameter *  p)

Access the obstruction radius in the Strehl parameter.

Parameters
pThe Strehl parameter
Returns
The obstruction radius value

Definition at line 261 of file hdrl_strehl.c.

Referenced by hdrl_strehl_parameter_create_parlist().

◆ hdrl_strehl_parameter_get_pixel_scale_x()

double hdrl_strehl_parameter_get_pixel_scale_x ( const hdrl_parameter *  p)

Access the image X pixel scale in the Strehl parameter.

Parameters
pThe Strehl parameter
Returns
The image X pixel scale value

Definition at line 275 of file hdrl_strehl.c.

Referenced by hdrl_strehl_parameter_create_parlist().

◆ hdrl_strehl_parameter_get_pixel_scale_y()

double hdrl_strehl_parameter_get_pixel_scale_y ( const hdrl_parameter *  p)

Access the image Y pixel scale in the Strehl parameter.

Parameters
pThe Strehl parameter
Returns
The image Y pixel scale value

Definition at line 289 of file hdrl_strehl.c.

Referenced by hdrl_strehl_parameter_create_parlist().

◆ hdrl_strehl_parameter_get_wavelength()

double hdrl_strehl_parameter_get_wavelength ( const hdrl_parameter *  p)

Access the wavelength in the Strehl parameter.

Parameters
pThe Strehl parameter
Returns
The wavelength value

Definition at line 233 of file hdrl_strehl.c.

Referenced by hdrl_strehl_parameter_create_parlist().

◆ hdrl_strehl_parameter_parse_parlist()

hdrl_parameter * hdrl_strehl_parameter_parse_parlist ( const cpl_parameterlist *  parlist,
const char *  prefix 
)

Parse parameter list to create input parameters for the Strehl.

Parameters
parlistparameter list to parse
prefixprefix of parameter name
Returns
Input parameters for the Strehl computation

Reads a parameter list in order to create Strehl parameters.

Expects a parameter list containing:

  • base_context.prefix.wavelength
  • base_context.prefix.m1
  • base_context.prefix.m2
  • base_context.prefix.pixel-scale-x
  • base_context.prefix.pixel-scale-y
  • base_context.prefix.flux-radius
  • base_context.prefix.bkg-radius-low
  • base_context.prefix.bkg-radius-high

Definition at line 448 of file hdrl_strehl.c.

References hdrl_join_string(), and hdrl_strehl_parameter_create().