Fitting lens aberration profiles#

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

Examples

Generate a pyrost.AberrationsFit object from pyrost.STData container object data as follows:

>>> fit_obj = data.get_fit()
>>> fit = fit_obj.fit(max_order=3)
>>> print(fit)
{'c_3': -0.04718488324311934, 'c_4':  0.,
'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#