IterativeGaussianWBackground.compute_jacobian_all

giant.point_spread_functions.gaussians:

IterativeGaussianWBackground.compute_jacobian_all(x, y, computed)

This method computes the Jacobian of the PSF with respect to a change in the state.

Mathematically, it should return the nxm matrix

\[\mathbf{J} = \frac{\partial f(x, y)}{\partial \mathbf{t}}\]

where \(f(x,y)\) is the function being fit, \(\mathbf{t}\) is a length m vector of the state parameters, and \(\mathbf{J}\) is the Jacobian matrix. This specific implementation appends the background Jacobian to the normal PSF Jacobian for estimating background terms.

Parameters:
  • x (ndarray) – The x values to evaluate the Jacobian at as a length n array

  • y (ndarray) – The y values to evaluate the Jacobian at as a length n array

  • computed (ndarray) – \(f(x,y)\) evaluated at x and y as a length n array. This is provided for efficiency and convenience as the evaluated function is frequently needed in the computation of the Jacobian and it is definitely needed in the non-linear least squares. If not needed for computing the Jacobian this can safely be ignored.

Returns:

The Jacobian matrix as a nxm numpy array, with n being the number of measurements and m being the number of state parameters being estimated

Return type:

ndarray