psf_generator.propagators.spherical_propagator#

The propagator in the case of Spherical coordinates.

Classes#

SphericalPropagator

Intermediate class for propagators with spherical parameterization.

Module Contents#

class psf_generator.propagators.spherical_propagator.SphericalPropagator(n_pix_pupil=128, n_pix_psf=128, device='cpu', zernike_coefficients=None, custom_field=None, wavelength=632, na=1.3, pix_size=10, defocus_step=0, n_defocus=1, apod_factor=False, envelope=None, cos_factor=False, gibson_lanni=False, z_p=1000.0, n_s=1.3, n_g=1.5, n_g0=1.5, t_g=170000.0, t_g0=170000.0, n_i=1.5, n_i0=1.5, t_i0=100000.0, integrator=simpsons_rule)[source]#

Bases: psf_generator.propagators.propagator.Propagator, abc.ABC

Intermediate class for propagators with spherical parameterization.

Notes#

  • Apart from parameters inherited from the base class, there is one additional cos_factor. This cosine factor is only here to make the spherical propagator equivalent to the Cartesian propagator when sz_correction is set to False. This is useful to compute analytic low NA PSFs such as the Airy disk.

  • The spherical propagator makes the assumption that the input field (pupil) is axisymmetric (rotational-invariant). In other words, the input field is function of theta only and not dependent on the angle phi:

    \[\mathbf{e}_{\infty}(\theta, \phi) = \mathbf{e}_{\infty}(\theta).\]
x[source]#
rr[source]#
rs[source]#
rr_indices[source]#
s_max[source]#
theta_max[source]#
num_thetas[source]#
thetas[source]#
dtheta[source]#
cos_factor[source]#
k[source]#
defocus_range[source]#
defocus_filters[source]#
correction_factor[source]#
integrator[source]#
_zernike_aberrations = None[source]#
update_custom_field(custom_field)[source]#

Update custom field without reinitializing propagator.

Parameters#

custom_fieldtorch.Tensor or None

Custom field of shape (n_pix_pupil,).

get_correction_factor()[source]#

Get the correction factor applied to the pupil (apod_factor, envelope, gibson_lanni, cos_factor).

Returns#

torch.Tensor

Correction factor of shape (n_pix_pupil,).

_compute_zernike_aberrations()[source]#

Compute Zernike aberrations.

get_pupil()[source]#

Get the pupil function with all corrections applied.