Extended IDL Help

This page was created by the IDL library routine mk_html_help. For more information on this routine, refer to the IDL Online Help Navigator or type:

     ? mk_html_help

at the IDL command line prompt.

Last modified: Tue Aug 18 15:38:05 2015.


List of Routines


Routine Descriptions

DECSTRF

[Next Routine] [List of Routines]
 NAME:
  decstrf
 PURPOSE: (one line)
   Convert declination in radians to an ASCII string.
 DESCRIPTION:
  
 CATEGORY:
  Astronomy
 CALLING SEQUENCE:
  str = decstrf(dec, places)
 INPUTS:
  dec - Declination, in radians, to be converted to a string.  May
                  a vector, in which case the output will be a vector.
 OPTIONAL INPUT PARAMETERS:
  places - Resolution of output string (integer).
             = -7     nearest hour.                    +DD
             = -6     nearest 30 minutes.              +DD:(00,30)
             = -5     nearest 15 minutes.              +DD:(00,15,30,45)
             = -4     nearest 10 minutes.              +DD:M0
             = -3     nearest 5 minutes.               +DD:M(0,5)
             = -2     nearest minute.                  +DD:MM
             = -1     nearest ten seconds.             +DD:MM:S0            
             =  0     nearest second.                  +DD:MM:SS            
             =  1     nearest tenth of a second.       +DD:MM:SS.s              
             =  2     nearest hundredth of a second.   +DD:MM:SS.ss              
             =  3     nearest thousandth of a second.  +DD:MM:SS.sss            
 KEYWORD INPUT PARAMETERS:
  none
 KEYWORD OUTPUT PARAMETERS:
  none
 OUTPUTS:
    str   - Output string for the converted dec
 COMMON BLOCKS:
 SIDE EFFECTS:
 RESTRICTIONS:
 PROCEDURE:
  Call the PROCEDURE decstr
 MODIFICATION HISTORY:
  Written 2006 Feb 27, by Leslie Young, SwRI

(See ../astronomy/decstrf.pro)


DECSTRLAY

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
    decstrlay
 PURPOSE: (one line)
    Convert declination in radians to an ASCII string.
 DESCRIPTION:

 CATEGORY:
    Astronomy
 CALLING SEQUENCE:
    decstrlay, declination, places, str
 INPUTS:
    declination - Declination, in radians, to be converted to a string.  May
                  a vector, in which case the output will be a vector.
    places      - Resolution of output string.
             = -7     nearest hour.                    +DD
             = -6     nearest 30 minutes.              +DD:(00,30)
             = -5     nearest 15 minutes.              +DD:(00,15,30,45)
             = -4     nearest 10 minutes.              +DD:M0
             = -3     nearest 5 minutes.               +DD:M(0,5)
             = -2     nearest minute.                  +DD:MM
             = -1     nearest ten seconds.             +DD:MM:S0
             =  0     nearest second.                  +DD:MM:SS
             =  1     nearest tenth of a second.       +DD:MM:SS.s
             =  2     nearest hundredth of a second.   +DD:MM:SS.ss
             =  3     nearest thousandth of a second.  +DD:MM:SS.sss
 OPTIONAL INPUT PARAMETERS:

 KEYWORD PARAMETERS:
    SEPCHAR - Separator character for the fields in the position.
                 Default=':'.  Warning, if you do not use ':' then the
                 string may not be parsable by raparse.
 OUTPUTS:
    str         - Output string for the converted declination.
 COMMON BLOCKS:

 SIDE EFFECTS:

 RESTRICTIONS:

 PROCEDURE:
    Declination (in the range [-pi/2,pi/2]) is converted to a string.
    The sign of the declination is always provided and there are no imbedded
    blanks.  PLACES indicates the reported precision of the string.
    Calls external routine radtodms.
 MODIFICATION HISTORY:
  Copyright (C) 1987,91, by Marc W. Buie
  Version dated 91/8/5
      Ported by Doug Loucks, Lowell Observatory, August 11, 1993, from the
         C-Language version written by Marc Buie.
  2003/05/09, MWB, added SEPCHAR keyword
  2006/10/04, LAY, allow 5 digits of precision

(See ../astronomy/decstrlay.pro)


ELEMS

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
  elems
 PURPOSE: (one line)
  Return orbital elements to pass to ephem
 DESCRIPTION:
  Return orbital elements to pass to ephem
 CATEGORY:
  Astronomy
 CALLING SEQUENCE:
  e = elems(p)
 INPUTS:
  p - planet number.  1 = mercury, etc.
 OPTIONAL INPUT PARAMETERS:
  none
 KEYWORD INPUT PARAMETERS:
  none
 KEYWORD OUTPUT PARAMETERS:
  none
 OUTPUTS:
  elem - vector of 7 elements
      e      Eccentricity (degrees)
      i      Inclination w.r.t xy-plane (degrees)
     LAN     Longitude of Ascending Node (degrees)
     APF     Argument of Perifocus (degrees)
     tau     Julian Date of last periapsis
      n      Mean motion (au/day)
      A      semimajor axis.
 COMMON BLOCKS:
  None
 SIDE EFFECTS:
 RESTRICTIONS:
  None
 PROCEDURE:
 MODIFICATION HISTORY:
  Written 2000, by Leslie Young, SwRI

