Welcome to hswfs’s documentation!
hswfs is a Python package which provides a minimalistic simulation of a Hartmann-Shack Wavefront Sensor. A HSWFS is a popular and conceptually simple type of wavefront sensor that can be used to measure the abberations of a wavefront. It is commonly used in the adaptive optics systems of larger telescopes, which correct the image for the perturbations introduced by the turbulent movement of the air in the Earth’s atmosphere.
Among other things, hswfs includes the following features:
Generate random wavefront sensor data.
Fit the wavefront using Zernike polynomials of arbitrary order (hswfs uses sympy to compute expressions of arbitrary Zernike polynomials and their derivatives in both polar and Cartesian coordinates).
Compute the point spread function (PSF) from a wavefront.