McEwenIllumination.numeric_derivative¶
giant.ray_tracer.illumination
:
- McEwenIllumination.numeric_derivative(observations, rotation_to_inertial, delta=1e-06, max_inc=1.2217304763960306, max_emi=1.2217304763960306, max_phase=2.443460952792061)[source]¶
This computes the Jacobian matrix of the change in the illumination values given a change in the surface normal (represented by a change in the surface slope) and a change in the local albedo values use numeric finite differencing.
Mathematically the jacobian is
\[\mathbf{J}=\frac{\partial I}{\partial\left[\begin{array} {ccc} h_x & h_y & \alpha \end{array}\right]} = \left[\begin{array}{ccc} \frac{\partial I}{\partial h_x} & \frac{\partial I}{\partial h_y} & \frac{\partial I}{\partial\alpha} \end{array}\right]\]Here we compute this using numeric central finite differencing.
This is primarily used for verifying the analytic jacobian given by
compute_photoclinometry_jacobian()
which should be preferred in most cases due to its speed/efficiency.- Parameters:
observations (ndarray) – The observations as a numpy array with type
ILLUM_DTYPE
.rotation_to_inertial (ndarray) – The rotation that takes the frame the observations are expressed in into the the local frame for the surface (usually the local east north up frame)
delta (float) – The size of the perturbation to use in the finite differencing
max_inc (float) – the maximum incidence angle to consider valid in radians
max_emi (float) – the maximum emission angle to consider valid in radians
max_phase (float) – the maximum phase angle to consider valid in radians
- Returns:
the jacobian matrix as a n(+3)x3 array (where n is the number of observations) and a boolean array of length n specifying which rows of the jacobian matrix are valid
- Return type:
Tuple[ndarray, ndarray]