LABEL_CURVE $SSW/gen/idl/display/label_curve.pro
[Previous] [Next]
 Project     :	SOHO - CDS

 Name        :	
	LABEL_CURVE
 Purpose     :	
	Plots a label with a line from it to a curve.
 Explanation :	
	Puts a label on a graph, and draws a line between the label and a
	curve.  A line is extrapolated between the point X0, Y0, and the curve
	XVALS, YVALS.  The procedure XYOUTS is then called to write out the
	label.
 Use         :	
	LABEL_CURVE, X0, Y0, X1, Y1, XVALS, YVALS, LABEL

	X = FINDGEN(101)/100					;Generate curve
	Y = SQRT(X)
	PLOT, X, Y						;Plot it.
	LABEL_CURVE, 0.5, 0.5, 0, 1, X, Y, "Sample curve"	;And label it.

 Inputs      :	
	X0, Y0	 = Position of the label.  The line from the label to the curve
		   starts here.
	X1, Y1	 = Another point along the line, used to determine the
		   direction of the line drawn from the label to the curve.
		   This point may or may not end up on the actual line drawn.
	XVALS	 = Array of X-values of points on the curve.
	YVALS	 = Array of Y-values of points on the curve.
	LABEL	 = Character string label.
 Opt. Inputs :	
	None.
 Outputs     :	
	None.
 Opt. Outputs:	
	None.
 Keywords    :	
	LEFT	 = If set, then the label will be displayed to the left of the
		   point X0, Y0.  Normally the label is displayed to the right.
	COLOR	 = Color to use in drawing the label and the line.
	CHARSIZE = Character size to use in drawing the label.
 Calls       :	
	None.
 Common      :	
	None.
 Restrictions:	
	None.
 Side effects:	
	None.
 Category    :	
	Utilities, Graphics.
 Prev. Hist. :	
	William Thompson, June 1991.  Added keywords LEFT, COLOR, CHARSIZE.
	W.T.T., Jan 1992, changed calling parameters so that X1, Y1 are passed
			  instead of SLOPE.  Also, put small offset between
			  label and line.
	William Thompson, Nov 1992, modified algorithm for getting the relative
		character size.
 Written     :	
	William Thompson, GSFC.
 Modified    :	
	Version 1, William Thompson, 9 June 1993.
		Incorporated into CDS library.
		Added call to CONVERT_COORD so as to be compatible with
			logarithmic plots.
	Version 2, William Thompson, GSFC, 20 October 1993.
		Brought label closer to curve.
 Version     :	
	Version 2, 20 October 1993.


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

 Name        : 
	LABEL_IMAGE
 Purpose     : 
	Puts labels on images.
 Explanation : 
	The routine XYOUTS is used to display the title centered either above
	or below the image, or to either side of the image.
 Use         : 
	LABEL_IMAGE, TITLE
 Inputs      : 
	TITLE	 = Character string to be output to image.
 Opt. Inputs : 
	None.
 Outputs     : 
	None.
 Opt. Outputs: 
	None.
 Keywords    : 
	BELOW	 = If set, then the title is displayed below the image.
	LEFT	 = If set, then the title is displayed to the left of the
		   image.  Overrides BELOW keyword.
	RIGHT	 = If set, then the title is displayed to the right of the
		   image.  Overrides BELOW and LEFT keywords.
	CENTER	 = If set, then the title is centered on the screen, regardless
		   of where the image is.  Centering is in X, unless the LEFT
		   or RIGHT keywords are set, in which case it is in Y.
	CHARSIZE = Character size to use in displaying titles.  Normally 1.
	CHARTHICK= Character thickness to use in displaying titles.
	COLOR	 = Color to display label in.
	DISABLE  = If set, then TVSELECT not used.
	REVERSE	 = If set, then the orientation of the letters is 180 degrees
		   from what it ordinarily would be.
	GAP	 = Amount of extra space to place between the label and the
		   image, in character units.
 Calls       : ***
	GET_TV_SCALE, TVSELECT, TVUNSELECT
 CALLED BY:
	CDS_SNAPSHOT, EIT_DISPLAY, EIT_POSTAGE, FF_DEMO, MOVIE_MAKER, TVPRINT, tvmulti
 Common      : 
	None.
 Restrictions: 
	There must be enough space to display the title.

	It is important that the user select the graphics device/window, and
	image region before calling this routine.  For instance, if the image
	was displayed using EXPTV,/DISABLE, then this routine should also be
	called with the /DISABLE keyword.  If multiple images are displayed
	within the same window, then use SETIMAGE to select the image before
	calling this routine.

	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, March 1991.
	William Thompson, May 1992, modified to use GET_TV_SCALE.
	William Thompson, Nov 1992, modified algorithm for getting the relative
		character size.
 Written     : 
	William Thompson, GSFC, March 1991.
 Modified    : 
	Version 1, William Thompson, GSFC, 13 May 1993.
		Incorporated into CDS library.
	Version 2, William Thompson, GSFC, 14 March 1996
		Added keywords GAP and CHARSIZE
		Allow for multiple line titles
		Correct bug with use of reverse keyword
	Version 3, William Thompson, GSFC, 18 December 2002
		Changed !COLOR to !P.COLOR
 Version     : 
	Version 3, 18 December 2002


LABEL_LINE $SSW/gen/idl/display/label_line.pro
[Previous] [Next]
 Project     :	SOHO - CDS

 Name        :	
	LABEL_LINE
 Purpose     :	
	Plots a horizontal line (w/ or w/o symbols) with a label.
 Explanation :	
	Plots a horizontal line (with or without symbols) with a label next to
	it on a graph.
 Use         :	
	LABEL_LINE, X0, Y0, PSYM, LABEL
 Inputs      :	
	X0, X1	  = X-range of the horizontal line.
	Y0	  = Y-height of the line.
	LABEL	  = Character string label.
 Opt. Inputs :	
	None.
 Outputs     :	
	None.
 Opt. Outputs:	
	None.
 Keywords    :	
	PSYM	  = Plotting symbol to use.  Note that actual lines are drawn
		    only if PSYM is zero or negative.  Positive values of PSYM
		    only cause two plotting symbols to be drawn.
	LINESTYLE = Line style to use.
	LEFT	  = If set, then the label will be displayed to the left of the
		    line.  Normally the label is displayed to the right.
	COLOR	  = Color to use in drawing the label and the symbol.
	THICK	  = Thickness to use in drawing the symbol.
	CHARSIZE  = Character size to use in drawing the label.
	CHARTHICK = Character thickness to use in drawing the label
	SYMSIZE	  = Symbol size.
 Calls       :	
	None.
 CALLED BY:
	mark_intervals
 Common      :	
	None.
 Restrictions:	
	None.
 Side effects:	
	None.
 Category    :	
	Utilities, graphics.
 Prev. Hist. :	
	William Thompson, Jan 1992.
	William Thompson, Nov 1992, modified algorithm for getting the relative
		character size.
	William Thompson, 6 July 1993, added call to CONVERT_COORD so as to be
		compatible with logarithmic plots.
 Written     :	
	William Thompson, GSFC, January 1992.
 Modified    :	
	Version 1, William Thompson, GSFC, 9 July 1993.
		Incorporated into CDS library.
	Version 2, William Thompson, GSFC, 20 October 1993.
		Brought label closer to line.
	Version 3, 22-Jan-1998, William Thompson, GSFC
		Added keywords THICK and CHARTHICK
 Version     :	
	Version 3, 22-Jan-1998


LABEL_SYMBOL $SSW/gen/idl/display/label_symbol.pro
[Previous] [Next]
 Project     :	SOHO - CDS

 Name        :	
	LABEL_SYMBOL
 Purpose     :	
	Plots a symbol with a label next to it on a graph.
 Explanation :	
	A plotting symbol is drawn on the plot, and then the procedure XYOUTS
	is called to write out the label.
 Use         :	
	LABEL_SYMBOL, X0, Y0, PSYM, LABEL
 Inputs      :	
	X0, Y0	 = Position of the symbol.
	PSYM	 = Plotting symbol to use.
	LABEL	 = Character string label.
 Opt. Inputs :	
	None.
 Outputs     :	
	None.
 Opt. Outputs:	
	None.
 Keywords    :	
	LEFT	 = If set, then the label will be displayed to the left of the
		   point X0, Y0.  Normally the label is displayed to the right.
	COLOR	 = Color to use in drawing the label and the symbol.
	CHARSIZE = Character size to use in drawing the label.
	SYMSIZE	 = Symbol size.
 Calls       :	
	None.
 CALLED BY:
	PLOT_RASTER, hsi_show_flare_on_image, plotman_draw_event
 Common      :	
	None.
 Restrictions:	
	None.
 Side effects:	
	None.
 Category    :	
	Utilities, Graphics.
 Prev. Hist. :	
	William Thompson, Jan 1992.
	William Thompson, Nov 1992, modified algorithm for getting the relative
		character size.
	William Thompson, 6 July 1993, added call to CONVERT_COORD so as to be
		compatible with logarithmic plots.
 Written     :	
	William Thompson, GSFC, January 1992.
 Modified    :	
	Version 1, William Thompson, GSFC, 9 July 1993.
		Incorporated into CDS library.
	Version 2, William Thompson, GSFC, 20 October 1993.
		Brought label closer to symbol.
 Version     :	
	Version 2, 20 October 1993.


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

 Name        : 
	LAPLACIAN()
 Purpose     : 
	Calculate the Laplacian of an array.
 Explanation : 
	The numerical second derivative is calculated in the X and Y
	directions, and then added together.
 Use         : 
	Result = LAPLACIAN(ARRAY)
 Inputs      : 
	ARRAY	= Image to take Laplacian of.
 Opt. Inputs : 
	None.
 Outputs     : 
	Result of function is the Laplacian of the array.
 Opt. Outputs: 
	None.
 Keywords    : 
	MISSING	 = Value flagging missing pixels.  Any such pixels are not
		   included in calculating the Laplacian.  The output value for
		   any point with a missing pixel adjacent to it will be set to
		   the missing pixel value.
 Calls       : ***
	GET_IM_KEYWORD, WHERE_MISSING
 Common      : 
	None.
 Restrictions: 
	The image array must be two-dimensional.

	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, March 1991.
	William Thompson, August 1992, renamed BADPIXEL to MISSING.
 Written     : 
	William Thompson, GSFC, March 1991.
 Modified    : 
	Version 1, William Thompson, GSFC, 13 May 1993.
		Incorporated into CDS library.
       Version 2, 11-May-2005, William Thompson, GSFC
               Handle NaN values
 Version     : 
	Version 2, 11-May-2005


LAROBS_COPY $SSW/gen/idl/synoptic/larobs_copy.pro
[Previous] [Next]
 Project     : RHESSI

 Name        : LAROBS_COPY

 Purpose     : Copy LARISSA observatory log files for MM catalog

 Category    : Synoptic

 Syntax      : IDL> larobs_copy,tstart,tend [,back=back]

 Inputs      : TSTART, TEND = start/end times to copy

 Keywords    : BACK = # of days back to look

 CALLS: ***
	IS_STRING, TEST_DIR, TIME2FID, get_def_times, is_number [1], is_number [2]
 History     : Writte, 28 April 2004, Zarro (L-3Com/GSFC)

 Contact     : DZARRO@SOLAR.STANFORD.EDU


