opticam.noise ============= .. py:module:: opticam.noise Functions --------- .. autoapisummary:: opticam.noise.get_sky_stderr opticam.noise.get_shot_stderr opticam.noise.get_bias_stderr opticam.noise.get_dark_stderr opticam.noise.get_flat_stderr opticam.noise.get_read_stderr opticam.noise.get_scint_stderr opticam.noise.snr opticam.noise.snr_stderr Module Contents --------------- .. py:function:: get_sky_stderr(N_source, N_pix, n_sky) Get the standard error (in magnitudes) of the sky noise. Parameters ---------- N_source : float The total number of source counts. N_pix : int The number of aperture pixels. n_sky : float The number of sky counts **per pixel**. Returns ------- float The standard error (in magnitudes) of the sky noise. .. py:function:: get_shot_stderr(N_source) Get the standard error (in magnitudes) of the shot noise. Parameters ---------- N_source : float The total number of source counts. Returns ------- float The standard error (in magnitudes) of the shot noise. .. py:function:: get_bias_stderr(N_source, N_pix, bias_var) Get the standard error (in magnitudes) of the bias variance. Parameters ---------- N_source : Quantity The total number of source counts. N_pix : int The number of aperture pixels. bias_var : Quantity The bias variance. Returns ------- float The standard error (in magnitudes) of the bias variance. .. py:function:: get_dark_stderr(N_source, N_pix, dark_var) Get the standard error (in magnitudes) of the dark noise variance. Parameters ---------- N_source : float The total number of source counts. N_pix : int The number of aperture pixels. dark_var : float The dark noise variance. Returns ------- float The standard error (in magnitudes) of the dark noise. .. py:function:: get_flat_stderr(N_source, N_pix, flat_var) Get the standard error (in magnitudes) of the flat-field variance. Parameters ---------- N_source : float The total number of source counts. N_pix : int The number of aperture pixels. flat_var : float The flat-field variance. Returns ------- float The standard error (in magnitudes) of the flat-field variance. .. py:function:: get_read_stderr(N_source, N_pix, read_noise) Get the standard error (in magnitudes) of the readout noise. Parameters ---------- N_source : float The total number of source counts. N_pix : float The number of aperture pixels. read_noise : float The read noise of the detector in electrons/pixel. Returns ------- float The standard error (in magnitudes) of the readout noise. .. py:function:: get_scint_stderr(N_source, rel_scint_noise) Get the standard error (in magnitudes) of the scintillation noise. Parameters ---------- N_source : float | NDArray The total number of source counts. rel_scint_noise : float The relative scintillation noise. Returns ------- float | NDArray The standard error (in magnitudes) of the scintillation noise. .. py:function:: snr(N_source, N_pix, n_sky, bias_var, dark_var, flat_var, read_noise, scint_noise) The (simplified) S/N ratio equation or CCD Equation (see Chapter 4.4 of Handbook of CCD Astronomy by Howell, 2006). Parameters ---------- N_source : float | NDArray The total number of source counts. N_pix : int The number of aperture pixels. n_sky : float The number of sky counts **per pixel**. bias_var : float The bias variance. dark_var : float The dark noise variance. flat_var : float The flat-field variance. read_noise : float The read noise of the detector in electrons/pixel. scint_noise : NDArray The scintillation noise. Returns ------- float | NDArray The S/N ratio. .. py:function:: snr_stderr(N_source, N_pix, n_sky, bias_var, dark_var, flat_var, read_noise, rel_scint_noise) The standard error (in magnitudes) on the CCD Equation (see Chapter 4.4 of Handbook of CCD Astronomy by Howell, 2006). Parameters ---------- N_source : float | NDArray The total number of source counts. N_pix : float The number of aperture pixels. n_sky : float The number of sky counts **per pixel**. bias_var : float The bias variance. dark_var : float The dark noise variance. flat_var : float The flat-field variance. read_noise : float The read noise of the detector in electrons/pixel. rel_scint_noise : float The relative scintillation noise. Returns ------- float | NDArray The standard error (in magnitudes) on the S/N ratio.