psf_generator.propagators.cartesian_propagator#

The propagator in the case of Cartesian coordinates.

Classes#

CartesianPropagator

Intermediate class for propagators with Cartesian parameterization.

Module Contents#

class psf_generator.propagators.cartesian_propagator.CartesianPropagator(n_pix_pupil=128, n_pix_psf=128, device='cpu', zernike_coefficients=None, special_phase_mask=None, custom_field=None, wavelength=632, na=1.3, pix_size=10, defocus_step=0, n_defocus=1, sz_correction=True, apod_factor=False, envelope=None, 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)[source]#

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

Intermediate class for propagators with Cartesian parameterization.

Notes#

Apart from parameters inherited from the base class, there is one additional sz_correction. This factor appears due to the cartesian parameterization inside the integral to compute, which affects the PSF for high-NA systems. Set it to True to apply the correction factor \(1/s_z\) to the pupil function. Set it to False to ignore the correction factor, to obtain low-NA analytic PSFs such as the Airy disk.

sz_correction[source]#
special_phase_mask[source]#
k[source]#
s_max[source]#
zoom_factor[source]#
n_pix_pupil[source]#
s_x[source]#
ds[source]#
s_zz[source]#
total_fft_range[source]#
k_start[source]#
k_end[source]#
x[source]#
correction_factor[source]#
defocus_range[source]#
defocus_filters[source]#
_zernike_aberrations = None[source]#
_compute_zernike_aberrations()[source]#

Compute Zernike aberrations.

get_pupil()[source]#

Get the pupil function with all corrections applied.

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, n_pix_pupil) or (1, 1, n_pix_pupil, n_pix_pupil).

get_correction_factor()[source]#

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

Returns#

torch.Tensor

Correction factor of shape (1, 1, n_pix_pupil, n_pix_pupil).

compute_focus_field()[source]#

Compute the electric field at the focal plane.