opticam.noise
Functions
|
Get the number of source photons. |
|
Get the number of sky photons per pixel. |
|
Get the standard error (in magnitudes) of the sky noise. |
|
Get the standard error (in magnitudes) of the shot noise. |
|
Get the standard error (in magnitudes) of the dark current noise. |
|
Get the standard error (in magnitudes) of the readout noise. |
|
The (simplified) S/N ratio equation or CCD Equation (see Chapter 4.4 of Handbook of CCD Astronomy by Howell, 2006). |
|
The standard error (in magnitudes) on the CCD Equation (see Chapter 4.4 of Handbook of CCD Astronomy by Howell, |
|
Get the noise values of a science image. |
|
Get the S/N ratios for the cataloged sources in a science image. |
|
Characterise the expected noise from an image and compare it to the measured noise for a number of cataloged |
Module Contents
- opticam.noise.get_source_photons(N_source, gain)
Get the number of source photons.
Parameters
- N_sourcefloat | NDArray
The number of source counts.
- gainfloat
The gain.
Returns
- float
The number of source photons.
- Parameters:
N_source (float | numpy.typing.NDArray)
gain (float)
- Return type:
float | numpy.typing.NDArray
- opticam.noise.get_sky_photons_per_pixel(n_sky, gain)
Get the number of sky photons per pixel.
Parameters
- n_skyfloat
The sky counts per pixel.
- gainfloat
The gain.
Returns
- float
The number of sky photons per pixel.
- Parameters:
n_sky (float)
gain (float)
- Return type:
float
- opticam.noise.get_sky_stderr(N_source, N_pix, n_sky, gain)
Get the standard error (in magnitudes) of the sky noise.
Parameters
- N_sourcefloat
The total number of source counts.
- N_pixint
The number of aperture pixels.
- n_skyfloat
The number of sky counts per pixel.
- gain: float
The detector gain.
Returns
- float
The standard error (in magnitudes) of the sky noise.
- Parameters:
N_source (float)
N_pix (float)
n_sky (float)
gain (float)
- Return type:
float
- opticam.noise.get_shot_stderr(N_source, gain)
Get the standard error (in magnitudes) of the shot noise.
Parameters
- N_sourcefloat
The total number of source counts.
- gain: float
The detector gain.
Returns
- float
The standard error (in magnitudes) of the shot noise.
- Parameters:
N_source (float)
gain (float)
- Return type:
float
- opticam.noise.get_dark_stderr(N_source, N_pix, dark_flux, gain)
Get the standard error (in magnitudes) of the dark current noise.
Parameters
- N_sourceQuantity
The total number of source counts.
- N_pixint
The number of aperture pixels.
- dark_currQuantity
The number of dark current electrons per pixel per unit time.
- t_exp: Quantity
The exposure time.
- gain: Quantity
The detector gain.
Returns
- float
The standard error (in magnitudes) of the dark current noise.
- Parameters:
N_source (float)
N_pix (float)
dark_flux (float)
gain (float)
- Return type:
float
- opticam.noise.get_read_stderr(N_source, N_pix, gain)
Get the standard error (in magnitudes) of the readout noise.
Parameters
- N_sourcefloat
The total number of source counts.
- N_pixfloat
The number of aperture pixels.
- gain: float
The detector gain.
Returns
- float
The standard error (in magnitudes) of the readout noise.
- Parameters:
N_source (float)
N_pix (float)
gain (float)
- Return type:
float
- opticam.noise.snr(N_source, N_pix, n_sky, dark_flux, gain)
The (simplified) S/N ratio equation or CCD Equation (see Chapter 4.4 of Handbook of CCD Astronomy by Howell, 2006).
Parameters
- N_sourcefloat | NDArray
The total number of source counts.
- N_pixint
The number of aperture pixels.
- n_skyfloat
The number of sky counts per pixel.
- dark_fluxfloat
The dark current’s “flux” contribution per pixel.
- gain: float
The detector gain.
Returns
- float | NDArray
The S/N ratio.
- Parameters:
N_source (float | numpy.typing.NDArray)
N_pix (float)
n_sky (float)
dark_flux (float)
gain (float)
- Return type:
float | numpy.typing.NDArray
- opticam.noise.snr_stderr(N_source, N_pix, n_sky, dark_flux, gain)
The standard error (in magnitudes) on the CCD Equation (see Chapter 4.4 of Handbook of CCD Astronomy by Howell, 2006).
Parameters
- N_sourcefloat | NDArray
The total number of source counts.
- N_pixfloat
The number of aperture pixels.
- n_skyfloat
The number of sky counts per pixel.
- dark_fluxfloat
The dark current’s “flux” contribution per pixel.
- gain: float
The detector gain.
Returns
- float | NDArray
The standard error (in magnitudes) on the S/N ratio.
- Parameters:
N_source (float | numpy.typing.NDArray)
N_pix (float)
n_sky (float)
dark_flux (float)
gain (float)
- Return type:
float | numpy.typing.NDArray
- opticam.noise.get_noise_params(file, catalog, background, psf_params)
Get the noise values of a science image.
Parameters
- filestr
The path to the science image.
- catalogQTable
The source catalog corresponding to the science image.
- backgroundBaseBackground | Callable
The background estimator.
- psf_paramsDict[str, float]
The PSF parameters.
Returns
- Tuple[NDArray, NDArray, float, float, float, float]
The fluxes, flux errors, number of aperture pixels, backgorund counts/pixel, dark flux, and gain.
- Parameters:
file (str)
catalog (astropy.table.QTable)
background (opticam.background.global_background.BaseBackground | Callable)
psf_params (Dict[str, float])
- Return type:
Tuple[numpy.typing.NDArray, numpy.typing.NDArray, float, float, float, float]
- opticam.noise.get_snrs(file, background, catalog, psf_params)
Get the S/N ratios for the cataloged sources in a science image.
Parameters
- filestr
The path to the science image.
- backgroundBaseBackground | Callable
The background estimator.
- catalogQTable
The source catalog corresponding to the science image.
- psf_paramsDict[str, float]
The PSF parameters.
Returns
- NDArray
The S/N for each source. Sources are ordered as they appear in catalog.
- Parameters:
file (str)
background (opticam.background.global_background.BaseBackground | Callable)
catalog (astropy.table.QTable)
psf_params (Dict[str, float])
- Return type:
numpy.typing.NDArray
- opticam.noise.characterise_noise(file, background, catalog, psf_params)
Characterise the expected noise from an image and compare it to the measured noise for a number of cataloged sources.
Parameters
- filestr
The file path to the science image.
- backgroundBaseBackground | Callable
The background estimator.
- catalogQTable
The source catalog corresponding to the science image.
- psf_paramsDict[str, float]
The PSF parameters.
Returns
- Dict[str, NDArray]
The noies properties.
- Parameters:
file (str)
background (opticam.background.global_background.BaseBackground | Callable)
catalog (astropy.table.QTable)
psf_params (Dict[str, float])
- Return type:
Dict[str, numpy.typing.NDArray]