SCULIB_GAUSSIAN_XISQ

calculate chi-squared of Gaussian fit

Description:

If entered with good status this routine calculates the chi-squared between a dataset and a Gaussian function. Data points with bad quality will be ignored, as will points with zero variance. A warning will be issued if any data points with zero variance are encountered. If no valid data points are found then an error will be reported and bad status returned. The data are passed in via common.

Invocation

CALL SCULIB_GAUSSIAN_XISQ (XISQ, N, FIT, STATUS)

Arguments

XISQ = DOUBLE PRECISION (Returned)
the chi-squared of the current fit
N = INTEGER (Given)
the number of parameters being fit, should be 6
FIT(N) = DOUBLE PRECISION (Given)
the fit parameters:-
  • FIT(1) = peak height

  • FIT(2) = length of the ‘a’ axis of the sigma ellipse

  • FIT(3) = length of the ‘b’ axis of the sigma ellipse

  • FIT(4) = the angle between the ‘a’ axis and the x axis (+ve anticlockwise, radians)

  • FIT(5) = the x coord of the centre

  • FIT(6) = the y coord of the centre

STATUS = INTEGER (Given and returned)
global status

Copyright

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