SCULIB_SKYFUNC_1

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

Description:

E04UPF is a NAG routine that is used to fit a theoretical sky-dip curve to the measured data by varying ETA_TEL, B and TAU. This routine is called by E04UPF to calculate the M sub-functions fi(x) at the current solution vector X, and/or their Jacobian matrix. 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)) (74)

where:-

J theory = (1-η

tel) J_tel + η

telJ_atm (1-B exp(−τAirmass))(75)

J atm = J_amb X_G (76)

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

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

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

noise(i) (78)

leading to:

∂f(i) ∂x(1) = −J tel+J_atm - B J_tel exp(−τA(i)) J

noise(i) (79)

∂f(i) ∂x(2) = −η tel J_atm exp(−τA(i)) J

noise(i) (80)

∂f(i) ∂x(3) = η tel ∂J

atm ∂τ−η

tel B exp(−τA(i)) ∂J

atm ∂τ−J

atm A(i) J

noise(i) (81)

where

∂J atm ∂τ=J

amb ∂XG ∂τ(82)

and

∂XG ∂τ = −H1H2A(i) J amb X_Gconst exp(−τA(i)/X

Gconst) (83)

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

  • USER (1) = J_TEL

  • USER (2) = J_AMB

  • USER (3) = not used

  • 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_1 (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.