Chip¶
-
class
simcado.detector.
Chip
(x_cen, y_cen, x_len, y_len, pix_res, pixsize=15, angle=0, gain=1, obs_coords=[0, 0], fieldangle=0, chipid=None, flat_field=None)[source]¶ Bases:
object
Holds the “image” as seen by a single chip in the focal plane
The
Chip
object contains information on where it is located in the focal plane array. The method<Source>.apply_optical_train()
passes an image of the on-sky object to eachChip
. This image is resampled to theChip
pixel scale. EachChip
holds the “ideal” image as an array of expectation values for number of photons arriving per second. TheChip
then adds detector noise and other characteristics to the image when <Detector>.readout() is called.- Parameters
- x_cen, y_cenfloat
[micron] the coordinates of the centre of the chip relative to the centre of the focal plane
- x_len, y_lenint
the number of pixels per dimension
- pix_resfloat
[arcsec] the field of view per pixel
- idint
an identification number for the chip (assuming they are not correctly ordered)
- flat_fieldnp.ndarray
a 2D array holding the flat fielding effects for the chip
- Attributes
- x_cen, y_cenfloat
[arcsec] the coordinates of the centre of the chip relative to the centre of the focal plane
- naxis1, naxis2int
the number of pixels per dimension
- pix_resfloat
[arcsec] the field of view per pixel
- chipidint, optional
the id of the chip relative to the others on the detector array. Default is
None
- dx, dyfloat
[arcsec] half of the field of view of each chip
- x_min, x_max, y_min, y_maxfloat
[arcsec] the borders of the chip relative to the centre of the focal plane
- arraynp.ndarray
an array for holding the signal registered by the
Chip
Methods
add_signal(signal)
adds signal to
.array
. The signal should be the same dimensions asChip.array
add_uniform_background(emission, lam_min, lam_max, output=False)
adds a constant to the signal in
.array
. The background level is found by integrating theemission
curve betweenlam_min
andlam_max
. If output is set toTrue
, an image with the same dimensions as.array
scaled to the background flux is returned.apply_pixel_map(pixel_map_path=None, dead_pix=None, max_well_depth=1E5)
applies a mask to
.array
representing the position of the current “hot” and “dead” pixels / linesreset()
resets the signal on the
Chip
to zero. In future releases, an implementation of the persistence characteristics of the detector will go here.Methods Summary
add_signal
(self, signal)Add a 2D array of photon signal to the Chip
add_uniform_background
(self, emission, …)Add a uniform background
apply_pixel_map
(self[, pixel_map_path, …])Adds “hot” and “dead” pixels to the array
read_out
(self, cmds[, read_out_type])Read out the detector array
reset
(self)Methods Documentation
-
add_signal
(self, signal)[source]¶ Add a 2D array of photon signal to the Chip
Add some signal photons to the detector array. Input units are expected to be [ph/s/pixel]
- Parameters
- signalnp.ndarray
[ph/pixel/s] photon signal.
signal
should have the same dimensions as thearray
- Returns
- None
-
add_uniform_background
(self, emission, lam_min, lam_max, output=False)[source]¶ Add a uniform background
Take an EmissionCurve and some wavelength boundaries, lam_min and lam_max, and sum up the photons in between. Add those to the source array.
- Parameters
- - emission_curve: EmissionCurve object with background emission photons
- - lam_min, lam_max: the wavelength limits
- Optional keywords:
- - output: [False, True] if output is True, the BG emission array is
returned
- Output is in [ph/s/pixel].
-
apply_pixel_map
(self, pixel_map_path=None, dead_pix=None, max_well_depth=100000.0)[source]¶ Adds “hot” and “dead” pixels to the array
applies a mask to
.array
representing the positions of the current “hot” and “dead” pixels / lines. The method either reads in a FITS file with locations of these pixels, or generates a series of random coordinates and random weights for the pixels.- Parameters
- pixel_map_pathstr
path to the FITS file. Default is None
- dead_pixint
[%] the percentage of dead or hot pixels on the chip - only used if
pixel_map_path = None
. Default isNone
.- max_well_depth1E5
- Returns
- None