synospec.etc.detector module

Detector class


License

Copyright © 2020, Kyle B. Westfall


class synospec.etc.detector.Detector(shape=None, pixelsize=15.0, binning=1, rn=1.0, dark=0.0, cic=0.0, gain=1.0, fullwell=10000.0, nonlinear=1.0, qe=0.9, em_fac=1.0, em_gain=1.0, fps=1.0)[source]

Bases: synospec.etc.efficiency.Efficiency

Define the detector technical properties.

Parameters
  • shape (tuple, optional) – Dimensions of the unbinned detector in number of pixels along the spectral axis and number of pixels along the spatial axis. Can be None, but limits use if it is.

  • pixelsize (float, optional) – The size of the unbinned (square) detector pixels in micron.

  • binning (int, optional) – The number of unbinned pixels along one axis included in a square binned pixel. I.e., if the binning is 4x4, this should be 4. Currently cannot accommodate binned that is not square.

  • rn (float, optional) – Read-noise in electrons.

  • dark (float, optional) – Dark current in electrons per pixel per second.

  • cic (float, optional) – Clock-induced charge in electrons per pixel.

  • gain (float, optional) – Gain of detector amplifier in electrons per ADU.

  • fullwell (float, optional) – The full well of the pixels in electrons.

  • nonlinear (float, optional) – The fraction of the fullwell above which the detector response is nonlinear.

  • qe (float, Efficiency, optional) – Detector quantum efficiency.

  • em_fac (float, optional) – For EMCCDs, this is the multiplicative noise factor due to the stochasticity in the gain at high gain. The theoretical value for this is \(\sqrt{2}\). Average values for EMCCDs is quoted as 1.3 by Hamamatsu. This should be 1 for a normal CCD.

  • em_gain (float, optional) – For EMCCDs, the readnoise can be provided as either the readnoise without electron multiplication or with multiplication. If provided with multiplication, this parameter should be set to 1 and the inclusion of the readnoise in the detector noise is identical to a normal CCD. If provided without electron multiplication, em_gain should provide the electron multiplication gain setting, and the readnoise term included in the error budget is then rn/em_gain.

  • fps (float, optional) – Readout time expressed in number of full-frame readouts per second.

count_rate(wave, photon_rate)[source]

Apply the quantum efficiency to convert a photon rate to an electron count rate.

Parameters
  • wave (float, array-like) – The wavelength for the incident photons.

  • photon_rate (float, array-like) – The photon flux in number per second at the provided wavelength.

Returns

Count rate.

Return type

float, numpy.ndarray

n_exp(t_exp, t_tot)[source]

Provided a total observing time and an integration time per exposure, calculate the maximum number of exposures that be performed given the detector readout time.

Parameters
  • t_exp (int) – Integration time per exposure.

  • t_tot (float) – Total observing allocation in seconds.

Returns

Number of exposures possible within the total observing allocation.

Return type

float

t_exp(n_exp, t_tot)[source]

Provided a total observing time and a number of exposures, calculate the maximum integration time per exposure given the detector readout time.

Parameters
  • n_exp (int) – Number of exposures.

  • t_tot (float) – Total observing allocation in seconds.

Returns

Integration time per exposure to fill to total observing allocation.

Return type

float

t_tot(n_exp, t_exp)[source]

Get the total observing time including readout overhead.

variance(count_rate, exptime=1.0)[source]

Compute the detector variance for a given count rate.

Parameters
  • count_rate (float, numpy.ndarray) – Number of counts per second. The quantum efficiency should already have been accounted for; see count_rate().

  • exptime (float, optional) – The exposure time in seconds.

Returns

The expected statistical error in the detector counts. Shape (and type) match photon_flux.

Return type

float, numpy.ndarray