Science Camera¶
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 1, no decimation. |
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 0, assumed linear. 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. |
{}
|
Source code in SAOS/ScienceCam.py
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 | |
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,
)
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. |
Source code in SAOS/ScienceCam.py
156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 | |
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. |
Source code in SAOS/ScienceCam.py
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. |
Source code in SAOS/ScienceCam.py
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. |