Detector¶
-
class
simcado.detector.Detector(cmds, small_fov=True)[source]¶ Bases:
objectGenerate a series of
Chipobjects for a focal plane arrayThe
Detectoris a holder for the series ofChipobjects which make up the detector array. The main advantage of theDetectorobject is that the user can read out all chips in the whole detector array at once. ADetectoris 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
Detectorobject>>> 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
Chipswhich 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
Detectorobject 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
Detectorobject 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
UserCommandsobject, the detector will read out the images stored on theChipsaccording 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
Noneandto_diskis true, the output file is called “output.fits”. Default isNone- to_diskbool
a flag for where the output should go. If
filenameis given or ifto_disk=True, theChipimages 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
Chipspecified 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
Detectorobject out to a FITS fileWrites the important information contained in a
Detectorobject 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
Detectorobject is stored. Iffilename=None(by default), the file written is./detector.fits