(See ../astronomy/elems2007.pro)


EPHEM

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
  ephem
 PURPOSE: (one line)
  Return heliocentric position and velocity
 DESCRIPTION:
  Given t in Julian date and orbital elements, return heliocentric XYZ in AU, and, optionally, 
  velocity in AU/day
 CATEGORY:
  Astronomy
 CALLING SEQUENCE:
  xyz = elem2ephem(elem, t, uvw)
 INPUTS:
  elem - vector of 6 or 7 elements
      e      Eccentricity (degrees)
      i      Inclination w.r.t xy-plane (degrees)
     LAN     Longitude of Ascending Node (degrees)
     APF     Argument of Perifocus (degrees)
     tau     Julian Date of last periapsis
      n      Mean motion (deg/day)
      A      semimajor axis.  If not passed, assume M = solar

  t - Julian date
 OPTIONAL INPUT PARAMETERS:
  none
 KEYWORD INPUT PARAMETERS:
  none
 KEYWORD OUTPUT PARAMETERS:
  none
 OUTPUTS:
  xyz - vector of position in AU
  uvw - vector of velocity in AU/day
 COMMON BLOCKS:
  None
 SIDE EFFECTS:
 RESTRICTIONS:
  None
 PROCEDURE:
 MODIFICATION HISTORY:
  Written 2000, by Leslie Young, SwRI

(See ../astronomy/ephem.pro)


EPHEMLAY

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
  ephemLAY
 PURPOSE: (one line)
  Return heliocentric position and velocity
 DESCRIPTION:
  Given t in Julian date and orbital elements, return heliocentric XYZ in AU, and, optionally, 
  velocity in AU/day
 CATEGORY:
  Astronomy
 CALLING SEQUENCE:
  xyz = ephemLAY(elem, t, uvw)
 INPUTS:
  elem - vector of 6 or 7 elements
      e      Eccentricity (degrees)
      i      Inclination w.r.t xy-plane (degrees)
     LAN     Longitude of Ascending Node (degrees)
     APF     Argument of Perifocus (degrees)
     tau     Julian Date of last periapsis
      n      Mean motion (deg/day)
      A      semimajor axis.  If not passed, assume M = solar

  t - Julian date
 OPTIONAL INPUT PARAMETERS:
  none
 KEYWORD INPUT PARAMETERS:
  none
 KEYWORD OUTPUT PARAMETERS:
  none
 OUTPUTS:
  xyz - vector of position in AU
  uvw - vector of velocity in AU/day
 COMMON BLOCKS:
  None
 SIDE EFFECTS:
 RESTRICTIONS:
  None
 PROCEDURE:
 MODIFICATION HISTORY:
  Written 2000, by Leslie Young, SwRI
  2005 Oct 17 LAY changed documentation for n (was au/day)

(See ../astronomy/ephemlay.pro)


GEOCLLH2XYZ

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
  geocllh2xyz
 PURPOSE: (one line)
  Convert geocentric latitude, longitude, and height to cartesian coordinates
 DESCRIPTION:
  Convert geocentric latitude, longitude, and height to cartesian coordinates
 CATEGORY:
  Astronomy
 CALLING SEQUENCE:
  geocllh, lat, long, h, x, y, z
 INPUTS:
  
  
 OPTIONAL INPUT PARAMETERS:
  none
 KEYWORD INPUT PARAMETERS:
  none
 KEYWORD OUTPUT PARAMETERS:
  none
 OUTPUTS:
  Planck function
 COMMON BLOCKS:
  uses share_physconst
 SIDE EFFECTS:
 RESTRICTIONS:
  Must run phys_const first
  For now, T and nu are scalars
  Doesn't check if h nu/k T << 1
 PROCEDURE:
 MODIFICATION HISTORY:
  Written 2000 April, by Leslie Young, SwRI

(See ../astronomy/geocllh2xyz.pro)


