function oc_f2x_rotmat, ra, dec ;+ ; NAME: ; oc_f2x_rotmat ; PURPOSE: (one line) ; Return the matrix for rotating FGH to XYZ ; DESCRIPTION: ; Return the matrix for rotating FGH to XYZ ; CATEGORY: ; Occultations ; CALLING SEQUENCE: ; R = oc_f2x_rotmat(ra, dec) ; INPUTS: ; ra - right ascension of occultation star in radians ; dec - declination of occultation star in radians ; OPTIONAL INPUT PARAMETERS: ; none ; KEYWORD INPUT PARAMETERS: ; none ; KEYWORD OUTPUT PARAMETERS: ; none ; OUTPUTS: ; R - rotation matrix for rotating an FGH vector to XYZ ; FGH are defined as in Elliot et al. 1993. Astron. J. 106, 2544-2572 ; H is toward the occultation star ; F is perpendicular to H and Z (Z x H) ; G completes the right hand system ; ; XYZ are defined in the usual manner ; X = cos(ra_s) cos(dec_s) ; Y = sin(ra_s) cos(dec_s) ; Z = sin(dec_s) ; ; COMMON BLOCKS: ; None ; SIDE EFFECTS: ; RESTRICTIONS: ; None ; PROCEDURE: ; ; Since r is a rotation matrix, the inverse equals the transpose, ; and we simply call oc_x2f_rotmat ; ; USE: ; The matrix is defined so that ; xyz = R ## fgh ; xyz, fgh column vectors ; where xyz and fgh are column vectors (Array[1,3]) and ## is the ; IDL operator for ordinary matrix multiplication (inner product). ; It is usually more convenient to use fgh and xyz as row vectors ; (Array[3]). In this case we have ; xyz = transpose(R) # fgh ; xyz, fgh row vectors ; ; MODIFICATION HISTORY: ; 2005 Dec 29 Leslie A Young SwRI ;- rotmat = oc_x2f_rotmat(ra,dec) return, transpose(rotmat) end