opticks.imaging_model.aperture
Classes
|
Aperture class. |
- class Aperture(data, grid)[source]
Aperture class.
Holds the Aperture data as defined by prysm. The aperture data is an ndarray mask of bool or 0 and 1 (or anything in between).
- Parameters:
data (
ndarray) – aperture datagrid (
Grid) – Grid object associated with the aperture
- classmethod circle_aperture(aperture_diam, samples, with_units=True)[source]
Circle aperture model.
This is valid for many if not most refractive optics.
This is a thin wrapper around the aperture building procedure from prysm.
The output is an Aperture object containing ndarray of bools, therefore the unit input is not important for the aperture generation. But the backing Grid object does use units.
- Return type:
- Parameters:
- Returns:
aperture (
Aperture) – Aperture mask object
- classmethod circle_aperture_with_obscuration(aperture_diam, obscuration_ratio, samples, with_units=True)[source]
Circle aperture model with circular centre obscuration.
This is valid for many reflective telescopes. The obscuration is usually the secondary mirror.
This is a thin wrapper around the aperture building procedure from prysm.
The output is an Aperture object containing ndarray of bools, therefore the unit input is not important for the aperture generation.
- Return type:
- Parameters:
aperture_diam (
Quantity) – aperture diameter in mmobscuration_ratio (
float) – obscuration ratio (between 0 and 1)samples (
intortupleofint) – number of samples per dimension. If a scalar value, broadcast to both dimensions. Order is numpy axis convention, (row, col)with_units (
bool, optional) – Grid returned with units (in mm and radians)
- Returns:
aperture (
Aperture) – Aperture mask object
- scale_for_norm_peak_psf(Q, Q_pad=1)[source]
Generates a new, scaled Aperture that results in a Point Spread Function (PSF) that has a peak of 1.0.
Q_pad is used to pad the aperture if needed. It is passed on to the underlying pad2d.
The aperture data (data) is multiplied by Q x Q_pad x sqrt(data.size) / data.sum().