LATSTR

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
    latstr
 PURPOSE: (one line)
    Convert latitude in radians to an ASCII string.
 DESCRIPTION:

 CATEGORY:
    Astronomy
 CALLING SEQUENCE:
    latstr, latitude, places, str
 INPUTS:
    latitude - Latitude, in radians, to be converted to a string.  May
                  a vector, in which case the output will be a vector.
    places      - Resolution of output string.
             = -7     nearest hour.                    +DD
             = -6     nearest 30 minutes.              +DD:(00,30)
             = -5     nearest 15 minutes.              +DD:(00,15,30,45)
             = -4     nearest 10 minutes.              +DD:M0
             = -3     nearest 5 minutes.               +DD:M(0,5)
             = -2     nearest minute.                  +DD:MM
             = -1     nearest ten seconds.             +DD:MM:S0
             =  0     nearest second.                  +DD:MM:SS
             =  1     nearest tenth of a second.       +DD:MM:SS.s
             =  2     nearest hundredth of a second.   +DD:MM:SS.ss
             =  3     nearest thousandth of a second.  +DD:MM:SS.sss
 OPTIONAL INPUT PARAMETERS:

 KEYWORD PARAMETERS:
    SEPCHAR - Separator character for the fields in the position.
                 Default=':'.  Warning, if you do not use ':' then the
                 string may not be parsable by raparse.
    FORMAT = 'E' for east latitude, 'W' for west long. Default = positive.
 OUTPUTS:
    str         - Output string for the converted latitude.
 COMMON BLOCKS:

 SIDE EFFECTS:

 RESTRICTIONS:

 PROCEDURE:
    East latitude (in the range [-pi,pi]) is converted to a string.
    The sign of the latitude is always provided and there are no imbedded
    blanks.  PLACES indicates the reported precision of the string.
    Calls external routine radtodms.
 MODIFICATION HISTORY:
  Copyright (C) 1987,91, by Marc W. Buie
  Version dated 91/8/5
      Ported by Doug Loucks, Lowell Observatory, August 11, 1993, from the
         C-Language version written by Marc Buie.
  2003/05/09, MWB, added SEPCHAR keyword

(See ../astronomy/latstr.pro)


LATSTRF

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
  latstrf
 PURPOSE: (one line)
   Convert latitude in radians to an ASCII string.
 DESCRIPTION:
  
 CATEGORY:
  Astronomy
 CALLING SEQUENCE:
  str = latstrf(lat, places)
 INPUTS:
  lat - Latitude, in radians, to be converted to a string.  May
                  a vector, in which case the output will be a vector.
 OPTIONAL INPUT PARAMETERS:
  places - Resolution of output string (integer).
             = -7     nearest hour.                    +DD
             = -6     nearest 30 minutes.              +DD:(00,30)
             = -5     nearest 15 minutes.              +DD:(00,15,30,45)
             = -4     nearest 10 minutes.              +DD:M0
             = -3     nearest 5 minutes.               +DD:M(0,5)
             = -2     nearest minute.                  +DD:MM
             = -1     nearest ten seconds.             +DD:MM:S0            
             =  0     nearest second.                  +DD:MM:SS            
             =  1     nearest tenth of a second.       +DD:MM:SS.s              
             =  2     nearest hundredth of a second.   +DD:MM:SS.ss              
             =  3     nearest thousandth of a second.  +DD:MM:SS.sss            
 KEYWORD INPUT PARAMETERS:
    SEPCHAR - Separator character for the fields in the position.
                 Default=':'.  Warning, if you do not use ':' then
                 the
                 string may not be parsable by raparse.
 KEYWORD OUTPUT PARAMETERS:
  none
 OUTPUTS:
    str   - Output string for the converted lat
 COMMON BLOCKS:
 SIDE EFFECTS:
 RESTRICTIONS:
 PROCEDURE:
  Call the PROCEDURE latstr
 MODIFICATION HISTORY:
  Written 2006 Feb 27, by Leslie Young, SwRI

(See ../astronomy/latstrf.pro)


LONSTR

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
    lonstr
 PURPOSE: (one line)
    Convert longitude in radians to an ASCII string.
 DESCRIPTION:

 CATEGORY:
    Astronomy
 CALLING SEQUENCE:
    lonstr, longitude, places, str
 INPUTS:
    longitude - Longitude, in radians, to be converted to a string.  May
                  a vector, in which case the output will be a vector.
    places      - Resolution of output string.
             = -7     nearest hour.                    +DD
             = -6     nearest 30 minutes.              +DD:(00,30)
             = -5     nearest 15 minutes.              +DD:(00,15,30,45)
             = -4     nearest 10 minutes.              +DD:M0
             = -3     nearest 5 minutes.               +DD:M(0,5)
             = -2     nearest minute.                  +DD:MM
             = -1     nearest ten seconds.             +DD:MM:S0
             =  0     nearest second.                  +DD:MM:SS
             =  1     nearest tenth of a second.       +DD:MM:SS.s
             =  2     nearest hundredth of a second.   +DD:MM:SS.ss
             =  3     nearest thousandth of a second.  +DD:MM:SS.sss
 OPTIONAL INPUT PARAMETERS:

 KEYWORD PARAMETERS:
    SEPCHAR - Separator character for the fields in the position.
                 Default=':'.  Warning, if you do not use ':' then the
                 string may not be parsable by raparse.
    FORMAT = 'E' for east longitude, 'W' for west long. Default = positive.
 OUTPUTS:
    str         - Output string for the converted longitude.
 COMMON BLOCKS:

 SIDE EFFECTS:

 RESTRICTIONS:

 PROCEDURE:
    East longitude (in the range [-pi,pi]) is converted to a string.
    The sign of the longitude is always provided and there are no imbedded
    blanks.  PLACES indicates the reported precision of the string.
    Calls external routine radtodms.
 MODIFICATION HISTORY:
  Copyright (C) 1987,91, by Marc W. Buie
  Version dated 91/8/5
      Ported by Doug Loucks, Lowell Observatory, August 11, 1993, from the
         C-Language version written by Marc Buie.
  2003/05/09, MWB, added SEPCHAR keyword