lasco_time2file $SSW/gen/idl/fund_lib/soho/lasco_time2file.pro
[Previous] [Next]
  Name: lasco_time2file
 
  Purpose: map from SSW times[ or time range ->  LASCO urls

  Input Parameters:
      time0 - vector of times or start time of range
      time1 - optional stop time of range
   
  Output Parameters:
     fcount - number of files or urls returned

  Keyword Parameters:
     before - if set & one param, return closest BEFORE time0 (def=closest)
     after  - if set & one param, return closest AFTER  time0 (def=closest) 
     deltat - deltaT(desired:actual) in minutes (negative~before)
     c1,c2,c3,c4 - desired telescope (default=C2)
     level - processing level (default = 05)
     nrl_url - if set, function returns full NRL URLs
     gsfc_url     - if set, function returns full gsfc urls
     confirm - if switch, only return files/urls which actually exist
               on server; default is "idealized" list
               (fcount always reflects number of elements returned) 
     force_times - if set, force header read + update of FTIMES even if
                   whole days are specified

  Calling Sequence:
      lasc2=lasco_time2file(time0,time1 ,/c2 ...   ) ; Time range
      lasc3=lasco_time2file(time0, /AFTER , /c3,lev='05'     ) ; 1st After T0
      lasc2=lasco_time2file(time0, /BEFORE, /c2,lev='2'{     ) ; 1st Before T0
      lasc2l1=lasco_time2file(time0,level=1) ; Level 1     

  History:
     25-Nov-2003 S.L.Freeland - long planned breakout of of a
                                local CoSEC/SSW socket "service"
                 Some heritage from sxi_files.pro
                 use standalone 
     8-apr-2004 - S.L.Freeland - from mdi_time2file analog
    19-jan-2005 - S.L.Freeland - allow mixed case html file listings@nrl
    31-aug-2005 - J-P.Wuelser  - to get /c4 and /quicklook to work
    20-sep-2006 - S.L.Freeland - allow .fts.gz (Level1 gzipped for example)

 CALLS: ***
	BOX_MESSAGE, GET_FITS_TIME, SOCK_LIST, TIME2FILE, anytim [1], anytim [2], anytim [3]
	anytim [4], anytim [5], fitshead2struct, reltime [1], reltime [2]
	sel_timrange [1], sel_timrange [2], str2number [1], str2number [2]
	strarrcompress, strextract, timegrid
  Restrictions:
     Use of /CONFIRM requires IDL +5.4 (RSI socket utility)
     If remote files are compressed (example is nrl level1 .gz files), 
     then time trimming cannot be done - only full days urls returned 
     in that case and user can copy/trim them in local sswidl session 
 


lasco_time2nrlwww $SSW/gen/idl/fund_lib/soho/lasco_time2nrlwww.pro
[Previous] [Next]
   Name: lasco_time2nrlwww

   Purpose: map times & instrument & resolution -> NRL graphics URLs

   Input Parameters:
      time0,time1 - desired time range (only last few months, I think)

   Keyword Parameters:
      c2,c3,e171,195,e284,e304 - desired instrument
      small, medium, large - (switches) resolution =>{256,512,1024}
      naxis1 & nx - optional way to state resolution in pixel#  256,512,1024
      difference (switch) - if set, difference images
      refresh - force relist/reparse of nrl subdirectory 
                (default caches->common for each resolution)
      times (output) - times corresponding to returned urls

   Calling Context:
      ; Read most recent 6 hours of C2 images NRL -> 'data'
      IDL> urls=lasco_time2nrlwww(reltime(hours=-6),reltime(/now),/c2,/small)
      IDL> ssw_jsurl2data,dummy,data,ingraphics=urls ,times=tt,/get_time
      --------------------------OUT-------------IN---------OUT---------
      IDL> help,tt,data
      TT              STRING    = Array[12]
      DATA            BYTE      = Array[256, 256, 12]
      
      
 CALLS: ***
	BOX_MESSAGE, SOCK_LIST, anytim [1], anytim [2], anytim [3], anytim [4], anytim [5]
	reltime [1], reltime [2], strarrcompress, strextract
    Restrictions:
       (more of a comment) - first call for any given resolution does
       nrl listing/parsing - subsequent calls use cache so are much faster
       Use /REFRESH to force reread/recache useful for NRT applications


LAST_ITEM $SSW/gen/idl/util/last_item.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : LAST_ITEM
               
 Purpose     : Returns the last element of the input variable.
               
 Explanation : Returns the last element of whatever the input variable is.
               
 Use         : IDL> print,last_item(indgen(10))
                     ---> 9

               Find the latest archive telemetry file:
               IDL> print,last_item(findfile(concat_dir('$CDS_TM_DATA','tm*')))
    
 Inputs      : item - variable/array/structure to extract from
               
 Opt. Inputs : None
               
 Outputs     : Function returns last value.
               
 Opt. Outputs: None
               
 Keywords    : None

 Calls       : None
 CALLED BY:
	ADD_TAG [1], AXIS__DEFINE [2], CDS_GAUSS, CDS_GFUNCT
	EIS_CPT_COMMAND_STORE_ADD [1], EIS_CPT_COMMAND_STORE_ADD [2]
	EIS_CPT_COMMAND_STORE_PROCESS [1], EIS_CPT_COMMAND_STORE_PROCESS [2]
	EIS_CPT_EXTRACT_PERIOD [1], EIS_CPT_EXTRACT_PERIOD [2]
	EIS_CPT_PROCESS_RESPONSE_STUDIES [1], EIS_CPT_PROCESS_RESPONSE_STUDIES [2]
	EIS_CPT_TABLE_DIFFERENCE [1], EIS_CPT_TABLE_DIFFERENCE [2]
	EIS_CPT_TIMELINE [1], EIS_CPT_TIMELINE [2], EZFIT, GIS_HV_CAL, GT_DURATION
	HESSI BINNED EVENTLIST CLASS DEFINITION, HSI_CLOCK_DRIFT, HSI_CSPECTRUM_DIST
	HSI_GET_TIMEBIN, HSI_HIST_GROUP, HSI_INPUT_MODEL, HSI_LIVETIME_SIM
	HSI_MODUL_PATTERN_BUILD, HSI_RD_PACKET_TIMES, HSI_SCORE2FILE, HSI_SCTIME2ANY
	HSI_SPEC2CDIST, HSI_SPECTROGRAMACCBIN [5], HSI_SPECTROGRAMCHAN_OVERLAP_FIX
	HSI_SPECTROGRAM_DECIM_CORRECT, HSI_SPECTROGRAM_DECIM_TABLE
	HSI_TIME_N_ORBITS, HSI_TIME_RESET, NUCLEAR_TABLE_LOAD, PLOT_EXPINT, PLOT_IONEQ
	PLOT_SCI_TLM, PLOT_VDS_BIAS, PRINT_STR, PROFILES2, Pileup_countrate_Build_Piler
	Pileup_countrate_PULSE_CONVOLVE, SHOW_SYNOPTIC, SOXS_CZT_DRM
	SPECTROGRAM CLASS DEFINITION, axis_get_edges, axis_get_expanded_range
	file__define, hsi_calib_ev2vis, hsi_endfileinfo_fill, hsi_monthly_filename
	hsi_sim_par_2_bkgd, hsi_sim_par_2_pflux, hsi_sim_pflux_2_cflux
	hsi_spectrogramACCBIN [2], hsi_spectrogram__define [1]
	hsi_spectrogram__define [2], hsi_spectrogram__define [3]
	hsi_spectrogram__get_obs [1], hsi_spectrogram__livetime [1], plotman
	read_xsm_4_ospex, soxs_readfile, spectro_plot2, spex_bk__define
	spex_energy_ranges [1], spex_energy_ranges [2]
	x_new hsi_set_file_vernofilex verno
 Common      : None
               
 Restrictions: None
               
 Side effects: None
               
 Category    : Util, numerical
               
 Prev. Hist. : None

 Written     : C D Pike, RAL, 9-Dec-94
               
 Modified    : 

 Version     : Version 1, 9-Dec-94


last_nelem $SSW/gen/idl/util/last_nelem.pro
[Previous] [Next]
   Name: last_nelem

   Purpose: return last NN elements of vector or last NN images of data cube 

   Input Parameters:
      data   - the source data item
      nelems - number of subscripts (default=1 => the 'last' element)
 
   Ouput:
      function returns last NN elements (last NN images if input is 3D)

   Calling examples:
      IDL> print,last_nelem(findgen(100))  ; default is last element
                99.0000
      IDL> print,last_nelem(indgen(10),3)  ; 2nd parameter for last NN
           7       8       9
     
      IDL> help,last_nelem(indgen(256,256,10), 4)    ; last NN images if 3D
      <Expression>    INT       = Array[256, 256, 4]

 CALLS: ***
	BOX_MESSAGE, data_chk [1], data_chk [2]
 CALLED BY:
	LATEST_SFDS_GIF, axis_get_edges, flare_hist, get_ssc_best, goes3sec_copy
	html_remove_template, image2movie, lapalma_files, make_mirror, mdi_files, mk_sdcs
	read_genxcat, restore_idl_routines, sobel_scale, ssw_fov_context, ssw_kyoto2dst
	ssw_start_rpcserver, sxt_ssn2fits [1], time_window, trace_euv_resp [1]
	trace_last_movie [1], trace_last_movie [3], trace_make_vignette
	trace_movie_context, trace_special_movie [1], trace_special_movie [2]
	trace_special_movie [3], trace_special_movie2, trace_uv_resp, yo_mkos1_dbase
   History:
      16-July-1998 - S.L.Freeland - tired of repeating this logic.


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

   Purpose: format status info for task_wait

 CALLS:


LAT2Y $SSW/gen/idl/solar/lat2y.pro
[Previous] [Next]
 PROJECT:
       SOHO - CDS

 NAME:
       LAT2Y()

 PURPOSE:
       Convert heliographic latitute to Y value in arcsec

 EXPLANATION:
       Given the X position (in arcsec) of a point and optionally the
       heliographic latitude of the point, this routine returns the Y
       position (in arcsec) of the point, and optionally the heliographic
       longitude of the point.

 CALLING SEQUENCE:
       y = lat2y(x, lat, date=date)

 INPUTS:
       X   - X value of the point in arcsec

 OPTIONAL INPUTS:
       LAT - heliographic latitute of the point in degrees. If this parameter
             is missing, zero degree latitude will be assumed.

 OUTPUTS:
       Y   - Y value of the point in arcsec

 OPTIONAL OUTPUTS:
       LONGI - Heliographic longitude of the concerned point (in degs)

 KEYWORD PARAMETERS:
       DATE - Date/Time in CCSDS or ECS time format, based on which the
              coversion is done. If missing, the current system time will be
              used 

 CALLS: ***
	ANYTIM2UTC [1], ANYTIM2UTC [2], GET_UTC, PB0R
 COMMON BLOCKS:
       None.

 RESTRICTIONS:
       None.

 SIDE EFFECTS:
       None.

 CATEGORY:

 PREVIOUS HISTORY:
       Written May 1, 1995, Liyun Wang, GSFC/ARC

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

 VERSION:
       Version 1, May 1, 1995


LATEST_IMAGE $SSW/gen/idl/synoptic/latest_image.pro
[Previous] [Next]
 Project     : HESSI

 Name        : LATEST_IMAGE

 Purpose     : return latest image from Synoptic archive

 Category    : synoptic gbo hessi

 Syntax      : IDL> map=latest_image(time,back=back)

 Inputs      : TIME = image closest to this time is returned
     
 Output      : MAP = image in map structure or object format

 Keywords    : BACK = # of days back in time to search [def=3]
               TYPE = /EIT,/BBSO,/TRACE,/MEUD,/MDI
               LAST = return last saved image
               FOUND = 1/0 if image is found/not found
               OBJECT = return map as an object
               FORCE = force a new read
             
 CALLS: ***
	ANYTIM2TAI, ANYTIM2UTC [1], ANYTIM2UTC [2], ARR2STR [1], Arr2Str [2], DELVARX [1]
	DELVARX [2], DELVARX [3], DELVARX [4], DPRINT, GET_TEMP_DIR, GET_UTC, VALID_MAP
	VALID_TIME, delvarx [5], is_number [1], is_number [2], is_struct
 History     : Written 1 Feb 2003, D. Zarro (EER/GSFC)

 Contact     : dzarro@solar.stanford.edu


lcur_calc [1] $SSW/gen/idl/genutil/lcur_calc.pro
[Previous] [Next]
NAME:
	lcur_calc
PURPOSE:
	To calculate the light curve averages for the LCUR_IMAGE routine
INPUT:
	index	- the index structure
	data	- the data array
       marks   - The subscripts within the image that were selected.  The
                 output array is NxM where N is the largest number of subscripts
                 that were selected in a region, and M is the number of
                 different regions selected.  When padding is necessary, the
                 value is set to -1, so that value needs to be avoided.
OPTIONAL INPUT
	uncert	- The uncertainty array
	satpix	- The saturated pixel array
OUTPUT:
	plotmark- The plotting mark to be used.  If "uncert" and "satpix" are
		  not passed in, then it is always "1"
			for average uncert > 0.25	- value = 4 (diamond)
			for any sat pixel in region	- value = 5 (triangle)
			for over 25% sat pix in region	- value = 2 (astrix)
	avg_uncert- The average uncertainty
 CALLS: ***
	gt_expdur [1], gt_expdur [2]
 CALLED BY:
	lcur_image
OPTIONAL KEYWORD INPUT:
	normalize - If set, then divide by the exposure duration to normalize
		    to DN/sec.
	total_cnts - If set, then return the total counts in the region (not
		    the counts per second)
HISTORY:
	Written 18-Oct-93 by M.Morrison
	19-Oct-93 (MDM) - Added header information
			- Corrected /TOTAL_CNTS option
	28-Feb-95 (MDM) - Added avg_uncert output


lcur_image $SSW/gen/idl/display/lcur_image.pro
[Previous] [Next]
NAME:
	lcur_image
PURPOSE:
	To display a normalized light curve plot for image data.  The user
	can select the portion of the image to be averaged.
EXPLANATION:
	If UNCERT and SATPIX are passed in, then certain data points will
	be flagged with a different plot symbol.  The symbols are:
                       for average uncert > 0.25%      - value = 4 (diamond)
                       for any sat pixel in region     - value = 5 (triangle)
                       for over 25% sat pix in region  - value = 2 (astrix)
SAMPLE CALLING SEQUENCE:
	lcur_image, index, data
	lcur_image, index, data, lcur
	lcur_image, index, data, lcur, uncert, satpix
	lcur_image, index, data, xsiz=512
	lcur_image, index, data, xsiz=512, /poly
	lcur_image, index, data, xsiz=512, /nonorm, subscript=subscript
	lcur_image, index, data, lcur, uncert, satpix, avg_uncert=avg_uncert
INPUT:
	index	- The index structure
	data	- The data array.  It should alreay have been background
		  subtracted in order to display proper light curves
		  to be DN/sec (for SXT images, call SXT_PREP with /normalize)
		  Data could be exposure normalized coming in or else it
		  will normalize it for you (if it is SXT image data)
OUTPUT:
	lcur	- The light curve results in a 2-D array with is N x M
		  where N is the number of images, and M is the number of
		  different light curves.
OPTIONAL INPUT:
	uncert	- The uncertainty array (output from SXT_PREP).  
		  If the uncertainy array is passed, then the routine will 
		  flag points which have a large uncertainty.
	satpix	- The saturated pixel map array (output from SXT_PREP)
		  If the saturated pixel array is passed, then the routine will 
		  flag points which are saturated
 CALLS: ***
	BOX_MESSAGE, GET_KBRD2, LCUR_REGION, STEPPER [1], STEPPER [2], STEPPER [3]
	STEPPER [4], STEPPER [5], STEPPER [6], STEPPER [7], WDEF [1], WDEF [2], anytim [1]
	anytim [2], anytim [3], anytim [4], anytim [5], data_chk [1], data_chk [2]
	get_infox, lcur_calc [1], lcur_calc [2], lcur_plot [1], lcur_plot [2]
	lcur_plotr [1], lcur_plotr [2], pprint [1], pprint [2], required_tags, restsys [1]
	restsys [2], savesys [1], savesys [2], tbeep [1], tbeep [2], tbeep [3]
 CALLED BY:
	HXT_LCURVE, STEPPER [3], STEPPER [4], box_lc_array, box_sxthxt_fsp, hxtbox_fsp
	sxtbox_fsp, sxtbox_teem
OPTIONAL KEYWORD INPUT:
	normalize - If set, the images being passed in have been background
		  subtracted, but not normalized.  The counts being displayed
		  will be exposure normalized before being displayed.
		  This is the default as of 30-Nov-93 for SXT inputs.
	nonormalize - If set, the images will not be exposure normalized.
	total_cnts - If set, the display will be the total counts in the
		  region (not the average which is default)
	nodisplay - If set, then do not display a copy of the image
		    using stepper (it is already displayed)
	bin	- If /NODISPLAY is used, then this routine needs to know if
		  the image was rebinned when displayed.  This is the rebinning
		  factor.
	xsiz	- Bin the output image to this size when displaying it
	ysiz	- Bin the output image to this size when displaying it
	subscript - The list of subscripts of the images to use.  If not passed
		  it will use all images.
	lastss	- The image number of the image that is displayed (normally used
		  with the /nodisplay option)
	noscale	- If set, do not auto scale the image (passed down to STEPPER)
	plot6	- If set, then plot 6 panels
	polygon_mark - If set, then use the polygon method for marking regions
	nodel_win_p - If set, do not delete the window with the light curve plot
       info_arrray - optional text array for image labels (1 per image)

OPTIONAL KEYWORD OUTPUT:
	marks	- The subscripts within the image that were selected.  The
		  output array is NxM where N is the largest number of subscripts
		  that were selected in a region, and M is the number of
		  different regions selected.  When padding is necessary, the
		  value is set to -1, so that value needs to be avoided.
	avg_uncert - The average uncertainty calculated and used to display
		  the error bars.
HISTORY:
	Written 16-Oct-93 by M.Morrison to replace BOX_LC
	19-Oct-93 (MDM) - Adjusted the header information some
			- Made many changes (added labeling of regions selected)
	25-Oct-93 (MDM) - Corrected menu ("A" was supposed to be "R")
			- Added subscript=subscript parameter to "m" option plot
			- Added /NOSCALE option (passed to STEPPER)
	26-Oct-93 (MDM) - Added /PLOT6 option (6 panel plots)
	29-Nov-93 (MDM) - Added /NOLCUR switch to call to STEPPER
			- Passed the index to stepper
			- Added /POLYGON_MARK option
	30-Nov-93 (MDM) - Made /NORMALIZE the default.  Added /NONORMALIZE.
	20-Jan-94 (MDM) - Fixed typo in menu list
	16-Feb-95 (MDM) - Added option to display the regions over an image, 
			  not a contour image
	28-Feb-95 (MDM) - Modified to plot error bars on uncertainty passed in
			- Added some header information
	 7-Mar-95 (MDM) - Added AVG_UNCERT as optional keyword output
       10-aug-99 S.L.Freeland - added some 'info_array' derivation for non-SXT
                 Permit compilation without SXT in SSW path
                 Use 'data_chk' for nx,ny,nimage to improve efficiency


lcur_plot [1] $SSW/gen/idl/genutil/lcur_plot.pro
[Previous] [Next]
NAME:
	lcur_plot
PURPOSE:
       To plot the light curve averages for the LCUR_IMAGE routine
INPUT:
	win	- The light curve plot window number
	index	- The index structure
	lcur	- The average (or total) counts for each image (and region)
	plotmark- The flag on what plotting symbols to plot for each image
		  (see LCUR_CALC)
OPTIONAL INPUT:
	avg_uncert-The uncertainty of the data points.  Plot as error bars
 CALLS: ***
	ERRPLOT [1], ERRPLOT [2], OUTPLOT [1], OUTPLOT [2], OUTPLOT [3], UTPLOT [1]
	UTPLOT [2], UTPLOT [3], UTPLOT [4], UTPLOT [5], UTPLOT [6], int2secarr [1]
	int2secarr [2]
 CALLED BY:
	lcur_image
OPTIONAL KEYWORD INPUT:
	ynozero	- If set, adjust y scale so it is not zero if necessary
	qoplot	- If set, do not make a new plot, simply overplot the
		  data
	subscript- The image numbers of the images to plot the light
		  curve for
	ioff	- The region number (used when plotting a single 
		  light curve, not needed when doing multiple light
		  curve plot option)
HISTORY:
       Written 18-Oct-93 by M.Morrison
       19-Oct-93 (MDM) - Added header information
                       - Corrected /TOTAL_CNTS option
	26-Oct-93 (MDM) - Corrected overplotting symbol bug
	28-Feb-95 (MDM) - Added AVG_UNCERT 


lcur_plotr [1] $SSW/gen/idl/genutil/lcur_plotr.pro
[Previous] [Next]
NAME:
	lcur_plotr
PURPOSE:
       To generate a line plot showing the location of the regions selected.
	Overlay the regions selected on top of a contour of an image.  Called
	by LCUR_IMAGE
SAMPLE CALLING SEQUENCE:
	lcur_plotr, image, marks, index
INPUT:
	image	- A single image array
       marks   - The subscripts within the image that were selected.  The
                 output array is NxM where N is the largest number of subscripts
                 that were selected in a region, and M is the number of
                 different regions selected.  When padding is necessary, the
                 value is set to -1, so that value needs to be avoided.
	index	- The index for the image so that the time/date can be
		  provided in the contour image.
 CALLS: ***
	CONGRID [1], CONGRID [2], CONGRID [3], fmt_tim [1], fmt_tim [2], ocontour [1]
	ocontour [2], ocontour [3], ocontour [4], ocontour [5], tv2 [1], tv2 [2]
	xyouts2 [1], xyouts2 [2]
 CALLED BY:
	lcur_image
OPTIONAL KEYWORD INPUT:
	qas_image- If set, display the data as an image, not a contour plot
HISTORY:
       Written 18-Oct-93 by M.Morrison
	29-Nov-93 (MDM) - Modified the header information
	16-Feb-95 (MDM) - Added /QAS_IMAGE option
	28-Feb-95 (MDM) - Modified how /QAS_IMAGE worked - use TV2 so
			  that hardcopy is possible
	08-Apr-98, William Thompson, GSFC
		Changed !D.N_COLORS to !D.TABLE_SIZE for 24-bit displays


LEAP_YEAR $SSW/gen/idl/time/leap_year.pro
[Previous] [Next]
 PROJECT:
       SOHO - CDS/SUMER

 NAME:
       LEAP_YEAR()

 PURPOSE: 
       Check if a given year number is a leap year

 CATEGORY:
       Utility, time
 
 SYNTAX: 
       Result = leap_year(year)

 INPUTS:
       YEAR - Integer scalar, year number

 OPTIONAL INPUTS: 
       None.

 OUTPUTS:
       RESULT - 1 or 0,  if YEAR is or is not a leap year

 OPTIONAL OUTPUTS:
       None.

 KEYWORDS: 
       None.

 CALLED BY:
	XGET_UTC
 COMMON:
       None.

 RESTRICTIONS: 
       None.

 SIDE EFFECTS:
       None.

 HISTORY:
       Version 1, April 3, 1996, Liyun Wang, GSFC/ARC. Written
       Version 2, September 5, 2000, D. Biesecker
             (corrected 100 yr/400 yr bug)

 CONTACT:
       Liyun Wang, GSFC/ARC (Liyun.Wang.1@gsfc.nasa.gov)


LEGEND [1] $SSW/gen/idl/display/legend2.pro
[Previous] [Next]
 NAME:
       LEGEND
 PURPOSE:
       Create an annotation legend for a plot.
 EXPLANATION:
       This procedure makes a legend for a plot.  The legend can contain
       a mixture of symbols, linestyles, Hershey characters (vectorfont),
       and filled polygons (usersym).  A test procedure, legendtest.pro,
       shows legend's capabilities.  Placement of the legend is controlled
       with keywords like /right, /top, and /center or by using a position
       keyword for exact placement (position=[x,y]) or via mouse (/position).
 CALLING SEQUENCE:
       LEGEND [,items][,keyword options]
 CALLED BY:
	GE_WINDOW [1], GOES_MEWE_TEM, HESSI_ATTENUATOR_SPECTRA, LEGENDTEST
	PLOT_RESULTS [2], PLOT_SOURCES, hsi_image_plot, hsi_imagefile2png, hsi_obs_times
	hsi_one_qlook_image, hsi_show_flags [2], inspec_f, inspec_t, plot_goes_ospex
	plot_goesp, soon_cadence, sooncat_cadence, trace_cosmic2hist_accum
 EXAMPLES:
       The call:
               legend,['Plus sign','Asterisk','Period'],psym=[1,2,3]
         produces:
               -----------------
               |               |
               |  + Plus sign  |
               |  * Asterisk   |
               |  . Period     |
               |               |
               -----------------
         Each symbol is drawn with a plots command, so they look OK.
         Other examples are given in optional output keywords.

       lines = indgen(6)                       ; for line styles
       items = 'linestyle '+strtrim(lines,2)   ; annotations
       legend,items,linestyle=lines            ; vertical legend---upper left
       items = ['Plus sign','Asterisk','Period']
       sym = [1,2,3]
       legend,items,psym=sym                   ; ditto except using symbols
       legend,items,psym=sym,/horizontal       ; horizontal format
       legend,items,psym=sym,box=0             ; sans border
       legend,items,psym=sym,delimiter='='     ; embed '=' betw psym & text
       legend,items,psym=sym,margin=2          ; 2-character margin
       legend,items,psym=sym,position=[x,y]    ; upper left in data coords
       legend,items,psym=sym,pos=[x,y],/norm   ; upper left in normal coords
       legend,items,psym=sym,pos=[x,y],/device ; upper left in device coords
       legend,items,psym=sym,/position         ; interactive position
       legend,items,psym=sym,/right            ; at upper right
       legend,items,psym=sym,/bottom           ; at lower left
       legend,items,psym=sym,/center           ; approximately near center
       legend,items,psym=sym,number=2          ; plot two symbols, not one
       legend,items,/fill,psym=[8,8,8],colors=[10,20,30]; 3 filled squares
 INPUTS:
       items = text for the items in the legend, a string array.
               For example, items = ['diamond','asterisk','square'].
               You can omit items if you don't want any text labels.
 OPTIONAL INPUT KEYWORDS:

       linestyle = array of linestyle numbers  If linestyle[i] < 0, then omit
               ith symbol or line to allow a multi-line entry.     If 
               linestyle = -99 then text will be left-justified.  
       psym = array of plot symbol numbers.  If psym[i] is negative, then a
               line connects pts for ith item.  If psym[i] = 8, then the
               procedure usersym is called with vertices define in the
               keyword usersym.   If psym[i] = 88, then use the previously
               defined user symbol
       vectorfont = vector-drawn characters for the sym/line column, e.g.,
               ['!9B!3','!9C!3','!9D!3'] produces an open square, a checkmark,
               and a partial derivative, which might have accompanying items
               ['BOX','CHECK','PARTIAL DERIVATIVE'].
               There is no check that !p.font is set properly, e.g., -1 for
               X and 0 for PostScript.  This can produce an error, e.g., use
               !20 with PostScript and !p.font=0, but allows use of Hershey
               *AND* PostScript fonts together.
       N. B.: Choose any of linestyle, psym, and/or vectorfont.  If none is
               present, only the text is output.  If more than one
               is present, all need the same number of elements, and normal
               plot behaviour occurs.
               By default, if psym is positive, you get one point so there is
               no connecting line.  If vectorfont[i] = '',
               then plots is called to make a symbol or a line, but if
               vectorfont[i] is a non-null string, then xyouts is called.
       /help = flag to print header
       /horizontal = flag to make the legend horizontal
       /vertical = flag to make the legend vertical (D=vertical)
       box = flag to include/omit box around the legend (D=include)
       clear = flag to clear the box area before drawing the legend
       background - color for legend background (implies /CLEAR)
       delimiter = embedded character(s) between symbol and text (D=none)
       colors = array of colors for plot symbols/lines (D=!P.color)
       textcolors = array of colors for text (D=!P.color)
       margin = margin around text measured in characters and lines
       spacing = line spacing (D=bit more than character height)
       pspacing = psym spacing (D=3 characters) (when number of symbols is
             greater than 1)
       charsize = just like !p.charsize for plot labels
       charthick = just like !p.charthick for plot labels
       thick = array of line thickness numbers (D = !P.thick), if used, then 
               linestyle must also be specified
       position = data coordinates of the /top (D) /left (D) of the legend
       normal = use normal coordinates for position, not data
       device = use device coordinates for position, not data
       number = number of plot symbols to plot or length of line (D=1)
       usersym = 2-D array of vertices, cf. usersym in IDL manual. 
             (/USERSYM =square, default is to use existing USERSYM definition)
       /fill = flag to fill the usersym
       /left_legend = flag to place legend snug against left side of plot
                 window (D)
       /right_legend = flag to place legend snug against right side of plot
               window.    If /right,pos=[x,y], then x is position of RHS and
               text runs right-to-left.
       /top_legend = flag to place legend snug against top of plot window (D)
       /bottom = flag to place legend snug against bottom of plot window
               /top,pos=[x,y] and /bottom,pos=[x,y] produce same positions.

       If LINESTYLE, PSYM, VECTORFONT, THICK, COLORS, or TEXTCOLORS are
       supplied as scalars, then the scalar value is set for every line or
       symbol in the legend.
 Outputs:
       legend to current plot device
 OPTIONAL OUTPUT KEYWORDS:
       corners = 4-element array, like !p.position, of the normalized
         coords for the box (even if box=0): [llx,lly,urx,ury].
         Useful for multi-column or multi-line legends, for example,
         to make a 2-column legend, you might do the following:
           c1_items = ['diamond','asterisk','square']
           c1_psym = [4,2,6]
           c2_items = ['solid','dashed','dotted']
           c2_line = [0,2,1]
           legend,c1_items,psym=c1_psym,corners=c1,box=0
           legend,c2_items,line=c2_line,corners=c2,box=0,pos=[c1[2],c1[3]]
           c = [c1[0]<c2[0],c1[1]<c2[1],c1[2]>c2[2],c1[3]>c2[3]]
           plots,[c[0],c[0],c[2],c[2],c[0]],[c[1],c[3],c[3],c[1],c[1]],/norm
         Useful also to place the legend.  Here's an automatic way to place
         the legend in the lower right corner.  The difficulty is that the
         legend's width is unknown until it is plotted.  In this example,
         the legend is plotted twice: the first time in the upper left, the
         second time in the lower right.
           legend,['1','22','333','4444'],linestyle=indgen(4),corners=corners
                       ; BOGUS LEGEND---FIRST TIME TO REPORT CORNERS
           xydims = [corners[2]-corners[0],corners[3]-corners[1]]
                       ; SAVE WIDTH AND HEIGHT
           chdim=[!d.x_ch_size/float(!d.x_size),!d.y_ch_size/float(!d.y_size)]
                       ; DIMENSIONS OF ONE CHARACTER IN NORMALIZED COORDS
           pos = [!x.window[1]-chdim[0]-xydims[0] $
                       ,!y.window[0]+chdim[1]+xydims[1]]
                       ; CALCULATE POSITION FOR LOWER RIGHT
           plot,findgen(10)    ; SIMPLE PLOT; YOU DO WHATEVER YOU WANT HERE.
           legend,['1','22','333','4444'],linestyle=indgen(4),pos=pos
                       ; REDO THE LEGEND IN LOWER RIGHT CORNER
         You can modify the pos calculation to place the legend where you
         want.  For example to place it in the upper right:
           pos = [!x.window[1]-chdim[0]-xydims[0],!y.window[1]-xydims[1]]
 CALLS: ***
	DOC_LIBRARY, LEGEND2
 Common blocks:
       none
 Procedure:
       If keyword help is set, call doc_library to print header.
       See notes in the code.  Much of the code deals with placement of the
       legend.  The main problem with placement is not being
       able to sense the length of a string before it is output.  Some crude
       approximations are used for centering.
 Restrictions:
       Here are some things that aren't implemented.
       - An orientation keyword would allow lines at angles in the legend.
       - An array of usersyms would be nice---simple change.
       - An order option to interchange symbols and text might be nice.
       - Somebody might like double boxes, e.g., with box = 2.
       - Another feature might be a continuous bar with ticks and text.
       - There are no guards to avoid writing outside the plot area.
       - There is no provision for multi-line text, e.g., '1st line!c2nd line'
         Sensing !c would be easy, but !c isn't implemented for PostScript.
         A better way might be to simply output the 2nd line as another item
         but without any accompanying symbol or linestyle.  A flag to omit
         the symbol and linestyle is linestyle[i] = -1.
       - There is no ability to make a title line containing any of titles
         for the legend, for the symbols, or for the text.
 Side Effects:
 Modification history:
       write, 24-25 Aug 92, F K Knight (knight@ll.mit.edu)
       allow omission of items or omission of both psym and linestyle, add
         corners keyword to facilitate multi-column legends, improve place-
         ment of symbols and text, add guards for unequal size, 26 Aug 92, FKK
       add linestyle(i)=-1 to suppress a single symbol/line, 27 Aug 92, FKK
       add keyword vectorfont to allow characters in the sym/line column,
         28 Aug 92, FKK
       add /top, /bottom, /left, /right keywords for automatic placement at
         the four corners of the plot window.  The /right keyword forces
         right-to-left printing of menu. 18 Jun 93, FKK
       change default position to data coords and add normal, data, and
         device keywords, 17 Jan 94, FKK
       add /center keyword for positioning, but it is not precise because
         text string lengths cannot be known in advance, 17 Jan 94, FKK
       add interactive positioning with /position keyword, 17 Jan 94, FKK
       allow a legend with just text, no plotting symbols.  This helps in
         simply describing a plot or writing assumptions done, 4 Feb 94, FKK
       added thick, symsize, and clear keyword Feb 96, W. Landsman HSTX
               David Seed, HR Wallingford, d.seed@hrwallingford.co.uk
       allow scalar specification of keywords, Mar 96, W. Landsman HSTX
       added charthick keyword, June 96, W. Landsman HSTX
       Made keyword names  left,right,top,bottom,center longer,
                                 Aug 16, 2000, Kim Tolbert
       Added ability to have regular text lines in addition to plot legend 
       lines in legend.  If linestyle is -99 that item is left-justified.
       Previously, only option for no sym/line was linestyle=-1, but then text
       was lined up after sym/line column.    10 Oct 2000, Kim Tolbert
       Make default value of thick = !P.thick  W. Landsman  Jan. 2001
       Don't overwrite existing USERSYM definition  W. Landsman Mar. 2002
       S.L.Freeland - circa 1-jan-2004 - add BACKGROUND keyword+function
                      (need to merge with released/ASTRON)


LEGEND [2] $SSW/gen/idl_libs/astron/plot/legend.pro
[Previous] [Next]
 NAME:
       LEGEND
 PURPOSE:
       Create an annotation legend for a plot.
 EXPLANATION:
       This procedure makes a legend for a plot.  The legend can contain
       a mixture of symbols, linestyles, Hershey characters (vectorfont),
       and filled polygons (usersym).  A test procedure, legendtest.pro,
       shows legend's capabilities.  Placement of the legend is controlled
       with keywords like /right, /top, and /center or by using a position
       keyword for exact placement (position=[x,y]) or via mouse (/position).
 CALLING SEQUENCE:
       LEGEND [,items][,keyword options]
 CALLED BY:
	GE_WINDOW [1], GOES_MEWE_TEM, HESSI_ATTENUATOR_SPECTRA, LEGENDTEST
	PLOT_RESULTS [2], PLOT_SOURCES, hsi_image_plot, hsi_imagefile2png, hsi_obs_times
	hsi_one_qlook_image, hsi_show_flags [2], inspec_f, inspec_t, plot_goes_ospex
	plot_goesp, soon_cadence, sooncat_cadence, trace_cosmic2hist_accum
 EXAMPLES:
       The call:
               legend,['Plus sign','Asterisk','Period'],psym=[1,2,3]
         produces:
               -----------------
               |               |
               |  + Plus sign  |
               |  * Asterisk   |
               |  . Period     |
               |               |
               -----------------
         Each symbol is drawn with a plots command, so they look OK.
         Other examples are given in optional output keywords.

       lines = indgen(6)                       ; for line styles
       items = 'linestyle '+strtrim(lines,2)   ; annotations
       legend,items,linestyle=lines            ; vertical legend---upper left
       items = ['Plus sign','Asterisk','Period']
       sym = [1,2,3]
       legend,items,psym=sym                   ; ditto except using symbols
       legend,items,psym=sym,/horizontal       ; horizontal format
       legend,items,psym=sym,box=0             ; sans border
       legend,items,psym=sym,delimiter='='     ; embed '=' betw psym & text
       legend,items,psym=sym,margin=2          ; 2-character margin
       legend,items,psym=sym,position=[x,y]    ; upper left in data coords
       legend,items,psym=sym,pos=[x,y],/norm   ; upper left in normal coords
       legend,items,psym=sym,pos=[x,y],/device ; upper left in device coords
       legend,items,psym=sym,/position         ; interactive position
       legend,items,psym=sym,/right            ; at upper right
       legend,items,psym=sym,/bottom           ; at lower left
       legend,items,psym=sym,/center           ; approximately near center
       legend,items,psym=sym,number=2          ; plot two symbols, not one
       legend,items,/fill,psym=[8,8,8],colors=[10,20,30]; 3 filled squares
 INPUTS:
       items = text for the items in the legend, a string array.
               For example, items = ['diamond','asterisk','square'].
               You can omit items if you don't want any text labels.
 OPTIONAL INPUT KEYWORDS:

       linestyle = array of linestyle numbers  If linestyle[i] < 0, then omit
               ith symbol or line to allow a multi-line entry.     If 
               linestyle = -99 then text will be left-justified.  
       psym = array of plot symbol numbers.  If psym[i] is negative, then a
               line connects pts for ith item.  If psym[i] = 8, then the
               procedure usersym is called with vertices define in the
               keyword usersym.   If psym[i] = 88, then use the previously
               defined user symbol
       vectorfont = vector-drawn characters for the sym/line column, e.g.,
               ['!9B!3','!9C!3','!9D!3'] produces an open square, a checkmark,
               and a partial derivative, which might have accompanying items
               ['BOX','CHECK','PARTIAL DERIVATIVE'].
               There is no check that !p.font is set properly, e.g., -1 for
               X and 0 for PostScript.  This can produce an error, e.g., use
               !20 with PostScript and !p.font=0, but allows use of Hershey
               *AND* PostScript fonts together.
       N. B.: Choose any of linestyle, psym, and/or vectorfont.  If none is
               present, only the text is output.  If more than one
               is present, all need the same number of elements, and normal
               plot behaviour occurs.
               By default, if psym is positive, you get one point so there is
               no connecting line.  If vectorfont[i] = '',
               then plots is called to make a symbol or a line, but if
               vectorfont[i] is a non-null string, then xyouts is called.
       /help = flag to print header
       /horizontal = flag to make the legend horizontal
       /vertical = flag to make the legend vertical (D=vertical)
       box = flag to include/omit box around the legend (D=include)
		  outline_color = color of box outline (D = !P.color)
       clear = flag to clear the box area before drawing the legend
       delimiter = embedded character(s) between symbol and text (D=none)
       colors = array of colors for plot symbols/lines (D=!P.color)
       font = scalar font graphics keyword (-1,0 or 1) for text
       textcolors = array of colors for text (D=!P.color)
       margin = margin around text measured in characters and lines
       spacing = line spacing (D=bit more than character height)
       pspacing = psym spacing (D=3 characters) (when number of symbols is
             greater than 1)
       charsize = just like !p.charsize for plot labels
       charthick = just like !p.charthick for plot labels
       thick = array of line thickness numbers (D = !P.thick), if used, then 
               linestyle must also be specified
       position = data coordinates of the /top (D) /left (D) of the legend
       normal = use normal coordinates for position, not data
       device = use device coordinates for position, not data
       number = number of plot symbols to plot or length of line (D=1)
       usersym = 2-D array of vertices, cf. usersym in IDL manual. 
             (/USERSYM =square, default is to use existing USERSYM definition)
       /fill = flag to fill the usersym
       /left_legend = flag to place legend snug against left side of plot
                 window (D)
       /right_legend = flag to place legend snug against right side of plot
               window.    If /right,pos=[x,y], then x is position of RHS and
               text runs right-to-left.
       /top_legend = flag to place legend snug against top of plot window (D)
       /bottom = flag to place legend snug against bottom of plot window
               /top,pos=[x,y] and /bottom,pos=[x,y] produce same positions.

       If LINESTYLE, PSYM, VECTORFONT, THICK, COLORS, or TEXTCOLORS are
       supplied as scalars, then the scalar value is set for every line or
       symbol in the legend.
 Outputs:
       legend to current plot device
 OPTIONAL OUTPUT KEYWORDS:
       corners = 4-element array, like !p.position, of the normalized
         coords for the box (even if box=0): [llx,lly,urx,ury].
         Useful for multi-column or multi-line legends, for example,
         to make a 2-column legend, you might do the following:
           c1_items = ['diamond','asterisk','square']
           c1_psym = [4,2,6]
           c2_items = ['solid','dashed','dotted']
           c2_line = [0,2,1]
           legend,c1_items,psym=c1_psym,corners=c1,box=0
           legend,c2_items,line=c2_line,corners=c2,box=0,pos=[c1[2],c1[3]]
           c = [c1[0]<c2[0],c1[1]<c2[1],c1[2]>c2[2],c1[3]>c2[3]]
           plots,[c[0],c[0],c[2],c[2],c[0]],[c[1],c[3],c[3],c[1],c[1]],/norm
         Useful also to place the legend.  Here's an automatic way to place
         the legend in the lower right corner.  The difficulty is that the
         legend's width is unknown until it is plotted.  In this example,
         the legend is plotted twice: the first time in the upper left, the
         second time in the lower right.
           legend,['1','22','333','4444'],linestyle=indgen(4),corners=corners
                       ; BOGUS LEGEND---FIRST TIME TO REPORT CORNERS
           xydims = [corners[2]-corners[0],corners[3]-corners[1]]
                       ; SAVE WIDTH AND HEIGHT
           chdim=[!d.x_ch_size/float(!d.x_size),!d.y_ch_size/float(!d.y_size)]
                       ; DIMENSIONS OF ONE CHARACTER IN NORMALIZED COORDS
           pos = [!x.window[1]-chdim[0]-xydims[0] $
                       ,!y.window[0]+chdim[1]+xydims[1]]
                       ; CALCULATE POSITION FOR LOWER RIGHT
           plot,findgen(10)    ; SIMPLE PLOT; YOU DO WHATEVER YOU WANT HERE.
           legend,['1','22','333','4444'],linestyle=indgen(4),pos=pos
                       ; REDO THE LEGEND IN LOWER RIGHT CORNER
         You can modify the pos calculation to place the legend where you
         want.  For example to place it in the upper right:
           pos = [!x.window[1]-chdim[0]-xydims[0],!y.window[1]-xydims[1]]
 CALLS: ***
	DOC_LIBRARY
 Common blocks:
       none
 Procedure:
       If keyword help is set, call doc_library to print header.
       See notes in the code.  Much of the code deals with placement of the
       legend.  The main problem with placement is not being
       able to sense the length of a string before it is output.  Some crude
       approximations are used for centering.
 Restrictions:
       Here are some things that aren't implemented.
       - An orientation keyword would allow lines at angles in the legend.
       - An array of usersyms would be nice---simple change.
       - An order option to interchange symbols and text might be nice.
       - Somebody might like double boxes, e.g., with box = 2.
       - Another feature might be a continuous bar with ticks and text.
       - There are no guards to avoid writing outside the plot area.
       - There is no provision for multi-line text, e.g., '1st line!c2nd line'
         Sensing !c would be easy, but !c isn't implemented for PostScript.
         A better way might be to simply output the 2nd line as another item
         but without any accompanying symbol or linestyle.  A flag to omit
         the symbol and linestyle is linestyle[i] = -1.
       - There is no ability to make a title line containing any of titles
         for the legend, for the symbols, or for the text.
 Side Effects:
 Modification history:
       write, 24-25 Aug 92, F K Knight (knight@ll.mit.edu)
       allow omission of items or omission of both psym and linestyle, add
         corners keyword to facilitate multi-column legends, improve place-
         ment of symbols and text, add guards for unequal size, 26 Aug 92, FKK
       add linestyle(i)=-1 to suppress a single symbol/line, 27 Aug 92, FKK
       add keyword vectorfont to allow characters in the sym/line column,
         28 Aug 92, FKK
       add /top, /bottom, /left, /right keywords for automatic placement at
         the four corners of the plot window.  The /right keyword forces
         right-to-left printing of menu. 18 Jun 93, FKK
       change default position to data coords and add normal, data, and
         device keywords, 17 Jan 94, FKK
       add /center keyword for positioning, but it is not precise because
         text string lengths cannot be known in advance, 17 Jan 94, FKK
       add interactive positioning with /position keyword, 17 Jan 94, FKK
       allow a legend with just text, no plotting symbols.  This helps in
         simply describing a plot or writing assumptions done, 4 Feb 94, FKK
       added thick, symsize, and clear keyword Feb 96, W. Landsman HSTX
               David Seed, HR Wallingford, d.seed@hrwallingford.co.uk
       allow scalar specification of keywords, Mar 96, W. Landsman HSTX
       added charthick keyword, June 96, W. Landsman HSTX
       Made keyword names  left,right,top,bottom,center longer,
                                 Aug 16, 2000, Kim Tolbert
       Added ability to have regular text lines in addition to plot legend 
       lines in legend.  If linestyle is -99 that item is left-justified.
       Previously, only option for no sym/line was linestyle=-1, but then text
       was lined up after sym/line column.    10 Oct 2000, Kim Tolbert
       Make default value of thick = !P.thick  W. Landsman  Jan. 2001
       Don't overwrite existing USERSYM definition  W. Landsman Mar. 2002
	     Added outline_color BT 24 MAY 2004
       Pass font keyword to xyouts commands.  M. Fitzgerald, Sep. 2005


LEGENDTEST $SSW/gen/idl_libs/astron/plot/legendtest.pro
[Previous] [Next]
 NAME:
	LEGENDTEST
 PURPOSE:
	Demo program to show capabilities of  the legend procedure.
 CALLING SEQUENCE:
	legendtest
 INPUTS:
	none
 OPTIONAL INPUTS:
	none
 KEYWORDS:
	none
 OUTPUTS:
	legends of note
 CALLS: ***
	LEGEND [1], LEGEND [2], LEGEND [3]
 COMMON BLOCKS:
	none
 SIDE EFFECTS:
	Sets !20 font to symbol if PostScript and !p.font=0.
 RESTRICTIONS:
	With the vectorfont test, you'll get different results for PostScript
	depending on the value of !p.font.
 MODIFICATION HISTORY:
	write, 27 Aug 92, F.K.Knight (knight@ll.mit.edu)
	add test of /left,/right,/top,/bottom keywords, 21 June 93, FKK
	update based on recent changes to legend, 7 Feb 94, FKK
	Converted to IDL V5.0   W. Landsman   September 1997


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

   Purpose: return info from SolarSoft Latest Events Archive

   Input Parameters:
      time0 - time or event name -or- start time of range
      time1 - optional stop time of range

   Output:        
      default output is 'latest_events' data structure(s)
      or as defined/limited by optional keyword switches
      representative structure(s)
         ** Structure <20d2d8>, 13 tags, length=176, data length=166, refs=1:
   DATE_OBS        STRING    '2004-01-10T01:21:00.000'
   ENAME           STRING    'gev_20040110_0116'
   CLASS           STRING    'C1.2'
   FSTART          STRING    '2004/01/10 01:16:00'
   FSTOP           STRING    '2004/01/10 01:23:00'
   FPEAK           STRING    '2004/01/10 01:21:00'
   XCEN            INT            510
   YCEN            INT           -145
   HELIO           STRING    'S11W32'
   LFILES          STRING    'SXI_20040110_011410851_BB_12.FTS,SXI_20040110'..

      If two parameters are passed, records/fields within the range
         are returned
      If one parameter is supplied, then:
        If date only (no time), all records for the day are returned
        If date+time,  it is interpreted as an event time, and only 
           the closest record is returned

   Keyword Parameters:
      summary_url (switch) - if set, output is top level summary URL(s)
      event_url   (switch) - if set, output is event level URLS(s)
      movie_url   (switch) - if set, output is movie_url(s)
      sxi/eit     (switch) - preference of movie_url output
      loc_url     (switch) - if set, output is locator image url used
      helio       (switch) - if set, output is heliographic location(s) 
      current     (switch) - if set, use current 'latest_events', not archive
      refresh     (switch) - if set, force update of socket metaindex list 
                             (socket listing -> common block)
      count (output)       - number of valid things returned; zero if problem.. 

   Calling Examples:
      levts=les_archive_info('5-nov-2003')       ; all records for day 
      levts=les_archive_info('5-NOV-03  10:46')  ; One record (closest)

      levts=les_archive_info('4-nov-2003 15:00', '6-nov-2003 12:00') ; range

      more,les_archive_info('5-nov-2003',/summary_url)             ; summary url 
         http://www.lmsal.com/solarsoft/last_events_20031107_1014 ; ~centered

 CALLS: ***
	BOX_MESSAGE, BREAK_URL, FILE2TIME, SINCE_VERSION [1], SINCE_VERSION [2], SOCK_LIST
	anytim [1], anytim [2], anytim [3], anytim [4], anytim [5], data_chk [1]
	data_chk [2], get_gevloc_data, get_logenv [1], get_logenv [2], gt_tagval [1]
	gt_tagval [2], reltime [1], reltime [2], sel_timrange [1], sel_timrange [2]
	ssw_deltat, str_replace [1], str_replace [2], strextract, tim2dset [1]
	tim2dset [2], time_window
   Common Blocks:
      les_archive_info_blk - output of meta index socket listing

   History:
      14-jan-2004 - S.L.Freeland

   Restrictions:
     Requires IDL version >= 5.4 since it uses rsi 'socket' procedure 
     BETA - only /SUMMARY_URL and default output (full dbase structures)
            implemented as of today...

   Note: although I may change the where (archive home(s) ) and how of 
         deriving the data returned by this function, it should keep working...
         Let me know otherwise: freeland@penumbra.nascom.nasa.gov


LIMB_INFO $SSW/gen/idl/image_tool/limb_info.pro
[Previous] [Next]
 PROJECT:
       SOHO - CDS

 NAME:
       LIMB_INFO

 PURPOSE:
       Get position of solar disk center and radius from an image.

 EXPLANATION:
       This routine calls FIND_LIMB2 (a modified version of FIND_LIMB
       from the Yohkoh IDL library) to determine the coordinates of
       the solar disk center (in data pixels) and the solar radius
       (also in data pixels). It shares the same restriction imposed
       by FIND_LIMB.

 CALLING SEQUENCE:
       LIMB_INFO, image, date_obs, x0, y0, scale

 INPUTS:
       IMAGE    -- A 2D image array that contains the full disk image of
                   the sun.
       DATE_OBS -- String scalar, date/time in any CDS format

 OPTIONAL INPUTS:
       None.

 OUTPUTS:
       X0    -- X position of the solar center in data pixels
       Y0    -- Y position of the solar center in data pixels
       SCALE -- scale factor of the image in arc seconds per pixel
       R0    -- Radius of the solar disk in data pixels

 OPTIONAL OUTPUTS:
       None.

 KEYWORD PARAMETERS:
       None.

 CALLS: ***
	FIND_LIMB2, PB0R
 CALLED BY:
	ITOOL_LIMBFITTER, MAKE_AUTO_FIT, MAKE_MANUAL_FIT, MK_LIMBFIT_BS, UPDATE_FITLIMB
 COMMON BLOCKS:
       None.

 RESTRICTIONS:
       See find_limb.pro

 SIDE EFFECTS:
       None.

 CATEGORY:

 PREVIOUS HISTORY:
       Written October 7, 1994, by Liyun Wang, NASA/GSFC

 MODIFICATION HISTORY:

 VERSION:
       Version 1, October 7, 1994


line_cent $SSW/gen/idl/genutil/line_cent.pro
[Previous] [Next]
    Subroutine to calculate the line center of a given spectral line


   Input:     Line intensity
     Optional:  pixel start value (if different from 0)
                variable in which to return error on I (in units of I)
                number of points on either side of minimum to fit
                degree of polynomial fit (default = 2, the most reliable)
                best guess for line center

  For polynomial fits of order greater than 2, there may be more than
  one real root to the equation setting the derivative to zero so there
  may be some ambiguity about the line center.  This routine finds the
  closest root to the minimum grid point.  Degree 2 is the most reliable
  since there is at most one root.  The degree is required to be even
  since this guarantees at least one real root if there is a solution
  to the equation.

        T. Metcalf   Feb 1990

  3/9/90  If best_guess parameter is present fit a parabola about this
          point rather than the minimum point
 CALLS:
 CALLED BY
	fit_limb


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

   Purpose: make an ~IDL image color table cooexist with a <linecolors> table

   Input Parameters:
      table - IDL standard color tables (see loadct), default = #3(red)

   Keyword Parameters:
      gamma -   if set, gamma factor 
      reverse - if set, reverse
      data - optional data array to scale (scaled to image color table)

   Calling Sequence:
      line_table,table# [,/reverse, gamma=gamma, data=data]

 CALLED BY:
	image2movie, sxt2mpeg
   History:
      14-nov-1995 (SLF) - merge color plots and image display for WWW
                          allow colorful line plots and approximation of 
			   standard IDL color tables for (scaled) images
      15-July-1996 (SLF) - simplified by calling 'stretch_range.pro'

 CALLS: ***
	LOADCT, STRETCH_RANGE, linecolors [1], linecolors [2]
   Side Effects:
      loads a color table (and common block) - optionally scale data


LINECOLOR $SSW/gen/idl/display/linecolor.pro
[Previous] [Next]
 Project     : SOHO - CDS

 Name        : 
	LINECOLOR
 Purpose     : 
	Set a color index to a particular color.
 Explanation : 
	Set one particular element in each of the red, green and blue color
	tables to some standard values for line plotting.
 Use         : 
	LINECOLOR,I_COLOR,S_COLOR
 Inputs      : 
	I_COLOR = Color table element to be used for line plotting.  Must be in
		  the range [0,!D.NCOLORS-1].  If SET is set, then the system
		  variable !P.COLOR is set to I_COLOR.
	S_COLOR = String variable denoting the color.  May be upper or lower
		  case.  Acceptable values are 'RED', 'GREEN', 'BLUE',
		  'YELLOW', 'ORANGE', 'PURPLE', 'MAGENTA', 'BROWN',
		  'TURQUOISE', 'BLACK' and 'WHITE'.
	DISABLE	= If set, then TVSELECT not used.
 Opt. Inputs : 
	None.
 Outputs     : 
	None.
 Opt. Outputs: 
	None.
 Keywords    : 
	SET	= If set, then !P.COLOR is changed by this procedure.
 Calls       : ***
	TRIM, TVSELECT, TVUNSELECT
 CALLED BY:
	SET_LINE_COLOR, SHOW_COLORS, TILT_NIS1_DEMO, TILT_NIS2_DEMO
 Common      : 
	None.
 Restrictions: 
	The variable S_COLOR must be of type string.

	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: 
	If SET is set, then the variable !P.COLOR is set to I_COLOR.
 Category    : 
	Utilities, Image_display.
 Prev. Hist. : 
	William Thompson	Applied Research Corporation
	July, 1986		8201 Corporate Drive
				Landover, MD  20785

	William Thompson, April 1992, changed to use TVLCT,/GET instead of
				      common block, and added DISABLE keyword.
 Written     : 
	William Thompson, GSFC, July 1986.
 Modified    : 
	Version 1, William Thompson, GSFC, 13 May 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 3, William Thompson, GSFC, 18 December 2002
		Changed !COLOR to !P.COLOR
 Version     : 
	Version 3, 18 December 2002


linecolors [1] $SSW/gen/idl/display/linecolors.pro
[Previous] [Next]

 file LINECOLORS.PRO

 Create a color table with "n" distinct color indices at the low end of
 the table and the index at !D.TABLE_SIZE-1 with the colors defined below.

	Where: the first color index will be black
	       'n' is the number of distinct colors hard coded below
	       and, the last color index is white

 INDEX NUMBER   COLOR PRODUCED (if use default colors)
 	0		black
	1		maroon
	2               red
	3		pink
	4		orange
	5		yellow
	6		olive
	7		green
	8		dark green
	9		cyan
	10		blue
	11		dark blue
	12              magenta
	13              purple

 General color table stuff:
	Each color available is made up of the values found in three arrays.
	These array represent how much RED, GREEN, and BLUE color to use.
	A value of zero means don't use any of that color.
	A value of 255 means use the maximum amount of that color.
 	These arrays are considered your 'color guns'.

	How large your 'color gun' arrays can be is determined by your system.
	!D.N_COLORS system variable hold the max number of colors you can have.
 	!D.TABLE_SIZE is the maximum number of indices you may use.
	You may not have all 255 colors.
	So for each 'color index' you must decide how much RED, GREEN and
		BLUE you want.
	The combination of these three 'color gun' arrays will be the color
		that appears in the individual 'color index'.


 CALLING SEQUENCE:
       LINECOLORS 	is the simplest form. It produces a color table with
			the colors listed above and loads it. All you do is
			call it and use the plot keyword COLOR=x.
			Where x is the index number from above.

	LINECOLORS [,MYCOL_R=mycol_g, MYCOL_G=mycol_g, MYCOL_B=mycol_b,
		     LINE_R=line_g, LINE_G=line_g, LINE_B=line_b,
		     table=table,  /NOLOAD, /NOTOP, /NOSQUEEZE, USED=used,
                    /image, /help, error=error]

 INPUT:
	MYCOL_R : If present, an array (convert to byte) containing the
		  red gun values (0-255) to overwrite the common array COLORS
		  This array is expanded or compressed to fit. Will override
		  the TABLE keyword value.
	MYCOL_G : Same as above for green.
	MYCOL_B : Same as above for blue.
       IMAGE   : If set, the distinct colors are placed at the top of the
                 color array (easier for imaging) instead of at the bottom
                 easier for plotting). 
	TABLE  : The number of an IDL User Library Color Table, to be loaded.
		 It will be this table that is compressed into the indices
		 remaining after MYCOL_R,_G,_B or the defaults arrays.
	NOLOAD : If set, don't do a TVLCT in this program.
		 This new color table will not be active until doing a TVLCT
	NOTOP  : If set, don't put white in the index at !D.TABLE_SIZE-1
		 Not all original color tables will have white at the top.
       NOSQUEEZE: If set, don't squeeze the current color table into
		   the indices not taken by the distinct colors. The bottom
		   colors of the original table will be overwritten the
		   rest will remain as they were. Ignored if the keywords
		   MYCOL_R, MYCOL_G, MYCOL_B are set.
       SQUEEZE:  opposite of NOSQUEEZE (this is the default)
       HELP:     If set and device='x', display a colorbar with indices
		  (!d.window is reset to original window number)

 OUTPUT:
	LINE_R : If present, returns the red color gun values for this new
		 color table. This array is the same as found in the IDL
		 common array R_CURR, upon returning.
	LINE_G : Same as above for green.
	LINE_B : Same as above for blue.

       USED   : If present, returns the number of indices used by the
		 distinct colors at the low end of the color table.
		 Doesn't include the overwritting of the top index to white,
		 or any value of MYCOL_R, MYCOL_G, MYCOL_B.

       also see the explaination of x_CURR below.
       ERROR  : 0/1 means no error / error


 CALLS: ***
	CONGRID [1], CONGRID [2], CONGRID [3], LOADCT, WDEF [1], WDEF [2]
 CALLED BY:
	ACRIM, ACRIM_EV, ACRIM_OUT, BATSE_FLARES_WEEK, EIT_SUBFIELD, EIT_SUB_UTIL_FILE
	FS_ARCHIVE_DRAW, FS_OVERLAY, GE_WINDOW [1], GOES_MEWE_TEM, GOES_TEK [1]
	GOES_TEK [2], GOES__DEFINE, HXARCHIVE, HXFITS, HXIS, HXRBS, PLOTMAP, PLOT_CRAB, PLOT_GD
	PLOT_HESSI_FILTERS, PLOT_OCCS, PLOT_OCC_ONDAY, QL_DAY_PLOT, ROUTINE_NAME [1]
	SETUP_DRM, SPEX_PLOT_SAVED [1], SPEX_PLOT_SAVED [2], SUBFIELD_EV, TERM_REVIEW
	TERM_REVIEW_GIF, WBSC [1], WBSC [2], box_lc_plot, eit_proton_summary
	event_movie [1], event_movie [2], evt_demo, fem_grid [1], fem_grid [2], get_slider
	hessi_splash, line_table, out_spectra_4_designer, plot_ace, plot_goes_ospex
	plot_goesp, plot_sxg, res_freq, set_field, setup_spex [1], setup_spex [2]
	show_contacts, soon_cadence, soon_catstat, sooncat_cadence, spex_splash
	term_score2, tim2tfss, trace_cosmic2hist_accum
 COMMON:
     COMMON COLORS, R_ORIG, G_ORIG, B_ORIG, R_CURR, G_CURR, B_CURR
	This IDL common contains the current color table.

 SIDE EFFECTS:
	The color table side will be determined by the current device
	If the device is not 'X' or 'WIN', an informational message will be printed.


 RESTRICTIONS:
	The output graphic device must accept the LOADCT calls, if
	/TABLE is set or if no previous table has been loaded.
       The output graphic device must accept the TVLCT call, unless
	the /NOLOAD keyword is set.

 PROCEDURE:
	Some time before you do your plot command, call this routine.

          LINECOLOR

	If you use the /NOLOAD keyword, then upon returning you will need
	to load the new created color table with TVLCT, <red>,<green>,<blue>

	   LINECOLORS, LINE_R=LINE_R, LINE_G=LINE_G, LINE_B=LINE_B, /NOLOAD
	   TVLCT, LINE_R, LINE_G, LINE_B


	To postscript printer :
		SET_PLOT,'PS',/copy  ; prints plot the postscript file

		DEVICE, [FILENAME=filename]		; black and white print
		  or
		DEVICE, [FILENAME=filename], /color     ; color print

	To plot, use the desired color index, by using the plotting
	   keyword COLOR=index.
	You may want to first plot the axises in white then over plot the
	   data in a distinct color.

             plot, x, y,  /nodata ...             ; titles and axes
						   ; color defaults to the
						   ; largest index. In our
						   ; color table this is white
						   ; Black for prints.

 	      oplot, x, y, color=n ...		   ; Plot the data. 'n' is
						   ; the color index of choice

       If you were printing then you'll need to close the output file,
	   and print.

             DEVICE,/CLOSE
	      PSPLOT, FILENAME=filename           ; for black and white
	      PSPLOT, FILENAME=filename, /color	  ; for color print

       An example:
			pro brian, color=color   ; color is 0 for b/w
						 ;          1 for color

   			linecolors
  			set_plot,'ps',/copy
			if not(color) then device,file='brain.ps' $
  			else device,file='brain.ps', color=color

  			plot, indgen(100), /nodata
  			oplot, (indgen(100)-10)>0, color=1
  			oplot, (indgen(100)-20)>0, color=3
  			oplot, (indgen(100)-30)>0, color=5
  			oplot, (indgen(100)-40)>0, color=7
  			oplot, (indgen(100)-50)>0, color=9

  			device,/close
  			if not(color) then psplot,filename='brain.ps' $
  			else psplot,filename='brain.ps',/color

			return  & end

 MODIFICATION HISTORY:
	Elaine Einfalt (HSTX)
	MAY 93 - If mycol_r,g,b arrays are passes they are added
		 after the distinct colors, not instead.
       23-sep-94 (SLF) - added HELP keyword (display color bar with indices)
		2-Aug-2000, Kim Tolbert - everywhere it checks for X, make it also check for WIN
       17-May-2004 - Einfalt - merged the ssw and the eit ops versions, by adding
                     the /image keyword, which if set, will put the line colors at
		      the top of the array, not bottom.
       14-Mar-2005 - S.L.Freeland - added the historically documented but missing NOSQUEEZE keyword
                     to the routine def; kept undocumented but defined SQUEEZE for backward-compat.


LINEID_PLOT $SSW/gen/idl_libs/astron/plot/lineid_plot.pro
[Previous] [Next]
 NAME:
	LINEID_PLOT
 PURPOSE:
	 Plot spectrum with specified line identifications annotated at the
	 top of the plot.

 CALLING SEQUENCE:
	lineid_plot, wave, flux, wline, text1, [ text2, 
			LCHARSIZE=, LCHARTHICK=, EXTEND =, ...plotting keywords]

 INPUTS:
	wave - wavelength vector for the plot
	flux - flux vector
	wline - wavelength vector of line identifications.  (only the lines 
		between	the plot limits will be used)
	text1 - string array of text to be used to annotate each line
	text2 - (OPTIONAL) second string array of text to be used for
		line annotation.  Since the text is written with
		proportional spaced characters, TEXT2 can be used if
		you want two sets of annotation to be alinged:

		eg:	Cr IV  1390.009
			Fe V   1390.049
			Ni IV  1390.184
			    instead of
			Cr IV 1390.009
			Fe V 1390.049
			Ni IV 1390.184

 OPTIONAL KEYWORD INPUTS:
	EXTEND - specifies that the annotated lines should have a dotted line 
		extended to the spectrum to indicate the line position.  
		EXTEND can be a scalar (applies to all lines) or a vector with
		a different value for each line.  The value of EXTEND gives 
		the line IDL plot line thickness for the dotted lines.
		If EXTEND is a vector each dotted line can have a different 
		thickness.  A value of 0 indicates that no dotted line is to 
		be drawn. (default = scalar 0)
	LCHARSIZE - the character size of the annotation for each line.
		If can be a vector so that different lines are annotated with 
		different size characters.  LCHARSIZE can be used to make 
		stronger lines have a larger annotation. (default = scalar 1.0).
	LCHARTHICK = the character thickness of the annotation for each line. 
		It can be a vector so that different lines are annotated with 
		characters of varying thickness.   LCHARTHICK can be used to 
		make stronger lines have a bolder annotation. 
		(default = !p.charthick)

	LINEID_PLOT uses the _EXTRA facility to allow the use of any plotting
	keywords (e.g. LINESTYLE, CHARSIZE) to be passed to the plot

 CALLS: ***
	LINTERP
 SIDE EFFECTS:
	Program uses SET_VIEWPORT to set the !P.POSITION parameter to allow
	room for the annotation.   This system variable can be reset to the 
	default value by setting !P.POSTION=0 or typing SET_VIEWPORT with no 
	parameters

 OPERATIONAL NOTES:
	Once the program has completed, You can use OPLOT to draw additional
	plots on the display. 

	If your annotated characters are not being rotated properly,
	try setting !P.FONT to a non zero value.
 EXAMPLE:
	Annotate some interstellar lines between 1240 and 1270 A.

	IDL> w = 1240+ indgen(300)*0.1    ;Make a wavelength vector
	IDL> f = randomn(seed,300)        ;Random flux vector
	IDL> id = ['N V','Si II','Si II','Si II']   ;Line IDs
	IDL> wl = [1242.80,1260.42,1264.74,1265.00] ;Line positions
	IDL> lineid_plot,w,f,wl,id,wl,/ext

	Note that LINEID_PLOT is smart enough not to overlap the annotation
	for the two closely spaced lines at 1264.74 and 1265.00	
 HISTORY:
	version 1  D. Lindler Jan, 1992
	Sept 27, 1993  DJL  fixed bug in /extend option
	Apr 19, 1994 DJL corrected bug in sorting of charthick (cthick)
	Sep 1996, W. Landsman,  added _EXTRA keyword, changed keyword names
		CHARTHICK==>LCHARTHICK, CHARSIZE==>LCHARSIZE
	Converted to IDL V5.0   W. Landsman   September 1997
       Work with !P.MULTI   W. Landsman   December 2003


linflx [1] $SSW/gen/idl/spectra/linflx.pro
[Previous] [Next]
  NAME:
   linflx
  PURPOSE:
   Compute the Mewe line spectrum for EM=1.e44 cm^-3
  CALLING SEQUENCE:
    linflx,Te6,wave,Flux               ; ph s-1
    linflx,Te6,wave,Flux,/photon       ; ph s-1
    linflx,Te6,wave,Flux,/erg          ; erg s-1
    linflx,Te6,wave,Flux,wave_range=wave_range
    linflx,Te6,wave,Flux,/cosmic	; Use cosmic abudances
    linflx,Te6,wave,Flux,Line,Trans	; Return line information

  INPUTS:
    Te6        = Electron Temperature in MK
  OUTPUTS:
    wave       = Wavelengths of lines
    Flux       = Fluxes of lines.  If Te6 is
                 a vector, then Flux = fltarr(N_elements(Te6),N_elements(wave))
  OPTIONAL INPUT KEYWORDS:
    photon     = If set, calculation is made in ph s-1 (default)
    erg        = If set, calculation is made in erg s-1
    wave_range = A 2-element vector with the desired lower and upper wavelength
                 limits (Ang).  For example, wave_range = [2.,60.] will 
                 calculate only those lines between 2 and 60 A.
    cosmic	= If set, read the cosmic abundance file
    file_in	= To explicitly specify the Mewe line-list file.
  OPTIONAL OUTPUTS:
    Line	= Character string with ion information
    Trans	= Character string with transition informaiton
  OPTIONAL OUTPUT KEYWORDS:
    Abun	= Abundances used for calculation
    elem	= Elements corresponding to the abundances

  METHOD:
    Reads $DIR_SXT_SENSITIVE/mewe_solar.genx
       or $DIR_SXT_SENSITIVE/mewe_cosmic.genx if /cosmic switch is specified.
          Data directory is also $DIR_GEN_SPECTRA to support $SSW/gen/idl/spectra.

 CALLS: ***
	DOC_LIBRARY, DSPLINE, INTERPOL, LOC_FILE [1], LOC_FILE [2], LOC_FILE [3]
	PICKLAMBDA [1], PICKLAMBDA [2], SPLINE, restgen [1], restgen [2]
 CALLED BY:
	mewe_spec  mewe_spec_lwa, mewe_spec [1], mewe_spec [2]
    Note:  	If Line argument is present, then picklambda is not called
       	to sum up lines at the same wavelength

  MODIFICATION HISTORY:
    29-oct-92, Written, J. R. Lemen, LPARL
    25-jan-93, JRL  -- change call to picklambda
    25-feb-93, JRL  -- Mewe file converted to genx file.
     8-apr-93, JRL  -- Added optional output parameter
     7-jul-93, JRL  -- Added file_in keyword
    18-may-94, JRL  -- Fixed up check to prevent unnecessary file reads.
    21-jun-95, JRL  -- Minor change to make 171A line calculation work with
			with the SPEX85 data files.  And change to be able
			work with the SPEX95 data files.
			Changed the units to return in terms of 1.e44
    10-nov-98, RAS  -- Allow mewe_xxxxx.genx to be found in DIR_GEN_SPECTRA, too.
    01-DEC-98, PGS  -- Added '.genx' to 'mewe_xxxxx' in two calls to loc_file 
    04-Jul-99, LWA  -- Mod to handle case of a single wavelength per bin
			when working in photons.


LINKED_LIST $SSW/gen/idl/objects/linked_list__define.pro
[Previous] [Next]
 NAME:
   LINKED_LIST

 FILENAME:
   linked_list__define.pro

 PURPOSE:
   The purpose of this program is to implement a list that
   is linked in both the forward and backward directions. There
   is no restriction as to what can be stored in a linked list
   node. The linked list is implemented as an object.

 AUTHOR:
   FANNING SOFTWARE CONSULTING
   David Fanning, Ph.D.
   2642 Bradbury Court
   Fort Collins, CO 80521 USA
   Phone: 970-221-0438
   E-mail: davidf@dfanning.com
   Coyote's Guide to IDL Programming: http://www.dfanning.com/

   Modified, May 2000, Tolbert (Raytheon) & Zarro (SM&A) - added some
   error checks
   Modified, 4 July 2000, Zarro (EIT/GSFC) -- added needed
    PTR_FREE call in DELETE_NODES to prevent memory leak
   Modified, March 12 2001, Bilodeau, (Raytheon) - fixed bug in
    ADD_AFTER where nodes to be added at number of nodes-1 were not
    added to the end of the list.  Removed redundant call to ptr_exist
     in HELP method.
   Modified, Sept 20, 2001,  Zarro (EIT/GSFC) -- added /no_copy and /replace
   Modified, 7-Dec-2002, Zarro (EER/GSFC) -- use free_var when deleting
     items
   Modified, 10-Jan-2003, Zarro (EER/GSFC) -- switch to use heap_free 
     when deleting items
   Modified, 18 Oct-2004, Zarro (L-3Com/GSFC) -- Renamed to LINKED_LIST
     to avoid conflict with Fanning
   Modified, 15-Nov-2005, Zarro (L-3Com/GSFC) - changed ptr_free to heap_free

 CATEGORY:
   General programming. Objects

 CALLING SEQUENCE:
   mylist = Obj_New('LINKED_LIST', item)

 OPTIONAL INPUTS:
   item: The first item added to the list. Items can be any
     valid IDL variable type.

 CALLS: ***
	DPRINT, LINKED_LIST::ADD, LINKED_LIST::ADD_AFTER, LINKED_LIST::ADD_BEFORE
	LINKED_LIST::ADD_TO_END, LINKED_LIST::CLEANUP, LINKED_LIST::DELETE
	LINKED_LIST::DELETE_LAST_NODE, LINKED_LIST::DELETE_NODE
	LINKED_LIST::DELETE_NODES, LINKED_LIST::GET_COUNT, LINKED_LIST::GET_ITEM
	LINKED_LIST::GET_NODE, LINKED_LIST::GET_VALUE, LINKED_LIST::HAVE_ITEM
	LINKED_LIST::HELP, LINKED_LIST::INIT, LINKED_LIST::MOVE_NODE
	LINKED_LIST__DEFINE, PTR_EXIST
 COMMON BLOCKS:
   Are you kidding?!

 RESTRICTIONS:
   Be sure to destroy the LINKED_LIST object when you are finished
   with it: Obj_Destroy, mylist

   Node index numbers start at 0 and go to n-1, where n is the
   number of items in the list.



LINKEDLIST $SSW/gen/idl/objects/linkedlist__define.pro
[Previous] [Next]
 NAME:
   LINKEDLIST

 FILENAME:
   linkedlist__define.pro

 PURPOSE:
   The purpose of this program is to implement a list that
   is linked in both the forward and backward directions. There
   is no restriction as to what can be stored in a linked list
   node. The linked list is implemented as an object.

 AUTHOR:
   FANNING SOFTWARE CONSULTING
   David Fanning, Ph.D.
   2642 Bradbury Court
   Fort Collins, CO 80521 USA
   Phone: 970-221-0438
   E-mail: davidf@dfanning.com
   Coyote's Guide to IDL Programming: http://www.dfanning.com/

   Modified, May 2000, Tolbert (Raytheon) & Zarro (SM&A) - added some
   error checks
   Modified, 4 July 2000, Zarro (EIT/GSFC) -- added needed
    PTR_FREE call in DELETE_NODES to prevent memory leak
   Modified, March 12 2001, Bilodeau, (Raytheon) - fixed bug in
    ADD_AFTER where nodes to be added at number of nodes-1 were not
    added to the end of the list.  Removed redundant call to ptr_exist
     in HELP method.
   Modified, Sept 20, 2001,  Zarro (EIT/GSFC) -- added /no_copy and /replace
   Modified, 7-Dec-2002, Zarro (EER/GSFC) -- use free_var when deleting
     items
   Modified, 10-Jan-2003, Zarro (EER/GSFC) -- switch to use heap_free 
     when deleting items

 CATEGORY:
   General programming. Objects

 CALLING SEQUENCE:
   mylist = Obj_New('LINKEDLIST', item)

 OPTIONAL INPUTS:
   item: The first item added to the list. Items can be any
     valid IDL variable type.

 CALLS: ***
	DPRINT, LINKEDLIST::ADD, LINKEDLIST::ADD_AFTER, LINKEDLIST::ADD_BEFORE
	LINKEDLIST::ADD_TO_END, LINKEDLIST::CLEANUP, LINKEDLIST::DELETE
	LINKEDLIST::DELETE_LAST_NODE, LINKEDLIST::DELETE_NODE
	LINKEDLIST::DELETE_NODES, LINKEDLIST::GET_COUNT, LINKEDLIST::GET_ITEM
	LINKEDLIST::GET_NODE, LINKEDLIST::GET_VALUE, LINKEDLIST::HAVE_ITEM
	LINKEDLIST::HELP, LINKEDLIST::INIT, LINKEDLIST::MOVE_NODE, LINKEDLIST__DEFINE
	PTR_EXIST
 COMMON BLOCKS:
   Are you kidding?!

 RESTRICTIONS:
   Be sure to destroy the LINKEDLIST object when you are finished
   with it: Obj_Destroy, mylist

   Node index numbers start at 0 and go to n-1, where n is the
   number of items in the list.

 PUBLIC METHODS:

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

 PRO LINKEDLIST::ADD, item, index, AFTER=after, BEFORE=before

   The ADD method adds a data item to the list.

   Parameters:

   item: The data item to be added to the list. Required.

   index: The location in the list where the data item is
     to be added. If neither the AFTER or BEFORE keyword is
     set, the item is added AFTER the item at the index location.
     If index is missing, the index points to the last item in
     the list. Optional.

   Keywords:

   AFTER: If this keyword is set, the item is added after the
     item at the current index.

   BEFORE: If this keyword is set, the item is added before the
     item at the current index.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

 PRO LINKEDLIST::DELETE, index, ALL=all

   The DELETE method deletes an item from the list.

   Parameters:

   index: The location in the list where the data item is
     to be delete. If index is missing, the index points to
     the last item in the list. Optional.

   Keywords:

   ALL: If this keyword is set, all items in the list are deleted.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

 FUNCTION LINKEDLIST::GET_COUNT

   The GET_COUNT method returns the number of items in the list.

   Return Value: The number of items stored in the linked list.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

 FUNCTION LINKEDLIST::GET_ITEM, index

   The GET_ITEM method returns a pointer to the specified data
   item from the list.

   Parameters:

   index: The location in the list from which the data item is
     to be retrieved. If not present, the last item in the list
     is retrieved. Optional.

   Return Value: A pointer to the specified data item stored
     in the list.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

 FUNCTION LINKEDLIST::GET_NODE, index

   The GET_NODE method returns a pointer to the specified node
   from the list.

   Parameters:

   index: The location in the list from which the data node is
     to be retrieved. If not present, the last node in the list
     is retrieved. The node is a structure with three fields:
     Previous is a pointer to the previous node in the list.
     Next is a pointer to the next node in the list. A null pointer
     in the previous field indicates the first node on the list. A
     null pointer in the next field indicates the last node on the
     list. The item field is a pointer to the item stored in the
     node. Optional.

   Return Value: A pointer to the specified node structure in
     the linked list.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

 PRO LINKEDLIST::HELP, PRINT=print

 The HELP method performs a HELP command on each item
 in the linked list.

   Keywords:

    PRINT: If this keyword is set, the PRINT command is used
      instead of the HELP command on the items in the list.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

 PRO LINKEDLIST::MOVE_NODE, nodeIndex, location, BEFORE=before

   The MOVE_NODE method moves a list node from one location to another.

   Parameters:

   nodeIndex: The location in the list of the node you are moving.
     Required.

   location: The location (index) you are moving the node to. If
     location is missing, the location points to the node at the
     end of the list.

   Keywords:

    BEFORE: If this keyword is set, the node is added to the
      list before the location node. Otherwise, it is added after
      the location node.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

 EXAMPLE:

   mylist = Obj_New("LINKEDLIST", 5)
   mylist->Add, 10
   mylist->Add, 7.5, 1, /Before
   mylist->Add, 12.5
   mylist->Help
   mylist->Delete
   mylist->Help, /Print

 MODIFICATION HISTORY:
   Written by: David Fanning, 25 August 98.


LINTERP $SSW/gen/idl_libs/astron/math/linterp.pro
[Previous] [Next]
 NAME:   
       LINTERP  
 PURPOSE: 
       Linearly interpolate tabulated 1-d data from one grid to a new one.
 EXPLANATION:
       The results of LINTERP are numerically equivalent to the RSI
       INTERPOL() function, but note the following:
         (1) LINTERP is a procedure rather than a function
         (2) INTERPOL() extrapolates beyond the end points whereas LINTERP
             truncates to the endpoints (or uses the MISSING keyword)
         (3) LINTERP (unlike INTERPOL) uses the intrinsic INTERPOLATE function
                 and thus may have a speed advantage
         (4) LINTERP always converts the new grid vector to floating point 
                (because INTERPOLATE does this) whereas INTERPOL() will 
                 keep double precision if supplied.

       Use QUADTERP for quadratic interpolation.

 CALLING SEQUENCE:
       LINTERP, Xtab, Ytab, Xint, Yint, [MISSING =, /NoInterp ]   

 INPUT PARAMETERS: 
       Xtab -  Vector containing the current independent variable grid.
               Must be monotonic increasing or decreasing
       Ytab -  Vector containing the current dependent variable values at 
               the XTAB grid points.
       Xint -  Scalar or vector containing the new independent variable grid 
               points for which interpolated value(s) of the dependent 
               variable are sought.    Note that -- due to a limitation of the
               intrinsic INTERPOLATE() function -- Xint is always converted to
               floating point internally.

 OUTPUT PARAMETERS:
       Yint  -  Scalar or vector with the interpolated value(s) of the 
               dependent variable at the XINT grid points.
               YINT is double precision if XTAB or YTAB are double,
               otherwise YINT is REAL*4

 OPTIONAL INPUT KEYWORD:
       MISSING - Scalar specifying YINT value(s) to be assigned, when Xint
               value(s) are outside of the range of Xtab.     Default is to
               truncate the out of range YINT value(s) to the nearest value 
               of YTAB.   See the help for the INTERPOLATE function.
       /NoINTERP - If supplied then LINTERP returns the YTAB value(s) 
               associated with the closest XTAB value(s)rather than 
               interpolating.

 CALLS: ***
	TABINV, ZPARCHECK [1], ZPARCHECK [2], ZPARCHECK [3]
 CALLED BY:
	LINEID_PLOT, WFPC2_METRIC
 EXAMPLE:
       To linearly interpolate from a spectrum wavelength-flux pair
       WAVE, FLUX to another wavelength grid defined as:
       WGRID = [1540., 1541., 1542., 1543., 1544, 1545.]
   
       IDL>  LINTERP, WAVE, FLUX, WGRID, FGRID  

       FGRID will be a 6 element vector containing the values of FLUX 
       linearly interpolated onto the WGRID wavelength scale

 PROCEDURE: 
       Uses TABINV to calculate the effective index of the values
       in Xint in the table Xtab.  The resulting index is used
       with the intrinsic INTERPOLATE function to find the corresponding 
       Yint value in Ytab.  Unless the MISSING keyword is supplied, out
       of range Yint values are truncated to the nearest value of Ytab.

 PROCEDURES CALLED:
       TABINV, ZPARCHECK
 MODIFICATION HISTORY:
       Adapted from the IUE RDAF,  W. Landsman      October, 1988
       Modified to use the new INTERPOLATE function        June, 1992
       Modified to always return REAL*4             October, 1992
       Added MISSING keyword                        August, 1993
       Converted to IDL V5.0   W. Landsman   September 1997
       Added NoInterp keyword  W. Landsman      July 1999
       Work for unsigned, 64 bit integers  W. Landsman  October 2001


LIST_CACHE__DEFINE $SSW/gen/idl/objects/list_cache__define.pro
[Previous] [Next]
 Project     : HESSI

 Name        : LIST_CACHE__DEFINE

 Purpose     : Define a cache list object, whose contents persist
               in memory even after object is destroyed. 
               Yes, it uses common blocks, but their names are
               dynamically created so there is never a conflict.

 Category    : Ancillary GBO Synoptic Objects

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

 Properties  : NAME = cache name
               TSTART/TEND: start/end times used when creating list

 CALLS: ***
	ANYTIM2TAI, ANYTIM2UTC [1], ANYTIM2UTC [2], DELVARX [1], DELVARX [2], DELVARX [3]
	DELVARX [4], DPRINT, EXIST, LIST_CACHE::CLEANUP, LIST_CACHE::GETDATA
	LIST_CACHE::INIT, LIST_CACHE::SET, LIST_CACHE::SETDATA, LIST_CACHE::SHOW
	delvarx [5]
 History     : Written 8 Apr 2000, D. Zarro, SM&A/GSFC

 Contact     : dzarro@solar.stanford.edu


LIST_DIR $SSW/gen/idl/system/list_dir.pro
[Previous] [Next]
 Project     : EIS

 Name        : LIST_DIR

 Purpose     : fast directory listing

 Category    : utility system

 Syntax      : IDL> dirs=ls_dir(indir)

 Inputs      : INDIR = directory to search

 Outputs     : DIRS = directories in INDIR

 Keywords    : COUNT = # of directories found

 CALLS: ***
	ESPAWN, IS_DIR, OS_FAMILY, STR_TRAIL, WHERE2
 CALLED BY:
	xpickfile
 History     : Written, 29 April 2003, D. Zarro (L-3Com/GSFC)

 Contact     : dzarro@solar.stanford.edu


LIST_FILE $SSW/gen/idl/system/list_file.pro
[Previous] [Next]
 Project     : EIS

 Name        : LIST_FILE

 Purpose     : fast file listing

 Category    : utility system

 Syntax      : IDL> files=list_files(dir,filter=filter)

 Inputs      : DIR = directory to search

 Outputs     : FILES = files in PATH

 Keywords    : COUNT = # of files found
               FILTER = file filter (e.g. '*.*')

 CALLS: ***
	DPRINT, ESPAWN, GET_DELIM, IS_DIR, IS_STRING, OS_FAMILY, STR_TRAIL, WHERE2
	str_replace [1], str_replace [2]
 CALLED BY:
	db_gbo, xpickfile
 History     : Written, 11 June 2004, D. Zarro (L-3Com/GSFC)

 Contact     : dzarro@solar.stanford.edu


LIST_GEV $SSW/gen/idl/solar/list_gev.pro
[Previous] [Next]
 Project     : HESSI

 Name        : LIST_GEV

 Purpose     : determine GOES events within center/fov

 Category    : synoptic
;
 Syntax      : IDL> list_gev,tstart,tend,center,fov

 Inputs      : TSTART, TEND = start/end time range
               CENTER =[xc,yc] center fov is arcsecs
               FOV = [xsize,ysize] fov size in arcmin

 Outputs     : NOAA = string list, e.g., 1-may-00,N20E30,8311

 CALLS: ***
	ARR2STR [1], Arr2Str [2], EXIST, GET_GEV, HEL2ARCMIN [1], HEL2ARCMIN [2], HEL2XY
	IS_STRING, STR2ARR [1], STR2ARR [2], TRIM, VALID_TIME, gt_day [1], gt_day [2]
	gt_time [1], gt_time [2]
 History     : 6-Nov-2000, D.M. Zarro (EIT/GSFC),  Written

 Contact     : DZARRO@SOLAR.STANFORD.EDU


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

 Name        : LIST_MONTHS

 Purpose     : list month names

 Category    : utility date time 

 Syntax      : months=list_months()

 Inputs      : None

 Outputs     : MONTHS = string array of month names

 Keywords    : LOWER = convert to lower case
             : TRUNCATE = truncate to three letters

 CALLED BY:
	MK_SUMER_DBASE, hsi_ui_flarecat
 History     : Written 28 March 2002, D. Zarro (L-3Com/GSFC)

 Contact     : dzarro@solar.stanford.edu


LIST_NAR $SSW/gen/idl/solar/list_nar.pro
[Previous] [Next]
 Project     : HESSI

 Name        : LIST_NAR

 Purpose     : determine NOAA AR's within center/fov

 Category    : synoptic


 Syntax      : IDL> list_nar,tstart,tend,center,fov

 Inputs      : TSTART, TEND = start/end time range
               CENTER =[xc,yc] center fov is arcsecs
               FOV = [xsize,ysize] fov size in arcmin

 Outputs     : NOAA = string list, e.g., 1-may-00,N20E30,8311

 CALLS: ***
	ARR2STR [1], Arr2Str [2], EXIST, GET_NAR, HEL2XY, IS_STRING, STR2ARR [1], STR2ARR [2]
	TRIM2, VALID_TIME, gt_day [1], gt_day [2], is_number [1], is_number [2]
 CALLED BY:
	EIT_GBO, MDI_GBO, SXI_GBO, TRACE_GBO, db_gbo
 History     : 6-Nov-2000, D.M. Zarro (EIT/GSFC),  Written

 Contact     : DZARRO@SOLAR.STANFORD.EDU


LIST_PATH $SSW/gen/idl/help/list_path.pro
[Previous] [Next]
 Project     : SOHO - CDS

 Name        : LIST_PATH

 Category    : Help, Utility

 Purpose     : Manage listing of IDL path

 Explanation : Used in WWW version of XDOC

 Syntax      : IDL> list_path,file

 Inputs      : FILE = filename for output listing

 Opt. Inputs : None

 Outputs     : STDOUT listing of path (if FILE not entered)

 Opt. Outputs: None

 Keywords    : RESET = reset internal commons
               HESSI = add HESSI path
               BATSE = add BATSE path
               SMM = add SMM path

 Restrictions: None

 CALLS: ***
	CLEAN_PATH, DATATYPE [1], DATATYPE [2], DATATYPE [3], DPRINT, ESPAWN, EXIST, GET_LIB
	REM_LIB
 Side effects: None

 History     : Version 1,  1-Oct-1998,  D.M. Zarro.  Written

 Contact     : DZARRO@SOLAR.STANFORD.EDU


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

 Name        : LIST_PRINTER

 Purpose     : LIST available printers

 Category    : Help, Device

 Explanation : 

 Syntax      : IDL> list_printer,printers,desc

 CALLED BY:
	GET_DEF_PRINTER, XSEL_PRINTER, hsi_ui_flarecat, plotman
 Examples    :

 Inputs      : None

 Opt. Inputs : None

 Outputs     : PRINTER - printer que names

 Opt. Outputs: DESC -  description of each printer

 Keywords    : ERR - error messages

 CALLS: ***
	LIST_PRINTER_UNIX, LIST_PRINTER_VMS, OS_FAMILY
 Common      : None

 Restrictions: None

 Side effects: None

 History     : Version 1,  8-Aug-1995, D M Zarro . Written

 Contact     : DZARRO@SOLAR.STANFORD.EDU


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

 Name        : LIST_PRINTER_UNIX

 Purpose     : LIST available printers from /etc/printcap or /etc/printers.conf

 Category    : Help, Device

 Explanation : Reads /etc/printcap or /etc/printers.conf

 Syntax      : IDL> printers=list_printer_unix(desc)

 CALLED BY:
	LIST_PRINTER
 Examples    :

 Inputs      : None

 Opt. Inputs : None

 Outputs     : PRINTERS - printer que names

 Opt. Outputs: DESC -  description of each printer

 Keywords    : ERR - error messages

 CALLS: ***
	EXIST, LOC_FILE [1], LOC_FILE [2], LOC_FILE [3], RD_ASCII [1], RD_ASCII [2], REVERSE
	strmids [1], strmids [2], strnocomment
 Common      : LIST_PRINTER_UNIX - contains last reading of printcap file

 Restrictions: Unix only.

 Side effects: None

 History     : Version 1,  8-Aug-1995, D M Zarro . Written
               Version 2,  1 July 1996, S.V.H.Haugan (UiO)
                       Added PSLASER/PSCOLOR/PSCOLOR2 environmentals check.
               1-Nov-2000, Kim Tolbert - Previously only worked for unix machines with
                       /etc/printcap file for printers (DEC, ?). Added check
                       for /etc/printers.conf (Sun) also.
               18-Dec-2001, Kim Tolbert.  Some unix (linux) allows pipe symbol (|) in
                       lp definition (like :lp=|/usr/share/printconf/jetdirectprint:\)
                       so have to look for names in lines with | but no colon in first column.
                       Also, names can be in lines with |, or lines with : (if not in
                       first column), so append result of both kinds of search instead of
                       doing one or the other.
                       Also, eliminate all comment lines first
 Contact     : DZARRO@SOLAR.STANFORD.EDU


LIST_PRINTER_VMS $SSW/gen/idl/system/list_printer_vms.pro
[Previous] [Next]
 PROJECT:
       SOHO - CDS/SUMER

 NAME:
       LIST_PRINTER_VMS()

 PURPOSE:
       List names of all printer queues

 CATEGORY:
       Utility

 SYNTAX:
       Result = list_printer_vms()

 INPUTS:
       None.

 OPTIONAL INPUTS:
       None.

 OUTPUTS:
       RESULT - String array containing printer queue names

 OPTIONAL OUTPUTS:
       DESC - Description of printers listed

 KEYWORDS:
       RESET - Force to make a printer list if set
       ERROR - String containing possible error message; if no error occurs,
               the null string is returned

 CALLED BY:
	LIST_PRINTER
 COMMON:
       pname4vms - Internal common block

 RESTRICTIONS:
       Only work on VMS system

 SIDE EFFECTS:
       None.

 HISTORY:
       Version 1, September 20, 1996, Liyun Wang, NASA/GSFC. Written

 CONTACT:
       Liyun Wang, NASA/GSFC (Liyun.Wang.1@gsfc.nasa.gov)


LIST_SYNOP $SSW/gen/idl/synoptic/list_synop.pro
[Previous] [Next]
 Project     : HESSI

 Name        : LIST_SYNOP

 Purpose     : List available synoptic data servers and directory paths

 Category    : synoptic 

 Inputs      : None

 Outputs     : SERVERS = server names
               PATH = server paths

 Keywords    : None

 CALLED BY:
	SYNOP_PATH, SYNOP_SERVER
 History     : 20-Jan-2007, Zarro (ADNET/GSFC) - written.

 Contact     : DZARRO@SOLAR.STANFORD.EDU


LIST_WITH_PATH [1] $SSW/gen/idl/system/list_with_path.pro
[Previous] [Next]
 NAME: 
	LIST_WITH_PATH
 PURPOSE: 
	Search for files in a specified directory path.
 EXPLANATION:
	Lists files in a set of default paths, similar to using FINDFILE,
	except that a list of paths to be searched can be given.

 CALLING SEQUENCE: 
	Result = LIST_WITH_PATH( FILENAME, PATHS )

 INPUTS: 
	FILENAME   = Name of file to be searched for.  It may contain wildcard
		     characters, e.g. "*.dat".

	PATHS	   = One or more default paths to use in the search in case
		     FILENAME does not contain a path itself.  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.  The current
		     directory is always searched first, unless the keyword
		     NOCURRENT is set.

		     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.

 OUTPUTS: 
	The result of the function is a list of filenames.
 CALLS: ***
	BREAK_PATH [1], BREAK_PATH [2], BREAK_PATH [3], CONCAT_DIR [1], CONCAT_DIR [2]
	CONCAT_DIR [3], concat_dir [4]
 CALLED BY:
	DBHELP [1], DBHELP [2], DBHELP [3], DBOPEN [1], DBOPEN [2], DBOPEN [3]
 EXAMPLE:
	FILENAME = ''
	READ, 'File to open: ', FILENAME
	FILE = LIST_WITH_PATH( FILENAME, 'SERTS_DATA', '.fix' )
	IF FILE NE '' THEN ...
 PROCEDURE CALLS: 
	BREAK_PATH, CONCAT_DIR
 Category    : 
	Utilities, Operating_system
 REVISION HISTORY:
	Version 1, William Thompson, GSFC, 3 November 1994
	Documentation modified Wayne Landsman HSTX  November 1994
	Converted to IDL V5.0   W. Landsman   September 1997


LIST_WITH_PATH [2] $SSW/gen/idl_libs/astron/misc/list_with_path.pro
[Previous] [Next]
 NAME: 
	LIST_WITH_PATH
 PURPOSE: 
	Search for files in a specified directory path.
 EXPLANATION:
	Lists files in a set of default paths, similar to using FILE_SEARCH,
	except that a list of paths to be searched can be given.

 CALLING SEQUENCE: 
	Result = LIST_WITH_PATH( FILENAME, PATHS )

 INPUTS: 
	FILENAME   = Name of file to be searched for.  It may contain wildcard
		     characters, e.g. "*.dat".

	PATHS	   = One or more default paths to use in the search in case
		     FILENAME does not contain a path itself.  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.  The current
		     directory is always searched first, unless the keyword
		     NOCURRENT is set.

		     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.

 OUTPUTS: 
	The result of the function is a list of filenames.
 CALLS: ***
	BREAK_PATH [1], BREAK_PATH [2], BREAK_PATH [3], CONCAT_DIR [1], CONCAT_DIR [2]
	CONCAT_DIR [3], concat_dir [4]
 CALLED BY:
	DBHELP [1], DBHELP [2], DBHELP [3], DBOPEN [1], DBOPEN [2], DBOPEN [3]
 EXAMPLE:
	FILENAME = ''
	READ, 'File to open: ', FILENAME
	FILE = LIST_WITH_PATH( FILENAME, 'SERTS_DATA', '.fix' )
	IF FILE NE '' THEN ...
 PROCEDURE CALLS: 
	BREAK_PATH
 Category    : 
	Utilities, Operating_system
 REVISION HISTORY:
	Version 1, William Thompson, GSFC, 3 November 1994
	Documentation modified Wayne Landsman HSTX  November 1994
	Assume since V5.5, vector call to FILE_SEARCH()  W. Landsman Sep 2006


load_bytarr $SSW/gen/idl/struct/load_bytarr.pro
[Previous] [Next]

 NAME: 


 PURPOSE:  fill  byte arrays from structures

 CATEGORY: i/o


 CALLING SEQUENCE: load_bytarr,  str, buffer, error=error
            
 CALLED BY:  read... in SPEX directories

 calls to: datatype, conv_vax_unix

 INPUTS:
       str    - input structure, each element of the structure must
		be of numerical daytype, byte, long, fix, float, double or
		complex
		 
 OUTPUTS:
       buffer - byte array, may be dimensioned m x nrep where nrep is the
	error  - set to 1 if a string is one of the structure elements

 CALLS: ***
	DATATYPE [1], DATATYPE [2], DATATYPE [3]
 CALLED BY:
	HSI_RELOAD_PACKET
 RESTRICTIONS: No strings are permitted among the structure elements


 MODIFICATION HISTORY: ras, 12-apr-95, based on load_struct
       Version 2, 27-Feb-2006, William Thompson, GSFC
               Modified for newer data types.  Treat structures recursively.
       Version 3, 31-Mar-2006, William Thompson, GSFC
               Fixed bug in recursive structures


LOAD_EIT_COLOR $SSW/gen/idl/image_tool/load_eit_color.pro
[Previous] [Next]
 PROJECT:
       SOHO - CDS/SUMER

 NAME:
       LOAD_EIT_COLOR

 PURPOSE: 
       Load EIT color table based on the wavelength (in FITS header)

 CATEGORY:
       Utility
 
 SYNTAX: 
       load_eit_color, header

 INPUTS:
       HEADER - FITS header, string array

 CALLS: ***
	ADD_PATH [1], ADD_PATH [2], FXPAR [1], FXPAR [2], HAVE_PROC, IS_DIR, LOADCT
	MK_EIT_ENV, eit_colors
 CALLED BY:
	ITOOL_EIT_SCALE, MK_GIF, PLOT_CDS_POINT [1], PLOT_CDS_POINT [2]
 HISTORY:
       Version 1, July 15, 1997, Liyun Wang, NASA/GSFC. Written
       Version 2, Sept 8, 2001, changed to call EIT_COLORS

 CONTACT:
       Liyun Wang, NASA/GSFC (Liyun.Wang.1@gsfc.nasa.gov)


LOAD_PATH $SSW/gen/idl/system/load_path.pro
[Previous] [Next]
 Project     : EIS

 Name        : LOAD_PATH

 Purpose     : Load an IDL path which contains specified program

 Category    : system
                   
 Inputs      : PATH = full path name
               MODULE = module name

 Outputs     : None

 Keywords    : VERBOSE = set for message output

 CALLS: ***
	ADD_PATH [1], ADD_PATH [2], HAVE_PROC, IS_BLANK, IS_DIR, LOCAL_NAME
 CALLED BY:
	SXI_STARTUP
 History     : 31-Jan-2003,  D.M. Zarro (EER/GSFC)  Written

 Contact     : DZARRO@SOLAR.STANFORD.EDU


load_struct $SSW/gen/idl/struct/load_struct.pro
[Previous] [Next]

 NAME:


 PURPOSE:  fill structures from byte arrays
	Assumes byte array comes from data in ieee format
	like in the fits format coming from the GROSSC archive.
	If data was originally written on VMS, like BATSE native
	format files, then use /noiee

 CATEGORY: i/o


 CALLING SEQUENCE: load_struct, buffer, substr, str, error=error, /noieee

 CALLED BY:  read... in SPEX directories

 calls to: datatype, conv_vax_unix

 INPUTS:
       buffer - byte array, may be dimensioned m x nrep where nrep is the
		 structure repeat factor
	substr - data structure being loaded, single element
 OUTPUTS:
       str    - output structure
	error  - set to 1 if a string is one of the structure elements
 KEYWORDS:
	noieee   - optional, if set then input bytes not in ieee format
		   but are assumed to have been written on a VMS machine
	nbytes   - optional, a vector of the bytes for each tag, if
		this is given, then the structure can contain string tags.
		tag(i) can be fixed with the input substr value if
		nbytes(i) is set to zero
	noconv   - optional, if set then conv_vax_unix isn't called
       little   - optional, bytes written on a little-endian machine.  Call
                  swap_endian,/swap_if_big_endian instead of conv_vax_unix or
                  ieee_to_host.

 CALLS: ***
	CONV_VAX_UNIX, DATATYPE [1], DATATYPE [2], DATATYPE [3], IEEE_TO_HOST [1]
	IEEE_TO_HOST [2], IEEE_TO_HOST [3], IEEE_TO_HOST [4], SWAP_ENDIAN
 CALLED BY:
	EVAL_SHERB, QL_READBDB, READ_CONT_FITS, READ_DISCSC, READ_MER, READ_SHER, READ_SHERB
	READ_STTE, READ_TTS_FITS
 RESTRICTIONS: No strings are permitted among the structure elements


 MODIFICATION HISTORY: ras, 2-feb-94
	RAS, 25-Aug-1996, enhanced string processing and noconv options
 Version:
	Version 2, 25-aug-1996
	ras, 24-oct-2001
	changed to protect against dimension change (1xN) not N for structure fields in replicated structures
       Version 4, 27-Feb-2006, William Thompson, GSFC
               Modified for newer data types.  Added /LITTLE
       Version 5,  6-Apr-2006, William Thompson, GSFC
               Made /LITTLE pre-5.6 compatible


LOAD_VEL $SSW/gen/idl/display/load_vel.pro
[Previous] [Next]
 Project     : SOHO - CDS

 Name        : 
	LOAD_VEL
 Purpose     : 
	Loads a velocity color table.
 Explanation : 
	Loads a velocity color table.  Velocity arrays can be scaled for 
	display for this color table using FORM_VEL.
 Use         : 
	LOAD_VEL
 Inputs      : 
	None.
 Opt. Inputs : 
	None.
 Outputs     : 
	None.
 Opt. Outputs: 
	None.
 Keywords    : 
	REVERSE_SWITCH	= If passed, and non-zero, then the red and blue color
			  tables in the velocity color table are switched.
	TURQUOISE	= If set, then turquoise is used instead of blue.
	GREEN_SWITCH	= If set, then red and green are used instead of red
			  and blue.  Ignored if TURQUOISE is set.
	LIGHTEN		= If set, then some green is added to the blue to
			  lighten the image.  Ignored if TURQUOISE or
			  GREEN_SWITCH are set.
	GAMMA		= Gamma correction to apply to the colors.
	DISABLE		= If set, then TVSELECT not used.
 Calls       : ***
	REVERSE, TVSELECT, TVUNSELECT
 CALLED BY:
	COMBINE_VEL, XLOAD
 Common      : 
	COLORS:	The IDL color common block.
 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. : 
	W.T.T., Oct. 1987.
	W.T.T., Nov. 1990.  Modified for version 2 of IDL.
	W.T.T., Dec. 1990.  Modified so that normally the positive velocities
		are blue and the negative velocities are red.  This seems
		closer to standard usage.
	W.T.T., Jan. 1991.  Changed REVERSE_SWITCH to keyword.  Added keywords
			    GREEN_SWITCH and LIGHTEN.
	William Thompson, April 1992, removed common block COLORS, and added
				      DISABLE keyword.
	W.T.T., Jun. 1992.  Changed so that topmost color reserved for
			    overplotting with white lines.
	W.T.T., Sep. 1992.  Returned COLORS common block.
 Written     : 
	William Thompson, GSFC, October 1987.
 Modified    : 
	Version 1, William Thompson, GSFC, 13 May 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 3, William Thompson, GSFC, 9 December 2002
		Added keyword GAMMA
 Version     : 
	Version 3, 9 December 2002


LOADCT $SSW/gen/idl/display/load.pro
[Previous] [Next]
 Project     : SOHO - CDS

 Name        : 
	LOADCT
 Purpose     : 
	Load predefined color tables.
 Explanation : 
	The image display device is selected (unless DISABLE is set), and
	LOADCT is called to display the color tables.  See LOADCT in the IDL
	User's Library for more information.
 Use         : 
	LOADCT  [, TABLE]
 Inputs      : 
	None required.
 Opt. Inputs : 
	TABLE	= The number of the pre-defined color table to load, from 0 to
		  15.  If this value is omitted, a menu of the available tables
		  is printed and the user is prompted to enter a table number.
 Outputs     : 
	None.
 Opt. Outputs: 
	None.
 Keywords    : 
	DISABLE	= If set, then TVSELECT is not used.
	BOTTOM	= The minimum value of the scaled image array, as used by
		  BYTSCL.  The default is 0.

       See the help for LOADCT for other supported keywords.

 Calls       : ***
	GET_IM_KEYWORD, LOAD, TAG_EXIST [1], TAG_EXIST [2], TVSELECT, TVUNSELECT
 CALLED BY:
	ACALCHEK, ANAL_BCS_PHA, ARLOCPLOT, ATV, BCS_SPMOVIE [1], BCS_SPMOVIE [2]
	BOXLC_DISPLAY, CDS_AUTOFIT, CDS_VEL_SLICE [2], CHIANTI_NE, CHIANTI_TE
	COLORBAR__DEFINE, CROSSCORR [1], CW_LOADCT, DAT2GIF, DLASCAN, DMOVIE [1]
	EIT_DISPLAY, EIT_IMAGE, EIT_MKMOVIE, EIT_PA_PROCESS, EIT_PA_VIEW, EIT_POSTAGE
	EIT_SUB_UTIL_FILE, FILT4_SIM, FIRST_LIGHT [1], FIRST_LIGHT [2], FIT2GIF, FITS2TIFF
	FLAREMETER, FSC_WINDOW, FWD_DECOMPOSE, FWD_DISPLAY, FWD_SIMULATE, GHOST_BUSTER
	GHOST_PLOT_ONE, GIFS2DIFS, GetColors, Get_Page
	HESSI IMAGE STRATEGY CLASS DEFINITION, HSI_IMAGE_TEST__define
	HSI_LIGHTCURVE_TEST__define, HSI_MAP_CLEAN [1], HSI_MEM_SATO [1]
	HSI_PIXON_IMAGE [1], HSI_PIXON_IMAGE [2], HSI_TEST, ITOOL_LOAD_IMAGE
	ITOOL_TRACE_SCALE, LATEST_SFDS_GIF, LOAD_EIT_COLOR, LOAD_RED, LOAD_TP_STRUCT
	MAKE_DAILY_IMAGE, MAKE_GIFS, MAKE_TPOVIEW, MENUBCKGRD, MENUTRACEISOPH, MKDI_C1
	MK_CDS_GIF, MK_CDS_PLAN, MK_GIF, MK_IMAGE, MK_RASTER, MK_SOHO, MOVIE_MAKER, NAR2COORD
	NEUPERT_PLOT, NRH, OBS_PLOT, OVSA_EXPLORER formerly OVSA_PRESUB, OVSA_PRESUB
	PLOT_ASC, PLOT_DRIFTSCAN, PLOT_HKLZ, PLOT_MED, PLOT_TPCAL, RATIO_PLOTTER [1]
	RD_NRHPNG, REDUCE_DAILY, RINTER [2], ROLL_PLOT, RTMVI [1], RTMVIPLAY [1]
	RTMVIPLAY [2], RTMVIPLAYPNG, Radio Astronomy Group View RAG View [1]
	Radio Astronomy Group View RAG View [2], RemoteView_Display2D
	RemoteView_Display3D, SCATTER3D, SCORE_BPROJ, SIMPLE_TV2, SMUDGE_SPECTRA, SOLAID
	SOLB_PLOT_POINTING [1], SOLB_PLOT_POINTING [2], SRBL_2M_CAL, SSW_WRITE_GIF
	STEPPER [3], STEPPER [4], STEREO_LOOP, STEREO_SIMUL, SUMER_TOOL, SUMMARY_PLOT
	SXT_IMAGE, SXT__DEFINE, Set_Page, Show Image [1], Show Image [2], Show Image [3]
	Sxt_goes_teem, TVIMAGE [1], TVIMAGE [3], TVSCALE [1], TVSCALE [2], VIEW_RAW
	VIEW_SFM, WIC, WIMG_INFO1, WINFO_ACTIV, WPLOT_NONOP, WPLOT_SUBHTR [2]
	WRITE_DISK_MOVIE [1], WRITE_LAST_IMG [1], WRUNMOVIE [2], WSAVE_PS [2], WTPCAL
	W_HISTOGRAM, XCOLORS [1], XCOLORS [2], XCOLORS [4], XLOAD, XLOADCT [1], XLOADCT [2]
	XLOADCT [3], XMOVIE_SFM, XSPECT, Z2GIF, cal_fig_pol, ch_ss, clean [2], clean [3]
	clean [4], cmap2gif ftsfile maxdmind ROOTroot CONTROLcontrol, color_copy
	crevig, crosscorr [2], crosscorrbis, ctblink, daily_forecast [2], data2files
	destr_bilin [2], disp_gen [1], disp_gen [2], disp_sci160k [1], disp_sci160k [2]
	display_ovsamap, eis_mk_raster_gui__define [1]
	eis_mk_raster_gui__define [2], eit_dump, eit_proton_summary, eit_ratio
	euv_plot_auto [1], euv_plot_auto [2], first_over, fl_goesplot [1]
	fl_goesplot [2], fl_goesplot [3], fl_summary [1], fl_summary [2], fl_summary [3]
	fl_suntoday [1], fl_suntoday [2], fl_suntoday [3], fl_sxtobsnar [1]
	fl_sxtobsnar [2], full_graph_gif, fwdfit [1], fwdfit [2], getct, goes_plot [1]
	goes_plot [2], goes_plot [3], goes_plot [4], goes_plot [5], hsi_bproj2size
	hsi_image__getaxis [2], hsi_image_raw__define, hsi_imagefile2png
	hsi_one_qlook_image, hsi_plot_qlook_image, hsi_ui_ql, image2movie, imspec [10]
	imspec [11], imspec [12], imspec [13], imspec [14], imspec [15], imspec [16]
	imspec [17], imspec [18], imspec [19], imspec [1], imspec [20], imspec [21]
	imspec [22], imspec [23], imspec [24], imspec [25], imspec [26], imspec [27]
	imspec [28], imspec [29], imspec [2], imspec [30], imspec [31], imspec [32]
	imspec [33], imspec [34], imspec [35], imspec [36], imspec [3], imspec [4]
	imspec [5], imspec [6], imspec [7], imspec [8], imspec [9], inspec_f, inspec_tf
	isas_ps_print, jitter_gif_xyimg, line_table, linecolors [1], linecolors [2]
	lunuleR1R2d, lux_diff, magtv1 procedure, magtv2 procedure [1], mdi_display
	mk_minim, mk_stdim_list, mon_health [1], mon_health [2], msu_tekprint2
	new_disp_sci5k [1], new_disp_sci5k [2], new_edac_summary, new_mon_health [1]
	new_mon_health [2], ovsa_interact, plot_gsn, plot_loi_summary [1]
	plot_loi_summary [2], plot_shutter_perf, plot_ssw_fov, plotman
	plotman_create_files_event, pmtras_analysis, psk_correlate, qImage_cw_ctable
	qShow, qTool, ratio_plotter [2], smei_sky, spectrogram__define, split_colortab
	ssc_scan2, ssw_colors, ssw_ct2rgb, ssw_findstuff2html, sumer_destretch
	sun_today [1], sun_today [2], sun_today [3], sxig12_browsegen, sxt2file, sxt_mauna
	to display data generated by the ip_test procedure, todays_targets, tvmulti
	video_test, video_title, vignettage [1], vignettage [2], vu_insitucurve, xspr [1]
	xspr [2], yopos [1], yopos [2]
 Common      : 
	None, but calls LOADCT, which uses the common block COLORS.
 Restrictions: 
	Works from the file: $IDL_DIR/colors1.tbl.

	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 color tables of the currently-selected device are modified.
 Category    : 
	Utilities, Image_display.
 Prev. Hist. : 
	William Thompson, April 1992, added SILENT and DISABLE keywords.
 Written     : 
	William Thompson, GSFC.
 Modified    : 
	Version 1, William Thompson, GSFC, 13 May 1993.
		Incorporated into CDS library.
       Version 2, William Thompson, GSFC, 3-Jan-2006
               Added BOTTOM, and _EXTRA (which includes /SILENT)
               Added call to GET_IM_KEYWORD
 Version     : 
	Version 2, 3-Jan-2006


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

 Name        : 
       LOC_FILE()
 Purpose     : 
       Get files from a set of directories.
 Explanation : 
	Similar to the standard utility FINDFILE, but allows for a series of
	directories to be searched.  Also, in Unix, it takes care of pathnames
	that contain the special "~" character, which FINDFILE currently does
	not do.
 Use         : 
       Result = LOC_FILE(FILE,PATH=PATH,LOC=LOC,COUNT=COUNT,ALL=ALL)
 Inputs      : 
       FILE	= Name of file(s) to search for.  It may contain wildcard
 Outputs     : 
	The result of the function is an array containing the names of all the
	files found.
 Keywords    : 
       PATH	= Array or scalar string with names of directories to search.
       LOC	= Returned directory locations of found files.
       COUNT	= Number of found files.
       ALL	= If set, then search all directories.  Otherwise, the
		  procedure stops as soon as a match is found.
       NO_RECHECK = switch off rechecking
       RECHECK = switch on rechecking
 Category    : 
	Utilities, Operating_system.
 Written     : 
	D. Zarro, GSFC/SDAC, December 1992.
 Modified    : 
	Version 1, William Thompson, GSFC, 23 April 1993.
		Incorporated into CDS library.
       Version 2, Dominic Zarro, GSFC, 1 August 1994.
               Added for error checking
       Version 3, Zarro (SM&A), 30-November-1998
               Added extra check for super large directories
       Version 4, Zarro (SM&A), 15-April-1999
               Added NO_RECHECK to switch off extra checking
               for super large directories
       Version 5, Zarro (SM&A), 7-Dec-1999 - vectorized
       Version 6, Zarro (EIT/GSFC), 28 May 2000 - added check
               for delimited path string via call to STR_EXPAND
       Version 7, Zarro (EIT/GSFC), 12 June 2000 - made NO_RECHECK
              the default
       Version 8, Zarro (EIT/GSFC), 1 July 2000 - added check for
              correct OS delimiter in file/path names
       Version 9, Zarro (EIT/GSFC), 12 Dec 2001 - added check for
              blank filename
       Version 10, Zarro (EIT/GSFC), 3 Jan 2002 - added call to
              CHKLOG prior to STR_EXPAND
       Modified, 16-May-2006, Zarro (L-3Com/GSFC) - added call to
               FIND_FILE
 CALLS:
 CALLED BY
	BATSE_CRAB_RESP, BATSE_ONTIMES, BAT_MERGE, BCS, BURST_FLARE, CHECK_FTP, CHECK_KAP
	CHECK_LOCK, CHKARG, COEFDATA, COMPARE_SHUTTERS, CONT_EDGES, DISCSP_BANDS, DN_FILE
	DOC_MENU, DO_QLARCHIVE, Data reader with caching, EDGES_HVSPEC, EIS_CAT [1]
	EIS_CAT [2], EIS_LIST_EXPER [1], EIS_LIST_EXPER [2], EIT_COPY, EIT_GBO
	EIT_QUALITY [1], EIT_QUALITY [2], FCS, FILE2FID, FILE_OR_STRING, FILE_SEARCHER [1]
	FILE_SEARCHER [2], FILE_SINCE, FIND_COMPRESSED, FIND_DBFILE, FIND_FID
	FIND_KAP_FILE, FITS2MAP [1], FITS2MAP [2], FITS2TIFF, FIX_IAP, FLARE_F_NAME
	FLDISPLAY, FLIST, FSPLOT, FS_ARCHIVE_RW, FS_OPEN [1], FTP_SYNOP, FTP__DEFINE
	F_COMPOSITE, GAP_FILE, GET_BATSE_POINTING, GET_GDFILE, GET_GZIP
	GET_HXT_CAL_WIDTHS, GET_LATEST_IAP, GET_LATEST_KAP, GET_MOD, GET_NOAA, GET_PROC
	GET_RECENT_EIT, GET_SLLD, GET_SOHO_ROLL, GET_SSWDB, GET_SUMER_FILES, GET_UVSP
	GE_WINDOW [1], GFITS_R, GFITS_W, GIF2PICT, GOES_MEWE_TEM, GRS_EXTRACT, GRS_RESP
	HAVE_FILES, HESSI_ATTENUATOR_SPECTRA, HESSI_FIGURE4_INPUTS [2]
	HESSI_FLARE_SPECTRUM, HESSI_MODEL_COUNTS, HESSI_SHUTTERS, HKG_DBASE
	HSI_DIAGNOSTICS, HSI_GET_LAST_FLARE_ID, HSI_LOC_FILE, HSI_MODUL_PATTERN_OPEN
	HSI_QLOOK_SUMMARY_PAGE__DEFINE, HSI_RD_WEIGHT_MAP, HSI_VCFILE_TIMES, HV_FILE
	HXRBS_ESC, HXT_CAL_FIX [1], HXT_CAL_FIX [2], Help_spex [1], Help_spex [2]
	Hsi_contact2fits [1], Hsi_contact2fits [2], IAP2STC, IDLEDIT, IHY_READ
	ITOOL_GETFILE, JSMOVIE, JSMOVIE2, LAD_DRM, LAD_PHA_EDGES, LISTBCS, LIST_FITS
	LIST_PRINTER_UNIX, MAKE_GOES_RESP, MDI_COPY, MDI_GBO, MDI__DEFINE, MKLOG_LIST
	MK_AGIF, MK_CDS_PLAN, MK_EIT_MAP, MK_FILE, MK_IVM_MAP, MK_LINK, MK_MER_CONT
	MK_PLAN_RECOVER, MK_SOHO_TARGET, N511_VS_HVSPEC, NEW_EFFECTIVE_AREAS_CODE
	NEW_FIG4_INPUTS, NUCLEAR_TABLE_LOAD, OBS__DEFINE, OCC_DBASE
	PARSE_GROSSC_ATTITUDE, PLOT_ANGC [1], PLOT_ANGC [2], PLOT_HESSI_FILTERS
	PLOT_RESULTS [2], QLDISPLAY, QL_PLOTTER, RAWDUMP, RD_ASCII_C, RD_GOES_SDAC, RD_UVCAT
	READQUAL, READSUM, READ_GDFILE_GD, READ_HESI_DAT, READ_HESSI_DAT, REBIN_FID
	REBIN_GIF, RESTORE_FLARE, RESTORE_QLOOK, RM_FILE, RM_LOCK, ROUTINE_NAME [4]
	ROUTINE_NAME [7], RUN_BATSE, Radio Spectrogram FITS File reader
	Radiospectrogram FITS File reader [1]
	Radiospectrogram FITS File reader [2], Read_mat_xcom, SET_CDS_FITS
	SHOW_SYNOP__DEFINE, SITE__DEFINE, SMART_FTP, SOHO_CAMPAIGN, SPEX_COMMONS [2]
	SPEX_COMMONS [4], SPEX_DATA_GENX [1], SPEX_DATA_GENX [2], SPEX_DRM_GENX [1]
	SPEX_DRM_GENX [2], SPEX_PROC [1], SPEX_PROC [2], SPEX_SUMMARY [1]
	SPEX_SUMMARY [2], SPEX__DEFINE, SSW_LAST_UPDATE, SSW_PICKFILE, ST_SUMER
	SUMER_FILE, SXT__DEFINE, TFTD, TIFF2GIF, TIME_F_NAME, TRACE_COPY, UPDATE_CAMPAIGN
	UPDATE_KAP, UPDATE_LINE_TEMPLATES, URL_GET, VALID_GIF, VALID_JPEG, VALID_PNG, Vlth
	WBDA [1], WBDA [2], WRITE_CAP, WRITE_DD, WRITE_IAP, XACK, XCDS_BOOK, XCPT
	XR_RD_ABUNDANCE, XSM_PREP, XSM_VALID, ZONE_DEF_ID, ZONE_DEF_LABEL, avsig_1 [4]
	batse_menu, calc_rad_loss, db_gbo, destr_bilin [1], destr_bilin [2], destretch [1]
	destretch [3], destretcht, drm_correct_albedo, file__define, gextal, gzip
	hesi_grid_trans, hessi_grid_trans, hessi_setup_info, hsi_as_ptlist
	hsi_as_ptrddb, hsi_as_ptwrdb, hsi_as_wascii, hsi_cld_sav_init
	hsi_clk_delta_read, hsi_do_catalog, hsi_filedb_read [1], hsi_filedb_read [2]
	hsi_find_in_archive, hsi_gbo, hsi_imagefile2png, hsi_monthly_filename
	hsi_mult_filedb_inp filedb_dir  filedb_dir, hsi_obs_summ_allrates [1]
	hsi_obs_summ_soc__define, hsi_one_qlook_image, hsi_plot_qlook_image
	hsi_qlook__define, hsi_ras_rdeph [1], hsi_ras_rdeph [2], hsi_ras_rdhipp
	hsi_rd_durevt, hsi_rd_orbevt [1], hsi_rd_orbevt [2], hsi_rd_trackfile
	hsi_rdstatevectorfile, hsi_read_all_flare_list, hsi_sas, hsi_sas_rdcal [1]
	hsi_spectrum__filewrite, ihy_db, linflx [1], linflx [2], plotman, pmtras_analysis
	pro ratesdump, rd_sxs_pha [1], rd_sxs_pha [2], rd_week_file [2], rdbda_smm
	read_hessi_4_ospex, read_xsm_4_ospex, setup_spex [1], setup_spex [2]
	spex_preview [1], spex_preview [2], spex_xsm_fits2drm, strip_crt
	sumer_destretch, sumer_ffdb, sxt_get_grill [1], sxt_get_grill [2], uncompress
	wbs_grs_response [1], wbs_grs_response [2], weekid [2], xgif, xlinflx, xps [1]
	xps [2], xr_mk_abun_file, xsm_fits2spectrum, ydb_exist [2]


LOC_FILE [2] $SSW/gen/idl/system/loc_file_old.pro
[Previous] [Next]
 Project     : SOHO - CDS

 Name        : 
       LOC_FILE()
 Purpose     : 
       Get files from a set of directories.
 Explanation : 
	Similar to the standard utility FINDFILE, but allows for a series of
	directories to be searched.  Also, in Unix, it takes care of pathnames
	that contain the special "~" character, which FINDFILE currently does
	not do.
 Use         : 
       Result = LOC_FILE(FILE,PATH=PATH,LOC=LOC,COUNT=COUNT,ALL=ALL)
 Inputs      : 
       FILE	= Name of file(s) to search for.  It may contain wildcard
 Outputs     : 
	The result of the function is an array containing the names of all the
	files found.
 Keywords    : 
       PATH	= Array or scalar string with names of directories to search.
       LOC	= Returned directory locations of found files.
       COUNT	= Number of found files.
       ALL	= If set, then search all directories.  Otherwise, the
		  procedure stops as soon as a match is found.
       NO_RECHECK = switch off rechecking
       RECHECK = switch on rechecking
 Category    : 
	Utilities, Operating_system.
 Written     : 
	D. Zarro, GSFC/SDAC, December 1992.
 Modified    : 
	Version 1, William Thompson, GSFC, 23 April 1993.
		Incorporated into CDS library.
       Version 2, Dominic Zarro, GSFC, 1 August 1994.
               Added for error checking
       Version 3, Zarro (SM&A), 30-November-1998
               Added extra check for super large directories
       Version 4, Zarro (SM&A), 15-April-1999
               Added NO_RECHECK to switch off extra checking
               for super large directories
       Version 5, Zarro (SM&A), 7-Dec-1999 - vectorized
       Version 6, Zarro (EIT/GSFC), 28 May 2000 - added check
               for delimited path string via call to STR_EXPAND
       Version 7, Zarro (EIT/GSFC), 12 June 2000 - made NO_RECHECK
              the default
       Version 8, Zarro (EIT/GSFC), 1 July 2000 - added check for
              correct OS delimiter in file/path names
       Version 9, Zarro (EIT/GSFC), 12 Dec 2001 - added check for
              blank filename
       Version 10, Zarro (EIT/GSFC), 3 Jan 2002 - added call to
              CHKLOG prior to STR_EXPAND
 CALLS:
 CALLED BY
	BATSE_CRAB_RESP, BATSE_ONTIMES, BAT_MERGE, BCS, BURST_FLARE, CHECK_FTP, CHECK_KAP
	CHECK_LOCK, CHKARG, COEFDATA, COMPARE_SHUTTERS, CONT_EDGES, DISCSP_BANDS, DN_FILE
	DOC_MENU, DO_QLARCHIVE, Data reader with caching, EDGES_HVSPEC, EIS_CAT [1]
	EIS_CAT [2], EIS_LIST_EXPER [1], EIS_LIST_EXPER [2], EIT_COPY, EIT_GBO
	EIT_QUALITY [1], EIT_QUALITY [2], FCS, FILE2FID, FILE_OR_STRING, FILE_SEARCHER [1]
	FILE_SEARCHER [2], FILE_SINCE, FIND_COMPRESSED, FIND_DBFILE, FIND_FID
	FIND_KAP_FILE, FITS2MAP [1], FITS2MAP [2], FITS2TIFF, FIX_IAP, FLARE_F_NAME
	FLDISPLAY, FLIST, FSPLOT, FS_ARCHIVE_RW, FS_OPEN [1], FTP_SYNOP, FTP__DEFINE
	F_COMPOSITE, GAP_FILE, GET_BATSE_POINTING, GET_GDFILE, GET_GZIP
	GET_HXT_CAL_WIDTHS, GET_LATEST_IAP, GET_LATEST_KAP, GET_MOD, GET_NOAA, GET_PROC
	GET_RECENT_EIT, GET_SLLD, GET_SOHO_ROLL, GET_SSWDB, GET_SUMER_FILES, GET_UVSP
	GE_WINDOW [1], GFITS_R, GFITS_W, GIF2PICT, GOES_MEWE_TEM, GRS_EXTRACT, GRS_RESP
	HAVE_FILES, HESSI_ATTENUATOR_SPECTRA, HESSI_FIGURE4_INPUTS [2]
	HESSI_FLARE_SPECTRUM, HESSI_MODEL_COUNTS, HESSI_SHUTTERS, HKG_DBASE
	HSI_DIAGNOSTICS, HSI_GET_LAST_FLARE_ID, HSI_LOC_FILE, HSI_MODUL_PATTERN_OPEN
	HSI_QLOOK_SUMMARY_PAGE__DEFINE, HSI_RD_WEIGHT_MAP, HSI_VCFILE_TIMES, HV_FILE
	HXRBS_ESC, HXT_CAL_FIX [1], HXT_CAL_FIX [2], Help_spex [1], Help_spex [2]
	Hsi_contact2fits [1], Hsi_contact2fits [2], IAP2STC, IDLEDIT, IHY_READ
	ITOOL_GETFILE, JSMOVIE, JSMOVIE2, LAD_DRM, LAD_PHA_EDGES, LISTBCS, LIST_FITS
	LIST_PRINTER_UNIX, MAKE_GOES_RESP, MDI_COPY, MDI_GBO, MDI__DEFINE, MKLOG_LIST
	MK_AGIF, MK_CDS_PLAN, MK_EIT_MAP, MK_FILE, MK_IVM_MAP, MK_LINK, MK_MER_CONT
	MK_PLAN_RECOVER, MK_SOHO_TARGET, N511_VS_HVSPEC, NEW_EFFECTIVE_AREAS_CODE
	NEW_FIG4_INPUTS, NUCLEAR_TABLE_LOAD, OBS__DEFINE, OCC_DBASE
	PARSE_GROSSC_ATTITUDE, PLOT_ANGC [1], PLOT_ANGC [2], PLOT_HESSI_FILTERS
	PLOT_RESULTS [2], QLDISPLAY, QL_PLOTTER, RAWDUMP, RD_ASCII_C, RD_GOES_SDAC, RD_UVCAT
	READQUAL, READSUM, READ_GDFILE_GD, READ_HESI_DAT, READ_HESSI_DAT, REBIN_FID
	REBIN_GIF, RESTORE_FLARE, RESTORE_QLOOK, RM_FILE, RM_LOCK, ROUTINE_NAME [4]
	ROUTINE_NAME [7], RUN_BATSE, Radio Spectrogram FITS File reader
	Radiospectrogram FITS File reader [1]
	Radiospectrogram FITS File reader [2], Read_mat_xcom, SET_CDS_FITS
	SHOW_SYNOP__DEFINE, SITE__DEFINE, SMART_FTP, SOHO_CAMPAIGN, SPEX_COMMONS [2]
	SPEX_COMMONS [4], SPEX_DATA_GENX [1], SPEX_DATA_GENX [2], SPEX_DRM_GENX [1]
	SPEX_DRM_GENX [2], SPEX_PROC [1], SPEX_PROC [2], SPEX_SUMMARY [1]
	SPEX_SUMMARY [2], SPEX__DEFINE, SSW_LAST_UPDATE, SSW_PICKFILE, ST_SUMER
	SUMER_FILE, SXT__DEFINE, TFTD, TIFF2GIF, TIME_F_NAME, TRACE_COPY, UPDATE_CAMPAIGN
	UPDATE_KAP, UPDATE_LINE_TEMPLATES, URL_GET, VALID_GIF, VALID_JPEG, VALID_PNG, Vlth
	WBDA [1], WBDA [2], WRITE_CAP, WRITE_DD, WRITE_IAP, XACK, XCDS_BOOK, XCPT
	XR_RD_ABUNDANCE, XSM_PREP, XSM_VALID, ZONE_DEF_ID, ZONE_DEF_LABEL, avsig_1 [4]
	batse_menu, calc_rad_loss, db_gbo, destr_bilin [1], destr_bilin [2], destretch [1]
	destretch [3], destretcht, drm_correct_albedo, file__define, gextal, gzip
	hesi_grid_trans, hessi_grid_trans, hessi_setup_info, hsi_as_ptlist
	hsi_as_ptrddb, hsi_as_ptwrdb, hsi_as_wascii, hsi_cld_sav_init
	hsi_clk_delta_read, hsi_do_catalog, hsi_filedb_read [1], hsi_filedb_read [2]
	hsi_find_in_archive, hsi_gbo, hsi_imagefile2png, hsi_monthly_filename
	hsi_mult_filedb_inp filedb_dir  filedb_dir, hsi_obs_summ_allrates [1]
	hsi_obs_summ_soc__define, hsi_one_qlook_image, hsi_plot_qlook_image
	hsi_qlook__define, hsi_ras_rdeph [1], hsi_ras_rdeph [2], hsi_ras_rdhipp
	hsi_rd_durevt, hsi_rd_orbevt [1], hsi_rd_orbevt [2], hsi_rd_trackfile
	hsi_rdstatevectorfile, hsi_read_all_flare_list, hsi_sas, hsi_sas_rdcal [1]
	hsi_spectrum__filewrite, ihy_db, linflx [1], linflx [2], plotman, pmtras_analysis
	pro ratesdump, rd_sxs_pha [1], rd_sxs_pha [2], rd_week_file [2], rdbda_smm
	read_hessi_4_ospex, read_xsm_4_ospex, setup_spex [1], setup_spex [2]
	spex_preview [1], spex_preview [2], spex_xsm_fits2drm, strip_crt
	sumer_destretch, sumer_ffdb, sxt_get_grill [1], sxt_get_grill [2], uncompress
	wbs_grs_response [1], wbs_grs_response [2], weekid [2], xgif, xlinflx, xps [1]
	xps [2], xr_mk_abun_file, xsm_fits2spectrum, ydb_exist [2]


LOC_FILE_NEW $SSW/gen/idl/system/loc_file_new.pro
[Previous] [Next]
 Project     : HESSI
                  
 Name        : LOC_FILE_NEW
               
 Purpose     : new improved LOC_FILE that uses FILE_SEARCH 
                             
 Category    : system utility
               
 Syntax      : IDL> a=loc_file_new(file)

 Inputs:     : FILE = file names to search (scalar or array) 

 Outputs     : The result of the function is an array containing the names of 
               all files found.
 Keywords    : 
       PATH    = Array or scalar string with names of directories to search.
       COUNT   = Number of found files.
       ALL     = If set, then search all directories.  Otherwise, the
                 procedure stops as soon as a match is found.
               
 Restrictions: Needs IDL version > 5.4
               
 CALLS: ***
	EXIST, FILE_BREAK, GET_DELIM, IS_STRING, SINCE_VERSION [1], SINCE_VERSION [2]
 Side effects: None
               
 History     : Written, 8-Nov-2002, Zarro (EER/GSFC)

 Contact     : dzarro@solar.stanford.edu


LOCAL_DIFF $SSW/gen/idl/time/local_diff.pro
[Previous] [Next]
 Project     :	SOHO - CDS

 Name        :	LOCAL_DIFF()

 Purpose     :	Gets the current difference between local and UTC time.

 Explanation :	This procedure uses the IDL SYSTIME() function in different
		ways to calculate the current local and UTC date/time values,
		and calculates the difference (local - UTC) in hours between
		them.

 Use         :	Result = LOCAL_DIFF()

 Inputs      :	None.

 Opt. Inputs :	None.

 Outputs     :	The result of the function is the current difference in hours
		between local and UTC time, i.e. local-UTC.

 Opt. Outputs:	None.

 Keywords    :	ERRMSG	= If defined and passed, then any error messages 
			  will be returned to the user in this parameter 
			  rather than being handled by the IDL MESSAGE 
			  utility.  If no errors are encountered, then a null
			  string is returned.  In order to use this feature,
			  the string ERRMSG must be defined first, e.g.,

				ERRMSG = ''
				RESULT = LOCAL_DIFF ( ERRMSG=ERRMSG )
				IF ERRMSG NE '' THEN ...

			  Note that no intrinsic errors will ever be
			  encountered in this procedure.  However, this 
			  ERRMSG keyword has been installed since it calls
			  other procedures that include the ERRMSG keyword.

 Calls       : ***
	FIND_WITH_DEF [1], FIND_WITH_DEF [2], FIND_WITH_DEF [3], INT2UTC, STR2UTC [1]
	STR2UTC [2], STR2UTC [3], TRIM
 CALLED BY:
	MK_TIMETICK, PLOT_FRAME, PLOT_UTFRAME, eis_timeline_plot_gui [1]
	eis_timeline_plot_gui [2]
 Common      :	Uses the internal common block LOCAL_DIFF to store information
		between calls.  This common block is shared with the routine
		LOCAL_DIFF.

 Restrictions:	This routine depends on the behavior of IDL's SYSTIME function.
		Currently, it is believed that this routine will return the
		time difference correctly on all properly configured Unix
		systems.  However, the result may be different in other
		operating systems; e.g. on VMS and MacIntosh computers it
		always returns zero.  It is believed to work correctly in IDL
		for Windows.

		In order to get around this difficulty, the file
		"local_diff.dat" can be placed in the directory given by the
		environment variable TIME_CONV.  If this file exists, then this
		program will read the value from this file rather than try to
		calculate.  For example, for U.S. Eastern Standard Time, this
		file would contain the value -5.  This means then, that this
		file must contain the correct value, and must be updated to
		reflect changes between standard and daylight savings time.

		The file local_diff.dat is only read once.  The contents are
		stored in a common block between calls.  Once a day, the file
		is reread.

		The accuracy of the time difference returned by this routine
		depends on the proper configuration of the computer.

 Side effects:	None.

 Category    :	Utilities, time.

 Prev. Hist. :	None.

 Written     :	William Thompson, GSFC, 2 October 1994

 Modified    :	Version 1, William Thompson, GSFC, 2 October 1994
		Version 2, William Thompson, GSFC, 3 October 1994
			Added check for file local_diff.dat
		Version 3, William Thompson, GSFC, 14 November 1994
			Changed .DAY to .MJD
		Version 4, Donald G. Luttermoser, GSFC/ARC, 28 December 1994
			Added the keyword ERRMSG.
		Version 5, William Thompson, GSFC, 25 January 1995
			Changed to call intrinsic ROUND instead of NINT.  The
			version of NINT in the Astronomy User's Library doesn't
			automatically select between short and long integers as
			the CDS version does.
		Version 6, Donald G. Luttermoser, GSFC/ARC, 30 January 1995
			Added ERRMSG keyword to internally called procedures.
		Version 7, William Thompson, GSFC, 15 March 1995
			Changed CDS_TIME to TIME_CONV
		Version 8, William Thompson, GSFC, 2 June 1997
			Store information between calls in common block.

 Version     :	Version 8, 2 June 1997


LOCAL_DIFFS $SSW/gen/idl/fund_lib/sdac/local_diffs.pro
[Previous] [Next]
 PROJECT: 
	SDAC
 NAME: 
	LOCAL_DIFFS

 PURPOSE:
	This procedure finds all of the idl procedures in a directory(ies)
	and reports those that are in the path.

 CATEGORY:
	SYSTEM

 CALLING SEQUENCE:
	Local_diffs, dirs, fname, status [, PATH=PATH, DELETE=DELETE]

 CALLS: ***
	ARR2STR [1], Arr2Str [2], BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3]
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], FCHECK, FINDFILE_LIST, PATH_DIR
	break_file [4], concat_dir [4], file_diff, file_list [1], file_list [2]
 INPUTS:
       Dirs - source directory(ies)

 OPTIONAL INPUTS:
	none

 OUTPUTS:
       Fname - files found in path.
	Status - 0 file is identical, 1 file is different.
	File_in_path - The first instance of the equivalent file in the path.
 OPTIONAL OUTPUTS:
	none

 KEYWORD INPUTS:
	PATH - alternate search path in !path format. If submitted as an
	array of strings, the !path format path will be constructed from
	the elements using path_dir().
	DELETE - If set, delete identical routines.
 COMMON BLOCKS:
	none

 SIDE EFFECTS:
	none

 RESTRICTIONS:
	none

 PROCEDURE:
	none

 MODIFICATION HISTORY:
	Version 1, richard.schwartz@gsfc.nasa.gov, 5-jan-1998.	


