|
CR2RE Pipeline Reference Manual 1.6.10
|
This module contains a function to compute the limiting magnitude of an image. Several methods are available to deal with different data points distributions. More...
Functions | |
| cpl_error_code | hdrl_maglim_compute (const cpl_image *image, const double zeropoint, const double fwhm, const cpl_size kernel_size_x, const cpl_size kernel_size_y, const hdrl_image_extend_method image_extend_method, const hdrl_parameter *mode_parameter, double *limiting_magnitude) |
| Computes the limiting magnitude of an image. | |
This module contains a function to compute the limiting magnitude of an image. Several methods are available to deal with different data points distributions.
The limiting magnitude is a quantity that characterizes the depth of an observation. It is one of the mandatory header keywords in the Phase3 archival standard for imaging and datacubes. HDRL implements a general algorithm to compute the magnitude limit of an image (or can be used to compute it for each plan of a data cube). The limiting magnitude, according to the Phase3 archive standard, is defined as the magnitude of a unresolved source whose flux is 5 times the noise background (e.g., the magnitude of a point like source detected with S/N = 5).
| cpl_error_code hdrl_maglim_compute | ( | const cpl_image * | image, |
| const double | zeropoint, | ||
| const double | fwhm, | ||
| const cpl_size | kernel_size_x, | ||
| const cpl_size | kernel_size_y, | ||
| const hdrl_image_extend_method | image_extend_method, | ||
| const hdrl_parameter * | mode_parameter, | ||
| double * | limiting_magnitude | ||
| ) |
Computes the limiting magnitude of an image.
PRIVATE
| image | input image |
| zeropoint | the zero point |
| fwhm | the FWHM seeing [pix] |
| kernel_size_x | X kernel size [pix] |
| kernel_size_y | Y kernel size [pix] |
| image_extend_method | method used to extend the image |
| mode_parameter | HDRL parameter controlling the mode computation |
| limiting_magnitude | the computed limiting magnitude |
CPL_ERROR_NONE or the appropriate error code.Please make sure that:
A 2D Gaussian kernel of (X,Y) FWHM kernel_size_x, kernel_size_y is created.
The input image is convolved with the kernel as specified by image_extend_method. If the image has bad pixels the developer is supposed to flag them in its bad pixel extension.
Then is computed the mode of the convolved image according to the parameters specified by the HDRL parameter mode_parameter.
Next are flagged all data points with intensity below the mode.
Finally it is determined the limiting magnitude as:
limiting_magnitude = -2.5 * log10(5. * noise * norm) + zeropoint
where noise is the noise = mad * 1.4826 / sqrt(1. -2. / 3.141592)
mad is the Median Absolute Deviation determined on the flagged image,
norm = 4.0 * 3.141592 * (fwhm / 2.354820045)
Definition at line 114 of file hdrl_maglim.c.
References hdrl_collapse_mode_parameter_get_bin_size(), hdrl_collapse_mode_parameter_get_histo_max(), hdrl_collapse_mode_parameter_get_histo_min(), hdrl_collapse_mode_parameter_get_method(), hdrl_collapse_parameter_is_mode(), hdrl_image_create(), hdrl_image_delete(), hdrl_image_get_image(), hdrl_image_get_image_const(), hdrl_image_get_mask(), hdrl_image_get_mode(), hdrl_image_get_stdev(), and hdrl_image_reject_from_mask().