slmsuite.holography.analysis.fitfunctions.tophat2d#
- tophat2d(xy, x0, y0, R, a=1, c=0)[source]#
For fitting a 2D tophat distribution.
\[\begin{split}z(x,y) = \left\{ \begin{array}{ll} a + c, & x^2 + y^2 < R^2 \\ c, & \text{ otherwise}. \end{array} \right.\end{split}\]- Parameters:
xy (numpy.ndarray) – Points to fit upon (x, y).
x0 (float) – Vector offset.
y0 (float) – Vector offset.
R (float) – Active radius of the tophat.
a (float) – Amplitude.
c (float) – Offset.
- Returns:
z – Tophat fit evaluated at all
(x,y)inxy.- Return type:
numpy.ndarray