; ---------------------------------------------------------------------- ; Compute airmass.... taken from ast-util.c in MAKEE -tab 10oct2012 ; The Earth's average radius is about 6370 km. The Atmosphere's thickness is ; about 11.6 km (level of tropopause at about 41 degrees latitude). ; Divide the Earth's average radius by the atmosphere's thickness. ; ; r = 6370.d0 / 11.6d0 ; ; This formula is very inaccurate for zenith angles greater than 80. ; Note that the apparent zenith angle is used here. ; Returns airmass given the apparent zenith angle in degrees. ; Returns -99. if problem (like azd > 80). ;*/ function gal_airmass, azd r = 6370.d / 11.6d PI = 3.1415926535898d deg = !dpi / 180.d ;> if ((azd lt 0.)||(azd ge 80.)) then return, -9. rr = r * cos((PI - deg*(azd) )) airmass = rr + sqrt( (rr*rr) + 1. + (2. * r) ) return, airmass end