IterativeGaussianWBackground.compute_jacobian_bg¶
giant.point_spread_functions.gaussians
:
- static IterativeGaussianWBackground.compute_jacobian_bg(x, y)¶
This computes the Jacobian matrix for the background terms.
Mathematically this is
\[\mathbf{J}_{bg} = \left[\begin{array}{ccc}\frac{\partial f_{bg}(x,y)}{\partial B} & \frac{\partial f_{bg}(x,y)}{\partial C} & \frac{\partial f_{bg}(x,y)}{\partial D}\end{array}\right]= \left[\begin{array}{ccc} x & y & 1\end{array}\right]\]The results from this function should be appended to the rest of the Jacobian matrix using
hstack
.- Parameters:
x (ndarray) – The x values underlying the data the surface is to be fit to
y (ndarray) – The y values underlying the data the surface is to be fit to
- Returns:
The Jacobian for the background as a nx3 numpy array
- Return type:
ndarray