LOCAL_NAME $SSW/gen/idl/system/local_name.pro
[Previous] [Next]
 Project     : HESSI

 Name        : LOCAL_NAME

 Purpose     : convert input file name into local OS

 Category    : system string
                   
 Inputs      : INFIL = filename to convert
                       [e.g. /ydb/ys_dbase]

 Outputs     : OUTFIL = filename with local OS delimiters 
                        [e.g. \ydb\yd_dbase - if Windows]

 Keyword     : NO_EXPAND = don't expand environment variable

 CALLS: ***
	CHKLOG [1], CHKLOG [2], GET_DELIM, IS_BLANK
 CALLED BY:
	APPEND_SDB, CLEAN_PATH, EIS_CAL_MKCALDATA [1], EIS_CAL_MKCALDATA [2]
	EIS_ENV_INI [1], EIS_ENV_INI [2], EIT__DEFINE, ENVIRONMENT [1], ENVIRONMENT [3]
	EXP_DBASE, FTP__DEFINE, GET_SOHO_ROLL, HTTP__DEFINE, LOAD_PATH, SPECPLOT__DEFINE
	SSW_LAST_UPDATE, XDETECTOR [1], XFILES [1], XFILES [2], XMAP [1], XMAP [2]
	XMKFITS [1], XMKFITS [2], fix_path, rd_week_file [2], sxi_files, weekid [2]
	xwhisker [1], xwhisker [2], ydb_exist [2]
 History     : 29-Dec-2001,  D.M. Zarro (EITI/GSFC) - Written
               9-Feb-2004, Zarro (L-3Com/GSFC) - added /NO_EXPAND

 Contact     : DZARRO@SOLAR.STANFORD.EDU


