def calc_accel_correction(self, damped_JTJ, delta0):
<EOL>_ = self.update_function(self.param_vals)<EOL>rm0 = self.calc_residuals().copy()<EOL>_ = self.update_function(self.param_vals + delta0)<EOL>rm1 = self.calc_residuals().copy()<EOL>_ = self.update_function(self.param_vals - delta0)<EOL>rm2 = self.calc_residuals().copy()<EOL>der2 = (rm2 + rm1 - <NUM_LIT:2>*rm0)<EOL>corr, res, rank, s = np.linalg.lstsq(damped_JTJ, np.dot(self.J, der2),<EOL>rcond=self.min_eigval)<EOL>corr *= -<NUM_LIT:0.5><EOL>return corr<EOL>
Geodesic acceleration correction to the LM step.

Parameters
----------
    damped_JTJ : numpy.ndarray
        The damped JTJ used to calculate the initial step.
    delta0 : numpy.ndarray
        The initial LM step.

Returns
-------
    corr : numpy.ndarray
        The correction to the original LM step.