Camera#
- class phise.Camera(
- e: Quantity = <Quantity 1. s>,
- ideal: bool = False,
- name: str = 'Unnamed Camera',
- ron: float = 10.0,
- dc: float = 100.0,
- fwc: float = inf,
- qe: float = 1.0,
- gain: float = 1.0,
- resolution: int = 1,
- spot_size: float = 1.0,
- hdr: list[float] = None,
Bases:
objectVirtual camera used to simulate photon detection.
- Parameters:
e (u.Quantity) – Exposure time as an Astropy quantity in a time unit (for example
1 * u.s).ideal (bool) – If
True, the camera is noise-free.name (str) – Human-readable name for the camera.
ron (float) – Read-out noise in electrons rms. Default: 0.0.
dc (float) – Dark current in electrons/pixel/s. Default: 0.0.
fwc (float) – Full-well capacity in electrons. Default: infinity.
qe (float) – Quantum efficiency in the range [0, 1]. Default: 1.0.
gain (float) – Gain in electrons/ADU. Default: 1.0.
resolution (int) – Detector side length in pixels. Default: 1.
spot_size (float) – Standard deviation of the 2D Gaussian profile in pixels. Default: 1.0.
hdr (list[float]) – List of exposure times for HDR acquisition, relative to the primary exposure time. Default: None (no HDR).
- Raises:
TypeError – If a typed argument has an invalid type.
ValueError – If a physical or numeric parameter is out of bounds.
- property e: Quantity#
Camera exposure time.
- property parent_interferometer: Interferometer#
Read-only reference to the parent interferometer.
- property ideal: bool#
Whether the camera is in ideal mode.
- property name: str#
Human-readable camera name.
- property ron: float#
Read-out noise in electrons root mean square.
- property dc: float#
Dark current in electrons/pixel/second.
- property fwc: float#
Full-well capacity in electrons.
- property qe: float#
Quantum efficiency in the range [0, 1].
- property gain: float#
Gain in electrons/ADU.
- property resolution: int#
Detector side length in pixels.
- property spot_size: float#
Standard deviation of the 2D Gaussian spot profile in pixels.
- property hdr: bool#
List of exposure times for HDR acquisition, relative to the primary exposure time.
- take_dark(
- N: int = 1000,
- e: Quantity = None,
Estimate the master dark frame at a given exposure time.
Dark acquisition must bypass current dark subtraction, otherwise the estimate becomes self-referential (new_dark ~= true_dark - old_dark).
- get_flux(psi: ndarray[complex]) float[source]#
Calculate the total flux at the camera plane given an input complex field.
- Parameters:
psi (np.ndarray[complex]) – 2D array representing the complex field at the camera plane.
- Returns:
Total flux at the camera plane.
- Return type:
float
- get_image(psi: ndarray[complex]) int[source]#
Simulate the acquisition of an image given an input complex field.
- Parameters:
psi (np.ndarray[complex]) – 2D array representing the complex field at the camera plane.
- Returns:
Output of the camera (either image if mode=’raw’ or aggregated values for other modes).
- Return type:
int | np.ndarray[int]