LOCATE_VAL $SSW/gen/idl/util/locate_val.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : LOCATE_VAL()
               
 Purpose     : Locates a particular value in a vector or array.
               
 Explanation : Searches a vector (trivial) or array and returns the 
               coordinates of a specified value. cf GET_IJ()
               
 Use         : IDL> print,locate_val(array [,value, /max, /min, range=range])
    
 Inputs      : array - 2-d array to be searched
               
 Opt. Inputs : value - the numerical value to be located.
               
 Outputs     : Function returns (array of) (x,y) locations of the pixel.
               
 Opt. Outputs: None
               
 Keywords    : TOP     - search for maximum of array
               BOTTOM  - search for minimum of array
               RANGE   - error allowed on value searched for

 Calls       : None
 CALLED BY:
	CROSS_CORR2, HSI_MAP_EVALUATOR [1], HSI_MAP_EVALUATOR [2], hsi_bproj2size
	hsi_imagefile2png, hsi_polar_clean
 Common      : None
               
 Restrictions: Only on 1 or 2-d arrays at moment
               
 Side effects: None
               
 Category    : Util, numerical, array
               
 Prev. Hist. : None

 Written     : C D Pike, RAL, 27-Jul-95
               
 Modified    : 

 Version     : Version 1, 27-Jul-95


