BARYVEL $SSW/gen/idl_libs/astron/astro/baryvel.pro
[Previous] [Next]
 NAME:
       BARYVEL
 PURPOSE:
       Calculates heliocentric and barycentric velocity components of Earth.

 EXPLANATION:
       BARYVEL takes into account the Earth-Moon motion, and is useful for 
       radial velocity work to an accuracy of  ~1 m/s.

 CALLING SEQUENCE:
       BARYVEL, dje, deq, dvelh, dvelb, [ JPL =  ] 

 INPUTS:
       DJE - (scalar) Julian ephemeris date.
       DEQ - (scalar) epoch of mean equinox of dvelh and dvelb. If deq=0
               then deq is assumed to be equal to dje.
 OUTPUTS: 
       DVELH: (vector(3)) heliocentric velocity component. in km/s 
       DVELB: (vector(3)) barycentric velocity component. in km/s

       The 3-vectors DVELH and DVELB are given in a right-handed coordinate 
       system with the +X axis toward the Vernal Equinox, and +Z axis 
       toward the celestial pole.      

 OPTIONAL KEYWORD SET:
       JPL - if /JPL set, then BARYVEL will call the procedure JPLEPHINTERP
             to compute the Earth velocity using the full JPL ephemeris.   
             The JPL ephemeris FITS file JPLEPH.405 must exist in either the 
             current directory, or in the directory specified by the 
             environment variable ASTRO_DATA.   Alternatively, the JPL keyword
             can be set to the full path and name of the ephemeris file.
             A copy of the JPL ephemeris FITS file is available in
                 http://idlastro.gsfc.nasa.gov/ftp/data/
 PROCEDURES CALLED:
       Function PREMAT() -- computes precession matrix
       JPLEPHREAD, JPLEPHINTERP, TDB2TDT - if /JPL keyword is set
 NOTES:
       Algorithm taken from FORTRAN program of Stumpff (1980, A&A Suppl, 41,1)
       Stumpf claimed an accuracy of 42 cm/s for the velocity.    A 
       comparison with the JPL FORTRAN planetary ephemeris program PLEPH
       found agreement to within about 65 cm/s between 1986 and 1994

       If /JPL is set (using JPLEPH.405 ephemeris file) then velocities are 
       given in the ICRS system; otherwise in the FK4 system.   
 CALLS: ***
	DAYCNV [1], DAYCNV [2], DAYCNV [3], FIND_WITH_DEF [1], FIND_WITH_DEF [2]
	FIND_WITH_DEF [3], JPLEPHINTERP, JPLEPHREAD, PREMAT
 EXAMPLE:
       Compute the radial velocity of the Earth toward Altair on 15-Feb-1994
          using both the original Stumpf algorithm and the JPL ephemeris

       IDL> jdcnv, 1994, 2, 15, 0, jd          ;==> JD = 2449398.5
       IDL> baryvel, jd, 2000, vh, vb          ;Original algorithm
               ==> vh = [-17.07243, -22.81121, -9.889315]  ;Heliocentric km/s
               ==> vb = [-17.08083, -22.80471, -9.886582]  ;Barycentric km/s
       IDL> baryvel, jd, 2000, vh, vb, /jpl   ;JPL ephemeris
               ==> vh = [-17.07236, -22.81126, -9.889419]  ;Heliocentric km/s
               ==> vb = [-17.08083, -22.80484, -9.886409]  ;Barycentric km/s

       IDL> ra = ten(19,50,46.77)*15/!RADEG    ;RA  in radians
       IDL> dec = ten(08,52,3.5)/!RADEG        ;Dec in radians
       IDL> v = vb[0]*cos(dec)*cos(ra) + $   ;Project velocity toward star
               vb[1]*cos(dec)*sin(ra) + vb[2]*sin(dec) 

 REVISION HISTORY:
       Jeff Valenti,  U.C. Berkeley    Translated BARVEL.FOR to IDL.
       W. Landsman, Cleaned up program sent by Chris McCarthy (SfSU) June 1994
       Converted to IDL V5.0   W. Landsman   September 1997
       Added /JPL keyword  W. Landsman   July 2001
       Documentation update W. Landsman Dec 2005


BASE_INTERP $SSW/gen/idl/util/base_interp.pro
[Previous] [Next]
 Project     :	SOHO - CDS

 Name        :	BASE_INTERP()

 Purpose     :	Interpolate to the base of a curve, ignoring outliers.

 Category    :	Class4, Interpolation

 Explanation :	Makes a polynomial (by default linear) fit to the data, and
		removes any points which are far from the fit, before
		performing the interpolation.

 Syntax      :	Result = BASE_INTERP(Y, X, X0)

 Examples    :	

 Inputs      :	Y  = Array of Y values to interpolate to.
		X  = Array of positions corresponding to the Y array.
		X0 = Array of new positions to interpolate the array to.

 Opt. Inputs :	None.

 Outputs     :	The result of the function is the interpolated array.

 Opt. Outputs:	None.

 Keywords    :	WEIGHTS	= Array of weights to use in fitting the data.  The
			  default is to use equal weights for all points.
		MINSIG	= The minimum value of sigma to use in rejecting
			  points.  Points which are 2*SIGMA away from the
			  fitted curve are ignored.
		ORDER	= Polynomial order to fit to.  The default is 1.

 Calls       : ***
	INTERPOL, POLYFITW
 Common      :	None.

 Restrictions:	None.

 Side effects:	None.

 Prev. Hist. :	None.

 History     :	Version 1, 18-Jun-1996, William Thompson, GSFC
		Version 2, 11-Dec-1997, William Thompson, GSFC
			Don't perform fit unless there are enough points.

 Contact     :	WTHOMPSON


BASELINE $SSW/gen/idl/util/baseline.pro
[Previous] [Next]
 Project     :	SOHO - CDS

 Name        :	BASELINE()

 Purpose     :	Returns baseline value of the input array.

 Category    :	Class3, Analysis

 Explanation :	This function estimates the baseline value of the input array.
		This is determined by rejecting all points more than two sigma
		above the average value.  A reiteration is performed until no
		more points are rejected.

		Two assumptions are made about the data in deriving the
		baseline:

			1.  That any signal is above the baseline,
			    i.e. positive.

			2.  That some subset of points in the input array have
			    no signal, and fluctuate around the average
			    baseline value.

		Examples of the use of this routine include removing readout
		bias levels from CCDs, and removing film fog levels from
		microdensitometered data.

 Syntax      :	Result = BASELINE( ARRAY  [, A_SIG ])

 CALLED BY:
	GET_VDS_BIAS
 Examples    :	ARRAY = ARRAY - BASELINE(ARRAY)

 Inputs      :	ARRAY = An input array of values.

 Opt. Inputs :	None.

 Outputs     :	The result of the function is the baseline value.  This is a
		single scalar value.  This routine cannot be used for data
		with a varying (e.g. linear) baseline.

 Opt. Outputs:	A_SIG	= The standard deviation of the points used to
			  calculate the baseline value.

 Keywords    :	MISSING	= Value flagging missing pixels.  These points are not
			  used to calculate the baseline.  If all the points
			  have this value, then it is returned as the value of
			  the function.

 Calls       : ***
	AVERAGE, STDEV, WHERE_NOT_MISSING
 Common      :	None.

 Restrictions:	None.

 Side effects:	None.

 Prev. Hist. :	Originally written for the SERTS project.

 History     :	Version 1, 22-Jan-1996, William Thompson, GSFC.
			Incorporated into CDS library
			Added MISSING keyword.
		Version 2, 18-Feb-1996, William Thompson, GSFC
			Fixed bug with A_SIG when all values are missing.
		Version 3, 05-Apr-1996, William Thompson, GSFC
			Fixed bug with A_SIG when there is only one valid
			pixel.
               Version 4, 11-May-2005, William Thompson, GSFC
                       Handle NaN values

 Contact     :	WTHOMPSON


BBSO__DEFINE $SSW/gen/idl/synoptic/bbso__define.pro
[Previous] [Next]
 Project     : HESSI

 Name        : BBSO__DEFINE

 Purpose     : Define a BBSO data object

 Category    : Ancillary GBO Synoptic Objects

 Syntax      : IDL> c=obj_new('bbso')

 CALLS: ***
	ADD_TAG [1], ADD_TAG [2], ANYTIM2TAI, ANYTIM2UTC [1], ANYTIM2UTC [2]
	BBSO::CLEANUP, BBSO::GET_SDIR, BBSO::INDEX2FITS, BBSO::INIT, BBSO::LIST_VSO
	BBSO::SETPROP, BBSO::SYNOP, DATATYPE [1], DATATYPE [2], DATATYPE [3], FILE_BREAK
	GET_UTC, HAVE_TAG, REP_TAG_VALUE, VALID_TIME, VSO_SEARCH, get_def_times, is_struct
	synop_link
 History     : Written 7 June 2000, D. Zarro, EIT/GSFC

 Contact     : dzarro@solar.stanford.edu


Bell $SSW/gen/idl/util/bell.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : Bell
               
 Purpose     : To ring the terminal bell a specified number of times.
               
 Explanation : Prints ascii code for the terminal bell.
               
 Use         : IDL> bell, n
    
 Inputs      : n   -  number of bell rings required  
               
 Opt. Inputs : As above
               
 Outputs     : None
               
 Opt. Outputs: None
               
 Keywords    : None

 Calls       : None
 CALLED BY:
	BCS_ADDGOES, BCS_CREATE_CAT, BCS_FREE_DATA, BCS_LOAD_CAT, BELLS, BOX_AV, BP_SEEK_POS
	CALC_DMM_DR, CALC_DMM_TR, CAL_DETSELECT, CANCEL_PRELIM, CAT_DURATION, CAT_FITS
	CDSLOG, CDSNOTIFY, CDS_SLINE, CHIANTI_NE, CHIANTI_TE, CONCAT_DIR [1], CONCAT_DIR [2]
	CONCAT_DIR [3], CONNECT, COVER_PAGE [1], COVER_PAGE [2], DASH_LINE
	DELETE_FILE [1], DELETE_FILE [2], DETSELECT, DSPEXP, DSPWAV, FILE_EXIST [2]
	FILL_CATEGORY, FILL_TFTD, FIX_LINELIST, FLASH_MSG, GET_WAVECAL, GHOST_BUSTER
	GIS_HV_CAL, GT_DURATION, HEADCAT, ITOOL_RD_FITS, LIST_FITS, LIST_TM, LOAD_TP_STRUCT
	MAX_TEMP, MK_RASTER, MK_WAVECAL, MODE_VAL, MONO_SPEC, NDSPSPEC, NIS_CALIB
	PICK_CAN_PRELIM, PICK_LINE, PIX2WAVE, PLOT_IONEQ, PRINT_STR, QL_RD_LLIST, RASTER_DUR
	RD_IMAGE_FITS, RD_LINE_LIST, ROUND_OFF, SEL_LINE_EVENT, SHOW_CDHS, SHOW_EVARS
	SHOW_LINELIST, SHOW_RASTER, SHOW_STUDY, SORT_WINDOWS, SUMDETSELECT, TP_DISP_IEF
	TP_GET_DUMDATA, TP_PLOT_GIS, TP_RECALC_DEW, TP_VWIN_LOGIC, TP_WRT_DWIN
	TP_WRT_LLIST, UPDATE_DEX, UPDATE_RAS_DUR, UPDATE_STUDY_DUR, UPD_PLAN, UPD_SOHO_DET
	WAVE2PIX, WHICH_GIS_BAND, WHICH_NIS_BAND, XACK, XANSWER, XFLOW_DIAG [1]
	XGET_SYNOPTIC, YES_NO, ch_ss, concat_dir [4], disk2_mo [1], disk2_mo [2], dsp_menu
	file_exist [1], file_exist [3], mk_mo_disk2, wrttcplog, xflow_diag [2]
 Restrictions: None
               
 Side effects: Noise
               
 Category    : Utilities, user
               
 Prev. Hist. : None

 Written     : C D Pike, RAL,  31 March 1993
               
 Modified    : 

 Version     : Version 1


