prysm.x.pdi#

Point Diffraction Interferometry.

prysm.x.pdi.rectangle_pulse(x, duty=0.5, amplitude=0.5, offset=0.5, period=6.283185307179586)#

Rectangular pulse; generalized square wave.

This function differs from scipy.signal.square in that the output is in [0,1] instead of [-1,1], as well as control over more parameters.

Parameters:
  • x (numpy.ndarray) – spatial domain, the pulse is notionally equivalent to np.sign(np.sin(x/period))

  • duty (float) – duty cycle of the pulse; a duty of 0.5 == square wave

  • amplitude (float) – amplitude of the wave, half of the peak-to-valley

  • offset (float) – offset or mean value of the wave

  • period (float) – period of the wave

Returns:

rectangular pulse

Return type:

numpy.ndarray

class prysm.x.pdi.PSPDI(x, y, efl, epd, wavelength, test_arm_offset=64, test_arm_fov=64, test_arm_samples=256, test_arm_transmissivity=1, pinhole_diameter=0.25, pinhole_samples=128, grating_rulings=64, grating_type='sin_amp', grating_axis='x')#

Bases: object

Phase Shifting Point Diffraction Interferometer (Medecki Interferometer).

Create a new PS/PDI or Medecki Interferometer.

Parameters:
  • x (numpy.ndarray) – x coordinates for arrays that will be passed to forward_model not normalized

  • y (numpy.ndarray) – y coordinates for arrays that will be passed to forward_model not normalized

  • efl (float) – focal length in the focusing space behind the grating

  • epd (float) – entrance pupil diameter, mm

  • wavelength (float) – wavelength of light, um

  • test_arm_offset (float) – offset of the window for the test arm, in lambda/D this number should only ever be different to grating_rulings when you wish to model system misalignments

  • test_arm_fov (float) – diameter of the circular hole placed at the m=+1 focus, units of lambda/D

  • test_arm_samples (int) – samples to use across the clear window at the m=1 focus

  • test_arm_transmissivity (float) –

    transmissivity (small r; amplitude) of the test arm, if the substrate has an AR coating with reflectance R, then this has value 1-sqrt(R) modulo absorbtion in the coating

    The value of this parameter must be optimized to maximize fringe visibility for peak performance

  • pinhole_diameter (float) – diameter of the pinhole placed at the m=0 focus

  • pinhole_samples (int) – number of samples across the pinhole placed at the m=0 focus

  • grating_rulings (float) – number of rulings per EPD in the grating

  • grating_type (str, {'ronchi'}) – type of grating used in the interferometer

  • grating_axis (str, {'x', 'y'}) – which axis the orientation of the grating is in

forward_model(wave_in, phase_shift=0, debug=False)#

Perform a forward model, returning the intensity at the detector plane.

Parameters:
  • wave_in (numpy.ndarray) – complex wavefunction present at the input to the interferometer

  • phase_shift (float) – phase shift, modulo 2pi, if any

  • debug (bool) – if True, returns a dict with the fields in each arm, before and after interacting with the interferometer components

Returns:

intensity at the camera

Return type:

prysm._richdata.RichData