LOCK_DATABASE $SSW/gen/idl/database/lock_database.pro
[Previous] [Next]
 Project     :	SOHO - CDS

 Name        :	LOCK_DATABASE

 Purpose     :	Lock a CDS database for write.

 Category    :	Class4, Operations, Database

 Explanation :	Locks a catalog database for write access.  If another process
		has the catalog locked, then wait until it is unlocked before
		locking it.

		An empty file called <database>.LOCK (e.g. experiment.LOCK) is
		created in the same directory as the database.  This signals to
		other processes that the database is locked.

 Syntax      :	LOCK_DATABASE, DATABASE, LOCKFILE

 CALLED BY:
	ADD_EXPER, ADD_EXP_COMM, ADD_MAIN, FLUSH_CATALOG, MOD_EXPER, MOD_MAIN
 Examples    :	LOCK_DATABASE, 'experiment', LOCKFILE
		... write to database, e.g. using DBBUILD ...
		UNLOCK_DATABASE, LOCKFILE

 Inputs      :	DATABASE = The name of the database.  The program looks for a
			   file with the given name, and the extension .dbf in
			   either the current directory, or the path given by
			   the environment variable ZDBASE.

 Opt. Inputs :	None.

 Outputs     :	LOCKFILE = The complete name of the file <database>.LOCK,
			   including the path.

 Opt. Outputs:	None.

 Keywords    :	None.

 Calls       : ***
	BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], FILE_EXIST [2]
	FIND_WITH_DEF [1], FIND_WITH_DEF [2], FIND_WITH_DEF [3], break_file [4]
	file_exist [1], file_exist [3]
 Common      :	None.

 Restrictions:	Must have write access in the directory containing the database
		files.

 Side effects:	There is no timeout to this procedure.  It will wait forever
		for the database to be unlocked.  If a process dies leaving the
		lock file in place, then it must be deleted by hand.

 Prev. Hist. :	None.

 History     :	Version 1, 09-Apr-1996, William Thompson, GSFC
		Version 2, 12-Apr-1996, William Thompson, GSFC
			Improved status message
               Version 3, 19 Mar 2003, Zarro (EER/GSFC) - replaced
               CDS_MESSAGE by MESSAGE


 Contact     :	WTHOMPSON