(See ../astronomy/lonstr.pro)


LONSTRF

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
  lonstrf
 PURPOSE: (one line)
   Convert longitude in radians to an ASCII string.
 DESCRIPTION:
  
 CATEGORY:
  Astronomy
 CALLING SEQUENCE:
  str = lonstrf(lon, places)
 INPUTS:
  lon - Longitude, in radians, to be converted to a string.  May
                  a vector, in which case the output will be a vector.
 OPTIONAL INPUT PARAMETERS:
  places - Resolution of output string (integer).
             = -7     nearest hour.                    +DD
             = -6     nearest 30 minutes.              +DD:(00,30)
             = -5     nearest 15 minutes.              +DD:(00,15,30,45)
             = -4     nearest 10 minutes.              +DD:M0
             = -3     nearest 5 minutes.               +DD:M(0,5)
             = -2     nearest minute.                  +DD:MM
             = -1     nearest ten seconds.             +DD:MM:S0            
             =  0     nearest second.                  +DD:MM:SS            
             =  1     nearest tenth of a second.       +DD:MM:SS.s              
             =  2     nearest hundredth of a second.   +DD:MM:SS.ss              
             =  3     nearest thousandth of a second.  +DD:MM:SS.sss            
 KEYWORD INPUT PARAMETERS:
    SEPCHAR - Separator character for the fields in the position.
                 Default=':'.  Warning, if you do not use ':' then
                 the
                 string may not be parsable by raparse.
    FORMAT = 'E' for east longitude, 'W' for west long. Default =
    positive.
 KEYWORD OUTPUT PARAMETERS:
  none
 OUTPUTS:
    str   - Output string for the converted lon
 COMMON BLOCKS:
 SIDE EFFECTS:
 RESTRICTIONS:
 PROCEDURE:
  Call the PROCEDURE lonstr
 MODIFICATION HISTORY:
  Written 2006 Feb 27, by Leslie Young, SwRI

(See ../astronomy/lonstrf.pro)


PLANCK_INVLAM

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
  planck_invlam
 PURPOSE: (one line)
  Return Planck function (brightness of a blackbody) in erg/cm^2/s/(cm^-1)/Sr
 DESCRIPTION:
  Return Planck function (brightness of a blackbody) in erg/cm^2/s/(cm^-1)/Sr
 CATEGORY:
  Astronomy
 CALLING SEQUENCE:
  b = planck_invlam(t, invlam)
 INPUTS:
  t - temperature in K 
  invlam - inverse wavelength (cm^-1)
 OPTIONAL INPUT PARAMETERS:
  none
 KEYWORD INPUT PARAMETERS:
  none
 KEYWORD OUTPUT PARAMETERS:
  none
 OUTPUTS:
  Planck function
 COMMON BLOCKS:
  uses share_physconst
 SIDE EFFECTS:
 RESTRICTIONS:
 PROCEDURE:
 MODIFICATION HISTORY:
  Written 2000 April, by Leslie Young, SwRI
  Modified Jan 2001 LAY SwRI
  2007 Aug 28 LAY; changed documentation (corrected units to include 1/sr)

(See ../astronomy/planck_invlam.pro)


PLANCK_LAM

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
  planck_lam
 PURPOSE: (one line)
  Return Planck function (brightness of a blackbody) in erg/cm^2/s/(cm)/Sr
 DESCRIPTION:
  Return Planck function (brightness of a blackbody) in erg/cm^2/s/(cm)/Sr
 CATEGORY:
  Astronomy
 CALLING SEQUENCE:
  b = planck_lam(t, nu)
 INPUTS:
  t - temperature in K 
  lam - wavelength (cm)
 OPTIONAL INPUT PARAMETERS:
  none
 KEYWORD INPUT PARAMETERS:
  none
 KEYWORD OUTPUT PARAMETERS:
  none
 OUTPUTS:
  Planck function
 COMMON BLOCKS:
  uses share_physconst
 SIDE EFFECTS:
 RESTRICTIONS:
 PROCEDURE:
 MODIFICATION HISTORY:
  Written 2000 April, by Leslie Young, SwRI
  Modified Jan 2001 LAY SwRI
  2007 Aug 28 LAY; changed documentation (corrected units to include 1/sr)

(See ../astronomy/planck_lam.pro)


PLANCK_NU

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
  planck_nu
 PURPOSE: (one line)
  Return Planck function (brightness of a blackbody) in erg/cm^2/s/Hz/Sr
 DESCRIPTION:
  Return Planck function (brightness of a blackbody) in erg/cm^2/s/Hz/Sr
 CATEGORY:
  Astronomy
 CALLING SEQUENCE:
  b = planck_nu(t, nu)
 INPUTS:
  t - temperature in K 
  nu - frequency (Hz)
 OPTIONAL INPUT PARAMETERS:
  none
 KEYWORD INPUT PARAMETERS:
  none
 KEYWORD OUTPUT PARAMETERS:
  none
 OUTPUTS:
  Planck function
 COMMON BLOCKS:
  uses share_physconst
 SIDE EFFECTS:
 RESTRICTIONS:
  Must run phys_const first
  For now, T and nu are scalars
 PROCEDURE:
 MODIFICATION HISTORY:
  Written 2000 April, by Leslie Young, SwRI
  Modified Jan 2001 LAY SwRI
  2007 Aug 28 LAY; changed documentation (corrected units to include 1/sr)

