Science Camera¶
cam
instance-attribute
¶
cam = Detector(
nPix=camera_size,
samplingTime=samplingTime,
fullWellCapacity=camera_params["fullWellCapacity"],
nBits=camera_params["nBits"],
quantumEfficiency=camera_params["quantumEfficiency"],
shotNoise=camera_params["shotNoise"],
darkCurrent=camera_params["darkCurrent"],
readoutNoise=camera_params["readoutNoise"],
gain=camera_params["gain"],
quantization_conversion=camera_params[
"quantization_conversion"
],
sensorType=camera_params["sensorType"],
darkCalibration=camera_params["darkCalibration"],
noiseFlag=noiseFlag,
logger=logger,
**camera_kwargs,
)
__init__ ¶
__init__(
fieldOfView: float,
plate_scale: float,
samplingTime: float,
telescope,
lightRatio: float = 50,
integrationTime: float = None,
decimation: int = 1,
noiseFlag: bool = False,
logger=None,
**kwargs,
)
Initialize a ScienceCam object to simulate a science camera in adaptive optics simulations.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
fieldOfView
|
float
|
Field of view in arcseconds. |
required |
plate_scale
|
float
|
Plate scale in arcseconds per pixel. |
required |
samplingTime
|
float
|
Time interval between frames [s]. |
required |
telescope
|
Telescope
|
Associated telescope object. |
required |
lightRatio
|
float
|
Threshold ratio to select valid subapertures based on flux. |
50
|
integrationTime
|
float
|
Integration time in seconds. Defaults to samplingTime. |
None
|
decimation
|
int
|
Decimation factor for storing results. Default is 50. |
1
|
noiseFlag
|
bool
|
If True, the detector includes noise using the kwargs params/default config. By default, False. |
False
|
logger
|
Logger
|
Logger instance for diagnostics. |
None
|
**kwargs
|
dict
|
Additional keyword arguments. fullWellCapacity : int, optional Detector parameter. Full Well Capacity of pixels [e-]. Default, 60ke- nBits : int, optional Detector parameter. Bit depth for quantization. Default is 12, shall be >= 8 quantumEfficiency : float, optional Detector parameter. Quantum efficiency (0-1). Default is 0.64. shotNoise : bool, optional Detector parameter. Shot noise flag. Default 1. darkCurrent : float, optional Detector parameter. Dark current [e-]. Default 250e-/px/s. readoutNoise : float, optional Detector parameter. Readout noise [e-]. Default 60e-. gain : float, optional Detector parameter. Gain of the detector. Default is 1. quantization_conversion : float, optional. Detector parameter. Conversion gain to discretize the measurement [e-/px]. Default 70.5e-/DN. sensorType : str, optional Detector parameter. Sensor type ('CCD', 'CMOS', 'EMCCD'). Default is 'CCD'. darkCalibration : int, optional Detector parameter. Number of frames to calibrate the dark. Default 20. randomState : int, optional Detector parameter. Seed for the random number generator. Default is None. |
{}
|
get_frame ¶
Generate a science camera frame based on the input phase and source object.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
src
|
Source
|
Input source object, either a point source or extended source (e.g., Sun). During the init, computes the ideal telescope PSF at 500nm. |
required |
phase
|
ndarray
|
Optical phase at the science detector. |
required |
Returns:
| Type | Description |
|---|---|
ndarray
|
Final science frame with detector effects. |
apply_noise ¶
Apply detector noise to the science frame.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
frame
|
ndarray
|
The input noise-free science frame. |
required |
total_photons
|
int or float
|
Total number of photons arriving. |
required |
Returns:
| Type | Description |
|---|---|
ndarray
|
The noisy science frame. |
compute_psf ¶
Compute the PSF from a given phase map using FFT.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
phase
|
ndarray
|
Phase input in radians. |
required |
fwhm
|
float
|
Full width at half maximum in arcsec. |
required |
nPix
|
int
|
Image size in pixels. If None, uses camera's resolution. |
None
|
Returns:
| Type | Description |
|---|---|
Tensor
|
Normalized PSF. |
compute_image ¶
Compute the convolved image from an object and a PSF.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
sci_object
|
ndarray
|
Intensity map of the object. |
required |
coherence
|
Tensor
|
PSF to convolve with the object. |
required |
Returns:
| Type | Description |
|---|---|
Tensor
|
Final image after convolution. |