Skip to main content
`Ctrl`+`K`

# signal_to_noise_oir_ccd

astropy.stats.signal_to_noise_oir_ccd(t, source_eps, sky_eps, dark_eps, rd, npix, gain=1.0)

  Computes the signal to noise ratio for source being observed in the optical/IR using a CCD.

  Parameters:
    t `python:float` or `numpy.ndarray`

      CCD integration time in seconds

    source_eps `python:float`

      Number of electrons (photons) or DN per second in the aperture from the source. Note that this should already have been scaled by the filter transmission and the quantum efficiency of the CCD. If the input is in DN, then be sure to set the gain to the proper value for the CCD. If the input is in electrons per second, then keep the gain as its default of 1.0.

    sky_eps `python:float`

      Number of electrons (photons) or DN per second per pixel from the sky background. Should already be scaled by filter transmission and QE. This must be in the same units as source_eps for the calculation to make sense.

    dark_eps `python:float`

      Number of thermal electrons per second per pixel. If this is given in DN or ADU, then multiply by the gain to get the value in electrons.

    rd `python:float`

      Read noise of the CCD in electrons. If this is given in DN or ADU, then multiply by the gain to get the value in electrons.

    npix `python:float`

      Size of the aperture in pixels

    gain `python:float`, optional

      Gain of the CCD. In units of electrons per DN.

  Returns:
    SNR `python:float` or `numpy.ndarray`

      Signal to noise ratio calculated from the inputs