BELLS $SSW/gen/idl/fitting/bells.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : BELLS()
               
 Purpose     : Fits bell splines to data array.
               
 Explanation : Provides a flexible way to 'draw' a curve through a set of 
               data.  The interpolating line's tautness is controlled by the
               number of splines fitted.
               
 Use         : IDL> yapprox = bells(x,y,xapprox,nspline)
    
 Inputs      : x,y - data arrays
               xapprox - x values at which data are to be approximated (can
                         be same array as x.
               nspline - number of splines to fit, small number = taut string
               
 Opt. Inputs : None
               
 Outputs     : Function returns approximated values at xapprox
               
 Opt. Outputs: None
               
 Keywords    : None

 Calls       : ***
	Bell, spl_func
 Common      : None
               
 Restrictions: None
               
 Side effects: None
               
 Category    : Data analysis
               
 Prev. Hist. : From an old Yohkoh routine from an older C program which 
               was copied from an even older Fortran program by J Bok of the 
               Institute of Physics, The Charles University, Prague.

 Written     : C D Pike.  RAL, 22-Nov-96
               
 Modified    : 6-Jul-2004.  Fixed typo in array dimension.  CDP 

 Version     : Version 2, 6-Jul-2004


bessel_trans $SSW/gen/idl/image/bessel_trans.pro
[Previous] [Next]
 PURPOSE:
 \int_0^{infty} f(k) J_0(kr) k dk

 the vector f  is assumed to span a subinterval k of (0,\infty)
 and is assumed to vanish outside that interval.
 No checking is done to see if f is too coarsely sampled

INPUTS:
 k=wavenumber array
 f=function(k) to be transformed
 r=radius (scalar)

 outputs:
 \int_0^{infty} f(k) J_0(kr) k dk

 CALLED BY:
	hsi_bproj2size
 EXAMPLE:
 k=findgen(1024)/512.
 a=5.
 f=exp(-0.5*(k*a)^2)
 the transform should equal const*exp(-0.5*(r/a)^2)

 jt=fltarr(1024)
 r=findgen(1024)*20/1024.
 for j=0,1023 do jt(j)=bessel_trans(f,k,r[j])
 jt=jt/jt[0]
 plot,r,exp(-.5*(r/a)^2)-jt  ; should be small (< 1.e-5)

 HISTORY
 EJS aug 2002, Oct 2002  schmahl@hessi.gsfc.nasa.gov


BGAUSS $SSW/gen/idl/fitting/bgauss.pro
[Previous] [Next]
 Project     : SOHO-CDS
    
 Name        : BGAUSS

 Purpose     : Compute multiple CDS broadened gauss functions with quadratic background

 Explanation : Program checks no. of elements in a, of which there must
               at least 6. First three elements define background. Remaining
               elements define broadened gauss function(s) which must come in 
               multiples of 3

 Category    : fitting

 Syntax      : f=bgauss(x,a,pder)

 Inputs      : x = dependent variable
               a(0,1,2)=coefficients of quadratic background
               a(3)= line intensity
               a(4)= line center
               a(5)= Doppler width = sqrt(2) * Gaussian width

 Outputs     : f = 'n' broadened gauss functions + quadratic background

 Opt Outputs : pder = partial derivatives wrt 'a'

 Keywords    : NIS = output value of 1 or 2 signalling if NIS1 or NIS2

 CALLS: ***
	COMP_BGAUSS, EXIST
 CALLED BY:
	GAUSS_FIT
 History     : Version 1,  13-Sept-1999,  D M Zarro.  Written

 Contact     : DZARRO@SOLAR.STANFORD.EDU


BIGPICKFILE $SSW/gen/idl/system/bigpickfile.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : BIGPICKFILE
               
 Purpose     : Pickfile, but with more space for everything.
               
 Explanation : See below.
               
 Use         : See below.
    
 Inputs      : See below.
 
 Opt. Inputs : See below.
               
 Outputs     : See below.
               
 Opt. Outputs: See below.
               
 Keywords    : See below.

 Calls       : ***
	GETDIRS, GETFILES, OS_PICKFILE, PICKFILE, PICKFILE_EV, SINCE_VERSION [1]
	SINCE_VERSION [2], VALID_DIR, XDISPLAYFILE [1], XDISPLAYFILE [2], XMANAGER
	XREGISTERED
 CALLED BY:
	MAKE_CHIANTI_SPEC, PICKFILE, RESTORE_ANALYSIS, RESTORE_CDS_ADEF, SAVE_ANALYSIS
	SAVE_CDS_ADEF, XCFIT_BLOCK, ch_ss
 Common      : See below.
               
 Restrictions: See below.
               
 Side effects: See below.
               
 Category    : See below.
               
 Prev. Hist. : See below.

 Written     : See below.
               
 Modified    : Version 1, SVH Haugan, 15 September 1997
                       Made bigger fields.
               Version 2, SVHH, 15 December 1997
                       IDL version 5 fix - will call pickfile for 5.0
                       or later.

 Version     : 2, 15 December 1997


BIN2DEC $SSW/gen/idl/util/bin2dec.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : BIN2DEC
               
 Purpose     : Convert binary representation to decimal integer.
               
 Explanation : The binary representation of a decimal number is converted
               to a decimal integer and can be displayed or returned or 
               both or neither.
               
 Use         : IDL> bin2dec, binary [, decimal, /quiet]
    
 Inputs      : binary - the binary representation to convert. It can either
                        be a string of zeros and ones or an array with each
                        element a zero or one.
                        eg bin2dec,'01010101'    or
                           bin2dec,['1','0','1','0','1','0','1','0']    or
                           bin2dec,[1,0,1,0,1,0,1,0]
                        The MSB is assumed to come first

 Opt. Inputs : None
               
 Outputs     : See below
               
 Opt. Outputs: decimal - the decimal integer equivalent of the input.
               
 Keywords    : quiet - unless given the decimal number is printed to the
                       terminal

 Calls       : ***
	DATATYPE [1], DATATYPE [2], DATATYPE [3], REVERSE
 CALLED BY:
	BIN2HEX
 Restrictions: Input must be a string or an array of integers or strings.
               
 Side effects: None
               
 Category    : Utils, Numerical
               
 Prev. Hist. : None

 Written     : C D Pike, RAL, 7-Oct-93
               
 Modified    : 

 Version     : Version 1, 7-Oct-93


BIN2HEX $SSW/gen/idl/util/bin2hex.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : BIN2HEX
               
 Purpose     : Convert binary representation to hexadecimal.
               
 Explanation : The binary representation of a decimal number is converted
               to hexadecimal and can be displayed or returned or 
               both or neither.
               
 Use         : IDL> bin2hex, binary [, hex, nchar=nchar, /quiet, /upper]
    
 Inputs      : binary - the binary representation to convert. It can either
                        be a string of zeros and ones or an array with each
                        element a zero or one.
                        eg bin2hex,'01010101'    or
                           bin2hex,['1','0','1','0','1','0','1','0']    or
                           bin2hex,[1,0,1,0,1,0,1,0]
                        The MSB is assumed to come first

               nchar  - the number of characters in the hex format.

 Opt. Inputs : None
               
 Outputs     : See below
               
 Opt. Outputs: hex - the hexadecimal equivalent of the input.
               
 Keywords    : quiet - unless given the hexadecimal number is printed to the
                       terminal

               upper - convert output to upper case else given in lower case

 Calls       : ***
	BIN2DEC, DEC2HEX
 Restrictions: Input must be a string or an array of integers or strings.
               
 Side effects: None
               
 Category    : Utils, Numerical
               
 Prev. Hist. : None

 Written     : C D Pike, RAL, 7-Oct-93
               
 Modified    : Add /upper keyword, CDP, 20-Dec-93

 Version     : Version 2, 20-Dec-93


binup $SSW/gen/idl/image/binup.pro
[Previous] [Next]
 NAME:
	binup
 PURPOSE:
	to rebin data into arbitrary dimensions
 CATEGORY:
       utility
 CALLING SEQUENCE:
	b=binup(a,m1,m2,m3,m4...m10)
 INPUTS:
	a= multidimension array
       m_i = factor by which to rebin i'th dimension
 OPTIONAL INPUT PARAMETERS:
       none
 OUTPUTS:
	rebinned array
 OPTIONAL OUTPUT PARAMETERS:
       none
 CALLED BY:
	FTEMAP, PLOTSPEC, PLOT_SPEC [1], WBSC_LTC_EV [1], WBSC_LTC_EV [2], bust
 SIDE EFFECTS:
       none    
 RESTRICTIONS:
      dimensions of input array must not be greater than 10
 PROCEDURE:
       Uses REBIN function , improved to allow non-integer binning
       e.g. if a=a(n1,n2,n3) then
             b=binup(a,m1,m2,m3) = a(n1*m1,n2*m2,n3*m3) if m > 1
                                 = a(n1/m1,n2/m2,n3/m3) if m <-1
             b=binup(a,2) will increase first dimension by 2
             b=binup(a,-2) will decrease first dimension by 2 (i.e. double bin)
 MODIFICATION HISTORY:
	Written by DMZ (ARC) July 1990


bits [1] $SSW/gen/idl/genutil/bits.pro
[Previous] [Next]
NAME:
	bits
PURPOSE:
	Given a byte or integer, return a vector of 8 or 16 values
	which are the binary representation of the value.
INPUT:
	invalue	- The byte or integer value to check
OUTPUT:
	bitarr	- The 8-element array with values set
		  if the bit is set
 CALLS: ***
	REVERSE
 CALLED BY:
	BSC_FIELD, DISCSC_PL, MK_BSC_STR [1], MK_BSC_STR [2], MK_MER_CONT, READ_DISCSC
	cal_fig_mich, checksum, convert_hk [1], convert_hk [2], hxt_unpack_grause
	mk_ascii_list, mk_timarr [1], mk_timarr [2], mon_health [1], mon_health [2]
	plottimes [1], plottimes [2], pr_hk_info [1], pr_hk_info [2], read_chanmask [1]
	read_chanmask [2], sav_bsc, set_list_addr, spex_batse_preview [1]
	spex_batse_preview [2], unpack_grause
HISTORY:
	Written 1988 by M.Morrison
	13-Nov-92 (MDM) - Modified to allow integer*2 values
			  and to allow an array of values.
	 7-Apr-94 (MDM) - Allow integer*4 values
	15-Aug-94 (MDM) - Corrected error from 7-Apr-94 mod which
			  did not allow an array of inputs


bits2 $SSW/gen/idl/fund_lib/sdac/bits2.pro
[Previous] [Next]
NAME:
	bits2
PURPOSE:
	Given a byte or integer, return a vector of 8 or 16 values
	which are the binary representation of the value.
INPUT:
	invalue	- The byte or integer value to check
OUTPUT:
	bitarr	- The 8-element array with values set
		  if the bit is set
 CALLS: ***
	DATATYPE [1], DATATYPE [2], DATATYPE [3]
 CALLED BY:
	OCC_FROM_FITS, hsi_data_header_pack, hsi_data_header_unpack
HISTORY:
	Written 19-dec-1996, RAS after BITS by M.Morrison
	but correcting negative integer problems and returning
	32 byte arrays for longwords regardless of maximum value
	17-feb-2001 loop index long.
	


BIWEIGHT_MEAN $SSW/gen/idl_libs/astron/robust/biweight_mean.pro
[Previous] [Next]
 NAME:
	BIWEIGHT_MEAN 

 PURPOSE:
	Calculate the center and dispersion (like mean and sigma) of a 
	distribution using bisquare weighting.

 CALLING SEQUENCE:
	Mean = BIWEIGHT_MEAN( Vector, [ Sigma, Weights ] ) 

 INPUTS:
	Vector = Distribution in vector form

 OUTPUT:
	Mean - The location of the center.

 OPTIONAL OUTPUT ARGUMENTS:

	Sigma = An outlier-resistant measure of the dispersion about the 
	      center, analogous to the standard deviation. 

	Weights = The weights applied to the data in the last iteration, 
                 floating point vector

 NOTES:
       Since a sample mean  scaled by sigma/sqrt(N), has a Student's T 
       distribution, the half-width of the  95% confidence interval for 
       the sample mean  can be determined as follows: 
          ABS( T_CVF( .975, .7*(N-1) )*SIGMA/SQRT(N) ) 
       where N = number of  points, and  0.975 = 1 - (1 - 0.95)/2. 
 PROCEDURES USED:
       ROBUST_SIGMA()
 REVISION HISTORY
	Written,  H. Freudenreich, STX, 12/89
	Modified 2/94, H.T.F.: use a biweighted standard deviation rather than
		median absolute deviation.
	Modified 2/94, H.T.F.: use the fractional change in SIGMA as the 
		convergence criterion rather than the change in center/SIGMA.
       Modified May 2002  Use MEDIAN(/EVEN)
       Modified October 2002, Faster computation of weights 
       Corrected documentation on 95% confidence interval of mean 
                 P.Broos/W. Landsman   July 2003 
 CALLS:
 CALLED BY
	HISTOGAUSS


BLANK $SSW/gen/idl/string/blank.pro
[Previous] [Next]
 PROJECT:
       SOHO - CDS

 NAME:
       BLANK()

 PURPOSE:
       To make a blank string with a given length

 EXPLANATION:

 CALLING SEQUENCE:
       Result = blank(length)

 INPUTS:
       LENGTH - length of resultant string; if missing a null string is
                returned 

 OPTIONAL INPUTS:
       None.

 OUTPUTS:
       None.

 OPTIONAL OUTPUTS:
       None.

 KEYWORD PARAMETERS:
       None.

 CALLS:
	None.
 CALLED BY:
	EIS_IMAGE_TOOL [1], EIS_IMAGE_TOOL [2], IMAGE_TOOL, JUSTIFY, PLOT_FRAME
	PLOT_UTFRAME, eis_timeline_plot_gui [1], eis_timeline_plot_gui [2]
 COMMON BLOCKS:
       None.

 RESTRICTIONS:
       None.

 SIDE EFFECTS:
       None.

 CATEGORY:
       Util, string

 PREVIOUS HISTORY:
       Written April 12, 1995, Liyun Wang, GSFC/ARC

 MODIFICATION HISTORY:
       Version 1, created, Liyun Wang, GSFC/ARC, April 12, 1995

 VERSION:
       Version 1, April 12, 1995


BLINK $SSW/gen/idl_libs/astron/tv/blink.pro
[Previous] [Next]
 NAME:
	BLINK
 PURPOSE:
	To allow the user to alternatively examine two or more windows within
	a single window.

 CALLING SEQUENCE:
	BLINK, Wndw [, T]

 INPUTS:
	Wndw  A vector containing the indices of the windows to blink.
	T     The time to wait, in seconds, between blinks.  This is optional
	      and set to 1 if not present.  

 OUTPUTS:
	None.

 CALLED BY:
	ALIGN_MAN
 PROCEDURE:
	The images contained in the windows given are written to a pixmap.
	The contents of the the windows are copied to a display window, in 
	order, until a key is struck.

 EXAMPLE:
	Blink windows 0 and 2 with a wait time of 3 seconds

	IDL> blink, [0,2], 3 

 MODIFICATION HISTORY:
	Written by Michael R. Greason, STX, 2 May 1990.
	Allow different size windows   Wayne Landsman    August, 1991
	Converted to IDL V5.0   W. Landsman   September 1997


BLINK_IMAGES $SSW/gen/idl/image/blink_images.pro
[Previous] [Next]
 Project     : SOHO - CDS

 Name        : 
	BLINK_IMAGES
 Purpose     : 
	Blinks two images together by modifying the color tables.
 Explanation : 
	A combined image is formed in which the lower bits are assigned to
	ARRAY1 and the higher bits to ARRAY2.  Two color tables are defined
	relative to the current one so that the different images are shown by
	changing between these two color tables.

	A better way to blink together two images on an X-windows display is to
	use the routine XBLINK.

 Use         : 
	BLINK_IMAGES
	BLINK_IMAGES, ARRAY1, ARRAY2
 Inputs      : 
	None required.
 Opt. Inputs : 
	ARRAY1	 = First image to be blinked against the second image.
	ARRAY2	 = Second image.  Must have the same dimensions as the first
		   image.

	If the two arrays are not passed, then it is assumed that the images
	are already displayed, and the program goes directly to loading the
	color tables.

 Outputs     : 
	None.
 Opt. Outputs: 
	None.
 Keywords    : 
	NOSQUARE = If passed, then pixels are not forced to be square.
	NOBOX	 = If passed, then box is not drawn, and no space is reserved
		   for a border around the image.
	SIZE	 = If passed and positive, then used to determine the scale of
		   the image.  Returned as the value of the image scale.  May
		   not be compatible with /NOSQUARE.
	DISABLE  = If set, then TVSELECT not used.
	MISSING	 = Value flagging missing pixels.  These points are scaled to
		   zero.
	CHAR	 = Returns the final character entered from the keyboard.
	NOMESSAGE= If set, then the message explaining about the keys is not
		   printed out.  This is for routines such as MOVE_AND_BLINK,
		   which call BLINK_IMAGES, and want to print out their own message.
 Calls       : ***
	EXPTV, GET_IM_KEYWORD, TVSELECT, TVUNSELECT
 Common      : 
	None.
 Restrictions: 
	ARRAY1 and ARRAY2 must have the same dimensions.

	In general, the SERTS image display routines use several non-standard
	system variables.  These system variables are defined in the procedure
	IMAGELIB.  It is suggested that the command IMAGELIB be placed in the
	user's IDL_STARTUP file.

	Some routines also require the SERTS graphics devices software,
	generally found in a parallel directory at the site where this software
	was obtained.  Those routines have their own special system variables.

 Side effects: 
	The combined image formed from ARRAY1 and ARRAY2 is left on the screen.
	It may look a little strange.
 Category    : 
	Utilities, Image_display.
 Prev. Hist. : 
	William Thompson, March 1991.
	William Thompson, April 1992, changed to use TVLCT,/GET instead of
				      common block.
	William Thompson, August 1992, renamed BADPIXEL to MISSING.
 Written     : 
	William Thompson, GSFC, March 1991.
 Modified    : 
	Version 1, William Thompson, GSFC, 14 May 1993.
		Incorporated into CDS library.
	Version 2, William Thompson, GSFC, 3-Sep-1997
		Renamed to BLINK_IMAGES
	Version 3, William Thompson, GSFC, 8 April 1998
		Changed !D.N_COLORS to !D.TABLE_SIZE for 24-bit displays
 Version     : 
	Version 3, 8 April 1998


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

 Name        : BLINK_MAP

 Purpose     : blink two maps using XINTERANIMATE

 Category    : imaging

 Explanation : 

 Syntax      : blink_map,map1,map2,_extra=extra

 Examples    :

 Inputs      : MAP1,MAP2 = image map structures

 Opt. Inputs : None

 Outputs     : None

 Opt. Outputs: None

 Keywords    : same as PLOT_MAP

 CALLS: ***
	PLOT_MAP, PR_SYNTAX, SPLIT_TAGS, VALID_MAP, XINTERANIMATE, XKILL, XREGISTERED
 Common      : None

 Restrictions: First map is used to set plotting scale
               Have to be careful setting keywords.
               For example, to plot the first map on a linear scale
               and the second on a log use:
                IDL> blink_map,m1,m2,log=0,log=1
               Also, pair similar keywords when using different ones:
                IDL> blink_map,m1,m2,log=0,log=1,limb=0,limb=1

 Side effects: None

 History     : Written 4 Jan 1999, D. Zarro, SMA/GSFC

 Contact     : dzarro@solar.stanford.edu


BLKSHIFT [1] $SSW/gen/idl/io/blkshift.pro
[Previous] [Next]
 NAME:
   BLKSHIFT

 AUTHOR:
   Craig B. Markwardt, NASA/GSFC Code 662, Greenbelt, MD 20770
   craigm@lheamail.gsfc.nasa.gov

 PURPOSE:
   Shift a block of data to a new position in a file (possibly overlapping)

 MAJOR TOPICS:
   File I/O

 CALLING SEQUENCE:

   BLKSHIFT, UNIT, POS, [ DELTA, TO=TO, /NOZERO, ERRMSG=ERRMSG, 
             BUFFERSIZE=BUFFERSIZE ]

 DESCRIPTION:

  BLKSHIFT moves a block of data forward or backward, to a new
  position in a data file.  The old and new positions of the block
  can overlap safely.

  The new position can be specified with either the DELTA parameter,
  which gives the number of bytes to move forward (positive delta) or
  backward (negative delta); or the TO keyword, which give the new
  absolute starting position of the block.

  The block can be moved beyond the current end of file point, in
  which case the intervening gap is filled with zeros (optionally).
  The gap left at the old position of the block is also optionally
  zero-filled.

 INPUTS:

   UNIT - a logical unit number, opened for reading and writing.

   POS - POS(0) is the position of the block in the file, in bytes,
         before moving.  POS(1), if present, is the size of the block
         in bytes.  If POS(1) is not given, then the block is from
         POS(0) to the end of the file.

   DELTA - the (optional) offset in bytes between the old and new
           positions, from the start of the block.  Positive values
           indicate moving the data forward (toward the end of file),
           and negative values indicate moving the data backward
           (toward the beginning of the file).  One of DELTA and TO
           must be specified; DELTA overrides the TO keyword.

           Attempts to move the block beyond the end of the file will
           succeed.  A block can never be moved beyond the beginning
           of the file; it will be moved to the beginning instead.

 KEYWORD PARAMETERS:

   TO - the absolute file offset in bytes for the new start of the
        block.  One of DELTA and TO must be specified; DELTA
        overrides the TO keyword.

   NOZERO - if set, then newly created gaps will not be explicitly
            zeroed.  However, for some operating systems (Mac and
            VMS), zeroing is required and will be done anyway.

   ERRMSG - If defined and passed, then any error messages will be
            returned to the user in this parameter rather than
            depending on the MESSAGE routine in IDL.  If no errors
            are encountered, then a null string is returned.  In
            order to use this feature, ERRMSG must be defined first,
            e.g.
			ERRMSG = ''
			FXBGROW, ERRMSG=ERRMSG, ...
			IF ERRMSG NE '' THEN ...

   BUFFERSIZE - the maximum buffer size for transfers, in bytes.
                Larger values of this keyword impose larger memory
                requirements on the application; smaller values will
                lead to more transfer operations.
                Default: 32768 (bytes)

 CALLED BY:
	FXBGROW, FXHMODIFY [1], FXHMODIFY [2], MODFITS
 MODIFICATION HISTORY:

   Written, CM, Apr 2000
   Documented and re-written, CM, 20 Jul 2000
   Renamed from FXSHIFT to BLKSHIFT, CM, 21 Jul 2000
   Documentation, CM, 12 Dec 2002


BLKSHIFT [2] $SSW/gen/idl_libs/astron/misc/blkshift.pro
[Previous] [Next]
 NAME:
   BLKSHIFT

 AUTHOR:
   Craig B. Markwardt, NASA/GSFC Code 662, Greenbelt, MD 20770
   craigm@lheamail.gsfc.nasa.gov

 PURPOSE:
   Shift a block of data to a new position in a file (possibly overlapping)

 MAJOR TOPICS:
   File I/O

 CALLING SEQUENCE:

   BLKSHIFT, UNIT, POS, [ DELTA, TO=TO, /NOZERO, ERRMSG=ERRMSG, 
             BUFFERSIZE=BUFFERSIZE ]

 DESCRIPTION:

  BLKSHIFT moves a block of data forward or backward, to a new
  position in a data file.  The old and new positions of the block
  can overlap safely.

  The new position can be specified with either the DELTA parameter,
  which gives the number of bytes to move forward (positive delta) or
  backward (negative delta); or the TO keyword, which give the new
  absolute starting position of the block.

  The block can be moved beyond the current end of file point, in
  which case the intervening gap is filled with zeros (optionally).
  The gap left at the old position of the block is also optionally
  zero-filled.    If a set of data up to the end of the file is being
  moved forward (thus making the file smaller) and the IDL version is 
  5.6 or larger (so that the TRUNCATE_LUN procedure is available) then
  the file is truncated at the new end.

 INPUTS:

   UNIT - a logical unit number, opened for reading and writing.

   POS - POS[0] is the position of the block in the file, in bytes,
         before moving.  POS[1], if present, is the size of the block
         in bytes.  If POS[1] is not given, then the block is from
         POS[0] to the end of the file.

   DELTA - the (optional) offset in bytes between the old and new
           positions, from the start of the block.  Positive values
           indicate moving the data forward (toward the end of file),
           and negative values indicate moving the data backward
           (toward the beginning of the file).  One of DELTA and TO
           must be specified; DELTA overrides the TO keyword.

           Attempts to move the block beyond the end of the file will
           succeed.  A block can never be moved beyond the beginning
           of the file; it will be moved to the beginning instead.

 KEYWORD PARAMETERS:

   TO - the absolute file offset in bytes for the new start of the
        block.  One of DELTA and TO must be specified; DELTA
        overrides the TO keyword.

   NOZERO - if set, then newly created gaps will not be explicitly
            zeroed.  However, for some operating systems (Mac),
            zeroing is required and will be done anyway.

   ERRMSG - If defined and passed, then any error messages will be
            returned to the user in this parameter rather than
            depending on the MESSAGE routine in IDL.  If no errors
            are encountered, then a null string is returned.  In
            order to use this feature, ERRMSG must be defined first,
            e.g.
			ERRMSG = ''
			FXBGROW, ERRMSG=ERRMSG, ...
			IF ERRMSG NE '' THEN ...

   BUFFERSIZE - the maximum buffer size for transfers, in bytes.
                Larger values of this keyword impose larger memory
                requirements on the application; smaller values will
                lead to more transfer operations.
                Default: 32768 (bytes)

 CALLED BY:
	FXBGROW, FXHMODIFY [1], FXHMODIFY [2], MODFITS
 MODIFICATION HISTORY:

   Written, CM, Apr 2000
   Documented and re-written, CM, 20 Jul 2000
   Renamed from FXSHIFT to BLKSHIFT, CM, 21 Jul 2000
   Documentation, CM, 12 Dec 2002
   Truncate if moving data block forward from  the end of file 
             using TRUNCATE_LUN   W. Landsman Feb. 2005 
   Assume since V5.5, remove VMS support  W. Landsman  Sep 2006


BOOST_ARRAY [1] $SSW/gen/idl/util/boost_array.pro
[Previous] [Next]
 NAME:
	BOOST_ARRAY
 PURPOSE:
	Append one array onto a destination array
 EXPLANATION:
	Add array APPEND to array DESTINATION, allowing the dimensions of
	DESTINATION to adjust to accomodate it.  If both input arrays have the
	same number of dimensions, then the output array will have one
	additional dimension.  Otherwise, the last dimension of DESTINATION
	will be incremented by one.
 CATEGORY:
	Utility
 CALLING SEQUENCE:
	BOOST_ARRAY, DESTINATION, APPEND
 INPUT:
	DESTINATION	= Array to be expanded.
	APPEND		= Array to append to DESTINATION.
 OUTPUTS:
	DESTINATION	= Expanded output array.
 CALLED BY:
	CDS_SLIT6_BURNIN, DISPLAY_CDS_BURNIN, FITSHEAD2WCS, FIX_IAP, FXBFINDLUN [1]
	FXBFINDLUN [2], GET_MAP_SPACE [1], GET_MAP_SPACE [2], GET_PROC, GET_SC_POINT
	GE_WINDOW_SIM, GT_CDS_QL, STORE_TV_SCALE, STR_SPACE, TVREAD [1], WR_ASC, XSTRUCT
	sgt_delta, sgt_dettime, sgt_dims, sgt_exptime, sgt_range, sgt_refpix, sgt_refval
	sgt_solar_x, sgt_solar_y, sgt_time, ssw_install [1], ssw_install [2]
 RESTRICTIONS:
	DESTINATION and APPEND have to be either both of type string or both of
	numerical types.

	APPEND cannot have more dimensions than DESTINATION.

 MODIFICATION HISTOBY:
	Written Aug'88 (DMZ, ARC)
	Modified Sep'89 to handle byte arrays (DMZ)
	Modifed to version 2, Paul Hick (ARC), Feb 1991
	Removed restriction to 2D arrays, William Thompson (ARC), Feb 1992.
	Converted to IDL V5.0   W. Landsman   September 1997


BOOST_ARRAY [2] $SSW/gen/idl_libs/astron/misc/boost_array.pro
[Previous] [Next]
 NAME:
	BOOST_ARRAY
 PURPOSE:
	Append one array onto a destination array
 EXPLANATION:
	Add array APPEND to array DESTINATION, allowing the dimensions of
	DESTINATION to adjust to accomodate it.  If both input arrays have the
	same number of dimensions, then the output array will have one
	additional dimension.  Otherwise, the last dimension of DESTINATION
	will be incremented by one.
 CATEGORY:
	Utility
 CALLING SEQUENCE:
	BOOST_ARRAY, DESTINATION, APPEND
 INPUT:
	DESTINATION	= Array to be expanded.
	APPEND		= Array to append to DESTINATION.
 OUTPUTS:
	DESTINATION	= Expanded output array.
 CALLED BY:
	CDS_SLIT6_BURNIN, DISPLAY_CDS_BURNIN, FITSHEAD2WCS, FIX_IAP, FXBFINDLUN [1]
	FXBFINDLUN [2], GET_MAP_SPACE [1], GET_MAP_SPACE [2], GET_PROC, GET_SC_POINT
	GE_WINDOW_SIM, GT_CDS_QL, STORE_TV_SCALE, STR_SPACE, TVREAD [1], WR_ASC, XSTRUCT
	sgt_delta, sgt_dettime, sgt_dims, sgt_exptime, sgt_range, sgt_refpix, sgt_refval
	sgt_solar_x, sgt_solar_y, sgt_time, ssw_install [1], ssw_install [2]
 RESTRICTIONS:
	DESTINATION and APPEND have to be either both of type string or both of
	numerical types.

	APPEND cannot have more dimensions than DESTINATION.

 MODIFICATION HISTOBY:
	Written Aug'88 (DMZ, ARC)
	Modified Sep'89 to handle byte arrays (DMZ)
	Modifed to version 2, Paul Hick (ARC), Feb 1991
	Removed restriction to 2D arrays, William Thompson (ARC), Feb 1992.
	Converted to IDL V5.0   W. Landsman   September 1997


BOOST_TAG $SSW/gen/idl/struct/boost_tag.pro
[Previous] [Next]
 Project     : SOHO - CDS

 Name        : BOOST_TAG

 Category    : Utility

 Purpose     :	boost a tag value

 Explanation :	Useful for updating history tags in structures

 Syntax      : IDL> new_struct=boost_tag(struct,value,tag_name)

 Inputs      : STRUCT = structure to modify
               TAG_VALUE  = value to boost current value
               TAG_NAME = tag name to boost

 Outputs     : NEW_STRUCT = modified structure

 Keywords    : ERR = error string
               NAME = optional new name for output structure
               QUIET = don't echo messages
               RECURSE = recursively search for tag name

 CALLS: ***
	ADD_TAG [1], ADD_TAG [2], COPY_VAR, DATATYPE [1], DATATYPE [2], DATATYPE [3]
	DELVARX [1], DELVARX [2], DELVARX [3], DELVARX [4], EXIST, GET_TAG_INDEX, HAVE_TAG
	IDL_RELEASE, IS_STRING, MERGE_STRUCT, PR_SYNTAX, REP_TAG_VALUE, STRUP, delvarx [5]
 CALLED BY:
	fitshead2struct, trace_scale, update_history
 History     : Version 1,  13-April-1997,  D.M. Zarro.  Written
               Version 2,  29-Sept-2000, Zarro (added /NO_RECURSE)

 Contact     : DZARRO@SOLAR.STANFORD.EDU


BOX_AV $SSW/gen/idl/util/box_av.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : BOX_AV()
               
 Purpose     : Produce a box average of an array.
               
 Explanation : Takes the input array and averages the data points in boxes
               of a given size.  The dimensions of the output array are the
               same as the input with the elements in the output array
               all given the average value within the box defined. In 1-d
               arrays this is useful as the output array can then be plotted 
               in histogram mode (psym=10).
               
 Use         : IDL>  out_array = box_av(in_array,x_box [,y_box])

                 eg  x = sin(indgen(1000)/100.)
                     plot,x,psym=4 & oplot,box_av(x,60),psym=10
    
 Inputs      : in_array    -  the input array, either 1 or 2-d
               x_box       -  the x-size of the averaging box
               
 Opt. Inputs : y_box       -  the y-size of the averaging box.  If input is
                              2-d and y_box not specified then it defaults
                              to the same value as x_box.
               
 Outputs     : function value on return is the averaged array
               
 Opt. Outputs: None
               
 Keywords    : None

 Calls       : ***
	Bell
 Restrictions: Only 1 or 2-d arrays.
               
 Side effects: None
               
 Category    : Utilities, Numerical
               
 Prev. Hist. : None

 Written     : C D Pike, RAL,  21-Jul-1993
               
 Modified    : 

 Version     : Version 1


BOX_CRS $SSW/gen/idl/util/box_crs.pro
[Previous] [Next]
 Project     : SOHO - CDS

 Name        : 
	BOX_CRS
 Purpose     : 
	Two-button equivalent of BOX_CURSOR for Microsoft Windows.
 Explanation : 
	Emulates the operation of a variable-sized box cursor (also known as
	a "marquee" selector).  Differs from BOX_CURSOR in that only two mouse
	buttons are used.  This makes it useful for Microsoft Windows, where
	all three buttons are not always available.

	The graphics function is set to 6 for eXclusive OR.  This allows the
	box to be drawn and erased without disturbing the contents of the
	window.

	Operation is as follows:

	To move box:	Hold down either the left or middle mouse button while
			the cursor is inside the box, and drag the box to the
			desired position.

	To resize box:	Hold down either the left or middle button mouse while
			the cursor is outside the box, and drag the box to the
			desired size.  The corner nearest the initial mouse
			position is moved.

	To exit:	Press the right mouse button to exit this procedure,
			returning the current box parameters.

 Use         : 
	BOX_CRS, x0, y0, nx, ny [, INIT = init] [, FIXED_SIZE = fixed_size]
 Inputs      : 
	No required input parameters.
 Opt. Inputs : 
	X0, Y0, NX, and NY give the initial location (X0, Y0) and size (NX, NY)
	of the box if the keyword INIT is set.  Otherwise, the box is initially
	drawn in the center of the screen.
 Outputs     : 
	X0:  X value of lower left corner of box.
	Y0:  Y value of lower left corner of box.
	NX:  width of box in pixels.
	NY:  height of box in pixels. 

	The box is also constrained to lie entirely within the window.

 Opt. Outputs: 
	None.
 Keywords    : 
	INIT:  If this keyword is set, x0, y0, nx, and ny contain the initial
	parameters for the box.

	FIXED_SIZE:  If this keyword is set, nx and ny contain the initial
	size of the box.  This size may not be changed by the user.

	MESSAGE:  If this keyword is set, print a short message describing
	operation of the cursor.

 Calls       : 
	None.
 CALLED BY:
	SELECT_BOX
 Common      : 
	None.
 Restrictions: 
	Works only with window system drivers.
 Side effects: 
	A box is drawn in the currently active window.  It is erased on exit.
 Category    : 
	Utilities, User_interface.
 Prev. Hist. : 
	DMS, April, 1990.
	DMS, April, 1992.  Made dragging more intutitive.
	William Thompson, GSFC, 11 June 1993.
		Changed to use two button operation, selecting moving or
		resizing based on whether or not the cursor is inside or
		outside the box.  Renamed to BOX_CRS.
 Written     : 
	David M. Stern, RSI, April 1990.
 Modified    : 
	Version 1, William Thompson, GSFC, 25 June 1993.
		Incorporated into CDS library.
	Version 2, William Thompson, GSFC, 8 April 1998
		Changed !D.N_COLORS to !D.TABLE_SIZE for 24-bit displays
 Version     : 
	Version 2, 8 April 1998


BOX_CURSOR $SSW/gen/idl/display/box_cursor.pro
[Previous] [Next]
 NAME:
       BOX_CURSOR

 PURPOSE:
       Emulate the operation of a variable-sized box cursor

 EXPLANATION:
       This is a better improved version of BOX_CURSOR, a standard procedure
       from the IDL user library. The added keywords are: COLOR, ANYWHERE,
       EVENT_PRO, and STC4EVENT.

 CATEGORY:
       Interactive graphics.

 CALLING SEQUENCE:
       BOX_CURSOR, x0, y0, nx, ny [, INIT = init] [, FIXED_SIZE = fixed_size]
                   [, COLOR = color]
 INPUTS:
       No required input parameters.

 OPTIONAL INPUT PARAMETERS:
       X0, Y0, NX, NY - The initial location (X0, Y0) and size (NX, NY) 
                        of the box if the keyword INIT is set.  Otherwise, 
                        the box is initially drawn in the center of the
                        screen. 
       EVENT_PRO      - Name of the procedure to be called when the boxed
                        cursor is manipulated. This procedure must have one
                        and only one positional parameter which is a
                        structure. This structure is passed in with the
                        keyword STC4EVENT and must have at least two tags
                        named X and Y being the cursor position in device
                        pixels.    
       STC4EVENT      - Structure to be processed by the procedure specified
                        by EVENT_PRO. It can have any number of tags, but X
                        and Y tags are required ones. 

 KEYWORD PARAMETERS:
       INIT       - If this keyword is set, X0, Y0, NX, and NY contain the
                    initial parameters for the box.
       FIXED_SIZE - If this keyword is set, nx and ny contain the initial
                    size of the box. This size may not be changed by the
                    user.  
 
                    If this keyword contains *two* elements, each element
                    describes whether or not the corresponding size (nx,ny)
                    is to be kept constant.

       MESSAGE    - If this keyword is set, print a short message describing
                    operation of the cursor.
       COLOR      - Index of color to be used to draw the cursor. Default:
                    !d.table_size-1
       ANYWHERE   - Set this keyword to allow box to be moved outside the
                    window 

 OUTPUTS:
	x0 - X value of lower left corner of box.
	y0 - Y value of lower left corner of box.
	nx - width of box in pixels.
	ny - height of box in pixels.

	The box is also constrained to lie entirely within the window.

 CALLS: ***
	DATATYPE [1], DATATYPE [2], DATATYPE [3], FIND_DRAW_WIDGET
 CALLED BY:
	ALIGN_MAN, DCURSOR, GET_TRACUBE, READ_TRACE_FOV, SELECT_BOX, TRACE_SSWHERE [1]
	WFSURVEY, WLINES, WPLOT, WPLOT1, WSUNPROFILE, WTIME_HEIGHT, XCROP_CUBE
	bgrab Bruner Grab, box_data [1], box_data [2], clean [2], clean [3], clean [4]
	fwdfit [1], fwdfit [2], inspec_tf, orcent, plot_fov [1], plot_lcur [1]
	plot_lcur [2], trace_sswhere [2], trace_sswhere [3], trace_sswhere [4]
	xdisp_fits, xdisp_trace [1], xdisp_trace2, xdisp_trace3
 COMMON BLOCKS:
	None.

 SIDE EFFECTS:
	A box is drawn in the currently active window.  It is erased
	on exit.

       Turns *on* both draw_button_events and draw_motion_events, if the
       window is a widget (both should already have been set, anyway..)

 RESTRICTIONS:
	Works only with window system drivers.

 PROCEDURE:
	The graphics function is set to 6 for eXclusive OR.  This
	allows the box to be drawn and erased without disturbing the
	contents of the window.

	Operation is as follows:
	Left mouse button:   Move the box by dragging.
	Middle mouse button: Resize the box by dragging.  The corner
		nearest the initial mouse position is moved.
	Right mouse button:  Exit this procedure, returning the
			     current box parameters.

 KNOWN PROBLEM:
       The box can be off the display window when resizing. More
       checking is needed to prevent this.

 MODIFICATION HISTORY:
	DMS, April, 1990.
	DMS, April, 1992.  Made dragging more intutitive.
	June, 1993 - Bill Thompson
			prevented the box from having a negative size.
       September 1, 1994 -- Liyun Wang
                            Added the COLOR keyword
       September 9, 1994 -- Liyun Wang, GSFC/ARC
                            Prevented the box from jumpping around
                            when resizing
       May 26, 1995 -- Liyun Wang, GSFC/ARC
                       Added the ANYWHERE keyword
       June 5, 1995 -- Liyun Wang, GSFC/ARC
                       Added EVENT_PRO and STC4EVENT keywords
       26 May 1997 -- SVHH, UiO
                      Added detection of widget windows.
       July 14, 1997 -- Liyun Wang, NASA/GSFC
                      Renamed from BOX_CURSOR2
       15 September 1997 -- SVHH, UiO
                      Added possibility of fixing *one* of the dimensions.
	8 April 1998 -- William Thompson, GSFC
		Changed !D.N_COLORS to !D.TABLE_SIZE for 24-bit displays


BOX_CURSOR2 $SSW/gen/idl/display/box_cursor2.pro
[Previous] [Next]
 NAME:
       BOX_CURSOR2

 PURPOSE:
       Emulate the operation of a variable-sized box cursor

 EXPLANATION:
       This is a better improved version of BOX_CURSOR, a standard procedure
       from the IDL user library. The added keywords are: COLOR, ANYWHERE,
       EVENT_PRO, and STC4EVENT.

 CATEGORY:
       Interactive graphics.

 CALLING SEQUENCE:
       BOX_CURSOR2, x0, y0, nx, ny [, INIT = init] [, FIXED_SIZE = fixed_size]
                   [, COLOR = color]
 INPUTS:
       No required input parameters.

 OPTIONAL INPUT PARAMETERS:
       X0, Y0, NX, NY - The initial location (X0, Y0) and size (NX, NY) 
                        of the box if the keyword INIT is set.  Otherwise, 
                        the box is initially drawn in the center of the
                        screen. 
       EVENT_PRO      - Name of the procedure to be called when the boxed
                        cursor is manipulated. This procedure must have one
                        and only one positional parameter which is a
                        structure. This structure is passed in with the
                        keyword STC4EVENT and must have at least two tags
                        named X and Y being the cursor position in device
                        pixels.    
       STC4EVENT      - Structure to be processed by the procedure specified
                        by EVENT_PRO. It can have any number of tags, but X
                        and Y tags are required ones. 

 KEYWORD PARAMETERS:
       INIT       - If this keyword is set, X0, Y0, NX, and NY contain the
                    initial parameters for the box.
       FIXED_SIZE - If this keyword is set, nx and ny contain the initial
                    size of the box. This size may not be changed by the
                    user.  
       MESSAGE    - If this keyword is set, print a short message describing
                    operation of the cursor.
       COLOR      - Index of color to be used to draw the cursor. Default:
                    !d.n_colors-1
       ANYWHERE   - Set this keyword to allow box to be moved outside the
                    window 

 OUTPUTS:
	x0 - X value of lower left corner of box.
	y0 - Y value of lower left corner of box.
	nx - width of box in pixels.
	ny - height of box in pixels.

	The box is also constrained to lie entirely within the window.

 CALLS: ***
	DATATYPE [1], DATATYPE [2], DATATYPE [3], FIND_DRAW_WIDGET, IDL_RELEASE
 CALLED BY:
	CW_REGION, GET_SUB_REGION, MK_PLAN_COPY, NRH1_GETZONE, NRH_BIASREG, REGION_EVENT
	UVALUE_REGION, sel_img
 COMMON BLOCKS:
	None.

 SIDE EFFECTS:
	A box is drawn in the currently active window.  It is erased
	on exit.

       Turns *on* both draw_button_events and draw_motion_events, if the
       window is a widget (both should already have been set, anyway..)

 RESTRICTIONS:
	Works only with window system drivers.

 PROCEDURE:
	The graphics function is set to 6 for eXclusive OR.  This
	allows the box to be drawn and erased without disturbing the
	contents of the window.

	Operation is as follows:
	Left mouse button:   Move the box by dragging.
	Middle mouse button: Resize the box by dragging.  The corner
		nearest the initial mouse position is moved.
	Right mouse button:  Exit this procedure, returning the
			     current box parameters.

 KNOWN PROBLEM:
       The box can be off the display window when resizing. More
       checking is needed to prevent this.

 MODIFICATION HISTORY:
	DMS, April, 1990.
	DMS, April, 1992.  Made dragging more intutitive.
	June, 1993 - Bill Thompson
			prevented the box from having a negative size.
       September 1, 1994 -- Liyun Wang
                            Added the COLOR keyword
       September 9, 1994 -- Liyun Wang, GSFC/ARC
                            Prevented the box from jumpping around
                            when resizing
       May 26, 1995 -- Liyun Wang, GSFC/ARC
                       Added the ANYWHERE keyword
       June 5, 1995 -- Liyun Wang, GSFC/ARC
                       Added EVENT_PRO and STC4EVENT keywords
       26 May 1997 -- SVHH, UiO
                      Added detection of widget windows.
       15 April 1998 -- Zarro (SAC/GSFC)
                      Added CATCH to set graphics device back to normal


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

   Purpose: return data within user defined box 

 CALLS:


BOXAVE $SSW/gen/idl_libs/astron/image/boxave.pro
[Previous] [Next]
 NAME:
       BOXAVE
 PURPOSE:
       Box-average a 1 or 2 dimensional array.   
 EXPLANATION:
       This procedure differs from the intrinsic REBIN function in the follow 
       2 ways: 

       (1) the box size parameter is specified rather than the output 
               array size
       (2) for INTEGER arrays, BOXAVE computes intermediate steps using REAL*4 
               (or REAL*8 for 64bit integers) arithmetic.   This is 
               considerably slower than REBIN but avoids integer truncation

 CALLING SEQUENCE:
       result = BOXAVE( Array, Xsize,[ Ysize ] )     

 INPUTS:
       ARRAY - Two dimensional input Array to be box-averaged.  Array may be 
               one or 2 dimensions and of any type except character.   

 OPTIONAL INPUTS:
       XSIZE - Size of box in the X direction, over which the array is to
               be averaged.  If omitted, program will prompt for this 
               parameter.  
       YSIZE - For 2 dimensional arrays, the box size in the Y direction.
               If omitted, then the box size in the X and Y directions are 
               assumed to be equal

 OUTPUT:
       RESULT - Output array after box averaging.  If the input array has 
               dimensions XDIM by YDIM, then RESULT has dimensions
               XDIM/NBOX by YDIM/NBOX.  The type of RESULT is the same as
               the input array.  However, the averaging is always computed
               using REAL arithmetic, so that the calculation should be exact.
               If the box size did not exactly divide the input array, then
               then not all of the input array will be boxaveraged.

 CALLED BY:
	HBOXAVE
 PROCEDURE:
       BOXAVE boxaverages all points simultaneously using vector subscripting

 NOTES:
       If im_int is a 512 x 512 integer array, then the two statements

               IDL> im = fix(round(rebin(float(im_int), 128, 128)))
               IDL> im  = boxave( im_int,4)

       give equivalent results.   The use of REBIN is faster, but BOXAVE is
       is less demanding on virtual memory, since one does not need to make
       a floating point copy of the entire array.      

 REVISION HISTORY:
       Written, W. Landsman, October 1986
       Call REBIN for REAL*4 and REAL*8 input arrays, W. Landsman Jan, 1992
       Removed /NOZERO in output array definition     W. Landsman 1995
       Fixed occasional integer overflow problem      W. Landsman Sep. 1995
       Allow unsigned data types                      W. Landsman Jan. 2000
       Assume since V5.4, Allow 64bit integers        W. Landsman Apr  2006


BPRECESS $SSW/gen/idl_libs/astron/astro/bprecess.pro
[Previous] [Next]
 NAME:
       BPRECESS
 PURPOSE:
       Precess positions from J2000.0 (FK5) to B1950.0 (FK4)
 EXPLANATION:
       Calculates the mean place of a star at B1950.0 on the FK4 system from
       the mean place at J2000.0 on the FK5 system.    

 CALLING SEQUENCE:
       bprecess, ra, dec, ra_1950, dec_1950, [ MU_RADEC = , PARALLAX = 
                                       RAD_VEL =, EPOCH =   ]

 INPUTS:
       RA,DEC - Input J2000 right ascension and declination in *degrees*.
               Scalar or N element vector

 OUTPUTS:
       RA_1950, DEC_1950 - The corresponding B1950 right ascension and 
               declination in *degrees*.    Same number of elements as
               RA,DEC but always double precision.

 OPTIONAL INPUT-OUTPUT KEYWORDS
       MU_RADEC - 2xN element double precision vector containing the proper 
                  motion in seconds of arc per tropical *century* in right 
                  ascension and declination.
       PARALLAX - N_element vector giving stellar parallax (seconds of arc)
       RAD_VEL  - N_element vector giving radial velocity in km/s

       The values of MU_RADEC, PARALLAX, and RADVEL will all be modified
       upon output to contain the values of these quantities in the
       B1950 system.  The parallax and radial velocity will have a very 
       minor influence on the B1950 position.   

       EPOCH - scalar giving epoch of original observations, default 2000.0d
           This keyword value is only used if the MU_RADEC keyword is not set.
 NOTES:
       The algorithm is taken from the Explanatory Supplement to the 
       Astronomical Almanac 1992, page 186.
       Also see Aoki et al (1983), A&A, 128,263

       BPRECESS distinguishes between the following two cases:
       (1) The proper motion is known and non-zero
       (2) the proper motion is unknown or known to be exactly zero (i.e.
               extragalactic radio sources).   In this case, the reverse of 
               the algorithm in Appendix 2 of Aoki et al. (1983) is used to 
               ensure that the output proper motion is  exactly zero. Better 
               precision can be achieved in this case by inputting the EPOCH 
               of the original observations.

       The error in using the IDL procedure PRECESS for converting between
       B1950 and J1950 can be up to 1.5", mainly in right ascension.   If
       better accuracy than this is needed then BPRECESS should be used.

       An unsystematic comparison of BPRECESS with the IPAC precession 
       routine (http://nedwww.ipac.caltech.edu/forms/calculator.html )always
       gives differences less than 0.15".
 CALLED BY:
	DBCIRCLE [1], DBCIRCLE [2], GLACTC, HELIO_JD
 EXAMPLE:
       The SAO2000 catalogue gives the J2000 position and proper motion for
       the star HD 119288.   Find the B1950 position. 

       RA(2000) = 13h 42m 12.740s      Dec(2000) = 8d 23' 17.69''  
       Mu(RA) = -.0257 s/yr      Mu(Dec) = -.090 ''/yr

       IDL> mu_radec = 100D* [ -15D*.0257, -0.090 ]
       IDL> ra = ten(13, 42, 12.740)*15.D 
       IDL> dec = ten(8, 23, 17.69)
       IDL> bprecess, ra, dec, ra1950, dec1950, mu_radec = mu_radec
       IDL> print, adstring(ra1950, dec1950,2)
               ===> 13h 39m 44.526s    +08d 38' 28.63"

 REVISION HISTORY:
       Written,    W. Landsman                October, 1992
       Vectorized, W. Landsman                February, 1994
       Treat case where proper motion not known or exactly zero  November 1994
       Handling of arrays larger than 32767   Lars L. Christensen, march, 1995
       Converted to IDL V5.0   W. Landsman   September 1997
       Fixed bug where A term not initialized for vector input 
            W. Landsman        February 2000
       


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

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

	CALLING SEQUENCE: 
		break_doc, infile
		break_doc, header

       Input Parameters:
          input - file to extract - assume idl .pro file
		   OR documentation header (from doc_head)

       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 

	Category: gen, swmaint, unix_only

 CALLS: ***
	ARR2STR [1], Arr2Str [2], BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3]
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], FILE_EXIST [2], STR2ARR [1]
	STR2ARR [2], STR_LASTPOS [1], break_file [4], concat_dir [4], curdir [1]
	curdir [2], doc_head [1], doc_head [2], doc_head [3], file_exist [1]
	file_exist [3], str_lastpos [2], strposarr [1], strposarr [2]
 CALLED BY:
	doc1liners, doc_summ [1], doc_summ [2], ssw_swmap_info
	Common Blocks: get_doc_private, doc_strt

	Modification History: S.L.Freeland, 18-July-1992 
			      (derived from sw_head.pro)
			      slf,  9-Aug-1992	added print option
			      slf, 22-Mar-1994 convert to rd_tfile
                             slf,  6-Oct-1998 - add terminators Explana and Use
                             slf, 15-Oct-1998 - Restore Mons Morrison 12-jun-97 mods.
      09-May-2003, William Thompson - Use ssw_strsplit instead of strsplit


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

 Name        :
	BREAK_FILE
 Purpose     :
	Break a filename into its component parts.
 Explanation :
	Given a file name, break the filename into the parts
	of disk/logical, the directory, the filename, the
	extension, and the file version (for VMS)
 Use         :
	BREAK_FILE, FILE, DISK_LOG, DIR, FILNAM, EXT, FVERSION, NODE
 Inputs      :
	file	- The file name
 Opt. Inputs :
	None.
 Outputs     :
	disk_log- The disk or logical (looks for a ":")
		  This is generally only valid on VMS machines
	dir	- The directory
	filnam	- The filename (excluding the ".")
	ext	- The filename extension (including the ".")
	fversion- The file version (only VMS)
	node	- The Node name (only VMS)
 Opt. Outputs:
	None.
 Keywords    :
	LAST_DOT- For filenames which have "." in the name, it takes
	 	  the LAST "." as the start of the extension.  The
		  default is from the first ".".
 Calls       : ***
	str_replace [1], str_replace [2]
 CALLED BY:
	ADD_METHOD, ADJUST_AMF, ANALYZE [1], APPLY_CDS_ADEF, BASEPHZ, BATSE_FILE2TIME
	BATSE_FLARES_WEEK, BCS, BCS_24HR_PLOT [1], BCS_24HR_PLOT [3], BCS_CAT
	BCS_CREATE_CAT, BCS_FIXBPC, BCS_FREE_DATA, BCS_INFIL, BUILD_LASCO_HELP, CATEGORY
	CAT_DIRECTORY, CAT_DURATION, CDSHEADFITS, CDS_ADEF_PARSEFILE, CDS_AR_OBS
	CDS_ENG_N1_AN, CDS_ENG_N4_AN, CDS_SATURATE, CDS_SIMPLE_FITS, CDS_STACK
	CDS_THUMBNAIL, CFITSLIST, CHECK_ANOMALY, CHECK_DIST, CHIANTI_DEM, CHKARG
	CH_GET_FILE, CH_LINE_LIST, CH_SYNTHETIC, CMP_ALL_PRO, CMP_LIBS, CMP_TREES
	COMPRESS_QLOOK, CONCAT4DOS [1], CONCAT4DOS [2], CONVERT_2_STREAM, DAILY
	DCFSUMMARY, DECOMP_R, DEF2C_FILL, DEF2C_FORMAT, DEF2C_INSERT, DEF2STRUCT, DEFAULTS
	DN_FILE, DO_WRITE_DD, DSPEXP, DSP_AUX, DSP_WAV, EIS_ADD_FITS_FILE [1]
	EIS_ADD_FITS_FILE [2], EIS_GET_HDR [1], EIS_GET_HDR [2]
	EIS_IMAGE_TOOL_EVENT [1], EIS_IMAGE_TOOL_EVENT [2], EIS_LIST_EXPER [1]
	EIS_LIST_EXPER [2], EIS_LIST_MAIN [1], EIS_LIST_MAIN [2], EIT_DISPLAY
	EIT_SUBFIELD, EVAL_SHERB, EXPORT_PLAN, FF_GC, FF_ODDEVEN, FID2TIME, FILE2FID
	FILE2FLARE, FILENAME2DATE, FILE_EXIST [2], FILE_SEARCHER [1], FILE_SEARCHER [2]
	FINDFILE_LIST, FIND_CAL [1], FIND_CAL [2], FIND_CAT, FIND_COMPRESSED, FIND_DATFILE
	FIND_DURATION, FIND_FILE, FIND_FILE_DUR, FIND_PROC, FIND_SEU, FIT2GIF, FIX_IAP
	FIX_TIME_JUMP, FLAREMETER, FLARE_F_NAME, FLUSH_CATALOG, FS_OPEN [1], FTEMAP
	FTP_BATSEPLOTS, FTP_BBSO, FTP_MLSO_IMAGES, FTP_MWSO, FTP_NOBE, FULLTEST_TKI
	FWD_DISPLAY, Files_Handling [1], Files_Handling [2], GENERIC_MOVIE, GEN__DEFINE
	GETBKGIMG, GETGNP, GETOFF, GETPARMS, GET_CACHE, GET_EXP_FACTOR [1]
	GET_EXP_FACTOR [2], GET_GDFILE, GET_MOD, GET_PROC, GET_RECENT_FILE, GET_SC_ATT [1]
	GET_SUMER_FILES, GIF2PICT, HAVE_PROC, HESSI PACKET CLASS DEFINITION, HKG_DBASE
	HSI_CHK_DUPLICATE, HSI_FORWARDFIT, HSI_MODUL_PATTERN_BPROJ
	HSI_MODUL_PATTERN_BUILD, HSI_QLOOK_SUMMARY_PAGE__DEFINE, HSI_SOCK_FIND
	HSI_VCFILE_PACKET_RATE, HSI_VCFILE_TIMES, HTTP__DEFINE, HXRFILE2FITS
	HXR_DC2FITS, Hsi_contact2fits [1], Hsi_contact2fits [2], IDL5TO4
	IMAGE_TOOL_EVENT, INSERT_REC, ITOOL_GETFILE, ITOOL_GET_SRC, ITOOL_GET_TYPE
	ITOOL_RD_GIF, JITTER_HTML, JSMOVIE, JSMOVIE2, KAP_DATE, KAP_VERS, LASCO_READFITS [1]
	LATEST_SFDS_GIF, LAUNCHER, LOCAL_DIFFS, LOCK_DATABASE, LOCK_ZDBASE, LOC_FILE [1]
	LOC_FILE [2], LOC_FILE [3], Load_sher, MAKE_FF, MAKE_TPOVIEW, MAKE_VHS_GIF, MAP2FITS
	MAP2MPEG, MAP__DEFINE, MDI_GBO, MERGE_DISCSP_HKG_OCC, MKMOVIE
	MKMOVIE0 obsolete version of mkmoviepro, MK_AGIF, MK_ALL_MIN, MK_CDS_ANALYSIS
	MK_CDS_GIF, MK_FILE, MK_GIF, MK_HEAD_CAT, MK_IMG, MK_LINK, MK_MPEG, MK_SOHO_TARGET
	MK_SSX, MK_SUMER_CAT, MK_SUMER_DBASE, MK_SYNOPTIC, MK_TEMP_FILE, MK_WAVECAL
	MONITOR_EXP_IMG, MVI2DATA_CUBE, MVI2FRAMES, MVIPLAY, MVIPLAY3, NOTEPAD, OCC_DBASE
	OCC_FILETYPE, OVIEW2WEB, OVSA_EXPLORER formerly OVSA_PRESUB, OVSA_FORMAT_NEW
	PLOTBATSE, PLOTBPC, PLOTBSD v306 IDL2, PLOT_CDS_POINT [1], PLOT_CDS_POINT [2]
	PLOT_IONEQ, PLOT_VDS_BIAS, PRG_DETAIL, PRG_PLAN, PRINT_GEV, PRINT_NAR, PURPOSE
	QLARCHIVE, RAW2BIN, RDFCS, RD_LINE_LIST, RD_NEAR_PIN [1], RD_NEAR_PIN [2]
	RD_TGRS_SPEC [1], RD_TGRS_SPEC [2], READCDSFITS, READ_BDAS_DRM, READ_CONT
	READ_DISCSC, READ_DISCSP, READ_GDFILE_GD, READ_MER, READ_MONTH_CAT, READ_NIMCP_CAL
	READ_PS [1], READ_PS2, READ_SHER, READ_SHERB, READ_STTE, READ_TTS_FITS, REBIN_FID
	REBIN_GIF, RECOMPILE, REGEN_SYNOP, RESTORE_ANALYSIS, RESTORE_CDS_ADEF, REWRITE_FDB
	RTMOVIE, RTMVIPLAY [1], RTMVIPLAY [2], RTMVIPLAYPNG
	Radio Astronomy Group View RAG View [1]
	Radio Astronomy Group View RAG View [2], SAVE_ANALYSIS, SAVE_CDS_ADEF
	SAVE_QLDS, SCANPATH, SETUP_DRM, SFITSLIST, SHOW_FITS_HDR, SMART_FTP, SOHOFILE2TIME
	SORT_FILES, SPEX_COMMONS [2], SPEX_COMMONS [4], SPEX_PROC [1], SPEX_PROC [2]
	SPEX_READ_FIT_RESULTS, SPEX_SUMMARY [1], SPEX_SUMMARY [2], SPEX__DEFINE
	STRIP_WILD, ST_SUMER, SUBFIELD_EV, SUBMIT_CAP, SUBMIT_IAP, SUMER_FILE, SUMER_FITS
	SUMER_FULL_FILENAME, SUMER_PICK_FLAT, SUMER_SEARCH_PD_EVENT, SUMM_CALS, SURVANAL
	SXT_TEEM2 [1], SXT_TEEM2 [2], SXT_TEEM2 [3], Shers_load [1], TIFF2GIF, TKI_EVAL
	TKI_SCL2OBJgroupgroup, TKI_TCMD_EXEC, TPANALYZE, TPCALCHEK, Telemetry To FITS
	UNLOCK_ZDBASE, UPDATE_KAP, URL_GET, WACAL, WAMPHIT, WANALYZE, WAS_CALLED, WATCHER
	WBDA [1], WBDA [2], WDIALOG_HISTORY, WDUMPREC, WIN2PS, WRITE_CAP, WRITE_CIF, WRITE_DD
	WRITE_HT, WRITE_IAP, WRT_BSDCAL_CFL, WRT_BSDFIT_CFL, WRT_MKBSD_CFL, WRUNMOVIE [2]
	WRUNMOVIE4, WRUNMOVIEM, WRUNMOVIEM3, WRUNMOVIEM_RT, W_HISTOGRAM, X2GIF, X2JPEG, X2PS
	XCAT, XCDS_COSMIC, XCFIT_BLOCK, XDIFF, XEDIT, XMANAGER_RESET, XPS_SETUP, XRECORDER
	XSM_PREP, XSM_VALID, XTKI, aRCHsCRPT, ace_files, ads2att, allpks_html, avsig_1 [4]
	bbso_name_fix, bcs_line, bcs_path, break_doc [1], break_doc [2], break_doc [3]
	calc_mtm_therm, cdrom_files [2], cfl_summary [1], cfl_summary [2], ch_ss
	check_compile [1], check_compile [2], check_dumps [1], check_log [1]
	check_log [2], check_oldprocess [1], check_oldprocess [2]
	check_oldprocess [3], check_oldprocess [4], check_ql_after_lz, chk_flares [1]
	chk_flares [2], compact_hkg, conv_rli, data2files, db_gbo, delete_week [1]
	delete_week [2], dir_since, diskbench, do_adsftp [1], do_adsftp [2], do_aip
	do_i0_dps_reformat, do_tr_inventory, dotar, dps_fname2time, dsp_menu, edac_summary
	eis_make_status_fits [2], eis_make_status_fits [3], eit_eff_area
	eit_file2path, eit_fulldisk, eit_getlimb, emi_summary, extract_fid, extract_fids
	extract_val, fidrange [1], fidrange [2], file_exist [1], file_exist [3]
	file_info [1], file_info [2], file_info2 [1], file_info2 [2], file_list [1]
	file_list [2], file_list2, file_uncompress [1], file_uncompress [2]
	find_dbo_dir, fmt_rasm, focus_trace [1], focus_trace [2], ft_mng_hm, ftp_copy [1]
	ftp_copy [2], ftp_copy2sites, full_graph_gif, genx2html [1], genx2html [2]
	get1doc [1], get1doc [2], get1gbo, get1hk_info [1], get1hk_info [2]
	get_atomic [1], get_atomic [2], get_bcscal, get_bsc_anno, get_gbo_pfi
	get_hk_info [1], get_hk_info [2], get_seq_tab, get_sfm, get_sirius_yr
	get_tf_rec fname filnum recnum [1], go_batch [1], go_batch [2]
	go_lasdisk golaserdisk, go_lasdisk2 golaserdisk, go_mk_cd, go_nvs4, go_nvs5
	go_ssw_batch, go_sxt_sss2secondary, goes3sec_copy, hist_count, hsi_as_file_type
	hsi_as_proc_event, hsi_as_proc_open, hsi_create_filedb, hsi_do_catalog
	hsi_filedb_read [1], hsi_filedb_read [2], hsi_find_in_archive
	hsi_flare_list__define [1], hsi_flare_list__define [2], hsi_monthly_filename
	hsi_obs_summ_allrates [1], hsi_obs_summ_soc__define, hsi_params2script
	hsi_params_write_pro, hsi_qlook_concat, hsi_read_all_flare_list
	hsi_sas_plot_scpointing, hsi_spectrum__filewrite, hsi_test_bad_file
	hsi_write_txt_flare_list, html_get_files, html_linklist, http_names, hxt_rdpara
	ihy_db, image2movie, jitter_gif_xyimg, kp_name_fix, lcbsd, mdi_write_genxcat
	merge_genxcat, mk_bad_pix_map_load, mk_ff_patch, mk_gx, mk_hst_summary
	mk_imgsum_html, mk_mapfile [1], mk_mapfile [2], mk_mdi_load, mk_obs, mk_orbit_sum
	mk_pix [1], mk_pix [2], mk_pnt, mk_rasm_files, mk_sdmi, mk_sfd [1], mk_sfd [2]
	mk_sfd [3], mk_sfd [4], mk_soup_hcat, mk_strip_file, mk_sxc, mk_sxh, mk_sxl, mk_tfi
	mk_week_file [1], mk_week_file [2], mk_ydb_list, mk_ydbtape [1], mk_ydbtape [2]
	mktap_prep, msok_poi_copy [1], msok_poi_copy [2], mvi2gif, new_edac_summary
	new_version [1], new_version [2], nob_name_fix, nobeyama_update, norik_name_fix
	nts_copy [1], nts_copy [2], op_facom_ftp, op_term_score, ospex_params_write_pro
	plot_eit_flux, plotbft [1], plotbft [2], plotbth v30 IDL2, ploty [1], ploty [2]
	pr_gsn [1], pr_gsn [2], pr_sfc, prep_week [1], prep_week [2], psk_correlate
	raw_list2pixmap, rd_hessi_drm_4_spex [1], rd_hessi_drm_4_spex [2], rd_hirsaiso
	rd_hk [1], rd_hk [2], rd_ionbal [1], rd_ionbal [2], rd_raw_station_plan, rd_selsis
	rd_selsisi, rd_soup, rd_sxs_pha [1], rd_sxs_pha [2], rd_week_file [2]
	rd_ydbtapedir, read_genxcat, read_hessi_4_ospex, read_hessi_4_spex [1]
	read_hessi_4_spex [2], read_mdi, read_spartan, read_sxt, read_xsm_4_ospex
	redo_mon_sci5k, ref_day_plot, reslot, sav_bda, sav_bsc, sav_hxi, sav_sda [1]
	sav_sda [2], sav_sda [3], sel_filetimes [1], sel_filetimes [2], sfc_check
	show_pix [1], show_pix [2], show_pix_event [1], show_pix_event [2]
	show_pix_event [3], soon_com2html, soon_search_www, soxs_readfile
	spex_xsm_fits2drm, ssw_bin, ssw_check_contrib, ssw_get_sources, ssw_getapplet
	ssw_imapcoord2html, ssw_install [1], ssw_install [2], ssw_javamovie
	ssw_packages, ssw_swmap_bestof, ssw_upgrade [1], ssw_upgrade [2]
	ssw_upgrade_backup, sswdb_install, sswdb_upgrade, sumer_ffdb, sw2tree [1]
	sw2tree [2], sxi_latest, sxt2mpeg, sxt_etemp, sxt_flux [1], sxt_flux [2]
	sxt_flux [3], sxt_mwave, sxt_prep [1], sxt_prep [2], sxt_prep [3], sxt_ssc2sss
	sxt_ssn2fits [1], sxt_summary, table_dump, tap_wrt_chk, teambb [1], teambb [2]
	telem_sum, tfr_summary, tfr_summary2, thumbnail_table_html, tim2file [1]
	tim2file [2], timeline, topsdb [1], topsdb [2], tr_list_frames, tr_rd_inventory
	tr_summary_head, tr_tab_head, trace_do_data_requests, trace_euv_resp [1]
	trace_file2path, trace_movie_index [1], trace_movie_index [2]
	trace_request_summary, trace_submit_request, trace_success_file, ucon_path
	uncompress, url_decode, viewlist, web_seq, weekid [1], weekid [2], weekid [3]
	wl_process, write_trace, xcheckip, xcom_data, xdisp_fits, xdisp_sci5k, xdisp_tfr
	xdisp_trace [1], xdisp_trace [2], xdisp_trace2, xdisp_trace3, xr_mk_abun_file
	xrd_trace, xset_chain [1], xset_chain [2], xsm_fits2spectrum, xspr [1], xspr [2]
	ydb_exist [2], ydb_pre2dir [1], ydb_pre2dir [2], ydb_use, yo_xda2legacy, yoyo_man2
 Common      :
	None.
 Restrictions:
	VMS:
		Assumes that : always precedes []
	ULTRIX:
		Right now it has trouble with the ultrix option of use
		of "." or ".."
 Side effects:
	None.
 Category    :
	Utilities, Operating_system.
 Prev. Hist. :
	Written 1988 by M.Morrison
	   Aug-91 (MDM) Changed to handle Unix filename convensions
	28-Feb-92 (MDM) * Adjusted to handle arrays
	11-Mar-92 (MDM) - Perform a STRTRIM(x,2) on input string before
			  doing the "break-up"
	 1-Dec-92 (MDM) - Moved code to do filename, extension and version
			  number for both VMS and Unix (previously it
			  did not do version number code for Unix)
	29-Jan-93 (DMZ/MDM) - checked for node in file name
 Written     :
	M. Morrison, August 1991.
 Modified    :
	Version 1, William Thompson, GSFC, 23 April 1993.
		Incorporated into CDS library.
	Version 1.1, William Thompson, GSFC, 7 May 1993.
		Added IDL for Windows compatibility.
	Version 2, William Thompson, GSFC, 15 June 1995
		Merged with Yohkoh version.  Added change 11-Nov-93 by D. Zarro
       	to check for ".]["  and "[000000" in VMS concealed directory
		names
	Version 3, William Thompson, GSFC, 29 August 1995
		Modified to use OS_FAMILY
       Version 4, Liyun Wang, NASA/GSFC, October 11, 1996
               Fixed a bug that occurs in MS Windows
       Version 5, SVH Haugan, UiO, 10 July 1997
               Made "ifil" loop variable a LONG
	Version 6, M.Morrison, LMSAL, 5-Nov-97
		Added /LAST_DOT option
	Version 7, richard.schwartz@gsfc.nasa.gov, 23-nov-2002
		protect against '/' in Windows
 Version     :
	Version 5, 10 July 1997


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

 Name        : BREAK_MAP

 Purpose     : Break map up into small pieces

 Category    : imaging

 Explanation : 

 Syntax      : f=break_map(map,pieces,size=size)

 Examples    :

 Inputs      : MAP = map structure 
               PIECES = number of equal pieces 

 Opt. Inputs : None

 Outputs     : f= array of pointers containing each piece

 Opt. Outputs: 

 Keywords    : None

 CALLS: ***
	EXIST, GET_MAP_PROP, MAKE_POINTER, NINT [1], NINT [2], PR_SYNTAX, REPACK_MAP
	REP_TAG_VALUE, SET_POINTER, VALID_MAP
 Common      : None

 Restrictions: None

 Side effects: None

 History     : Written 22 Sep 1998, D. Zarro, SMA/GSFC

 Contact     : dzarro@solar.stanford.edu