LOCK_ZDBASE $SSW/gen/idl/database/lock_zdbase.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : LOCK_ZDBASE
               
 Purpose     : Lock directories defined by ZDBASE 
               
 Category    : Planning
               
 Explanation : creates a LOCK file in a specific directory in ZDBASE
               
 Syntax      : IDL> LOCK_ZDBASE,FILE
    
 CALLED BY:
	MK_CDS_PLAN, UPDATE_IAP, UPDATE_KAP
 Examples    : IDL> lock_zdbase,/daily

 Inputs      : None
               
 Opt. Inputs : FILE = optional lock file name (def = lock.dat)
               
 Outputs     : None

 Opt. Outputs: None
               
 Keywords    :
               QUIET    = set to suppress messages
               ERR      = output messages
               LOCK_FILE = created LOCK file
               EXPIRE  = expiration time after creation
               STATUS = 1/0 for success/failure
               /CAT = set to lock for catalog DB
               /DEF = set to lock study definitions DB
               /DAI = set to lock for plan DB
               /RES = set to lock resources DB (e.g. campaign, etc)
               CHECK_ONLY = check for LOCK file

 CALLS: ***
	APPLY_LOCK, BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CHECK_LOCK
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], DATATYPE [1], DATATYPE [2]
	DATATYPE [3], GET_ZDBASE, RM_FILE, TRIM, break_file [4], concat_dir [4]
 Common      : None
               
 Restrictions: Must have write access to ZDBASE directories
               
 Side effects: None.
               
 History     : Version 1,  17-July-1996,  D M Zarro.  Written

 Contact     : DZARRO@SOLAR.STANFORD.EDU


