Detector¶
-
class
simcado.detector.
Detector
(cmds, small_fov=True)[source]¶ Bases:
object
Generate a series of
Chip
objects for a focal plane arrayThe
Detector
is a holder for the series ofChip
objects which make up the detector array. The main advantage of theDetector
object is that the user can read out all chips in the whole detector array at once. ADetector
is a parameter in theSource.apply_optical_train()
method.- Parameters
- cmdsUserCommands
Commands for how to model the Detector
- small_fovbool, optional
Default is True. Uses a single 1024x1024 window at the centre of the FoV
See also
Examples
Create a
Detector
object>>> import simcado as sim >>> my_cmds = sim.UserCommands() >>> my_detector = sim.Detector(my_cmds)
Read out only the first
Chip
>>> my_detector.readout(filename=image.fits, chips=[0])
- Attributes
- cmdsUserCommands
commands for modelling the detector layout and exposures
- layoutastropy.table.Table
table of positions and sizes of the chips on the focal plane
- chipslist
a list of the
Chips
which make up the detector array- oversampleint
factor between the internal angular resolution and the pixel FOV
- fpa_resfloat
[mas] field of view of a single pixel
- ditfloat
[s] exposure time of a single DIT
- trofloat
[s] time between consecutive non-destructive readouts in up-the-ramp mode
- nditint
number of exposures (DITs)
Methods
read_out()
for reading out the detector array into a FITS file
open()
not yet implemented
write()
not yet implemented Save the Detector object into a FITS file
.. todo::
Open should be moved into a general function for detector.py which returns a
Detector
object after reading in a saved detector fileMethods Summary
read_out
(self[, filename, to_disk, chips, …])Simulate the read-out process of the detector array
write
(self[, filename])Write a
Detector
object out to a FITS fileMethods Documentation
-
read_out
(self, filename=None, to_disk=False, chips=None, read_out_type='superfast', **kwargs)[source]¶ Simulate the read-out process of the detector array
Based on the parameters set in the
UserCommands
object, the detector will read out the images stored on theChips
according to the specified read-out scheme, i.e. Fowler, up-the-ramp, single read, etc.- Parameters
- filenamestr
where the file is to be saved. If
None
andto_disk
is true, the output file is called “output.fits”. Default isNone
- to_diskbool
a flag for where the output should go. If
filename
is given or ifto_disk=True
, theChip
images will be written to a .fits` file on disk. If no filename` is specified, the output will be called “output.fits”.- chipsint, array-like, optional
The chip or chips to be read out, based on the detector_layout.dat file. Default is the first
Chip
specified in the list, i.e. [0].- read_out_typestr, optional
The name of the algorithm used to read out the chips: - “superfast” - “non_destructive” - “up_the_ramp”
- Returns
- astropy.io.fits.HDUList
-
write
(self, filename=None, **kwargs)[source]¶ Write a
Detector
object out to a FITS fileWrites the important information contained in a
Detector
object into FITS file for later use. The main information written out includes: the layout of the detector chips, any pixel maps associated with the detector chips, a linearity curve and a QE curve for the chips.- Parameters
- filenamestr, optional
path to the FITS file where the
Detector
object is stored. Iffilename=None
(by default), the file written is./detector.fits