BREAK_PATH [1] $SSW/gen/idl/system/break_path.pro
[Previous] [Next]
 NAME: 
    BREAK_PATH()

 PURPOSE: 
     Breaks up a path string into its component directories.

 CALLING SEQUENCE: 
     Result = BREAK_PATH( PATHS [ /NoCurrent])

 INPUTS: 
     PATHS   = A string containing one or more directory paths.  The
               individual paths are separated by commas, although in UNIX, 
               colons can also be used.  In other words, PATHS has the same 
               format as !PATH, except that commas can be used as a separator 
               regardless of operating system.

               A leading $ can be used in any path to signal that what follows 
               is an environmental variable, but the $ is not necessary.  (In 
               VMS the $ can either be part of the path, or can signal logical
               names for compatibility with Unix.)  Environmental variables
               can themselves contain multiple paths.

 OUTPUT: 
      The result of the function is a string array of directories.
      Unless the NOCURRENT keyword is set, the first element of the array is 
      always the null string, representing the current directory.  All the 
      other directories will end in the correct separator character for the 
      current operating system.

 OPTIONAL INPUT KEYWORD:
      /NOCURRENT = If set, then the current directory (represented by
               the null string) will not automatically be prepended to the
               output.

 PROCEDURE CALLS:
      None.

 REVISION HISTORY:
       Version 1, William Thompson, GSFC, 6 May 1993.
               Added IDL for Windows compatibility.
       Version 2, William Thompson, GSFC, 16 May 1995
               Added keyword NOCURRENT
       Version 3, William Thompson, GSFC, 29 August 1995
               Modified to use OS_FAMILY
       Version 4, Zarro, GSFC, 4 August 1997
               Added trim to input
       Converted to IDL V5.0   W. Landsman 25-Nov-1997
       Fix directory character on Macintosh system   A. Ferro   February 2000
       Use STRSPLIT instead of STR_SEP()   W. Landsman    July 2002
 CALLS:
 CALLED BY
	CMP_ALL_PRO, CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], FIND_ALL_DIR [1]
	FIND_ALL_DIR [2], FIND_ALL_DIR [3], FIND_WITH_DEF [1], FIND_WITH_DEF [2]
	FIND_WITH_DEF [3], GET_HXT_CAL_WIDTHS, GOES_MEWE_TEM, IDLEDIT
	LIST_WITH_PATH [1], LIST_WITH_PATH [2], LIST_WITH_PATH [3], PATH_DIR
	SSW_LOCAL_PATH, calc_rad_loss, concat_dir [4]


