mascado.distortions.analysis module

mascado.distortions.analysis.analyze_contributions_over_order(vf, minorder=0, maxorder=None, gridsize=100, units='arcseconds', info=' ')[source]

Get contributions of the terms of a specific degree.

The contribution is measured as RMS of the vector field over the normalized coordinates \([-1,1]\times[-1,1]\). The model is evaluated on a regular grid to calculate the RMS value. The grid has to be well sampled for the result to be correct. For higher orders, a larger gridsize is needed.

Parameters
  • vf (mascado.distortions.polynomials.PolyVectorField) – Vector field with internal parameters.

  • minorder (int)

  • maxorder (int or None) – If None, the order of the vector field is used.

  • gridsize (int) – Number of points along each axis in normalized coordinates.

  • units (str) – Units of vector field. Used for console output.

  • info (str or False) – Indent of console output. Set to False to suppress output.

Returns

DataFrame with two columns: order and modelrms.

Return type

pandas.DataFrame

mascado.distortions.analysis.analyze_residuals_over_order(positions, distortions, maxorder, minorder=0, poly=<class 'mascado.distortions.polynomials.Legendre'>, distortionunits='arcseconds', maxcondition=100.0, info=' ')[source]

Get RMS of residuals after nth order fit.

Parameters
  • positions ((N, 2)-shaped array) – Normalized positions.

  • distortions ((N, 2)-shaped array) – Distortions.

  • maxorder (int) – End of iteration.

  • minorder (int) – Start of iteration.

  • poly (mascado.distortions.polynomials.Polynomial subclass) – Class of polynomials to use (not an instance). By default, Legendre polynomials are used.

  • distortionunits (str) – Units of distortions. Used for console output.

  • info (str or False) – Indent of console output. Set to False to suppress output.

Returns

DataFrame with two columns: order and resrms.

Return type

pandas.DataFrame