GAL_FLAT $SSW/gen/idl_libs/astron/astro/gal_flat.pro
[Previous] [Next]
 NAME:
	GAL_FLAT

 PURPOSE:
	Transforms the image of a galaxy so that the galaxy appears face-on
 EXPLANATION:
	Either a nearest-neighbor approximations or a bilinear interpolation 
	may  be used.

 CALLING SEQUENCE:
	RESULT = GAL_FLAT( image, ang, inc, [, cen, /INTERP ] )  

 INPUTS:   
	IMAGE  - Image to be transformed
	ANG  - Angle of major axis, counterclockwise from Y-axis, degrees
		For an image in standard orientation (North up, East left)
		this is the Position Angle
	INC - Angle of inclination of galaxy, degrees

 OPTIONAL INPUTS:
	CEN - Two element vector giving the X and Y position of galaxy center
		If not supplied, then the galaxy center is assumed to coincide
		 with the image center

 INPUT KEYWORDS:
	INTERP - If present, and non-zero, then bilinear interpolation will be
		performed.  Otherwise a nearest neighbor approximation  is used.

 OUTPUTS:
	RESULT - the transformed image, same dimensions and type as IMAGE

 METHOD:
	A set of 4 equal spaced control points are corrected for inclination
	using the procedure POLYWARP.   These control points are used by 
	POLY_2D to correct the whole image.

 REVISION HISTORY:
	Written by R. S. Hill, SASC Technologies Inc., 4 December 1985
	Code cleaned up a bit    W. Landsman      December 1992
	Converted to IDL V5.0   W. Landsman   September 1997
 CALLS:


