Limiting magnitude¶
The limiting magnitude is one of the mandatory header keywords in the Phase 3 archival standard and characterizes the depth of an observation. According to the ESO Phase 3 standard, it is defined as the magnitude of an unresolved source whose flux is 5 times the noise background, i.e. the magnitude of a point like source detected with S/N = 5.
In PyHDRL this is hdrl.func.Maglim.
Algorithm¶
The limiting magnitude of an image is determined as follows:
The input image is convolved with a Gaussian kernel specified by
fwhm(the FWHM of the kernel),kernel_size_xandkernel_size_y. To minimize border effects during convolution, the input image gets enlarged by a border depending on the kernel size.extend_methodspecifies the algorithm for out-of-bounds pixels:hdrl.func.Maglim.ImageExtendMethod.Nearest(nearest border pixel) orhdrl.func.Maglim.ImageExtendMethod.Mirror(mirror the image with respect to the border). Masked pixels are ignored in the convolution.Compute the mode of the convolved image (see the collapse mode method in the HDRL Pipeline Developer Manual).
Consider all the non-masked pixels in the convolved image below the mode (valid pixels), and compute the noise as
NOISE = 1.4826 * MAD(valid pixels) * cwithc ≈ 1.6588967. If MAD = 0, thenNOISE = STDDEV(valid pixels) * c.Compute the limiting magnitude as
ABMAGLIM = -2.5 log10(5 * NOISE * 4πσ²) + ZPTwithσ = FWHM / sqrt(4 ln(4)).
Compute¶
mode_param is a hdrl.func.Collapse (typically
hdrl.func.Collapse.Mode(...)) or None.
compute() takes a cpl.core.Image and returns a float.
mode_param = hdrl.func.Collapse.Mode(
0.0, 0.0, 0.0, hdrl.func.Collapse.Method.Median, 0
)
maglim = hdrl.func.Maglim(
zeropoint,
fwhm,
kernel_size_x,
kernel_size_y,
hdrl.func.Maglim.ImageExtendMethod.Mirror,
mode_param,
)
limiting_magnitude = maglim.compute(image)