LONLAT2XY $SSW/gen/idl/solar/lonlat2xy.pro
[Previous] [Next]

function lonlat2xy,helio0,date0, arcmin=arcmin, b0=b0in, radius=sunrin, $
                   behind =behind

 NAME:
	LONLAT2XY
 PURPOSE:
	Computes arcsecs-from-suncenter coordinates from 
	heliographic coordinate inputs (inverse of xy2latlon). 
 CALLING SEQUENCE: 
	arcvec = latlon2xy(helio, date [,/arcmin])
 INPUT:
       helio	- is a vector of heliocentric coordinates.  It should be 2xN.
                       (0,*) = longitude (degrees) W positive
                       (1,*) = latitude (degrees) N positive
		  They can also be strings in the form 'N30W23'.
	date	- Unless the date is supplied, today's date is used.
                 This will affect the Solar axial tilt, B0.  Ignored
                 if both b0 and radius keywords are set.
 OUTPUT:
	arcvec	- The angle in arcseconds as viewed from the earth.
                       (0,*) = E/W direction with W positive
                       (1,*) = N/S direction with N positive
 CALLED BY:
	GET_LATLON, MK_MDI_MAP_EARTH, MK_SOHO_MAP_EARTH, SOLB_READ_REPOINT [1]
	SOLB_READ_REPOINT [2], SOLB_SPACECRAFT_POINTING [1]
	SOLB_SPACECRAFT_POINTING [2], TRACE_ALIGN_CUBE, TRACE_CUBE_POINTING
	TRACE_MDI_ALIGN
 OPTIONAL KEYWORD INPUT:
       b0 = b0 angle in radians
       radius = solar radius in arsec (arsec even when /arcmin is set)
       behind = Flag array, 1 if behind limb, 0 if in front.
	arcmin	- If set, output is in arcminutes, rather than 
		  arcseconds.
 OPTIONAL KEYWORD OUTPUT:
 CAUTIONS: 	x and y are in solar coordinates (solar W and solar N).  There
               is no P-angle here.
 CALLS: ***
	CONV_HS2H [1], CONV_HS2H [2], anytim [1], anytim [2], anytim [3], anytim [4]
	anytim [5], get_rb0p [1], get_rb0p [2]
 HISTORY: 
       T. Metcalf 2001-Oct-17  This is an exact replacement for conv_h2a which
                               is only approximate.
       T. Metcalf 2001-Nov-13  Switched to a more robust calculation of
                               theta.
       T. Metcalf 2002-apr-03  Added b0 and radius keywords.
       T. Metcalf 2002-Apr-08  Added test for acos out of range and changed
                               anytim2ints call to anytim call to avoid
                               date format confusions.
       T. Metcalf 2002-Apr-11  Added behind keyword
       T. Metcalf 2005-Mar-11  When date is to be ignored, never use it.


