SCULIB_SKYFUNC_2

calculate f(x) and its Jacobian for NAG non-linear fitting routine E04UPF when fitting B and TAU in sky-dip analysis

Description:

E04UPF is a NAG routine that is used to fit a theoretical sky-dip curve to the measured data by varying B and TAU. This routine is called by E04UPF to calculate the M sub-functions f(x) at the current solution vector X, and/or the Jacobian matrix. Please see the NAG manual if you need to know more about E04UPF.

The solution vector is composed as follows:-

For each of the M measured airmasses the subfunction f(x) is:-

f(x) = J theory (Airmass(i)) - J_meas (Airmass(i)) J

noise (Airmass(i)) (84)

where:-

J theory = (1-η

tel) J_tel + η

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

The corresponding Jacobian has component (i,j):-

f(x) x(j) = x(j)J theory(Airmass(i)) ×1 J

noise(i) (86)

leading to:

f(i) x(1) = η tel J_atm exp(τA(i))(87)
f(i) x(2) = A(i)Bη tel J_atm exp(τA(i))(88)

The array USER is used to get the necessary ancillary information into the routine:-

  • USER (1) = J_TEL

  • USER (2) = J_ATM

  • USER (3) = ETA_TEL

  • USER (4:M+3) = the measured airmasses

  • USER (M+4:2M+3) = the measured sky temperatures

  • USER (2M+4:3M+3) = the errors on the measured sky temperatures

Invocation

CALL SCULIB_SKYFUNC_2 (MODE, M, N, LDFJ, X, F, FJAC, NSTATE, IUSER, USER)

Arguments

See NAG manual description of OBJFUN parameter in E04UPF.

Copyright

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