;+ ; NAME: ; oc_eph_et2fgh.pro ; ; PURPOSE: ; returns [f,g,h,f',g',h'] for a eph at a given et ; ; DESCRIPTION: ; returns [f,g,h,f',g',h'] for a eph at a given et ; where h is toward a star, f is sky east, and g is sky north. ; ; CALLING SEQUENCE: ; fgh = oc_eph_et2fgh(et,eph, star, method) ; ; INPUTS: ; et - ephemeris time (seconds TDB after J2000) ; eph - array of eph structures ; OPTIONAL INPUT PARAMETERS: ; ; KEYWORDS ; method ; 'piececub' - piecewise cubic interpolation of the state ; 'naif' - calls to naif routines, using eph.naif ; OUTPUTS: ; If et is a scalar, return [ra, dec]. ; ; If et is an array, return [ radec_0, radec_1, ... ] where radec_i is for et[i] ; ; If et is a scalar and the eph is an array of structures ; then return [ radec_0, radec_1, ... ] where radec_i is for eph[i] ; ; If both et and the eph are arrays ; then return [ radec_0, radec_1, ... ] where radec_i is for et[i], eph[i] ; (if they are different lengths, then do up to the minimum) ; ; REVISON HISTORY: ; 2006 Jan 02 Leslie Young. ;- function oc_eph_et2fgh, et, eph, star, method = method net = n_elements(et) neph = n_elements(eph) if net eq 1 then begin state = oc_eph_et2state(et,eph, method=method) radec_star = oc_star_radec(et, star, dradec_star) fgh = rec6fgh6(state, radec_star, dradec_star) return, fgh endif fgh = dblarr(6,net) for i = 0, net - 1 do begin fgh[*,i] = oc_eph_et2fgh(et[i],eph, star, method = method) endfor return, state end