BREAK_PATH [2] $SSW/gen/idl_libs/astron/misc/break_path.pro
[Previous] [Next]
 NAME: 
    BREAK_PATH()

 PURPOSE: 
     Breaks up a path string into its component directories.

 CALLING SEQUENCE: 
     Result = BREAK_PATH( PATHS [ /NoCurrent])

 INPUTS: 
     PATHS   = A string containing one or more directory paths.  The
               individual paths are separated by commas, although in UNIX, 
               colons can also be used.  In other words, PATHS has the same 
               format as !PATH, except that commas can be used as a separator 
               regardless of operating system.

               A leading $ can be used in any path to signal that what follows 
               is an environmental variable, but the $ is not necessary.    
               Environmental variables can themselves contain multiple paths.

 OUTPUT: 
      The result of the function is a string array of directories.
      Unless the NOCURRENT keyword is set, the first element of the array is 
      always the null string, representing the current directory.  All the 
      other directories will end in the correct separator character for the 
      current operating system.

 OPTIONAL INPUT KEYWORD:
      /NOCURRENT = If set, then the current directory (represented by
               the null string) will not automatically be prepended to the
               output.

 PROCEDURE CALLS:
      None.

 REVISION HISTORY:
       Version 1, William Thompson, GSFC, 6 May 1993.
               Added IDL for Windows compatibility.
       Version 2, William Thompson, GSFC, 16 May 1995
               Added keyword NOCURRENT
       Version 3, William Thompson, GSFC, 29 August 1995
               Modified to use OS_FAMILY
       Version 4, Zarro, GSFC, 4 August 1997
               Added trim to input
       Fix directory character on Macintosh system   A. Ferro   February 2000
       Use STRSPLIT instead of STR_SEP()   W. Landsman    July 2002
       Remove VMS support    W. Landsman   September 2006
 CALLS:
 CALLED BY
	CMP_ALL_PRO, CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], FIND_ALL_DIR [1]
	FIND_ALL_DIR [2], FIND_ALL_DIR [3], FIND_WITH_DEF [1], FIND_WITH_DEF [2]
	FIND_WITH_DEF [3], GET_HXT_CAL_WIDTHS, GOES_MEWE_TEM, IDLEDIT
	LIST_WITH_PATH [1], LIST_WITH_PATH [2], LIST_WITH_PATH [3], PATH_DIR
	SSW_LOCAL_PATH, calc_rad_loss, concat_dir [4]


