leastsquare_3d#
- astropy.modeling.statistic.leastsquare_3d(measured_vals, updated_model, weights, x, y, z)[source]#
Least square statistic with optional weights. Safer than the general
leastsquare()
for 3D models by avoiding numpy methods that support broadcasting.- Parameters:
- measured_vals
ndarray
Measured data values.
- updated_model
Model
Model with parameters set by the current iteration of the optimizer.
- weights
ndarray
orNone
Array of weights to apply to each residual.
- x
ndarray
Independent variable “x” on which to evaluate the model.
- y
ndarray
Independent variable “y” on which to evaluate the model.
- z
ndarray
Independent variable “z” on which to evaluate the model.
- measured_vals
- Returns:
- res
float
The sum of least squares.
- res
See also