API Reference

Beamline

wofryimpl.beamline.beamline

WOBeamline — wofry beamline container with per-element propagation parameters.

Optical Elements — Absorbers

wofryimpl.beamline.optical_elements.absorbers.slit

WOSlit — wofry slit aperture supporting rectangular, circular, elliptical and multi-patch boundaries.

wofryimpl.beamline.optical_elements.absorbers.beam_stopper

WOBeamStopper — wofry beam-stopper (negative aperture) for 2D and 1D wavefronts.

Optical Elements — Ideal Elements

wofryimpl.beamline.optical_elements.ideal_elements.ideal_lens

Represents an ideal lens.

wofryimpl.beamline.optical_elements.ideal_elements.screen

WOScreen — wofry ideal screen (pass-through optical element) for 2D and 1D wavefronts.

Optical Elements — Mirrors

wofryimpl.beamline.optical_elements.mirrors.mirror

WOMirror1D — wofry 1-D mirror with conic-surface height profile and Huygens-integral propagation.

Optical Elements — Refractors

wofryimpl.beamline.optical_elements.refractors.lens

WOLens — wofry refractive lens (CRL) applying a complex transmission function to the wavefront.

wofryimpl.beamline.optical_elements.refractors.thin_object

WOThinObject — wofry thin-object approximation applying a complex transmission from a refractive-index profile.

wofryimpl.beamline.optical_elements.refractors.thin_object_corrector

WOThinObjectCorrector — wofry thin-object corrector applying a phase/amplitude correction grid to the wavefront.

Optical Elements — Utilities

wofryimpl.beamline.optical_elements.util.s4_optical_surface

S4OpticalSurface — abstract base class for optical surface shapes used in wofryimpl mirror elements.

wofryimpl.beamline.optical_elements.util.s4_conic

S4Conic — conic-section optical surface (sphere, ellipsoid, paraboloid, hyperboloid, plane) for wofryimpl mirrors.

wofryimpl.beamline.optical_elements.util.arrayofvectors

Array-of-vectors utilities — element-wise cross, dot and normalisation operations on (N, 3) numpy arrays.

Light Sources

wofryimpl.propagator.light_source

WOLightSource — wofry light source producing Gaussian, plane or spherical wavefronts (1D and 2D).

wofryimpl.propagator.light_source_h5file

WOLightSourceH5File — wofry light source that loads a pre-computed wavefront from an HDF5 file.

wofryimpl.propagator.light_source_cmd

WOLightSourceCMD — wofry undulator light source using pySRU for on-axis spectral calculations.

wofryimpl.propagator.light_source_pysru

WOLightSourcePySRU — wofry undulator light source using pySRU for coherent-mode-decomposition wavefront generation.

Propagators 1D

wofryimpl.propagator.propagators1D.fraunhofer

Fraunhofer1D — 1-D far-field (Fraunhofer) propagator implemented via a single FFT.

wofryimpl.propagator.propagators1D.fresnel

Fresnel1D — 1-D near-field Fresnel propagator using FFT-based convolution with the transfer function.

wofryimpl.propagator.propagators1D.fresnel_convolution

FresnelConvolution1D — 1-D near-field Fresnel propagator using direct spatial-domain convolution (scipy.signal.fftconvolve).

wofryimpl.propagator.propagators1D.fresnel_zoom

FresnelZoom1D — 1-D zoomed Fresnel propagator allowing an arbitrary output sampling window via chirp-z resampling.

wofryimpl.propagator.propagators1D.fresnel_zoom_scaling_theorem

FresnelZoomScalingTheorem1D — 1-D zoomed Fresnel propagator based on the scaling theorem (magnification-preserving FFT).

wofryimpl.propagator.propagators1D.integral

Integral1D — 1-D Kirchhoff-Fresnel integral propagator (direct numerical integration, slow but accurate).

Propagators 2D

wofryimpl.propagator.propagators2D.fraunhofer

Fraunhofer2D — 2-D far-field (Fraunhofer) propagator via 2-D FFT.

wofryimpl.propagator.propagators2D.fresnel

Fresnel2D — 2-D near-field Fresnel propagator using FFT-based transfer-function convolution.

wofryimpl.propagator.propagators2D.fresnel_convolution

FresnelConvolution2D — 2-D near-field Fresnel propagator using direct spatial-domain convolution (scipy.signal.fftconvolve).

wofryimpl.propagator.propagators2D.fresnel_zoom_xy

FresnelZoomXY2D — 2-D zoomed Fresnel propagator with independent zoom factors in x and y.

wofryimpl.propagator.propagators2D.integral

Integral2D — 2-D Kirchhoff-Fresnel integral propagator (direct numerical integration; slow).

Propagator Utilities

wofryimpl.propagator.util.tally

Tally — utility class for accumulating and plotting coherent-mode wavefront intensities.

wofryimpl.propagator.util.undulator_coherent_mode_decomposition_1d

UndulatorCoherentModeDecomposition1D — pySRU-based 1-D coherent-mode decomposition of undulator radiation.