BSC_CHECK [1] $SSW/gen/idl/fund_lib/yohkoh/bsc_check.pro
[Previous] [Next]
 NAME:
       BSC_CHECK
 PURPOSE:
       check that index or data structure is of type BSC
 CALLING SEQUENCE:
       S=BSC_CHECK(BSC_INDEX,NSC_DATA)
 INPUTS:
       BSC_INDEX    - BSC index structure
       BSC_DATA     - BSC data structure
 OUTPUTS:
       S            - 1 if BSC structure type
                    - 0 otherwise
 CALLS: ***
	DATATYPE [1], DATATYPE [2], DATATYPE [3]
 CALLED BY:
	BSC_CHAN, BSC_ERRCAL [1], BSC_ERRCAL [2], BSC_FIELD, BSC_FLUXCAL, BSC_TIM2DSET
	BSC_VALID, BSC_WAVECAL, BSC_XCORR, CV_BSC2BSD, FE25_BSC_TEMP, GET_BSC
	GT_BSC_BINCAL [1], GT_BSC_BINCAL [2], GT_BSC_CHAN [1], GT_BSC_CHAN [2]
	GT_BSC_CRATE, GT_BSC_FLUX, GT_BSC_TIME, GT_BSC_WAVE [1], GT_BSC_WAVE [2], LC_BSC
	LIST_BSC [1], LIST_BSC [2], MK_BSC [1], MK_BSC [2], MK_BSC_DATA [1]
	MK_BSC_DATA [2], PLOT_BSC [1], PLOT_BSC [2], PLOT_BSC_AS2, SEL_BSC, WBSC [1]
	WBSC [2], bsc_vturb, cal_bsc, fit_bsc, fit_bsc_as, fit_bsc_plot, get_bsc_anno, map_bsc
	mk_bsa_interv [1], mk_bsa_interv [2], mk_bscfit_eps
 PROCEDURE:
       Simple use of TAG_NAMES function
       if BSC_DATA is entered, then also checks if n_elements match
 HISTORY:
       written by DMZ (ARC) - Mar'93
       April'94 - added check for FLUX tag (DMZ)


