pyrost Abberations Fitting

Routines for model regression based on nonlinear least-squares algorithm. pyrost.AbberationsFit fit the lens’ abberations profile with the polynomial function using nonlinear least-squares algorithm.

Examples

Generate a pyrost.AbberationsFit object from pyrost.STData container object st_data as follows:

>>> fit_obj = AbberationsFit.import_data(st_data)

Fit a pixel abberations profile with a third order polynomial:

>>> fit = fit_obj.fit(max_order=3)
>>> print(fit)
{'alpha': -0.04718488324311934,
 'fit': array([-9.03305155e-04,  2.14699128e+00, -1.17287983e+03]),
 'ph_fit': array([-9.81298119e-07,  3.49854945e-03, -3.82244504e+00,  1.26179239e+03]),
 'rel_err': array([0.02331385, 0.01966198, 0.01679612]),
 'r_sq': 0.9923840802879347}

Contents