prysm.propagation

Numerical optical propagation.

prysm.propagation.prop_pupil_plane_to_psf_plane(wavefunction, Q, incoherent=True, norm=None)

Propagate a pupil plane to a PSF plane and compute the grid along which the PSF exists.

Parameters
  • wavefunction (numpy.ndarray) – the pupil wavefunction

  • Q (float) – oversampling / padding factor

  • incoherent (bool, optional) – whether to return the incoherent (real valued) PSF, or the coherent (complex-valued) PSF. Incoherent = |coherent|^2

  • norm (str, {None, ‘ortho’}) – normalization parameter passed directly to numpy/cupy fft

Returns

psf – incoherent point spread function

Return type

numpy.ndarray

prysm.propagation.prop_pupil_plane_to_psf_plane_units(wavefunction, input_sample_spacing, prop_dist, wavelength, Q)

Compute the ordinate axes for a pupil plane to PSF plane propagation.

Parameters
  • wavefunction (numpy.ndarray) – the pupil wavefunction

  • input_sample_spacing (float) – spacing between samples in the pupil plane

  • prop_dist (float) – propagation distance along the z distance

  • wavelength (float) – wavelength of light

  • Q (float) – oversampling / padding factor

Returns

  • x (numpy.ndarray) – x axis unit, 1D ndarray

  • y (numpy.ndarray) – y axis unit, 1D ndarray

prysm.propagation.pupil_sample_to_psf_sample(pupil_sample, samples, wavelength, efl)

Convert pupil sample spacing to PSF sample spacing.

Parameters
  • pupil_sample (float) – sample spacing in the pupil plane

  • samples (int) – number of samples present in both planes (must be equal)

  • wavelength (float) – wavelength of light, in microns

  • efl (float) – effective focal length of the optical system in mm

Returns

the sample spacing in the PSF plane

Return type

float

prysm.propagation.psf_sample_to_pupil_sample(psf_sample, samples, wavelength, efl)

Convert PSF sample spacing to pupil sample spacing.

Parameters
  • psf_sample (float) – sample spacing in the PSF plane

  • samples (int) – number of samples present in both planes (must be equal)

  • wavelength (float) – wavelength of light, in microns

  • efl (float) – effective focal length of the optical system in mm

Returns

the sample spacing in the pupil plane

Return type

float

class prysm.propagation.Wavefront(x, y, fcn, wavelength)

Bases: prysm._basicdata.BasicData

(Complex) representation of a wavefront.

center_x

Center “pixel” in x.

center_y

Center “pixel” in y.

copy()

Return a (deep) copy of this instance.

sample_spacing

center-to-center sample spacing.

samples_x

Number of samples in the x dimension.

samples_y

Number of samples in the y dimension.

shape

Proxy to phase or data shape.

size

Proxy to phase or data size.

slice_x

Retrieve a slice through the X axis of the phase.

Returns

  • self.unit (numpy.ndarray) – ordinate axis

  • slice of self.phase or self.data (numpy.ndarray)

slice_y

Retrieve a slice through the Y axis of the phase.

Returns

  • self.unit (numpy.ndarray) – ordinate axis

  • slice of self.phase or self.data (numpy.ndarray)