GAL_UVW $SSW/gen/idl_libs/astron/astro/gal_uvw.pro
[Previous] [Next]
 NAME:
     GAL_UVW
 PURPOSE:
     Calculate the Galactic space velocity (U,V,W) of star  
 EXPLANATION:
     Calculates the Galactic space velocity U, V, W of star given its 
     (1) coordinates, (2) proper motion, (3) distance (or parallax), and 
     (4) radial velocity.
 CALLING SEQUENCE:
     GAL_UVW, U, V, W, [/LSR, RA=, DEC=, PMRA= ,PMDEC=, VRAD= , DISTANCE= 
              PLX= ]
 OUTPUT PARAMETERS:
      U - Velocity (km/s) positive toward the Galactic *anti*center
      V - Velocity (km/s) positive in the direction of Galactic rotation
      W - Velocity (km/s) positive toward the North Galactic Pole 
 REQUIRED INPUT KEYWORDS:
      User must supply a position, proper motion,radial velocity and distance
      (or parallax).    Either scalars or vectors can be supplied.
     (1) Position:
      RA - Right Ascension in *Degrees*
      Dec - Declination in *Degrees*
     (2) Proper Motion
      PMRA = Proper motion in RA in arc units (typically milli-arcseconds/yr)
      PMDEC = Proper motion in Declination (typically mas/yr)
     (3) Radial Velocity
      VRAD = radial velocity in km/s
     (4) Distance or Parallax
      DISTANCE - distance in parsecs 
                 or
      PLX - parallax with same distance units as proper motion measurements
            typically milliarcseconds (mas)

 OPTIONAL INPUT KEYWORD:
      /LSR - If this keyword is set, then the output velocities will be 
             corrected for the solar motion (U,V,W)_Sun = (-9,+12,+7)  
             (Mihalas & Binney, 1981) to the local standard of rest
  EXAMPLE:
      (1) Compute the U,V,W coordinates for the halo star HD 6755.  
          Use values from Hipparcos catalog, and correct to the LSR
      ra = ten(1,9,42.3)*15.    & dec = ten(61,32,49.5)
      pmra = 627.89  &  pmdec = 77.84         ;mas/yr
      dis = 144    &  vrad = -321.4
      gal_uvw,u,v,w,ra=ra,dec=dec,pmra=pmra,pmdec=pmdec,vrad=vrad,dis=dis,/lsr
          ===>  u=154  v = -493  w = 97        ;km/s

      (2) Use the Hipparcos Input and Output Catalog IDL databases (see 
      http://idlastro.gsfc.nasa.gov/ftp/zdbase/ )to obtain space velocities
      for all stars within 10 pc with radial velocities > 10 km/s

      dbopen,'hipparcos,hic'      ;Need Hipparcos output and input catalogs
      list = dbfind('plx>100,vrad>10')      ;Plx > 100 mas, Vrad > 10 km/s
      dbext,list,'pmra,pmdec,vrad,ra,dec,plx',pmra,pmdec,vrad,ra,dec,plx
      ra = ra*15.                 ;Need right ascension in degrees
      GAL_UVW,u,v,w,ra=ra,dec=dec,pmra=pmra,pmdec=pmdec,vrad=vrad,plx = plx 
      forprint,u,v,w              ;Display results
 METHOD:
      Follows the general outline of Johnson & Soderblom (1987, AJ, 93,864)
      except that U is positive outward toward the Galactic *anti*center, and 
      the J2000 transformation matrix to Galactic coordinates is taken from  
      the introduction to the Hipparcos catalog.   
 REVISION HISTORY:
      Written, W. Landsman                       December   2000


GALAGE $SSW/gen/idl_libs/astron/astro/galage.pro
[Previous] [Next]
 NAME: 
   GALAGE

 PURPOSE:
   Determine the age of a galaxy given its redshift and a formation redshift.

 CALLING SEQUENCE:
   age = galage(z, [zform,  H0 =, k=, lambda0 =, Omega_m= , q0 =, /SILENT])' 

 INPUTS:
    z - positive numeric vector or scalar of measured redshifts 
    zform - redshift of galaxy formation (> z), numeric positive scalar 
        To determine the age of the universe at a given redshift, set zform
        to a large number (e.g. ~1000).

 OPTIONAL KEYWORD INPUTS: 
    H0 - Hubble constant in km/s/Mpc, positive scalar, default is 70
    /SILENT - If set, then the adopted cosmological parameters are not 
         displayed at the terminal.

        No more than two of the following four parameters should be
        specified.   None of them need be specified -- the adopted defaults
        are given. 
    k - curvature constant, normalized to the closure density.   Default is
        0, (indicating a flat universe)
    Omega_m -  Matter density, normalized to the closure density, default
        is 0.3.   Must be non-negative
    Lambda0 - Cosmological constant, normalized to the closure density,
        default is 0.7
    q0 - Deceleration parameter, numeric scalar = -R*(R'')/(R')^2, default
        is -0.5
       
 OUTPUTS:
    age -  age of galaxy in years, will have the same number of elements
           as the input Z vector

 CALLS: ***
	COSMO_PARAM, DTDZ, QSIMP
 EXAMPLE:
    (1) Determine the age of a galaxy observed at z = 1.5 in a cosmology with
    Omega_matter = 0.3 and Lambda = 0.0.    Assume the formation redshift was
    at z = 25, and use the default Hubble constant (=70 km/s/Mpc)

    IDL> print,galage(1.5,25,Omega_m=0.3, Lambda = 0)
             ===> 3.35 Gyr
     
    (2) Plot the age of a galaxy in Gyr out to a redshift of z = 5, assuming 
        the default cosmology (omega_m=0.3, lambda=0.7), and zform = 100

    IDL> z = findgen(50)/10.
    IDL> plot,z,galage(z,100)/1e9,xtit='z',ytit = 'Age (Gyr)'

 PROCEDURE:
    For a given formation time zform and a measured z, integrate dt/dz from 
    zform to z. Analytic formula of dt/dz in Gardner, PASP 110:291-305, 1998 
    March  (eq. 7)
 
 COMMENTS:
    (1) Integrates using the IDL Astronomy Library procedure QSIMP.    (The 
    intrinsic IDL QSIMP() function is not called because of its ridiculous
    restriction that only scalar arguments can be passed to the integrating
    function.)    The function 'dtdz' is defined at the beginning of the 
    routine (so it can compile first).
    
    (2) Should probably be fixed to use a different integrator from QSIMP when
    computing age from an "infinite" redshift of formation.    But using a 
    large value of zform seems to work adequately.

     (3) An alternative set of IDL procedures for computing cosmological
    parameters is available at 
            http://cerebus.as.arizona.edu/~ioannis/research/red/
 PROCEDURES CALLED:
    COSMO_PARAM, QSIMP
 HISTORY: 
     STIS version by P. Plait (ACC)                  June 1999
     IDL Astro Version   W. Landsman (Raytheon ITSS)      April 2000
     Avoid integer overflow for more than 32767 redshifts  July 2001


GAMINC [1] $SSW/gen/idl/spectra/gaminc.pro
[Previous] [Next]
 NAME:
   GAMINC
 PURPOSE:
   Compute the function = exp(X) / X^P * Int[exp(-X)*X^(P-1)dx]
                                       (Int = Integrate from X to Infinity)
 CALLING SEQUENCE:
   Result = gaminc(P,X)                ; X>0

 INPUTS:
   X and P     See expression above for details
 RETURNS:
       Expression returned is a vector the same length as X.
 CALLS: ***
	GAMMA, igamma2 [1], igamma2 [2]
 CALLED BY:
	collexc [1], collexc [2]
 HISTORY:
    1-sep-93, J.R. Lemen (LPARL), Converted from a very old SMM Fortran program
   14-Mar-94, Zarro (ARC) substituted routines from Numerical Recipes


GAMINC [2] $SSW/gen/idl_fix/soft/old350/gaminc.pro
[Previous] [Next]
 NAME:
   GAMINC
 PURPOSE:
   Compute the function = exp(X) / X^P * Int[exp(-X)*X^(P-1)dx]
                                       (Int = Integrate from X to Infinity)
 CALLING SEQUENCE:
   Result = gaminc(P,X)		; X>0

 INPUTS:
   X and P	See expression above for details
		X and P must be a scalars
 RETURNS:
	Expression returned is a vector the same length as X.
 CALLS: ***
	GAMMA, igamma2 [1], igamma2 [2]
 CALLED BY:
	collexc [1], collexc [2]
 HISTORY:
    1-sep-93, J.R. Lemen (LPARL), Converted from a very old SMM Fortran program
		            Not optimized for IDL, but eliminated "go to" stmts.


GAUSS_FIT $SSW/gen/idl/fitting/gauss_fit.pro
[Previous] [Next]
 Project     :  YOHKOH-BCS

 Name	      :  GAUSS_FIT

 Purpose     : Gaussian function fit to line profile
;
 Category    : fitting

 Syntax      : g=gauss_fit(x,y,a,sigmaa)

 Inputs      : y = data to fit
               x = bin or wavelength

 Outputs     : background=a(0)+a(1)*x+a(2)*x^2
               a(3) = peak intensity
               a(4) = center
               a(5) = doppler width
               a(6) = peak intensity (2nd cmpt)
               a(7) = center (2nd cmpt)
               a(8) = doppler width (2nd cmpt)

 Opt. Outputs: sigmaa = sigma errors

 Keywords    : weights = data weights
               nfree  = number of free parameters
               chi2   = chi^2
               last   = set to use input 'a' values as starting values
               fixp   = indicies of parameters to fix
               status = 1/0 converged/not converged
               broad  = 1 for broadened GAUSSIAN (CDS-NIS only)
               no_back = do not fit background
               double  = try double gauss fit
               last    = use last fitted parameters as starting guess
               err= 0 for success, 1 for fail
 CALLS: ***
	BGAUSS, DPRINT, EXIST, FUNCT_FIT, GUESS_FIT_PAR
 CALLED BY:
	FIT_CDS_QL, FIT_SPEC, OSCSLOPE, VOIGT_FIT
 Restrictions: 
               The peak or minimum of the Gaussian must be the largest
	        or smallest point in the Y vector.

 History     : Version 1,  17-July-1993,  D M Zarro.  Written
               Version 2,  14-Sept-1999, Zarro (SM&A) - incorporated
                          broadened gaussian function
               11-June-2000, Zarro (EIT/GSFC) - added /double

 Contact     : DZARRO@SOLAR.STANFORD.EDU


GAUSS_FUNCT2 [1] $SSW/gen/idl/fitting/gauss_funct2.pro
[Previous] [Next]
 PROJECT:
       SOHO - CDS

 NAME:
	GAUSS_FUNCT2

 PURPOSE:
	Evaluate the sum of a gaussian and a 2nd order polynomial.

 EXPLANATION:
	This routine evaluate the sum of a gaussian and a 2nd order polynomial
	and optionally return the value of it's partial derivatives.
	normally, this function is used by CURVEFIT to fit the
	sum of a line and a varying background to actual data.

 CATEGORY:
	E2 - CURVE AND SURFACE FITTING.

 CALLING SEQUENCE:
	GAUSS_FUNCT2,X,A,F,PDER

 INPUTS:
	X = VALUES OF INDEPENDENT VARIABLE.
	A = PARAMETERS OF EQUATION DESCRIBED BELOW.

 OUTPUTS:
	F = VALUE OF FUNCTION AT EACH X(I).

 OPTIONAL OUTPUT PARAMETERS:
	PDER = (N_ELEMENTS(X),6) ARRAY CONTAINING THE
		PARTIAL DERIVATIVES.  P(I,J) = DERIVATIVE
		AT ITH POINT W/RESPECT TO JTH PARAMETER.

 CALLED BY:
	FIND_LIMB, FIND_LIMB2, GAUSSFIT [1], GAUSSFIT2, fit_gcross
 COMMON BLOCKS:
	NONE.

 SIDE EFFECTS:
	NONE.

 RESTRICTIONS:
	NONE.

 PROCEDURE:
	F = A(0)*EXP(-Z^2/2) + A(3) + A(4)*X + A(5)*X^2
	Z = (X-A(1))/A(2)

 MODIFICATION HISTORY:
	WRITTEN, DMS, RSI, SEPT, 1982.
	Modified, DMS, Oct 1990.  Avoids divide by 0 if A(2) is 0.
	Modified, JRL, LPARL, Nov, 1988  - If n_elements(A) is 4 or 5,
					   then a constant or linear
					   background term is calculated.
	Modified, JRL, LPARL, Aug, 1990	 - Allow for no background term
	Modified, SLF, ISAS,  4-Sep-92   - Split gaussfit2/gauss_funct2
       Liyun Wang, NASA/GSFC, October 7, 1994, incoporated into CDS library
         


GAUSS_INTG $SSW/gen/idl/util/gauss_intg.pro
[Previous] [Next]
 PROJECT:
       SDAC
 	
 NAME:
	GAUSS_INTG

 PURPOSE:
	This procedure sums a Gaussian and 2nd order polynomial.
	AND OPTIONALLY RETURN THE VALUE OF IT'S PARTIAL DERIVATIVES.
	THIS GAUSSIAN IS EVALUATED BY INTEGRATING A GAUSSIAN OVER
	AN INTERVAL AND DIVIDING BY THE INTERVAL WIDTH.
	IT USES THE FUNCTION GAUSSINT TO INTEGRATE THE GAUSSIAN.
      

 CATEGORY:
	FITTING, MATH, UTILITY, NUMERICAL ANALYSIS - CURVE AND SURFACE FITTING.
 CALLS: ***
	CHECKVAR [1], F_DIV, checkvar [2], edge_products, f_pder [1], f_pder [2]
 CALLING SEQUENCE:
	GAUSS_INTG,X,A,F,PDER
 CALLED BY:
	F_GAUSS_INTG [1], F_GAUSS_INTG [2]
 EXAMPLE:
       gauss_intg, x, a, f
 INPUTS:
	X = VALUES OF INDEPENDENT VARIABLE, 2 X N, LO AND HI EDGES
	A = PARAMETERS OF EQUATION DESCRIBED BELOW.

 INPUT KEYWORDS:
       SIGTHRESH - number of sigmas defining region of integration
                   for gaussian.  Only regions whose limits are
                   within +/- sigthresh will be evaluated.

 OUTPUTS:
	F = VALUE OF FUNCTION AT EACH X(I).

 OPTIONAL OUTPUT PARAMETERS:
	PDER = (N_ELEMENTS(X),6) ARRAY CONTAINING THE
		PARTIAL DERIVATIVES.  P(I,J) = DERIVATIVE
		AT ITH POINT W/RESPECT TO JTH PARAMETER.
 COMMON BLOCKS:
	NONE.
 SIDE EFFECTS:
	NONE.
 RESTRICTIONS:
	NONE.
 PROCEDURE:
	This procedure sums a Gaussian and 2nd order polynomial.
	AND OPTIONALLY RETURN THE VALUE OF IT'S PARTIAL DERIVATIVES.
	THIS GAUSSIAN IS EVALUATED BY INTEGRATING A GAUSSIAN OVER
	AN INTERVAL AND DIVIDING BY THE INTERVAL WIDTH.
	IT USES THE FUNCTION GAUSSINT TO INTEGRATE THE GAUSSIAN.
	F = A(0)*EXP(-Z^2/2) + A(3) + A(4)*X + A(5)*X^2
	Z = (X-A(1))/A(2)
	F IS INTEGRATED FROM X_LO TO X_HI 
 MODIFICATION HISTORY:
	changed gaussian to integrating gaussian over an interval
	RAS, 21-MAR-95
 CONTACT:
	richard.schwartz@gsfc.nasa.gov


GAUSS_PUT $SSW/gen/idl/util/gauss_put.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : GAUSS_PUT()
               
 Purpose     : Load a 1-d or 2-d Gaussian into an array.
               
 Explanation : Creates an array or image with a Gaussian profile in it.
               
 Use         : IDL>  array = gauss_put(nx,ny,ht,xcen,sigx [,ycen,sigy,back])
    
 Inputs      : nx, ny  -  size of output array. NY must be set to zero
                          to obtain a 1-d array
               ht      -  central intensity of gaussian
               xcen    -  x location of centre of profile
               sigx    -  standard deviation in x direction
      
               
 Opt. Inputs : ycen    -  y location of centre of profile
               sigy    -  standard deviation in y direction
               
 Outputs     : Function returns vector or array 
               
 Opt. Outputs: None
               
 Keywords    : BACKGROUND    -  background level to be added

 Calls       : None
 CALLED BY:
	CDS_GAUSS, CDS_GFUNCT, GHOST_PLOT_SAMPLE, GIS_DUMMY, MAKE_CHIANTI_SPEC
 Common      : None
               
 Restrictions: None
               
 Side effects: None
               
 Category    : Utility, numerical
               
 Prev. Hist. : I presume everyone has one!

 Written     : C D Pike, RAL, 3-Jul-95
               
 Modified    : Fix 1-d bug (no background).  CDP, 07-Sep-95

 Version     : Version 2, 07-Sep-95


GAUSSIAN $SSW/gen/idl_libs/astron/math/gaussian.pro
[Previous] [Next]
 NAME:
       GAUSSIAN
 PURPOSE:
       Compute the 1-d Gaussian function and optionally the derivative
 EXPLANATION:
       Compute the 1-D Gaussian function and optionally the derivative 
       at an array of points.

 CALLING SEQUENCE:
       y = gaussian( xi, parms,[ pderiv ])

 INPUTS:
       xi = array, independent variable of Gaussian function.

       parms = parameters of Gaussian, 2, 3 or 4 element array:
               parms[0] = maximum value (factor) of Gaussian,
               parms[1] = mean value (center) of Gaussian,
               parms[2] = standard deviation (sigma) of Gaussian.
               (if parms has only 2 elements then sigma taken from previous
               call to gaussian(), which is stored in a  common block).
               parms[3] = optional, constant offset added to Gaussian.
 OUTPUT:
       y -  Function returns array of Gaussian evaluated at xi.    Values will
            be floating pt. (even if xi is double) unless the /DOUBLE keyword
            is set.

 OPTIONAL INPUT:
       /DOUBLE - set this keyword to return double precision for both
             the function values and (optionally) the partial derivatives.
 OPTIONAL OUTPUT:
       pderiv = [N,3] or [N,4] output array of partial derivatives,
               computed only if parameter is present in call.

               pderiv[*,i] = partial derivative at all xi absisca values
               with respect to parms[i], i=0,1,2,[3].


 CALLED BY:
	DECOMPOSE_BATSE_DRM, F_NLINE, HSI_GSMOOTH, PSF_GAUSSIAN [1]
 EXAMPLE:
       Evaulate a Gaussian centered at x=0, with sigma=1, and a peak value
       of 10 at the points 0.5 and 1.5.   Also compute the derivative

       IDL> f = gaussian( [0.5,1.5], [10,0,1], DERIV )
       ==> f= [8.825,3.25].   DERIV will be a 2 x 3 array containing the
       numerical derivative at the two points with respect to the 3 parameters.
 
 COMMON BLOCKS:
       None
 HISTORY:
       Written, Frank Varosi NASA/GSFC 1992.
       Converted to IDL V5.0   W. Landsman   September 1997
       Use machar() for machine precision, added /DOUBLE keyword,
       add optional constant 4th parameter    W. Landsman   November 2001


GAUSSJ $SSW/gen/idl/util/gaussj.pro
[Previous] [Next]
 PROJECT:
       SOHO - CDS

 NAME:
       GAUSSJ

 PURPOSE:
       Linear equation solution by Gauss-Jordan elimination

 EXPLANATION:
       This is a routine translated from a Fortran subroutine of the
       Numerical Recipes.

 CALLING SEQUENCE:
       GAUSSJ, aa, bb

 INPUTS:
       AA -- Coefficient matrix with N x N elements
       BB -- Constant matrix of N x M elements, containing the M right-hand
             side vectors

 CALLED BY:
	NL_MRQMIN
       Note: N is number of unknown variabled to be solved, and therefore is
             number of linear equations; M is number of vectors (each with N
             elements) on the right-hand side of equations.

 OPTIONAL INPUTS:
       None.

 OUTPUTS:
       SOLUTION -- Corresponding set of solution vectors

 OPTIONAL OUTPUTS:
       INVERTED -- Inversed matrix of input matrix AA

 KEYWORD PARAMETERS:
       None.

 CALLS:
	None.
 COMMON BLOCKS:
       None.

 RESTRICTIONS:
       None.

 SIDE EFFECTS:
       None.

 CATEGORY:
       Ulitities, numerical

 EXAMPLE:
       To solve for the following linear equation:
          
         | 1 -1  1 |     | -4  |
         | 5 -4  3 | X = | -12 |
         | 2  1  1 |	  | 11  |

       The matrix AA and BB should be: 
          aa = [[1,5,2],[-1,-4,1],[1,3,1]]
          bb = [[-4,-12,11],[15,56,13]]
       and the result will be: 
          bb = [[3,6,-1],[4,-3,8]]

 PREVIOUS HISTORY:
       Written November 10, 1994, by Liyun Wang, GSFC/ARC

 MODIFICATION HISTORY:

 VERSION:
       Version 1, November 10, 1994


GBO_STRUCT [1] $SSW/gen/idl/fund_lib/yohkoh/gbo_struct.pro
[Previous] [Next]
       NAME:
               GBO_STRUCT
       PURPOSE:
               Define the following ground Based Observing database structures
                       * GEV_Data_Rec
                       * GXR_Data_Rec
                       * GDR_Data_Rec
                       * NAV_Data_Rec
                       * GBO_Version_Rec
                       * GSN_ObsHeader_rec
                       * GSN_ObsImage_rec
                       * GBO_Obs_rec
                       * BATSE_Event_Rec
                       * BATSE_LCur_Rec
                       * Nob_Event_Rec
                       * Nob_TimSer_Rec
                       * Uly_FEM_Rec

       CALLING SEQUENCE:
               GBO_STRUCT
 CALLED BY:
	GOES__DEFINE, last_lc, mk_gbl, mk_gev [1], mk_gev [2], mk_gx, mk_nar [1], mk_nar [2]
	mk_week1_file, mk_week_file [1], mk_week_file [2], rd_gbe_raw, rd_gbl_raw [1]
	rd_gbl_raw [2], rd_goes3sec [1], rd_goes3sec [2], rd_goes_fits, rd_guf_ascii
	rd_selsis, rd_week_file [1], rd_week_file [2], rd_week_file [3]
	rd_week_file [4], weekid [2], ydb_exist [2]
       HISTORY:
               written by Mons Morrison, Jun-92
               slf, 23-sep-92, added GXR_Data_Rec, modified GBO_Version_Rec
               slf, 10-oct-92, changed number pad bytes, GXR_Data_Rec


GCIRC $SSW/gen/idl_libs/astron/astro/gcirc.pro
[Previous] [Next]
 NAME:
     GCIRC
 PURPOSE:
     Computes rigorous great circle arc distances.  
 EXPLANATION:
     Input position can either be either radians, sexigesimal RA, Dec or
     degrees.   All computations are double precision. 

 CALLING SEQUENCE:
      GCIRC, U, RA1, DC1, RA2, DC2, DIS

 INPUTS:
      U    -- integer = 0,1, or 2: Describes units of inputs and output:
              0:  everything radians
              1:  RAx in decimal hours, DCx in decimal
                       degrees, DIS in arc seconds 
              2:  RAx and DCx in degrees, DIS in arc seconds
      RA1  -- Right ascension or longitude of point 1
      DC1  -- Declination or latitude of point 1
      RA2  -- Right ascension or longitude of point 2
      DC2  -- Declination or latitude of point 2

 OUTPUTS:
      DIS  -- Angular distance on the sky between points 1 and 2
              See U above for units;  double precision  

 CALLED BY:
	DBCIRCLE [1], DBCIRCLE [2], SRCOR
 PROCEDURE:
      "Cosine formula" (p. 7 of Smart's Spherical Astronomy or
      p. 12 of Green's Spherical Astronomy)

 NOTES:
       (1) If RA1,DC1 are scalars, and RA2,DC2 are vectors, then DIS is a
       vector giving the distance of each element of RA2,DC2 to RA1,DC1.
       Similarly, if RA1,DC1 are vectors, and RA2, DC2 are scalars, then DIS
       is a vector giving the distance of each element of RA1, DC1 to 
       RA2, DC2.    If both RA1,DC1 and RA2,DC2 are vectors then DIS is a
       vector giving the distance of each element of RA1,DC1 to the 
       corresponding element of RA2,DC2.    If the input vectors are not the 
       same length, then excess elements of the longer ones will be ignored.

       (2) Coordinates closer together than a few milliarcsec cannot
       be distinguished.  If you are in this realm, you should be
       using special-purpose algorithms.

       (3) The function SPHDIST provides an alternate method of computing
        a spherical distance.

 PROCEDURE CALLS:
      None

   MODIFICATION HISTORY:
      Written in Fortran by R. Hill -- SASC Technologies -- January 3, 1986
      Translated from FORTRAN to IDL, RSH, STX, 2/6/87
      Vector arguments allowed    W. Landsman    April 1989
      Prints result if last argument not given.  RSH, RSTX, 3 Apr. 1998
      Remove ISARRAY(), V5.1 version        W. Landsman   August 2000
      Added option U=2                      W. Landsman   October 2006


GCNTRD $SSW/gen/idl_libs/astron/idlphot/gcntrd.pro
[Previous] [Next]
  NAME: 
       GCNTRD
  PURPOSE:
       Compute the stellar centroid by Gaussian fits to marginal X,Y, sums 
 EXPLANATION:
       GCNTRD uses the DAOPHOT "FIND" centroid algorithm by fitting Gaussians
       to the marginal X,Y distributions.     User can specify bad pixels 
       (either by using the MAXGOOD keyword or setting them to NaN) to be
       ignored in the fit.    Pixel values are weighted toward the center to
       avoid contamination by neighboring stars. 

  CALLING SEQUENCE: 
       GCNTRD, img, x, y, xcen, ycen, [ fwhm , /SILENT, /DEBUG, MAXGOOD = ,
                            /KEEPCENTER ]

  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.  GCNTRD 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 there are too many bad pixels,
       or if the best-fit Gaussian has a negative height.   If the centroid 
       cannot be computed, then a  message is displayed (unless /SILENT is 
       set) and XCEN and YCEN are set to -1.

  OPTIONAL OUTPUT KEYWORDS:
       MAXGOOD=  Only pixels with values less than MAXGOOD are used to in
               Gaussian fits to determine the centroid.    For non-integer
               data, one can also flag bad pixels using NaN values.
       /SILENT - Normally GCNTRD prints an error message if it is unable
               to compute the centroid.   Set /SILENT to suppress this.
       /DEBUG - If this keyword is set, then GCNTRD will display the subarray
               it is using to compute the centroid.
       /KeepCenter  By default, GCNTRD finds the maximum pixel in a box 
              centered on the input X,Y coordinates, and then extracts a new
              box about this maximum pixel.   Set the /KeepCenter keyword  
              to skip the step of finding the maximum pixel, and instead use
              a box centered on the input X,Y coordinates.                          
  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 Gaussian least-squares fit
       to the  marginal sums in the X and Y directions. 

 CALLS: ***
	IMLIST
  EXAMPLE:
       Find the centroid of a star in an image im, with approximate center
       631, 48.    Assume that bad (saturated) pixels have a value of 4096 or
       or higher, and that the approximate FWHM is 3 pixels.

       IDL> GCNTRD, IM, 631, 48, XCEN, YCEN, 3, MAXGOOD = 4096       
  MODIFICATION HISTORY:
       Written June 2004, W. Landsman  following algorithm used by P. Stetson 
             in DAOPHOT2.


GEN__DEFINE $SSW/gen/idl/objects/gen__define.pro
[Previous] [Next]
 Project     : HESSI

 Name        : GEN__DEFINE

 Purpose     : Define a GENeric object

 Category    : objects

 Explanation : This CLASS definition really only contains general methods
               that can be inherited by other objects

 Inputs      : None

 Outputs     : Generic object with COPY and EXTRACT methods

 CALLS: ***
	ADD_TAG [1], ADD_TAG [2], BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3]
	DATATYPE [1], DATATYPE [2], DATATYPE [3], DELVARX [1], DELVARX [2], DELVARX [3]
	DELVARX [4], EXIST, FILE_BREAK, GEN::CHECK_AND_SET, GEN::CLEANUP, GEN::EXTRACT2
	GEN::FBREAK, GEN::GETPROP, GEN::INIT, GEN::METHODS, GEN::PRIVATE, GET_DEBUG
	HAVE_TAG, IPRINT, OBJ_METHODS, REM_TAG [1], REM_TAG [2], REP_TAG_VALUE
	SAME_DATA [1], SAME_DATA [2], SINCE_VERSION [1], SINCE_VERSION [2], TRIM, TRIM2
	break_file [4], delvarx [5]
 History     : Written 14 Oct 1999, D. Zarro, SM&A/GSFC

 Contact     : dzarro@solar.stanford.edu


GEN_STRUCT [1] $SSW/gen/idl/fund_lib/yohkoh/gen_struct.pro
[Previous] [Next]
       NAME:
               GEN_STRUCT
       PURPOSE:
               Define the following general database structures
                       * Pointer_Rec              
                       * File_Header_Rec          
                       * QS_General1_Rec          
                       * GEN_Index_rec            
                       * GEN2_Index_rec            
                       * MO_Disk_Map_Rec
                       * MO_Disk_Log_Rec

       CALLING SEQUENCE:
               GEN_STRUCT
 CALLED BY:
	GET_SDA, MK_BSC_STR [1], MK_BSC_STR [2], Rd_Pointer [1], Rd_Pointer [2]
	Rd_fHeader [1], Rd_fHeader [2], Rd_fHeader [3], kluge_att, mk_att [1], mk_att [2]
	mk_evn [1], mk_evn [2], mk_fem_file [1], mk_fem_file [2], mk_gbl, mk_gev [1]
	mk_gev [2], mk_gsn_obs, mk_gx, mk_mo_log, mk_nar [1], mk_nar [2], mk_orb_file, mk_pnt
	mk_sd2, mk_sdl, mk_sl [1], mk_sl [2], mk_sot, mk_ssl, mk_sxc, mk_sxl, mk_week1_file
	mk_week_file [1], mk_week_file [2], pnt2atr, rd_obs, rd_old_obs, rd_roadmap [1]
	sav_bda, sav_bsc, sav_hxi, sav_sda [1], sav_sda [2], sav_sda [3], wrtsxtmap
       HISTORY:
               written by Mons Morrison, Fall 90.
                9-Mar-95 (MDM) - Added documentation comments 
                               - (Compression of the data section)


genx2html [1] $SSW/gen/idl/http/genx2html.pro
[Previous] [Next]
   Name: genx2html

   Purpose: convert a 'genx' file to an html file in a 'standard' format

   Calling Sequence:
      genx2html,genxfile [,outfile=outfile, httpdir=httpdir, thumbfact=N,/thumb]

   Input Parameters:
      genxfiles - one or more genx files to convert

   Keyword Parameters:
      outfiles -  if set, output filenames (default derived from genx name)
      thumbnail - if set, make thumbnail and link
      thumbfact - if set, scale factor for thumbnail
      maxthumb  - if set, scale thumbnail to this size (largest dimension)
      addlinks  - if set, filename to add a link to this image (uniq)

 CALLS: ***
	BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CONCAT_DIR [1], CONCAT_DIR [2]
	CONCAT_DIR [3], CONGRID [1], CONGRID [2], CONGRID [3], FILE_EXIST [2], WRITE_GIF
	break_file [4], concat_dir [4], data_chk [1], data_chk [2], file_append [1]
	file_append [2], file_exist [1], file_exist [3], file_size [1], file_size [2]
	get_logenv [1], get_logenv [2], rd_tfile [1], rd_tfile [2], restgen [1]
	restgen [2], str2html [1], str2html [2], str2html [3], str_replace [1]
	str_replace [2], ut_time [1], ut_time [2]
 CALLED BY:
	mk_pix [1], mk_pix [2]
   Restrictions:
       must define the parameters (pass keyword in or via environmental)
          top_http  -  top http path known to outside world
          path_http -  top http local disk name (for writing)
       optionally define subdirectories (may be relative)
          image_http - path to images (gif) created by this routine
          html_http  - path to html files created by this routines

	optionally, the address written at the end of the html file can
	be changed from the default (sxtwww@...) by setting the enviroment 
       variable "address_http" to the required string.
      
   History:
      3-Feb-1995 (SLF) - Written to convert show_pix images to gif/html
      6-Feb-1995 (SLF) - Added auto-scaling for thumbnail, ADDLINK keyword
			  and function (update a linked list)
      8-Feb-1995 (SLF) - Add text about full image file size
     13-Feb-1995 (SLF) - parameterized (site independent)
     29-mar-1995 (SLF) - remove <br>x around text
     29-mar-1995 (SLF) - break text formatting into str2html.pro
      7-jun-1995 (SLF) - increase min_col to str2html
     12-Jul-1995 (RDB) - added address_http changing of "address"
     31-aug-1995 (SLF) - add HEADER and TRAILER keywords
     19-dec-1995 (SLF) - fix ADDLINK bug
     22-apr-1996 (SLF) - add NOUPDATE switch
     13-Aug-2003, William Thompson, Use SSW_WRITE_GIF instead of WRITE_GIF


genx_head [1] $SSW/gen/idl/genutil/genx_head.pro
[Previous] [Next]
   Name: genx_head

   Purpose: define version dependent genx file header structures

   Input Parameters:
      version - genx file version number

   Output:
      function returns version dependent gen-file header structure

 CALLS: ***
	MAKE_STR [1], MAKE_STR [2]
 CALLED BY:
	WRT_GENX [1], WRT_GENX [2]
 History:
     ?? written
	RDB  21-Apr-95  modified version=2 so specific to IDLV3 !version


genx_newver [1] $SSW/gen/idl/genutil/genx_newver.pro
[Previous] [Next]
   Name: genx_newver

   Purpose: create new version of genx file - only updates genx header
	     and (optionally) text sections - original data is preserved

   Input Paramters:
      filename - file to convert (assume genx)
      newname  - name for new file (defaults to filename , ie replace orig)

   Keyword Paramters:
      newtext - optional string / strarray to append to existing text section
      verbose - if set, print some informational information

   Calling Sequence:
      genx_newver,filename		; replace existing file 
      genx_newver,filename, newname    ; make new file

   History - slf, 29-jan-1993		; 
 CALLS:


GEO2ECI $SSW/gen/idl_libs/astron/astro/geo2eci.pro
[Previous] [Next]
 NAME:
     GEO2ECI

 PURPOSE:
     Convert geographic spherical coordinates to Earth-centered inertial coords

 EXPLANATION:
     Converts from geographic spherical coordinates [latitude, longitude, 
     altitude] to ECI (Earth-Centered Inertial) [X,Y,Z] rectangular 
     coordinates.    JD time is also needed.

     Geographic coordinates are in degrees/degrees/km
     Geographic coordinates assume the Earth is a perfect sphere, with radius 
       equal to its equatorial radius.
     ECI coordinates are in km from Earth center.

 CALLING SEQUENCE:
       ECIcoord=geo2eci(gcoord,JDtime)

 INPUT:
       gcoord: geographic [latitude,longitude,altitude], or a an array [3,n] 
                of n such coordinates
       JDtime: Julian Day time, double precision. Can be a 1-D array of n 
               such times.

 KEYWORD INPUTS:
       None

 OUTPUT:
       a 3-element array of ECI [X,Y,Z] coordinates, or an array [3,n] of 
                n such coordinates, double precision   
       
 CALLS: ***
	CT2LST
 CALLED BY:
	GEOGRAPHIC2ECI
 COMMON BLOCKS:
       None

 PROCEDURES USED:
       CT2LST - Convert Local Civil Time to Local Mean Sidereal Time

 EXAMPLES:

       IDL> ECIcoord=geo2eci([0,0,0], 2452343.38982663D)
       IDL> print,ECIcoord
      -3902.9606       5044.5548       0.0000000

       (The above is the ECI coordinates of the intersection of the equator and
       Greenwich's meridian on 2002/03/09 21:21:21.021)

 MODIFICATION HISTORY:
       Written by Pascal Saint-Hilaire (shilaire@astro.phys.ethz.ch) 
             on 2002/05/14
               


GEO2GEODETIC $SSW/gen/idl_libs/astron/astro/geo2geodetic.pro
[Previous] [Next]
 NAME:
       GEO2GEODETIC

 PURPOSE:
       Convert from geographic/planetographic to geodetic coordinates
 EXPLANATION:
       Converts from geographic (latitude, longitude, altitude) to geodetic
       (latitude, longitude, altitude).  In geographic coordinates, the 
           Earth is assumed a perfect sphere with a radius equal to its equatorial 
               radius. The geodetic (or ellipsoidal) coordinate system takes into 
               account the Earth's oblateness.

       Geographic and geodetic longitudes are identical.
               Geodetic latitude is the angle between local zenith and the equatorial plane.
               Geographic and geodetic altitudes are both the closest distance between 
               the satellite and the ground.

       The PLANET keyword allows a similar transformation for the other 
       planets  (planetographic to planetodetic coordinates). 

       The EQUATORIAL_RADIUS and POLAR_RADIUS keywords allow the 
       transformation for any ellipsoid.

       Latitudes and longitudes are expressed in degrees, altitudes in km.

       REF: Stephen P.  Keeler and Yves Nievergelt, "Computing geodetic
       coordinates", SIAM Rev. Vol. 40, No. 2, pp. 300-309, June 1998

       Planterary constants from "Allen's Astrophysical Quantities", 
       Fourth Ed., (2000)

 CALLING SEQUENCE:
       ecoord=geo2geodetic(gcoord,[ PLANET=,EQUATORIAL_RADIUS=, POLAR_RADIUS=])

 INPUT:
       gcoord = a 3-element array of geographic [latitude,longitude,altitude],
                or an array [3,n] of n such coordinates.


 OPTIONAL KEYWORD INPUT:
       PLANET = keyword specifying planet (default is Earth).   The planet
                may be specified either as an integer (1-9) or as one of the
                (case-independent) strings 'mercury','venus','earth','mars',
                'jupiter','saturn','uranus','neptune', or 'pluto'
               
       EQUATORIAL_RADIUS : Self-explanatory. In km. If not set, PLANET's 
                value is used.
       POLAR_RADIUS : Self-explanatory. In km. If not set, PLANET's value is 
                used.

 OUTPUT:
      a 3-element array of geodetic/planetodetic [latitude,longitude,altitude],
        or an array [3,n] of n such coordinates, double precision.

 COMMON BLOCKS:
       None

 RESTRICTIONS:

       Whereas the conversion from geodetic to geographic coordinates is given
       by an exact, analytical formula, the conversion from geographic to
       geodetic isn't. Approximative iterations (as used here) exist, but tend 
       to become less good with increasing eccentricity and altitude.
       The formula used in this routine should give correct results within
       six digits for all spatial locations, for an ellipsoid (planet) with
       an eccentricity similar to or less than Earth's.
       More accurate results can be obtained via calculus, needing a 
       non-determined amount of iterations.
       In any case, 
          IDL> PRINT,geodetic2geo(geo2geodetic(gcoord)) - gcoord
       is a pretty good way to evaluate the accuracy of geo2geodetic.pro.

 EXAMPLES:

       Locate the geographic North pole, altitude 0., in geodetic coordinates
       IDL> geo=[90.d0,0.d0,0.d0]  
       IDL> geod=geo2geodetic(geo); convert to equivalent geodetic coordinates
       IDL> PRINT,geod
       90.000000       0.0000000       21.385000

       As above, but for the case of Mars
       IDL> geod=geo2geodetic(geo,PLANET='Mars')
       IDL> PRINT,geod
       90.000000       0.0000000       18.235500

 MODIFICATION HISTORY:
       Written by Pascal Saint-Hilaire (shilaire@astro.phys.ethz.ch), May 2002
       Generalized for all solar system planets by Robert L. Marcialis
               (umpire@lpl.arizona.edu), May 2002
       Modified 2002/05/18, PSH: added keywords EQUATORIAL_RADIUS and 
               POLAR_RADIUS


GEO2MAG $SSW/gen/idl_libs/astron/astro/geo2mag.pro
[Previous] [Next]
 NAME:
       GEO2MAG()

 PURPOSE:
       Convert from geographic to geomagnetic coordinates
 EXPLANATION:
       Converts from GEOGRAPHIC (latitude,longitude) to GEOMAGNETIC (latitude, 
       longitude).   (Altitude remains the same)

       Latitudes and longitudes are expressed in degrees.

 CALLING SEQUENCE:
       mcoord=geo2mag(gcoord)

 INPUT:
       gcoord = a 2-element array of geographic [latitude,longitude], or an 
                array [2,n] of n such coordinates.

 KEYWORD INPUTS:
       None

 OUTPUT:
       a 2-element array of magnetic [latitude,longitude], or an array [2,n] 
         of n such coordinates                     

 COMMON BLOCKS:
       None

 EXAMPLES:
       geographic coordinates of magnetic south pole

       IDL> mcoord=geo2mag([79.3,288.59])      
       IDL> print,mcoord
       89.999992      -173.02325

 MODIFICATION HISTORY:
       Written by Pascal Saint-Hilaire (Saint-Hilaire@astro.phys.ethz.ch), 
            May 2002
               


GEODETIC2GEO $SSW/gen/idl_libs/astron/astro/geodetic2geo.pro
[Previous] [Next]
 NAME:
       GEODETIC2GEO

 PURPOSE:
       Convert from geodetic (or planetodetic) to geographic coordinates
 EXPLANATION:
       Converts from geodetic (latitude, longitude, altitude) to geographic
       (latitude, longitude, altitude).  In geographic coordinates, the 
       Earth is assumed a perfect sphere with a radius equal to its equatorial 
       radius. The geodetic (or ellipsoidal) coordinate system takes into 
       account the Earth's oblateness.

       Geographic and geodetic longitudes are identical.
       Geodetic latitude is the angle between local zenith and the equatorial 
       plane.   Geographic and geodetic altitudes are both the closest distance
       between the satellite and the ground.

       The PLANET keyword allows a similar transformation for the other 
       planets  (planetodetic to planetographic coordinates). 

       The EQUATORIAL_RADIUS and POLAR_RADIUS keywords allow the 
       transformation for any ellipsoid.

       Latitudes and longitudes are expressed in degrees, altitudes in km.

       REF: Stephen P.  Keeler and Yves Nievergelt, "Computing geodetic
       coordinates", SIAM Rev. Vol. 40, No. 2, pp. 300-309, June 1998
       Planetary constants from "Allen's Astrophysical Quantities", 
       Fourth Ed., (2000)

 CALLING SEQUENCE:
       gcoord = geodetic2geo(ecoord, [ PLANET= ] )

 INPUT:
       ecoord = a 3-element array of geodetic [latitude,longitude,altitude],
                or an array [3,n] of n such coordinates.

 OPTIONAL KEYWORD INPUT:
       PLANET = keyword specifying planet (default is Earth).   The planet
                may be specified either as an integer (1-9) or as one of the
                (case-independent) strings 'mercury','venus','earth','mars',
                'jupiter','saturn','uranus','neptune', or 'pluto'

       EQUATORIAL_RADIUS : Self-explanatory. In km. If not set, PLANET's value
                is used.   Numeric scalar
       POLAR_RADIUS : Self-explanatory. In km. If not set, PLANET's value is 
                 used.   Numeric scalar

 OUTPUT:
       a 3-element array of geographic [latitude,longitude,altitude], or an
         array [3,n] of n such coordinates, double precision

       The geographic and geodetic longitudes will be identical.
 COMMON BLOCKS:
       None

 EXAMPLES:

       IDL> geod=[90,0,0]  ; North pole, altitude 0., in geodetic coordinates
       IDL> geo=geodetic2geo(geod)
       IDL> PRINT,geo
       90.000000       0.0000000      -21.385000

       As above, but the equivalent planetographic coordinates for Mars
       IDL> geod=geodetic2geo(geod,PLANET='Mars'); 
       IDL> PRINT,geod
       90.000000       0.0000000      -18.235500

 MODIFICATION HISTORY:
       Written by Pascal Saint-Hilaire (shilaire@astro.phys.ethz.ch),
                  May 2002

       Generalized for all solar system planets by Robert L. Marcialis
               (umpire@lpl.arizona.edu), May 2002

       Modified 2002/05/18, PSH: added keywords EQUATORIAL_RADIUS and 
                POLAR_RADIUS


GEOGRAPHIC2ECI $SSW/gen/idl/solar/geographic2eci.pro
[Previous] [Next]
 NAME:
       GEOGRAPHIC2ECI

 PURPOSE:
	Wrapper for the geo2eci.pro routine, for SSW users of the ANYTIM time format.

       Converts from geographic spherical coordinates [latitude, longitude, altitude]
	to ECI (Earth-Centered Inertial) [X,Y,Z] rectangular coordinates.
	A time is also needed.

	ECI coordinates are in km from Earth center.
	Geographic coordinates are in degrees/degrees/km
	Geographic coordinates assume the Earth is a perfect sphere, with radius equal to its equatorial radius.

 CALLING SEQUENCE:
       ECIcoord=geographic2eci(gcoord,time)

 INPUT:
	gcoord : the geographic coordinates [latitude,longitude,altitude], can be an array [3,n] of n such coordinates.
	time: in any ANYTIM format, can be a 1-D array of n such times.

 KEYWORD INPUTS:
	None

 OUTPUT:
	a 3-element array of ECI [X,Y,Z] (in km), or an array [3,n] of n such coordinates	

 CALLS: ***
	GEO2ECI, anytim [1], anytim [2], anytim [3], anytim [4], anytim [5]
 COMMON BLOCKS:
	None

 RESTRICTIONS:
       None

 EXAMPLE:

	IDL> ECIcoord=geographic2eci([0,0,0], '2002/03/09 21:21:21.021')
	IDL> print,ECIcoord
	-3902.9606       5044.5547       0.0000000

	(The above is the ECI coordinates of the intersection of the equator and Greenwitch's 
	meridien on 2002/03/09 21:21:21.021)


 MODIFICATION HISTORY:
	Written by Pascal Saint-Hilaire (Saint-Hilaire@astro.phys.ethz.ch) on 2001/05/14
		


get1doc [1] $SSW/gen/idl/genutil/get1doc.pro
[Previous] [Next]
 	NAME: get1doc 

	PURPOSE: extract subset of idl header info for display/verification  
		 this is a check of a two line purpose
		 third purpose line

	CALLING SEQUENCE: doc=get1doc(infile)

       Input Parameters:
          infile - file to extract - assume idl .pro file

       Optional Keyword Parameters:
          keep_key - if set, keywords from file are retained in the
		      tag value - default is to eliminate since the 
		      tag name contains relavent info. 
	   debug - if set, some programmer info is printed

	Output: 
	   function returns structure containing documentation info 
	   all fields are string type - null fields imply a particular
	   field is missing from the documentation header 

 CALLED BY:
	add_pro [1], add_pro [2], get_doc [1], get_doc [2], get_doc [3]
	Restrictions: unix only x 

	Category: gen, swmaint, unix_only

 CALLS: ***
	BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CONCAT_DIR [1], CONCAT_DIR [2]
	CONCAT_DIR [3], FILE_EXIST [2], MAKE_STR [1], MAKE_STR [2], STR_LASTPOS [1]
	break_file [4], concat_dir [4], curdir [1], curdir [2], file_exist [1]
	file_exist [3], str_lastpos [2], strposarr [1], strposarr [2]
	Common Blocks: get_doc_private, doc_strt

	Modification History: slf, 18-July-1992 
			      (derived from sw_head.pro)
			      slf,  9-Aug-1992	added print option
	12-Jun-97 (MDM) - Added "EXPL" (Explanation) to the list of
			  section separators


get_acedata $SSW/gen/idl/solar/get_acedata.pro
[Previous] [Next]
   Name: get_acedata

   Purpose: read/return ACE data for desired time range & cadence

   Input Paramters:
      time0, time1 - time range desired , any SSW format

   Output:
      function returns ACE data, utplot-ready time tags

   Keyword Parameters:
      /swepam, /epam, /mag, /sis - ACE instrument to read/return
      (default is /SWEPAM)

      daily - if set, use daily files (cadence one or five minutes)
      monthly - if set, use monthly files, cadence = 1 hour
      missing - if set, include missing sample points (def removes these)
      _extra - ACE data type (see current restrictions) - default=SWEPAM
      status - return status, =1 if ANY data in time range, 0 if NONE
      bad_data - include data flagged as missing/bad by ACE
                 (default only returns "perfect" data)
      keep_quality - if set, returned structures include the quality
                     flag (or flags) - this is default if /BAD_DATA is set
      /SWEPAM, /EPAM, /SIS, /MAG - which ACE instrument to read/return
      (historical default is SWEPAM)

   Calling Examples:
           get last 24 hours of data (cadence = 1 minute)
      IDL> acedata=get_acedata(reltime(/yest),reltime(/now),/daily,/swepam)

           long term data (cadence = 1 hour)
      IDL> acedata=get_acedata('1-jan-2001','1-mar-2001',/monthly,/epam)

 CALLED BY:
	plot_ace, ssw_getdst
   History:
      6-Sep-2001 - S.L.Freeland - for eit/sxt comparative studies, LWS
     26-Sep-2001 - S.L.Freeland - remove SWEPAM only restriction
                                  add /BAD_DATA switch and function

   Calls: ***
	BOX_MESSAGE, READ_ACE, ace_files, anytim [1], anytim [2], anytim [3], anytim [4]
	anytim [5], data_chk [1], data_chk [2], sel_timrange [1], sel_timrange [2]


GET_ANGLE $SSW/gen/idl/fund_lib/sdac/get_angle.pro
[Previous] [Next]
 Project     : SDAC   
                   
 Name        : GET_ANGLE
               
 Purpose     : This function returns the angle (degrees) between two vectors
		specified in spherical coordinates of an azimuthal angle
		and declination, usually right ascension and declination
               
 Category    : GEN, Coordinate Manipulations
               
 Explanation : The vectors are computed to Cartesian coordinates, their
		inner product taken, then the inverse cosine is used to 
		return the angle.
               
 Use         : Angle = GET_ANGLE( Radec1, Radec2 )
    
 Inputs      : Radec1 - Vector 1 right ascension and declination in degrees 
		Radec1 may be an array of vectors, dimensioned 2xN_elements
             : Radec2 - Vector 2 right ascension and declination in degrees 
               
 Opt. Inputs : None
               
 Outputs     : Returns the angle in degrees.

 Opt. Outputs: None
               
 Keywords    : 

 Calls       : ***
	SPHCART
 Common      : None
               
 Restrictions: 
               
 Side effects: None.
               
 Prev. Hist  : This was originally written as angle.pro in 1987 by RAS.

 Modified    : Version 1, RAS, 26-Dec-1996


GET_ARR_CENTER $SSW/gen/idl/mapping/get_arr_center.pro
[Previous] [Next]
 Project     : SOHO-CDS

 Name        : GET_ARR_CENTER

 Purpose     : compute center of input coordinates array

 Category    : imaging

 Syntax      : center=get_arr_center(array)

 Inputs      : ARRAY = 1 or 2d coordinate array

 Outputs     : CENTER = center coordinate value

 Keywords    : ERR = error string
               DX, DY = mean pixel spacing in x and y directions

 CALLS: ***
	EXIST, PR_SYNTAX
 CALLED BY:
	DROT_RASTER, GET_MAP_SPACE [1], GET_MAP_SPACE [2], GRID_MAP, MAKE_MAP, MK_CDS_IMAP
	MK_CDS_SMAP, MK_NEW_MAP, REPACK_MAP
 History     : Written 16 Feb 1998, D. Zarro, SAC/GSFC

 Contact     : dzarro@solar.stanford.edu


GET_ASPECT $SSW/gen/idl/display/get_aspect.pro
[Previous] [Next]
 NAME:
	GET_ASPECT

 PURPOSE:
	This function calculates and returns the normalized position
	coordinates necessary to put a plot with a specified aspect ratio
	into the currently active graphics window. It works on the display
	output window as well as in a PostScript output window.

 CATEGORY:
	Graphics

 CALLING SEQUENCE:

	position = GET_ASPECT(aspectRatio)

 INPUTS:
	aspectRatio: A floating point value that is the desired aspect
	ratio (ratio of heigth to width) of the plot in the current 
	graphics output window. If this parameter is missing, an aspect
	ratio of 1.0 (a square plot) is assumed.

 KEYWORD PARAMETERS:
	MARGIN:	The margin around the edges of the plot. The value must be
	a floating point value between 0.0 and 0.5. It is expressed in
	normalized coordinate units. The default margin is 0.15

       XRANGE,YRANGE: optional range of data coordinates. Must be
       two-element vectors.

 OUTPUTS:
	position: A four-element floating array of normalized coordinates.
	The order of the elements is [x0, y0, x1, y1], similar to the
	!P.POSITION system variable or the POSITION keyword on any IDL
	graphic command.

 CALLED BY:
	PLOT_MAP, PLOT_MAP2 WARNINGTEMPORARY FIX ONLY FOR 16 bit ZBuffer support
 EXAMPLE:
	To create a plot with an aspect ratio of 1:2 and a margin of
	0.10 around the edge of the output window, do this:

	   plotPosition = ASPECT(0.5, Margin=0.10)
	   PLOT, Findgen(11), POSITION=plotPosition
	
	Notice this can be done in a single IDL command, like this:
	
	   PLOT, Findgen(11), POSITION=ASPECT(0.5, Margin=0.10)

 MODIFICATION HISTORY:
 	Written by:	David Fanning, November 1996.
       Added better error checking, 18 Feb 97, DWF.
       Added XRANGE/YRANGE keywords to allow for skewed data ranges
        - Zarro (EIT/GSFC), 28 Jun 00


get_atomic [1] $SSW/gen/idl/spectra/get_atomic.pro
[Previous] [Next]
  NAME:
    get_atomic
  PURPOSE:
    Return a data structure with atomic data parameters 
    for requested BCS channel.
  CALLING SEQUENCE:
    ato_data = get_atomic(Chan)

    w_wave   = get_atomic(Chan,/w_wave)		; Return wavelength of w-line
    w_wave   = get_atomic(Chan,/z_wave)		; Return wavelength of z-line

  INPUTS:
    Chan	= BCS Channel Number or structure (Must be a scalar)
  OPTIONAL INPUT KEYWORDS:
    w_wave	= If set, only return the wavelength of the w line
		  Also, x_wave, y_wave, z_wave, q_wave, j_wave, k_wave
    atocal	= Def=Max value present.  Specifies alternative atomic calculation.
		  If atomic data file has already been read, and atocal is
		  NOT specified, then previously read data will be returned.

		  atocal=5 and chan=4 will cause susec5.dat to be read.
		  atocal=4 and chan=4 will cause susec4.dat to be read, etc.

    new	= If /new is set, forces a read of the file even if it has been
		  previously read.
  OUTPUTS:
    The functional result is structure containing the atomic data parameters
  METHOD:
    Reads ascii data files contained in $DIR_GEN_SPECTRA
    The files have the following names: susec3.dat, casec3.dat, fesec3.dat, f26sec3.dat

 CALLS: ***
	BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CONCAT_DIR [1], CONCAT_DIR [2]
	CONCAT_DIR [3], GT_BSC_CHAN [1], GT_BSC_CHAN [2], STR2ARR [1], STR2ARR [2]
	break_file [4], concat_dir [4], rd_atodat [1], rd_atodat [2], str_replace [1]
	str_replace [2]
 CALLED BY:
	bcs_broad [1], bcs_broad [2], bcs_funct, bcs_line, bcs_velres, bsc_bin2w, cal_bsc
  MODIFICATION HISTORY:
     7-oct-93, J. R. Lemen (LPARL), Written
     8-feb-94, JRL,  Changed the way the file name is specified via the atocal parameter
    11-mar-94, JRL,  Added x_wave,y_wave,z_wave,q_wave switches
    15-Mar-94, DMZ,  changed to avoid file search each time
    15-mar-94, JRL,  Additional changes to avoid file search
    23-mar-94, JRL,  Fix bug introduced by concat_dir for VMS
     2-jan-96, JRL,  Added the /new keyword.  Used for debugging purposes.


GET_CALLDETAILS $SSW/gen/idl/system/get_calldetails.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : GET_CALLDETAILS()
               
 Purpose     : Return details of calling program (at any stack depth)
               
 Explanation : The HELP,CALLS=CALLS utility is nice, but it's often a bit
               awkward to extract information.  This routine returns the
               information in a more edible form, as a structure:

               {GET_CALLDETAILS_STC,
                TEXT   : The full text of CALLS(DEPTH)
                MODULE : The procedure or function name of CALLS(DEPTH)
                FILE   : The source file for the procedure 
                LINENO : The line number of the calling statement
                DEPTH  : The depth used (default 2)
                TOTALDEPTH : The maximum possible depth allowed in this call} 
               
                Depth=0 means *this* program (GET_CALLDETAILS) 
                      1 means the caller of GET_CALLDETAILS
                      2 means the caller of the program calling 
                        GET_CALLDETAILS (DEFAULT)
                      3 means the caller of the caller of the program calling
                        GET_CALLDETAILS ... etc

 Use         : STC = GET_CALLDETAILS( [ DEPTH ] )
 
 Inputs      : None required

 Opt. Inputs : DEPTH : See Explanation

 Outputs     : Returns information structure.
               
 Opt. Outputs: None.
               
 Keywords    : None.

 Calls       : None.
 CALLED BY:
	INLINE_TEXT
 Common      : None.
               
 Restrictions: None.
               
 Side effects: None.
               
 Category    : General.
               
 Prev. Hist. : None.

 Written     : S.V.H.Haugan, UiO, 6 May 1998
               
 Modified    : Not yet.

 Version     : 1, 6 May 1998


GET_CALLER $SSW/gen/idl/system/get_caller.pro
[Previous] [Next]
 Project     : SOHO - CDS

 Name        : GET_CALLER

 Purpose     : Get name of caller routine

 Category    : Utility

 Explanation : Uses HELP,CALLS=CALLS to get name of routine calling
               current program.

 Syntax      : IDL> caller=get_caller(status)

 Inputs      : None.

 Opt. Inputs : None.

 Outputs     : CALLER = name of caller.

 Opt. Outputs: STATUS= 1 if one of the following conditions are met:
               -- caller routine is XMANAGER
               -- caller routine is calling itself recursively
               -- caller routine is an event handler of itself
               -- caller is blank

 Keywords    : PREV_CALLER = previous caller before caller
                             (confusing isn't it?)

 CALLS: ***
	DPRINT, TRIM
 CALLED BY:
	CHECK_KAP, CW_ANIMATE2, GET_POINTER, GE_WINDOW_SIM, IMAGE_TOOL, MAKE_POINTER
	MK_PLAN, MK_PLAN_CUSTOM, MK_PLAN_RECOVER, MK_SOHO_CUSTOM, MK_STUDY, PARSE_TIME
	PR_SYNTAX, RSTN__DEFINE, SITE__DEFINE, SPEX_GEN__DEFINE, XACK, XANSWER, XCALENDAR
	XCAMP, XCAT, XCDS_BOOK, XCHOICE, XCPT, XDOC, XIAP, XINPUT, XLIST, XMANAGER_RESET, XPORT
	XPROGRAM, XREPORT, XSEL_LIST [1], XSEL_LIST [2], XSET_VALUE, XSHOW_RASTER, XSTRUCT
	XSTUDY, XTEXT, XZOOM_PLAN, db_gbo, ethz_XCHOICE, get_history, ihy_db, update_history
 Common      : None.

 Restrictions: None.

 Side effects: None.

 History     : Version 1,  20-Aug-1996,  D.M. Zarro.  Written

 Contact     : DZARRO@SOLAR.STANFORD.EDU


GET_CENT_OFF $SSW/gen/idl/widgets/get_cent_off.pro
[Previous] [Next]
 Project     : SDAC

 Name        : GET_CENT_OFF

 Purpose     : determine pixel offsets for centering widget bases

 Use         : OFFSETS=GET_CENT_OFF(WBASE)

 Inputs      : WBASE = widget base id

 Opt. Inputs : GROUP = ID of group widget relative to which the
                       offset values are calculated

 Outputs     : OFFSETS=[XOFF,YOFF]

 Opt. Outputs: None.

 Keywords    : VALID = 1 if valid offsets found, 0 otherwise
               WSIZE = [xsize,ysize] of WBASE
               SCREEN = center relative to main screen

 Explanation :
               Useful for centering pop up text widgets.
               For example:
               if group base is defined as w1, then
               widget_control,w2,/realize,tlb_set_xoff=xoff,tlb_set_yoff=yoff
               will center w2 within w1.

 CALLS: ***
	XALIVE
 CALLED BY:
	GE_WINDOW_SIM, MK_SOHO_EDP, XGET_SYNOPTIC, XGET_UTC, XMESSAGE, XREALIZE, XSET_COLOR
	XSTRUCT
 Restrictions: WBASE must be valid otherwise [-1,-1] is returned

 Category    : Widgets

 Written     : Zarro (ARC/GSFC) 17 April 1995
 Modified    : Sandhia Bansal 05-Aug-2004.  Added a new 'nomap' keyword to delay
               the display of widget until later.
 Modified    : Zarro (L-3Com/GSFC) 13 August 2005 - Added CATCH


GET_COORDS $SSW/gen/idl_libs/astron/astro/get_coords.pro
[Previous] [Next]
 NAME:
       GET_COORDS

 PURPOSE:
       Converts a string with angular coordinates  to floating point values.  
 EXPLANATION:
       Although called by ASTRO.PRO, this is a general purpose routine.
       The user may input as floating point or sexigesimal.  If user inputs 
       calling procedure's job to convert hours to degrees if needed.
       Since the input string is parsed character-by-character, ANY character
       that is not a digit, minus sign or decimal point may be used as a 
       delimiter, i.e. acceptable examples of user input are:

       1:03:55 -10:15:31
       1 3 55.0 -10 15 31
       1*3 55              -10abcd15efghij31
       1.065278  hello   -10.25861

 CALLING SEQUENCE:
       GET_COORDS, Coords, [ PromptString, NumVals, INSTRING =, /QUIET ]

 OPTIONAL INPUT:
       PromptString - A string to inform the user what data are to be entered

 CALLED BY:
	ASTRO, PUTAST
 OPTIONAL KEYWORD INPUT:
       InString - a keyword that, if set, is assumed to already contain the
               input data string to be parsed.  If this keyword is set, then
               the user is not prompted for any input.
       /Quiet - if set the program won't printout any error messages, but bad
               input is still flagged by Coords=[-999,-999].

 OUTPUT:
       Coords - a 2 element floating array containing the coordinates.  The
               vector [-999,-999] is returned if there has been an error.

 OPTIONAL OUTPUT:
       NumVals - the number of separate values entered by the user:  2 if the
               user entered the coordinates as floating point numbers, 6 if 
               the user entered the coordinates as sexigesimal numbers.  Some
               calling procedures might find this information useful (e.g., to
               to print some output in the same format as the user's input).

 REVISION HISTORY:
       Written by Joel Parker, 5 MAR 90
       Included InString and Quiet keywords.  Cleaned up some of the code and
       comments.  JWmP,  16 Jun 94

*******************************************************************************
       Converted to IDL V5.0   W. Landsman   September 1997


get_correl_offsets $SSW/gen/idl/image/get_correl_offsets.pro
[Previous] [Next]
   Name: get_correl_offsets

   Purpose: calculate rigid displacement via cross-correlation 

   Input Paramters:
      data - image cube 

   Keyword Parameters:
      reference - image number of reference image (default is 1st = 0 )

 CALLED BY:
	align_cube_correl
   History:
      15-October-1998 - S.L.Freeland - Directly 'tr_get_disp' by Ted Tarbell
                        (using algorithm derived from B.Lin)
      Review/Distillation of SSW cross correlation techniques
      [One of several cross correl methods under SSW  - others include 
               'get_off.pro  G.L.Slater  
               'korrel.pro   J.P.Wuelser
               'cross_correl T. Berger 

 CALLS: ***
	HANNING, IS_IN_RANGE, data_chk [1], data_chk [2]
   Restrictions:
      Under review during review of 'best' cross corr methods
      Need to add CORR_FOV (permit user specified subfields)

   Category:
      2D , 3D, Image, Alignment , Cross Correlation, Cube
   


GET_DATE [1] $SSW/gen/idl/fits/get_date.pro
[Previous] [Next]
 NAME:
       GET_DATE
 PURPOSE:
       Return the (current) UTC date in CCYY-MM-DD format for FITS headers
 EXPLANATION:
       This is the format required by the DATE and DATE-OBS keywords in a 
       FITS header.

 CALLING SEQUENCE:
       GET_DATE, FITS_date, [ in_date, /OLD, /TIMETAG, LOCAL_DIFF=]
 OPTIONAL INPUTS:
       in_date - string (scalar or vector) containing dates in IDL
            systime() format (e.g. 'Tue Sep 25 14:56:14 2001')
 OUTPUTS:
       FITS_date = A scalar character string giving the current date.    Actual
               appearance of dte depends on which keywords are supplied.
       
       No Keywords supplied - dte is a 10 character string with the format
               CCYY-MM-DD where <CCYY> represents a calendar year, <MM> the
               ordinal number of a calendar month within the calendar year, 
               and <DD> the ordinal number of a day within the calendar month.
       /TIMETAG set - dte is a 19 character string with the format
               CCYY-MM-DDThh:mm:ss where <hh> represents the hour in the day,
                <mm> the minutes, <ss> the seconds, and the literal 'T' the 
               ISO 8601 time designator
       /OLD set - dte is an 8 character string in DD/MM/YY format

 INPUT KEYWORDS:
       /TIMETAG - Specify the time to the nearest second in the DATE format
       /OLD - Return the DATE format formerly (pre-1997) recommended for FITS
               Note that this format is now deprecated because it uses only
               a 2 digit representation of the year. 
       LOCAL_DIFF - numeric scalar giving the difference between local time
               and Greenwich Mean Time (GMT) in hours.   This keyword is only
               needed for non-Unix users prior to V5.4.  Unix users should not 
               use this keyword because under Unix (or since V5.4 with any OS),
               SYSTIME(1) returns the UTC (=GMT) time directly.
               Users on other machines must either supply a LOCAL_DIFF keyword,
               or use the TIME_CONV environment variable discussed below.    
               For example, a user on U.S. Eastern Standard Time should set 
               LOCAL_DIFF = -5
 CALLS: ***
	DAYCNV [1], DAYCNV [2], DAYCNV [3], MONTH_CNV
 CALLED BY:
	FITS_ADD_CHECKSUM, FXBHMAKE [1], FXBHMAKE [2], FXHMAKE [1], FXHMAKE [2]
	FXREAD [1], FXREAD [2], FXWRITE [1], FXWRITE [2], MKHDR [1], MKHDR [2], SXHMAKE
	SXMAKE
 EXAMPLE:
       Add the current date to the DATE keyword in a FITS header,h
     
       IDL> GET_DATE,dte
       IDL> sxaddpar, h, 'DATE', dte, 'Date header was created'
 ENVIRONMENT VARIABLE:
       An alternate method of inputing the difference between local and GMT 
       time for non-Unix machines is to specify this information in a file 
       named local_diff.dat in a directory specified with the environment 
       variable TIME_CONV.       For example, a user in EST should write -5 
       on this first (and only) line of this file.

 NOTES:
       (1) A discussion of the DATExxx syntax in FITS headers can be found in
       ftp://fits.cv.nrao.edu/fits/data/samples/year-2000/year2000.txt

       (2) Those who wish to use need further flexibility in their date 
       formats (e.g. to use TAI time) should look at Bill Thompson's time
       routines in http://sohowww.nascom.nasa.gov/solarsoft/gen/idl/time

 PROCEDURES USED:
       DAYCNV - Convert Julian date to Gregorian calendar date
 REVISION HISTORY:
       Written      W. Landsman          March 1991
       Major rewrite to write new DATExxx syntax  W. Landsman  August 1997
       Converted to IDL V5.0   W. Landsman   September 1997
       Work after year 2000 even with /OLD keyword W. Landsman January 2000
       Don't need to worry about TIME_DIFF since V5.4 W. Landsman July 2001


GET_DATE [2] $SSW/gen/idl_libs/astron/astro/get_date.pro
[Previous] [Next]
 NAME:
       GET_DATE
 PURPOSE:
       Return the (current) UTC date in CCYY-MM-DD format for FITS headers
 EXPLANATION:
       This is the format required by the DATE and DATE-OBS keywords in a 
       FITS header.  

 CALLING SEQUENCE:
       GET_DATE, FITS_date, [ in_date, /OLD, /TIMETAG ]
 OPTIONAL INPUTS:
       in_date - string (scalar or vector) containing dates in IDL
            systime() format (e.g. 'Tue Sep 25 14:56:14 2001')
 OUTPUTS:
       FITS_date = A scalar character string giving the current date.    Actual
               appearance of dte depends on which keywords are supplied.
       
       No Keywords supplied - dte is a 10 character string with the format
               CCYY-MM-DD where <CCYY> represents a calendar year, <MM> the
               ordinal number of a calendar month within the calendar year, 
               and <DD> the ordinal number of a day within the calendar month.
       /TIMETAG set - dte is a 19 character string with the format
               CCYY-MM-DDThh:mm:ss where <hh> represents the hour in the day,
                <mm> the minutes, <ss> the seconds, and the literal 'T' the 
               ISO 8601 time designator
       /OLD set - dte is an 8 character string in DD/MM/YY format

 INPUT KEYWORDS:
       /TIMETAG - Specify the time to the nearest second in the DATE format
       /OLD - Return the DATE format formerly (pre-1997) recommended for FITS
               Note that this format is now deprecated because it uses only
               a 2 digit representation of the year. 
 CALLS: ***
	DAYCNV [1], DAYCNV [2], DAYCNV [3], MONTH_CNV
 CALLED BY:
	FITS_ADD_CHECKSUM, FXBHMAKE [1], FXBHMAKE [2], FXHMAKE [1], FXHMAKE [2]
	FXREAD [1], FXREAD [2], FXWRITE [1], FXWRITE [2], MKHDR [1], MKHDR [2], SXHMAKE
	SXMAKE
 EXAMPLE:
       Add the current date to the DATE keyword in a FITS header,h
     
       IDL> GET_DATE,dte
       IDL> sxaddpar, h, 'DATE', dte, 'Date header was created'

 NOTES:
       (1) A discussion of the DATExxx syntax in FITS headers can be found in
       http://www.cv.nrao.edu/fits/documents/standards/year2000.txt

       (2) Those who wish to use need further flexibility in their date 
       formats (e.g. to use TAI time) should look at Bill Thompson's time
       routines in http://sohowww.nascom.nasa.gov/solarsoft/gen/idl/time

 PROCEDURES USED:
       DAYCNV - Convert Julian date to Gregorian calendar date
 REVISION HISTORY:
       Written      W. Landsman          March 1991
       Major rewrite to write new DATExxx syntax  W. Landsman  August 1997
       Converted to IDL V5.0   W. Landsman   September 1997
       Work after year 2000 even with /OLD keyword W. Landsman January 2000
       Don't need to worry about TIME_DIFF since V5.4 W. Landsman July 2001
       Assume since V5.4, remove LOCAL_DIFF keyword  W. Landsman April 2006


GET_DEF_PRINTER $SSW/gen/idl/system/get_def_printer.pro
[Previous] [Next]
 Name        : GET_DEF_PRINTER

 Purpose     : Get default printer from available printers

 Category    : system

 Explanation : 

 Syntax      : IDL> get_def_printer,printer

 Inputs      : None

 Opt. Inputs : None

 Outputs     : PRINTER = default printer name

 Opt. Outputs: None

 Keywords    : DEFAULT = default printer name
               DESC = description of printer
               SET  = set input printer to be last selected printer

 CALLS: ***
	DATATYPE [1], DATATYPE [2], DATATYPE [3], LIST_PRINTER, TRIM
 CALLED BY:
	XPS_SETUP, XSEL_PRINTER
 Common      : GET_DEF_PRINTER = last selected printer

 Restrictions: None

 Side effects: None

 History     : Version 1,  28 Feb 1997,  D.M. Zarro.  Written

 Contact     : DZARRO@SOLAR.STANFORD.EDU


get_def_times $SSW/gen/idl/time/get_def_times.pro
[Previous] [Next]
 Project     : HESSI

 Name        : get_def_times

 Purpose     : return default times

 Category    : HESSI, GBO, utility, time

 Explanation : If TSTART/TEND are not specified correctly, then
               return current time and end of current day
               as useful defaults

 Syntax      : IDL> dstart=get_def_times(tstart,tend,dend=dend)

 Opt. Inputs : TSTART = start time
               TEND   = end time

 Outputs     : DSTART = TSTART or current time if invalid TSTART (TAI format)

 Opt. Outputs: None

 Keywords    : DEND = TEND or end of current day if invalid TEND
               Inherits ANYTIM keywords
               ROUND_TIMES = round start/end to start/end of day
               NO_NEXT = don't include next day

 CALLS: ***
	ANYTIM2TAI, ANYTIM2UTC [1], ANYTIM2UTC [2], GET_UTC, TRIM, is_struct, vso_format
 CALLED BY:
	BBSO__DEFINE, CDS_ASRUN_POINT, CDS_PLAN_POINT, EIT_COPY, EIT__DEFINE, LAROBS_COPY
	PLOT_CDS_POINT [1], PLOT_CDS_POINT [2], RD_CDS_POINT, RD_GOES, TRACE_COPY
 History     : 14-Nov-1999,  D.M. Zarro (SM&A/GSFC),  Written
               22-Mar-2004, Zarro (L-3Com/GSFC) - added check for tend < tstart
               7-Apr-2004, Zarro (L-3Com/GSFC) - fixed bug that returned
                structure time instead of TAI (Sorry, Luis)
               12-Nov-2005, Zarro (L-3Com/GSFC) - added VSO output:
                yyyymmddhhmmss

 Contact     : DZARRO@SOLAR.STANFORD.EDU


GET_DFONT [1] $SSW/gen/idl/system/get_dfont.pro
[Previous] [Next]
 Project     : SOHO - CDS

 Name        :
	GET_DFONT()
 Purpose     :
       Return widget font with size compatible with current device
 Explanation :
	Useful for selecting fonts to fit into  widgets
 Use         :
	Result = GET_DFONT(UFONT)
 Inputs      :
       UFONT = user's optional input fonts (string array)
 Opt. Inputs :
	None.
 Outputs     :
            DFONT = returned fonts (string array)
 Prev. Hist. :
       Written Elaine Einfalt (HSTX) May 1992.
 Modified    :
       Version 1, Dominic Zarro, GSFC, 1 August 1994.
               Corrected some bugs
	Version 2, 23-Oct-1997, William Thompson, GSFC,
		Only select X device if on Unix or VMS.
		Call SELECT_WINDOWS
       Modified, 18-Jun-01, Zarro (EITI/GSFC) - added call to IS_WOPEN
       Modified, 10-Jul-02, Kim Tolbert - added branches for Windows

 CALLS:
 CALLED BY
	CHIANTI_NE, CHIANTI_TE, EIT_CATRD [1], EIT_DISPLAY, General_Menu [1]
	HESSI PARAMETER SELECTION TOOL [1], HESSI Spectrum [2], HESSI Spectrum [4]
	IMAGE_TOOL, ITOOL_PKFILE_BS, ITOOL_PTOOL, MDisp, MK_DFONT, MK_POINT_BASE, MK_RASTER
	MK_SOHO, MK_SOHO_CUSTOM, MK_SOHO_EDP, MK_SOHO_SBASE [1], MK_SOHO_SBASE [2]
	Move_Image, PICKFITS, POPUP_MSG, ROUTINE_NAME [4], ROUTINE_NAME [7]
	Radio Astronomy Group View RAG View [1]
	Radio Astronomy Group View RAG View [2], SCANPATH, SET_CURSOR_SHAPE
	SUMER_SEARCH, SUMER_TOOL, WIDG_HELP, XGET_SYNOPTIC, XGET_UTC, XMATRIX, XMESSAGE
	XTEXTEDIT, ch_ss, emiss_select, get_font


get_doc [1] $SSW/gen/idl/genutil/get_doc.pro
[Previous] [Next]
   Name: get_doc

   Purpose: retrieve a subset of idl header info. in a standard structure

   Input Parameters:
  	modules -  string or string array of idl module names

   Output Paramters:
     	function returns a vector of documentation structures
   
   Optional Keyword Parameters:
       quiet - if set, no output (just return documentation structures)
       summ  - if set, brief output (fmt_doc(doc_str)) - default
       full  - if set, full header is printed


   Method:
	calls get1doc for each element of modules

   Calling Sequence: docstrs=get_doc(modules)

 CALLS:


GET_DROT_DUR $SSW/gen/idl/mapping/get_drot_dur.pro
[Previous] [Next]
 Project     : SOHO-CDS

 Name        : GET_DROT_DUR

 Purpose     : compute durations (in seconds) to solar rotate a map

 Category    : imaging

 Explanation : cater for different types of inputs 

 Syntax      : dur=get_drot_dur(map,duration,time=time)

 Inputs      : MAP = time or map structure
               DURATION = amount to rotate by [def=hours units]

 Outputs     : DUR = duration in seconds

 Keywords    : TIME = time to rotate to (ignored if duration is input)
               DAYS = input duration units in days
             : SECONDS = input duration units in seconds
  
 CALLS: ***
	ANYTIM2TAI, EXIST, GET_MAP_TIME, PR_SYNTAX, VALID_MAP, anytim [1], anytim [2]
	anytim [3], anytim [4], anytim [5], is_struct
 CALLED BY:
	DROT_MAP, DROT_MAP_FAST, PLOT_MAP
	PLOT_MAP2 WARNINGTEMPORARY FIX ONLY FOR 16 bit ZBuffer support
 History     : Written 5 June 1998, D. Zarro, SAC/GSFC
               10 Jan 2005, Zarro (L-3Com/GSFC) - permitted zero duration

 Contact     : dzarro@solar.stanford.edu


get_edge_products $SSW/gen/idl/spectra/get_edge_products.pro
[Previous] [Next]
 Name: get_edge_products

 Purpose:  Wrapper around EDGE_PRODUCTS procedure to turn it into a function

 Category:  GEN  SPECTRA
 Method:
 GET_EDGE_PRODUCTS has the same arguments as EDGE_PRODUCTS, except that it
 treats the choices of different output types as boolean keywords, and just returns
 the one selected.
 See EDGE_PRODUCTS documentation for meaning of keyword arguments.

 CALLS: ***
	edge_products
 CALLED BY:
	HESSI MULTI IMAGE CLASS DEFINITION [1]
	HESSI MULTI IMAGE CLASS DEFINITION [2], PROFILES2, SPEX_GEN__DEFINE
	SPEX__DEFINE, XYPLOT__DEFINE, axis_get_edges, axis_get_limits, binning__define
	cw_energy_range, find_pixel_intersects, hsi_compute_image_axis, hsi_ui_ql
	spex_data__define
 Example:  To return the [low,high] boundaries for contiguous channels in array:
    result = get_edge_products(array, /edges_2)

 Written:  Kim Tolbert 26-Oct-2002


GET_EDGES $SSW/gen/idl/spectra/get_edges.pro
[Previous] [Next]
 Name: GET_EDGES

 Purpose: From a vector of contiguous channel boundaries return the
	commonly used quantities for plotting and scaling.

 Calling Sequence
	contiguous_edges = get_edges( [random_values], /contiguous )
	returns and ordered and vector with unique elements.
 Category:
	GEN, UTIL, SPECTRA

 Input: Edges -if 1d, contiguous channel boundaries, n+1 values for n channels
               if 2d, 2xn, [lo(i),hi(i)], etc., assumed contiguous for
		calculating edges_1

 Output:
	Mean - arithmetic mean of boundaries
       Gmean - geometric mean
	width - absolute difference between upper and lower edges
	edges_2 - 2xn array of edges [lo(i), hi(i)], etc.
       edges_1 - array of n+1 edges of n contiguous channels
	Keyword Inputs
	EPSILON - If the absolute relative difference is less than epsilon
	then two numbers are considered to be equal and a new bin is not required under
   the contiguous requirement.  If epsilon isn't passed but CONTIGOUS is set it
	attempts to construct an epsilon based on the average relative difference between
	adjacent bins, it takes that value and multiplies it by 1e-5 and limits that to
	1e-6
   CONTIGUOUS - force all edges to be contiguous, including edges_1

 Mod. History:

 8-dec-2001, richard.schwartz@gsfc.nasa.gov, made a function
	based on edge_products
 25-aug-2006, ras, added epsilon and default epsilon as test
	to differentiate real numbers. If the absolute relative difference is less than epsilon
	then two numbers are considered to be equal and a new bin is not required under
   the contiguous requirement
 CALLS:
 CALLED BY
	Energy_res [2], F_VTH, HESSI BINNED EVENTLIST CLASS DEFINITION
	HESSI FRAMEWORK TEMPLATE CLASS [2], HESSI FRAMEWORK TEMPLATE CLASS [3]
	HSI_DECIM_CORRECTION [1], HSI_DECIM_CORRECTION [2], HSI_DRM_MOD CLASS
	HSI_DRM_MOD_CONTROL__DEFINE, HSI_SPECTROGRAMACCBIN [5]
	HSI_SPECTROGRAMCHAN_OVERLAP_FIX, HSI_SPECTROGRAM_DECIM_CORRECT
	HSI_SPECTROGRAM_DECIM_TABLE, HSI_SPECTRUM__DEFINE, HSI_SRM_EXTEND_PH_ENERGY
	MK_CONTIGUOUS, Pileup_countrate_Build_Piler, Pileup_countrate_PULSE_CONVOLVE
	SOXS_CZT_DRM, SOXS_DRM, SPECTROGRAM CLASS DEFINITION
	SPECTRUM CLASS DEFINITION, SPEX_DRM__DEFINE, SPEX_GEN__DEFINE
	energy_res class, hsi_obs_summary__define [1], hsi_obs_summary__define [2]
	hsi_spectrogramACCBIN [2], hsi_spectrogram__define [1]
	hsi_spectrogram__define [2], hsi_spectrogram__define [3]
	hsi_spectrogram__get_obs [1], hsi_spectrogram__livetime [1], plotman
	read_hessi_4_ospex, read_hessi_4_spex [1], read_hessi_4_spex [2]
	read_hessi_fits_4_spex [1], read_hessi_fits_4_spex [2], read_soxs_4_ospex
	read_xsm_4_ospex, soxs_readfile, spex_bk__define, spex_data_strategy__define
	spex_nontherm_energy, spex_xsm_fits2drm


get_elemabun [1] $SSW/gen/idl/spectra/get_elemabun.pro
[Previous] [Next]
 NAME:
   get_elemabun
 PURPOSE:
   Return elemental abundances.  H = 1, He = (approx) .2, etc.
 CALLING SEQUENCE:
   abun = get_elemabun()		; Return default
   abun = get_elemabun(Num,info=info)	; info is an information string

 INPUTS:
   Num		= Number of the abundance values to use.  See data statements
		  below for the descriptions.
 OPTIONAL INTPUT KEYWORDS:
   verbose	= Give some information while running
 OPTIONAL OUTPUT KEYWORDS:
   Info	= Information string
    7-Oct-93, J. R. Lemen (LPARL), Written
 CALLS:
 CALLED BY
	bcs_line


GET_ENVIRON $SSW/gen/idl/system/get_environ.pro
[Previous] [Next]
 Project     :	SOHO - CDS

 Name        :	GET_ENVIRON()

 Purpose     :	Get environment variables.

 Category    :	

 Explanation :	In VMS, logical names can be either single valued or
		multi-valued.  This routine will use TRNLOG,/FULL to get the
		full translation of a logical name in VMS.  In other operating
		systems, GETENV is used instead.

 Syntax      :	Result = GET_ENVIRON( EVAR )

 CALLED BY:
	FIND_ZDBASE, FIX_ZDBASE, GOES_TF, GOES_TF_COEFF, MK_STUDY, SHOW_EVARS, XREPORT
	make_goes_chianti_response [1], make_goes_chianti_response [2]
	make_goes_chianti_response [3], make_goes_chianti_response [4]
 Examples    :	ZDBASE = GET_ENVIRON('ZDBASE')

 Inputs      :	EVAR	= The name of the environment variable.  It can start
			  with a $ to signal that it is a logical name, but
			  that isn't necessary.

 Opt. Inputs :	None.

 Outputs     :	The result of the function is the value of the environment
		variable.

 Opt. Outputs:	None.

 Keywords    :	PATH	= If set, then the value of the environment variable is
			  returned as a single delimited string, even if the
			  environment variable is multi-valued.  Ignored in
			  operating systems other than VMS.

 Calls       : ***
	OS_FAMILY
 Common      :	None.

 Restrictions:	None.

 Side effects:	None.

 Prev. Hist. :	None.

 History     :	Version 1, William Thompson, GSFC, 7 August 1996

 Contact     :	WTHOMPSON


GET_EQUINOX $SSW/gen/idl_libs/astron/astrom/get_equinox.pro
[Previous] [Next]
 NAME:
       GET_EQUINOX
 PURPOSE:
       Return the equinox value from a FITS header.  
 EXPLANATION:
       Checks for 4 possibilities:

       (1)  If the EQUINOX keyword is found and has a numeric value, then this
               value is returned
       (2)  If the EQUINOX keyword has the values 'J2000' or 'B1950', then
               either 2000. or 1950. is returned.
       (3)  If the EQUINOX keyword is not found, then GET_EQUINOX will return
               the EPOCH keyword value.   This usage of EPOCH is disparaged.
       (4)  If neither EQUINOX no EPOCH is found, then the RADECSYS keyword
               is checked.   If the value is 'ICRS' or 'FK5' then 2000 is
               is returned, if it is 'FK4' then 1950 is returned.

       According Calabretta & Greisen (2002, A&A, 395, 1077) the EQUINOX should
       be written as a numeric value, as in format (1).   However, in older 
       FITS headers, the EQUINOX might have been written using formats (2) or 
       (3).      
 CALLING SEQUENCE:
       Year = GET_EQUINOX( Hdr, [ Code ] )   

 INPUTS:
       Hdr - FITS Header, string array, will be searched for the EQUINOX
               (or EPOCH) keyword.

 OUTPUT:
       Year - Year of equinox in FITS header, numeric scalar
 OPTIONAL OUTPUT:
       Code - Result of header search, scalar
               -1 - EQUINOX, EPOCH or RADECSYS keyword not found in header
               0 - EQUINOX found as a numeric value
               1 - EPOCH keyword used for equinox (not recommended)
               2 - EQUINOX found as  'B1950'
               3 - EQUINOX found as  'J2000'
               4 - EQUINOX derived from value of RADECSYS keyword
                   'ICRS', 'FK5' ==> 2000,  'FK4' ==> 1950

 PROCEDURES USED:
       ZPARCHECK, SXPAR()
 REVISION HISTORY:                                               
       Written  W. Landsman        STX              March, 1991
       Converted to IDL V5.0   W. Landsman   September 1997
       Don't use !ERR          W. Landsman   February 2000
       N = 1 for check of EPOCH keyword, not 0 S. Ott July 2000
 CALLS:
 CALLED BY
	ATV, HASTROM, HPRECESS, IMDBASE, PUTAST, XYXY


GET_FID $SSW/gen/idl/time/get_fid.pro
[Previous] [Next]
 Project     : HESSI

 Name        : GET_FID

 Purpose     : determine YYMMDD names based on date/time 

 Category    : utility io 

 Syntax      : rdir=get_fid(tstart,tend)

 Inputs      : TSTART/TEND = start/end times to base search
               e.g. TSTART = 10-may-99 -> 990510
                    TEND   = 20-dec-99 -> 991220

 Outputs     : Array directory names 

 Keywords    : NO_DAY = exclude day from output
               FULL= include full year in output
               YEAR_ONLY = include year only
               DELIM = delimiter between year, month, & day

 CALLS: ***
	ANYTIM2TAI, ANYTIM2UTC [1], ANYTIM2UTC [2], APPEND_ARR, GET_UTC, TIME2FID
	VALID_TIME
 CALLED BY:
	HFITS__DEFINE, HSI_SOCK_FIND, HSI_SOCK_LIST, SITE__DEFINE, SOCK_FILES
 History     : Written 6 Jan 1999, D. Zarro (SM&A/GSFC)

 Contact     : dzarro@solar.stanford.edu


GET_FITS_CDELT $SSW/gen/idl/fits/get_fits_cdelt.pro
[Previous] [Next]
 Project     : SOHO, YOHKOH

 Name        : GET_FITS_CDELT

 Purpose     : Get FITS CDELT values from header

 Category    : imaging, FITS

 Explanation : Try to determine FITS scaling info

 Syntax      : get_fits_time,stc,time

 Inputs      : STC - FITS header in structure format (such as from HEAD2STC)

 Outputs     : CDELT1, CDELT2 - image pixel scaling

 Keywords    : TIME - optional image time (if already determined)
               ERR  - error message

 CALLS: ***
	ANYTIM2UTC [1], ANYTIM2UTC [2], GET_FITS_TIME, PB0R, PR_SYNTAX, REP_TAG_NAME
	gt_tagval [1], gt_tagval [2], is_struct
 CALLED BY:
	GET_FITS_CEN
 History     : Written, 15 November 1998, D.M. Zarro (SM&A)

 Contact     : dzarro@solar.stanford.edu


GET_FITS_CEN $SSW/gen/idl/fits/get_fits_cen.pro
[Previous] [Next]
 Project     : SOHO, YOHKOH

 Name        : GET_FITS_CEN

 Purpose     : Return XCEN and/or YCEN from FITS-like stucture

 Category    : imaging, FITS

 Explanation : 

 Syntax      : get_fits_cen,struct,xcen,ycen,dx,dy

 Inputs      : struct - FITS-like structure

 Opt. Inputs : None

 Outputs     : XCEN, (and/or YCEN) - center of FOV in data units

 Keywords    : TIME - optional time

 CALLS: ***
	ANYTIM2UTC [1], ANYTIM2UTC [2], APPEND_ARR, COMP_FITS_CEN, DPRINT, EXIST
	GET_FITS_CDELT, GET_FITS_TIME, HAVE_TAG, HEL2ARCMIN [1], HEL2ARCMIN [2], PR_SYNTAX
	gt_tagval [1], gt_tagval [2], is_struct
 History     : Written, 12 November 1998, D.M. Zarro (SM&A)
               Modified, 16 Sept 2001, Zarro (EITI/GSFC)
               -added check for non-zero XCEN/YCEN

 Contact     : dzarro@solar.stanford.edu


get_fits_extno $SSW/gen/idl/fits/get_fits_extno.pro
[Previous] [Next]
 NAME:
       get_fits_extno

 PURPOSE:
       To retrieve extension number(s) for extensions with given name(s).

 CATEGORY:
       I/O, FITS

 CALLING SEQUENCE:
       get_fits_extno, file_or_fcb, extname [, message=message]

 INPUTS:
       file_or_fcb - this parameter can be the FITS Control Block (FCB)
               returned by FITS_OPEN or the file name of the FITS file.
       extname - name of extension (string scalar or array)

 KEYWORD PARAMETERS:
		message = output error message

 CALLS: ***
	FITS_CLOSE, FITS_OPEN, where_arr [1], where_arr [2]
 CALLED BY:
	Energy_res [2], HESSI FRAMEWORK TEMPLATE CLASS [2]
	HESSI FRAMEWORK TEMPLATE CLASS [3], HSI_DRM_MOD CLASS
	HSI_DRM_MOD_CONTROL__DEFINE, HSI_QLOOK_SUMMARY_PAGE__DEFINE
	SPEX_READ_FIT_RESULTS, hsi_break_srm, hsi_filedb_read [1], hsi_filedb_read [2]
	hsi_qlook__define, hsi_test_files, read_hessi_4_ospex_params
 History:
	Written: Kim Tolbert 1-jun-2002


GET_FITS_INSTR $SSW/gen/idl/fits/get_fits_instr.pro
[Previous] [Next]
 Project     : HESSI

 Name        : GET_FITS_INSTR

 Purpose     : Return source of data (telescop, mission, or instrument) from FITS header

 Category    : FITS

 Explanation :

 Syntax      : instr = get_fits_instr(header)

 Inputs      : header - FITS header

 Opt. Inputs :
   file - Can pass in a file name instead of the header structure.  Ignores header argument
      in this case.  Looks in each extension of file for instrument, telescop or mission.

 Outputs     : String containing instrument (or telescop or mission).  Blank if not found.

 CALLS: ***
	FITS_INFO [1], FITS_INFO [2], FXPAR [1], FXPAR [2], MRDFITS [1], MRDFITS [2], TRIM
 CALLED BY:
	SPEX_DRM__DEFINE, spex_xsm_fits2drm
 History     : Written, Kim Tolbert 23-Apr-2003
  26-Aug-2004, Kim.  Use 'telescop' first, and don't use 'origin'
  19-Nov-2004, Kim.  Added file keyword.  And changed order so instrument is first.
  23-Jun-2005, Kim.  Added check for blank - keep looking if blank


GET_FITS_TIME $SSW/gen/idl/fits/get_fits_time.pro
[Previous] [Next]
 Project     : SOHO, YOHKOH

 Name        : GET_FITS_TIME

 Purpose     : Get FITS observation time from header

 Category    : imaging, FITS

 Explanation : Try to get FITS time from several formats

 Syntax      : get_fits_time,stc,time

 Inputs      : STC - FITS header in structure format (such as from HEAD2STC)

 Outputs     : TIME - time in UTC units

 Keywords    : ERR - error message
               CURRENT - set to default to current time

 CALLS: ***
	ANYTIM2TAI, ANYTIM2UTC [1], ANYTIM2UTC [2], GET_MONTH, GET_UTC, HAVE_TAG, IS_STRING
	PR_SYNTAX, TAG_EXIST [1], TAG_EXIST [2], TRIM, anytim [1],