cwitools.modeling.rss_func2d

cwitools.modeling.rss_func2d(model_params, model_func, xx, yy, zz)

Calculate the residual sum of squares for a 2D model + 2D data.

Parameters:
  • model_params (list) – The parameters of the model
  • model_func (callable) – The model function, of form f(params, xx, yy)
  • xx (numpy.array) – The observed x-axis positions
  • yy (numpy.array) – The observed y-axis values to fit to
Returns:

The residual sum of squares

Return type:

float