SCULIB_SKYDIP_XISQ

calculate chi-square of sky fit

Description:

If entered with good status this routine calculates the chi-squared between a SKYDIP dataset and the theoretical curve generated by the the sky and telescope parameters in FIT. Data points with bad quality will be ignored. If no valid data points are found then an error will be reported and bad status returned. The data are passed in via common.

The FIT vector is composed as follows:-

For a given airmass:-

J theory = (1-η

tel) J_tel + η

telJ_atm (1-B exp(τAirmass))(68)

J atm = J_amb X_G (69)

XG = 1 + h1 ×h2 J amb exp(τ ×Airmass(i)/X_Gconst)(70)

Invocation

CALL SCULIB_SKYDIP_XISQ (XISQ, N, FIT, STATUS)

Arguments

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

  • FIT (2) = B

  • FIT (3) = TAUZ

STATUS = INTEGER (Given and returned)
global status

Copyright

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