SCULIB_FIT_DXISQ_DAJ

calculate gradient in chi-squared with ‘a’

Description:

If status is good on entry this routine will calculate the gradient in the chi-squared of the fit with variation in fit parameter J. It does this numerically by calling the supplied routine XISQ_ROUTINE to calculate chi-squared for (A(J)+DELTA_AJ) and (A(J)-DELTA_AJ), then using the equation:-
∂χ2 ∂AJ = χ2(A(J) + δAJ) −χ2(A(J) −δAJ) 2.0δAJ (43)

DELTA_AJ is equal to the absolute value of 0.001 ∗ A(J) or, if this is zero, 0.001.

Invocation

CALL SCULIB_FIT_DXISQ_DAJ (XISQ_ROUTINE, N, A, J, DXISQ_DAJ, STATUS)

Arguments

XISQ_ROUTINE (XISQ, N, A, STATUS) = EXTERNAL ROUTINE (Given)
name of routine that will calculate xi-squared
N = INTEGER (Given)
the number of parameters in the fit
A (N) = DOUBLE PRECISION (Given and returned)
the fit parameters
J = INTEGER (Given)
the index of the parameter to be varied
DXISQ_DAJ = DOUBLE PRECISION (Returned)
the gradient of chi-squared with A(J)
STATUS = INTEGER (Given and returned)
global status

Copyright

Copyright ©1995,1996,1997,1998,1999 Particle Physics and Astronomy Research Council. All Rights Reserved.