(See ../astronomy/planck_nu.pro)


RADEC2XYZ

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
  radec2xyz
 PURPOSE: (one line)
  Convert from ra, dec to xyz
 DESCRIPTION:
  Convert from ra, dec to xyz
 CATEGORY:
  Astronomy
 CALLING SEQUENCE:
  xyz = radec2xyz(radec)
 INPUTS:
  radec - vector of [ra, dec] in radians
 OPTIONAL INPUT PARAMETERS:
  none
 KEYWORD INPUT PARAMETERS:
  none
 KEYWORD OUTPUT PARAMETERS:
  none
 OUTPUTS:
  xyz - vector of [x,y,z]
 COMMON BLOCKS:
  None
 SIDE EFFECTS:
 RESTRICTIONS:
  None
 PROCEDURE:
 MODIFICATION HISTORY:
  Written 2000, by Leslie Young, SwRI
  2005 Apr 26 do arithmatic in doubles

(See ../astronomy/radec2xyz.pro)


RADREC6[1]

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
  radrec6
 PURPOSE: (one line)
  Convert from [r, ra, dec, r', ra', dec'] to [f,g,h,f',g',h']
 DESCRIPTION:
  Convert from [r, ra, dec, r', ra', dec'] to [f,g,h,f',g',h']
 CATEGORY:
  Astronomy
 CALLING SEQUENCE:
  fghstate = rad6fgh6(rad6, radec_star, dradec_star)
 INPUTS:
  rad6 - vector of 
   r - range in LENGTH UNITS (eg km)
   ra - right ascention in radians
   dec - declination in radians
   r' - range derivative in LENGTH/TIME (km/s)
   ra' - right ascention derivative in radians/TIME (NOT cosdec dra/dt)
   dec' - declination derivative in radians/TIME
  radec_star - vector of;
   A - right ascention in radians
   D - declination in radians
 OPTIONAL INPUT PARAMETERS:
  dradec_star - vector of [dA, dD]
   dA = d(A)/dt (NOT cosdec dA/dt)
   dD = dD/dt
 KEYWORD INPUT PARAMETERS:
  none
 KEYWORD OUTPUT PARAMETERS:
  none
 OUTPUTS:
  fgh6 - vector of [f,g,h,f',g',h']

  f - distance on F axis in units of LENGTH
  g - distance on G axis in units of LENGTH
  h - distance on H axis in units of LENGTH
  f' - f derivative in LENGTH/TIME
  g' - g derivative in LENGTH/TIME
  h' - h derivative in LENGTH/TIME

   fgh are distances along unit vectors IJK, as defined in 
   Green Spherical Astronomy, sec 13.2.
  K - in the direction of star (A,D)
  I - perpendicular to K and celestial N pole ("East on sky")
  J - perpendicular to I and K ("North on sky")

  If r is in km, r' in km/s, and ra' and dec' in radian/s, 
  then f, g, and h are in km and f', g' and h' are in km/s

 COMMON BLOCKS:
  None
 SIDE EFFECTS:
 RESTRICTIONS:
  None
 PROCEDURE:
  This method is slightly preferred over rec6fgh6 when the
  fundemental calculated variables are ra, dec
 MODIFICATION HISTORY:
  Written 2006 Jan 02 Leslie Young
  2006 May 11 LAY corrected documentation

(See ../astronomy/rad6fgh6.pro)


RADREC6[2]

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
  radrec6
 PURPOSE: (one line)
  Convert from [r, ra, dec, r', ra', dec'] to [x,y,z,x',y',z']
 DESCRIPTION:
  Convert from [r, ra, dec, r', ra', dec'] to [x,y,z,x',y',z']
 CATEGORY:
  Astronomy
 CALLING SEQUENCE:
  state = rad6rec6(rad6)
 INPUTS:
  rad6 - vector of 
   r - range in LENGTH UNITS
   ra - right ascention in radians
   dec - declination in radians
   r' - range derivative in LENGTH/TIME
   ra' - right ascention derivative in radians/TIME
   dec' - declination derivative in radians/TIME
 OPTIONAL INPUT PARAMETERS:
  none
 KEYWORD INPUT PARAMETERS:
  none
 KEYWORD OUTPUT PARAMETERS:
  none
 OUTPUTS:
  rec6 - vector of [x,y,z,x',y',z']
  x - distance on X axis in units of LENGTH
  y - distance on Y axis in units of LENGTH
  z - distance on Z axis in units of LENGTH
  x' - x derivative in LENGTH/TIME
  y' - y derivative in LENGTH/TIME
  z' - z derivative in LENGTH/TIME

  If r is in km, r' in km/s, and ra' and dec' in radian/s, 
  then x, y, and z will be in km, and x', y', z' in km/s
  (e.g., the same format as states returned by spice routines)

 COMMON BLOCKS:
  None
 SIDE EFFECTS:
 RESTRICTIONS:
  None
 PROCEDURE:
 MODIFICATION HISTORY:
  Written 2005 Apr 26, by Leslie Young, SwRI
  2006 Mar 11 LAY correct documentation

(See ../astronomy/rad6rec6.pro)


RADREC6[3]

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
  radrec6
 PURPOSE: (one line)
  Convert from [x,y,z,x',y',z'] to [f,g,h,f',g',h']
 DESCRIPTION:
  Convert from [x,y,z,x',y',z'] to [f,g,h,f',g',h']
 CATEGORY:
  Astronomy
 CALLING SEQUENCE:
  fgh6 = rec6fgh6(rec6, radec_star, dradec_star)
 INPUTS:
  rec6 - vector of [x,y,z,x',y',z']
  x - distance on X axis in units of LENGTH
  y - distance on Y axis in units of LENGTH
  z - distance on Z axis in units of LENGTH
  x' - x derivative in LENGTH/TIME
  y' - y derivative in LENGTH/TIME
  z' - z derivative in LENGTH/TIME
  radec_star - vector of [A,D]
   A - right ascention in radians
   D - declination in radians
 OPTIONAL INPUT PARAMETERS:
  dradec_star - vector of [dA, dD]
   dA = d(A)/dt (NOT cosdec dA/dt)
   dD = dD/dt
 KEYWORD INPUT PARAMETERS:
  none
 KEYWORD OUTPUT PARAMETERS:
  none
 OUTPUTS:
  fgh6 - vector of [f,g,h,f',g',h']
   fgh are distances along unit vectors IJK, as defined in 
   Green Spherical Astronomy, sec 13.2.
  K - in the direction of star (A,D)
  I - perpendicular to K and celestial N pole ("East on sky")
  J - perpendicular to I and K ("North on sky")

  If x, y, and z are in km, and x', y', z' in km/s
  (e.g., the same format as states returned by spice routines)
  then f, g, and h are km, and f', g', and h' are in km/s

 COMMON BLOCKS:
  None
 SIDE EFFECTS:
 RESTRICTIONS:
  None
 PROCEDURE:
 MODIFICATION HISTORY:
  Written 2006 Jan 02, by Leslie Young, SwRI
  2006 Mar 11 LAY. Corrected decumentation

(See ../astronomy/rec6fgh6.pro)


RADREC6[4]

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
  radrec6
 PURPOSE: (one line)
  Convert from [x,y,z,x',y',z'] to [r, ra, dec, r', ra', dec']
 DESCRIPTION:
  Convert from [x,y,z,x',y',z'] to [r, ra, dec, r', ra', dec']
 CATEGORY:
  Astronomy
 CALLING SEQUENCE:
  rad6 = rec6rad6(rad6)
 INPUTS:
  rec6 - vector of [x,y,z,x',y',z']
  x - distance on X axis in units of LENGTH
  y - distance on Y axis in units of LENGTH
  z - distance on Z axis in units of LENGTH
  x' - x derivative in LENGTH/TIME
  y' - y derivative in LENGTH/TIME
  z' - z derivative in LENGTH/TIME
 OPTIONAL INPUT PARAMETERS:
  none
 KEYWORD INPUT PARAMETERS:
  none
 KEYWORD OUTPUT PARAMETERS:
  none
 OUTPUTS:
  rad6 - vector of 
   r - range in LENGTH UNITS
   ra - right ascention in radians
   dec - declination in radians
   r' - range derivative in LENGTH/TIME
   ra' - right ascention derivative in radians/TIME
   dec' - declination derivative in radians/TIME

  If x, y, and z are in km, and x', y', z' in km/s
  (e.g., the same format as states returned by spice routines)
  then r will be in km, r' in km/s, and ra' and dec' in radian/s, 

 COMMON BLOCKS:
  None
 SIDE EFFECTS:
 RESTRICTIONS:
  None
 PROCEDURE:
 MODIFICATION HISTORY:
  Written 2005 Apr 26, by Leslie Young, SwRI
  2006 Mar 11 LAY, corrected documentation

(See ../astronomy/rec6rad6.pro)


RASTRF

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
  rastrf
 PURPOSE: (one line)
  turn ra (radian) into hh:mm:ss[.SSS] as a function
 DESCRIPTION:
  
 CATEGORY:
  Astronomy
 CALLING SEQUENCE:
  str = rastrf(ra, places, carry)
 INPUTS:
  ra - right ascention (radians)
 OPTIONAL INPUT PARAMETERS:
  places - Resolution of output string (integer).
             = -8     Decimal hours                     HH.hhhhh
             = -7     nearest hour.                     HH
             = -6     nearest 30 minutes.               HH:(00,30)
             = -5     nearest 15 minutes.               HH:(00,15,30,45)
             = -4     nearest 10 minutes.               HH:M0
             = -3     nearest 5 minutes.                HH:M(0,5)
             = -2     nearest minute.                   HH:MM                     
             = -1     nearest ten seconds.              HH:MM:S0                  
             =  0     nearest second.                   HH:MM:SS                  
             =  1     nearest tenth of a second.        HH:MM:SS.s                
             =  2     nearest hundredth of a second.    HH:MM:SS.ss               
             =  3     nearest thousandth of a second.   HH:MM:SS.sss             
             =  4     nearest thousandth of a second.   HH:MM:SS.ssss    DEFAULT  
 KEYWORD INPUT PARAMETERS:
  none
 KEYWORD OUTPUT PARAMETERS:
  none
 OUTPUTS:
    str   - Output string for the converted right ascension.
    carry - Flag that indicates ra rolled over after rounding.
 COMMON BLOCKS:
 SIDE EFFECTS:
 RESTRICTIONS:
 PROCEDURE:
  Call the PROCEDURE rastr
 MODIFICATION HISTORY:
  Written 2006 Feb 27, by Leslie Young, SwRI

(See ../astronomy/rastrf.pro)


RASTRLAY

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
    rastrlay
 PURPOSE: (one line)
    Convert RA in radians to hours, minutes, and seconds (ASCII string).
 DESCRIPTION:

 CATEGORY:
    Astronomy
 CALLING SEQUENCE:
    rastrlay, radians, places, str, carry
 INPUTS:
    ra     : Right Ascension, in radians, to be converted to a string.
             May a vector, in which case the outputs will be vectors.
    places : Resolution of output string (integer).
             = -8     Decimal hours                     HH.hhhhh
             = -7     nearest hour.                     HH
             = -6     nearest 30 minutes.               HH:(00,30)
             = -5     nearest 15 minutes.               HH:(00,15,30,45)
             = -4     nearest 10 minutes.               HH:M0
             = -3     nearest 5 minutes.                HH:M(0,5)
             = -2     nearest minute.                   HH:MM
             = -1     nearest ten seconds.              HH:MM:S0
             =  0     nearest second.                   HH:MM:SS
             =  1     nearest tenth of a second.        HH:MM:SS.s
             =  2     nearest hundredth of a second.    HH:MM:SS.ss
             =  3     nearest thousandth of a second.   HH:MM:SS.sss
             =  4     nearest thousandth of a second.   HH:MM:SS.ssss
 OPTIONAL INPUT PARAMETERS:

 KEYWORD PARAMETERS:
    SEPCHAR - Separator character for the fields in the position.
                 Default=':'.  Warning, if you do not use ':' then the
                 string may not be parsable by raparse.
 OUTPUTS:
    str   - Output string for the converted right ascension.
    carry - Flag that indicates ra rolled over after rounding.
 COMMON BLOCKS:

 SIDE EFFECTS:

 RESTRICTIONS:

 PROCEDURE:
    Right ascension is reduced to the range [0,24) then converted to a string.
    There are no imbedded blanks.
    Calls external routine radtohms.
 MODIFICATION HISTORY:
  Copyright (C) 1987, by Marc W. Buie
  Version dated 87/4/21
    Ported by Doug loucks, Lowell Observatory, July, 1993, from the
 C-Language version written by Marc Buie.
 97/07/14, MWB, added places=4
  99/1/12, MWB, added places = -8
  2001/11/04, MWB, fixed bug in places=-7 case
  2003/05/09, MWB, added SEPCHAR keyword

(See ../astronomy/rastrlay.pro)


RD2ANG

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
  rd2ang
 PURPOSE: (one line)
  pairs of ra,dec coordinates to great-circle angle
 DESCRIPTION:
  
 CATEGORY:
  Astronomy
 CALLING SEQUENCE:
  ang = rd2ang(A, D, ra, dec)
 INPUTS:
  A - ra of point 1 (radians)
  D - dec of point 1 (radians)
  ra - ra of point 2 (radians)
  dec -dec of point 2 (radians) 
 OPTIONAL INPUT PARAMETERS:
  none
 KEYWORD INPUT PARAMETERS:
  none
 KEYWORD OUTPUT PARAMETERS:
  none
 OUTPUTS:
  ang - angle between two points (radians)
 COMMON BLOCKS:
 SIDE EFFECTS:
 RESTRICTIONS:
 PROCEDURE:
 MODIFICATION HISTORY:
  Written 2006 Mar 5, by Leslie Young, SwRI

(See ../astronomy/rd2ang.pro)


RGFCNTRD

[Previous Routine] [Next Routine] [List of Routines]
  NAME: 
	RGFCNTRD
  PURPOSE:
	Compute centroid coordinates of a stellar object using the
	algorithm in the DAOPHOT FIND subroutine.

  CALLING SEQUENCE: 
	RGFCNTRD, img, x, y, xcen, ycen, [ fwhm , /SILENT, /DEBUG, /ADD_HALF]

  INPUTS:     
	IMG - Two dimensional image array
	X,Y - Scalar or vector integers giving approximate stellar center

  OPTIONAL INPUT:
	FWHM - floating scalar; Centroid is computed using a box of half
		width equal to 1.5 sigma = 0.637* FWHM. RGFCNTRD will prompt
		for FWHM if not supplied

  OUTPUTS:   
	XCEN - the computed X centroid position, same number of points as X
	YCEN - computed Y centroid position, same number of points as Y

	Values for XCEN and YCEN will not be computed if the computed
	centroid falls outside of the box, or if the computed derivatives
	are non-decreasing.   If the centroid cannot be computed, then a 
	message is displayed and XCEN and YCEN are set to -1.

  OPTIONAL OUTPUT KEYWORDS:
	SILENT - Normally RGFCNTRD prints an error message if it is unable
		to compute the centroid.   Set /SILENT to suppress this.
	DEBUG - If this keyword is set, then RGFCNTRD will display the subarray
		it is using to compute the centroid.
	ADD_HALF - If this keyword is set, then RGFCNTRD will add 0.5 to
		each value of the centroid to insure that center of
		pixel coordinates are used.
  PROCEDURE: 
	Maximum pixel within distance from input pixel X, Y  determined 
	from FHWM is found and used as the center of a square, within 
	which the centroid is computed as the value (XCEN,YCEN) at which 
	the derivatives of the partial sums of the input image over (y,x)
	with respect to (x,y) = 0.

  MODIFICATION HISTORY:
	Written 2/25/86, by J. K. Hill, S.A.S.C., following
	algorithm used by P. Stetson in DAOPHOT.
	Allowed input vectors        G. Hennessy       April,  1992
	Fixed to prevent wrong answer if floating pt. X & Y supplied
		W. Landsman        March, 1993
	Convert byte, integer subimages to float  W. Landsman  May 1995

(See ../astronomy/rgfcntrd.pro)


XIETA2RD[1]

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
  xieta2rd
 PURPOSE: (one line)
  ra,dec coordinates to xi, eta
 DESCRIPTION:
  
 CATEGORY:
  Astronomy
 CALLING SEQUENCE:
  rd2xieta, A, D, ra, dec, xi, eta
 INPUTS:
  A - ra of the center of a plane (radians)
  D - dec of the center of the plane (radians)
  ra - ra of the point (radians)
  dec -dec of the point (radians) 
 OPTIONAL INPUT PARAMETERS:
  none
 KEYWORD INPUT PARAMETERS:
  none
 KEYWORD OUTPUT PARAMETERS:
  none
 OUTPUTS:
  xi - distance east of a point from center of plane (radians)
  eta - distance north of a point from center of plane (radians)
 COMMON BLOCKS:
 SIDE EFFECTS:
 RESTRICTIONS:
 PROCEDURE:
 For a plane centered at A, D, find the tangent point
 coordinates xi, eta cooresponding to a target at ra, dec

 Smart, Text-book on spherical astronomy, 5th ed, section 161

 MODIFICATION HISTORY:
  Written 2005 Jan 27, by Leslie Young, SwRI
  Moved to $layoung/astronomy 2005 Mar 5

(See ../astronomy/rd2xieta.pro)


XIETA2RD[2]

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
  xieta2rd
 PURPOSE: (one line)
  xi,eta coordinates to ra, dec
 DESCRIPTION:
  
 CATEGORY:
  Astronomy
 CALLING SEQUENCE:
  xieta2rd, A, D, xi, eta, ra, dec
 INPUTS:
  A - ra of the center of a plane (radians)
  D - dec of the center of the plane (radians)
  xi - distance east of a point from center of plane (radians)
  eta - distance north of a point from center of plane (radians)
 OPTIONAL INPUT PARAMETERS:
  none
 KEYWORD INPUT PARAMETERS:
  none
 KEYWORD OUTPUT PARAMETERS:
  none
 OUTPUTS:
  ra - ra of the point (radians)
  dec -dec of the point (radians) 
 COMMON BLOCKS:
 SIDE EFFECTS:
 RESTRICTIONS:
 PROCEDURE:
 For a plane centered at A, D, find the ra, dec
 for the given tangent point
 coordinates xi, eta cooresponding to a target at ra, dec

 Green, eq. 13.13
 MODIFICATION HISTORY:
  Written 2005 Jan 27, by Leslie Young, SwRI
  Moved to $layoung/astronomy 2005 Mar 5

(See ../astronomy/xieta2rd.pro)


XYZ2RADEC

[Previous Routine] [List of Routines]
 NAME:
  xyz2radec
 PURPOSE: (one line)
  Convert from xyz to ra, dec
 DESCRIPTION:
  Convert from xyz to ra, dec
 CATEGORY:
  Astronomy
 CALLING SEQUENCE:
  radec = xyz2radec(xyz)
 INPUTS:
  xyz - vector of [x,y,z]
 OPTIONAL INPUT PARAMETERS:
  none
 KEYWORD INPUT PARAMETERS:
  none
 KEYWORD OUTPUT PARAMETERS:
  none
 OUTPUTS:
  radec - vector of [ra, dec] in radians
 COMMON BLOCKS:
  None
 SIDE EFFECTS:
 RESTRICTIONS:
  None
 PROCEDURE:
 MODIFICATION HISTORY:
  Written 2000, by Leslie Young, SwRI
  2006 Jan 12 LAY change to doubles.

(See ../astronomy/xyz2radec.pro)