low_res $SSW/gen/idl/util/low_res.pro
[Previous] [Next]
 Project     : HESSI

 Name        : low_res

 Purpose     : create a low resolution image/vector by removing every n'th pixels

 Category    : imaging, utility

 Explanation : 

 Syntax      : out=low_res(in,n1,n2)

 Examples    :

 Inputs      : IN = 1- or 2-d 
               N1 = # of pixels to skip in first dimension
               N2 = # of pixels to skip in second dimension

 Opt. Inputs : None

 Outputs     : OUT = reduced resolution array

 Opt. Outputs: None

 Keywords    : ERR = error string

 CALLS: ***
	EXIST, data_chk [1], data_chk [2], low_res_1d, low_res_2d
 Common      : None

 Restrictions: None

 Side effects: None

 History     : Written 22 April 1999, D. Zarro, SM&A/GSFC

 Contact     : dzarro@solar.stanford.edu


low_res_1d $SSW/gen/idl/util/low_res_1d.pro
[Previous] [Next]
 Project     : HESSI

 Name        : low_res_1d

 Purpose     : create a low resolution vector by removing every n'th pixels

 Category    : imaging, utility

 Explanation : 

 Syntax      : out=low_res_1d(in,n)

 CALLED BY:
	low_res
 Examples    :

 Inputs      : IN = 1d vector
               N = # of pixels to skip

 Opt. Inputs : None

 Outputs     : OUT = reduced resolution vector

 Opt. Outputs: None

 Keywords    : ERR = error string

 CALLS: ***
	EXIST, PR_SYNTAX, data_chk [1], data_chk [2]
 Common      : None

 Restrictions: None

 Side effects: None

 History     : Written 22 April 1999, D. Zarro, SM&A/GSFC

 Contact     : dzarro@solar.stanford.edu


low_res_2d $SSW/gen/idl/util/low_res_2d.pro
[Previous] [Next]
 Project     : HESSI

 Name        : low_res_2d

 Purpose     : create a low resolution 2d image by removing every n'th pixels

 Category    : imaging, utility

 Explanation : 

 Syntax      : out=low_res_2d(in,nx,ny)

 CALLED BY:
	low_res
 Examples    :

 Inputs      : IN = 2d array
               NX = # of pixels in x-dim to skip
               NY = # of pixels in y-dim to skip

 Opt. Inputs : None

 Outputs     : OUT = reduced resolution array

 Opt. Outputs: None

 Keywords    : ERR = error string

 CALLS: ***
	EXIST, PR_SYNTAX, data_chk [1], data_chk [2]
 Common      : None

 Restrictions: None

 Side effects: None

 History     : Written 22 April 1999, D. Zarro, SM&A/GSFC

 Contact     : dzarro@solar.stanford.edu


lprint Obsolete see sprintpro $SSW/gen/idl/system/lprint.pro
[Previous] [Next]
   Name: lprint (Obsolete - see sprint.pro)

   Purpose: print a file; place holder reference for an old/obsolete routine

   Input Parameters:
      file - file to print

   Keyword Parameters:
      _extra - any keyword accepted by sprint.pro

 CALLS: ***
	BOX_MESSAGE, LPRINT, sprint
   History:
      28-Oct-2001 - S.L.Freeland - restore existing 'lprint' references


LSF_ROTATE $SSW/gen/idl_libs/astron/astro/lsf_rotate.pro
[Previous] [Next]
 NAME:
     LSF_ROTATE:

 PURPOSE:
     Create a 1-d convolution kernel to broaden a spectrum from a rotating star

 EXPLANATION:
     Can be used to derive the broadening effect (line spread function; LSF) 
     due to  rotation on a synthetic stellar spectrum.     Assumes constant 
     limb darkening across the disk.

 CALLING SEQUENCE
     lsf = LSF_ROTATE(deltav, vsini, EPSILON=, VELGRID=)

 INPUT PARAMETERS:
    deltaV - numeric scalar giving the step increment (in km/s) in the output 
             rotation kernel.  
    Vsini - the rotational velocity projected  along the line of sight (km/s)

 OUTPUT PARAMETERS:
    LSF - The convolution kernel vector for the specified rotational velocity.
          The  number of points in LSF will be always be odd (the kernel is
          symmetric) and equal to  either ceil(2*Vsini/deltav) or 
          ceil(2*Vsini/deltav) +1 (whichever number is odd).    LSF will 
          always be of type FLOAT.

          To actually compute the broadening. the spectrum should be convolved
          with the rotational LSF. 
 OPTIONAL INPUT PARAMETERS:
    Epsilon - numeric scalar giving the limb-darkening coefficient, 
          default = 0.6 which is typical for  photospheric lines.    The
          specific intensity I at any angle theta from the specific intensity
          Icen at the center of the disk is given by:
  
          I = Icen*(1-epsilon*(1-cos(theta))
                    
 OPTIONAL OUTPUT PARAMETER:
     Velgrid - Vector with the same number of elements as LSF 
 EXAMPLE:
    (1) Plot the LSF for a star rotating at 90 km/s in both velocity space and
        for a central wavelength of 4300 A.    Compute the LSF every 3 km/s

       IDL> lsf = lsf_rotate(3,90,velgrid=vel)      ;LSF will contain 61 pts
       IDL> plot,vel,lsf                    ;Plot the LSF in velocity space
       IDL> wgrid = 4300*(1+vel/3e5)       ;Speed of light = 3e5 km/s
       IDL> oplot,wgrid,lsf                ;Plot in wavelength space

 NOTES:
    Adapted from rotin3.f in the SYNSPEC software of Hubeny & Lanz 
        .http://nova.astro.umd.edu/index.html Also see Eq. 17.12 in
    "The Observation and Analysis of Stellar Photospheres" by D. Gray (1992)
 REVISION HISTORY:
    Written,   W. Landsman                November 2001


lsplot $SSW/gen/idl/display/lsplot.pro
[Previous] [Next]
 NAME:
	lsplot
 PURPOSE:
	plot lightcurves of selected spectral regions
 CALLING SEQUENCE:
	lsplot,x,y,t,utbase
 INPUTS:
	x = 	x array (bin or wavelength)
	y = 	set of y arrays (*, n)
       t =     time array (sec)
 KEYWORDS:
       rate (o) = plotted lightcurve array
       title(i) = optional plot title
       norm (i) = signal to normalize rate by summed bins
       over (i) = signal to overlay successive plots
       wave (i) = signals that X is in wavelength units
       flux (i) = signals that Y is in flux units
       xrange (o) = wavelength range used to produce lightcurve
 CALLS: ***
	UTPLOT [1], UTPLOT [2], UTPLOT [3], UTPLOT [4], UTPLOT [5], UTPLOT [6], WDEF [1]
	WDEF [2], pcurse
 CALLED BY:
	LC_BSC
 HISTORY:
       Written Mar'93 by D. Zarro (ARC)


LSTSQR $SSW/gen/idl/fitting/lstsqr.pro
[Previous] [Next]
 Project     :	SOHO - CDS

 Name        :	LSTSQR

 Purpose     :	Least-squares fit of arbitrary function to data points

 Explanation :	Fits an arbitrary function to a series of data points via a
		least-squares reiterative technique.

 Use         :	LSTSQR, X, Y, FNAME, PARAM  [, PERR ]

 Inputs      :	X	 = Positions.
		Y	 = Data values.
		FNAME	 = Name of function to be fitted (string variable).
		PARAM	 = Parameters of fit.  Passed as first guess.  Returned
			   as fitted values.

 Opt. Inputs :	None.

 Outputs     :	PARAM	 = Parameters of fit.  See note above.

 Opt. Outputs:	PERR	 = Errors in PARAM.

 Keywords    :	ACCURACY = Accuracy to cut off at.  Defaults to 1E-5 (i.e. 5
			   significant figures).
		MAX_ITER = Maximum number of reiterations.  Defaults to 20.
		POISSON	 = If set, then a Poisson error distribution is
			   assumed, and the weights are set accordingly to 1/Y.
		ERROR	 = Array of errors.  The weights are set accordingly to
			   1/ERROR^2.  Overrides POISSON.
		WEIGHT	 = Array of weights to use in fitting.  Overrides
			   POISSON and ERROR.
		LAMBDA	 = Initial value of LAMBDA.  Defaults to 1E-2.
		NOPRINT	 = If set, then no printout is generated.
		CHISQR	 = Returned value of chi-squared.  Only relevant if
			   one of POISSON, ERROR, or WEIGHT keywords are used.
		N_ITER	 = Number of iterations used.  One can compare this
			   number against MAX_ITER to determine if convergence
			   has occurred or not.  If less than MAX_ITER, then
			   has converged.  However, if negative then a singular
			   matrix was discovered.
		CMATRIX	 = Correlation matrix.

 Calls       : ***
	DETERM, TRIM
 CALLED BY:
	CDS_LINEFIT_WRAP, DSPEXP, FIT_GAUSS, XCOR_CDS, hrts_w [1], hrts_w [2], tot_int
 Common      :	None.

 Restrictions:	The user defined function is passed by name as a character
		string in the variable FNAME.  The function must have the form.

				Y = F(X,PARAM,FDER)

		where X is the independent variable, PARAM is the vector
		containing the parameters of the fit, and FDER is an output
		array containing the partial derivatives of the function with
		respect to each parameter in PARAM.  This array will have the
		dimensions:

			FDER( N_ELEMENTS(X) , N_ELEMENTS(PARAM) )

		However, if FDER is returned by the function as a simple
		scalar, or not returned at all, then LSTSQR will calculate it
		itself, using numerical derivatives.

		If numberical derivatives are used, then the initial guess for
		PARAM must not contain any zeroes.

 Side effects:	If MAX_ITER is zero, then no iterations are made, and the
		routine goes directly to the error analysis section.

 Category    :	Utitilies, Curve_Fitting

 Prev. Hist. :	William Thompson, June 1991, modified to use keywords.

 Written     :	William Thompson, GSFC, June 1991

 Modified    :	Version 1, William Thompson, GSFC, 9 January 1995
			Incorporated into CDS library
		Version 2, William Thompson, GSFC, 28 September 1995
			Return N_ITER as negative if singular matrix
			encountered.

 Version     :	Version 2, 28 September 1995


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

 Name        : LTC_MAP

 Purpose     : Plot time history of mean values in vicinity of pixels

 Category    : imaging

 Explanation : Points nearest input coordinates are averaged

 Syntax      : ltc_map,map,xc,yc

 Examples    :

 Inputs      : MAP = map structure 
               XC,YC = coordinate arrays of pixels

 Opt. Inputs : None

 Outputs     : None

 Opt. Outputs: 

 Keywords    : TIME, DATA = output time and data arrays
               OVER = set for overplots
               TAG_ID = tag name or index to use
               AREA = if set, average over total area bounded by (xc,yc)
               TROTATE = rotate map coords to reference time before
                         averaging
               SHIFT = [x,y] offsets to apply to coordinates (after rotation)

 CALLS: ***
	EXIST, MEAN_MAP, PR_SYNTAX, VALID_MAP
 Common      : None

 Restrictions: None

 Side effects: None

 History     : Written 22 Jan 1997, D. Zarro, SAC/GSFC

 Contact     : dzarro@solar.stanford.edu


LUMDIST $SSW/gen/idl_libs/astron/astro/lumdist.pro
[Previous] [Next]
 NAME: 
    LUMDIST
       
 PURPOSE: 
    Calculate luminosity distance (in Mpc) of an object given its redshift 
 EXPLANATION:
    The luminosity distance in the Friedmann-Robertson-Walker model is 
    taken from  Caroll, Press, and Turner (1992, ARAA, 30, 499), p. 511
    Uses a closed form (Mattig equation) to compute the distance when the 
    cosmological constant is zero.   Otherwise integrates the function using
    QSIMP.	
 CALLING SEQUENCE: 
    result = lumdist(z, [H0 = , k = , Omega_M =, Lambda0 = , q0 = ,/SILENT])
      
 INPUTS:
    z = redshift, positive scalar or vector

 OPTIONAL KEYWORD INPUTS: 
    /SILENT - If set, the program will not display adopted cosmological
        parameters at the terminal.
    H0: Hubble parameter  in km/s/Mpc, default is 70

        No more than two of the following four parameters should be
        specified.   None of them need be specified -- the adopted defaults
        are given.
    k - curvature constant, normalized to the closure density.   Default is
        0, indicating a flat universe
    Omega_m -  Matter density, normalized to the closure density, default
        is 0.3.   Must be non-negative
    Lambda0 - Cosmological constant, normalized to the closure density,
        default is 0.7
    q0 - Deceleration parameter, numeric scalar = -R*(R'')/(R')^2, default
        is -0.5
       
 OUTPUTS:
    The result of the function is the luminosity distance (in Mpc) for each 
    input value of z.

 CALLS: ***
	COSMO_PARAM, LDIST, QSIMP
 CALLED BY:
	ZANG
 EXAMPLE:
    (1) Plot the distance of a galaxy in Mpc as a function of redshift out 
        to z = 5.0, assuming the default cosmology (Omega_m=0.3, Lambda = 0.7,
        H0 = 70 km/s/Mpc)

        IDL> z = findgen(50)/10.
        IDL> plot,z,lumdist(z),xtit='z',ytit='Distance (Mpc)'

        Now overplot the relation for zero cosmological constant and 
        Omega_m=0.3
        IDL> oplot,z,lumdist(z,lambda=0,omega=0.3),linestyle=1
 COMMENTS:
    (1) Integrates using the IDL Astronomy Version procedure QSIMP.    (The 
    intrinsic IDL QSIMP function is not called because of its ridiculous
    restriction that only scalar arguments can be passed to the integrating
    function.)
    (2) Can fail to converge at high redshift for closed universes with
    non-zero lambda.   This can presumably be fixed by replacing QSIMP with
    an integrator that can handle a singularity 
 PROCEDURES CALLED:
    COSMO_PARAM, QSIMP   
 REVISION HISTORY:
    Written   W. Landsman        Raytheon ITSS       April 2000
    Avoid integer overflow for more than 32767 redshifts  July 2001


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

 Name        : LVIEW_XY

 Purpose     : wrapper around SOHO_XY to adjust for L1 view 

 Category    : imaging

 Explanation : for rolled images, coordinates have to be corrected
               before applying solar view correction

 Syntax      : lview_xy,xp,yp,date,xr,yr

 Inputs      : XP,YP = input coordinates
               DATE = observation date

 Opt. Inputs : None

 Outputs     : XR,YR = view-adjusted coordinate arrays

 Opt. Outputs: None

 Keywords    : EARTH = map to EARTH-view
               SOHO = map to SOHO-view
               ERR = error string
               VERBOSE = print messages
               NO_COPY= set to not duplicate arrays
               ROLL,RCENTER = coordinate roll and roll center 
  
 CALLS: ***
	ANYTIM2TAI, COPY_VAR, EXIST, NUM2STR, PR_SYNTAX, SOHO_XY, roll_xy
 History     : Written 15 Feb 1999, D. Zarro, SM&A/GSFC

 Contact     : dzarro@solar.stanford.edu


LZPLOT $SSW/gen/idl/system/lzplot.pro
[Previous] [Next]
 NAME:
        LZPLOT
 PURPOSE:
        print a PostScript plot file
 CALLING SEQUENCE:
        LZPLOT [,VERSION][DELETE=DELETE][,FILENAME=FILENAME]
               [,queue=queue][,color=color]
 OPTIONAL INPUT PARAMETERS:
        FILE -    Other than the default, IDL.PS
        VERSION - An integer version number will cause the plotting of that
        particular IDL.PS file.
 KEYWORD PARAMETERS:
        DELETE   - delete the plot file after printing
        QUEUE    - printer queue name
        COLOR    - send to color printer
 CALLS: ***
	DATATYPE [1], DATATYPE [2], DATATYPE [3], PSPLOT [1], PSPLOT [2], TEST_OPEN
	get_host [1], get_host [2], pprint [1], pprint [2]
 CALLED BY:
	WBSC_LTC_EV [1], WBSC_LTC_EV [2], WBSC_SPC_EV [1], WBSC_SPC_EV [2], set_hard
 PROCEDURE:
	 Use GET_HOST to determine local node name
        and then call the appropriate hard copy plotting routine
 HISTORY:
        DMZ (ARC) Mar'93