;+ ; NAME: ; oclc_fwd_tauobs.pro ; ; PURPOSE: ; Calculates the observed optical depth, tauobs, from the radius, r, and ; the absorbption coefficient, kappa ; ; DESCRIPTION: ; See Elliot and Young 1992 eq. 2.6 ; ; CALLING SEQUENCE: ; tau = oclc_fwd_tauobs(r, kappa) ; ; INPUTS: ; **** All inputs in cgs units ******** ; r - An array of radius values from the center of the planet, in cm. ; kappa - The derivative of the refractivity with respect to the radius. ; ; OUTPUTS: ; theta - the bending angle in radians. ; ; COMMENTS; ; calls function atmint ; ; EXAMPLE 1 - scalar temperature, molecular weight ; r = dindgen(1000)*0.1d5 + 1200d5 ; array of r, in cm ; km = 1e5 ; r1 = 1215. * km ; kappa1 = 2.2e-8 ; htau1 = 29.8 * km ; order = 4 ; tauobs = oclc_ey92_tauobs(r1, kappa1, htau1, order, r) ; ; kappa = oclc_ey92_kappa(r1, kappa1, htau1, r) ; tauobs2 = oclc_fwd_tauobs(r, kappa, r1) ; ; plot, r/1e5, (tauobs-tauobs2) ; print, minmax( tauobs-tauobs2 ) ; ; REVISON HISTORY: ; 25-Aug-2006 CBO SwRI -- modified from LAY's lightcurve.pro ;- function oclc_fwd_tauobs, r, kappa, r1 nz = n_elements(r) s = reverse(sort(r)) rsort = r[s] kappasort = kappa[s] if n_params() eq 2 then r1 = rsort[0] tauobssort = dblarr(nz) tauobs = dblarr(nz) for i=1,nz-1 do begin tauobssort[i] = 2 * atmint(rsort,kappasort,rsort[i],r1, 0.,/exp) end tauobs[s] = tauobssort return, tauobs end