bsc_spec_plot [1] $SSW/gen/idl_fix/soft/old310/bcs_spec_plot.pro
[Previous] [Next]
 NAME:
  bsc_spec_plot
 PURPOSE:
  Plot BCS observed or synthetic spectra 
 CALLING SEQUENCE:
  bcs_spec_plot,bsc_index,bsc_data		; Defaults to the first plot
  bcs_spec_plot,bsc_index,bsc_data,ss=10		; Plot spectrum 10
 INPUTS:
  INDEX  = BSC Index structure or wavelength vector
  DATA   = BSC Data structure  or data array
 OPTIONAL INPUT KEYWORDS:
  AINFO   = Optional information structure
  over	  = If set, over plot on an existing plot
  ss	  = Scalar value which specifies the index of bsc_index,bsc_data to plot.
  xoff	  = Number between 0 and 1 which specifies where the plot annotation goes
	    (this is useful in case the user wants to specify a different size window).
  font	  = Specifies the font to use (make this a number -- not a string)
	    0=Use hardware fonts.  -1=The current default fonts
  nobos  = If set, don't plot the data (by default plots data and overplots the fit)
  nofit  = If set, don't plot the fit  (by default plots data and overplots the fit)
  notitle= If set, don't do print title
  title  = User specified title (default title will put the time on the plot)
  color  = color keyword for PLOT
  ocolor = color keyword for OPLOT
  xrange,yrange,psym,linestyle,charsize ==> Normal keywords for plot
  ebar   = overplot error bars [can come in as 0/1 or a vector of errors]
  second = overplot secondary cmpt (if present)
  primary = overplot primary cmpt (if present)
  vunit  = print Td6 in km/s units
  noannotate = do not print annotation
 PostScript Specific:
  hc	  = If set, make a hardcopy version.
  PostScript  = If set, send the output to an idl.ps file 
		 (but don't close or send to printer)
  eps	  = If set, generate encapsulated PostScript file (closed, not sent to printer)
	         (if /Post,/eps is specified, don't close the file)
  xsize  = Specifies the PostScript X-axis length (inches)
  ysize  = Specifies the PostScript Y-axis length (inches)
  xpage  = Specifies the PostScript X page size (inches)
  ypage  = Specifies the PostScript Y page size (inches)
  x0,y0  = Specifies the PostScript X and Y-axis origins (inches)
  portrait= if set, do the plot in portrait mode.  (Recommend /portrait,/noatomic be used)
  file	  = Specify the output plot file name (default = idl.ps)
  noatomic= if set, don't put the atomic code labels on the PS plot (near X-axis labels)
  nodate  = if set, don't put the date on the PS plot
  nouncert= If set, don't put +/- uncertainties on the plot
  
 OPTIONAL OUTPUT KEYWORDS:
  
 CALLS: ***
	BCS_SPEC_PLOT, DATATYPE [1], DATATYPE [2], DATATYPE [3], DELVARX [1], DELVARX [2]
	DELVARX [3], DELVARX [4], EPLOT, SEL_BSC, clearplot [1], clearplot [2], delvarx [5]
	fmt_tim [1], fmt_tim [2], get_bsc_anno, pprint [1], pprint [2]
 MODIFICATION HISTORY:
  30-sep-93, J. R. Lemen (LPARL), Written
   7-oct-93, DMZ and JRL -- Added color and ocolor keywords
  18-Oct-93, DMZ and JRL -- added ebar keyword
  18-Oct-93, DMZ -- allowed for vector and/or scalar inputs for EBAR
  30-Nov-93, DMZ -- added oplot of secondary cmpt (via /SECOND switch)
   9-Dec-93, DMZ -- added VUNIT keyword
  20-Dec-93, DMZ -- fixed small bug in second cmpt plotting and annotation
  29-dec-93, JRL -- Added /portrait,/noatomic,/eps,x0off,y0off,xpage,ypage
   7-jan-94, JRL -- Added an "empty" to flush PS buffer (needed sometimes for /eps)
  23-Jan-94, DMZ -- added /PRIMARY, /NOANNOTATE keywords 
                    + more error checking and general cleanup
   9-Apr-94, DMZ -- fixed bug with /PRIM
  21-Jun-94, DMZ -- further propagated VUNIT
  30-jun-94, JRL -- Added the /NOUNCERT keyword


BSC_STRUCT [1] $SSW/gen/idl/fund_lib/yohkoh/bsc_struct.pro
[Previous] [Next]
       NAME:
               BSC_STRUCT
       PURPOSE:
               Define the following BSC specific database structures
                       * BSC_Index_Rec            
                       * BSC_Roadmap_Rec          
                       * FIT_BSC_Rec

       CALLING SEQUENCE:
               BSC_STRUCT
 CALLED BY:
	MK_BSC_STR [1], MK_BSC_STR [2], bcs_line, bcs_spec, rd_roadmap [1]
       HISTORY:
               written by Mons Morrison, R. Bentley, J. Mariska and D. Zarro, Fall 92
       11-sep-93, JRL + DMZ, Added .valid_ans, .nstart and .nend fields (see **)
        2-Oct-93 (MDM) - Changed the FIT structure a fair amount
       13-Oct-93 (MDM) - Changed the FIT field from Num_inter to Num_iter
        8-Nov-93 (MDM) - Changed comments
        3-Feb-94 (MDM) - Added .SPACECRAFT to .BSC structure
                       - Made a new FIT structure with .ION_MULT
                       - Archived FIT_2041_BSC_Rec to BSC_OLD_STRUCT.INC
        3-Feb-94 (MDM) - Added .DENSITY to .FIT
        8-Aug-94 (MDM) - Added .DISPC and .U_DISPC to .FIT


BSCALE $SSW/gen/idl/image/bscale.pro
[Previous] [Next]
 Project     : SOHO - CDS

 Name        : 
	BSCALE
 Purpose     : 
	Scale images into byte arrays suitable for displaying.
 Explanation : 
	Depending on the keywords passed, the routine BYTSCLI, FORM_INT or
	FORM_VEL is used to scale the image.
 Use         : 
	BSCALE, IMAGE
 Inputs      : 
	IMAGE	= Image to be scaled.
 Opt. Inputs : 
	None.
 Outputs     : 
	IMAGE	= The scaled image is returned in place of the original.
 Opt. Outputs: 
	None.
 Keywords    : 
	NOSCALE  = If set, then the image is not scaled.
	MISSING	 = Value flagging missing pixels.  These points are scaled to
		   zero.
	MAX	 = The maximum value of IMAGE to be considered in scaling the
		   image, as used by BYTSCL.  The default is the maximum value
		   of IMAGE.
	MIN	 = The minimum value of IMAGE to be considered in scaling the
		   image, as used by BYTSCL.  The default is the minimum value
		   of IMAGE.
	TOP	 = The maximum value of the scaled image array, as used by
		   BYTSCL.  The default is !D.TABLE_SIZE-1.
	BOTTOM	 = The minimum value of the scaled image array, as used by
		   BYTSCL.  The default is 0.
	VELOCITY = If set, then the image is scaled using FORM_VEL as a
		   velocity image.  Can be used in conjunction with COMBINED
		   keyword.  Ignored if NOSCALE is set.
	COMBINED = Signals that the image is to be displayed in one of two
		   combined color tables.  Can be used by itself, or in
		   conjunction with the VELOCITY or LOWER keywords.
	LOWER	 = If set, then the image is placed in the lower part of the
		   color table, rather than the upper.  Used in conjunction
		   with COMBINED keyword.
 Calls       : ***
	BYTSCLI, FORM_INT, FORM_VEL, GET_IM_KEYWORD, GOOD_PIXELS, IM_KEYWORD_SET
	TAG_EXIST [1], TAG_EXIST [2], WHERE_MISSING
 CALLED BY:
	CDS_SIMPLE_FITS, EXPAND_TV, MAP2FITS, NDSPSPEC, QL_BSCALE, TP_BSCALE, TVZOOM, TVZOOM2
	XLOAD, XTVSCALE
 Common      : 
	None.
 Restrictions: 
	In general, the SERTS image display routines use several non-standard
	system variables.  These system variables are defined in the procedure
	IMAGELIB.  It is suggested that the command IMAGELIB be placed in the
	user's IDL_STARTUP file.

	Some routines also require the SERTS graphics devices software,
	generally found in a parallel directory at the site where this software
	was obtained.  Those routines have their own special system variables.

 Side effects: 
	None.
 Category    : 
	Utilities, Image_display.
 Prev. Hist. : 
	William Thompson, May 1992.
	William Thompson, August 1992, renamed BADPIXEL to MISSING.
	William Thompson, September 1992, use COMBINED keyword in place of
					  INTENSITY.
 Written     : 
	William Thompson, GSFC, May 1992.
 Modified    : 
	Version 1, William Thompson, GSFC, 14 May 1993.
		Incorporated into CDS library.
	Version 2, William Thompson, GSFC, 14 June 1993.
		Added support for monochrome (dithered) devices.
	Version 3, William Thompson, GSFC, 22 October 1993.
		Modified to call BYTSCLI instead of BYTSCL.
	Version 4, William Thompson, GSFC, 17 July 1996
		Fixed bug when image contains nothing but missing pixels.
	Version 5, William Thompson, GSFC, 8 December 1997
		Pass TOP to FORM_INT and FORM_VEL.
	Version 6, William Thompson, GSFC, 6 January 1998
		Corrected interaction between MIN and MISSING
	Version 7, Zarro (SAC/GSFC), 1 March 1998
		Threw in calls to TEMPORARY for better memory management
       Version 8, William Thompson, GSFC, 29 April 2005
               Use WHERE_MISSING, GOOD_PIXELS to treat NaN values
       Version 9, William Thompson, GSFC, 3 Jan 2006
               Added keyword BOTTOM, remove call to EXECUTE
 Version     : 
	Version 9, 3-Jan-2006


BSORT [1] $SSW/gen/idl/util/bsort.pro
[Previous] [Next]
 NAME:
       BSORT
 PURPOSE:
       Function to sort data into ascending order, like a simple bubble sort.
 EXPLANATION:
       Original subscript order is maintained when values are equal (FIFO).
       (This differs from the IDL SORT routine alone, which may rearrange 
       order for equal values)

 CALLING SEQUENCE:  
       result = bsort( array, [ asort, /INFO, /REVERSE ] )

 INPUT:
       Array - array to be sorted

 OUTPUT:
       result - sort subscripts are returned as function value

 OPTIONAL OUTPUT:
       Asort - sorted array

 OPTIONAL KEYWORD INPUTS:
       /REVERSE - if this keyword is set, and non-zero, then data is sorted
                 in descending order instead of ascending order.
       /INFO = optional keyword to cause brief message about # equal values.

 HISTORY
       written by F. Varosi Oct.90:
       uses WHERE to find equal clumps, instead of looping with IF ( EQ ).
       compatible with string arrays, test for degenerate array 
       20-MAY-1991     JKF/ACC via T AKE- return indexes if the array to 
                       be sorted has all equal values.
       Aug - 91  Added  REVERSE keyword   W. Landsman      
       Always return type LONG    W. Landsman     August 1994
       Converted to IDL V5.0   W. Landsman   September 1997
 CALLED BY
	DBINDEX [1], DBINDEX [2], DBINDEX [3], DBSORT [1], DBSORT [2], DBSORT [3], DBWRT [1]
	DBWRT [2], DBWRT [3], FINDFILE_LIST, FIND_DUP, FIND_IX, FTSORT, ITOOL_GETFILE
	OP_ADD_SPECIAL, REM_DUP [1], REM_DUP [2], REM_DUP [3], REM_FST, SHOW_SYNOPTIC
	SHOW_SYNOP__DEFINE, contact_sum, db_gbo, get_dn_rate [1], get_dn_rate [2]
	hsi_where_arr, ihy_db, make_32 [1], make_32 [2], mk_trace_i1, op_edit [1]
	op_edit [2], op_same_time [1], op_same_time [2], op_time_sort, plotfda, pr_uniq_hk
	str_near, timeline, valid_pass4 [1], valid_pass4 [2], xread_hist


BSORT [2] $SSW/gen/idl_libs/astron/misc/bsort.pro
[Previous] [Next]
 NAME:
       BSORT
 PURPOSE:
       Function to sort data into ascending order, like a simple bubble sort.
 EXPLANATION:
       Original subscript order is maintained when values are equal (FIFO).
       (This differs from the IDL SORT routine alone, which may rearrange 
       order for equal values)

 CALLING SEQUENCE:  
       result = bsort( array, [ asort, /INFO, /REVERSE ] )

 INPUT:
       Array - array to be sorted

 OUTPUT:
       result - sort subscripts are returned as function value

 OPTIONAL OUTPUT:
       Asort - sorted array

 OPTIONAL KEYWORD INPUTS:
       /REVERSE - if this keyword is set, and non-zero, then data is sorted
                 in descending order instead of ascending order.
       /INFO = optional keyword to cause brief message about # equal values.

 HISTORY
       written by F. Varosi Oct.90:
       uses WHERE to find equal clumps, instead of looping with IF ( EQ ).
       compatible with string arrays, test for degenerate array 
       20-MAY-1991     JKF/ACC via T AKE- return indexes if the array to 
                       be sorted has all equal values.
       Aug - 91  Added  REVERSE keyword   W. Landsman      
       Always return type LONG    W. Landsman     August 1994
       Converted to IDL V5.0   W. Landsman   September 1997
 CALLED BY
	DBINDEX [1], DBINDEX [2], DBINDEX [3], DBSORT [1], DBSORT [2], DBSORT [3], DBWRT [1]
	DBWRT [2], DBWRT [3], FINDFILE_LIST, FIND_DUP, FIND_IX, FTSORT, ITOOL_GETFILE
	OP_ADD_SPECIAL, REM_DUP [1], REM_DUP [2], REM_DUP [3], REM_FST, SHOW_SYNOPTIC
	SHOW_SYNOP__DEFINE, contact_sum, db_gbo, get_dn_rate [1], get_dn_rate [2]
	hsi_where_arr, ihy_db, make_32 [1], make_32 [2], mk_trace_i1, op_edit [1]
	op_edit [2], op_same_time [1], op_same_time [2], op_time_sort, plotfda, pr_uniq_hk
	str_near, timeline, valid_pass4 [1], valid_pass4 [2], xread_hist


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

   Purpose: build data structure for generic files using size 
	     information encoded by wrt_str.pro

   Input Parameters:
      unit - logical unit number (file opened before call)
      mainsize - saved on first call
   Keyword Paramters:
      structure (Input) - string representation of intermediate data
			   structure used in recursive calls

   Method: recursive for nested structures
	    calls make_str for every structure level


 CALLS: ***
	FMT_TAG [1], FMT_TAG [2], MAKE_STR [1], MAKE_STR [2], STR_LASTPOS [1]
	str_lastpos [2]
 CALLED BY:
	rd_sumer_genx
   History: SLF, 10/30/91
	10-Feb-96 (MDM) - Modified to handle two dimensional structures


BYTE2INT $SSW/gen/idl/util/byte2int.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : BYTE2INT()
               
 Purpose     : Convert byte(s) to integer(s), nothing else.
               
 Explanation : IF DATATYPE(NUMBER) EQ 'BYT' THEN RETURN,FIX(NUMBER)
               
 Use         : result = byte2int(number)
    
 Inputs      : NUMBER: Any variable, scalar or array.
               
 Opt. Inputs : None.
               
 Outputs     : Returns FIX(NUMBER) for byte values, or else simply NUMBER
               
 Opt. Outputs: None
               
 Keywords    : None

 Calls       : ***
	DATATYPE [1], DATATYPE [2], DATATYPE [3]
 CALLED BY:
	NTRIM
 Common      : None
               
 Restrictions: None
               
 Side effects: None
               
 Category    : Utility
               
 Prev. Hist. : None.

 Written     : Stein Vidar H. Haugan, UiO, 26-February-1996
               
 Modified    : Never.

 Version     : 1, 26-February-1996


byte2str $SSW/gen/idl/string/byte2str.pro
[Previous] [Next]
 Project     : VSO                                                                
                                                                                  
 Name        : byte2str                                                           
                                                                                  
 Purpose     : convert byte array into string array                               
                                                                                  
 Category    : utility string                                                     
                                                                                  
 Syntax      : IDL> output=byte2str(input,newline=newline)                        
                                                                                  
 Inputs      : INPUT = input bytarr                                               
                                                                                  
 Outputs     : OUTPUT = output strarr with each new index corresponding to newline
                                                                                  
 Keywords    : NEWLINE = byte value at which to break new line [def=13b]]         
                                                                                  
 CALLS: ***
	PR_SYNTAX, is_number [1], is_number [2]
 History     : 12-Nov-2005, Zarro (L-3Com/GSFC) - written                         
                                                                                  
 Contact     : DZARRO@SOLAR.STANFORD.EDU                                          


BYTESWAP $SSW/gen/idl/util/byteswap.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : BYTESWAP()
               
 Purpose     : Swaps the bytes in an integer (as a function).
               
 Explanation : Call the internal IDL routine BYTEORDER to perform byte
               swapping on integers as a function call.  Handles arrays
               the same as BYTEORDER but passes none of the keywords.
               
 Use         : IDL> ba = byteswap(ab)
    
 Inputs      : ab    - integer [array]
               
 Opt. Inputs : None
               
 Outputs     : Function returns byte swapped version of input
               
 Opt. Outputs: None
               
 Keywords    : None

 Calls       : IDL BYTEORDER
 CALLED BY:
	GISPLOT
 Restrictions: None
               
 Side effects: None
               
 Category    : Util, Numerical
               
 Prev. Hist. : Written by Arnulf (Spacetec)

 Written     : CDS version  C D Pike, RAL, 1 Oct 93
               
 Modified    : Version 1, C D Pike, RAL 1 Oct 93
		Version 2, William Thompson, GSFC, 12 November 1993
			Added /NTOHS to BYTEORDER for platform independence.

 Version     : Version 2, 12 November 1993.


BYTSCLI $SSW/gen/idl/image/bytscli.pro
[Previous] [Next]
 Project     :	SOHO - CDS

 Name        :	BYTSCLI

 Purpose     :	Variation on BYTSCL which allows MAX < MIN.

 Explanation :	BYTSCLI is a variation on the standard IDL BYTSCL routine.  It
		allows for an inverted mapping of input values to output values
		where the keyword MAX is set less than the keyword MIN.
		Substituting BYTSCLI for BYTSCL should give more flexibility in
		image display routines.

		If MAX is greater than MIN, or if either MAX or MIN is not set,
		then BYTSCLI reproduces the behavior of BYTSCL.

 Use         :	Result = BYTSCLI(Arr)

		Default values are supplied for all keywords. If the special case
		is recognized--namely MIN defined, MAX defined, MIN > MAX--then
		an inverted relationship between input and output is returned,
		otherwise the normal byte transformation is applied.

		PRINT,BYTSCLI(INDGEN(11))
		  0  25  51  76 102 127 153 178 204 229 255

		PRINT,BYTSCLI(INDGEN(11),MIN=10,MAX=0)
		  255 229 204 178 153 127 102  76  51  25   0

 Inputs      :	ARR = Array of data values to be scaled.

 Opt. Inputs :	None.

 Outputs     :	None.

 Opt. Outputs:	None.

 Keywords    :	MAX = The value of Array corresponding to the largest byte
		      value to be used (TOP). If MAX is not provided, Array is
		      searched for its maximum value.  All values greater than
		      or equal to MAX are set equal to TOP in the result,
		      except that if MAX & MIN are both defined & MAX lt MIN
		      all values LESS than or equal to MAX are set equal to TOP
		      in the result.

		MIN = The value of Array corresponding to the smallest byte
		      value to be used (zero). If MIN is not provided, Array is
		      searched for its smallest value.  All values less than or
		      equal to MIN are set equal to 0 in the result, except
		      that if MAX & MIN are both defined & MAX lt MIN all
		      values GREATER than or equal to MIN are set equal to 0 in
		      the result.

		TOP = The maximum value of the scaled result.  If TOP is not
		      specified, 255 is used.

 Calls       :	None.
 CALLED BY:
	BSCALE, FORM_INT
 Common      :	None.

 Restrictions:	As with BYTSCL, MAX, MIN & TOP must be scalar. Unlike BYTSCL,
		ARR can also be scalar.

		In general, the SERTS image display routines use several
		non-standard system variables.  These system variables are
		defined in the procedure IMAGELIB.  It is suggested that the
		command IMAGELIB be placed in the user's IDL_STARTUP file.

		Some routines also require the SERTS graphics devices software,
		generally found in a parallel directory at the site where this
		software was obtained.  Those routines have their own special
		system variables.

 Side effects:	None.

 Category    :	Utilities, Image_display.

 Prev. Hist. :	Mark Hadfield, April 1993.

 Written     :	Mark Hadfield, April 1993.

 Modified    :	Version 1, William Thompson, GSFC, 22 October 1993.
			Modified to speed up.
			Incorporated into CDS library.
               Version 2, 13-Jun-98, Zarro (SAC/GSFC) 
                        removed MESSAGE stop for MIN=MAX 

 Version     :	Version 2