S2C [1] $SSW/gen/idl/solar/s2c.pro
[Previous] [Next]
 NAME:
	S2C
 PURPOSE:
	Returns Cartesian coordinates (X,Y,Z) of a position vector
	or array of position vectors whose spherical coordinates are
	specified by V0.
 CALLING SEQUENCE:
	V1 = S2C(V0,YOFF=YOFF,ZOFF=ZOFF,ROLL=ROLL,B0=B0)
 INPUTS:
	V0 = Spherical coordinates (r,theta,phi) of a 3-vector or
	     array of 3-vectors, with theta and phi in degrees.
 OPTIONAL INPUTS:
       YOFF, ZOFF = Y AND Z TRANSLATIONS
       ROLL
       B0
 OUTPUTS:
       V1 = 3-vector containing Cartesian coordinates (x,y,z)
       corresponding to spherical coordinates specified in V0.  It is
       a 3xn array if v0 is.
 CALLS: ***
	MAKARR, MAKVEC
 CALLED BY:
	DRAW_GRID [1], DRAW_GRID [2], DRAW_GRID [3], GET_TRACUBE, MK_GRID_COORDS2
	PLOT_CLON, mk_strip_file, mplot_nar, plot_ar_pfi, plot_nar [1], plot_nar [2]
	rot_pix2
 MODIFICATION HISTORY:
       Written, Jan, 1991, G. L. Slater, LPARL
       GLS - Modified to allow translation, roll, and b0 corrections


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

 Name        :	SAFE_EXP()

 Purpose     :	Safe version of EXP() -- no floating underflows

 Category    :	Class4, Numerical

 Explanation :	Prior to IDL version 4, taking the exponential of a large
		negative number, for example when calculating a Gaussian far
		out from line center, would give a result of 0.  With the
		advent of version 4, the same calculation would give floating
		underflow error messages.

		This routine allows one to calculate exponentials without
		worrying about generating floating underflow errors.  Any
		numbers smaller than -87 (which gives an exponential of
		1.6E-38) return a result of 0.

 Syntax      :	Same as the EXP() function.

 CALLED BY:
	VDS_BURNIN_NEW, VDS_BURNIN_ORIG
 Examples    :	Y = SAFE_EXP(-X^2)

 Inputs      :	X	= The value or array to take the exponential of.
			  Complex numbers are also supported.

 Opt. Inputs :	None.

 Outputs     :	The result of the function is the exponential.

 Opt. Outputs:	None.

 Keywords    :	None.

 Calls       :	None.
 Common      :	None.

 Restrictions:	None.

 Side effects:	None.

 Prev. Hist. :	None.

 History     :	Version 1, 13-Jun-1997, William Thompson, GSFC

 Contact     :	WTHOMPSON


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

   Purpose: apply 'safe' log10  via alog10((data+1.)>1.), optionally bytscl

   Input Parameters:
      index - if structure, append history record including alorithm/values
      data -  data array to scale
  
   Calling Sequence:
      result=safe_log10(data [,/bytescale, min=xx, max=yy , backg=zz]) 
      -OR-
      result=safe_log10(index, data [,/bytescale, min=xx, max=yy , backg=zz])

   Calling Examples:
      sdata=safe_alog10(data,/bytescale)             ; log/bytescale
      sdata=safe_alog10(index, data, maximum=3.0 )   ; bytscale log to        

      -- note: is index structures supplied, history is updated ---
      IDL> out=safe_log10(index,data,back=865.,max=2.5)
      IDL> print,index.history
      safe_log10  result=bytscl(alog10( ((indata-865.0)+1.)>1.),min=0.0,max=2.5)  
      
   Keyword Parameters:
     bytescale - if set, bytscale               (after alog10 applied) 
     minimum  -  if set, minimum used in bytscl (implies BYTESCALE)
     maximum  -  if set, maximum used in bytscl (implies BYTESCALE)
     clobber  - if set, clobber input data (for memory management)
     background - if set, subtract this "pedastal" from data prior to
                  applying algorithim

 CALLS: ***
	BOX_MESSAGE, GET_TAG_INDEX, SLFMT, data_chk [1], data_chk [2], str_replace [1]
	str_replace [2], update_history
 CALLED BY:
	eit_proton_summary, mk_sxh, ssc_scan2, ssw_fov_context, sxt_clean [1]
	sxt_clean [2], sxt_composite [1], sxt_composite [2], sxt_composite [3]
	sxt_ssc2sss, sxt_ssc_rationalize, sxt_ssn2fits [1], sxt_xsaa
   History:
      22-March-1999 - S.L.Freeland - generic version of sxt/ypop/eit routine


SAFE_STRING $SSW/gen/idl/string/safe_string.pro
[Previous] [Next]
 Project     :	SOHO - CDS

 Name        :	SAFE_STRING()

 Purpose     :	Safe version of STRING

 Category    :	

 Explanation :	STRING has a limitation of 1024 strings when used with an
		explicit FORMAT specification.  Using this routine gets around
		that limitation.

 Syntax      :	Result = SAFE_STRING( EXPRESSION )

 CALLED BY:
	ANYTIM2CAL
 Examples    :	dd = strmid(safe_string(ext.day+100,format='(i3)'),1,2)

 Inputs      :	EXPRESSION = The expression to be converted to string type.

 Opt. Inputs :	None.

 Outputs     :	The result of the function is the converted string.

 Opt. Outputs:	None.

 Keywords    :	Any keywords allowed by the STRING function.

 Calls       :	STRING
 Common      :	None.

 Restrictions:	At the moment, only one expression can be passed to
		SAFE_STRING, whereas the built-in STRING function can take
		multiple inputs.

 Side effects:	None.

 Prev. Hist. :	None.

 History     :	Version 1, 18-Mar-1998, William Thompson, GSFC

 Contact     :	WTHOMPSON


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

   Purpose: ~undo the 'safe_log10' function algorithm

   Input Parameters:
       log10data - assumed output from safe_log10(data)
  
   Calling Sequence:
       original=safe_unlog10(log10data)
  
   History:
      25-March-1999 - S.L.Freeland


SAME_DATA [1] $SSW/gen/idl/util/same_data.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : SAME_DATA()
               
 Purpose     : Check if two variables are identical.
               
 Explanation : Checks if the values contained in the 2 inputs are the same.
               Works on any type of data input. 
               
 Use         : IDL> if same_data(a,b) then print,'a and b are identical'
    
 Inputs      : a  -  first input
               b  -  second input
               
 Opt. Inputs : None
               
 Outputs     : Function returns 1 for identity, 0 otherwise.
               
 Opt. Outputs: None
               
 Keywords    : None

 Calls       : ***
	DATATYPE [1], DATATYPE [2], DATATYPE [3], MATCH_STRUCT, SAME_DATA2
	SINCE_VERSION [1], SINCE_VERSION [2]
 CALLED BY:
	ADD_GSET, AXIS__DEFINE [2], Array_Despike, Energy_res [2], GEN__DEFINE
	GT_CDS_TIME, HESSI BACK PROJECTION STRATEGY ABSTRACT CLASS
	HESSI BINNED EVENTLIST CLASS DEFINITION
	HESSI FRAMEWORK TEMPLATE CLASS [2], HESSI FRAMEWORK TEMPLATE CLASS [3]
	HESSI IMAGE STRATEGY CLASS DEFINITION
	HESSI MODULATION PATTERN STRATEGY CLASS DEFINITION
	HESSI PACKET FILE ABSTRACT CLASS, HESSI ROLL_DB CLASS DEFINITION
	HSI_DRM_MOD CLASS, HSI_DRM_MOD_CONTROL__DEFINE, HSI_IMAGE_TEST [2]
	HSI_SPECTROGRAMACCBIN [5], HSI_SPECTRUM__DEFINE, LINE_COMPLEX, MONO_SPEC
	PARAPEAK, SAME_DATA2, SPECTRUM CLASS DEFINITION, SPEX_DRM__DEFINE
	SPEX_FITINT__DEFINE, SPEX_FIT__DEFINE, SPEX_GEN__DEFINE, SPEX__DEFINE
	STRUCTURE MANAGER CLASS, TP_DRAW_VWIN, TP_RECALC_DEW, XSTRUCT, cw_edroplist
	hsi_image__getaxis [2], hsi_obs_summary__define [1]
	hsi_obs_summary__define [2], hsi_params2script, hsi_shutter_transmission
	hsi_spectrum__filewrite, hsi_ui_img, hsi_ui_lc, hsi_ui_setlabels, hsi_ui_spec
	plotman, plotman_imageoptions, plotman_zoom, spex_image__define
 Common      : None
               
 Restrictions: None
               
 Side effects: None
               
 Category    : Util, numerical
               
 Prev. Hist. : None

 Written     : C D Pike, RAL, 22-Feb-95
               
 Modified    : Accept string arrays.  CDP, 9-Nov-95
               Modified, 22-Nov-02, Zarro (EER/GSFC) 
               - added call to more efficient same_data2 for IDL > 5.3


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

 Name        : SAME_DATA2()

 Purpose     : Check if two variables are identical.

 Explanation : Checks if the values contained in the 2 inputs are the same.
               Works on any type of data input. This is called by same_data for
               IDL versions 5.4 and greater because it's much faster.

 Use         : IDL> if same_data2(a,b) then print,'a and b are identical'

 Inputs      : a  -  first input
               b  -  second input

 Opt. Inputs : None

 Outputs     : Function returns 1 for identity, 0 otherwise.

 Opt. Outputs: None

 Keywords    : None

 Calls       : ***
	MATCH_STRUCT, SAME_DATA [1], SAME_DATA [2], SAME_DATA2_TEST
 CALLED BY:
	SAME_DATA [1]
 Common      : None

 Restrictions: None

 Side effects: None

 Category    : Util, numerical

 Prev. Hist. : None

 Written     : Andre Csillaghy, Dominic Zarro 2005

 Modified    : This version replaces the online version 3-Nov-2005.  Eliminates a lot
               of checking and relies on catch to trap some cases.  Much faster.
               16-nov-2005, Andre.  Removed check for error_code eq -203. The number
                   changed in newer versions of IDL, plus not necessary anyway.


SAVE_ANALYSIS $SSW/gen/idl/fitting/save_analysis.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : SAVE_ANALYSIS
               
 Purpose     : Save a CFIT ANALYSIS structure with data
               
 Explanation : Saves all the data associated with a CFIT ANALYSIS structure,
               retrievable by RESTORE_ANALYSIS.
               
 Use         : SAVE_ANALYSIS,ANALYSIS
    
 Inputs      : ANALYSIS : Component fitting system (CFIT) analysis structure,
                          containing the data to be saved, and the file name
                          to be used when saving. If no file name is given, 
                          pickfile will be used to prompt for one.
                          
 Opt. Inputs : None.
               
 Outputs     : None.
               
 Opt. Outputs: None.
               
 Keywords    : VERBOSE : Propagated to the SAVE command.

 Calls       : ***
	BIGPICKFILE, BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], DATATYPE [1]
	DATATYPE [2], DATATYPE [3], DEFAULT, break_file [4]
 CALLED BY:
	XCFIT_BLOCK
 Common      : None.
               
 Restrictions: Must have widgets to use pickfile.
               
 Side effects: None.
               
 Category    : Line fitting.
               
 Prev. Hist. : None.

 Written     : SVH Haugan, UiO, 25 September 1997
               
 Modified    : Not yet. 

 Version     : 1, 25 September 1997


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

   Purpose: save selected subset of IDL routines to binary file (pre-compiled)

   Input Parameters:
      routines - optional list of routines - default=ALL or via PATTERN match)

   Output Parameters:
      NONE:

 CALLS: ***
	ARR2STR [1], Arr2Str [2], BOX_MESSAGE, CONCAT_DIR [1], CONCAT_DIR [2]
	CONCAT_DIR [3], DELVARX [1], DELVARX [2], DELVARX [3], DELVARX [4], FILE_EXIST [2]
	SINCE_VERSION [1], SINCE_VERSION [2], TIME2FILE, anytim [1], anytim [2]
	anytim [3], anytim [4], anytim [5], concat_dir [4], data_chk [1], data_chk [2]
	delvarx [5], file_exist [1], file_exist [3], get_logenv [1], get_logenv [2]
	get_user [1], get_user [2], id_esc, prstr [1], prstr [2], reltime [1], reltime [2]
	ssw_strsplit, str_replace [1], str_replace [2], strarrcompress, strspecial [1]
	strspecial [2], wc_where [1], wc_where [2]
 CALLED BY:
	restore_idl_routines
   Side Effects: writes a binary file containing desired IDL routines
                 [restore via 'restore_idl_routines' with same settings
                  of optional PATTERN='*xxx', /NODATE, and OUTDIR='dir' ]

   Keyword Parameters:
      pattern - string pattern to match (wild cards ok)
      loud - if set, be more verbose
      date - if (switch set) include todays date YYYYMMDD in default file name
             if (otherwise defined), anytim.pro compat; use that YYYYMMDD
             if (undefined or /NODATE) date not included in filename

      file - save file name - 
             Default: 'idl_routines_Rx[xx]_USER_[PATTERN][_YYYYMMDD].save'
                                    |Release
      outdir - output directory - Default> $HOME
      name_only - if set, just form filname FILE and return 
                  (for example, for use by restore_idl_routines.pro)
      functions_only - if set and PATTERN set, just consider Functions
      pros_only -      if set and PATTERN set, just consider Procedures

   Calling Sequence:
      IDL> save_idl_routines,pattern='xxx*'  ; save routines with prefix xxx
      IDL> save_idl_routines,pattern='*xxx'  ;                                         

   History:
      18-October-1999 - S.L.Freeland; simplify/control call to save,/routine
      09-May-2003, William Thompson - Use ssw_strsplit instead of strsplit

   Restrictions:
      Version > 4.

   Notes:
      If PATTERN includes wild cards (* or ?), the default file name
      will include an escaped versions for valid file name construction
      The original pattern used (inc wild cards) can be seen via 
      ORIG=id_unesc(file)

   Suggestions: suggest you take the default name for traceability 
                and compatibility use with 'restore_idl_routines.pro'
                (use /NODATE or /DATE and OUTDIR='xxx' for some flexibility)


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

   Purpose: save current environment (UNIX environmentals/VMS logicals)
            (for temporary change and later restoration via restenv.pro)

   History:
      9-Jan-1994 (SLF)

   Method:
      calls get_logenv.pro to return envrionment

 CALLS: ***
	get_logenv [1], get_logenv [2]
   Common Blocks:
      saveenv_blk (store environmentals and translation)

   Assumptions/Restrictions


savegen [1] $SSW/gen/idl/io/savegen.pro
[Previous] [Next]
   NAME: savegen   
 
   Purpose: save user specified parameters (idl variables) in a generic file
	     [front end to wrt_genx - files are restored via savegen.pro]

   Input Parameters:
      p1, p2, p3... p15 - idl variables to save

   Optional Keyword Parameters
      file - file name for save - default is 'save.genx' in current direct
             if name is supplied and notype keyword is not set, the
	      actual file name used will have .genx appended
      names - strarr or delimited string containg saved variable names - 
	       number elements in array (or expanded array) should equal
	       the number of input parameters - Use to document saved names
      text -  string or string array describing file (for user internal 
	       documentation)
      notype - if set, inhibits default file type assignment
		by default, filename=file+'.gen' for  non xdr and
			    filename=file+'.genx' for xdr format
      replace - [note: version 1.0 replace is default]
      xdr  -    [note: version 1.0 and greater is always xdr]

   Calling Sequence:
      savegen,v1 [,v2, v3..., v15, name=name, file=file, text=text]
								  
   Calling Examples:						[file name]

      savegen, spectra , times, file='spec_01'			'spec_01.genx'

      savegen, temp, EM, index(3:4), text=info_array(3:4),  $  'save.genx'
	  names=['temp', 'EM']

      savegen, pimage,infil,ss, file='sxt_kp', 	     $  'sxt_kp.genx'
		text=['SXT:KP Mag Overlay',info_array(4:5)], $
      
 CALLS: ***
	BUILDGEN, STR2ARR [1], STR2ARR [2], WRT_GENX [1], WRT_GENX [2]
 CALLED BY:
	CH_SYNTHETIC, EIS_LIST_EXPER [1], EIS_LIST_EXPER [2], EIS_LIST_MAIN [1]
	EIS_LIST_MAIN [2], GE_WINDOW [1], GOES_TF, GOES_TF_COEFF
	HW_SYNSPEC__DEFINE defines the class HW_SYNSPEC Objects of this [1]
	HW_SYNSPEC__DEFINE defines the class HW_SYNSPEC Objects of this [2]
	MAKE_GOES_RESP, MK_MER_CONT, MK_SUMER_DBASE, RATIO_PLOTTER [1], UPDATE_KAP
	UPDATE_TERM, XCDS_BOOK, XCPT, atr2hxa_dbase, av_dt_genx, ccd_sunc [1], ccd_sunc [2]
	ch_ss, eit_genx_cat, eit_proton_summary, fl_goesplot [1], fl_goesplot [2]
	fl_goesplot [3], fl_suntoday [1], fl_suntoday [2], fl_suntoday [3]
	fl_sxtobsnar [1], fl_sxtobsnar [2], genx_newver [1], genx_newver [2]
	hsi_spectrum__filewrite, hsi_spectrum__genxwrite, jitter_gif_xyimg
	make_goes_chianti_response [1], make_goes_chianti_response [2]
	make_goes_chianti_response [3], make_goes_chianti_response [4]
	mk_mapfile [1], mk_mapfile [2], mk_mo_log, mk_pix [1], mk_pix [2], mk_sdmi
	mk_soup_hcat, msok_poi_copy [1], msok_poi_copy [2], ratio_plotter [2]
	rd_dpc_table, res_freq, search_obs, sun_today [1], sun_today [2], sun_today [3]
	sxt2file, sxt_etemp, sxt_mornint, sxt_summary, synop_movie, timeline, topsdb [1]
	topsdb [2], trace_last_movie [1], trace_last_movie [3]
	trace_special_movie [1], trace_special_movie2, video_title, web_seq
	write_genxcat, xr_mk_abun_file, xsearch_obs, xset_chain [1], xset_chain [2]
   History: 
       30-oct-91 - SLF (originally for Calibration files)
	8-Nov-91  - MDM Expanded from 10 to 15 parameters
	15-Apr-93 - SLF   file name updates (dont clobber input)
       16-Mar-93 - SLF - add struct input keyword
	24-Mar-93 - SLF - update documentation and 'unclutter'
	30-Mar-93 - SLF - error check positional paramter(0)
       31-Mar-93 - SLF - allow names keyword to be delimited string
			  some documentation upgrades


   Hints - if you intend on keeping a file around, it pays to include 
     internal documentation which will jog your memory later.  The simplest 
     method is to supply a string or string array via the TEXT keyword.  
     You could save additional documentation via additional input paramters.
     For example, if you journal your idl session while creating a final
     data product, you could pass that in as internal documentation.
     For this, you could use the generic text reader <rd_tfile.pro> to
     transform the journal file to a string array - this could then
     be passed in as a positional parameter (or via keyword TEXT)
     For example, the following call might save an image, an index record,
     reformated file info, and the journal file used during image creation:

     savegen, fltimage, index, fileid, rd_tfile('idlsave.pro'), $
	   text='Nobel Candidate', file='apj_fig1'

     An additional level of internal documentation is available through
     the use of the NAMES keyword - you should use this if you desire to
     retain the actual names used in the call to savegen.  
     EX: (may use X-cut and paste of call sequence)
     savegen,index,data,info_array,names='index,data,info_array'
             |-------cut---------|        |----- paste -------|

     Use of savegen/restgen pair (simple example):
     savegen,v1,v2,v3		; saves user variables v1,v2,v3 in 'save.genx'
     restgen,a,b,c 		; restores them (now named a,b,c)

     To verify your file after writing, use restgen inquire option:
     restgen,/inquire [,/nodata] ; displays summary of 'save.genx' contents
     


savegenx $SSW/gen/idl/io/savegenx.pro
[Previous] [Next]
   Name: savegenx

   Purpose: update of 'savegen' to handle pointers, objects, etc.

   Input Parameters:
      p0,p1...pn - variables to save - any IDL type,variety

   Keyword Parameters:
      file   - output file name;  default 'save.geny'
      notype/noextension (synonyms)  - dont include default extention '.geny'
      overwrite - if set, OK to clobber existing version of FILE
      _extra - all other keywords passed to RSI 'save' via inheritance

   Calling Sequence:
      IDL> savegenx, v1 [,v2,v3...vN] [,file='filename'] [,/noexten] [,/over]

 CALLED BY:
	hessi_save_settings, hsi_pixon_smooth_patterns, mk_synsfc_coeff [1]
	mk_synsfc_coeff [2], obj_save, plotman_widget, sxt_prep [1], sxt_prep [2]
	sxt_prep [3], trace_make_vignette, trace_special_movie [2]
	trace_special_movie [3], write_genxcat
   History:
      4-November-1999 - S.L.Freeland - permit saving "modern" RSI data

   Method:
      setup and call 'save' via execute statement
      Retrieve contents via: 'restgenx'

 CALLS: ***
	ARR2STR [1], Arr2Str [2], BOX_MESSAGE, FILE_EXIST [2], data_chk [1], data_chk [2]
	file_exist [1], file_exist [3], str_replace [1], str_replace [2]
  Restrictions:
    Need to consider integration with 'savegen/restgen' a little more...


SAVEIMAGE $SSW/gen/idl/image/saveimage.pro
[Previous] [Next]
 NAME:
    SAVEIMAGE

 PURPOSE:
    Save the current graphics window to an output file (GIF by default).

    The output formats supported are:
    GIF   8-bit with color table,
    BMP   8-bit with color table,
    PNG   8-bit with color table,
    PICT  8-bit with color table,
    JPEG 24-bit true color,
    TIFF 24-bit true-color.

    Any conversions necessary to convert 8-bit or 24-bit images onscreen to
    8-bit or 24-bit output files are done automatically.

 CATEGORY:
    Input/Output.

 CALLING SEQUENCE:
    SAVEIMAGE, FILE

 INPUTS:
    FILE     Name of the output file (GIF format by default).

 OPTIONAL INPUTS:
    None.

 KEYWORD PARAMETERS:
    BMP      Set this keyword to create BMP format (8-bit with color table).
    PNG      Set this keyword to create PNG format (8-bit with color table).
    PICT     Set this keyword to create PICT format (8-bit with color table).
    JPEG     Set this keyword to create JPEG format (24-bit true color).
    TIFF     Set this keyword to create TIFF format (24-bit true color).
    QUALITY  If set to a named variable, specifies the quality for
             JPEG output (default 75). Ranges from 0 ("terrible") to
             100 ("excellent"). Smaller quality values yield higher
             compression ratios and smaller output files.
    DITHER   If set, dither the output image when creating 8-bit output
             which is read from a 24-bit display (default is no dithering).
    CUBE     If set, use the color cube method to quantize colors when
             creating 8-bit output which is read from a 24-bit display
             (default is to use the statistical method). This may improve
             the accuracy of colors in the output image, especially white.
    QUIET    Set this keyword to suppress the information message
             (default is to print an information message).
    OUTSIZE  Size of output image file in pixels

 OUTPUTS:
    None.

 OPTIONAL OUTPUTS:
    None

 CALLS: ***
	CONGRID [1], CONGRID [2], CONGRID [3], REDUCE_COLORS, REVERSE, SSW_WRITE_GIF
	WRITE_BMP, WRITE_PICT
 CALLED BY:
	EIS_IMAGE_TOOL_EVENT [1], EIS_IMAGE_TOOL_EVENT [2], IMAGE_TOOL_EVENT, TIFF2GIF
 COMMON BLOCKS:
    None

 SIDE EFFECTS:
    The output file is overwritten if it exists.

 RESTRICTIONS:
    Requires IDL 5.0 or higher (square bracket array syntax).

 EXAMPLE:

openr, lun, filepath('hurric.dat', subdir='examples/data'), /get_lun
image = bytarr(440, 330)
readu, lun, image
free_lun, lun
loadct, 13
tvscl, image
saveimage, 'hurric.gif'

 MODIFICATION HISTORY:
 Liam.Gumley@ssec.wisc.edu
 http://cimss.ssec.wisc.edu/~gumley
 $Id: saveimage.pro,v 1.17 2000/02/08 19:39:38 gumley Exp $
 Modified: 29-Oct-2000, zarro@smmdac.nascom.nasa.gov - added outsize keyword
 Version 3, 13-Aug-2003, William Thompson
       Use SSW_WRITE_GIF instead of WRITE_GIF
 Version 4, 28-June-2006, Zarro - set DECOMPOSED=0 if undefined, and
           reset to original value when completed.

 Copyright (C) 1999 Liam E. Gumley

 This program is free software; you can redistribute it and/or
 modify it under the terms of the GNU General Public License
 as published by the Free Software Foundation; either version 2
 of the License, or (at your option) any later version.

 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.

 You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.


savesys [1] $SSW/gen/idl/io/savesys.pro
[Previous] [Next]
   Name: savesys

   Purpose: save idl system variables for later restoration via restsys
            (variables saved in yohkoh system variable: !ys_idlsys_temp)

   Input Keyword Parameters:
      all -   if set, save all (writeable) idl system variables 
      aplot -  if set, save all plot related variables (!x,!y,!z,!p)
      x,y,z - if set, save specified axis variable (!x, !y, and/or !z)
      c,order,map,more - save associated system variable(s)

   Calling Examples:
      savesys,/x,/y		; save !x, !y 
      savesys,/p		; save !p
      savesys,/aplot		; save !x,!y,!z,!p
      savesys,/all		; save above plus some others (!c, !map..)
   
      Generally, a routine would use this routine paired with restsys.pro
        pro junk,a,b,c
        savesys,/aplot		; save plot variables
        <change !x,!y,!p>	; routine plays with global variables
        restsys,/aplot		; restore plot values
        return		   

 CALLED BY:
	DRAW_GRID [1], DRAW_GRID [2], HSI_CWTOOLS_LINESET, HSI_FORWARDFIT, NORH_GRID [1]
	NORH_GRID [2], PLOT_CLON, POLAR_GRID, SXT_GRID [1], SXT_GRID [2], SXT_GRID [3]
	TV_SYNOP, event_movie [1], event_movie [2], goes_summary, goes_widget, last_lc
	lcur_image, plot_nar [1], plot_nar [2], sun_grid
   Side Effects:
      def_yssysv.pro is called if it has not been done already to define
      Yohkoh system variables
      
 CALLS: ***
	def_yssysv [1], def_yssysv [2]
   Common Blocks:
      def_yssysv_blk	- determine if Yohkoh system variables are defined

   History:
      21-Apr-1993 (SLF)
      22-apr-1993 (SLF) ; remove !more references


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

 Name        : 
	SCALE_TV
 Purpose     : 
	Scales an image to best fit the image display screen.
 Explanation : 
	Scales the size of an image to best fit the size of an available area 
	on the image display screen.  Called from EXPTV and other routines.
 Use         : 
	SCALE_TV, ARRAY, MX, MY, JX, JY
 Inputs      : 
	ARRAY	= Image to be scaled.
 Opt. Inputs : 
	None.
 Outputs     : 
	MX, MY	 = The size to use in displaying the image.
	JX, JY	 = The position of the lower left-hand corner of the image to 
		   use in displaying the image.
 Opt. Outputs: 
	None.
 Keywords    : 
	NOSQUARE = If passed, then pixels are not forced to be square.
	SIZE	 = If passed and positive, then used to determine the scale of
		   the image.  Returned as the value of the image scale.  May
		   not be compatible with /NOSQUARE.
	NOBOX	 = If set, then no space is reserved for a border around the
		   image.  Generally used with the EXPAND_TV switch of the same
		   name.
	DISABLE  = If set, then TVSELECT not used.
	NOEXACT  = If set, then exact scaling is not imposed.  Otherwise, the
		   image scale will be either an integer, or one over an
		   integer.  Ignored if SIZE is passed with a positive value.
	XALIGN	 = Alignment within the image display area.  Ranges between 0
		   (left) to 1 (right).  Default is 0.5 (centered).
	YALIGN	 = Alignment within the image display area.  Ranges between 0
		   (bottom) to 1 (top).  Default is 0.5 (centered).
	RELATIVE = Size of area to be used for displaying the image, relative
		   to the total size available.  Must be between 0 and 1.
		   Default is 1.  Passing SIZE explicitly will override this
		   keyword.
	SCALE	 = Pixel scale in physical units.  Can have either one or two
		   elements.  If not passed, then 1 is assumed in both
		   directions.  Only used if the /ADJUST keyword is also used.
	ADJUST	 = If set, then adjust the pixel size separately in the two
		   dimensions, so that the physical scale given by the SCALE
		   parameter is the same along both axes.  For example, if a
		   100x100 image is displayed with

			EXPTV, A, SCALE=[2,1], /ADJUST

		   then it will be shown twice as wide as it is high.  Use of
		   this keyword forces NOEXACT to also be set.  Also, NOSQUARE
		   is ignored.
	TRUE	 = If passed, then contains the dimension containing the color
		   dimension.  For example, if the input array has the
		   dimensions (3,Nx,Ny), then one would set TRUE=1.  If not
		   passed, then TRUE=3 is assumed.  Ignored if the image only
		   has two dimensions.
 Calls       : ***
	GET_IM_KEYWORD, HAVE_WINDOWS [1], HAVE_WINDOWS [2], IM_KEYWORD_SET, TVSELECT
	TVUNSELECT
 CALLED BY:
	EXPTV, PUT
 Common      : 
	IMAGE_AREA  = Contains switch IMAGE_SET and position IX, NX, IY, NY.
 Restrictions: 
	ARRAY must be two-dimensional or an array of three 2-D images (Nx,Ny,3)
	to be used for true color.  (See also the TRUE keyword.)

	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., Feb. 1991, modified to use TVSELECT, TVUNSELECT.
	W.T.T., Feb. 1991, modified to use common block IMAGE_AREA.
	W.T.T., Feb. 1991, added SIZE keyword.
	W.T.T., Mar. 1991, added NOEXACT keyword.
	W.T.T., Oct. 1991, added !ASPECT system variable.
 Written     : 
	William Thompson, GSFC, October 1987.
 Modified    : 
	Version 1, William Thompson, GSFC, 12 May 1993.
		Incorporated into CDS library.
	Version 2, William Thompson, GSFC, 15 November 1995
		Added check to make sure that window exists.
	Version 3, William Thompson, GSFC, 25 July 1996
		Added keywords SCALE and ADJUST
	Version 4, William Thompson, GSFC, 13 November 2001
		Added capability for true-color images.
 Version     : 
	Version 4, 16 November 2001


SCALECOM [1] $SSW/gen/idl/fund_lib/sdac/scalecom.pro
[Previous] [Next]
 Project: 
	SDAC

 NAME: 
	SCALECOM

 PURPOSE:
	This is an include block to be used with CH_SCALE and PL_SCALE.

 CATEGORY:
	GRAPHICS

 CALLING SEQUENCE:
  	@scalecom

 CALLS:
	none
 INPUTS:
       none explicit, only through commons;

 OPTIONAL INPUTS:
	none

 OUTPUTS:
       none explicit, only through commons;

 OPTIONAL OUTPUTS:
	none

 KEYWORDS:
	none
 COMMON BLOCKS:
	scalecom

 SIDE EFFECTS:
	none

 RESTRICTIONS:
	none

 PROCEDURE:
	none

 MODIFICATION HISTORY:
	richard.schwartz@gsfc.nasa.gov, 10-June-1996	documented


SCANPATH $SSW/gen/idl/help/scanpath.pro
[Previous] [Next]
 Project     : SDAC

 Name        : SCANPATH

 Purpose     : Widget prog. for reading documentation within IDL procedures

 Explanation :
	Widget-based routine to read in the documentation from IDL procedures
	in the search path.  Optionally, reads in the entire procedure.
 Use         :
	SCANPATH  [, NAME ]

 Inputs      : None required.

 Opt. Inputs : NAME - Name of procedure to search and document

 Outputs     :
	None.
 Opt. Outputs:
       PROC:           String array with the text of the latest saved procedure
 Keywords    :
       RESET:          Clear out previous procedures from memory
       PC:             If set, then put directory list widget in separate column
       LAST:           Restore last procedure in memory
       NOKILL:         Set to not do a global widget reset
       FONT  :         Set personal FONT

 CALLS: ***
	BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CHKARG, CHKLOG [1], CHKLOG [2]
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], DATATYPE [1], DATATYPE [2]
	DATATYPE [3], DELVARX [1], DELVARX [2], DELVARX [3], DELVARX [4], DPRINT, EXIST
	FREE_POINTER, GET_DFONT [1], GET_DFONT [2], GET_HANDLER_ID, GET_LIB, GET_MOD
	GET_PROC, HAVE_WIDGETS [1], HAVE_WIDGETS [2], IDL_RELEASE, MK_DFONT, OS_FAMILY
	REVERSE, RM_FILE, SCANPATH_CLEAN, SCANPATH_EVENT, SCANPATH_HISTORY, SCANPATH_PROC
	SCANPATH_RECOVER, SCANPATH_TXT, STR2FILE, STRIP_DOC, STRPAD, TIMER_VERSION, TRIM, XACK
	XALIVE, XHOUR, XINPUT, XKILL, XMANAGER_RESET, XMENU2, XPRINT [1], XPRINT [2], XPRINT [3]
	XPRINT [4], XPRINT [5], XREGISTERED, XSHOW, XTEXT, XTEXT_RESET, break_file [4]
	concat_dir [4], delvarx [5]
 CALLED BY:
	XDOC
 Common      :
	Uses the common blocks defined in SCANPATH_COM.
 Restrictions:
	Needs X-windows and widgets support (MOTIF or OPENLOOK).
 Side effects:
	If "ALL" is selected to read in the entire file, then memory problems
	may arise when reading very large procedure files.
 Category    :
	Documentation, Online_help.
 Prev. Hist. :
	Written May'91 by DMZ (ARC).
	Modified Dec 91 by WTT (ARC) to support UNIX, and add the following
		features:
			- Search current directory, as well as !PATH
			- Allow for files "aaareadme.txt" containing more
			  general information to also be searched.
			- Only save last five procedures in memory.
			- Add "documentation only" button.
			- Use environment variable IDL_PRINT_TEXT
			- Change extensions ".SCL", ".MOD" to "._SCL", "._MOD".
       Modified Jan'92 by DMZ (ARC) to sense screen size and autosize widgets
	Modified Feb'92 by WTT (ARC) to use SCANPATH_FONT environment variable.
	Modified Feb'92 by DMZ (ARC) to include a message window
	Modified Mar'92 by DMZ (ARC) to enable remote printing of files
       Modified Jul'92 by DMZ (ARC) to improve DOC_ONLY switch and add EXTRACT button
       Modified Oct'92 by DMZ (ARC) to accept procedure name as input
       Modified Dec'92 by EEE (HSTX) to accept search strings
       Modified Mar'93 by DMZ (ARC) to handle "~" in UNIX directory names
                                    and print modules from VMS text libraries
 Written     :
	D. Zarro, GSFC/SDAC, May 1991.
 Modified    :
	Version 1, William Thompson, GSFC, 23 April 1993.
		Renamed SCANPATH_COM to SCANPATH_COM for DOS compatibility,
		changed line defining YSZ, and incorporated into CDS library.
	Version 2, William Thompson, GSFC, 18 June 1993.
		Added IDL for Windows compatibility.
		Changed size of widgets to better fit in IDL for Windows.
		Split columns into two widget windows to make better use of
               space.
	Version 2.1 Dominic Zarro, GSFC, 21 July 1993.
		Made procedure and search text widgets independent bases.
       Version 3, Dominic Zarro, GSFC, 1 August 1994.
               Cleaned up and added check for XDOC_ONLY environment variable.
               Changed SCANPATH_FONT to XDOC_FONT for procedure text widget
       Version 3.1, Dominic Zarro, GSFC, 16 August 1994.
               Added /NOSPLIT keyword.
               Fixed /FONT so that original font is restored on exit.
               (This keyword overrides the value of XDOC_FONT)
       Version 3.2, Zarro, GSFC, 24 August 1994.
               Fixed bug where XMANAGER was being called twice.
               Excised PC keyword
       Version 3.3, Zarro, GSFC, 3 September 1994.
               Fixed another potential bug when XMANAGER was being
               called twice during search.
       Version 4, Zarro, GSFC, 18 September 1994.
               Put back /PC. If set, then the directory list widget appears
               in a second column (rather than in a third row, where
               it usually falls off the screen).
       Version 4.1, Zarro, GSFC, 19 September 1994.
               Removed forcing of procedure names to lowercase.
               Converted PROC keyword to argument to enable transfer
               back to XDOC
       Version 5, Zarro, GSFC, 10 October 1994.
               Changed search text function to search file function.
               Added STRIP_DOC function.
       Version 5.1, Zarro, GSFC, 22 October 1994.
               Added LAST keyword to restore last save procedure
       Version 5.2, Zarro, GSFC, 12 December 1994.
               Fixed potential bug in FIND logic -- should only arise
               in 1 in 22 million cases.
       Version 6.0, Zarro, GSFC, 1 September 1996.
               Optimized with new widget routines
       Version 7.0, Zarro, GSFC, 1 December 1996.
               Optimized with better search routines
       Version 8.0, Zarro, GSFC, 1 August 1997.
               Added history option
       Version 9.0, Zarro, GSFC, 1 December 1997.
               Added detach option
       Version 10.0, Zarro, GSFC, 1 March 1998
               Added /NO_BLOCK (IDL version 5 only)
       Version 11.0, Zarro, GSFC, 20 May 1998
               Added more control for FONT and TEXT size
       Version 12.0, Kim. GSFC, 6 June 2005
               If dfont is a blank string, set to (get_dfont())(0)
       Modified 23-Aug-05, Zarro (L-3Com/GSFC) - added XHOUR


SCATTER3D $SSW/gen/idl/util/scatter3d.pro
[Previous] [Next]
 NAME:
   SCATTER3D

 PURPOSE:
      Show a scatterplot of two arrays with color coding to 
      indicate density of points.  

 AUTHOR:

   Thomas Berger
   Lockheed Martin Solar and Astrophysics Laboratory
   berger@lmsal.com

 CATEGORY:
       Data analysis, graphics.

 CALLING SEQUENCE:
       SCATTER3D,array1,array2

 INPUTS:
       ARRAY1:   data array of any dimension > 0
       ARRAY2:   data array of the same dimension as ARRAY1

 OUTPUTS:
       BINS:     The binsize actually used in HIST2D (determined from
                 data ranges and NBIN parameter.

       R:        The HIST2D "image" used to display the scatterplot

       CENTER:   The center of the principle moment ellipse. Only if
                 keyword ELLIPSE is set.

      SEMI_AIXS: FLTARR[2] containing the semi-axes of the principle
                 moment ellipse in data units. Only if keyword ELLIPSE
                 is set.

       ROTANG:   Rotation angle of the principle moment ellipse in 
                 degrees counterclockwise from x-axis. Only if 
                 keyword ELLIPSE is set.
       
 KEYWORD PARAMETERS:

       NBIN:     The number of bins for HIST2D - effectively the
                 number of "pixels" in the scatterplot image.
                 Default is 100.

       ELLIPSE:  If set, routine calculates and plots the principle moment 
                 ellipse fit to the scatterplot "image".           

       XTITLE:   Passed directly to PLOT.PRO for axis labelling.
       YTITLE    

       PLOT45:   If set, plots the 45-degree, slope=1, line for comparison
                 to the scatterplot data.

 CALLS: ***
	COLORBAR [1], COLORBAR [2], CONGRID [1], CONGRID [2], CONGRID [3], HIST_2D, LOADCT
	SCATTER3D_ELLIPSE, WINX
 COMMON BLOCKS:
       None.

 SIDE EFFECTS:
       720x540 pixel direct graphics window is opened in upper right of display.

 RESTRICTIONS:
       Requires HIST2D.PRO (built-in IDL function) and 
       COLORBAR.PRO (Fanning Software IDL procedure, also found in SolarSoft).       

 EXAMPLE:
       To make a scatterplot of two images IMAGE1 and IMAGE2 with
       the priniciple moment ellipse and a 45-degree line

       SCATTER3D, image1, image2, bins, r, center, semi, rotang,$
           /ELLIPSE,/PLOT45,XTITLE='Image 1', YTITLE='Image 2'

 MODIFICATION HISTORY:
       Written by: Thomas Berger, LMSAL, 10/2001.
       2-November-2001 - S.L.Freeland;
                         change 'ellipse' to scatter3d_ellipse 
                         'diagonal' to scatter3d_diagonal
                         to avoid current (and future) naming conflicts


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

 Name        : SCOPE

 Purpose     : zoom in on an image

 Category    : imaging

 Explanation : Calls SCOPE_CURSOR to draw a fixed size box in which to zoom.
               User presses left mouse button to effect zoom

 Syntax      : scope,mag

 Opt. Inputs : MAG = zoom magnification factor [def=3]

 Outputs     : None

 Keywords    : SIZE = initial box size [def=100]
               NOSCALE = set to not bytescale image when zooming
               PERCENT = box size in % of window units

 CALLS: ***
	EXIST, SCOPE_CURSOR
 CALLED BY:
	plotman
 History     : Written:  D. Zarro, 28-Dec-98 (SMA/GSFC)

 Contact     : dzarro@solar.stanford.edu


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

 Name        : SCOPE_CURSOR

 Purpose     : Draw a rubber-band box (or circle)

 Category    : imaging

 Explanation : This function draws a rubberband box (or circle) in the
               window specified by the positional parameter
                (or the current graphics window, by default).
               The coordinates of the final box are returned by the
               function. Move the cursor to draw, press the left button
               to drag, and press the right button to exit.


 Syntax      : scope_cursor,coord

 Outputs     : CORDS= [xstart,ystart,xend,yend] or
                      [xcenter,ycenter,radius]

 Opt. Outputs:

 Keywords    : WID = window where box is drawn. (!D.Window by default.)
               DATA = set for box coordinates returned as DATA coordinates.
               NORMAL = set for box coordinates returned as NORMAL coordinates.
               BOX = set to draw box instead of circle
               SIZE = initial box width and height
               INITIALXY = initial circle center
               FIXED = set to inhibit resizing, but permit dragging
               RADIUS = initial input radius of circle
               WIDTH,HEIGHT = output box width and height
               MAG = magnification factor if zooming with /BOX
               NOSCALE = set to not bytescale image when zooming
               KEEP = keep last cursor position

 CALLED BY:
	SCOPE
 Restrictions: None

 CALLS: ***
	BOX_DRAW, CIRCLE_DRAW, EXIST, IDL_RELEASE, LAST_DRAW, NINT [1], NINT [2]
 Side effects: None

 History     : Written: D. Fanning (Coyote Software) -- originally DRAWBOX
               Modified: D. Zarro, 28-Oct-98 (SMA/GSFC) - added circle option
               Modified: K. Tolbert 29-Oct-98 (RSTX) - added initial location option
               Modified: K. Tolbert 29-Oct-98 (RSTX) -  for circle option, return center and radius
               Modified: D. Zarro 20-Jan-99 (SMA/GSFC) -  added magnify option
		Modified: K. Tolbert 10-Jul-01 (Raytheon) - correct magnify for 16- or 24-bit color
 Contact     : dzarro@solar.stanford.edu


SCR_ATTRIB [1] $SSW/gen/idl/util/scr_attrib.pro
[Previous] [Next]
 NAME:
	SCR_ATTRIB
 PURPOSE:
	To set the screen attribute to those given, in the given order.
 CALLING SEQUENCE:
	scr_attrib [, a1, a2, a3, a4, a5]
 INPUTS:
	a1 - a5  --  The attribute codes.  The attributes are set in the
	             command string in the given order.  Thus, if a1 turns
	             the attributes off and a2 sets reverse video, the final
	             attribute will reset and then set to reverse video.  If
	             the order were reversed, then the current attribute 
	             would have reverse video added to it, and then would be
	             reset, leaving the terminal with all attributes off.  Up
	             to five attribute codes may be specified.  The codes are:
	                  0 : all attributes off  (default)
	                  1 : bold on
	                  2 : underscore on
	                  3 : blink on
	                  4 : reverse video on
 OUTPUTS:
	None.
 CALLED BY:
	SELECT_O [1], SELECT_O [2], SELECT_O [3]
 SIDE EFFECTS:
	None.
 RESTRICTIONS:
	This procedure will only work with DEC compatible equipment (or
	terminal emulators).
 PROCEDURE:
	A string containing the appropriate DEC terminal command is put 
	together and printed.  NOTE:  In general, the DEC commands correspond
	to the ANSI escape sequences.
 MODIFICATION HISTORY:
	Written by Michael R. Greason, STX, May 1990.
	Converted to IDL V5.0   W. Landsman   September 1997


SCR_ATTRIB [2] $SSW/gen/idl_libs/astron/misc/scr_attrib.pro
[Previous] [Next]
 NAME:
	SCR_ATTRIB
 PURPOSE:
	To set the screen attribute to those given, in the given order.
 CALLING SEQUENCE:
	scr_attrib [, a1, a2, a3, a4, a5]
 INPUTS:
	a1 - a5  --  The attribute codes.  The attributes are set in the
	             command string in the given order.  Thus, if a1 turns
	             the attributes off and a2 sets reverse video, the final
	             attribute will reset and then set to reverse video.  If
	             the order were reversed, then the current attribute 
	             would have reverse video added to it, and then would be
	             reset, leaving the terminal with all attributes off.  Up
	             to five attribute codes may be specified.  The codes are:
	                  0 : all attributes off  (default)
	                  1 : bold on
	                  2 : underscore on
	                  3 : blink on
	                  4 : reverse video on
 OUTPUTS:
	None.
 CALLED BY:
	SELECT_O [1], SELECT_O [2], SELECT_O [3]
 SIDE EFFECTS:
	None.
 RESTRICTIONS:
	This procedure will only work with DEC compatible equipment (or
	terminal emulators).
 PROCEDURE:
	A string containing the appropriate DEC terminal command is put 
	together and printed.  NOTE:  In general, the DEC commands correspond
	to the ANSI escape sequences.
 MODIFICATION HISTORY:
	Written by Michael R. Greason, STX, May 1990.
	Converted to IDL V5.0   W. Landsman   September 1997


SCR_CHARSET [1] $SSW/gen/idl/util/scr_charset.pro
[Previous] [Next]
 Project     :	SOHO - CDS

 Name        :	
	SCR_CHARSET
 Purpose     :	
	To change the character sets.
 Explanation :	
	To change the character sets.

	A string containing the appropriate DEC terminal command is put 
	together and printed.  NOTE:  In general, the DEC commands correspond
	to the ANSI escape sequences.

 Use         :	
	scr_charset [, g, cset]

 Inputs      :	
	g     --  The terminal character set to change (either 0, for the
	          G0 designator, or 1, for the G1 designator).  0 = default.
	cset  --  The character set to use:
	               0 : United Kingdom.
	               1 : United States (USASCII)  --  default.
	               2 : Special graphics characters and line drawing set.
	               3 : Alternate character ROM.
	               4 : Alternate character ROM special graphics chars.

 Opt. Inputs :	None.

 Outputs     :	None.

 Opt. Outputs:	None.

 Keywords    :	None.

 Calls       :	None.
 Common      :	None.

 Restrictions:	
	This procedure will only work with DEC compatible equipment (or
	terminal emulators).

 Side effects:	None.

 Category    :	Utilities, User_interface

 Prev. Hist. :	
	Written by Michael R. Greason, STX, May 1990.

 Written     :	Michael R. Greason, GSFC/UIT (STX), May 1990

 Modified    :	Version 1, William Thompson, GSFC, 29 March 1994
			Incorporated into CDS library

 Version     :	Version 1, 29 March 1994


SCR_CHARSET [2] $SSW/gen/idl_libs/astron/misc/scr_charset.pro
[Previous] [Next]
 NAME:
	SCR_CHARSET
 PURPOSE:
	To change the character sets.
 CALLING SEQUENCE:
	scr_charset [, g, cset]
 INPUTS:
	g     --  The terminal character set to change (either 0, for the
	          G0 designator, or 1, for the G1 designator).  0 = default.
	cset  --  The character set to use:
	               0 : United Kingdom.
	               1 : United States (USASCII)  --  default.
	               2 : Special graphics characters and line drawing set.
	               3 : Alternate character ROM.
	               4 : Alternate character ROM special graphics chars.
 OUTPUTS:
	None.
 SIDE EFFECTS:
	None.
 RESTRICTIONS:
	This procedure will only work with DEC compatible equipment (or
	terminal emulators).
 PROCEDURE:
	A string containing the appropriate DEC terminal command is put 
	together and printed.  NOTE:  In general, the DEC commands correspond
	to the ANSI escape sequences.
 MODIFICATION HISTORY:
	Written by Michael R. Greason, STX, May 1990.
	Converted to IDL V5.0   W. Landsman   September 1997


SCR_CURMOV [1] $SSW/gen/idl/util/scr_curmov.pro
[Previous] [Next]
 Project     :	SOHO - CDS

 Name        :	
	SCR_CURMOV
 Purpose     :	
	Moves the cursor relative to its original position.
 Explanation :	
	To move the cursor around the screen relative to its original position.

	A string containing the appropriate DEC terminal command is put 
	together and printed.  NOTE:  In general, the DEC commands correspond
	to the ANSI escape sequences.

 Use         :	
	scr_curmov [, cmd, n]

 Inputs      :	
	cmd  --  An integer indicating the direction in which to move the curs.
	              0 : Up
	              1 : Down  (Default)
	              2 : Left
	              3 : Right
	n    --  The number of spaces to move the cursor.  If not specified
	         (or if less than or equal to zero), this is set to one.

 Opt. Inputs :	None.

 Outputs     :	None.

 Opt. Outputs:	None.

 Keywords    :	None.

 Calls       :	None.
 CALLED BY:
	CURS
 Common      :	None.

 Restrictions:	
	This procedure will only work with DEC compatible equipment (or
	terminal emulators).

 Side effects:	None.

 Category    :	Utilities, User_interface

 Prev. Hist. :	
	Written by Michael R. Greason, STX, May 1990.

 Written     :	Michael R. Greason, GSFC/UIT (STX), May 1990

 Modified    :	Version 1, William Thompson, GSFC, 29 March 1994
			Incorporated into CDS library.

 Version     :	Version 1, 29 March 1994


SCR_CURMOV [2] $SSW/gen/idl_libs/astron/misc/scr_curmov.pro
[Previous] [Next]
 NAME:
	SCR_CURMOV
 PURPOSE:
	To mov the cursor around the screen relative to its original position.
 CALLING SEQUENCE:
	scr_curmov [, cmd, n]
 INPUTS:
	cmd  --  An integer indicating the direction in which to move the curs.
	              0 : Up
	              1 : Down  (Default)
	              2 : Left
	              3 : Right
	n    --  The number of spaces to move the cursor.  If not specified
	         (or if less than or equal to zero), this is set to one.
 OUTPUTS:
	None.
 CALLED BY:
	CURS
 SIDE EFFECTS:
	None.
 RESTRICTIONS:
	This procedure will only work with DEC compatible equipment (or
	terminal emulators).
 PROCEDURE:
	A string containing the appropriate DEC terminal command is put 
	together and printed.  NOTE:  In general, the DEC commands correspond
	to the ANSI escape sequences.
 MODIFICATION HISTORY:
	Written by Michael R. Greason, STX, May 1990.
	Converted to IDL V5.0   W. Landsman   September 1997


SCR_CURPOS [1] $SSW/gen/idl/util/scr_curpos.pro
[Previous] [Next]
 Project     :	SOHO - CDS

 Name        :	
	SCR_CURPOS
 Purpose     :	
	Positions the cursor at the specified screen location.
 Explanation :	
	To position the cursor at the specified screen location.  Unspecified
	coordinates are set to one.  Please note that the ESCAPE sequence
	expects the coordinates to be counted from (1,1).

	A string containing the appropriate DEC terminal command is put 
	together and printed.  NOTE:  In general, the DEC commands correspond
	to the ANSI escape sequences.

 Use         :	
	scr_curpos [, lin, col]

 Inputs      :	
	lin  --  The screen line coordinate.
	col  --  The screen column coordinate.

 Opt. Inputs :	None.

 Outputs     :	None.

 Opt. Outputs:	None.

 Keywords    :	None.

 Calls       :	None.
 CALLED BY:
	SELECT_O [1], SELECT_O [2], SELECT_O [3]
 Common      :	None.

 Restrictions:	
	This procedure will only work with DEC compatible equipment (or
	terminal emulators).

 Side effects:	None.

 Category    :	Utilities, User_interface

 Prev. Hist. :	
	Written by Michael R. Greason, STX, May 1990.

 Written     :	Michael R. Greason, GSFC/UIT (STX), May 1990

 Modified    :	Version 1, William Thompson, GSFC, 29 March 1994
			Incorporated into CDS library

 Version     :	Version 1, 29 March 1994


SCR_CURPOS [2] $SSW/gen/idl_libs/astron/misc/scr_curpos.pro
[Previous] [Next]
 NAME:
	SCR_CURPOS
 PURPOSE:
	To position the cursor at the specified screen location.  
 EXPLANATION:
	Unspecified coordinates are set to one.  Please note that the ESCAPE 
	sequence expects the coordinates to be counted from (1,1).
 CALLING SEQUENCE:
	scr_curpos [, lin, col]
 INPUTS:
	lin  --  The screen line coordinate.
	col  --  The screen column coordinate.
 OUTPUTS:
	None.
 CALLED BY:
	SELECT_O [1], SELECT_O [2], SELECT_O [3]
 SIDE EFFECTS:
	None.
 RESTRICTIONS:
	This procedure will only work with DEC compatible equipment (or
	terminal emulators).
 PROCEDURE:
	A string containing the appropriate DEC terminal command is put 
	together and printed.  NOTE:  In general, the DEC commands correspond
	to the ANSI escape sequences.
 MODIFICATION HISTORY:
	Written by Michael R. Greason, STX, May 1990.
	Converted to IDL V5.0   W. Landsman   September 1997


SCR_ERASE [1] $SSW/gen/idl/util/scr_erase.pro
[Previous] [Next]
 Project     :	SOHO - CDS

 Name        :	
	SCR_ERASE
 Purpose     :	
	To erase portions of the terminal screen.
 Explanation :	
	To erase portions of the terminal screen.

	A string containing the appropriate DEC terminal command is put 
	together and printed.  NOTE:  In general, the DEC commands correspond
	to the ANSI escape sequences.

 Use         :	
	scr_erase [, cmd]

 Inputs      :	None.

 Opt. Inputs :	
	cmd  --  An integer telling the procedure what part of the screen to
	         erase.  If not specified, it is set to 5.  Key:
	                 0 : From cursor to end-of-line.
	                 1 : From beginning-of-line to cursor.
	                 2 : Entire line containing cursor.
	                 3 : From cursor to end-of-screen.
	                 4 : from beginning-of-screen to cursor.
	              ELSE : Entire screen.

 Outputs     :	None.

 Opt. Outputs:	None.

 Keywords    :	None.

 Calls       :	None.
 CALLED BY:
	SELECT_O [1], SELECT_O [2], SELECT_O [3]
 Common      :	None.

 Restrictions:	
	This procedure will only work with DEC compatible equipment (or
	terminal emulators).

 Side effects:	None.

 Category    :	Utilities, User_interface

 Prev. Hist. :	
	Written by Michael R. Greason, STX, May 1990.

 Written     :	Michael R. Greason, GSFC/UIT (STX), May 1990

 Modified    :	Version 1, William Thompson, GSFC, 29 March 1994
			Incorporated into CDS library

 Version     :	Version 1, 29 March 1994


SCR_ERASE [2] $SSW/gen/idl_libs/astron/misc/scr_erase.pro
[Previous] [Next]
 NAME:
	SCR_ERASE
 PURPOSE:
	To erase portions of the terminal screen.
 CALLING SEQUENCE:
	scr_erase [, cmd]
 INPUTS:
	cmd  --  An integer telling the procedure what part of the screen to
	         erase.  If not specified, it is set to 5.  Key:
	                 0 : From cursor to end-of-line.
	                 1 : From beginning-of-line to cursor.
	                 2 : Entire line containing cursor.
	                 3 : From cursor to end-of-screen.
	                 4 : from beginning-of-screen to cursor.
	              ELSE : Entire screen.
 OUTPUTS:
	None.
 CALLED BY:
	SELECT_O [1], SELECT_O [2], SELECT_O [3]
 SIDE EFFECTS:
	None.
 RESTRICTIONS:
	This procedure will only work with DEC compatible equipment (or
	terminal emulators).
 PROCEDURE:
	A string containing the appropriate DEC terminal command is put 
	together and printed.  NOTE:  In general, the DEC commands correspond
	to the ANSI escape sequences.
 MODIFICATION HISTORY:
	Written by Michael R. Greason, STX, May 1990.
	Converted to IDL V5.0   W. Landsman   September 1997


SCR_OTHER [1] $SSW/gen/idl/util/scr_other.pro
[Previous] [Next]
 Project     :	SOHO - CDS

 Name        :	
	SCR_OTHER
 Purpose     :	
	To allow the user to issue any ESCAPE sequence.
 Explanation :	
	To allow the user to issue any ESCAPE sequence.

	A string containing the appropriate DEC terminal command is put 
	together and printed.  NOTE:  In general, the DEC commands correspond
	to the ANSI escape sequences.

 Use         :	
	scr_other, str

 Inputs      :	
	str  --  A string containing the escape sequence.  The initial ESCAPE
	         should not be included; this will be added by this procedure.
	         This parameter is NOT optional; if not available, the 
	         procedure will return without doing anything.

 Opt. Inputs :	None.

 Outputs     :	None.

 Opt. Outputs:	None.

 Keywords    :	None.

 Calls       :	None.
 CALLED BY:
	SELECT_O [1], SELECT_O [2], SELECT_O [3]
 Common      :	None.

 Restrictions:	
	This procedure will only work with DEC compatible equipment (or
	terminal emulators).

 Side effects:	None.

 Category    :	Utilities, User_interface

 Prev. Hist. :	
	Written by Michael R. Greason, STX, May 1990.

 Written     :	Michael R. Greason, GSFC/UIT (STX), May 1990

 Modified    :	Version 1, William Thompson, GSFC, 29 March 1994
			Incorporated into CDS library

 Version     :	Version 1, 29 March 1994


SCR_OTHER [2] $SSW/gen/idl_libs/astron/misc/scr_other.pro
[Previous] [Next]
 NAME:
	SCR_OTHER
 PURPOSE:
	To allow the user to issue any ESCAPE sequence.
 CALLING SEQUENCE:
	scr_other, str
 INPUTS:
	str  --  A string containing the escape sequence.  The initial ESCAPE
	         should not be included; this will be added by this procedure.
	         This parameter is NOT optional; if not available, the 
	         procedure will return without doing anything.
 OUTPUTS:
	None.
 CALLED BY:
	SELECT_O [1], SELECT_O [2], SELECT_O [3]
 SIDE EFFECTS:
	None.
 RESTRICTIONS:
	This procedure will only work with DEC compatible equipment (or
	terminal emulators).
 PROCEDURE:
	A string containing the appropriate DEC terminal command is put 
	together and printed.  NOTE:  In general, the DEC commands correspond
	to the ANSI escape sequences.
 MODIFICATION HISTORY:
	Written by Michael R. Greason, STX, May 1990.
	Converted to IDL V5.0   W. Landsman   September 1997


SCR_RESET [1] $SSW/gen/idl/util/scr_reset.pro
[Previous] [Next]
 Project     :	SOHO - CDS

 Name        :	
	SCR_RESET
 Purpose     :	
	To reset the terminal.
 Explanation :	
	To reset the terminal.

	A string containing the appropriate DEC terminal command is put 
	together and printed.  NOTE:  In general, the DEC commands correspond
	to the ANSI escape sequences.

 Use         :	
	scr_reset

 Inputs      :	None.

 Opt. Inputs :	None.

 Outputs     :	None.

 Opt. Outputs:	None.

 Keywords    :	None.

 Calls       :	None.
 Common      :	None.

 Restrictions:	
	This procedure will only work with DEC compatible equipment (or
	terminal emulators).

 Side effects:	None.

 Category    :	Utilities, User_interface

 Prev. Hist. :	
	Written by Michael R. Greason, STX, May 1990.

 Written     :	Michael R. Greason, GSFC/UIT (STX), May 1990

 Modified    :	Version 1, William Thompson, GSFC, 29 March 1994
			Incorporated into CDS library

 Version     :	Version 1, 29 March 1994


SCR_RESET [2] $SSW/gen/idl_libs/astron/misc/scr_reset.pro
[Previous] [Next]
 NAME:
	SCR_RESET
 PURPOSE:
	To reset the terminal.
 CALLING SEQUENCE:
	scr_reset
 INPUTS:
	None.
 OUTPUTS:
	None.
 SIDE EFFECTS:
	None.
 RESTRICTIONS:
	This procedure will only work with DEC compatible equipment (or
	terminal emulators).
 PROCEDURE:
	A string containing the appropriate DEC terminal command is put 
	together and printed.  NOTE:  In general, the DEC commands correspond
	to the ANSI escape sequences.
 MODIFICATION HISTORY:
	Written by Michael R. Greason, STX, May 1990.
	Converted to IDL V5.0   W. Landsman   September 1997


SCR_SCROLL [1] $SSW/gen/idl/util/scr_scroll.pro
[Previous] [Next]
 Project     :	SOHO - CDS

 Name        :	
	SCR_SCROLL
 Purpose     :	
	Defines the scrolling area on the screen.
 Explanation :	
	To define the scrolling area on the screen.  Please note that the
	line coordinates should be counted from 1.

	A string containing the appropriate DEC terminal command is put 
	together and printed.  NOTE:  In general, the DEC commands correspond
	to the ANSI escape sequences.

 Use         :	
	scr_scroll [, top, bot]
 Inputs      :	
	top  --  The line to be the top of the scrolling area.
	         The default value is 1 and the maximum value is 23.
	bot  --  The line to be the bottom of the scrolling area.
	         The default value is 24 and the minimum value is 2.

 Opt. Inputs :	None.

 Outputs     :	None.

 Opt. Outputs:	None.

 Keywords    :	None.

 Calls       :	None.
 Common      :	None.

 Restrictions:	
	This procedure will only work with DEC compatible equipment (or
	terminal emulators).

 Side effects:	
	NOTE:  The screen coordinate system is NOT effected.  (1,1) is not
	       the top of the scrolling area but the top of the screen.

 Category    :	Utilities, User_interface

 Prev. Hist. :	
	Written by Michael R. Greason, STX, May 1990.

 Written     :	Michael R. Greason, GSFC/UIT (STX), May 1990

 Modified    :	Version 1, William Thompson, GSFC, 29 March 1994
			Incorporated into CDS library

 Version     :	Version 1, 29 March 1994


SCR_SCROLL [2] $SSW/gen/idl_libs/astron/misc/scr_scroll.pro
[Previous] [Next]
 NAME:
	SCR_SCROLL
 PURPOSE:
	Define the scrolling area on the screen.
 EXPLANATION:  
	Please note that the line coordinates should be counted from 1.
 CALLING SEQUENCE:
	scr_scroll [, top, bot]
 INPUTS:
	top  --  The line to be the top of the scrolling area.
	         The default value is 1 and the maximum value is 23.
	bot  --  The line to be the bottom of the scrolling area.
	         The default value is 24 and the minimum value is 2.
 OUTPUTS:
	None.
 SIDE EFFECTS:
	NOTE:  The screen coordinate system is NOT effected.  (1,1) is not
	       the top of the scrolling area but the top of the screen.
 RESTRICTIONS:
	This procedure will only work with DEC compatible equipment (or
	terminal emulators).
 PROCEDURE:
	A string containing the appropriate DEC terminal command is put 
	together and printed.  NOTE:  In general, the DEC commands correspond
	to the ANSI escape sequences.
 MODIFICATION HISTORY:
	Written by Michael R. Greason, STX, May 1990.
	Converted to IDL V5.0   W. Landsman   September 1997


scratch [1] $SSW/gen/idl/system/scratch.pro
[Previous] [Next]
   Name: scratch

   Purpose: manage scratch files (names, auto-delete, units,...)
	     (compatible with VMS/Unix)

   Input Parameters:
      u0, u1, ... u9 	 ;if defined on input, log units to close and delete
   
   Output Parameters:
      u0, u1, ... u9    ;if undefined, logical units assigned during open

   Keyword Parameters:
      nodelete - (input) dont delete on close (default is to delete)
      cleanup  - (input) deletes all scratch generated files (even old stuff)
      open     - (input) force open mode (default if u0 present and undefined)
      close    - (input) force close mode (default if u0 present and defined)
      names    - (output) scratch file names acted upon (open/close/delete)
      file     - (input)  use this name, not system derived
      landscape - (Input) pass to 'sprint' if /print selected

   Calling Sequence:
      scratch,u1,u2,u3 ; if parameters undefined, open 3 scratch files
			 ; if parameters defined,   close/delete files

   Calling Examples:
      scratch, u1, u2, u3, /open ; open 3 files, return luns in u1, u2, u3
      scratch, u1, u2, /close    ; close and delete files open w/luns u1/u2
      scratch, u2, /print 	   ; same, but print before deleting
      scratch, u1, /nodelete	   ; close, dont delete
      scratch, u1, u2 	   	   ; if u1 is undfined: open 2 files
				     (same as scratch, u1, u2 ,/open)
				     if u1 is defined, close/delete 2 files
				     (same as scratch, u1, u2, /close)
      scratch, u1, name=name	   ; return system derived file name used
      scratch			   ; close/delete all open scratch files
      scratch,/cleanup	   	   ; same plus any old scratch files from
      scratch,/clean,/nodel,name=name ; new and old scratch file names
      scratch,u1,file='fname',/open   ; opens fname 

 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], DPRINT, LPRINT, concat_dir [4]
 CALLED BY:
	F0READ, RICE, prstr [1], prstr [2], teambb [1], teambb [2]
   Restrictions:
      uses execute statement, so no recursion allowed
      if user supplies file names (with file= keyword), then some 
      auto-mangagement functions are lost (ex: /cleanup function)

   History: slf, 3-March-1993
	     slf, 1-jun-93		; dont force file in home directory
	     slf, 3-jun-93		; openw not openu
            slf, 7-oct-97              ; add /CONTINUE, 


SCREEN_SELECT [1] $SSW/gen/idl/system/screen_select.pro
[Previous] [Next]
 NAME:
	SCREEN_SELECT
 PURPOSE:
	Allow a user to make an interactive screen selection from a list
 EXPLANATION:
	This procedure determines whether to use the dumb terminal version,  
	or the widget version by examining the !D.NAME system variable.

 CALLING SEQUENCE:
	screen_select, selections, iselected, comments, command_line, only_one

 INPUTS:
	selections - string array giving list of items that can be
		selected.

 OPTIONAL INPUTS:
	comments - comments which can be requested for each item in
		array selections.  It can be:
			string array - same length as array selections.
			null string - no comments available
			scalar string - name of a procedure which will
				return comments.  It will take selections
				as its first argument and return comments
				as its second argument.
	command_line - optional command line to be placed at the bottom
		of the screen.  It is usually used to specify what the
		user is selecting.
	only_one - integer flag. If set to 1 then the user can only select
		one item.  The routine returns immediately after the first
		selection is made.

 OUTPUTS:
	iselected - list of indices in selections giving the selected
		items.

 OPTIONAL OUTPUT KEYWORD:
       COUNT - Integer scalar giving the number of selections made

 CALLS: ***
	SELECT_O [1], SELECT_O [2], SELECT_O [3], SELECT_W [1], SELECT_W [2], SELECT_W [3]
	SELECT_X
 CALLED BY:
	DBOPEN [1], DBOPEN [2], DBOPEN [3], DB_ITEM [1], DB_ITEM [2], DB_ITEM [3]
 SIDE EFFECTS:
	The obsolete system variable !err is set to the number of selections

 PROCEDURE:
	The actual processing is farmed out to different procedures depending
	on the terminal type.    

	Widget Terminal   ==>  SELECT_W.PRO
	VT100 Terminal  ==>    SELECT_O.PRO
 HISTORY:
	Written by M. Greason, STX, May 1990.
       Added widget support    W. Landsman           January, 1992
	Remove X window but no widget option         November, 1994
	Converted to IDL V5.0   W. Landsman   September 1997
       Added COUNT keyword, deprecate !ERR   W. Landsman   March 2000


SCREEN_SELECT [2] $SSW/gen/idl_libs/astron/misc/screen_select.pro
[Previous] [Next]
 NAME:
	SCREEN_SELECT
 PURPOSE:
	Allow a user to make an interactive screen selection from a list
 EXPLANATION:
	This procedure determines whether to use the dumb terminal version,  
	or the widget version by examining the !D.NAME system variable.

 CALLING SEQUENCE:
	screen_select, selections, iselected, comments, command_line, only_one

 INPUTS:
	selections - string array giving list of items that can be
		selected.

 OPTIONAL INPUTS:
	comments - comments which can be requested for each item in
		array selections.  It can be:
			string array - same length as array selections.
			null string - no comments available
			scalar string - name of a procedure which will
				return comments.  It will take selections
				as its first argument and return comments
				as its second argument.
	command_line - optional command line to be placed at the bottom
		of the screen.  It is usually used to specify what the
		user is selecting.
	only_one - integer flag. If set to 1 then the user can only select
		one item.  The routine returns immediately after the first
		selection is made.

 OUTPUTS:
	iselected - list of indices in selections giving the selected
		items.

 OPTIONAL OUTPUT KEYWORD:
       COUNT - Integer scalar giving the number of selections made

 CALLS: ***
	SELECT_O [1], SELECT_O [2], SELECT_O [3], SELECT_W [1], SELECT_W [2], SELECT_W [3]
	SELECT_X
 CALLED BY:
	DBOPEN [1], DBOPEN [2], DBOPEN [3], DB_ITEM [1], DB_ITEM [2], DB_ITEM [3]
 SIDE EFFECTS:
	The obsolete system variable !err is set to the number of selections

 PROCEDURE:
	The actual processing is farmed out to different procedures depending
	on the terminal type.    

	Widget Terminal   ==>  SELECT_W.PRO
	VT100 Terminal  ==>    SELECT_O.PRO
 HISTORY:
	Written by M. Greason, STX, May 1990.
       Added widget support    W. Landsman           January, 1992
	Remove X window but no widget option         November, 1994
	Converted to IDL V5.0   W. Landsman   September 1997
       Added COUNT keyword, deprecate !ERR   W. Landsman   March 2000


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

 NAME:
       SEC2DHMS()

 PURPOSE:
       Convert time in sec to string in 'xxDxxHxxMxxS' (DHMS) format

 CATEGORY:
       Utility

 SYNTAX:
       Result = sec2dhms(seconds)

 INPUTS:
       SECONDS - Integer scalar, time in seconds

 OPTIONAL INPUTS:
       None.

 OUTPUTS:
       RESULT - String scalar, time string in DHMS format (if an
                error occurs, a null string is returned)

 OPTIONAL OUTPUTS:
       None.

 KEYWORDS:
       UPPER - Uppercase the returned time string
       ERROR - Error message returned; a null string if no error

 CALLED BY:
	CDS_PLAN_BRIEF, EIS_CAT [1], EIS_CAT [2], EIS_CPT_DATA_RATE [1]
	EIS_CPT_DATA_RATE [2], MK_CDS_PLAN, MK_SOHO_TARGET, SHOW_RES_STC
	SOHO_ITEMS_HTML, XCAT, XSTUDY, eis_ct_summary_gui [1], eis_ct_summary_gui [2]
	eis_format_duration [1], eis_format_duration [2]
	eis_mk_raster_gui__define [1], eis_mk_raster_gui__define [2]
	eis_mk_study_gui [1], eis_mk_study_gui [2], eis_raster_gui [1]
	eis_raster_gui [2], eis_study_gui [1], eis_study_gui [2]
 COMMON:
       None.

 RESTRICTIONS:
       None.

 SIDE EFFECTS:
       None.

 HISTORY:
       Version 1, March 25, 1996, Liyun Wang, GSFC/ARC. Written

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


SEC2UTC $SSW/gen/idl/time/sec2utc.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : SEC2UTC()
               
 Purpose     : Converts seconds since MJD=0 to CDS UTC time format.
               
 Explanation : Used in the UTPLOT programs, this function converts elapsed
               seconds since the zero time of MJD to CDS internal UTC format.
               It takes no account of leap seconds.  For more information on
		various time formats, see file aaareadme.txt.
               
 Use         : IDL>  str = sec2utc(tsec)
    
 Inputs      : tsec  -  variable with number of elapsed seconds
               
 Opt. Inputs : None
               
 Outputs     : Function returns structure with .mjd and .time tags.
               
 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 = ''
                            UTC = SEC2UTC( TSEC, ERRMSG=ERRMSG )
                            IF ERRMSG NE '' THEN ...

 Calls       : None
 CALLED BY:
	CDS_UTPLOT, DEF_CDS_UTPLOT, MK_GISPLOT_LBL, MK_GIS_PLT, eis_cpt_gui [1]
	eis_cpt_gui [2], eis_dr_obj__DEFINE [1], eis_dr_obj__DEFINE [2]
	eis_mk_plan_gui [1], eis_mk_plan_gui [2]
 Common      : None
               
 Restrictions: No account of leap seconds.
               
 Side effects: If an error is encountered and the ERRMSG keyword is set, 
		SEC2UTC returns a structure of value {mjd:0L,time:0L}.
               
 Category    : Util, time
               
 Prev. Hist. : None

 Written     : C D Pike, RAL, 20-Apr-94
               
 Modified    :	Version 1, C.D. Pike, RAL, 20 April 1994
		Version 2, Donald G. Luttermoser, GSFC/ARC, 28 December 1994
                       Added the keyword ERRMSG.  Added IDL ON_ERROR utility.
			Note that there are no internally called procedures
			that use the ERRMSG keyword.
		Version 3, Donald G. Luttermoser, GSFC/ARC, 30 January 1995
			Made error handling procedure more robust.  Note that
			this routine can handle both vectors and scalars as
			input.
               Version 4, CDP, 5-Dec-95 Made output structure of type
                                        CDS_INT_TIME

 Version     :	Version 4, 05-Dec-95


secchi_time2files $SSW/gen/idl/fund_lib/stereo/secchi_time2files.pro
[Previous] [Next]
   Name: secchi_time2files

   Purpose: return secchi files for user time/timerange 

   Input Paramters:
      time0 - time or start time of range
      time1 - stop time of range

   Keyword Parameters:
      level - processing level - default= Zero aka 0
      pb - switch - if set, playback data is considered
      rt - switch - if set, real time data is considered
      pattern - optional file pattern - default = *fts
      euvi, cor1, cor2, hi1, hi2 - mutually exclusive instrument - def = euvi
      a,b - probably obvious - default = /a
      dtype - "type" of data returned, def='img' - tbd... 
      parent - top level directory - if not supplied, use '$SSW_SECCHI_DATA'
               

   Calling Sequence:
      IDL> secfiles=secchi_time2files(t0,t1 [,level=#] $
                      [,/a] -or [,/b] [,/rt] -or- [,/pb] $
                      [,/corN] -or- [,/hiN] -or- [,/euvi]

   Calling Examples:
      IDL> euvi=secchi_time2files('4-dec-2006','5-dec-2006',/pb) ; def=euvi/a - fits
      IDL> cor1=secchi_time2files('4-dec-2006','5-dec-2006',/rt,/b,/cor1) 

   History:
      4-dec-2006 - S.L.Freeland - celebrate SECCHI first light
                                  in the mold of xxx_time2files.pro suite 

   Method:
     set up call to 'ssw_time2filelist' based on user time+keywords
     (which calls 'ssw_time2paths')

 CALLS: ***
	ARR2STR [1], Arr2Str [2], FILE_EXIST [2], GET_DELIM, data_chk [1], data_chk [2]
	file_exist [1], file_exist [3], get_logenv [1], get_logenv [2]
	ssw_time2filelist
  Restrictions:
     dtype and pattern not yet explored; assume FITS images are desired for today 


SECHMS [1] $SSW/gen/idl/fund_lib/jhuapl/sechms.pro
[Previous] [Next]
 NAME:
       SECHMS
 PURPOSE:
       Seconds after midnight to h, m, s, numbers and strings.
 CATEGORY:
 CALLING SEQUENCE:
       sechms, sec, h, [m, s, sh, sm, ss]
 INPUTS:
       sec = seconds after midnight.            in
 KEYWORD PARAMETERS:
 OUTPUTS:
       h, m, s = Hrs, Min, Sec as numbers.      out
       sh, sm, ss = Hrs, Min, Sec as strings    out
             (with leading 0s where needed).
 CALLED BY:
	DT_TM_MAK [1], DT_TM_MAK [2], DT_TM_MAK [3]
 COMMON BLOCKS:
 NOTES:
 MODIFICATION HISTORY:
       Written by R. Sterner, 17 Nov, 1988.
       Johns Hopkins University Applied Physics Laboratory.
       R. Sterner, 27 Sep, 1993 --- modified to handle arrays.

 Copyright (C) 1988, Johns Hopkins University/Applied Physics Laboratory
 This software may be used, copied, or redistributed as long as it is not
 sold and this copyright notice is reproduced on each copy made.  This
 routine is provided as is without any express or implied warranties
 whatsoever.  Other limitations apply as described in the file disclaimer.txt.


sel_filetimes [1] $SSW/gen/idl/genutil/sel_filetimes.pro
[Previous] [Next]
NAME:
	sel_filetimes
PURPOSE:
	To select the files within a time range (assuming the file
	date/time is in the filename in YYMMDD.HHMM format
SAMPLE CALLING SEQUENCE:
	files = sel_filetimes('1-jun','1-jul',files)
	dirs = file_list('/data14/mdi_summary/daily/maglc', '*')
	files = sel_filetimes('1-jun','1-jul',dir=dirs, filter='*.fts')
	files = sel_filetimes(closest='1-jul',dir=dirs, filter='*maglc_re*')
INPUTS:
	sttim	- the starting date/time
	entim	- the ending date/time
INPUT/OUTPUT:
	files	- The full list of files to search through.  It is output
		  if it is not defined coming in
 CALLS: ***
	BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], anytim2ints [1], anytim2ints [2]
	break_file [4], fid2ex [1], fid2ex [2], file_list [1], file_list [2]
	sel_timrange [1], sel_timrange [2]
 CALLED BY:
	QUICKSTRAY [2], TR_DARK_SUB, TR_FLAT_SUB, edac_summary, get1hk_info [1]
	get1hk_info [2], get_epoch_sfcs [1], get_epoch_sfcs [2], hxt_impulsivness
	new_edac_summary, rd_fdss, rd_raw_station_plan, ssc_files [1], ssc_files [2]
	ssc_files [3], sxt_files, tr_rd_index, tr_rd_inventory, yohkoh_files
OPTIONAL KEYWORD INPUT:
	dir	- The director(ies) to search
	filter	- The wildcard filter to use to select files in the
		  directories
	one_before- If set, then get the file which immediately PRECEDES
		  the input time (used when file times are the START time
		  of a block of data).
	append	- If set, append that string to the end of the file
		  name (ie: '_0000' to get FILE2TIME to work)
	strrep	- If set, it must be a two element string array.  A string
		  substitution is done to trick FILE2TIME
	position- The starting position of the YYMMDD.HHMM string.  It is
		  derived by looking for the charcter "9" otherwise.
			** OBSOLETE since 14-Oct-97 **
RESTRICTION:
	All file names must be of the same form
HISTORY:
	Written 30-Aug-96 by M.Morrison
	14-Oct-97 (MDM) - Modified to use Freeland FILE2TIME
			- Added option CLOSEST and DELTA
	11-Nov-97 (MDM) - Added /ONE_BEFORE


sel_timrange [1] $SSW/gen/idl/genutil/sel_timrange.pro
[Previous] [Next]
NAME:
	sel_timrange
PURPOSE:
	Given a range of times (or a single time) and a time array, return the
	subscripts of the times between the selected time range.  If /BOOLEAN,
	then return a bytarr the length of the input marking where within range.
SAMPLE CALLING SEQUENCE:
	ss = sel_timrange(timarr, st_tarr, en_tarr)
	ss = sel_timrange(timarr, st_tarr, en_tarr, /between)
	ss = sel_timrange(roadmap, '1-nov-91 22:00', '1-nov-91 22:30')
	ist = sel_timrange(neworb_p, st_tarr, st_before1st=st_before1st)
	ien = sel_timrange(neworb_p, en_tarr, en_afterlast=en_afterlast, /after)
INPUT:
	timarr	- An array of times
	st_tarr	- The specified start time
OPTIONAL INPUT:
	en_tarr	- The specified end time.  If it is not passed, then the
		  start time is used (time range of 0 seconds)
 CALLS: ***
	anytim2ints [1], anytim2ints [2], int2secarr [1], int2secarr [2]
 CALLED BY:
	GET_SUNCENTER [1], GET_SUNCENTER [2], IRUHXA2SXT, IRUHXASCAN2SXT [1]
	IRUHXASCAN2SXT [2], IRU_S2Y, SXT_BAKEOUT_IN, SXT_OBSRPT, Sxt_goes_teem
	ads_into_att, atr2hxa_dbase, cdrom_files [2], choose_interval, contact_num [1]
	contact_num [2], eit_files, eit_proton_summary, get_acedata, get_selsis
	get_utevent [1], get_utevent [2], goes3sec_copy, goes_widget, gtab_summary
	hkplot_info, lapalma_cat, lapalma_files, lasco_time2file, les_archive_info
	mdi_cat, mdi_files, mk_sdc [2], mk_sdc [3], mk_sdc [4], mk_sfc [1], mk_sfc [2]
	mk_sft [1], mk_sft [2], pr_pnt_hist, pr_visible, rd_fdss, rd_goes_fits
	rd_goesp_ascii, rd_goesx_ascii, rd_guf_ascii, rd_old_obs, rd_raw_station_plan
	rd_sxa, rd_sxc, rd_sxl, rd_sxtgoes, rd_therm_rs232, rd_week_file [1]
	rd_week_file [2], rd_week_file [3], rd_week_file [4], read_genxcat, ref_term [2]
	res_freq, search_obs, sel_dc_image [1], sel_dc_image [2], sel_dc_image [3]
	sel_filetimes [1], sel_filetimes [2], sel_leak_image [1], sel_leak_image [3]
	sel_leak_image [4], show_contacts, sooncat_cadence, ssw_getdst, sswdb_files
	sxi_files, sxt_imgtypes, term_times, timeline2html, tr_rd_index, weekid [2]
	wrt_fits_bin_exten [2], ydb_exist [2], yohkoh_legacy_files [1]
	yohkoh_legacy_files [2]
OPTIONAL KEYWORD INPUT:
	between	- The default is to give the last entry before the start time.  
		  This is because the input time is usually a pointer (or file name)
		  with the time of the start of the orbit.  So the selection 
		  desired is needs to back up one element in the timarr.  This
		  is only done when the input start time does not exactly match the 
		  "timarr" value.
	after	- If set, get the first dataset after the input time range
	boolean - If set, then return an array the same length as the input, and
		  set all values within the range to 1.
OPTIONAL KEYWORD OUTPUT:
	st_before1st - If set, then the input start time is before the first time
			in "timarr"
	en_afterlast - If set, then the input end time is after the last time
			in "timarr"
HISTORY:
	Written Oct-92 by M.Morrison
	29-Oct-92 (MDM) - Corrected an error in "en_afterlast" determination
	30-Oct-92 (MDM) - Added /AFTER which corrected for a problem
	 		  with the RD_PNT logic


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

 Name        : 
	SELECT_BOX
 Purpose     : 
	Interactive selection of a box on the graphics display.
 Explanation : 
	If the graphics device is windows based, then BOX_CURSOR is used.
	Otherwise, the user is prompted to enter two corners of the box.

	Note that the parameter list for SELECT_BOX is in a different order
	than BOX_CURSOR.  However, it was decided to order the parameters this
	way to be compatible with the SERTS image display routines.

 Use         : 
	SELECT_BOX, MX, MY, IX, IY
 Inputs      : 
	None.
 Opt. Inputs : 
	None.
 Outputs     : 
	MX, MY	= Size of selected box, in device coordinates.
	IX, IY	= Coordinates of lower left-hand corner of selected box.
 Opt. Outputs: 
	None.
 Keywords    : 
	DATA	= If this keyword is set, then the values are in returned in
		  data coordinates instead of device coordinates.

	The following keywords are only relevant when used on a graphics device
	that supports windows:

	INIT	   = If this keyword is set, MX, MY, and IX, IY contain the
		     initial parameters for the box.

	FIXED_SIZE = If this keyword is set, MX and MY contain the initial size
		     of the box.  This size may not be changed by the user.

 Calls       : ***
	BOX_CRS, BOX_CURSOR, HAVE_WINDOWS [1], HAVE_WINDOWS [2]
 CALLED BY:
	COLOR_BAR, TVBOXCRS, XTV
 Common      : 
	None.
 Restrictions: 
	None.
 Side effects: 
	None.
 Category    : 
	Utilities, User_interface.
 Prev. Hist. : 
	William Thompson, May 1992.
	William Thompson, Nov 1992, added DATA keyword.
 Written     : 
	William Thompson, GSFC, May 1992.
 Modified    : 
	Version 1, William Thompson, GSFC, 30 April 1993.
		Incorporated into CDS library.
	Version 2, William Thompson, GSFC, 25 June 1993.
		Changed to call BOX_CRS for MSWindows, BOX_CURSOR otherwise.
		Added INIT and FIXED_SIZE keywords.
 Version     : 
	Version 2, 25 June 1993.


SELECT_O [1] $SSW/gen/idl/system/select_o.pro
[Previous] [Next]
 NAME:
	SELECT_O
 PURPOSE:
	Dumb-terminal routine to let a user interactively select from a list
 EXPLANATION: 
	This is the non-widget version of SCREEN_SELECT

 CALLING SEQUENCE:
	select_o, selections, iselected, comments, command_line, only_one, $
                            [ COUNT = ]

 INPUTS:
	selections - string array giving list of items that can be
		selected.

 OPTIONAL INPUTS:
	comments - comments which can be requested for each item in
		array selections.  It can be:
			string array - same length as array selections.
			null string - no comments available
			scalar string - name of a procedure which will
				return comments.  It will take selections
				as its first argument and return comments
				as its second argument.
	command_line - optional command line to be placed at the bottom
		of the screen.  It is usually used to specify what the
		user is selecting.
	only_one - integer flag. If set to 1 then the user can only select
		one item.  The routine returns immediately after the first
		selection is made.
 OUTPUTS:
	iselected - list of indices in selections giving the selected
		items.
 OPTIONAL OUTPUT KEYWORD:
       COUNT - Integer scalar giving the number of selections
 CALLS: ***
	READ_KEY [1], READ_KEY [2], READ_KEY [3], SCR_ATTRIB [1], SCR_ATTRIB [2]
	SCR_ATTRIB [3], SCR_CURPOS [1], SCR_CURPOS [2], SCR_CURPOS [3], SCR_ERASE [1]
	SCR_ERASE [2], SCR_ERASE [3], SCR_OTHER [1], SCR_OTHER [2], SCR_OTHER [3]
 CALLED BY:
	SCREEN_SELECT [1], SCREEN_SELECT [2], SCREEN_SELECT [3]
 SIDE EFFECTS:
	The obsolete system variable !err is set to the number of selections
 HISTORY:
	version 1, D. Lindler  April 88.
	modified to IDL V2 (from screen_select).  M. Greason, May 1990.
	changed name from screen_select_o         W. Landsman January 1993
	Converted to IDL V5.0   W. Landsman   September 1997
       Added COUNT keyword, deprecate !ERR   W. Landsman   March 2000


SELECT_O [2] $SSW/gen/idl_libs/astron/misc/select_o.pro
[Previous] [Next]
 NAME:
	SELECT_O
 PURPOSE:
	Dumb-terminal routine to let a user interactively select from a list
 EXPLANATION: 
	This is the non-widget version of SCREEN_SELECT

 CALLING SEQUENCE:
	select_o, selections, iselected, comments, command_line, only_one, $
                            [ COUNT = ]

 INPUTS:
	selections - string array giving list of items that can be
		selected.

 OPTIONAL INPUTS:
	comments - comments which can be requested for each item in
		array selections.  It can be:
			string array - same length as array selections.
			null string - no comments available
			scalar string - name of a procedure which will
				return comments.  It will take selections
				as its first argument and return comments
				as its second argument.
	command_line - optional command line to be placed at the bottom
		of the screen.  It is usually used to specify what the
		user is selecting.
	only_one - integer flag. If set to 1 then the user can only select
		one item.  The routine returns immediately after the first
		selection is made.
 OUTPUTS:
	iselected - list of indices in selections giving the selected
		items.
 OPTIONAL OUTPUT KEYWORD:
       COUNT - Integer scalar giving the number of selections
 CALLS: ***
	READ_KEY [1], READ_KEY [2], READ_KEY [3], SCR_ATTRIB [1], SCR_ATTRIB [2]
	SCR_ATTRIB [3], SCR_CURPOS [1], SCR_CURPOS [2], SCR_CURPOS [3], SCR_ERASE [1]
	SCR_ERASE [2], SCR_ERASE [3], SCR_OTHER [1], SCR_OTHER [2], SCR_OTHER [3]
 CALLED BY:
	SCREEN_SELECT [1], SCREEN_SELECT [2], SCREEN_SELECT [3]
 SIDE EFFECTS:
	The obsolete system variable !err is set to the number of selections
 HISTORY:
	version 1, D. Lindler  April 88.
	changed name from screen_select_o         W. Landsman January 1993
       Added COUNT keyword, deprecate !ERR   W. Landsman   March 2000
       Remove VMS code  W. Landsman September 2006


SELECT_W [1] $SSW/gen/idl/widgets/select_w.pro
[Previous] [Next]
 NAME:
	SELECT_W    
 PURPOSE:
	Create a non-exclusive widget menu of items
 EXPLANATION:
	More than one item may be selected or 'de-selected'.   
	Normally called by SCREEN_SELECT

 CALLING SEQUENCE:
	SELECT_W, items ,iselected, [ comments, command_line, only_one ]

 INPUTS:
	items - string array giving list of items that can be
		selected.

 OPTIONAL INPUTS:
	comments - comments which can be requested for each item in
		array selections.    NOT YET IMPLEMENTED
	command_line - optional command line to be placed at the bottom
		of the screen.  It is usually used to specify what the
		user is selecting.
	only_one - integer flag. If set to 1 then the user can only select
		one item.  The routine returns immediately after the first
		selection is made.
 OPTIONAL KEYWORD INPUT
       SELECTIN - vector of items to be pre-selected upon input (not used for
               only_one option)

 OUTPUT:
	iselected - list of indices in selections giving the selected
		items.

 OPTIONAL OUTPUT KEYWORD:
       COUNT  - Integer scalar giving the number of items selected
 CALLS: ***
	SELECT_W_EVENT, XMANAGER, XMENU [1], XMENU [2]
 CALLED BY:
	SCREEN_SELECT [1], SCREEN_SELECT [2], SCREEN_SELECT [3]
 COMMON BLOCKS:
	SELECT_W - Used to communicate with the SELECT_W_EVENT procedure 

 MODIFICATION HISTORY:
	Written, K. Venkatakrishna & W. Landsman, Hughes/STX    January, 1992
	Widgets made MODAL.  M. Greason, Hughes STX, 15 July 1992.
       Changed handling of MODAL keyword for V5.0   W.Thompson  September 1997
	Converted to IDL V5.0   W. Landsman   September 1997
       Added selectin keyword  D. Lindler 01/12/99 


SELECT_W [2] $SSW/gen/idl_libs/astron/misc/select_w.pro
[Previous] [Next]
 NAME:
	SELECT_W    
 PURPOSE:
	Create a non-exclusive widget menu of items
 EXPLANATION:
	More than one item may be selected or 'de-selected'.   
	Normally called by SCREEN_SELECT

 CALLING SEQUENCE:
	SELECT_W, items ,iselected, [ comments, command_line, only_one ]

 INPUTS:
	items - string array giving list of items that can be
		selected.

 OPTIONAL INPUTS:
	comments - comments which can be requested for each item in
		array selections.    NOT YET IMPLEMENTED
	command_line - optional command line to be placed at the bottom
		of the screen.  It is usually used to specify what the
		user is selecting.
	only_one - integer flag. If set to 1 then the user can only select
		one item.  The routine returns immediately after the first
		selection is made.
 OPTIONAL KEYWORD INPUT
       SELECTIN - vector of items to be pre-selected upon input (not used for
               only_one option)

 OUTPUT:
	iselected - list of indices in selections giving the selected
		items.

 OPTIONAL OUTPUT KEYWORD:
       COUNT  - Integer scalar giving the number of items selected
 CALLS: ***
	SELECT_W_EVENT, XMANAGER, XMENU [1], XMENU [2]
 CALLED BY:
	SCREEN_SELECT [1], SCREEN_SELECT [2], SCREEN_SELECT [3]
 COMMON BLOCKS:
	SELECT_W - Used to communicate with the SELECT_W_EVENT procedure 

 MODIFICATION HISTORY:
	Written, K. Venkatakrishna & W. Landsman, Hughes/STX    January, 1992
	Widgets made MODAL.  M. Greason, Hughes STX, 15 July 1992.
       Changed handling of MODAL keyword for V5.0   W.Thompson  September 1997
	Converted to IDL V5.0   W. Landsman   September 1997
       Added selectin keyword  D. Lindler 01/12/99 


select_widg $SSW/gen/idl/fund_lib/sdac/select_widg.pro
[Previous] [Next]
 Project: 
	SDAC                   
 NAME: 
	select_widg

 PURPOSE:
	Display an ASCII list using widgets and the widget manager.
       Select a line of the text.
 CATEGORY:
	Widgets.

 CALLING SEQUENCE:
	line = select_widg(list)
	or
	index= select_widg(list, /index)
 INPUTS:
	LIST	A string array to be displayed in the widget.

 KEYWORD PARAMETERS:
	INDEX:  If set, the index of the selected line is returned.

	FONT:   The name of the font to use.  If omitted use the default
		font.
	GROUP:	The widget ID of the group leader of the widget.  If this 
		keyword is specified, the death of the group leader results in
		the death of SELECT_WIDG.

	HEIGHT:	The number of text lines that the widget should display at one
		time.  If this keyword is not specified, 24 lines is the 
		default.

	TITLE:	A string to use as the widget title rather than the file name 
		or "select_widg".

	WIDTH:	The number of characters wide the widget should be.  If this
		keyword is not specified, 80 characters is the default.

 OUTPUTS:
	Returns the selected line from the display, unless the keyword index is set.
       Returns null string if nothing selected or -1 for the index.
 KEYWORD PARAMETERS:
	INDEX:  The index of the selected line from the string array.
 CALLS: ***
	CHECKVAR [1], FCHECK, SELECT_WIDG_EVT, XMANAGER, checkvar [2]
 CALLED BY:
	CAL_SHER, SPEX_SAVE_DATA [1], SPEX_SAVE_DATA [2]
 SIDE EFFECTS:
	Triggers the XMANAGER if it is not already in use.

 RESTRICTIONS:
	None.

 PROCEDURE:
	Create a list widget and select from its contents.

 MODIFICATION HISTORY:
	modified from xdisplayfile by richard.schwartz@gsfc.nasa.gov, 5-jul-94


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

 Name        :	SELECT_WINDOWS

 Purpose     :	Select the windows display depending on OS

 Category    :	Class4, Display, OS

 Explanation :	Select the appropriate windows display depending on the
		operating system, for example before running a widgets program
		such as XDOC.  If the current graphics display already supports
		windows, then do nothing.  Use SETPLOT to retain information
		about the current graphics device.

 Syntax      :	SELECT_WINDOWS

 CALLED BY:
	DAT2GIF, FIT2GIF, HESSI, MK_CDS_PLAN, MK_STUDY, X2GIF, X2JPEG, X2PS, XCAMP, XCAT, XCPT, XDOC
	XLIST, XPORT, XSTRUCT, XSTUDY, plotman
 Examples    :	DSAVE = !D.NAME
		SELECT_WINDOWS
		... widget software ...
		IF !D.NAME NE DSAVE THEN SETPLOT, DSAVE

 Inputs      :	None.

 Opt. Inputs :	None.

 Outputs     :	None.

 Opt. Outputs:	None.

 Keywords    :	None.

 Calls       : ***
	HAVE_WINDOWS [1], HAVE_WINDOWS [2], OS_FAMILY, SETPLOT [1], SETPLOT [2]
 Common      :	None.

 Restrictions:	None.

 Side effects:	None.

 Prev. Hist. :	None.

 History     :	Version 1, 23-Oct-1997, William Thompson, GSFC

 Contact     :	WTHOMPSON


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

 Name        :	
	SELECT_X
 Purpose     :	
	Allos interactive screen selection from X-windows device.
 Explanation :	
	Routine to allow a user to make an interactive screen selection
	from a list (array) of strings.  This assumes an x-windows device.

 Use         :	
	select_x, selections, iselected, comments, command_line, only_one

 Inputs      :	
	selections - string array giving list of items that can be
		selected.

 Opt. Inputs :	
	comments - comments which can be requested for each item in
		array selections.  It can be:
		string array - same length as array selections.
		null string - no comments available
		scalar string - name of a procedure which will
			return comments.  It will take selections
			as its first argument and return comments
			as its second argument.
	command_line - optional command line to be placed at the bottom
		of the screen.  It is usually used to specify what the
		user is selecting.
	only_one - integer flag. If set to 1 then the user can only select
		one item.  The routine returns immediately after the first
		selection is made.

 Outputs     :	
	iselected - list of indices in selections giving the selected
		items.

 Opt. Outputs:	None.

 Keywords    :	None.

 Calls       : ***
	FILEPATH, READ_KEY [1], READ_KEY [2], READ_KEY [3], REVERSE
 CALLED BY:
	SCREEN_SELECT [1], SCREEN_SELECT [2], SCREEN_SELECT [3]
 Common      :	None.

 Restrictions:	
	The screen must be X-windows compatible.
	As of Mar 91, the comments option does not appear to be working

 Side effects:	
	!err is set to the number of selections made

	A window is opened and closed.

 Category    :	Utilities, User_interface

 Prev. Hist. :	
	version 1, D. Lindler  April 88.
	modified to IDL V2 (from screen_select).  M. Greason, May 1990.
	Changed name from screen_select_x         W. Landsman  January 1993
	Removed RETAIN = 2, not needed 		  W. Landsman May 1993

 Written     :	D. Lindler, GSFC/HRS, April 1988

 Modified    :	Version 1, William Thompson, GSFC, 29 March 1994
			Incorporated into CDS library

 Version     :	Version 1, 29 March 1994


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

 Name        : SEND_MAIL

 Purpose     : to e-mail a file or array 

 Category    : Device

 Explanation : checks operating system and spawns the appropriate
               command.

 Syntax      : IDL> send_mail,file,address,array=array


 Inputs      : FILE = filename to mail

 Opt. Inputs : None

 Outputs     : None

 Opt. Outputs: None

 Keywords    : ERR - error message
               ADDRESS = address to send to (e.g., zarro@smmdac)
               ARRAY - alternative string array to print

 CALLS: ***
	DATATYPE [1], DATATYPE [2], DATATYPE [3], ESPAWN, FILE_OR_STRING, OS_FAMILY, RM_FILE
	STR2FILE
 CALLED BY:
	CHECK_KAP, FTP_SYNOP, GET_NOAA, UPDATE_SOHO_TARGETS, XMAIL
 Common      : None

 Restrictions: None

 Side effects: File deleted when /DEL set

 History     : Version 1,  4-Sep-1995,  D.M. Zarro.  Written

 Contact     : DZARRO@SOLAR.STANFORD.EDU


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

 Name        : SEND_PRINT

 Purpose     : to print a file or array in a device independent way

 Category    : Device

 Explanation : checks operating system and spawns the appropriate
               command.

 Syntax      : IDL> send_print,file,queue=queue,qual=qual,array=array

 CALLED BY:
	FIND_DURATION, LIST_DURATION, MK_CDS_PLAN, XPRINT [2], XPRINT [5], text_output
 Example:    : send_print,'test.doc',queue='soho-laser1',qualifier='h'

 Inputs      : FILE = filename to print

 Opt. Inputs : None

 Outputs     : None

 Opt. Outputs: None

 Keywords    : QUEUE	  = Printer queue name [default = '']
               QUALIFIER = Qualifier to the print statement [default = '']
               DELETE	  = Set to delete file when done.
               ERR	  = Error message.
               ARRAY	  = Alternative string array to print
               DEVICE    = set to use DEVICE,/CLOSE for .ps files

 CALLS: ***
	CHKLOG [1], CHKLOG [2], DATATYPE [1], DATATYPE [2], DATATYPE [3], DPRINT, ESPAWN
	FILE_OR_STRING, OS_FAMILY, RM_FILE, STR2FILE, TRIM, is_open, is_ps
 Common      : None

 Restrictions: Print queues must exist

 Side effects: File deleted when /DELETE set

 History     : Version 1,  4-Sep-1995,  D.M. Zarro.  Written
		Version 2, 17-May-1996, William Thompson, GSFC
			Changed QUE and QUAL keywords to their full names.  The
			abbreviations can still be used
               Modified, 1-May-2000, Zarro (SM&A/GSFC) - added check
                       for Postscript file
			1-Aug-2000, Kim Tolbert.  Didn't quite work for Windows OS.
				For Windows, use 'copy /b filename queue' command.  If queue not
				passed in, use PSLASER env var.

 Contact     : DZARRO@SOLAR.STANFORD.EDU


SEP_FILENAME $SSW/gen/idl/system/sep_filename.pro
[Previous] [Next]
 PROJECT:
       SOHO - CDS

 NAME:
       SEP_FILENAME

 PURPOSE:
       Separates a filename into its component parts.

 EXPLANATION:
       Given a file name, break the filename into the parts of disk/logical,
       the directory, the filename, the extension, and the file version
       (for VMS). The difference of this routine from break_file are:
       1) It handles only one filename (instead of an array); 2) file
       extention will not include the "." character, and it may be a
       string array if the file extension can be further broken into more
       parts (separated by the "." character).

 CALLING SEQUENCE:
       SEP_FILENAME, file, disk_log, dir, filnam, ext, fversion, node

 INPUTS:
       FILE    - The file name

 OPTIONAL INPUTS:
       None.

 OUTPUTS:
       DISK_LOG- The disk or logical (looks for a ":")
                 This is generally only valid on VMS machines
       DIR     - The directory
       FILNAM  - The filename (excluding the ".")
       EXT     - The filename extension (NOT including the ".")
       FVERSION- The file version (only VMS)
       NODE    - The Node name (only VMS)

 OPTIONAL OUTPUTS:
       None.

 KEYWORD PARAMETERS:
       None.

 CALLS: ***
	STR_SEP
 CALLED BY:
	ITOOL_RD_FITS, RD_IMAGE_FITS
 COMMON BLOCKS:
       None.

 RESTRICTIONS:
       None.

 SIDE EFFECTS:
       None.

 CATEGORY:

 PREVIOUS HISTORY:
       Written December 12, 1994, Liyun Wang, NASA/GSFC

 MODIFICATION HISTORY:

 VERSION:
       Version 1, December 12, 1994


SET_CURSOR_SHAPE $SSW/gen/idl/widgets/set_cursor_size.pro
[Previous] [Next]
 PROJECT:
       SOHO - CDS

 NAME:
       SET_CURSOR_SHAPE

 PURPOSE:
       Widget interface to set cursor size interactively

 EXPLANATION:

 CALLING SEQUENCE:
       set_cursor_shape, xx, yy [, unit] [, csi=csi] [,status=status]

 INPUTS:
       None required.

 OPTIONAL INPUTS:
       XX     - Cursor width in device pixels
       YY     - Cursor height in device pixels
       CURSOR_UNIT - Unit to be used for the cursor size: 1 for device pixels,
                     2 for image pixels, and 3 for arc seconds. If this
                     parameter is not passed in, device pixels will be assumed

       CSI    - Coordinate system info structure, used to detect if the unit
                of arc seconds can be used

 OUTPUTS:
       XX - New cursor width
       YY - new cursor height
       CURSOR_UNIT - New unit to be used for the cursor size

 OPTIONAL OUTPUTS:
       STATUS - Operation indicator: 1 for accept, 0 for cancel

 KEYWORD PARAMETERS:
       None.

 CALLS: ***
	CW_FIELD, GET_DFONT [1], GET_DFONT [2], NUM_CHK, SETTING_SIZE_EVENT
	SET_CURSOR_SIZE, XACK, XKILL, XMANAGER, XMENU [1], XMENU [2]
 COMMON BLOCKS:
       CURSOR_SIZE - Internal common block

 RESTRICTIONS:
       None.

 SIDE EFFECTS:
       None.

 CATEGORY:

 PREVIOUS HISTORY:
       Written May 4, 1995, Liyun Wang, NASA/GSFC

 MODIFICATION HISTORY:
       Version 1, created, Liyun Wang, NASA/GSFC, May 4, 1995
       Version 2, February 26, 1996, Liyun Wang, NASA/GSFC
          Allowed min value of slider widget to be 1 (previous was 10)

 VERSION:
       Version 2, February 26, 1996


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

   Purpose: use ys environmentals and path file to do fast path setup

   Output:
      function returns string in !path format

   Optional Keyword Parameters:
      arr - switch, if set, return as array, not delimited string

   Calling Examples:
      !path=set_fastpath()		; update IDL !path
      parr =set_fastpath(/arr)		; array version

   History:
      21-Apr-93 (SLF) - to hide temp variables during IDL_STARTUP
      10-oct-93 (slf) - allow '/ys/' <==> getenv('ys') for uniq check
      29-Jun-94 (SLF) - dont eliminate astronomy library during fast start
      30-Jun-94 (SLF) - dont add non-existant paths

 CALLS: ***
	ARR2STR [1], Arr2Str [2], STR2ARR [1], STR2ARR [2], rem_elem [1], rem_elem [2]
	uniqo [1], uniqo [2]
   Restrictions:
      This routine must be in path already!  UNIX only for today


set_font $SSW/gen/idl/genutil/set_font.pro
[Previous] [Next]
NAME:
	set_font
PURPOSE:
	To change the font size for X windows and widgets
SAMPLE CALLING SEQUENCE:
	set_font
	set_font, 12
	set_font, 12, /xonly
OPTIONAL INPUT:
	size	- The font size to find the closest match to
OPTIONAL KEYWORD:
	x_only	- If set, only change X device
	widget_only - If set, only change widget
 CALLS: ***
	get_xfont [1], get_xfont [2]
 CALLED BY:
	favviewer
HISTORY:
	Written 6-Nov-96 by M.Morrison


SET_GRAPHICS [1] $SSW/gen/idl/fund_lib/sdac/set_graphics.pro
[Previous] [Next]
 Project:
	 SDAC

 NAME:
	 SET_GRAPHICS

 PURPOSE:
	This procedure sets screen and hardcopy output graphic devices for use with the
	TEK_INIT, TEK_PRINT, and TEK_END procedures (which now
	handle both Tektronix and PostScript format).

 CATEGORY:
	GRAPHICS

 CALLING SEQUENCE:
       SET_GRAPHICS[,SCREEN=SCREEN,PRINTER=PRINTER,ERROR=ERROR,QUERY=QUERY, $
		HELP=HELP]
 CALLS: ***
	CHECKVAR [1], CHKLOG [1], CHKLOG [2], STR_SEP, XDEVICE, checkvar [2]
 INPUTS:
       None.

 KEYWORDS:
   	SCREEN:		Screen device type.  Options are 'TEK', 'REGIS', 'X',
			and 'Z', 'NULL'. On return, SCREEN contains the screen
			device type selected. Default is X in X-windows, MAC for
			MacOS, Win for WINDOWS
			machines, TEK otherwise.
   	PRINTER:	Printer device type.  Options are 'TEK' and 'PS'.
			On return PRINTER contains the printer device type
			selected. Default is PS.
   	ERROR:		0/1 means no error / error
   	QUERY:		0/1 means prompt/don't prompt user for device types
			(only for device not selected via SCREEN or PRINTER
			keyword)
   	HELP:		=1 means print current selection of device types on
			screen.

 CALLED BY:
	DO_ARCHIVEPLOTS, DO_PSPLOTS, DRAW_FLARE, FLDISPLAY, FS_ARCHIVE_DRAW, FS_AUTO_LOG
	FS_GRAPH, FS_OVERLAY, HXARCHIVE, HXFITS, HXRBS, PLOTBATSE, PLOTBATSE_QL, QLDISPLAY
	QL_DAY_PLOT, QL_ORBIT_PLOT, SELECT_DEV, TEK_INIT [1], TEK_INIT [2], batse_menu
 COMMON BLOCKS:
       TEK_COMMON.

 PROCEDURE:
 	To make hardcopies of plots on Talaris 800, use IDL commands:
   	tek_init
    	plot commands ...
   	tek_end
   	tek_print
 	(tek_init calls set_graphics if you haven't called it explicitly)

 	Screen and printer device types are saved in sc_device and hard_device
 	in common tek_common.

 MODIFICATION HISTORY:
       Mod. 09/02/92 by AKT. Made PS the default for hard_device.
	Mod. 05/06/96 by RCJ . Added documentation.
	Version 3, richard.schwartz@gsfc.nasa.gov, 2-feb-1998.
	Version 4, richard.schwartz@gsfc.nasa.gov, 5-apr-1998.; CONTACT:
	Version 5, richard.schwartz@gsfc.nasa.gov, 10-nov-1999.  set
	screen device in common to WIN under Windows.
	richard.schwartz@gsfc.nasa.gov


set_hard $SSW/gen/idl/display/set_hard.pro
[Previous] [Next]
 NAME:
	set_hard
 PURPOSE:
	set hard copy page parameters
 CALLING SEQUENCE:
	set_hard,orig,/port,/land,/send
 INPUTS:
       plabels = optional additional plot labels 
 OUTPUTS:
       none
 KEYWORDS:
       /port = portrait mode
       /land = landscape mode
       /send = close existing file and send to printer
 CALLS: ***
	LZPLOT, MK_TEMP_FILE
 CALLED BY:
	BCS, FCS, FSDEF, PLOTFIT, WBDA [1], WBDA [2], WBSC [1], WBSC [2], WBSC_FPAR_EV [1]
	WBSC_FPAR_EV [2], plot_bda, plotbrr, plotfda, plotfis
 PROCEDURE:
       set
 MODIFICATION HISTORY:
	May'94, written by DMZ (ARC)


SET_LINE_COLOR $SSW/gen/idl/display/set_line_color.pro
[Previous] [Next]
 PROJECT:
       SOHO - SUMER

 NAME:
       SET_LINE_COLOR

 PURPOSE: 
       Define 11 different colors for the first 11 color indices

 EXPLANATION:
       This routine assigns 11 different colors to the first 11 color
       indices. These color indices correspond to the following colors:

           'black',  'white',  'yellow',  'red',     'green', 
           'blue',   'orange', 'purple',  'magenta', 'brown', 
           'turquoise'

       The appearance of the actual color will depends on how many
       colors are available in your display device. Generally
       speaking, it will appear pretty close if more than 200 colors
       are available.

 CALLING SEQUENCE: 
       SET_LINE_COLOR

 INPUTS:
       None.

 OPTIONAL INPUTS: 
       None.

 OUTPUTS:
       None.

 OPTIONAL OUTPUTS:
       None.

 KEYWORD PARAMETERS: 
       LIST - List (on the screen) numbers and names of line color defined 

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

 CALLS: ***
	LINECOLOR
 CALLED BY:
	MK_CDS_PLAN, MK_PLAN_FORM, MK_PLAN_PLOT, MK_SOHO, TKI_DISPLAY_DET, TKI_DRAW_POS
	TKI_INIT_DISP, TKI_INIT_MEM, TKI_RESGRAPH, XSPECT, db_gbo, hsi_obs_times
 MODIFICATION HISTORY:
       Version 1, Liyun Wang, GSFC/ARC, April 18, 1995
       Version 2, September 1, 1995, Liyun Wang, GSFC/ARC
          Added LIST keyword

 VERSION:
       Version 2, September 1, 1995


set_logenv [1] $SSW/gen/idl/system/set_logenv.pro
[Previous] [Next]
   Name: set_logenv

   Purpose: set environmental variable (unix) and logicals (vms)
            (allow dynamic updates of Yohkoh environment)

   Input Paramters:
      logenv - string or string vector - unix environ or vms logical names
      value  - string or string vector - values to assign to logenv

   Calling Examples:

      set_logenv,'DIR_GEN_PNT',curdir()	  ; redefine PNT to current

      set_logenv,file=concat_dir('$DIR_SITE_SETUP','setup_dirs')

   Calls: ***
	SETLOG, data_chk [1], data_chk [2], rd_tfile [1], rd_tfile [2]
 CALLED BY:
	CHANPHZCHEK, FS_OPEN [1], F_TH_NT, HESI_MENU, HESSI_DEV, HSI_MODEL_TO_SCORE
	HSI_VCFILE_PACKET_RATE, Hsi_contact2fits [1], Hsi_contact2fits [2], choose_sfc
	configure_http, get_pix, get_sirius [1], get_sirius [2], hessi_version
	hsi_clk_delta_calc, hsi_do_qlook_image [1], hsi_do_qlook_image [2]
	hsi_monthly_average, hsi_qlook_call_ospex [1], hsi_qlook_call_ospex [2]
	hsi_switch, mo_patch, pref_super, printing [1], printing [2], rd_goesp_ascii
	rd_goesx_ascii, read_trace, restenv [1], restenv [2], setssw_windows
	ssw_instr_info, ssw_set_instr, ssw_setsswdb_gen, ssw_setup_windows
	ssw_upgrade [1], ssw_upgrade [2], ssw_upgrade_backup, sswdb_upgrade
	sxt_patch_att, sxt_prep [1], sxt_prep [2], sxt_prep [3], trace_last_movie [1]
	trace_last_movie [2], trace_last_movie [3], trace_movie_index [1]
	trace_movie_index [2], trace_special_movie [1], trace_special_movie [2]
	trace_special_movie [3], trace_special_movie2, trace_write_genxcat, ydb_use
   History:
      27-Apr-1993 (SLF) - For dynamic relocation/additon of pointers
      30-Apr-1993 (SLF) - improved file option / parameter validation
      16-May-1994 (SLF) - fixed type in vms code
      20-jun-1996 (SLF) - permit multi-valued environmentals in file mode
      08-jul-1996 (RAS) - handles vms through set_logvms
      14-jul-1998 (SLF) - add /envlist (simulate search list under unix)
                          allow nested environmentals (one level
      28-May-1999 (RDB) - reordered code to case statement so could
                          handle windows through set_logwindows
      09-May-2003, William Thompson - Use ssw_strsplit instead of strsplit

   Restrictions:
      Can't specify both array and file
      Not all VMS setlog options are available
      Nesting environmentals only 1 level deep - should recurse till done


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

   Purpose: set logicals (vms)
            (allow dynamic updates of Yohkoh environment)

   Input Paramters:
      logenv - string or string vector - unix environ or vms logical names
      value  - string or string vector - values to assign to logenv

   Calling Examples:

      set_logvms,'DIR_GEN_PNT',curdir()	  ; redefine PNT to current

      set_logvms,file=concat_dir('$DIR_SITE_SETUP','setup_dirs')

   Calls: ***
	EXTRACT_VMS_DEFS, SETLOG, STR_SEP, data_chk [1], data_chk [2], rd_tfile [1]
	rd_tfile [2], ssw_strsplit, uniqo [1], uniqo [2]
   Restrictions:
	VMS only
   History:
      08-jul-1996 (RAS) - Adapted from <set_logenv>
	handles vms logical definitions, vms keywords to setlog
                          multi-valued logicals
      15-Aug-1996 (RAS) - debug keyword implemented
      3-march-1996 ras, eliminate unix comment lines
      09-May-2003, William Thompson - Use ssw_strsplit instead of strsplit
   Restrictions:
      Can't specify both array and file
      Not all VMS setlog options are available


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

   Purpose: set logicals (windows)
            (allow dynamic updates of Yohkoh environment)

   Input Paramters:
      logenv - string or string vector - windows, unix environ or vms logical names
      value  - string or string vector - values to assign to logenv

   Calling Examples:

      set_logwindows,'DIR_GEN_PNT',curdir()          ; redefine PNT to current

      set_logwindows,file=concat_dir('$DIR_SITE_SETUP','setup_dirs')

   Calls: ***
	ARR2STR [1], Arr2Str [2], BOX_MESSAGE, RESOLVE_VARIABLE, STR2ARR [1], STR2ARR [2]
	get_logenv [1], get_logenv [2], rd_tfile [1], rd_tfile [2], str2cols [1]
	str2cols [2], str_replace [1], str_replace [2]
   Restrictions:
       WINDOWS only
       Can't specify both array and file
       ??
   History:
       30-May-1999 - R.D.Bentley - Adapted from code by H. Warren
       18-Mar-2000 - R.D.Bentley - mod within resolve_vars in case not defined
       27-Jul-2000 - R.D.Bentley - trap null env. var. definition files
                                 - save defined vars. in common
       28-Mar-2006 - Kim Tolbert - rd_tfile didn't handle columns correctly, use
                                   str2cols to handle column-finding instead


set_oldpath [1] $SSW/gen/idl/genutil/set_oldpath.pro
[Previous] [Next]

   Purpose: incorporate idl version specific directorys in !path
   	     
   History: slf, 23-feb-1993
	     slf, 30-mar-1993 return to caller on error
            rdb, 16-Aug-94   modified to also run under VMS
            rdb, 26-Aug-94   moved printe statement inside conditional

 CALLS: ***
	ARR2STR [1], Arr2Str [2], CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3]
	concat_dir [4]
   Side Effects:
      If IDL version is older than ys master, !path may be modified


SET_POINTER $SSW/gen/idl/objects/set_pointer.pro
[Previous] [Next]
 Project     : SOHO - CDS

 Name        : SET_POINTER

 Purpose     : to set a pointer value to a pointer variable

 Category    : Pointers

 Explanation : assign a pointer value to a pointer variable.

 Syntax      : IDL> set_pointer,pointer,value

 Inputs      : POINTER = pointer variable
             : VALUE = value to assign

 Keywords    : NOCOPY   -  do not make internal copy of value
               INDEX - index of pointer array to set value to

 CALLED BY:
	BREAK_MAP, CACHE_DATA, CDS_STACK, COPY_VAR, EIS_IMAGE_TOOL_EVENT [1]
	EIS_IMAGE_TOOL_EVENT [2], GET_CDS_STUDY, IMAGE_TOOL_EVENT, ITOOL_LOAD_IMAGE
	MK_PLAN_CUSTOM, MK_SOHO_CUSTOM, XANSWER, XCALENDAR, XCAMP, XCAT, XCHOICE, XCLONE_PLAN
	XGET_UTC, XIAP, XINPUT, XLIST, XPROGRAM, XPROGRAM_ADD, XPS_SETUP, XREPORT, XREPORT_EDIT
	XSEL_ITEM, XSEL_LIST [1], XSEL_LIST [2], XSET_COLOR, XSET_VALUE, XTEXT, XZOOM_PLAN
	ethz_XCHOICE
 Restrictions: POINTER must be defined via MAKE_POINTER

 CALLS: ***
	DATATYPE [1], DATATYPE [2], DATATYPE [3], DPRINT, EXIST, PTR_ALLOC, VALID_POINTER
 Side effects: external value of POINTER is removed when /NO_COPY set

 History     : Version 1,  1-Sep-1995,  D.M. Zarro.  Written
               Version 2, 17-Jul-1997, D.M. Zarro. Modified
                 -- Updated to version 5 pointers 
               Version 3, 18-May-2002, Zarro (L-3Com/GSFC) 
                 -- Added check for invalid input pointer
               24-Jan-2007, Zarro (ADNET/GSFC)
                 - removed EXECUTE

 Contact     : DZARRO@SOLAR.STANFORD.EDU


set_printer [1] $SSW/gen/idl/system/set_printer.pro
[Previous] [Next]
NAME:
	set_printer
PURPOSE:
	To allow the user to set the printer queue where the output will 
	come out
 CALLS: ***
	input [1], input [2], tbeep [1], tbeep [2], tbeep [3], wmenu_sel [1], wmenu_sel [2]
 CALLED BY:
	xanal_emi, xdisp_fits, xdisp_trace [1], xdisp_trace2, xdisp_trace3, xhkplot
HISTORY:
	Written 25-Apr-94 by M.Morrison
	27-Apr-94 (MDM) - Various changes
	20-Jan-95 (MDM) - Changed "lp -dlaser" to "lp -c -dlaser"
	28-Feb-95 (MDM) - Added option to send to QUAKE qms printer remotely
	30-Nov-95 (MDM) - Changed "To redirect to LPARL lps20 from outside LPARL"
			  option to point to umbra and que saglps20ps
	30-Apr-96 (MDM) - Added option to print to SAG
	27-Jan-97 (MDM) - Added option to print to DIAPASON
	------------ Big variation ----------------
	15-Apr-97 (MDM) - Modified to work with SPRINT instead of PPRINT
			- Also modified to use a /ssw/site/setup/set_printer.tab
			  file to define the options


SET_UTAXIS $SSW/gen/idl/utplot/set_utaxis.pro
[Previous] [Next]
 PROJECT:
   SDAC
 NAME:
   SET_UTAXIS

 PURPOSE:
   This function returns the system variable x=axis structure as though it were
   set by a call to UTPLOT.  Used with IDL's AXIS routine.

 CATEGORY:
   Plotting, UTIL, UTPLOT

 CALLING SEQUENCE:
   xaxis_structure = set_utaxis(ut)

 CALLS: ***
	DEFAULT, GET_UTAXIS, RESTORE_PLOTVAR, STORE_PLOTVAR, UTPLOT [1], UTPLOT [2]
	UTPLOT [3], UTPLOT [4], UTPLOT [5], UTPLOT [6], anytim [1], anytim [2], anytim [3]
	anytim [4], anytim [5]
 INPUTS:
       UT - Time array. All formats acceptable to UTPLOT.
       Utbase - base time for inputs in seconds format (time in seconds from 1-jan-1979).
      not used for fully referenced times understood by anytim

 OPTIONAL INPUTS:
   none

 OUTPUTS:
       The function returns the X axis structure needed for subsequent calls to axis.

 OPTIONAL OUTPUTS:
   none

 KEYWORDS INPUTS:

       All KEYWORDS AVAILABLE TO UTPLOT notably:

       TIMERANGE - This can be a two element time range to be
               plotted.  It can be a string representation or structure.

       LABEL - a 2 element vector selecting substring from publication format
               of ASCII time (YY/MM/DD, HH:MM:SS.XXX).  For example,
               LBL=[11,18] would select the HH:MM:SS part of the string.
       SAV -   If set, UTPLOT labels, tick positions, etc. in !X... system
               variables will remain set so that they can be used by
               subsequent plots (normally !x... structure is saved in
               temporary location before plot and restored after plot).
               To clear !x... structure, call CLEAR_UTPLOT.
       TICK_UNIT - Time (in seconds) between Major tick marks is forced to TICK_UNIT
                   Has no effect for axis longer than 62 days.
       MINORS    - Number of minor tick marks is forced to MINORS
       NOLABEL If set then UTLABEL isn't printed on plot
       XTITLE - text string for x-axis label - If the string contains
                4 asterisks ('****'), the UT time will be substituted
                for that substring
       YEAR - Force the year in the x axis labels
       YOHKOH - Use Yohkoh style labels, e.g. '03-May-93 18:11:30.732'

 CALLED BY:
	Show Image [1], Show Image [2], Show Image [3]
 COMMON BLOCKS:
   none

 SIDE EFFECTS:
   The saved system variables in the Utplot common area are left unchanged
   as well as the system variables.  Therefore calls must be self-contained since the
   memory of these actions is erased.

 RESTRICTIONS:
   Same as for Utplot as applies to x axis.

 How to use it with a call to AXIS
 this sets the axis label on the top

 Using Utbase
   x=findgen(1000)
   utplot, x,x, '3-jan-2003', xstyle=4
   ax = set_utaxis(x,'3-jan-2003')
   axis, xaxis=1, xtitle=''
   xtickname = !x.tickname
   axis, xaxis=0, xtickname= strarr(n_elements(xtickname))+' '


   ; For a fully referenced time

   x=findgen(1000)
   t= anytim( x + anytim('3-jan-2003'), /ex)
   utplot, t,x, xstyle=4
   ax = set_utaxis(t)
   !x=ax
   axis, xaxis=1, xtitle=''
   xtickname = !x.tickname
   axis, xaxis=0, xtickname= strarr(n_elements(xtickname))+' '







 MODIFICATION HISTORY:
   Version 1, richard.schwartz@gsfc.nasa.gov, 5-jun-1998, on a suggestion
   from AC to better support calls to AXIS.
   08-Oct-2002, Kim.  Added !x = xold, etc lines to make it work right.
   2-nov-2005, richard.schwartz@gsfc.nasa.gov
     No longer setting null device, plotting to current device instead
   15-nov-2005, ras, added title='' and subtitle='' to inhibit
     writing these if !p.title or !p.subtile are set


SET_UTLABEL $SSW/gen/idl/utplot/set_utlabel.pro
[Previous] [Next]
 Project     : SDAC    
                   
 Name        : SET_UTLABEL
               
 Purpose     : This procedure controls the default for a date
		label under UTPLOT.PRO.
               
 Category    : UTPLOT, GRAPHICS
               
 Explanation : A logical in a common block is set or reset.
               
 Use         : SET_UTLABEL, 0		;Disables labeling.
		SET_UTLABEL, 1		;Enables labeling.
		    
 Inputs      : Option- 1 to set, 0 to reset. Default is reset.
               
 Opt. Inputs : None
               
 Outputs     : None

 Opt. Outputs: None
               
 Keywords    : 

 Calls       : ***
	CHECKVAR [1], checkvar [2]
 CALLED BY:
	BCS, HXARCHIVE, HXFITS, QL_DAY_PLOT, QL_ORBIT_PLOT, WBDA [1], WBDA [2], WBSC [1]
	WBSC [2], WBSC_FPAR_EV [1], WBSC_FPAR_EV [2], plot_bda, plotbrr, setup_spex [1]
	setup_spex [2]
 Common      : UTSTART_TIME
               
 Restrictions: Utplot directory in !path.
               
 Side effects: None.
               
 Prev. Hist  : Written about 1988 by RAS

 Modified    : Documentation header, 5-Feb-1997.


SET_UTPLOT [1] $SSW/gen/idl/utplot/set_utplot.pro
[Previous] [Next]
 NAME:
	SET_UTPLOT
 PURPOSE:
	Allows user flexibility in setting up time axis labelling.
	Prepares IDL system variables (!X.RANGE, !X.TICKV, !X.TICKNAME, 
	and !X.TICKNAME) for plotting X vs Y with Universal time labels 
	on bottom X axis.  After calling SET_UTPLOT, user calls the 
	standard IDL PLOT routine to draw the plot. 
	SET_UTPLOT is normally called by UTPLOT, and is transparent to 
	the user.
	Default style is controlled by atime_format which is set by
	a call to YOHKOH( HXRBS )_FORMAT, Yohkoh style uses
	dd-mon-yr hh:mm:ss.xxx and for HXRBS
	yy/mm/dd, hh:mm:ss.xxx

 CATEGORY:
 CALLING SEQUENCE:
	SET_UTPLOT,XRANGE=X,LABELPAR=LBL,UTBASE=BASE,ERROR_RANGE=ERROR_RANGE,
	   ERR_FORMAT=ERR_FORMAT, EFLAG=EFLAG, TICK_UNIT=TICK_UNIT, NTICKS=NTICKS, MINORS=MINORS,
	   XSTYLE=XSTYLE, yohkoh=yohkoh, year=year
 INPUT PARAMETERS:
	X - 	X array to plot (seconds relative to base time).
	LBL - 	2 element vector selecting substring from publication format
	   	of ASCII time (YY/MM/DD, HH:MM:SS.XXX).  For example, 
	   	LBL=[11,18] would select the HH:MM:SS part of the string.
	BASE - 	ASCII string containing base time for X axis. Format for
	   	time is YY/MM/DD,HHMM:SS.XXX.  If this parameter isn't present
          	and hasn't been set yet (by a previous call to UTPLOT, via 
		routine SETUTBASE, or directly), user is prompted for base time.
	ERROR_RANGE - = 0/1. If set to 1, the X array is outside of the
	   	limits defined by start and end times selected by user.
	ERR_FORMAT - =0/1. If set to 1, there was an error in the ASCII time
	   	format for the base time.
	TICK_UNIT - Time between Major tick marks is forced to TICK_UNIT
		    Has no effect for axis longer than 62 days.
                   If TICK_UNIT is negative, then a standard value for TICK_UNIT is used
                   that is closest to abs(TICK_UNIT). Returned as new value.
	NTICKS-  Similar to standard XTICKS in plot.  The default tick_unit is adjusted such
		that the number of intervals is as close to XTICKS as possible. If two
		values are consistent, the longer interval is used. Using NTICKS to avoid
		problems with users not completely specifying TICK_UNIT.
	MINORS	  - Number of minor tick marks is forced to MINORS. 
	XSTYLE    - Same meaning as in PLOT, if SET xaxis is exact to UTSTART
		    and UTEND.
       /yohkoh  - force yohkoh time formats, e.g. '03-May-93 18:14:23.732'
		   instead of '93/05/03, 18:14:23.732'
	/year    - forces the year to be included in the date string
	EFLAG	 - Error flag, if set then not normal return
 CALLS: ***
	ATIME [1], ATIME [2], CHECKVAR [1], DUMMYPLOTS, FCHECK, SETUT [1], SETUT [2]
	SETUTBASE [1], SETUTBASE [2], YMD2SEC [1], YMD2SEC [2], checkvar [2]
 CALLED BY:
	DEF_UTPLOT, HXISXPLOT, SETUT [1], SETUT [2], UTPLOT [1], UTPLOT [2], UTPLOT [3]
	UTPLOT [4], UTPLOT [5], plotbft [1], plotbft [2]
 COMMON BLOCKS:
	COMMON UTCOMMON, UTBASE, UTSTART, UTEND, XST = base, start, and 
	end time for X axis in double precision variables containing
	seconds since 79/1/1, 00:00.
       COMMON CLEARCOMMON,XOLD,YOLD,CLEARSET = holding area for previous
	!x and !y structures if clearset=1
	COMMON UTSTART_TIME, PRINT_START_TIME, ATIME_FORMAT

 RESTRICTIONS:
	Cannot be used for times before 79/1/1 or after 2049/12/31.
 MODIFICATION HISTORY:
	Written by Richard Schwartz 91/02/17
	Modified 91/03/27, RAS
		Clears all !x vectors which will be set.
	Modified 91/05/02, RAS
		New Keywords Tick_unit, and Minors		
       Modified 92/5/11, Kim Tolbert.  If lower and upper limits for x axis
               are passed in xrange (rather than entire x array to plot),
               then those limits take precedence over any utstart and
               utend that might be set by user.  Before utstart/end always
               defined limits if they were set.
	Modified 92/07/10, RAS
		Uses new version of ATIME which accepts arrays of times
		and is valid from 1950-2049 
	Modified 93/01/18, RAS
		no longer uses ymd2sec to find first day of years or months
		uses jdcnv and daycnv
       Modified 93/05/03, RAS
		switch for Yohkoh format
	Modified 93/06/07, RAS
		accepts Yohkoh database structure for X
       26-Aug-92 (MDM) - Added keyword YEAR - put year on tick labels
       18-Mar-93 (MDM) - Removed the modification made 91/10/18 since it was
                         causing problems on subsequent plots (giving a
                         error_range error)
	1-Nove-93 ras - reconcile Yohkoh and SDAC software 
	14-Dec-93 (MDM) - Various changes - allow plotting reverse time order
			- Allow plotting of a single point
	5-jan-94 ras - use t_utplot to resolve problems with 
		       multiple formats for x, i.e, sec+utbase and 
		       fully referenced time formats
       28-jan-94 ras - allows degenerate time range without crashing
	 7-Feb-94 (MDM) - Patch for plotting single point case
	17-dec-98,        richard.schwartz@gsfc.nasa.gov
                         Now, NTICKS can be used to help control the number of intervals.
                         Default minor selection held to 12 or less.
                         Approximate selection of TICK_UNIT enabled through negative values.


SET_X [1] $SSW/gen/idl/display/set_x.pro
[Previous] [Next]
 Project     : SDAC  
                   
 Name        : SET_X   
               
 Purpose     : Set the device to 'X' with vector fonts.
               
 Category    : graphics
               
 Explanation : Uses "set_plot"
               
 Use         : SET_X
    
 Inputs      : None
               
 Opt. Inputs : None
               
 Outputs     : None

 Opt. Outputs: None
               
 Keywords    : None

 CALLS: ***
	HAVE_WINDOWS [1], HAVE_WINDOWS [2], OS_FAMILY
 CALLED BY:
	CHIANTI_NE, CHIANTI_TE, HESSI_ATTENUATOR_SPECTRA, PLOT_ANGC [1], PLOT_ANGC [2]
	PLOT_GD, PLOT_HESSI_FILTERS, QLDISPLAY, X [1], X [2], XPRINT [2], XPRINT [5]
 Common      : None
               
 Restrictions: 
               
 Side effects: !p.font set to -1
               
 Prev. Hist  : 

 Mod.        :
       version 1, richard.schwartz@gsfc.nasa.gov 2-Mar-1996
	version 2, amy@aloha.nascom.nasa.gov 5-Mar-1998
		changed setplot,'x' to set_plot,'x'


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

   Purpose: part of idl setup - avoid order dependent X call effects 

   History: slf, 3-Apr-1992
	     slf, 9-Aug-1992 - verify DISPLAY is defined 
            slf,  1-nov-96  - 24 bit support check SSW_X_DEPTH,X_COLORS,X_RETAIN
                              use device,decompose=0 
            slf,  7-nov-96  - no action if remote DISPLAY 
	     MDM, 11-Nov-96  - Removed 7-Nov modification
			     - Moved pseudo code to before window call
			     - Various other changes
            DMZ, 24-Jan-97  - added check for when called as UNIX
                              CRON job, in which case setting X colors
                              produces errors
	     MDM,  1-May-97  - Modified to print warning statement if
			       using 8 bit pseudo color
			     - Modified to set pseudo flag if ncolors is set
			     - Changed spawn,'tty' to be /noshell which
				sped up the execution considerably.
            Zarro, 12-Jan-02- added ALLOW_WINDOWS to catch device open
                              errors


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

   Purpose: set X windows display to remote node while in idl

   Input Parameters:
      node - string node name or string node number

   History: slf, 3-nov-1992

   Restrictions:
      o does not handle local machine security issues
      o probably a lot of others
 
   Side Effects:
	redirects X output to specified node
	may generate warning messages when 1st window is created (but works)
      


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

 Name        :	SETENV

 Purpose     :	Emulates the SETENV routine in VMS.

 Explanation :	Converts the SETENV syntax used in Unix and Microsoft Windows
		to the equivalent SETLOG statement in VMS.

 Use         :	SETENV, EXPRESSION

		SETENV, 'ZDBASE=SYS$USER1:[CDS.DATA.PLAN.DATABASE]'

 Inputs      :	EXPRESSION = A scalar string containing the name of the
			     environment variable to be defined, followed by
			     the equals "=" character, and the value to set
			     this environment variable to.

			     Note that this string must not contain any blanks
			     before or after the "=" character.  For example,

				SETENV, 'ZDBASE = SYS$USER1:[THOMPSON]'

			     would not work correctly, because of the embedded
			     blanks.  This behavior is the same in the internal
			     SETENV procedure in Unix.

 Opt. Inputs :	None.

 Outputs     :	None.

 Opt. Outputs:	None.

 Keywords    :	None.

 Calls       : ***
	DATATYPE [1], DATATYPE [2], DATATYPE [3], SETLOG
 Common      :	None.

 Restrictions:	VMS-only.  In Unix and Microsoft Windows, the built-in SETENV
		routine is used instead.

 Side effects:	None.

 Category    :	Utilities, Operating_system.

 Prev. Hist. :	None.

 Written     :	William Thompson, GSFC, 27 March 1995

 Modified    :	Version 1, William Thompson, 27 March 1995

 Version     :	Version 1, 27 March 1995


SetFitParm $SSW/gen/idl/fitting/setfitparm.pro
[Previous] [Next]
 NAME:
   SetFitParm.pro

 AUTHOR:
	F.Bringezu, denet - Internetservice, Halle Germany,
	bringezu@denet.de

 PURPOSE:
   Provide a widget interface for creating a parinfo structure.
   This parinfo structure can by used by mpfit routines of Craig B. Markwardt.

 MAJOR TOPICS:
   Widget, mpfit.

 CALLING SEQUENCE:
   parinfo=SetFitParm(used_parinfo)

 DESCRIPTION:

   SetFitParm creates PARINFO using a widget interface.
   PARINFO provides constraints for paramters used by the mpfit routines.

   PARINFO is an array of structures, one for each parameter.

   A detailed description can be found in the documentation of mpcurvefit.pro
   This routine creates an array that contains a structure for each element.
   The structure has the following entries.

   - VALUE (DOUBLE): The starting parameter
   - FIXED (BOOLEAN): 1 fix the parameter, 0 don't fix it at the
     point given in VALUE.
   - LIMITS (DBLARRAY(2)): Set upper and lower limit.
   - LIMITED (BOOLEAN ARRAY 2):  Fix the limit.


   The parameter OLDPARINFO is optional. OLDPARINFO is used to set
   the default values in the widget.

   You can simply run:
   test=SetFitParm() to create the array for the first time.
   Once the array is created it can be used to set the default values
   in the widget by calling

   test2=SetFitParm(test)

 INPUTS:


 OPTIONAL INPUTS:

   OLDFITPARM - The default values of the new array

 INPUT KEYWORD PARAMETERS:

   PARENT - if this widget is to be a child, set this keyword to the
            parent widget ID.

 OUTPUT KEYWORD PARAMETERS:

   CANCEL - if the user selected the cancel button on the SETFITPARM
            widget, then this keyword will be set upon exit.

 OUTPUTS:
   PARINFO array of structures

 CALLS: ***
	SETFITPARM_EVENTS, XMANAGER
 SEE ALSO:
	MPCURVEFIT
 MODIFICATION HISTORY:
   Written, FB, 12/1999
   Documented, FB, Jan 2000
   Generalized positioning code, CM 01 Feb 2000


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

 Name        : 
	SETFLAG
 Purpose     : 
	Sets flags to control behavior of image display routines.
 Explanation : 
	Sets one of the flag fields in the !IMAGE structure.  One can use this
	routine to set the default value of one of the SERTS keyword parameters
	once rather than passing the relevant keyword to each and every
	routine.  Passing the keyword to any individual routine takes
	precedence over SETFLAG.

	Use UNSETFLAG to disable any keyword set with SETFLAG.

	Use ENABLEFLAG instead of SETFLAG to reenable one of the keyword that
	takes a value, such as MISSING or SIZE, without disturbing the value
	of that keyword.

	Use SHOWFLAGS to show what flags are set, and what values they have.

 Use         : 
	SETFLAG, Keyword=Value or /Keyword, ...
 Inputs      : 
	None.  Only keyword parameters are used by this routine.
 Opt. Inputs : 
	None.
 Outputs     : 
	None.
 Opt. Outputs: 
	None.
 Keywords    : 
	NOSQUARE = If set, then pixels are not forced to be square.
	SMOOTH	 = If set, then image is expanded with interpolation.
		   Optionally, this can be set to the amount of smoothing to be
		   done for PostScript output.  See EXPAND_TV for more
		   information.
	NOBOX	 = If set, then box is not drawn, and no space is reserved
		   for a border around the image.
	NOSCALE	 = If set, then the command TV is used instead of TVSCL to
		   display the image.
	MISSING	 = Value flagging missing pixels.  These points are scaled to
		   zero.  Ignored if NOSCALE is set.
	SIZE	 = If passed and positive, then used to determine the scale of
		   the image.
	NOEXACT  = If set, then exact scaling is not imposed.  Otherwise, the
		   image scale will be either an integer, or one over an
		   integer.  Ignored if SIZE is passed with a positive value.
	XALIGN	 = Alignment within the image display area.  Ranges between 0
		   (left) to 1 (right).  Default is 0.5 (centered).
	YALIGN	 = Alignment within the image display area.  Ranges between 0
		   (bottom) to 1 (top).  Default is 0.5 (centered).
	RELATIVE = Size of area to be used for displaying the image, relative
		   to the total size available.  Must be between 0 and 1.
		   Default is 1.  Passing SIZE explicitly will override this
		   keyword.
	MAX	 = The maximum value to be considered in scaling images, as
		   used by BYTSCL.
	MIN	 = The minimum value to be considered in scaling images, as
		   used by BYTSCL.
	VELOCITY = If set then the MIN and MAX values pertain to velocity
		   images rather than intensity images.  (An alternate way to
		   do the same thing is to use the keywords VMIN and VMAX.)
	TOP	 = The maximum value of the scaled image array, as used by
		   BYTSCL.
	BOTTOM	 = The minimum value of the scaled image array, as used by
		   BYTSCL.
	COMBINED = Signal to FORM_VEL to scale velocity images so that they can
		   be displayed together with intensity images.
 Calls       : ***
	TAG_EXIST [1], TAG_EXIST [2]
 CALLED BY:
	BP_SEEK_POS, SETPLOT [1], SETPLOT [2], SLIT45_IMAGE_DEMO, XCOR_CDS
 Common      : 
	None.
 Restrictions: 
	In general, the SERTS image display routines use several non-standard
	system variables.  These system variables are defined in the procedure
	IMAGELIB.  It is suggested that the command IMAGELIB be placed in the
	user's IDL_STARTUP file.

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

 Side effects: 
	None.
 Category    : 
	Utilities, Image_display.
 Prev. Hist. : 
	William Thompson, June 1991.
	W.T.T., Nov. 1991, added keywords MIN, MAX, VMIN, VMAX, TOP and
			   COMBINED.
	W.T.T., May 1992, added VELOCITY keyword, and made VMIN, VMAX alternate
			  format.
	William Thompson, August 1992, renamed BADPIXEL to MISSING.
 Written     : 
	William Thompson, GSFC, June 1991.
 Modified    : 
	Version 1, William Thompson, GSFC, 12 May 1993.
		Incorporated into CDS library.
	Version 2, William Thompson, GSFC, 4 March 1998
		Allow SMOOTH to take a value other than zero.  This allows
		control over smoothing in PostScript files.
       Version 3, William Thompson, GSFC, 3-Jan-2006
               Added keyword BOTTOM
 Version     : 
	Version 3, 3-Jan-2006


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

 Name        : 
	SETIMAGE
 Purpose     : 
	Allow several images in one window.
 Explanation : 
	Allows several images in one window, arranged horizontally and/or
	vertically.

	If the /NORMAL keyword is set, then the equivalent values of IX, NX,
	and IY, NY (which may be fractional) are calculated and substituted in
	the common block.

	If no parameters are passed, or the full screen is selected, then
	the behavior is reset to the default.

	Normally, PUT is used to actually display an image using only part of
	the screen, although SETIMAGE and EXPTV,/NORESET could be used to
	generate the same output.

	SETIMAGE can be used to reselect an image that was previously displayed
	(e.g. with PUT).

 Use         : 
	SETIMAGE					;Reset to default

	SETIMAGE, IX, NX  [, IY, NY ]			;Divide screen into
							;NX x NY boxes

	SETIMAGE, /NORMAL, X1, X2  [, Y1, Y2 ]		;Arbitrary box in
							;normalized coordinates

 CALLED BY:
	EXPAND_TV, EXPTV, FF_DEMO, MK_SYNOPTIC, PUT, SHOW_SCATTER, TVAXIS, TVPRINT, WDISPLAY
	WRUNMOVIE [2], XCOR_CDS
	Example: Display an image as the third of five from the left, and the
	second of three from the top.

		SETIMAGE, 3, 5, 2, 3
		EXPTV, image, /NORESET

	Example: Display an image in a box using the top 80% of the screen,
	with 5% margins on either side.

		SETIMAGE, 0.05, 0.95, 0.2, 1, /NORMAL
		EXPTV, image, /NORESET

	Example: Select a previously displayed image and retrieve the data
	coordinates associated with it.

		SETIMAGE, 2, 5, 1, 3, /DATA

 Inputs      : 
	None required.
 Opt. Inputs : 
	IX, NX	= Relative position along X axis, expressed as position IX
		  out of a possible NX, from left to right.  If not passed,
		  then 1,1 is assumed. 
	IY, NY	= Relative position along Y axis, from top to bottom.  If
		  not passed, then 1,1 is assumed.

	or

	X1, X2	= Coordinates along the X axis of an arbitrary box in
		  normalized coordinates.  Can have values between 0 and 1.
	Y1, Y2	= Coordinates along the Y axis of an arbitrary box in
		  normalized coordinates.  Can have values between 0 and 1.  If
		  not passed, then 0,1 is assumed.
 Outputs     : 
	None.
 Opt. Outputs: 
	None.
 Keywords    : 
	NORMAL	= If set, then the input parameters are in normalized
		  coordinates.  Otherwise, they refer to the relative position
		  of the image on the screen in a regular array of images.
	DATA	= Retrieve the data coordinates associated with an already
		  displayed image.
	DISABLE	= If set, then TVSELECT is not called.  Only relevant in
		  conjunction with the DATA keyword.
	CURRENT	= If set, then the currently stored settings are used.  Used in
		  conjunction with the DATA keyword to allow calling without
		  parameters.
 Calls       : ***
	GET_TV_SCALE, GET_VIEWPORT [1], GET_VIEWPORT [2], TRIM, TVSELECT, TVUNSELECT
 Common      : 
	IMAGE_AREA  = Contains switch IMAGE_SET and position IX, NX, IY, NY.
 Restrictions: 
	If /NORMAL is set, then X1, X2, Y1, Y2 must be between 0 and 1.
	Otherwise, IX must be between 1 and NX, and (if passed) IY must be
	between 1 and NY.

	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	Applied Research Corporation
	February, 1991          8201 Corporate Drive
				Landover, MD  20785

	William Thompson, November 1992, added /NORMAL keyword.
 Written     : 
	William Thompson, GSFC, February 1991.
 Modified    : 
	Version 1, William Thompson, GSFC, 12 May 1993.
		Incorporated into CDS library.
	Version 2, William Thompson, GSFC, 24 June 1993.
		Added call to ON_ERROR.
	Version 3, William Thompson, GSFC, 2 September 1993.
		Added DATA and DISABLE keywords.
		Added CURRENT keyword.
 Version     : 
	Version 3, 2 September 1993.


SETPLOT [1] $SSW/gen/idl/display/setplot.pro
[Previous] [Next]
 Project     : SOHO - CDS

 Name        : 
	SETPLOT
 Purpose     : 
	Switch between plotting devices with memory about each.
 Explanation : 
	Switches among the various available plotting devices.	The plotting
	variables for each device are saved in a common block so that the user
	retains the ability to reset to a previously used device and do over-
	plots, even if plots were produced on another device in the meantime.

	Calling SETPLOT with the name of the currently selected device resets
	the system variables to either default values, or those from the last
	time SETPLOT was called.

	The !BCOLOR and !ASPECT system variables are also saved.

 Use         : 
	SETPLOT, DEVICE
 Inputs      : 
	DEVICE	- Name of the plotting device one is changing to.
 Opt. Inputs : 
	None.
 Outputs     : 
	None.
 Opt. Outputs: 
	None.
 Keywords    : 
	COPY = If set, then the current color table is copied to the new
	       graphics device.  Also, the SETFLAG routine is called to set TOP
	       equal to the number of colors.  Also makes sure that !P.COLOR
	       does not exceed the TOP color.  Requires the SERTS image display
	       software.
 Calls       : ***
	ADD_DEVICE, SETFLAG, SETSCALE [1], SETSCALE [2], STORE_INTO_SV
 CALLED BY:
	ASK, CDS_THUMBNAIL, PCL [1], PCL [2], PCLCLOSE [1], PCLCLOSE [2], PCLPLOT [1]
	PCLPLOT [2], PS [1], PS [2], PSCLOSE [1], PSCLOSE [2], PSPLOT [1], PSPLOT [2]
	QMCLOSE [1], QMCLOSE [2], QMPLOT [1], QMPLOT [2], QMS [1], QMS [2], REGIS [1]
	REGIS [2], RESET [2], RESET [3], SELECT_WINDOWS, SUNVIEW [1], SUNVIEW [2], TEK [1]
	TEK [2], TEK [3], TEK4105 [1], TEK4105 [2], TEK4211 [1], TEK4211 [2], TEKMONO [1]
	TEKMONO [2], TVSELECT, TVUNSELECT, WIN [1], WIN [2], XDOC, XWIN [1], XWIN [2], xwin [3]
 Common      : 
	PLOTFILE - Saves system variables for later retrieval.  Not to be used 
	by other routines.
 Restrictions: 
	The procedure will not work correctly unless it is used exclusively to 
	change the plotting device.

	In general, the SERTS graphics devices routines use the special system
	variables !BCOLOR and !ASPECT.  These system variables are defined in
	the procedure DEVICELIB.  It is suggested that the command DEVICELIB be
	placed in the user's IDL_STARTUP file.

 Side effects: 
	Many system variables are manipulated by this routine--in particular
	!P.CHARSIZE and !P.FONT.

	The first time the routine is called for a particular graphics device,
	certain plot parameters may be set to default values.

	Any SETSCALE settings will be lost.

 Category    : 
	Utilities, Devices.
 Prev. Hist. : 
	W.T.T., Sept. 1987.
	William Thompson, February, 1990.
	William Thompson, October, 1991, added !ASPECT system variable.
	William Thompson, November 1992, changed to save !P.NOERASE and
					 !Z.THICK.
 Written     : 
	William Thompson, GSFC, September 1987.
 Modified    : 
	Version 1, William Thompson, GSFC, 27 April 1993.
		Incorporated into CDS library.
	Version 2, William Thompson, GSFC, 14 September 1994
		Added COPY keyword.
	Version 3, William Thompson, GSFC, 21 June 1995
		Added INTERPOLATE keyword.
	Version 4, William Thompson, GSFC, 8 April 1998
		Changed !D.N_COLORS to !D.TABLE_SIZE for 24-bit displays
 Version     : 
	Version 4, 8 April 1998


SETPTS [1] $SSW/gen/idl/image/setpts.pro
[Previous] [Next]
NAME:
       SETPTS
PURPOSE:
       Interactively define reference points in two images.
       These points can be used to calculate a linear transform which maps
       image ima onto the comparison image imb.
       After the points have been entered, image ima is transformed and
       displayed with contours on top of image imb.
CATEGORY:
       Image processing.
CALLING SEQUENCE:
       setpts, p, ima, imr
INPUTS:
       ima = image to be transformed.
       imr = reference image.
             Usually, the lower resolution image is selected to be image ima.
OPTIONAL (KEYWORD) INPUT PARAMETERS:
       plotonly = flag. If this keyword parameter is present, no new points
                  are added to p, but the result of the linear transform is
                  displayed.
       noscale = flag.  If present, the images are displayed unscaled.
       append = flag.  If present, new points are appended to p if p exists
                and contains points.  The default is to discard old points.
       trima = transformed image ima.
       key = transformation type.  See "transtype" keyword in CALTRANS for
             details.  Default is a general linear transform.
OUTPUTS:
       p = array(2,2,*). p(0,0,*) and p(1,0,*) are the x and y coordinates
           of the points in the reference image imb. p(0,1,*) and p(1,1,*)
           are the x and y cordinates of the same points in the image ima.
OPTIONAL (KEYWORD) OUTPUT PARAMETERS:
       trima = transformed version of ima
 CALLS: ***
	CALTRANS, CONGRID [1], CONGRID [2], CONGRID [3]
 CALLED BY:
	SET_MWLT, setpts_roi
COMMON BLOCKS:
       None.
SIDE EFFECTS:
       The program creates a new BIG graphics window.
       After entering the procedure, follow the instructions printed
       on the terminal.
RESTRICTIONS:
       The images have to be 2-dimensional. 
MODIFICATION HISTORY:
       JPW, Nov, 1989.
       JPW, Aug, 1992  most changes from version 1.1 (GLS) adopted
       JPW, Sep, 1992  added the noscale and append flags.
       JPW, Jun, 1994  points plotted also with /plotonly option
                       added key option
       JPW, Nov, 1994  fixed some minor glitches
       T. Metcalf, 2002 Apr 8, Remove the max 512 image size restriction.
                               Should now work with any image size.


setpts_roi $SSW/gen/idl/image/setpts_roi.pro
[Previous] [Next]

function setpts_roi,image_trans,image_ref, $
                   plotonly=plotonly, $
                   noscale=noscale, $
                   append=append, $
                   trima=trima, $
                   key=key, $
                   xvi=xvi,yvi=yvi,xvr=xvr,yvr=yvr, $
                   restrict_fov=restrict_fov
NAME:
     setpts_roi
PURPOSE:
     A front end to the setpts routine which allows a ROI selection on 
     each image.
CATEGORY:
CALLING SEQUENCE:
     pp=setpts_roi(image,ref_image)
INPUTS:
     image = image to be transformed
     ref_image = reference image
OPTIONAL INPUT PARAMETERS:
KEYWORD PARAMETERS
     Same as setpts.pro
OUTPUTS:
     pp vector from setpts
 CALLS: ***
	SETPTS [1], SETPTS [2], wdefroi [1], wdefroi [2], wdefroi [3], wdefroi [4]
 CALLED BY:
	TRACE_MDI_ALIGN
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
PROCEDURE:
MODIFICATION HISTORY:
     T. Metcalf 1996 August 29


SETSCALE [1] $SSW/gen/idl/display/setscale.pro
[Previous] [Next]
 Project     : SOHO - CDS

 Name        : 
	SETSCALE
 Purpose     : 
	Sets plot scale so it is the same in X and Y directions.
 Explanation : 
	The data limits in the X and Y directions (plus 5%) are calculated and
	compared against the the physical size of the plotting area in device
	coordinates.  Whichever scale is larger is then used for both axes, and
	the plot limits are set to center the data in both directions.  The
	parameters !X.STYLE and !Y.STYLE are then set to 1 for exact spacing.
 Use         : 
	SETSCALE				- Resets to previous state.
	SETSCALE, ARRAY				- Calculates scale for CONTOUR.
	SETSCALE, XARRAY, YARRAY		- Calculates scale from arrays.
	SETSCALE, XMIN, XMAX, YMIN, YMAX	- Calculates scale from limits.
 Inputs      : 
	None required.  Calling SETSCALE without any parameters resets to the
	default behavior.
 Opt. Inputs : 
	ARRAY			- Two dimensional array to be used in a simple
				  contour plot.  The minima are set to zero,
				  and the maxima are set to one less than the
				  dimensions of the array.
	XARRAY, YARRAY		- Arrays from which the minimum and maximum
				  values are calculated.
	XMIN, XMAX, YMIN, YMAX	- The limits in the X and Y directions from
				  which the scale is calculated.  The actual
				  X and Y ranges must include these values.
 Outputs     : 
	None.
 Opt. Outputs: 
	None.
 Keywords    : 
	NOBORDER = If set, then the 5% border is not applied.
	NOADJUST = If set, then the edges of the plot (!P.POSITION) are
		   not modified. 
	CHARSIZE = Character size to take into account when calculating plot
		   size.
 Calls       : ***
	GET_VIEWPORT [1], GET_VIEWPORT [2], REVERSE
 CALLED BY:
	PLOT_IMAGE, SETPLOT [1], SETPLOT [2], SETVIEW [1], SETVIEW [2], SETWINDOW [1]
	SETWINDOW [2]
 Common      : 
	SETSCALE = Keeps track of the system variables changed by this routine.
 Restrictions: 
	Unpredictable results may occur if SETSCALE is in effect when WINDOW,
	WSET or SET_PLOT are called.  It is recommended that SETSCALE be called
	without parameters to reset to the ordinary behavior before the
	graphics device or window is changed.

	In general, the SERTS graphics devices routines use the special system
	variables !BCOLOR and !ASPECT.  These system variables are defined in
	the procedure DEVICELIB.  It is suggested that the command DEVICELIB be
	placed in the user's IDL_STARTUP file.

 Side effects: 
	The system variables !X.STYLE, !Y.STYLE, !X.S, !Y.S, !X.RANGE (!XMIN
	and !XMAX) and !Y.RANGE (!YMIN and !YMAX) are modified.

	Unless NOADJUST is set, the edges of the plot (!P.POSITION) are
	adjusted to fit the data.  Then, when SETSCALE is called without any
	parameters, these parameters are returned to their original settings.

	System variables may be changed even if the routine exits with an error
	message.

	If SETSCALE is called without any parameters, then the modified system
	variables are restored to their original values.  Additional graphics
	functions such as OPLOT will still be possible.

 Category    : 
	Utilities, Devices.
 Prev. Hist. : 
	William Thompson, Feb. 1991.
	William Thompson, Oct. 1991, added !ASPECT system variable.
	William Thompson, May  1992, added common block and changing viewport.
	William Thompson, Nov. 1992, changed structure of common block, and
		removed support for changing viewport.
	William Thompson, Nov. 1992, changed to use GET_VIEWPORT instead of
		INIT_SC1_SC4, and to restore original !P.POSITION when called
		with no parameters.
	William Thompson, December 1992, changed common block to keep better
		track of the state of the system variables.
 Written     : 
	William Thompson, GSFC, February 1991.
 Modified    : 
	Version 1, William Thompson, 27 April 1993.
		Incorporated into CDS library.
	Version 2, William Thompson, GSFC, 8 October 1996
		Added keyword CHARSIZE
	Version 3, 14-May-2001, William Thompson, GSFC
		Use modern system variables.
 Version     : 
	Version 3, 14-May-2001


setssw_windows $SSW/gen/idl/ssw_system/setssw_windows.pro
[Previous] [Next]
   Name: setssw_windows

   Purpose: Emulate script SETSSW for window
               Executes any _paths or _env files, then creates path.

   Input Parameters:
               required instruments selected by keyword....
   Calling Examples:

               setssw_windows,/trace,/sxt

   Calls: ***
	ADD_TAG [1], ADD_TAG [2], ARR2STR [1], Arr2Str [2], BOX_MESSAGE, STR2ARR [1]
	STR2ARR [2], STR_SEP, UNIQ [1], UNIQ [2], UNIQ [3], get_logenv [1], get_logenv [2]
	main_execute [1], main_execute [2], set_logenv [1], set_logenv [2], ssw_path
 CALLED BY:
	ssw_setup_windows
   Restrictions:
       WINDOWS only
   History:
        1-Jun-1999 (RDB) - Created
        3-Jun-1999 (SLF) - renamed setssw.pro->setssw_windows.pro
       29-Mar-2000 (RDB) - do site env. after instrument at instrument level
        8-May-2000 (RDB) - add ucon dirs to path if yohkoh included
                           execute instrument and personal IDL_STARTUP files
       12-May-2000 (rdb) - moved setup.ssw_paths into ssw_seup_windows
                           forther refinements on startups
       16-May-2000 (rdb) - use env. var. SSW_INSTR if keyword set
       30-Jun-2000 (rdb) - check if common block variables defined - error if not
       27-Jul-2000 (rdb) - also execute setup.xxx; use $SSW_SITE for $SSW/site
       15-Jan-2004 (WTT) - Allow files ending in "_win" to replace standard
                           files in Windows.


SETUT [1] $SSW/gen/idl/utplot/setut.pro
[Previous] [Next]
 NAME:
	SETUT
 PURPOSE:
	Set base,start, or end time in common UTCOMMON.
	SETUTBASE, SETUTSTART, and SETUTEND are all implemented through
	SETUT as in SETUTBASE,'UTSTRING'.
	When using UTPLOT, UTPLOT_IO, or OUTPLOT command, X array is
	assumed to be in seconds relative to the base time.
 CALLED BY:
	BATSE_ONTIMES, DCFREAD, EDITOC, FIND_DBFILE, FLISTOC, FSOC, FSPLOT, FS_ARCHIVE_RW
	FS_GRAPH, GFITS_R, PLOT_FLARE, QLDISPLAY, RATESDUMPOC, RAWDUMPOC, SETUTBASE [1]
	SETUTBASE [2], SETUTEND [1], SETUTEND [2], SETUTSTART [1], SETUTSTART [2]
	SET_UTPLOT [1], SET_UTPLOT [2], SPEX_COMMONS [2], SPEX_COMMONS [4]
	SPEX_PROC [1], SPEX_PROC [2], plotman, t_utplot [1], t_utplot [2]
       Note: UTBASE, UTSTART, and UTEND are in common UTCOMMON and can
	also be set directly (double precision seconds relative to
	79/1/1, 00:00).
	Can also be used to call SET_UTPLOT which creates !x.tickv and
	!x.tickname.
 CATEGORY:

 CALLING SEQUENCE:
	SETUT, UTBASE=BASE, UTSTART=START, UTEND=END, ERROR=ERROR, $
		SET_UTPLOT=SET

 INPUT PARAMETERS:
	BASE, START, or END - ASCII string in format YY/MM/DD,HHMM:SS.XXX.
	   Sets UTBASE, UTSTART, or UTEND variables in common UTCOMMON to the
	   number of seconds since 79/1/1, 0000.
 	   Partial strings are allowed.  If the date is omitted, the last date
	   passed (for base, start, or end time) is used.
	   For example, if the string '88/3/4,1230' had already been passed:
	   '1200'      means 88/3/4,1200
	   '01'        means 88/3/4,0001        (1 minute into the day)
	   '01:2'      means 88/3/4,0001:02.000 (1 min., 2 sec into day)
          '1200:20.1' means 88/3/4,1200:20.100 (20.100 sec. after 12)
	ERROR - 0/1 indicates no error/error in converting ASCII time to
	   double precision seconds.
	SET_UTPLOT - if 1 and START and END are set then SET_UTPLOT is called
	for those values, remembered in subsequent calls.
		   - if 0 then SET_UTPLOT is not called or subsequently.

 OUTPUTS:
	None.
 OPTIONAL OUTPUT PARAMETERS:
	None.

 CALLS: ***
	ATIME [1], ATIME [2], CHECKVAR [1], SET_UTPLOT [1], SET_UTPLOT [2], checkvar [2]
	utplot_UTIME [1], utplot_UTIME [2]
 COMMON BLOCKS:
	COMMON UTCOMMON, UTBASE, UTSTART, UTEND = base, start, and
	end time for X axis in double precision variables containing
	seconds since 79/1/1, 00:00.
	COMMON LASTDATECOM, LASTDATE = YY/MM/DD string for last entry
	into SETUT
	COMMON SETCOMMON, SETPLOT

 SIDE EFFECTS:
	UTXXXX in common UTCOMMON is set to time passed in string translated
	into a double precision floating point value representing the time
	in seconds since 79/1/1, 00:00.  Function ATIME can be used to
	display this time as an ASCII string.  If switch SET_UTPLOT is used
	then the procedure SET_UTPLOT is called with the new values of
	UTBASE, UTSTART, and UTEND.

 RESTRICTIONS:
	Times must be between 79/1/1 and 99/1/1.  A base time must be set before
	plotting with UTPLOT (or UTPLOT_IO), however the easiest ways to set it
	are either in the calling arguments to UTPLOT (or UTPLOT_IO) or by
	letting UTPLOT (or UTPLOT_IO) prompt for it.

 PROCEDURE:
	Keyword parameters are used to route the input string(s) to their
	proper variable in UTCOMMON.
	UTIME is called to translate UTSTRING to epoch day and msec,
	UTBASE is epoch day * 86400 + msec/1000 from 79/1/1

 MODIFICATION HISTORY:
	Written by Kim Tolbert, 4/88
	Modified for IDL Version 2 by Richard Schwartz, 2/91
	Keyword SET_UTPLOT added 9/91
	Corrections and new comments added 10/91 by RS.
	Modified to accept Yohkoh time format, 6/93 by ras.
   Modified by Kim, 12/3/99. Init utstring1 to '' before reading into it.


SETUTBASE [1] $SSW/gen/idl/utplot/setutbase.pro
[Previous] [Next]
 Project:
	SDAC    
 NAME: 
	SETUTBASE
 Category:
	UTPLOT, TIME
 Calls: ***
	CHECKVAR [1], SETUT [1], SETUT [2], checkvar [2]
 PURPOSE: 
	Set UTBASE variable in common UTCOMMON to the number of seconds
  	   since 79/1/1, 0000 represented by the ASCII string passed as an 
	   argument.
 CALLING SEQUENCE:
	SETUTBASE,UTSTRING,ERROR=ERROR
 INPUT PARAMETERS:
	UTSTRING - string in YY/MM/DD, HHMM:SS.XXX format to be converted
	   to internal representation and stored in UTCOMMON variable UTBASE.
 KEYWORDS:
	ERROR - 0/1 indicates no error/error in converting UTSTRING
 CALLED BY:
	CONT_READ, DISCSP_READ, EVAL_SHERB, FDBREAD, FS_ACC_CONT, FS_ACC_DISCSP, FS_GEN_ARR
	FS_GRAPH, HXARCHIVE, HXFITS, PLOTBATSE_QL, PLOTFIT, PLOT_OCCS, PLOT_OCC_ONDAY
	QL_DAY_PLOT, QL_ORBIT_PLOT, READ_DISCLA, SC4TREAD, SET_UTPLOT [1], SET_UTPLOT [2]
	SPEX_COMMONS [2], SPEX_COMMONS [4], SPEX_PLOT_SAVED [1], SPEX_PLOT_SAVED [2]
	SPEX_PROC [1], SPEX_PROC [2], Show Image [1], Show Image [2], Show Image [3]
	plotfda, read_batse_4_spex [1], read_batse_4_spex [2], t_utplot [1]
	t_utplot [2]
 PROCEDURE:
	Calls SETUT.  See SETUT.PRO program description.
 MODIFICATION HISTORY:
	Written by Richard Schwartz, Feb. 1991


SETUTEND [1] $SSW/gen/idl/utplot/setutend.pro
[Previous] [Next]
 NAME: 
	SETUTEND
 PURPOSE: 
	Set UTEND variable in common UTCOMMON to the number of seconds
  	   since 79/1/1, 0000 represented by the ASCII string passed as an 
	   argument.
 CALLING SEQUENCE:
	SETUTEND,UTSTRING,ERROR=ERROR
 INPUT PARAMETERS:
	UTSTRING - string in YY/MM/DD, HHMM:SS.XXX format to be converted
	   to internal representation and stored in UTCOMMON variable UTEND.
	ERROR - 0/1 indicates no error/error in converting UTSTRING
 CALLS: ***
	CHECKVAR [1], SETUT [1], SETUT [2], checkvar [2]
 CALLED BY:
	CONT_READ, DISCSP_READ, FDBREAD, QL_DAY_PLOT, QL_ORBIT_PLOT, READ_DISCLA
 PROCEDURE:
	Calls SETUT.  See SETUT.PRO program description.
 MODIFICATION HISTORY:
	Written by Richard Schwartz, Feb. 1991


SETUTSTART [1] $SSW/gen/idl/utplot/setutstart.pro
[Previous] [Next]
 NAME: 
	SETUTSTART
 PURPOSE: 
	Set UTSTART variable in common UTCOMMON to the number of seconds
  	   since 79/1/1, 0000 represented by the ASCII string passed as an 
	   argument.
 CALLING SEQUENCE:
	SETUTSTART,UTSTRING,ERROR=ERROR
 INPUT PARAMETERS:
	UTSTRING - string in YY/MM/DD, HHMM:SS.XXX format to be converted
	   to internal representation and stored in UTCOMMON variable UTSTART.
	ERROR - 0/1 indicates no error/error in converting UTSTRING
 CALLS: ***
	CHECKVAR [1], SETUT [1], SETUT [2], checkvar [2]
 CALLED BY:
	CONT_READ, DISCSP_READ, FDBREAD, QL_DAY_PLOT, QL_ORBIT_PLOT, READ_DISCLA
 PROCEDURE:
	Calls SETUT.  See SETUT.PRO program description.
 MODIFICATION HISTORY:
	Written by Richard Schwartz, Feb. 1991


SETVIEW [1] $SSW/gen/idl/display/setview.pro
[Previous] [Next]
 Project     : SOHO - CDS

 Name        : 
	SETVIEW
 Purpose     : 
	Switch between several plots on one page.
 Explanation : 
	SETVIEW modifies the viewport parameters !P.POSITION to allow several
	plots on one page, arranged horizontally and/or vertically.

	Calling SETVIEW with nontrivial parameters also sets !P.NOERASE to 1.
	New plots must be started with an explicit ERASE command.
 
	Calling SETVIEW without any parameters, or IX,NX and IY,NY all equal
	to 1 resets the viewport, and sets !P.NOERASE to 0.

	Recalling SETVIEW with the same parameters as before will restore the
	system variables associated with that setting.  This allows the user to
	switch between several plots without losing the scaling information
	associated with each.  Note that when switching between windows that
	both WSET and SETVIEW must be called each time for this to work.
	Alternatively, SETWINDOW can be used to switch between windows.
 
 Use         : 
	SETVIEW  [, IX, NX  [, IY, NY  [, SX  [, SY ]]]]
 Inputs      : 
	None required.  Calling SETVIEW without any parameters resets to the
	default behavior.
 Opt. Inputs : 
	IX, NX	= Relative position along X axis, expressed as position IX
		  out of a possible NX, from left to right.  If not passed,
		  then 1,1 is assumed. 
	IY, NY	= Relative position along Y axis, from top to bottom.  If
		  not passed, then 1,1 is assumed. 
	SX	= Multiplication factor for space between plots in X 
		  direction.  A value of SX between 0 and 1 decreases the 
		  amount of space between plots, a value greater than 1 
		  increases the amount of space.  If not passed, then 1 is 
		  assumed.
	SY	= Multiplication factor for space between plots in Y 
		  direction.  If not passed, then 1 is assumed.
 Outputs     : 
	None.
 Opt. Outputs: 
	None.
 Keywords    : 
	None.
 Calls       : ***
	ADD_VIEWPORT, SETSCALE [1], SETSCALE [2], TRIM
 CALLED BY:
	AN_NIMCP, AN_NIMCP_1_2, AN_NIMCP_AVG, CDS_SNAPSHOT, NIS_AVG_SPECT_DEMO
	SHOW_SYNOPTIC
 Common      : 
	VIEWPORT  = Contains data to maintain information about the viewports
		    as a function of graphics device and window.
 Restrictions: 
	IX must be between 1 and NX.  IY must be between 1 and NY.

	SX and SY must not be negative.

	This routine must be called separately for each graphics device.

	In general, the SERTS graphics devices routines use the special system
	variables !BCOLOR and !ASPECT.  These system variables are defined in
	the procedure DEVICELIB.  It is suggested that the command DEVICELIB be
	placed in the user's IDL_STARTUP file.

 Side effects: 
	The system variable !P.NOERASE is changed.

	Any SETSCALE settings will be lost.

 Category    : 
	Utilities, Devices.
 Prev. Hist. : 
	William Thompson	Applied Research Corporation
	September, 1988		8201 Corporate Drive
				Landover, MD  20785

	William Thompson, Nov 1992, changed common block to allow system
				    variables to be saved between multiple
				    plots.  Also added call to disable
				    possible SETSCALE settings.
 Written     : 
	William Thompson, GSFC, September 1988.
 Modified    : 
	Version 1, William Thompson, GSFC, 27 April 1993
		Incorporated into CDS library.
	Version 2, William Thompson, GSFC, 4 January 1994
		Fixed bug where original state was not being completely
		restored.
	Version 3, William Thompson, GSFC, 19 August 1996
		Removed requirement that IX, NX, IY, NY be integer.
	Version 4, William Thompson, GSFC, 30 January 1997
		Fixed bug involving resizing windows.
	Version 5, 05-Apr-1999, William Thompson, GSFC
		Modified to properly manipulate !P.POSITION
 Version     : 
	Version 5, 05-Apr-1999


SETWINDOW [1] $SSW/gen/idl/display/setwindow.pro
[Previous] [Next]
 Project     :	SOHO - CDS

 Name        :	SETWINDOW

 Purpose     :	Switch between windows, retaining parameters for each.

 Explanation :	SETWINDOW stores the plot parameters for the current window in
		a common block, switches to the desired window, and restores
		the plot parameters from the last time that window was used.

 Use         :	SETWINDOW  [, WINDOW ]

 Inputs      :	None required.

 Opt. Inputs :	WINDOW	= Number of window to switch to.  If not passed, then
		the parameters for the current window are saved.

 Outputs     :	None.

 Opt. Outputs:	None.

 Keywords    :	SHOW	= If set, then call WSHOW.

		RESTORE	= If set, then restore the saved parameters for the
			  target window without saving the parameters for the
			  current window.

 Calls       : ***
	ADD_WINDOW, SETSCALE [1], SETSCALE [2], TRIM
 CALLED BY:
	CDS_ENG_N1_VW, DSPEXP, DSPWAV, EIS_IMAGE_TOOL [1], EIS_IMAGE_TOOL [2]
	EIS_IMAGE_TOOL_EVENT [1], EIS_IMAGE_TOOL_EVENT [2], EIS_ITOOL_PTOOL [1]
	EIS_ITOOL_PTOOL [2], EIS_ITOOL_ZOOMINOUT [1], EIS_ITOOL_ZOOMINOUT [2]
	EIS_LOAD_IMAGE [1], EIS_LOAD_IMAGE [2], GDSPSPEC, IMAGE_TOOL, IMAGE_TOOL_EVENT
	ITOOL_DISP_ROT, ITOOL_DRAW, ITOOL_DRAW_ICON, ITOOL_LIMBFITTER, ITOOL_LOAD_IMAGE
	ITOOL_OVERLAYER, ITOOL_PTOOL, ITOOL_ZOOMINOUT, ITOOL_ZOOMMER, LOCATE_FFCAL
	MAKE_AUTO_FIT, MAKE_MANUAL_FIT, MK_LIMBFIT_BS, MK_POINT_BASE, MK_SOHO, NDSPSPEC
	PQLPROFILE, PQLZOOM, PRESTORE, PTEST, SET_SERTSW, TLB_PLACE, TVPROFILE, TVSELECT
	TVUNSELECT, UPDATE_FITLIMB, WDISPLAY, XCDS_SNAPSHOT, XCOR_CDS
 Common      :	SETWINDOW = Contains WINDOWS, and the structure SAVE which
			    contains the graphics system variables.

 Restrictions:	WINDOW must be a valid, existing window.

		Creating a new window with the WINDOW command will also switch
		to that window.  To save the settings for the current window,
		call SETWINDOW before calling WINDOW.

		In general, the SERTS graphics devices routines use the special
		system variables !BCOLOR and !ASPECT.  These system variables
		are defined in the procedure DEVICELIB.  It is suggested that
		the command DEVICELIB be placed in the user's IDL_STARTUP file.

 Side effects:	Certain system variables from the previous time the window was
		used are recalled.

		Any SETSCALE settings will be lost.

 Category    :	Utilities, Devices.

 Prev. Hist. :	William Thompson	Applied Research Corporation
		November, 1992		8201 Corporate Drive
					Landover, MD  20785

 Written     :	William Thompson, GSFC, November 1992.

 Modified    :	Version 1, William Thompson, GSFC, 27 April 1993.
			Incorporated into CDS library.
		Version 1.1, Dominic Zarro, (ARC/GFSC), 15 December 1994.
		        Added WSHOW
		Version 2, Zarro, GSFC, 24 Feb 1997
		        Added check for whether target window is open
		Version 3, 04-Oct-1999, William Thompson, GSFC
			Added keyword RESTORE.

 Version     :	Version 3, 04-Oct-1999


SFIT_XY $SSW/gen/idl/fitting/sfit_xy.pro
[Previous] [Next]
 NAME:
	SFIT_XY

 PURPOSE:
	Polynomial fit to a surface on non-uniform grids. 

 CATEGORY:
	Curve and surface fitting.

 CALLING SEQUENCE:
	Result = SFIT_XY(Data, Degree_X [ , Degree_Y, X=X, Y=Y, KX=Kx ] )

 INPUTS:
 	Data:	The array of data to fit. The sizes of the dimensions may 
               be unequal.

	Degree_x: The degree of fit in the X dimension

	Degree_y: The degree of fit in the Y dimension (def.: Degree_x)

 OUTPUT:
	This function returns a fitted array.

 OUTPUT KEYWORDS:
       X,Y:    array of coordinates

 OUTPUT KEYWORDS:
	Kx:	The array of coefficients for a polynomial function
		of x and y to fit data.
		This parameter is returned as a (Degree+1) by (Degree+1) 
		element array.

 PROCEDURE:
 	Fit a 2D array Z as a polynomial function of x and y.
 	The function fitted is:
  	    F(x,y) = Sum over i and j of kx(j,i) * x^i * y^j
 	where kx is returned as a keyword.

 MODIFICATION HISTORY:
	July, 1998, V. Andretta: Modified from SFIT


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

 PURPOSE: Return the sign of the argument. 
	   If the argument is zero, return zero.

 CALLING SEQUENCE:  out=sgn(in)

 PARAMETERS:
		in	input number
		out	-/0/+

 RETURN TYPE: INTEGER                               

 CALLED BY:
	XCROP_CUBE, bcs_spec, fovc2corn_cmd, mdipdist, mk_sfd [1], mk_sfd [2], mk_sfd [3]
	mk_sfd [4]
 HISTORY: Drafted by A.McAllister, Feb. 1993.


SHIFT_IMG $SSW/gen/idl/image/shift_img.pro
[Previous] [Next]

function shift_img,data,shifts,missing=missing, $
                   xscale=xscalein,yscale=yscalein, $
                   rot12=rot12in,anchor=anchorin

NAME:
     SHIFT_IMG
PURPOSE:
     Shift images in a data cube with optional scale and rotation. 
CATEGORY:
CALLING SEQUENCE:
     outdata = shift_img(data,shifts)
INPUTS:
     data = image data cube (or a single image)
     shifts = array of x and y pixel shifts: fltarr(2,nimages).  A
              positive value for the shifts moves the image up and
              right. 
OPTIONAL INPUT PARAMETERS:
KEYWORD PARAMETERS
     missing = value for array for areas that shift out of the FOV
               (def = 0)
     xscale, yscale = scale change for images: fltarr(nimages). (def = 1.0)
     rot = rotation for images, CCW in degrees: fltarr(nimages). (def = 0.0)
     anchor = center of rotation [x,y]: fltarr(2,nimages). 
              (def = center of image) 
OUTPUTS:
     outdata = array of shifted images, same size as data
 CALLS: ***
	RSS2PQ
 CALLED BY:
	TRACE_ALIGN_CUBE, TR_GET_DISP [1]
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
PROCEDURE:
     Uses rss2pq to define the transformation and poly_2d to do the
     shifting.
EXAMPLE:
     Here is an example of making a dejittered TRACE movie:
        itref = 0
        itrace = trace_cube_pointing(tindex,tdata,itref) ; correct pointing
        xscale = tindex[itref].cdelt1/tindex.cdelt1
        yscale = tindex[itref].cdelt2/tindex.cdelt2
        xshift0 = ((tindex.naxis1-1)-(tindex[itref].naxis1-1)*xscale)/2.
        yshift0 = ((tindex.naxis2-1)-(tindex[itref].naxis2-1)*yscale)/2.
        xshift = -xshift0 - (tindex[itref].xcen-tindex.xcen)/tindex.cdelt1
        yshift = -yshift0 - (tindex[itref].ycen-tindex.ycen)/tindex.cdelt2
        shifts = transpose([[xshift],[yshift]])
        dnew = shift_img(tdata,shifts) ; dejittered data cube
      This example does not correct for solar rotation and the
      pointing in the index structure will not apply to the shifted data.
MODIFICATION HISTORY:
     T. Metcalf 2003-07-29


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

 Name        : SHIFT_MAP

 Purpose     : shift an image map 

 Category    : imaging

 Explanation : translate a map in x- and y-directions by moving
               it's centroid

 Syntax      : smap=shift_map(map,sx,sy)
;
 Inputs      : MAP = image map structure
               SX,SY = shift values in x- and y- directions (+W, +N)

 Outputs     : SMAP = shifted map

 Opt. Outputs: None

 Keywords    : XC = new X-center (ignored if SX entered)
               YC = new Y-center (ignored if SY entered)

 CALLS: ***
	COPY_VAR, EXIST, GET_MAP_PROP, HAVE_TAG, PR_SYNTAX, VALID_MAP
 CALLED BY:
	DROT_MAP_FAST
 History     : Written 12 May 1998, D. Zarro, SAC/GSFC
               Modified 22 March 2000, Zarro (SM&A/GSFC) -- added
               check for ROLL_CENTER

 Contact     : dzarro@solar.stanford.edu


SHOW3 $SSW/gen/idl/display/show3.pro
[Previous] [Next]
 NAME:
	SHOW3

 PURPOSE:
	Show a 2D array three ways in a display that combines SURFACE,
	CONTOUR, and an image (color/gray scale pixels).

 CATEGORY:
	Display, graphics.

 CALLING SEQUENCE:
	SHOW3, Image [, INTERP = Interp, SSCALE = Sscale]

 INPUTS:
	Image:	The 2-dimensional array to display.

 OPTIONAL INPUTS:
	X = a vector containing the X values of each column of Image.
		If omitted, columns have X values 0, 1, ..., Ncolumns-1.
	Y = a vector containing the Y values of each row of Image.
		If omitted, columns have Y values 0, 1, ..., Nrows-1.
 KEYWORD PARAMETERS:
	INTERP:	Set this keyword to use bilinear interpolation on the pixel
		display.  This technique is slightly slower, but for small
		images, it makes a better display.

	SSCALE:	Reduction scale for surface. The default is 1.  If this
		keyword is set to a value other than 1, the array size
		is reduced by this factor for the surface display.  That is,
		the number of points used to draw the wire-mesh surface is
		reduced.  If the array dimensions are not an integral multiple
		of SSCALE, the image is reduced to the next smaller multiple.
	E_CONTOUR: a structure containing additional keyword parameters
		that are passed to the CONTOUR procedure.  See the example
		below.
	E_SURFACE: a structure containing additional keyword parameters
		that are passed to the SURFACE procedure.  See the example
		below.
	BOTTOM: lowermost color index to use (default=0)
	TOP: highest color index to use (default=!d.table_size-1)

 OUTPUTS:
	No explicit outputs.

 CALLS: ***
	EXIST, POLYWARP
 CALLED BY:
	PLOT_MAP
 COMMON BLOCKS:
	None.

 SIDE EFFECTS:
	A new plot is generated.

 RESTRICTIONS:
	The display gets too "busy" when displaying larger (say 50 by 50),
	images, especially if they are noisy.  It can be helpful to use
	the SSCALE keyword or the SMOOTH and/or REBIN functions to smooth the
	surface plot.

	You might want to modify the calls to CONTOUR and SURFACE slightly
	to customize the display to your tastes, i.e., with different colors,
	skirts, linestyles, contour levels, etc.

 PROCEDURE:
	First, do a SURFACE with no data to establish the 3D to 2D scaling.
	Then convert the coordinates of the corner pixels of the array to
	2D.  Use POLYWARP to get the warping polynomial to warp the
	2D image into the area underneath the SURFACE plot.  Output the image,
	output the surface (with data) and then output the contour plot at
	the top (z=1).

 EXAMPLES:
	A = BESELJ(SHIFT(DIST(30,20), 15, 10)/2.,0)  ;Array for example
	SHOW3, A		;Show it with default display.
	SHOW3, A, SQRT(FINDGEN(30))  ;Make X axis proportional to sqrt
	SHOW3, A, E_CONTOUR={C_CHARSIZE:2, DONW:1} ;Label CONTOUR lines with
		double size characters, and include downhill tick marks.
	SHOW3, A, E_SURFACE={SKIRT:-1, ZRANGE:[-2,2]}  ;Draw a surface with
		a skirt and scale Z axis from -2 to 2.
 MODIFICATION HISTORY:
	DMS. Jan, 1988.
	Added fudges for PostScript, April, 1988.
	Fixed bug where contour plot was occasionally clipped. Dec, 1990.
	Added optional axis variables, and _EXTRA keywords for CONTOUR,
		and SURFACE.  Jan, 1996.
	DD.  Added code to ignore !ORDER for the TV of the image.  Mar 1997.
       SJL  Fixed bug from scaling with polywarp. July, 1998.
	Kim Tolbert, 1-Oct-2000.  Added bottom and top keywords for colors


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

 Name        : 
	SHOW_COLORS
 Purpose     : 
	Displays the current color table.
 Explanation : 
	The color tables are read using TVLCT,/GET.  Each color table (red,
	green and blue) is plotted with a different value of !P.COLOR, and then
	the color tables are modified so that the red color table is plotted in
	red, etc.  The background (color 0) is changed to black, and the axes
	(color 4) are changed to white.
 Use         : 
	SHOW_COLORS
 Inputs      : 
	None.
 Opt. Inputs : 
	None.
 Outputs     : 
	None.
 Opt. Outputs: 
	None.
 Keywords    : 
	DISABLE  = If set, then TVSELECT not used.
 Calls       : ***
	LINECOLOR, TVSELECT, TVUNSELECT
 Common      : 
	None.
 Restrictions: 
	The plotting device must have at least five available colors, and be
	able to load color tables.

	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 first five colors (0-4) in the color table are changed after
	plotting, so that the red color table is plotted in red, etc.
 Category    : 
	Utilities, Image_display.
 Prev. Hist. : 
	William Thompson, April 1992, changed to use TVLCT,/GET instead of
				      common block, and added DISABLE keyword.
 Written     : 
	William Thompson, GSFC.
 Modified    : 
	Version 1, William Thompson, GSFC, 12 May 1993.
		Incorporated into CDS library.
	Version 2, William Thompson, GSFC, 27 July 1994
		Rewrote not to use PLOTC or OPLOTC.
	Version 3, William Thompson, GSFC, 18 December 2002
		Changed !COLOR to !P.COLOR
 Version     : 
	Version 3, 18 December 2002


SHOW_FITS_HDR $SSW/gen/idl/fits/show_fits_hdr.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : SHOW_FITS_HDR
               
 Purpose     : Display a CDS FITS file header.
               
 Explanation : Reads header from a CDS FITS file and copies to the screen
               and/or hardcopy
               
 Use         : IDL> show_fits_hdr,filename [,parameter,header=header,$
                                                       extension=extension,$
                                                       /hardcopy,/keep,
                                                       /outfile,/quiet]
    
 Inputs      : filename - name of FITS file to read, can be an array as
                          returned by eg. FINDFILE.
               
 Opt. Inputs : parameter - if given then show only that parameter, can be 
                           a string array of parameter names.

               outfile   - file(s) to which to send output. If given, must
                           same dimension as input filenames
               
 Outputs     : Listing is sent to screen and/or hardcopy file.
               
 Opt. Outputs: header    - returns a string array with the header contents
               
 Keywords    : HARDCOPY - listing is sent to printer
               KEEP     - listing is sent to disk file and not deleted.
                          Default name is filename.hdr in home directory 
                          unless output file is specified.
               QUIET    - output to screen is suppressed.
               EXTEN    - specify the FITS extension to read

 Calls       : ***
	BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CONCAT_DIR [1], CONCAT_DIR [2]
	CONCAT_DIR [3], DELETE_FILE [1], DELETE_FILE [2], FILEPATH, FILE_EXIST [2]
	HEADFITS [1], HEADFITS [2], HEADFITS [3], PRINT_STR, REM_DUP [1], REM_DUP [2]
	REM_DUP [3], STR_PICK, break_file [4], concat_dir [4], file_exist [1]
	file_exist [3]
 Common      : None
               
 Restrictions: None
               
 Side effects: None
               
 Category    : FITS
               
 Prev. Hist. : None

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

 Version     : Version 1, 6-Jul-95


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

 Name        :	SHOW_MOVIE

 Purpose     :	Uses XINTERANIMATE to show a movie.

 Category    :	Class1, Animation

 Explanation :	This is a simple routine to display a movie using
		XINTERANIMATE.  It's meant to stand alone, without the need of
		any other routines except those in the standard IDL
		distribution.

 Syntax      :	SHOW_MOVIE, IMAGES  [, RATE ]

 Examples    :	

 Inputs      :	IMAGES	= Three dimensional array of images, with the
			  dimensions (NX, NY, N_FRAMES)

 Opt. Inputs :	RATE	= Optional rate of display.  The rate is a value
			  between 0 and 100 that gives the speed that the
			  animation is displayed.  The fastest animation is
			  with a value of 100 and the slowest is with a value
			  of 0.  The default value is 100 if not specified.

 Outputs     :	None.

 Opt. Outputs:	None.

 Keywords    :	NOSCALE	= If set, then the images are not scaled before
			  displaying.

 Calls       : ***
	XINTERANIMATE
 Common      :	None.

 Restrictions:	None.

 Side effects:	None.

 Prev. Hist. :	None.

 History     :	Version 1, 02-May-1997, William Thompson, GSFC

 Contact     :	WTHOMPSON


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

   Purpose: dipslay processed images saved with mk_pix.pro

   Calling Sequence: 
      show_pix 
      Widget version - file selection is intuitive now (?)
      show_pix, lastfile=lastfile 	; return last path/filename selected

 CALLS: ***
	BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CONCAT_DIR [1], CONCAT_DIR [2]
	CONCAT_DIR [3], EVENT_NAME, FILE_EXIST [2], GET_WUVALUE, GET_WVALUE, POPD, PUSHD
	STR_LASTPOS [1], WDEF [1], WDEF [2], XLOADCT [1], XLOADCT [2], XLOADCT [3], XMANAGER
	XMENU [1], XMENU [2], XMOVIE [1], XMOVIE [2], break_file [4], concat_dir [4]
	curdir [1], curdir [2], data_chk [1], data_chk [2], deriv_arr [1], deriv_arr [2]
	file_exist [1], file_exist [3], file_list [1], file_list [2], get_infox
	get_logenv [1], get_logenv [2], get_subdirs [1], get_subdirs [2], get_xfont [1]
	get_xfont [2], mapx [1], mapx [2], restgen [1], restgen [2], show_pix_event [1]
	show_pix_event [2], show_pix_event [3], str_lastpos [2], str_replace [1]
	str_replace [2], uniqo [1], uniqo [2], ut_time [1], ut_time [2], wc_where [1]
	wc_where [2]
 CALLED BY:
	get_pix
   History:
      7-Nov-1993 (SLF) Written for mercury picture display
     10-Nov-1993 (SLF) allow r,g,b parameters, auto size window if too small
     20-Dec-1993 (SLF) widgitized, some new features
      4-Jan-1993 (GAL) replaced call to concat_dir with get_subdirs 
			to correct a noted bug when run on the SGI.
     17-Mar-1994 (SLF) use DIR_GEN_SHOWPIX if site not defined
	                (forward/backward compatibility?)
     13-Apr-1994 (SLF) eliminate subdirectory keywords from documentation
     31-May-1994 (DMZ) added VMS patch
      8-Jun-1994 (SLF) limit number files displayed (scroll function)
     22-Jul-1994 (SLF) add LASTFILE keyword, common block show_pix_blk
     14-sep-1994 (SLF) minor mods / protect against environmental naming ...
      9-Nov-1994 (SLF) list files in reverse chronological order (UNIX)
     20-dec-1994 (SLF) fix for unix shortcoming under sgi (arg list too long)
     26-mar-1995 (slf) call get_xfont to get fixed font (allow tables)
     12-mar-1996 (slf) combine merge show_pix_event->show_pix


show_pix [2] $SSW/gen/idl_fix/soft/old220/show_pix.pro
[Previous] [Next]
   Name: show_pix

   Purpose: dipslay processed images saved with mk_pix.pro

   Calling Sequence: 
      show_pix [/merc, /moon, /misc]
      Widget version - file selection is intuitive now (?)

 CALLS: ***
	BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CONCAT_DIR [1], CONCAT_DIR [2]
	CONCAT_DIR [3], EVENT_NAME, FILE_EXIST [2], GET_WUVALUE, GET_WVALUE, POPD, PUSHD
	STR_LASTPOS [1], WDEF [1], WDEF [2], XLOADCT [1], XLOADCT [2], XLOADCT [3], XMANAGER
	XMENU [1], XMENU [2], XMOVIE [1], XMOVIE [2], break_file [4], concat_dir [4]
	curdir [1], curdir [2], data_chk [1], data_chk [2], deriv_arr [1], deriv_arr [2]
	file_exist [1], file_exist [3], file_list [1], file_list [2], get_infox
	get_logenv [1], get_logenv [2], get_subdirs [1], get_subdirs [2], get_xfont [1]
	get_xfont [2], mapx [1], mapx [2], restgen [1], restgen [2], show_pix_event [1]
	show_pix_event [2], show_pix_event [3], str_lastpos [2], str_replace [1]
	str_replace [2], uniqo [1], uniqo [2], ut_time [1], ut_time [2], wc_where [1]
	wc_where [2]
 CALLED BY:
	get_pix
   History:
      7-Nov-1993 (SLF) Written for mercury picture display
     10-Nov-1993 (SLF) allow r,g,b parameters, auto size window if too small
     20-Dec-1993 (SLF) widgitized, some new features


show_pix_event [1] $SSW/gen/idl_fix/soft/old220/show_pix_event.pro
[Previous] [Next]
   Name: show_pix_event

   Purpose: event driver for xshow_pix

 CALLS: ***
	BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], EVENT_NAME, GET_WUVALUE
	GET_WVALUE, WDEF [1], WDEF [2], XLOADCT [1], XLOADCT [2], XLOADCT [3], XMOVIE [1]
	XMOVIE [2], break_file [4], data_chk [1], data_chk [2], get_info [1], get_info [2]
	get_info [3], get_info [4], get_logenv [1], get_logenv [2], mapx [1], mapx [2]
	restgen [1], restgen [2], ut_time [1], ut_time [2], wc_where [1], wc_where [2]
 CALLED BY:
	show_pix [1], show_pix [2]
   History:
      20-Dec-1993 (SLF) (guts of show_pix.pro, 10-Nov)
   


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

 Name        : 
	SHOW_QUEUE
 Purpose     : 
	Show the contents of a print queue.
 Explanation : 
	Spawns the proper command to the operating system to display the
	contents of print queues.
 Use         : 
	SHOW_QUEUE  [, QUEUE ]
 Inputs      : 
	None required.
 Opt. Inputs : 
	QUEUE	= Name of queue to be listed.  If not passed, then the
		  environment variable PSLASER (or PSCOLOR) is checked for the
		  name of the print queue.
 Outputs     : 
	The information about the print queue is printed to the terminal
	screen.
 Opt. Outputs: 
	None.
 Keywords    : 
	COLOR	= If set, then the environment variable PSCOLOR is checked for
		  the name of the print queue rather then PSLASER.  Ignored if
		  QUEUE is passed.
 Calls       : ***
	TRIM
 Common      : 
	None.
 Restrictions: 
	In general, the SERTS graphics devices routines use the special system
	variables !BCOLOR and !ASPECT.  These system variables are defined in
	the procedure DEVICELIB.  It is suggested that the command DEVICELIB be
	placed in the user's IDL_STARTUP file.

 Side effects: 
	None.
 Category    : 
	Utilities, Devices.
 Prev. Hist. : 
	William Thompson, July 1992.
 Written     : 
	William Thompson, GSFC, July 1992.
 Modified    : 
	Version 1, William Thompson, GSFC, 27 April 1993.
		Incorporated into CDS library.
 Version     : 
	Version 1, 27 April 1993.


SHOW_STRUCT $SSW/gen/idl/struct/show_struct.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : SHOW_STRUCT
               
 Purpose     : Display contents and breakdown of an IDL structure.
               
 Explanation : Displays in a widget the contents of a structure.  Embedded
               structures are unpacked.
               
 Use         : IDL> show_struct, str_name
    
 Inputs      : str_name  - name of structure to be viewed.
               
 Opt. Inputs : None
               
 Outputs     : None
               
 Opt. Outputs: None
               
 Keywords    : None

 Calls       : ***
	DATATYPE [1], DATATYPE [2], DATATYPE [3], DSP_STRUCT
 CALLED BY:
	MK_RASTER, ST_SUMER, XTKI
 Common      : None
               
 Restrictions: None
               
 Side effects: None
               
 Category    : Util, structure
               
 Prev. Hist. : Just a packaged version of S V Haugan's DSP_STRUCT with the
               /alone keyword.

 Written     : C D Pike, RAL, 21-Apr-94
               
 Modified    : 

 Version     : Version 1, 21-Apr-94


SHOW_SYNOP $SSW/gen/idl/synoptic/show_synop.pro
[Previous] [Next]
 Project     : HESSI

 Name        : SHOW_SYNOP

 Purpose     : widget interface to Synoptic data archive

 Category    : HESSI, Synoptic, Database, widgets, objects

 Syntax      : IDL> show_synop

 Keywords    : See SHOW_SYNOP::INIT

 CALLS: ***
	GET_HANDLER_ID, XALIVE
 CALLED BY:
	EIS_IMAGE_TOOL_EVENT [1], EIS_IMAGE_TOOL_EVENT [2], HESSI
 History     : 12-May-2000,  D.M. Zarro (SM&A/GSFC)  Written

 Contact     : DZARRO@SOLAR.STANFORD.EDU


SHOW_SYNOP__DEFINE $SSW/gen/idl/synoptic/show_synop__define.pro
[Previous] [Next]
 Project     : HESSI

 Name        : SHOW_SYNOP__DEFINE

 Purpose     : widget interface to Synoptic data archive

 Category    : HESSI, Synoptic, Database, widgets, objects

 Syntax      : IDL> obj=obj_new('show_synop',group=group)

 Keywords    : GROUP = widget ID of any calling widget
               PTR = pointer to last displayed object

 CALLS: ***
	ADD_TAG [1], ADD_TAG [2], ANYTIM2TAI, ANYTIM2UTC [1], ANYTIM2UTC [2], APPEND_ARR
	BSORT [1], BSORT [2], BSORT [3], BSORT [4], CONCAT_DIR [1], CONCAT_DIR [2]
	CONCAT_DIR [3], CW_FIELD, DPRINT, EXIST, FILE_BREAK, FIX_DIR_NAME, FREE_VAR
	GET_TEMP_DIR, GET_UTC, HAVE_METHOD, HAVE_TAG, HAVE_WIDGETS [1], HAVE_WIDGETS [2]
	IS_BLANK, IS_CLASS, IS_COMPRESSED, IS_DIR, IS_STRING, LOC_FILE [1], LOC_FILE [2]
	LOC_FILE [3], MATCH [1], MATCH [2], MATCH [3], MK_DFONT, OGOES, PLOT_GOES_EH
	REM_TAG [1], REM_TAG [2], REP_TAG_VALUE, REVERSE, SHOW_SYNOP::CHECK_BACKGROUND
	SHOW_SYNOP::CHECK_FLIST, SHOW_SYNOP::CHECK_TIMES, SHOW_SYNOP::CLEANUP
	SHOW_SYNOP::CREATE_WIDGETS, SHOW_SYNOP::EVENT, SHOW_SYNOP::FILE_DESC
	SHOW_SYNOP::FILE_INFO, SHOW_SYNOP::FILE_SITE, SHOW_SYNOP::FLIST
	SHOW_SYNOP::GET_INFO, SHOW_SYNOP::INIT, SHOW_SYNOP::IS_LOG
	SHOW_SYNOP::PLOT_DATA, SHOW_SYNOP::RHEAD, SHOW_SYNOP::SETPROP
	SHOW_SYNOP::SETUP, SHOW_SYNOP::SLIST, SHOW_SYNOP_CLEANUP, SHOW_SYNOP_EVENT
	STR_MATCH, TRIM, UTC2TAI, VALID_TIME, WIDGET_MBASE, WIDGET_SELECTED, WRITE_DIR, XACK
	XALIVE, XANSWER, XHOUR, XKILL, XMANAGER, XMENU2, XPOPUP, XREGISTERED, XTEXT, XTEXT_RESET
	concat_dir [4], get_uniq, is_number [1], is_number [2], is_struct, str_cut
 History     : 12-May-2000,  D.M. Zarro (SM&A/GSFC) - written
               11-Nov-2005, Zarro (L-3Com/GSI) - tidied up
               20-Dec-2005, Kim Tolbert - changed dealing with goes object
                4-Jan-2006, Zarro - removed old GOES references
               13-Jan-2006, Zarro - added GROUP and NO_PLOTMAN keywords
               24-Sep-2006, Zarro (ADNET/GSFC)
                - moved directory selection from config to main widget
                            
 Contact     : DZARRO@SOLAR.STANFORD.EDU


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

 Name        : 
	SHOWFLAGS
 Purpose     : 
	Show the settings controlled by SET/UNSET/ENABLEFLAG.
 Explanation : 
	Shows the flag fields in the !IMAGE structure as set by the routines
	SETFLAG, UNSETFLAG, and ENABLEFLAG.
 Use         : 
	SHOWFLAGS
 Inputs      : 
	None.
 Opt. Inputs : 
	None.
 Outputs     : 
	None.
 Opt. Outputs: 
	None.
 Keywords    : 
	None.
 Calls       : ***
	TRIM
 Common      : 
	None.
 Restrictions: 
	In general, the SERTS image display routines use several non-standard
	system variables.  These system variables are defined in the procedure
	IMAGELIB.  It is suggested that the command IMAGELIB be placed in the
	user's IDL_STARTUP file.

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

 Side effects: 
	None.
 Category    : 
	Utilities, Image_display.
 Prev. Hist. : 
	William Thompson, June 1991.
	W.T.T., Nov. 1991, added support for MIN, MAX, VMIN, VMAX, TOP and
			   COMBINED.
	William Thompson, August 1992, renamed BADPIXEL to MISSING.
 Written     : 
	William Thompson, GSFC, June 1991.
 Modified    : 
	Version 1, William Thompson, GSFC, 12 May 1993.
		Incorporated into CDS library.
 Version     : 
	Version 1, 12 May 1993.


SHOWIMAGE $SSW/gen/idl/image/showimage.pro
[Previous] [Next]
 NAME:
    SHOWIMAGE

 PURPOSE:
    Show the contents of a graphics file in the current window.

    The input formats supported are:
    GIF   8-bit with color table,
    BMP   8-bit with color table or 24-bit true-color,
    PICT  8-bit with color table,
    TIFF  8-bit with color table or 24-bit true-color,
    JPEG 24-bit true color,

    Any conversions necessary to translate 8-bit or 24-bit files
    to 8-bit or 24-bit images on-screen are done automatically.

 CATEGORY:
    Input/Output.

 CALLING SEQUENCE:
    SHOWIMAGE, FILE

 INPUTS:
    FILE     Name of the output file (format is identified automatically).

 OPTIONAL INPUTS:
    None.

 KEYWORD PARAMETERS:
    DITHER   Set this keyword to dither the input image when displaying
             24-bit images on an 8-bit display (default is no dithering).
    CURRENT  Set this keyword to display the image in the current window
             (default is to create a new window sized to fit the image).

 OUTPUTS:
    None.

 OPTIONAL OUTPUTS:
    None

 CALLS: ***
	QUERY_BMP, QUERY_GIF, QUERY_PICT, READ_BMP, READ_GIF, READ_PICT, REDUCE_COLORS
	REVERSE
 COMMON BLOCKS:
    None

 SIDE EFFECTS:
    The color table is modified.

 RESTRICTIONS:
    Requires IDL 5.2 or higher (image QUERY functions).

 EXAMPLE:

showimage, filepath('rose.jpg', subdir='examples/data')

 MODIFICATION HISTORY:
 Liam.Gumley@ssec.wisc.edu
 http://cimss.ssec.wisc.edu/~gumley
 $Id: showimage.pro,v 1.15 1999/11/19 21:20:50 gumley Exp $

 Copyright (C) 1999 Liam E. Gumley

 This program is free software; you can redistribute it and/or
 modify it under the terms of the GNU General Public License
 as published by the Free Software Foundation; either version 2
 of the License, or (at your option) any later version.

 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.

 You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.


SHOWPROGRESS__DEFINE $SSW/gen/idl/widgets/showprogress__define.pro
[Previous] [Next]
 NAME:
       SHOWPROGRESS__DEFINE

 PURPOSE:

       An object for creating a progress bar.

 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

 CATEGORY:

       Utilities

 CALLING SEQUENCE:

       progressBar = Obj_New("SHOWPROGRESS")

 INPUTS:

       parent: A widget identifier of the widget that will be the
           group leader for this program. It is *required* for modal
           operation. If missing, you are on your own. :-(

 KEYWORDS:

      CANCELBUTTON: Set this keyword if a Cancel button is desired.
      DELAY: The total time the widget should be on the display in AutoUpDate
           mode. The keyword applies only to AutoUpDate mode. Default is 5 seconds.
      STEPS: The number of steps to take in AutoUpDate mode. The keyword applies only
           to AutoUpDate mode.
      MESSAGE: The text of the label above the progress bar. Default is "Operation
           in Progress...".
      TITLE: ; The text of the top-level base title bar. Default is ""
      COLOR: The color to draw the progress bar.
      XSIZE: The XSize of the progress bar in Device coordinates. Default is 150.
      YSIZE: The YSize of the progress bar in Device coordinates. Default is 10.
      AUTOUPDATE: Set this keyword to be in AutoUpDate mode.


 PROCEDURE:
       There are two modes. In AutoUpDate mode, a delay and number of steps is
       required. The modal widget stays on the display until the total time
       exceeds the DELAY or the requested number of steps is taken. A TIMER
       widget is used to generate update events. Nothing can be going on
       concurrently in AutoUpDate mode. To enter AutoUpDate mode, type this:

          progressBar = Obj_New("SHOWPROGRESS", /AutoUpDate, Delay=2, Steps=10)
          progressBar->Start
          Obj_Destroy, progressBar

       The program will update and destroy itself automatically. (The object
       itself is not destroyed. You must do this explicitly, as in the example
       above.)

       In normal mode, the user is responsible for starting, updating, and
       destroying the progress indicator. The sequence of commands might look
       like this:

          progressBar = Obj_New("SHOWPROGRESS")
          progressBar->Start
          FOR j=0,9 DO BEGIN
             Wait, 0.5  ; Would probably be doing something ELSE here!
             progressBar->Update, (j+1)*10
          ENDFOR
          progressBar->Destroy
          Obj_Destroy, progressBar

       Normal mode gives you the opportunity to update the Progress Bar
       in a loop while something else is going on. See the example program
       at the end of this file.

       Note that the object itself is not destroyed when calling the DESTROY
       method. You must explicitly destroy the object, as in the example above.

 METHODS:

       CHECKCANCEL: This function method returns a 1 if the user has clicked
           the CANCEL button. Otherwise, it returns a 0.

          cancelled = progressBar->CheckCancel()
          IF cancelled THEN progressBar->Destroy

       DESTROY: Destroys the ShowProgress widgets. It does NOT destroy the object.

          progressBar->Destroy

       GETPROPERTY: Gets the properties that can be set in the INIT method, including
          the parent widget ID.

          progressBar->GetProperty, Steps=currentNSteps, Delay=currentDelay

       SETCOLOR: Changes the color of the progress bar.

           progressBar->SetColor, !P.Color

       SETLABEL: Changes the text on the widget label.

           progressBar->SetLabel, 'This text instead'

       SETPROPERTY: Allows the user to set the INIT parameter via keywords.

          progressBar->SetProperty, Color=244, XSize=200, Message='Please Wait...'

       START: Puts the ShowProgress bar on the display. In AutoUpDate mode, the
          widget starts to automatically update.

          progressBar->Start

       UPDATE: Updates the progress bar. Requires on argument, a number between 0
          and 100 that indicates the percent of progress bar that should be filled
          with a color.

          progressBar->Update, 50

 EXAMPLE:

       See the example program at the bottom of this file.

 CALLS: ***
	SHOWPROGRESS::CHECKCANCEL, SHOWPROGRESS::CLEANUP, SHOWPROGRESS::DESTROY
	SHOWPROGRESS::GETPROPERTY, SHOWPROGRESS::INIT, SHOWPROGRESS::REINITIALIZE
	SHOWPROGRESS::SETCANCEL, SHOWPROGRESS::SETCOLOR, SHOWPROGRESS::SETLABEL
	SHOWPROGRESS::SETPROPERTY, SHOWPROGRESS::START, SHOWPROGRESS::TIMER_EVENTS
	SHOWPROGRESS::UPDATE, SHOWPROGRESS_CLEANUP, SHOWPROGRESS_EVENT, XMANAGER
 RESTRICTIONS:

       In contradiction to the IDL documentation, making the parent widget
          insensitive in normal mode does NOT prevent the parent widgets from
          receiving events on my Windows NT 4.0, SP 4 system running IDL 5.2,
          IDL 5.2.1, or IDL 5.3 (beta).

       Note that if you specify a CANCEL button the Show Progress program CANNOT
       run as a MODAL widget program. Thus, user *may* be able to generate events
       in the calling program while this program is running.

 MODIFICATION HISTORY:
       Written by:  David Fanning, 26 July 1999.
       Added code so that the current graphics window doesn't change. 1 September 1999. DWF.
       Added yet more code for the same purpose. 3 September 1999. DWF.
       Added a CANCEL button and made other minor modifications. 12 Oct 1999. DWF.

       Added a third mode - 'In Progress Mode' - for when you want to show that
		a routine is working, and provide a 'Cancel' button, but you have no
		way of estimating what percentage is done. To use, set up just like
		normal mode, but don't pass percent argument in Update method.  Progress bar
		will flipflop to show progress.  18-Mar-2001, Kim Tolbert, GSFC
	Fixed two minor bugs - changed self.cancel to self.cancelbutton in the
		Reinitialize method, and changed selfwindow to self.wid in TimerEvents method
		(selfwindow not defined at that point).    18-Mar-2001, Kim Tolbert, GSFC
	Added message_text keyword to Update method - changes text shown above
		progress bar so can show #iterations completed or something.   18-Mar-2001, Kim Tolbert, GSFC
   Added position keyword to init method.  Enabled multi-line (max=3) message above progress bar.
       	Added 'Elapsed Time' information.  Made progress bar 90% of size of widget (if message text
       	causes widget to grow bigger, bar will grow too).   22-Mar-2001, Kim Tolbert, GSFC
   Changed integer type from fix to long in elapsed time calculation. 28-Mar-2001, Kim Tolbert, GSFC
	Call widget_control,/show on every update call to bring progress bar to front. 18-May-2001, Kim, GSFC
	Added cancelid to properties GetProperty can return. 21-Jun-2004, Kim Tolbert


SID__DEFINE $SSW/gen/idl/objects/sid__define.pro
[Previous] [Next]
 Project     : HESSI

 Name        : SID__DEFINE

 Purpose     : Define a Session ID (SID) class for tracking users CGI forms

 Category    : HTML, Objects
                   
 Inputs      : None

 Outputs     : SID = a SID class

 Keywords    : None

 CALLS: ***
	ANYTIM2UTC [1], ANYTIM2UTC [2], DATATYPE [1], DATATYPE [2], DATATYPE [3]
	DELVARX [1], DELVARX [2], DELVARX [3], DELVARX [4], EXIST, FREE_POINTER, GET_SID
	SID::BORN, SID::CLEANUP, SID::GET, SID::ID, SID::INIT, SID::SET, SID::VALUE
	delvarx [5]
 History     : 13-Sept-1999,  D.M. Zarro.  Written

 Contact     : DZARRO@SOLAR.STANFORD.EDU


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

 Name        :	SIG_ARRAY

 Purpose     :	Returns the standard deviation of an array.

 Category    :	Class3, Numerical, Error-analysis, Statistics

 Explanation :	Calculate the standard deviation value of an array, or over one
		dimension of an array as a function of all the other
		dimensions.

 Syntax      :	Result = SIG_ARRAY( ARRAY  [, DIMENSION] )

 CALLED BY:
	AVG_WO_CR, constbacksub [1], constbacksub [2]
 Examples    :	

 Inputs      :	ARRAY	  = The array to determine the standard deviation from.

 Opt. Inputs :	DIMENSION = The dimension to calculate the standard deviation
			    over.

 Outputs     :	The result of the function is the standard deviation value of
		the array when called with one parameter. 

		If DIMENSION is passed, then the result is an array with all
		the dimensions of the input array except for the dimension
		specified, each element of which is the standard deviation of
		the corresponding vector in the input array.

		For example, if A is an array with dimensions of (3,4,5), then
		the command:

			B = SIG_ARRAY(A,2)

		is equivalent to

			B = FLTARR(3,5)
			FOR J = 0,4 DO BEGIN
				FOR I = 0,2 DO BEGIN
				B(I,J) = SIG_ARRAY(A(I,*,J), N)
				ENDFOR
			ENDFOR

 Opt. Outputs:	None.

 Keywords    :	MISSING	= Value signifying missing pixels.  Any pixels with
			  this value are not included in the calculation.  If
			  there are no non-missing pixels, then MISSING is
			  returned.

		N_PAR	= The number of fitted parameters to take into account
			  when determining the standard deviation.  The default
			  value is one.  The number of degrees of freedom is
			  N_ELEMENTS(ARRAY) - N_PAR.  The value of SIG_ARRAY
			  varies as one over the square root of the number of
			  degrees of freedom.

 Calls       : ***
	AVERAGE, DATATYPE [1], DATATYPE [2], DATATYPE [3]
 Common      :	None.

 Restrictions:	None.

 Side effects:	None.

 Prev. Hist. :	Based on an earlier routine called SIGMA by W. Thompson, 1986.

 History     :	Version 1, 26-Mar-1996, William Thompson, GSFC
		Version 2, 26-Feb-1997, William Thompson, GSFC
			Corrected problem with roundoff error when the
			distribution width is small compared to the data.
		Version 3, 25-Feb-1997, William Thompson, GSFC
			Make sure that one doesn't try to take square root of a
			negative number due to roundoff error.
		Version 4, 11-Apr-1998, William Thompson, GSFC
			Corrected bug involving incorrect application of NPAR
			adjustment.
		Version 5, 25-Sep-1998, William Thompson, GSFC
			Improved way that round-off error is handled when the
			DIMENSION parameter is used.  Rather than normalizing
			to a single average over the array, a separate average
			is calculated for each pixel of the reduced array.
               Version 6, 20-Sep-2005, William Thompson, GSFC
                       Fixed bug with calculation for integer arrays

 Contact     :	WTHOMPSON


SIGMA_FILTER $SSW/gen/idl_libs/astron/image/sigma_filter.pro
[Previous] [Next]
 NAME:
	SIGMA_FILTER
 PURPOSE:
	Replace pixels more than a specified pixels deviant from its neighbors
 EXPLANATION:
	Computes the mean and standard deviation of pixels in a box centered at 
	each pixel of the image, but excluding the center pixel. If the center 
	pixel value exceeds some # of standard deviations from the mean, it is 
	replaced by the mean in box. Note option to process pixels on the edges.
 CALLING SEQUENCE:
	Result = sigma_filter( image, box_width, N_sigma=(#), /ALL,/MON )
 INPUTS:
	image = 2-D image (matrix)
	box_width = width of square filter box, in # pixels (default = 3)
 KEYWORDS:
	N_sigma = # standard deviations to define outliers, floating point,
			recommend > 2, default = 3. For gaussian statistics:
			N_sigma = 1 smooths 35% of pixels, 2 = 5%, 3 = 1%.
	RADIUS = alternative to specify box radius, so box_width = 2*radius+1.
      /ALL_PIXELS causes computation to include edges of image,
      /KEEP causes opposite effect: pixels with values outside of specified
		deviation are not changed, pixels within deviation are smoothed.
      /ITERATE causes sigma_filter to be applied recursively (max = 20 times)
		until no more pixels change (only allowed when N_sigma >= 2).
      /MONITOR prints information about % pixels replaced.
 Optional Outputs:
	N_CHANGE = # of pixels changed (replaced with neighborhood mean).
	VARIANCE = image of pixel neighborhood variances * (N_sigma)^2,
	DEVIATION = image of pixel deviations from neighborhood means, squared.
 CALLS: ***
	FILTER_IMAGE
 CALLED BY:
	fl_suntoday [1], fl_suntoday [2], fl_suntoday [3], get_newsoon, poly_diffim
	sun_today [1], sun_today [2], sun_today [3]
 PROCEDURE:
	Compute mean over moving box-cars using smooth, subtract center values,
	compute variance using smooth on deviations from mean,
	check where pixel deviation from mean is within variance of box,
	replace those pixels in smoothed image (mean) with orignal values,
	return the resulting partial mean image.
 MODIFICATION HISTORY:
	Written, 1991, Frank Varosi and Dan Gezari NASA/GSFC
	F.V.1992, added optional keywords /ITER,/MON,VAR=,DEV=,N_CHANGE=.
	Converted to IDL V5.0   W. Landsman   September 1997


SIGN $SSW/gen/idl/fund_lib/sdac/sign.pro
[Previous] [Next]
 PROJECT:
	SDAC
 NAME:
	SIGN
 PURPOSE:
	This function takes two numbers X1,X2 and returns sign(X2)*abs(X1)
	(by assumption sign(0)=1)
 CATEGORY:
	NUMERICAL MATH UTILITY
 CALLING SEQUENCE:
	A = SIGN(X1,X2)
 INPUTS:
	X1	the absolute value of X1 is used
	X2	the sign of X2 is used
 OUTPUTS:
	SIGN	sign(X2)*abs(X1)
 CALLED BY:
	EPHEMERIS [1], EPHEMERIS [2], PB_INVERTER, SIMPLEX_BOUND, SIMPLEX_INSIDE
	WCS_DECOMP_ANGLE, WCS_PROJ_PCO, WCS_PROJ_QSC, get_helio_dist
 PROCEDURE:
	(Equivalent to FORTRAN SIGN function)
	If X1 and X2 have the same number of elements the result is calculated
	from corresponding elements in X1 and X2. If X2 is a scalar the sign
	of X2 is used in combination with all elements of X1.
 MODIFICATION HISTORY:
	APR-1991, Paul Hick (ARC)


SIGRANGE [1] $SSW/gen/idl/image/sigrange.pro
[Previous] [Next]
 Project     : SOHO - CDS

 Name        : 
	SIGRANGE()
 Purpose     : 
	Selects the most significant data range in an image.
 Explanation : 
	Selects out the most significant range in the data to be used in 
	displaying images.  The histogram of ARRAY is used to select the most
	significant range.
 Use         : 
	OUTPUT = SIGRANGE( ARRAY )
 Inputs      : 
	ARRAY	 = Array to take most significant range of.
 Opt. Inputs : 
	None.
 Outputs     : 
	The function returns an array where values above and below the
	selected range are set equal to the maximum and minimum of the
	range respectively.
 Opt. Outputs: 
	None.
 Keywords    : 
	FRACTION = Fraction of data to consider most significant.
		   Defaults to 0.99
	MISSING	 = Value used to flag missing points.  Data points with this
		   value are not considered or changed.
       RANGE    = Return the range used

 Calls       : 
	GET_IM_KEYWORD
 CALLED BY:
	BP_SEEK_POS, CDS_SNAPSHOT, CDS_THUMBNAIL, EIS_IMAGE_TOOL_EVENT [1]
	EIS_IMAGE_TOOL_EVENT [2], FF_DEMO, FIT2GIF, IMAGE_TOOL_EVENT, LOCATE_FFCAL, MK_GIF
	MK_SYNOPTIC, POLY_SPEC, SHOW_SCATTER, SHOW_SYNOPTIC, SLIT45_IMAGE_DEMO, SNAP_MOVIE
	XCOR_CDS, XTVSCALE, todays_targets, trace_scale
 Common      : 
	None.
 Restrictions: 
	ARRAY must have more than two points.  Fraction must be greater than 0 
	and less than 1.

	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    : 
	None.
 Prev. Hist. : 
	W.T.T., Oct. 1987.
	W.T.T., Jan. 1991.  Changed FRACTION to keyword, and added keyword
			    BADPIXEL.
	W.T.T., Mar. 1992.  Rewrote to apply histograms to only a fraction of
			    the array to speed up the process.
	William Thompson, August 1992, renamed BADPIXEL to MISSING.
 Written     : 
	William Thompson, GSFC, October 1987.
 Modified    : 
	Version 1, William Thompson, GSFC, 12 May 1993.
		Incorporated into CDS library.
	Version 2, William Thompson, GSFC, 25 May 1993.
		Changed call to HISTOGRAM to be compatible with OpenVMS/ALPHA
       Version 3, CDP, RAL, Add RANGE keyword.  16-Apr-96
	Version 4, William Thompson, GSFC, 17 April 1996
		Corrected some problems when range is too high.
	Version 5, 13-Jan-1998, William Thompson, GSFC
		Use random numbers to improve statistics when only using a
		fraction of the array.
	Version 6, 06-Mar-1998, William Thompson, GSFC
		Change default to 0.99
       Version 7, 28-Mar-2006, William Thompson, GSFC
               Made more robust

 Version     : 
	Version 6, 06-Mar-1998


SIGRANGE [2] $SSW/gen/idl_libs/astron/tv/sigrange.pro
[Previous] [Next]
 NAME: 
	SIGRANGE()
 PURPOSE: 
	Selects the most significant data range in an image.
 EXPLANATION: 
	Selects out the most significant range in the data to be used in 
	displaying images.  The histogram of ARRAY is used to select the most
	significant range.      Useful for scaling an image display.
 CALLING SEQUENCE: 
	OUTPUT = SIGRANGE( ARRAY )
 INPUTS: 
	ARRAY	 = Array to take most significant range of.
 OPTIONAL INPUTS: 
	None.
 OUTPUTS: 
	The function returns an array where values above and below the
	selected range are set equal to the maximum and minimum of the
	range respectively.
 OPTIONAL INPUT KEYWORDS: 
	FRACTION = Fraction of data to consider most significant.
		   Defaults to 0.99
	MISSING	 = Value used to flag missing points.  Data points with this
		   value are not considered or changed.
 OPTIONAL OUTPUT KEYWORD
	RANGE    = 2 element vector, giving the range (minimum and maxmimum) 
		used

 NOTES:
       If the image array contains more than 10,000 points then SIGRANGE() 
       uses random indexing of a subset of the points to determine the range
       (for speed).    Thus identical calls to SIGRANGE() might not yield
       identical results (although they should be very close).     
 CALLED BY:
	BP_SEEK_POS, CDS_SNAPSHOT, CDS_THUMBNAIL, EIS_IMAGE_TOOL_EVENT [1]
	EIS_IMAGE_TOOL_EVENT [2], FF_DEMO, FIT2GIF, IMAGE_TOOL_EVENT, LOCATE_FFCAL, MK_GIF
	MK_SYNOPTIC, POLY_SPEC, SHOW_SCATTER, SHOW_SYNOPTIC, SLIT45_IMAGE_DEMO, SNAP_MOVIE
	XCOR_CDS, XTVSCALE, todays_targets, trace_scale
 RESTRICTIONS: 
	ARRAY must have more than two points.  Fraction must be greater than 0 
	and less than 1.

	SIGRANGE was originally part of the SERTS image display package.   
	Other routines from this package are available at 

	http://sohowww.nascom.nasa.gov/solarsoft/gen/idl/image/

	Note that this version of SIGRANGE does not include the non-standard 
	system variables used in the SERTS package.
 REVISION HISTORY: 
	Version 1, William Thompson, GSFC, 12 May 1993.
		Incorporated into CDS library.
	Version 2, William Thompson, GSFC, 25 May 1993.
		Changed call to HISTOGRAM to be compatible with OpenVMS/ALPHA
       Version 3, CDP, RAL, Add RANGE keyword.  16-Apr-96
	Version 4, William Thompson, GSFC, 17 April 1996
		Corrected some problems when range is too high.
	Version 5, 13-Jan-1998, William Thompson, GSFC
		Use random numbers to improve statistics when only using a
		fraction of the array.
	Version 6, 06-Mar-1998, William Thompson, GSFC
		Change default to 0.99


SIMPLEX_BOUND $SSW/gen/idl/util/simplex_bound.pro
[Previous] [Next]

function simplex_bound,datain,volume,verbose=verbose

NAME:
     SIMPLEX_BOUND
PURPOSE:
     Find a simplex that bounds a set of coordinates
CATEGORY:
CALLING SEQUENCE:
     simplex = simplex_bound(coordinates[,volume])
INPUTS:
     data = fltarr(ndim,ndata) where ndim is the dimension of the data and
             ndata is the number of coordinate points.  
OPTIONAL INPUT PARAMETERS:
KEYWORD PARAMETERS
OUTPUTS:
     simplex = fltarr(ndim,ndim+1) give the ndim+1 simplex vertices
     volume = the volume of the final simplex, scaled so that it should
              be around 1.0 or so if all went well. (typically 0.2 -- 5.0)
 CALLS: ***
	AMOEBA, SIGN, SIMPLEX_BOUND_AMOEBA, SIMPLEX_INSIDE, SIMPLEX_VOLUME
 CALLED BY:
	mk_synsfc_coeff [1], mk_synsfc_coeff [2]
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
     There is some randomness here.  If getting the smallest simplex is
     really important, run this program a few times and take the simplex
     with the smallest volume.
PROCEDURE:
MODIFICATION HISTORY:
     T. Metcalf 2001-Jul-17
     T. Metcalf 2001-Dec-19 Added amoeba minimization


SIMPLEX_INSIDE $SSW/gen/idl/util/simplex_inside.pro
[Previous] [Next]

function simplex_inside,simplex,data,origin=origin

NAME:
     SIMPLEX_INSIDE
PURPOSE:
     Determine whether a coordinate or vector of coordinates is
     inside a simplex
CATEGORY:
CALLING SEQUENCE:
     inside = simplex_inside(simplex,coordiantes)
INPUTS:
     simplex = fltarr(ndim,ndim+1) is the simplex
     coordinates = coordinates to check fltarr(ndin,npoints)
OPTIONAL INPUT PARAMETERS:
KEYWORD PARAMETERS
OUTPUTS:
     inside = boolean array (npoints), 1=inside, 0 = outside the simplex
 CALLS: ***
	KILL_INDEX [1], KILL_INDEX [2], SIGN, SIMPLEX_PVECTOR
 CALLED BY:
	SIMPLEX_BOUND, mk_syn_sfc [1], mk_syn_sfc [2]
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
PROCEDURE:
MODIFICATION HISTORY:
     T. Metcalf 2001-July-17


SIMPLEX_PVECTOR $SSW/gen/idl/util/simplex_pvector.pro
[Previous] [Next]

function simplex_pvector,simplex,ssface

NAME:
     SIMPLEX_PVECTOR
PURPOSE:
     Compute a unit vector normal to a face of a simplex
CATEGORY:
CALLING SEQUENCE:
     pvector = simplex_pvector(simplex,ssface)
INPUTS:
     simplex = the simplex fltarr(ndimensions,ndimensions+1)
     ssface = the indices into the second dimension of simplex giving
              the vertices of the face.  lonarr(ndimension).
OPTIONAL INPUT PARAMETERS:
KEYWORD PARAMETERS
OUTPUTS:
     pvector = unit vector normal to the face.
 CALLS: ***
	SIMPLEX_GET_PERPENDICULAR
 CALLED BY:
	SIMPLEX_INSIDE
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
PROCEDURE:
MODIFICATION HISTORY:
     T. Metcalf 2001-July-18


SIMPLEX_VOLUME $SSW/gen/idl/util/simplex_volume.pro
[Previous] [Next]

function simplex_volume,simplex,scale

NAME:
     SIMPLEX_VOLUME
PURPOSE:
     Calculates the volume enclosed by a simplex
CATEGORY:
CALLING SEQUENCE:
     volume = simplex_volume(simplex)
INPUTS:
     simplex = fltarr(ndim,ndim+1) fives the ndim+1 simplex vertices
OPTIONAL INPUT PARAMETERS:
     scale = scale parameter for each dimension fltarr(ndim)
KEYWORD PARAMETERS
OUTPUTS:
     volume = the volume enclosed by the simplex
 CALLS: ***
	DETERM, FACTORIAL
 CALLED BY:
	SIMPLEX_BOUND
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
PROCEDURE:
MODIFICATION HISTORY:
     T. Metcalf 2001-July-17


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

 Name        :	
	SINCE_VERSION

 Purpose     :	
	Determine if current release is later than specified.

 Explanation :	
	Determine if the current release of IDL (as given in the 
	!VERSION.RELEASE system variable) comes after the user specified 
	release.   

 Use         :	
	test = SINCE_VERSION( release )

	Use the /FTOXDR keyword to the BYTEORDER procedure if the current 
	release of IDL is 2.2.2 or later

	IDL> if since_version('2.2.2') then byteorder, a, /FTOXDR

 Inputs      :	
	release - scalar string, must be formatted exactly like the 
		!VERSION.RELEASE system variable (e.g. '3.0.0') 

 Opt. Inputs :	
	None.

 Outputs     :	
	test - 1 if current release is identical or later than the specified 
              'release' else 0

 Opt. Outputs:	None.

 Keywords    :	None.

 Calls       :	None.
 CALLED BY:
	ADD_TAG [1], ALLOW_WINDOWS, ASSIGN_NOCOPY, Array_Despike, BIGPICKFILE, Brm_GauLeg
	CHMOD, CLEANPLOT [1], CLEANPLOT [2], CLEANPLOT [3], CLEAN_PATH, CLOSE_LUN
	COMBINE_STRUCT, COMPILE_SFIT, CONCAT_STRUCT, CREATE_PARAM [1], CREATE_PARAM [2]
	CWF_COMPONENT, CWF_FIT, CWF_STATUS, CWQ_CUBE, CWQ_DSPWAV [1], CWQ_IMAGE [1]
	CWQ_SPECTR [1], CWQ_WINSEL [1], CW_CUBEVEIW, CW_ENTERB, CW_FLIPSWITCH, CW_MOUSE
	CW_PSELECT, DSP_INFO, DSP_WAV, EIS_GET_HDR [1], EIS_GET_HDR [2]
	EIS_IMAGE_TOOL [1], EIS_IMAGE_TOOL [2], EIT__DEFINE, FILE_COPY2, FITS__DEFINE
	FRAMEWORK ABSTRACT CLASS DEFINITION, GEN__DEFINE, HOST_TO_IEEE [1]
	HOST_TO_IEEE [2], HOST_TO_IEEE [3], HOST_TO_IEEE [4], HSI_SIM11
	HSI_SPECTRUM__DEFINE, IEEE_TO_HOST [1], IEEE_TO_HOST [2], IEEE_TO_HOST [3]
	IEEE_TO_HOST [4], IMAGE_TOOL, IS_DIR, ITOOL_PICKFILE, JOIN_STRUCT [1]
	LIGHTCURVE CLASS DEFINITION, LOC_FILE_NEW, MERGE_STRUCT, MK_DIR, MK_PLAN_PLOT
	MRD_HEAD, OBJ_STRUCT, PICKFILE, PLOT_MAP, PQLPROFILE, PQLZOOM, REM_TAG [1], REPLICATE2
	RM_FILE, SAME_DATA [1], SOAP__DEFINE, SOCK_DOWNLOAD, SPECTRUM CLASS DEFINITION
	SPEX_SAVE_DATA [1], SPEX_SAVE_DATA [2], SPEX_SUMMARY [1], SPEX_SUMMARY [2]
	SPEX__DEFINE, TEST_OPEN, VALID_FITS, WHERE2, WIDGET_MBASE, WRITE_DIR, XCDS_ANALYSIS
	XCDS_COSMIC, XCFIT, XCFIT_BLOCK, XCR_REMOVE, XDIFF, XINPUT, XPLOTSCALE, XRECORDER
	XUPDATE, cw_edroplist, cwq_dspwav [2], cwq_image [2], cwq_spectr [2]
	cwq_winsel [2], dsp_menu, get_gevloc_data, is_number [1], les_archive_info
	mark_intervals, mreadfits_urls, nospike, obj_restore, obj_save, plotman
	plotman_create_files_event, pmtras_analysis, save_idl_routines, spectro_plot2
	spex_energy_ranges [1], spex_energy_ranges [2], spex_preview [1]
	spex_preview [2], ssw_getdst, ssw_post_query, ssw_time2filelist, str_subset
	strwhere, sxi_files, sxt2file, update_history, yopos [1], yopos [2]
 Common      :	None.

 Restrictions:	None.

 Side effects:	None.

 Category    :	Utilities, Miscellaneous

 Prev. Hist. :	
	Written   Wayne Landsman         Hughes/STX        January, 1992
	Corrected algorithm     W. Landsman                April, 1992

 Written     :	Wayne Landsman, Hughes/STX, January 1992

 Modified    :	Version 1, William Thompson, GSFC, 14 December 1994
			Incorporated into CDS library

 Version     :	Version 1, 14 December 1994


SITE__DEFINE $SSW/gen/idl/synoptic/site__define.pro
[Previous] [Next]
 Project     : HESSI

 Name        : SITE__DEFINE

 Purpose     : Define a site object

 Category    : Ancillary GBO Synoptic Objects

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

 CALLS: ***
	ANYTIM2TAI, ANYTIM2UTC [1], ANYTIM2UTC [2], APPEND_ARR, ARR2STR [1], Arr2Str [2]
	COMDIM2, CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], DATATYPE [1]
	DATATYPE [2], DATATYPE [3], DPRINT, EXIST, FILE_BREAK, FILT_EVENTS, GET_CALLER
	GET_DELIM, GET_FID, IS_BLANK, IS_STRING, LOC_FILE [1], LOC_FILE [2], LOC_FILE [3]
	MK_FID, NINT [1], NINT [2], OBJ_STRUCT, PARSE_TIME, ROUND_TIME, SITE::CLEANUP
	SITE::COPY, SITE::COPY_FILE, SITE::FILTER_EVENTS, SITE::FILTER_EXT
	SITE::FILTER_TIME, SITE::FSEARCH, SITE::GET_CACHE_ID, SITE::GET_CATS
	SITE::GET_FILES, SITE::GET_FTYPE, SITE::GET_SDIR, SITE::GET_TOPDIR
	SITE::GZIP_FILE, SITE::HGET, SITE::HSEARCH, SITE::INIT, SITE::LIST, SITE::LIST
	SITE::LIST_CACHE, SITE::LOC_FILE, SITE::OUTPUT, SITE::PARSE_TIME, SITE::SEARCH
	SITE::SETPROP, SITE::SET_RDIR, SITE::SHOW, SITE::VALID, SITE::VALID_ORG
	STR2ARR [1], STR2ARR [2], STR_FORMAT, STR_MATCH, TRIM, TRIM2, WRITE_DIR, XKILL
	anytim [1], anytim [2], anytim [3], anytim [4], anytim [5], concat_dir [4], gzip
	is_number [1], is_number [2], is_struct, str_replace [1], str_replace [2]
 History     : Written 4 Jan 2000, D. Zarro, SM&A/GSFC

 Contact     : dzarro@solar.stanford.edu


SIXLIN $SSW/gen/idl_libs/astron/math/sixlin.pro
[Previous] [Next]
 NAME:
       SIXLIN
 PURPOSE:
       Compute linear regression coefficients by six different methods.
 EXPLANATION:
       Adapted from the FORTRAN program (Rev. 1.1)  supplied by Isobe, 
       Feigelson, Akritas, and Babu Ap. J. Vol. 364, p. 104 (1990).   
       Suggested when there is no understanding about the nature of the 
       scatter about a linear relation, and NOT when the errors in the 
       variable are calculable.

 CALLING SEQUENCE:
       SIXLIN, xx, yy, a, siga, b, sigb   

 INPUTS:
       XX - vector of X values
       YY - vector of Y values, same number of elements as XX

 OUTPUTS:
       A - Vector of 6 Y intercept coefficients
       SIGA - Vector of standard deviations of 6 Y intercepts
       B - Vector of 6 slope coefficients
       SIGB - Vector of standard deviations of slope coefficients

       The output variables are computed using linear regression for each of 
       the following 6 cases:
               (0) Ordinary Least Squares (OLS) Y vs. X
               (1) Ordinary Least Squares  X vs. Y
               (2) Ordinary Least Squares Bisector
               (3) Orthogonal Reduced Major Axis
               (4) Reduced Major-Axis 
               (5) Mean ordinary Least Squares

 NOTES:
       Isobe et al. make the following recommendations

       (1) If the different linear regression methods yield similar results
               then quoting OLS(Y|X) is probably the most familiar.

       (2) If the linear relation is to be used to predict Y vs. X then
               OLS(Y|X) should be used.   

       (3) If the goal is to determine the functional relationship between
               X and Y then the OLS bisector is recommended.

 REVISION HISTORY:
       Written   Wayne Landsman          February, 1991         
       Corrected sigma calculations      February, 1992
       Converted to IDL V5.0   W. Landsman   September 1997


SIXTY $SSW/gen/idl_libs/astron/astro/sixty.pro
[Previous] [Next]
 NAME:
	SIXTY()
 PURPOSE:
	Converts a decimal number to sexigesimal.
 EXPLANATION:
	Reverse of the TEN() function.

 CALLING SEQUENCE:
	X = SIXTY( SCALAR, [ /TrailSign ] ) 

 INPUTS:
	SCALAR -- Decimal quantity.  
 OUTPUTS:
	Function value returned = real vector of three elements, 
	sexigesimal equivalent of input decimal quantity.    Double
       precision if the input is double, otherwise floating point.
	By default, a negative number is signified by making the first non-zero
	element of the output vection negative, but this can be modfied with
       the /TrailSign keyword.

 OPTIONAL INPUT KEYWORD:
      /TrailSign - By default, SIXTY() returns a negative sign in the first
         nonzero element.   If /TrailSign is set, then SIXTY() will return
         always return a negative sign in the first element, even if it is
         zero
 CALLED BY:
	ADSTRING, EQPOLE_GRID, QDCB_GRID, WUPTIME
 PROCEDURE:
	Mostly involves checking arguments and setting the sign.

 EXAMPLE:
	If x = -0.345d then sixty(x) = [0.0, -20.0, 42.0]
                      and sixty(x,/trail) = [-0.0, 20.0, 42.0]
 MODIFICATION HISTORY:
	Written by R. S. Hill, STX, 19-OCT-87         
	Output changed to single precision.  RSH, STX, 1/26/88
	Accept single element vector   W. Landsman   Sep. 1996
	Converted to IDL V5.0   W. Landsman   September 1997
       Added /TrailSign keyword, preserve data type  
                 B. Stecklum/ W. Landsman   March 2006


SIZE_STRUCT $SSW/gen/idl_libs/astron/structure/size_struct.pro
[Previous] [Next]
 NAME:
	SIZE_STRUCT
 PURPOSE:
	Obtain the size in bytes of an IDL structure definition.    
 EXPLANATION:
	For most applications this function is superceded by use 
	of the /LENGTH keyword to the intrinsic N_TAGS function 
	introduced in IDL V2.3.0

 CALLING SEQUENCE:
			bytes = size_struct( structure )
 CALLED BY:
	ASCII_RAW, BAT_MERGE, EDITOC, FIND_PACKET, FS_OPEN [1], FS_READ_DD, HSI_LOAD_STRUCT
	HSI_MODUL_PATTERN_CLOSE, HXRBS_ESC, QL_READBDB, READ_BATSE_DD, READ_OCC_DISCSP
	READ_SHER, WRITE_DD, WRITE_FDB, WRITE_LOG, batse_write_log, read_dd, xzchange
	examples:
			print, size_struct( "fdq_sdf" )
 INPUTS:
		structure = a structure variable or
				a string giving the structure name
				as known by IDL (help,/struct,variable).
		/PRINT = to print all sub structure sizes.

 inputs/outputs used recursively:
		struct = the structure VARIABLE currently analyzed.
		Max_Field_Size = size of the largest field found in structure.
 RESULT:
		Function returns the total size in bytes of a structure element.
 PROCEDURE:
		Strategy is to call size_struct recursively if
		structure contains sub-structures.
		Otherwise just add up the field sizes.

 MODIFICATION HISTORY:
	written 1990 Frank Varosi STX @ NASA/GSFC (using align_struct).
	Converted to IDL V5.0   W. Landsman   September 1997


SIZEOF $SSW/gen/idl/util/sizeof.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : SIZEOF()
               
 Purpose     : Calculates the size of an IDL variable 
               
 Explanation : Calculates the size of an IDL variable. In the current
               Ultrix IDL release (2.3.0 ), size of structures cannot be 
               obtained since recursive calls are not supported. String
               variables are countedas one byte each (??)

               
 Use         : x= sizeof( input )
    
 Inputs      : input -  any IDL variable
               
 Opt. Inputs : None
               
 Outputs     : Function returns size of input variable
               
 Opt. Outputs: None
               
 Keywords    : None

 Calls       : None
 Restrictions: None
               
 Side effects: None
               
 Category    : Util, misc
               
 Prev. Hist. : Arnulf, Oct-93

 Written     : For FM sci_ana program, C D Pike, RAL, 22-Oct-93
               
 Modified    : 

 Version     : Version 1, 22-Oct-93


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

 Name        :	SKIPF

 Purpose     :	Emulates the VMS SKIPF function on UNIX machines.

 Explanation :	Emulates the VMS SKIPF function on UNIX machines.

 Use         :	SKIPF, UNIT, NSKIP
		SKIPF, UNIT, NSKIP, RECORDS

 Inputs      :	UNIT	= Tape unit number.  Tape drives are selected via the
			  UNIX environment variables "MT1", "MT2", etc.  The
			  desired tape drive is thus specified by numbers, as
			  in VMS.  Must be from 0 to 9.

		NSKIP	= Number of files or records to skip.

 Opt. Inputs :	RECORDS = If present, then records are skipped instead of
			  files.

 Outputs     :	None.  However, !ERR is set to ABS(NSKIP)

 Opt. Outputs:	None.

 Keywords    :	None.

 Calls       : ***
	CHECK_TAPE_DRV [1], CHECK_TAPE_DRV [2]
 CALLED BY:
	FITSTAPE, FXTAPEREAD, FXTPIO_WRITE, RD_EXB, TCOPY, mt
 Common      :	None.

 Restrictions:	This routine may not act exactly the same as the VMS
		equivalent, particularly in regards to the behavior of the !ERR
		system variable.

		The environment variable "MTn", where n corresponds to the
		variable UNIT, must be defined.  E.g.,

			setenv MT0 /dev/nrst0

		Requires IDL v3.1 or later.

 Side effects:	The device file is opened.  !ERR is set to ABS(NSKIP).

 Category    :	Utilities, I/O, Tape.

 Prev. Hist. :	VERSION 1, R. W. Thompson 12/4/89
		William Thompson, Apr 1991, rewrote to better emulate VMS
			version.

 Written     :	R. W. Thompson, GSFC/IUE, 4 December 1989.

 Modified    :	Version 1, William Thompson, GSFC, 21 December 1993.
			Rewrote to use IOCTL.

 Version     :	Version 1, 21 December 1993.


SKY $SSW/gen/idl_libs/astron/idlphot/sky.pro
[Previous] [Next]
 NAME:
       SKY
 PURPOSE:
       Determine the sky level in an image 
 EXPLANATION:
       Approximately 10000 uniformly spaced pixels are selected for the
       computation.  Adapted from the DAOPHOT routine of the same name.

       The sky is computed either by using the procedure mmm.pro (defualt) 
       or by sigma clipping (if /MEANBACK is set) 

 CALLING SEQUENCE:
       SKY, image, [ skymode, skysig ,/SILENT, /MEANBACK, /NAN, CIRCLERAD= ]
     
         Keywords available  when MEANBACK is not set (passed to mmm.pro): 
                   HIGHBAD=, /INTEGER,  READNOISE=
         Keywords available when /MEANBACK is set: 
                   CLIPSIG=, /DOUBLE, CONVERGE_NUM=, MAXITER= 
 INPUTS:
       IMAGE - One or two dimensional array

 OPTIONAL OUTPUT ARRAYS:
       SKYMODE - Scalar, giving the mode of the sky pixel values of the 
               array IMAGE, as determined by the procedure MMM.
       SKYSIG -  Scalar, giving standard deviation of sky brightness

 INPUT KEYWORD PARAMETERS:
	CIRCLERAD - Use this keyword to have SKY only select pixels within
		specified pixel radius of the center of the image.  If 
		CIRCLERAD =1, then the radius is set equal to half the image
		width.   Can only be used with square images.
       /MEANBACK - if set, then the background is computed using the 3 sigma 
             clipped mean (using meanclip.pro) rather than using the mode 
             computed with mmm.pro.    This keyword is useful for the Poisson 
             count regime or where contamination is known  to be minimal.
       /NAN - This keyword must be set to  ignore NaN values when computing 
              the sky.
       /SILENT - If this keyword is supplied and non-zero, then SKY will not
               display the sky value and sigma at the terminal

      The _EXTRA facility can is used to pass optional keywords to the programs
             that actually perform the sky computation: either mmm.pro 
             (default) or meanclip.pro (if /MEANBACK) is set.    The following
             keywords are available with the mmm.pro (default) setting 

       HIGHBAD - scalar value of the (lowest) "bad" pixel level (e.g. cosmic 
                rays or saturated pixels) If not supplied, then there is 
                assumed to be no high bad pixels.
       READNOISE - Scalar giving the read noise (or minimum noise for any 
                pixel).     Normally, MMM determines the (robust) median by 
                averaging the central 20% of the sky values.     In some cases
                where the noise is low, and pixel values are quantized a
                larger fraction may be needed.    By supplying the optional
                read noise parameter, MMM is better able to adjust the
                fraction of pixels used to determine the median. 
       /INTEGER - Set this keyword if the  input SKY image only contains
                discrete integer values.    This keyword is only needed if the
                SKY image is of type float or double precision, but contains 
                only discrete integer values.     

     If the /MEANBACK keyword is set then the following keywords are available

       CLIPSIG:  Number of sigma at which to clip.  Default=3
	MAXITER:  Ceiling on number of clipping iterations.  Default=5
       CONVERGE_NUM:  If the proportion of rejected pixels is less
           than this fraction, the iterations stop.  Default=0.02, i.e.,
           iteration stops if fewer than 2% of pixels excluded.
       /DOUBLE - if set then perform all computations in double precision.
                 Otherwise double precision is used only if the input
                 data is double

 CALLS: ***
	DIST_CIRCLE, MEANCLIP, MMM
 CALLED BY:
	EXTRAP, SKYADJ_CUBE
 PROCEDURE:
       A grid of points, not exceeding 10000 in number, is extracted
       from the image array.  The mode of these pixel values is determined
       by the procedure mmm.pro or meanclip.pro.   In a 2-d array the grid is 
       staggered in each row to avoid emphasizing possible bad columns

 PROCEDURE CALLS:
       MEANCLIP, MMM, DIST_CIRCLE
 REVISION HISTORY:
       Written, W. Landsman   STX Co.            September, 1987     
       Changed INDGEN to LINDGEN                 January, 1994
       Fixed display of # of points used         March, 1994
       Stagger beginning pixel in each row, added NSKY, READNOISE, HIGHBAD
          W. Landsman        June 2004
      Adjustments for unbiased sampling  W. Landsman June 2004
      Added /NAN keyword, put back CIRCLERAD keyword W. Landsman July 2004
      Added MEANBACK keyword, _EXTRA kewyord ,preserve data type in 
             calculations       W. Landsman November 2005


SKYADJ_CUBE $SSW/gen/idl_libs/astron/image/skyadj_cube.pro
[Previous] [Next]
 NAME:                    
        SKYADJ_CUBE

 PURPOSE:
       Sky adjust the planes of a datacube.

 EXPLANATION:
       When removing cosmic rays from a set of images, it is desirable that
       all images have the same sky level.    This procedure (called by
       CR_REJECT) removes the sky from each image in a data cube.    

 CALLING SEQUENCE:
       SKYADJ_CUBE,Datacube,Skyvals,Totsky

 MODIFIED ARGUMENT:
       Datacube:  3-D array with one image of same field in each plane.
                  Returned with sky in each plane adjusted to zero.

 OUTPUT ARGUMENTS:
       Skyvals:   Array of sky values used on each plane of datacube.
                  For a scalar sky, this parameter is a vector
                  containing the sky value for each image plane.  For a
                  vector sky, this parameter is a 2-D array where each
                  line corresponds to one image plane.

 INPUT KEYWORD PARAMETERS:

       REGION   - [X0,X1,Y0,Y1] to restrict area used for computation
                  of sky.  Default is 0.1*Xdim, 0.9*Xdim, 0.1*Ydim,
                  0.9*Ydim.  If INPUT_MASK is specified, the two 
                  specs are combined, i.e., the intersection of the
                  areas is used.
       VERBOSE  - Flag.  If set, print information on skyvals.
       NOEDIT   - Flag.  If set, return sky values without changing
                  datacube.
       XMEDSKY  - Flag.  If set, return vector sky as a function of X.
       SELECT   - Array of subscripts of planes of the cube to process.
                  (Default=all)
       EXTRAPR  - Applies only in XMEDSKY mode.
                  Subregion to use for polynomial extrapolation of sky
                  vector into portions excluded by REGION parameter.
                  (Default=first and last 10% of pixels; set to zero
                  to defeat extrapolation)
       EDEGREE  - Applies only in XMEDSKY mode.  
                  Degree of polynomial for extrapolation (Default=1)
       INPUT_MASK - Cube of flags corresponding to data cube.  If used,
                  the sky computation is restricted to the smallest 
                  contiguous rectangle containing all the pixels flagged
                  valid (with 1 rather than 0).

 CALLS: ***
	AVG [1], AVG [2], EXTRAP, MEANCLIP, POLY, POLY_FIT, SKY, STRN [1], STRN [2], STRN [3]
	XMEDSKY
 CALLED BY:
	CR_REJECT, EXTRAP
 PROCEDURE:
       Uses astronomy library "sky" routine for scalar sky and
       column-by-column median for vector sky.

 MODIFICATION HISTORY:
   10 Jul. 1997   - Written.  R. S. Hill, Hughes STX
   20 Oct. 1997   - 1-D sky option.  RSH
    7 Aug. 1998   - SELECT keyword.  RSH
    6 Oct. 1998   - Extrapolation.  RSH
    7 Oct. 1998   - INPUT_MASK added.  RSH
   21 Oct. 1998   - Fallback to 3-sigma clipped mean if mode fails.  RSH
   22 Mar. 2000   - Combine mask with region rather having mask
                    override region.  Improve comments.  RSH
   16 June 2000   - On_error and message used.  Square brackets for array 
                    subscripts.  EXTRAP included in this file.  
                    WBL & RSH, 16 June 2000


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

 Name        : SMART_FTP

 Purpose     : A wrapper around FTP

 Category    : planning

 Explanation :

 Syntax      : smart_ftp,server,get_file,get_dir

 CALLS: ***
	BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], DATATYPE [1], DATATYPE [2]
	DATATYPE [3], DELVARX [1], DELVARX [2], DELVARX [3], DELVARX [4], ESPAWN, EXIST
	GET_USER_ID, GREP, KILL_JOB, LOC_FILE [1], LOC_FILE [2], LOC_FILE [3], MK_TEMP_FILE
	NINT [1], NINT [2], PR_SYNTAX, RD_ASCII [1], RD_ASCII [2], RM_FILE, TEST_DIR, TRIM
	break_file [4], curdir [1], curdir [2], delvarx [5], is_alive [1], is_alive [2]
	is_number [1], is_number [2]
 CALLED BY:
	FTP_BBSO, FTP_KISF, FTP_MLSO_IMAGES, FTP_MWSO, FTP_NOBE, ssw_url2data
 Examples    :

 Inputs      : SERVER = server to retrieve from
               GET_FILE = filenames to retrieve

 Opt. Inputs : GET_DIR = directory to retrieve from

 Outputs     : See keywords

 Keywords    : OUT_DIR = output directory for file [def = current]
               FILES = found filenames
               ERR = error string
               COUNT = no of files copied
               RETRY = # times to retry if server is down
               KILL  = kill any zombie processes
               QUIET = turn off output messages
               USER  = usename (default is anonymous)
               PASS  = password (default is user@hostname)
               PORT  = port number
               PING  = ping before copying
               ASCII = ftp as ASCII (def is binary)
               LIST_ONLY = just do remote LS
                           
 History     : Written 14 May 1998 D. Zarro, SAC/GSFC

 Contact     : dzarro@solar.stanford.edu


SMART_WINDOW $SSW/gen/idl/display/smart_window.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : SMART_WINDOW
               
 Purpose     : a smarter way to set/restore plot window parameters
               
 Category    : utility
               
 Syntax      : IDL> smart_window,window
    
 Inputs      : WINDOW = window ID number to set to
               
               
 Keywords    : SET = set current system variables to saved values
               REMOVE = remove input window from common
               DRAW = informs that window is a DRAW widget
               STATUS = 1/0 if success/fail
               NOSHOW = set to not call WSHOW
               
 CALLS: ***
	ALLOW_WINDOWS, DATATYPE [1], DATATYPE [2], DATATYPE [3], DELVARX [1], DELVARX [2]
	DELVARX [3], DELVARX [4], EXIST, MERGE_STRUCT, WSHOW2, delvarx [5]
 CALLED BY:
	MK_CDS_PLAN, OPLOT_SPLAN, PLOT_CDS_POINT [1], PLOT_CDS_POINT [2], PLOT_MAP
	PLOT_MAP2 WARNINGTEMPORARY FIX ONLY FOR 16 bit ZBuffer support, PLOT_SPLAN
 Side effects: If WINDOW is valid, subsequent plots are directed to it
               
 History     : Version 1,  24-Jan-1998, Zarro (SAC/GSFC)
               24-Jun-2000, Zarro (EIT/GSFC) - changed IS_WIN call to SUPP_WIN
               18-Jun-2001, Zarro (EITI/GSFC) - added Z-buffer support
               13 Dec 2001, Zarro (EITI/GSFC) - added ALLOW_WINDOWS call

 Contact     : dzarro@solar.stanford.edu


smooft $SSW/gen/idl/genutil/smooft.pro
[Previous] [Next]
NAME:
       smooft
PURPOSE:
	Implements the smooft routine from Numerical Recipes (Sec. 13.9).
	Essentially a low-pass filter for a 1-D array of noisy data.

SAMPLE CALLING SEQUENCE:
	smoothed_data = SMOOFT(noisy_data,wfwhm)
		where the smoothing window applied to 'noisy_data' is on
		the order of 'wfwhm'.

INPUT:
	Y = 1-D data vector, any type; length = NPTS.
	WFWHM = approximate width of smoothing window in abcissa points.

RETURNS:
	YFT = 1-D floating point array of smoothed data; length = NPTS.

HISTORY:
       12-Dec-96: Transcribed from Numerical Recipes by T. Berger.
       12-Sep-97: Removed factor of 2 error on inverse transformed data. T.Berger.


SNU $SSW/gen/idl/fund_lib/sdac/snu.pro
[Previous] [Next]
 PROJECT:
	SDAC
 NAME:
	SNU
 PURPOSE:
	This function returns a number selected from a widget interface.
 CATEGORY:
	WIDGET, UTILITY
 ROUTINES CALLED: 
	HAVE_WINDOWS, XDEVICE
 CALLED BY:
	option_changer [1], option_changer [2]
 EXAMPLE:
	Result = SNU( DIGITS, [MESSASGE=MESSAGE, ERROR=ERROR, GROUP_LEADER=GROUP])

 var = snu(digits)

 EXPLANATION:
	Creates a widget for the user to click on value to construct a number
	of length DIGITS. Previous value is saved and number of digits
	may vary

 INPUTS :
	DIGITS : the number of digits in the number to be contructed
 KEYWORDS : 
	MESSAGE      : string or string array which will appear in widget
	GROUP_LEADER : optional widget id of calling widget
	INITIAL      : initial string of number, sets common and overrides digits if 
		       it is too large
 OUTPUT :
	ERROR      :  0 for successful completion
		      1 for user cancelled
	Function returns a string value constructed from the widget entries

 CALLS: ***
	FCHECK, HAVE_WINDOWS [1], HAVE_WINDOWS [2], REVERSE, SNU_EVENT, XDEVICE, XMANAGER
	XREGISTERED
 COMMON :
       SNU_WIDGET :  remembers last number and interacts with event handler

 MODIFICATION HISTORY
	NOV 1992 - Elaine Einfalt (HSTX)
       Jul 1994 - richard.schwartz@gsfc.nasa.gov,  added initial keyword
       27-may-1998 - richard.schwartz@gsfc.nasa.gov,  support all windowing os.


SOAP__DEFINE $SSW/gen/idl/xml/soap__define.pro
[Previous] [Next]
 Project     : VSO

 Name        : SOAP__DEFINE

 Purpose     : Define a SOAP class

 Explanation : Defines a SOAP class to connect to web services

 Category    : Utility, Class4, VSO

 Syntax      : IDL> a=obj_new('soap')

 CALLS: ***
	IS_BLANK, IS_STRING, SINCE_VERSION [1], SINCE_VERSION [2], SOAP::CLEANUP
	SOAP::CLOSE, SOAP::DESERIALIZE, SOAP::DOM2STRUCT, SOAP::ELEMENT_NAME
	SOAP::ENVELOPE, SOAP::GET, SOAP::HEADER, SOAP::HTTP, SOAP::INIT, SOAP::IS_ARRAY
	SOAP::IS_ARRAY_NAME, SOAP::OPEN, SOAP::PARSER, SOAP::POST, SOAP::SEND
	SOAP::SERIALIZE, SOAP::SERIALIZEOBJECT, SOAP::SERIALIZESTRUCT
 Examples    : a=obj_new('soap')                   ; create a SOAP object
               a->open(proxy, uri)                 ; connect to a SOAP service
               results = a->send(method, args)     ; call a remote method

 History     : Version 0,   06-Oct-2005, J A Hourcle.  prototype written
               Version 0.1, 12-Oct-2005, J A Hourcle.  returns XML-DOM
               Version 0.2, 24-Oct-2005, J A Hourcle.  hack for arrays of strings/structs
               Version 1,   08-Nov-2005, J A Hourcle.  documentation
               Version 1.1, 10-Nov-2005, J A Hourcle.  passing SOAPAction
                            12-Nov-2005, Zarro (L-3Com/GSFC)
                             -added GET method
                             -modified handling SOAPAction header
               Version 1.2, 18-Nov-2005, Hourcle.  Fixed memory leaks
               Version 1.3, 08-Dec-2005, Hourcle.  added HTTP timeout, /DEBUG mod

 Limitations : This implementation only understands HTTP transports, currently.
               IDL has no concept of 'null' other than a null pointer, so if you
                need something serialize as xsi:null, assign ptr_new() to it
               This was written for use against SOAP::Lite, and as such, is
                not very robust.  (ie, RPC wrapped document/literal)
               See vso__define.pro for an example in deserializing a known
                return structure.

 Contact     : oneiros@grace.nascom.nasa.gov


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

   Purpose: auto scale image  with edge enhancment

   Input Parameters:
      index, data - the usual - floating , long or integer

   Keyword Parameters:
      sobel_weight - weight applied to sobel portion ( default=.05)
      minpercent   - scale low   cutoff (reject this % of low end pixels)
      maxpercent   - scale hight cutoff (reject this % of high end pixels)
      deriv_hist   - if set, use derivitive of histogram for low/high cut
      hicut        - absolute hi data cutoff (ignore pixels > in scaling)
      lowcut       - absolute low data value cutoff  (ignore pixels < in scaling)

   Calling Sequence:
      sdata=sobel_scale(index,data,sobel_weight=xx, deriv_hist=nn)
      sdata=sobel_scale(index,data,sobel_weight=xx, minper=yy, maxper=zz)
      sdata=sobel_scale(index,data,sobel_weight=xx, low=nn, high=mm)

   Calling Example:
      sdata=sobel_scale(index,data,sobel=.1, deriv_hist=3)
      ; this example:
          add a sobel component
          determine low and high data range from derivitive of histogram
  
 CALLS: ***
	BOX_MESSAGE, DELVARX [1], DELVARX [2], DELVARX [3], DELVARX [4], REVERSE
	data_chk [1], data_chk [2], delvarx [5], deriv_arr [1], deriv_arr [2], last_nelem
	totvect
 CALLED BY:
	lasteit, ssw_fov_context, ssw_track_demo, ssw_track_fov, trace_movie_context
   History:
      19-October-1998 - S.L.Freeland - eit/trace/sxt - auto scale/enhance->WWW
      25-October-1998 - S.L.Freeland - allow 3D input
      28-October-1998 - S.L.Freeland - add MAXPERCENT, add DERIV_HIST
      12-November-1998 - S.L.Freeland - assume MAX is really HICUT if
                                        number > 100. (to make it agree w/doc)
       8-march-1999 - S.L.Freeland - histogram subscript range protection


SOCK_COPY $SSW/gen/idl/sockets/sock_copy.pro
[Previous] [Next]
 Project     : HESSI                                                           
                                                                               
 Name        : SOCK_COPY                                                       
                                                                               
 Purpose     : copy file via HTTP sockets                                      
                                                                               
 Category    : utility system sockets                                          
                                                                               
 Syntax      : IDL> sock_copy,url_file,outdir=outdir                           
                                                                               
 Inputs      : URL_FILE = remote file name to copy with URL path               
                                                                               
 Outputs     : None                                                            
                                                                               
 Keywords    : OUT_DIR = output directory to copy file                         
               ERR   = string error message                                    
               NOWAIT = set to execute copy in background (>= IDL 6.3)         
                                                                  
 CALLS: ***
	DPRINT, IS_BLANK, IS_STRING, PR_SYNTAX, SOCK_DOWNLOAD, UNIQ_KEY, curdir [1]
	curdir [2]
 CALLED BY:
	EIS_CAT [1], EIS_CAT [2], EIS_LIST_EXPER [1], EIS_LIST_EXPER [2], HSI_SOCK_FILE
	IHY_READ, SOCK_RUN, SOCK_SSW, SYNOP_DEFINE, TRACE_JSMOVIE, VSO_GET, get_gevloc_data
	phoenix_spg_get, rd_week_file [2], ssw_jsulr2data, ssw_url2data, weekid [2]
	ydb_exist [2]
 History     : 27-Dec-2001,  D.M. Zarro (EITI/GSFC) - Written                  
               23-Dec-2005, Zarro (L-3Com/GSFC) - removed COMMON               
               26-Dec-2005, Zarro (L-3Com/GSFC) 
                - added /HEAD_FIRST to HTTP->COPY to ensure checking for              
                  file before copying                               
               18-May-2006, Zarro (L-3Com/GSFC) 
                - added IDL-IDL bridge capability for background copying                  
               10-Nov-2006, Zarro (ADNET/GSFC) 
                - replaced read_ftp call by ftp object
                1-Feb-2007, Zarro (ADNET/GSFC)
                - allowed for vector OUT_DIR
                                                                               
 Contact     : DZARRO@SOLAR.STANFORD.EDU                                       


SOCK_DOWNLOAD $SSW/gen/idl/sockets/sock_download.pro
[Previous] [Next]
 Project     : HESSI

 Name        : SOCK_DOWNLOAD

 Purpose     : Download files using IDL-IDL bridge to
               copy files in a background thread and, thus, avoid blocking.

 Category    : utility system sockets

 Syntax      : IDL> sock_download,files,out_dir=out_dir

 Inputs      : FILES = scalar or array of filenames

 Outputs     : None

 Keywords    : OUT_DIR = output directory to copy files
               ERR   = string error message

 CALLS: ***
	GET_TEMP_DIR, IS_BLANK, IS_STRING, SINCE_VERSION [1], SINCE_VERSION [2]
	SOCK_DOWNLOAD_CALLBACK, WRITE_DIR, curdir [1], curdir [2]
 CALLED BY:
	SOCK_COPY
 History     : 6-May-2006,  D.M. Zarro (L-3Com/GSFC) - Written

 Contact     : DZARRO@SOLAR.STANFORD.EDU


SOCK_FILES $SSW/gen/idl/sockets/sock_files.pro
[Previous] [Next]
 Project     : HESSI

 Name        : SOCK_FILES

 Purpose     : List files on remote server

 Category    : utility sockets 

 Syntax      : IDL> files=sock_files(server,tstart,tend)

 Inputs      : SERVER = server to search
               TSTART, TEND = start/end times to search [inclusive]

 Outputs     : FILES = files found, with full path

 Keywords    : PATH   = directory to search
               COUNT = # of files found
             : ERR = error string input

 CALLS: ***
	COMDIM2, EXIST, GET_FID, HAVE_NETWORK, IS_BLANK, PR_SYNTAX, SOCK_FIND, TRIM
 Restrictions: Files on remote server must be organized by year/mon/day
               subdirectories, e.g. /2002/12/10

 History     : Written 7 Jan 2003, D. Zarro (EER/GSFC)

 Contact     : dzarro@solar.stanford.edu


SOCK_FIND $SSW/gen/idl/sockets/sock_find.pro
[Previous] [Next]
 Project     : HESSI

 Name        : SOCK_FIND

 Purpose     : socket version of FINDFILE

 Category    : utility system sockets

 Syntax      : IDL> files=sock_find(server,file,path=path)
                   
 Inputs      : server = remote WWW server name
               FILE = remote file name or pattern to search 

 Outputs     : Matched results

 Keywords    : COUNT = # of matches
               PATH = remote path to search
               ERR   = string error message
               NO_CACHE = do not check cached results

 CALLS: ***
	EXIST, FILE_BREAK, IS_BLANK, IS_STRING, STR_FIND, TRIM, str_replace [1]
	str_replace [2]
 CALLED BY:
	HSI_SOCK_FIND, HSI_SOCK_LIST, SOCK_FILES, rd_week_file [2], weekid [2]
	ydb_exist [2]
 Example     : IDL> a=sock_find('smmdac.nascom.nasa.gov','*.fts',$
                                 path='/synop_data/bbso')

 History     : 27-Dec-2001,  D.M. Zarro (EITI/GSFC)  Written

 Contact     : DZARRO@SOLAR.STANFORD.EDU


SOCK_FITS $SSW/gen/idl/sockets/sock_fits.pro
[Previous] [Next]
 Project     : HESSI

 Name        : SOCK_FITS

 Purpose     : read a FITS file via HTTP sockets

 Category    : utility sockets fits

 Syntax      : IDL> sock_fits,file,data,header,extension=extension
                   
 Inputs      : FILE = remote file name with URL path attached

 Outputs     : DATA = FITS data
               HEADER = FITS header

 Keywords    : ERR   = string error message

 CALLS: ***
	DELVARX [1], DELVARX [2], DELVARX [3], DELVARX [4], IS_BLANK, delvarx [5]
 CALLED BY:
	SOCK_MAP
 Example     :
 IDL> f='smmdac.nascom.nasa.gov/synop_data/kanz/kanz_halph_fd_20000114_1016.fts
 IDL> sock_fits,f,data,header

 History     : 27-Dec-2001,  D.M. Zarro (EITI/GSFC)  Written
               23-Dec-2005, Zarro (L-3Com/GSFC) - removed COMMON;
 Contact     : DZARRO@SOLAR.STANFORD.EDU


SOCK_LIST $SSW/gen/idl/sockets/sock_list.pro
[Previous] [Next]
 Project     : HESSI

 Name        : SOCK_LIST

 Purpose     : list remote WWW page via sockets

 Category    : utility system sockets

 Syntax      : IDL> sock_list,url,page
                  
 Inputs      : URL = URL path to list [e.g. www.cnn.com]

 Opt. Outputs: PAGE= captured HTML 

 Keywords    : ERR   = string error message
               CGI_BIN = set this if URL is a CGI_BIN command (faster)

 CALLS: ***
	DELVARX [1], DELVARX [2], DELVARX [3], DELVARX [4], IS_BLANK, IS_STRING, PR_SYNTAX
	delvarx [5], read_ftp
 CALLED BY:
	EIS_LIST_EXPER [1], EIS_LIST_EXPER [2], GET_SC_POINT, GET_SOHO_ROLL, SOCK_RPC
	ftp_list_since, hsi_obs_times, lasco_time2file, lasco_time2nrlwww
	les_archive_info, ssw_getcme_cactus, ssw_getcme_cdaw, ssw_jsurl2imagelist
	ssw_kyoto2dst, ssw_sec_aktxt2struct, yohkoh_legacy_files [1]
	yohkoh_legacy_files [2]
 History     : 27-Dec-2001,  D.M. Zarro (EITI/GSFC)  Written
               26-Dec-2003, Zarro (L-3Com/GSFC) - added FTP capability
               23-Dec-2005, Zarro (L-3Com/GSFC) - removed COMMON

 Contact     : DZARRO@SOLAR.STANFORD.EDU


SOCK_MAP $SSW/gen/idl/sockets/sock_map.pro
[Previous] [Next]
 Project     : HESSI

 Name        : SOCK_MAP

 Purpose     : return nearest map for specified data type 

 Category    : utility system sockets

 Syntax      : IDL> sock_map,map,time,/type (e.g. sxi)
                   
 Inputs      : TIME = nearest time to search for [def = current UT]

 Outputs     : MAP = map structure

 Keywords    : TYPE = /sxi, /eit
             : FILTER = 'p_thn_b' , or '195' , etc
               /p_thn_b
               TIME = time to search

 CALLS: ***
	INDEX2MAP, IS_STRING, PR_SYNTAX, SOCK_FITS, VALID_TIME, is_struct
 Examples    : IDL> sock_map,map,/sxi,filter='p_med_b'
               IDL> sock_map,map,/sxi,/p_med_b,time='1-may-03'

 History     : 12-Feb-2004  D.M. Zarro (L-3Com/GSFC)  Written

 Contact     : DZARRO@SOLAR.STANFORD.EDU


SOCK_OPEN $SSW/gen/idl/sockets/sock_open.pro
[Previous] [Next]
 Project     : HESSI
                  
 Name        : SOCK_OPEN
               
 Purpose     : Open a socket with some error checking
                             
 Category    : system utility sockets
               
 Syntax      : IDL> sock_open,host,port,err=err

 Inputs      : HOST = address of host

 Outputs     : LUN = unit number of open socket

 Keywords    : ERR = error string (if any)
               PORT = host port [def=80]
                   
 CALLS: ***
	ALLOW_SOCKETS, CLOSE_LUN, DELVARX [1], DELVARX [2], DELVARX [3], DELVARX [4]
	IS_BLANK, XACK, delvarx [5], is_number [1], is_number [2]
 CALLED BY:
	HESSI IMAGE RAW CLASS DEFINITION [2]
 History     : 14 April 2002, Zarro (L-3Com/GSFC)

 Contact     : dzarro@solar.stanford.edu


SOCK_PING $SSW/gen/idl/sockets/sock_ping.pro
[Previous] [Next]
 Project     : HESSI

 Name        : SOCK_PING

 Purpose     : ping a remote Web server

 Category    : utility system sockets
                   
 Inputs      : SERVER = server name

 Outputs     : STATUS = 1/0 if up/down

 Opt. Outputs: PAGE= server output

 Keywords    : TIME = response time (seconds)

 CALLS: ***
	IS_STRING
 CALLED BY:
	SOCK_SERVER
 History     : 7-Jan-2002,  D.M. Zarro (EITI/GSFC)  Written

 Contact     : DZARRO@SOLAR.STANFORD.EDU


SOCK_RPC $SSW/gen/idl/sockets/sock_rpc.pro
[Previous] [Next]
 Project     : EIS

 Name        : SOCK_RPC

 Purpose     : Send RPC command via socket

 Category    : utility sockets

 Syntax      : IDL> sock_rpc,command,output
                   
 Inputs      : COMMAND = RPC input command

 Outputs     : OUTPUT = RPC output results

 Keywords    : ERR = error string

 CALLS: ***
	HAVE_NETWORK, IS_BLANK, PR_SYNTAX, RPC_SERVER, SOCK_LIST
 CALLED BY:
	EIS_LIST_MAIN [1], EIS_LIST_MAIN [2]
 History     : 1-Oct-2002,  D.M. Zarro (LAC/GSFC)  Written

 Contact     : DZARRO@SOLAR.STANFORD.EDU


SOCK_RUN $SSW/gen/idl/sockets/sock_run.pro
[Previous] [Next]
 Project     : HESSI

 Name        : SOCK_RUN

 Purpose     : run (compile) a socket version of an SSW routine

 Category    : utility system sockets

 Syntax      : IDL> sock_run,file
                   
 Inputs      : FILE = remote file name to run

 Outputs     : None

 Keywords    : ERR   = string error message

 CALLS: ***
	FILE_BREAK, GET_TEMP_DIR, IS_BLANK, IS_STRING, PR_SYNTAX, SOCK_COPY, SOCK_SSW
 Example     : IDL> sock_run,'xdoc'

 History     : 10-Feb-2004  D.M. Zarro (L-3Com/GSFC)  Written

 Contact     : DZARRO@SOLAR.STANFORD.EDU


SOCK_SAME $SSW/gen/idl/sockets/sock_same.pro
[Previous] [Next]
 Project     : HESSI

 Name        : SOCK_SAME

 Purpose     : Check if local and remote copies of files
               are the same (in size)

 Category    : utility system sockets

 Syntax      : IDL> same=sock_same(rfile,lfile,lsize=lsize, rsize=rsize)
                   
 CALLS: ***
	IS_BLANK, file_size [1], file_size [2]
 Example     : IDL> same=sock_same('http://server.domain/filename','filename' )

 Inputs      : RFILE, LFILE = remote and local file names

 Outputs     : SAME = 1/0 if same or different

 Keywords    : LSIZE, RSIZE = local and remote sizes of files

 History     : 6-Mar-2006,  D.M. Zarro (L-3Com/GSFC) - Written

 Contact     : DZARRO@SOLAR.STANFORD.EDU


SOCK_SERVER $SSW/gen/idl/sockets/sock_server.pro
[Previous] [Next]
 Project     : HESSI

 Name        : SOCK_SERVER

 Purpose     : return host name of nearest server by shortest ping time

 Category    : sockets

 Inputs      : SERVERS = string array of server names to ping           
               
 Outputs     : SERVER = server name

 Opt. Output : INDEX = index of server in SERVERS

 Keywords    : ERR = error string

 CALLS: ***
	HAVE_NETWORK, IS_BLANK, SOCK_PING, TRIM
 History     : Written 22-Oct-2002, Zarro (EER/GSFC)

 Contact     : DZARRO@SOLAR.STANFORD.EDU


SOCK_SIZE $SSW/gen/idl/sockets/sock_size.pro
[Previous] [Next]
 Project     : HESSI

 Name        : SOCK_SIZE

 Purpose     : get sizes of remote files in bytes

 Category    : utility system sockets

 Syntax      : IDL> rsize=sock_size(rfile)
                   
 CALLS: ***
	IS_BLANK
 Example     : IDL> rsize=sock_size('http://server.domain/filename' )

 Inputs      : RFILE = remote file names

 Outputs     : RSIZE = remote file sizes

 Keywords    : ERR = string error

 History     : 1-Feb-2007,  D.M. Zarro (ADNET/GSFC) - Written

 Contact     : DZARRO@SOLAR.STANFORD.EDU


SOCK_SSW $SSW/gen/idl/sockets/sock_ssw.pro
[Previous] [Next]
 Project     : HESSI

 Name        : SOCK_SSW

 Purpose     : return URL of a SSW routine for retrieval by a socket

 Category    : utility system sockets

 Syntax      : IDL> url=sock_ssw(file)
                   
 Inputs      : FILE = remote file name to find

 Outputs     : URL = URL path to file

 Keywords    : ERR   = string error message

 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], EXIST, GET_TEMP_DIR, IS_BLANK
	IS_STRING, PR_SYNTAX, RD_ASCII [1], RD_ASCII [2], SOCK_COPY, SSW_SERVER
	concat_dir [4], str_replace [1], str_replace [2]
 CALLED BY:
	SOCK_RUN
 Example     : IDL> url=sock_ssw('xdoc')

 History     : 10-Feb-2004  D.M. Zarro (L-3Com/GSFC)  Written

 Contact     : DZARRO@SOLAR.STANFORD.EDU


soho_fac $SSW/gen/idl/solar/soho_fac.pro
[Previous] [Next]
 Project     : SOHO

 Name        : soho_fac

 Purpose     : return ratio of solar radius viewed from SOHO to that viewed
               from Earth

 Category    : utility 
;
 Syntax      : IDL> ratio=soho_fac(date)

 Inputs      : DATE = date to compute ratio (def=current)

 Outputs     : above ratio

 Keywords    : None

 CALLS: ***
	ANYTIM2UTC [1], ANYTIM2UTC [2], GET_UTC, PB0R
 CALLED BY:
	MAP2L1, MAP__DEFINE, MK_SOHO_MAP_EARTH, TRACE_MDI_ALIGN
 History     : Written 20 Sept 1999, D. Zarro, SM&A/GSFC

 Contact     : dzarro@solar.stanford.edu


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

 NAME:
       SOHO_VIEW()

 PURPOSE: 
       Check to see if SC_VIEW is set on

 CATEGORY:
       Utility
 
 SYNTAX: 
       Result = soho_view()

 INPUTS:
       None.

 OPTIONAL INPUTS: 
       None.

 OUTPUTS:
       None.

 OPTIONAL OUTPUTS:
       None.

 KEYWORDS: 
       None.

 CALLED BY:
	DROT_COORD, DROT_RASTER, IMAGE_TOOL_EVENT, ITOOL_LOAD_IMAGE, PB0R
 COMMON:
       None.

 RESTRICTIONS: 
       None.

 SIDE EFFECTS:
       None.

 HISTORY:
       Version 1, March 11, 1996, Liyun Wang, GSFC/ARC. Written

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


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

 Name        : SOHO_XY

 Purpose     : convert EARTH-view coordinates to SOHO-view

 Category    : imaging

 Explanation : convert projected (x,y) grid on solar surface from EARTH-view
               to SOHO-view, and vice-versa

 Syntax      : soho_xy,x,y,date,xs,ys

 CALLED BY:
	LVIEW_XY
 Examples    :

 Inputs      : X,Y = input coordinates (arcsec) (+W, +N)
               DATE = date of observations

 Opt. Inputs : None

 Outputs     : XS,YS = output coordinates (arcsec)

 Opt. Outputs: None

 Keywords    : INVERSE = set to convert SOHO to EARTH-view
               NO_COPY = don't make extra copies of input coordinates

 CALLS: ***
	ANYTIM2UTC [1], ANYTIM2UTC [2], ARCMIN2HEL, COPY_VAR, DELVARX [1], DELVARX [2]
	DELVARX [3], DELVARX [4], DPRINT, EXIST, HEL2ARCMIN [1], HEL2ARCMIN [2], PR_SYNTAX
	data_chk [1], data_chk [2], delvarx [5]
 Common      : None

 Restrictions: None

 Side effects: None

 History     : Written 15 April 1998, D. Zarro, SAC/GSFC

 Contact     : dzarro@solar.stanford.edu


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

 NAME:
       SOHOFILE2TIME()

 PURPOSE: 
       Return time from a given file name conforming the SOHO standard

 CATEGORY:
       Image Tool
 
 SYNTAX: 
       Result = sohofile2time(file)

 INPUTS:
       FILE - String scalar, name of image file

 OPTIONAL INPUTS: 
       None.

 OUTPUTS:
       RESULT - String scalar, time (in UTC format) indicated in
                filename if no error; null string if there is an error

 OPTIONAL OUTPUTS:
       None.

 KEYWORDS: 
       ERROR - A named variable containing possible error message

 CALLS: ***
	ANYTIM2UTC [1], ANYTIM2UTC [2], BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3]
	DATATYPE [1], DATATYPE [2], DATATYPE [3], TRIM, break_file [4]
 CALLED BY:
	todays_targets
 COMMON:
       None.

 RESTRICTIONS: 
       None.

 SIDE EFFECTS:
       None.

 HISTORY:
       Version 1, October 21, 1997, Liyun Wang, NASA/GSFC. Written
       Version 2, June 8, 1998, Zarro, vectorized

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


SOLEPHUT $SSW/gen/idl/fund_lib/sdac/solephut.pro
[Previous] [Next]

 NAME:
	SOLEPHUT

 PURPOSE:
       Calculate the solar ra and dec in degrees given the
	time in one of our canonical formats.

 CATEGORY:
       GEN

 CALLING SEQUENCE:
       Result = SOLEPHUT(Time)  

 CALLS: ***
	SUNPOS, anytim [1], anytim [2], anytim [3], anytim [4], anytim [5]
 INPUTS:
       Time:	A scalar or vector in format anytim format

 OUTPUTS:
       Result:	Right ascension and declination of the Sun in degrees
	 	returned in an array 2xn where n is the number of elements
		in the input TIME.  For the equinox of Time	

 CALLED BY:
	BATSE_POINTING, DET_POINT, OCCTIME, Pointing_Change, READ_DISCLA, SUN_EARTH_SC
 MODIFICATION HISTORY:
	RAS. Transposed from a formula in the astronomical almanac.
	Revised 11/25/92.
	Mod. 03/29/96 by RAS. Uses SUNPOS from Astro library now.  
	Mod. 05/08/96 by RCJ. Added documentation.
	Mod. 18-sep-1996 RAS put in test for new version of sunpos
	works with either the old or new output units for sunpos 


SORT_CFIT $SSW/gen/idl/fitting/sort_cfit.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : SORT_CFIT
               
 Purpose     : Sort some of the components in a component fit structure
               
 Explanation : Those components in the structure matching one of the strings
               supplied in the FUNC_NAMES parameter will be sorted according
               to the values of the parameter with index PARM

               Additionally, this routine can be used to purge all components
               having INCLUDE=0 from the structure.
               
 Use         : SORT_CFIT,CFIT,FUNC_NAMES,PARM
    
 Inputs      : CFIT : Component Fit structure

               FUNC_NAMES : The evaluation function name(s) (e.g.,
                            "comp_gauss" or "comp_poly") used to distinguish
                            those components to be included in the sorting
                            process. This can be an array enabling sorting of
                            e.g., both gaussian and voigt profiles according
                            to their line position. The sort is performed "in
                            place", i.e., the non-sorted components do not
                            change their place within the structure.

               PARM : The index of the parameter to sort on.
               
 Opt. Inputs : None.
               
 Outputs     : The CFIT structure is modified
               
 Opt. Outputs: None.
               
 Keywords    : DECREASING : Set to sort in decreasing order

               PURGE : Set to purge all INCLUDE = 0 components

               NOSORT : Set to avoid sorting alltogether - useful if only
                        purging is wanted.

 Calls       : None.
 CALLED BY:
	XCFIT
 Common      : None.
               
 Restrictions: None.
               
 Side effects: None.
               
 Category    : Analysis
               
 Prev. Hist. : None.

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

 Version     : 1, 21 January 1997


sort_index [1] $SSW/gen/idl/time/sort_index.pro
[Previous] [Next]
   Name: sort_index

   Purpose: return time sorted array of merged structures

   Input Paramters:
      index1, index2 -  vectors of SSW times to sort
   
   Keyword Parameters
      ss - is set, return sorted indices, not sorted/merged structures
      negtim - indices where time runs backwards (-1 if none)
      loud - report on number of records where time is backwards

   Calling Sequnce:
      newindex=sort_index(index1, index2)	; return merged index records
						;    (structures)
      sortss=sort_index(index1, index2, /ss)   ; return ssvector 
						;    (longword array)
      sortindex=sort_index(index1,/loud)	; sort single vector & report

   Calling Example:
      info=get_info(sort_index(findex,pindex))	; merge SXT FFI and PFI records
 						;  (index or roadmap)
 CALLS: ***
	deriv_arr [1], deriv_arr [2], int2secarr [1], int2secarr [2], str_concat [1]
	str_concat [2]
 CALLED BY:
	PATROL_ORDER, goes_widget, lasteit, mk_sff_pair [1], mk_sff_pair [2]
	pro interpretfemfemfemtimefemflgfemstrfemstrverboseverbose
	pro optimizedbdrfileshowparamshowparam, rd_goesx_ascii, rd_guf_ascii
	ref_term [2], soon_catstat, sxt_adjacent_image, sxt_ssn2fits [1]
   History:
      5-Nov-1993 S.L.Freeland
     10-Feb-1994 S.L.Freeland - allow single input, /loud keyword
     12-Dec-1994 S.L.Freeland - add uniq switch
     12-Sep-1998 S.L.Freeland - made it SSW compliant via anytim -> $SSW/gen
     22-Oct-1998 S.L.Freeland - return complete strcuts,not just time parts
      2-Oct-2001 S.L.Freeland - sped up a little (via anytim)


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

   Purpose: treat sparse matrices as stream for memory conservation

	     For example, for large array which is mostly zeros, store
	     only the non-zero values.

   Input Paramters:
      input - if structure, convert sparse structure to array
	       if array,   , convert array to sparse structure
      index - (optional) only convert specified index (must be scalar)

   Input Keyword Parameters:
      lowcut  - low value cutoff  (currently,only used with data->structure) 
      highcut - high value cutoff (currently,only used with data->structure) 
   
   Calling Sequence:
       structure=sparse(data [,lowcut=lowcut,highcut=highcut])
	structure=sparse(data)	; sparse data array in, sparse structure out
	structure=sparse(data,low=1)	; Save values where data ge 1
	
	data=sparse(structure)  ; sparse structure in, sparse data array out
	data=sparse(structure,index) ; 3D arrays only, only specified 2D out  
				     ; Index is the index of the 3rd dimension.

 CALLED BY:
	SXT_PREP0, ffi_prep, sxt_satpix [1], sxt_satpix [2]
   History:
      slf - 24-feb-1993 -- Minor mods by JRL

 CALLS: ***
	FMT_TAG [1], FMT_TAG [2], MAKE_STR [1], MAKE_STR [2]
   Restrictions:
      proto - needs some more type/data size checking


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

 Name        :	
	SPEC_DIR()
 Purpose     :	
	Appends a default disk or directory to a filename.
 Explanation :	
	Provide a complete file specification by appending a default disk
	or directory if necessary.

	For Unix, SPEC_DIR will simply append the default directory obtained
	from the CD command (if necessary).   Under VMS one must also 
	determine if the disk and/or directory is already specified.    Under 
	VMS, SPEC_DIR will also try to translate disk and directory logical 
	names.

 Use         :	
	File_spec = SPEC_DIR(filename,[extension])

 Inputs      :	
	filename - character string giving partial specification of a file
		name.  VMS examples include 'UIT$USER2:TEST.DAT', or 
		'[.SUB]TEST'.   Unix examples include 
		'/home/idl/lib', or '$IDL_HOME/pro'.   

 Opt. Inputs :	
	exten - string giving a default file name extension to be used if
		filename does not contain one.  Do not include the period.

 Outputs     :	
	File_spec - Complete file specification using default disk or 
		directory when necessary.  If the default directory
		is UIT$USER1:[IDL] then, for the above VMS examples, the
		output would be 'UIT$USER2:[IDL]TEST.DAT'
		'UIT$USER2:[IDL.SUB]TEST'. 

 Opt. Outputs:	None.

 Keywords    :	None.

 Calls       : ***
	FDECOMP [1], FDECOMP [2], FDECOMP [3]
 CALLED BY:
	DB_ITEM [1], DB_ITEM [2], DB_ITEM [3], DEF2C_FILL, DEF2C_FORMAT, DEF2C_INSERT
	DEF2STRUCT, FITSDIR, NSTAR
 Common      :	None.

 Restrictions:	None.

 Side effects:	None.

 Category    :	Utilities, Operating_System

 Prev. Hist. :	
	Written W. Landsman         STX         July, 1987
	Revised for use on VAXes and on SUNs, W.  Landsman, STX   August 1991

 Written     :	W. Landsman, GSFC/UIT (STX), July 1987

 Modified    :	Version 1, William Thompson, GSFC, 29 March 1994
			Incorporated into CDS library
		Version 2, Wayne Landsman, GSFC, September 1995
			Added Windows and Macintosh compatibility
		Version 3, Wayne Landsman, GSFC, 31 May 1997
			Work for relative Unix directory
		Version 4, Wayne Landsman, GSFC, September 1997
			Expand Unix tilde if necessary

 Version     :	Version 4, September 1997


SPEC_DIR [2] $SSW/gen/idl_libs/astron/misc/spec_dir.pro
[Previous] [Next]
 NAME:
     SPEC_DIR()
 PURPOSE:
     Complete a file specification by appending the default disk or directory

 CALLING SEQUENCE:                      
     File_spec = SPEC_DIR( filename, [ extension ] )
 INPUT:
     filename - character string giving partial specification of a file
               name.  Examples for different operating systems include the
                       following:
               Unix: 'pro/test.dat', '$IDL_HOME/test','~/subpro'
               MacOS: ':Programs:test'
               Windows: '\pro\test.dat','d:\pro\test'

 OPTIONAL INPUT:
     exten - string giving a default file name extension to be used if
             filename does not contain one.  Do not include the period.

 OUTPUT:
     File_spec - Complete file specification using default disk or 
               directory when necessary.  

 CALLS: ***
	FDECOMP [1], FDECOMP [2], FDECOMP [3]
 CALLED BY:
	DB_ITEM [1], DB_ITEM [2], DB_ITEM [3], DEF2C_FILL, DEF2C_FORMAT, DEF2C_INSERT
	DEF2STRUCT, FITSDIR, NSTAR
 EXAMPLE:
      IDL> a = spec_dir('test','dat')

      is equivalent to the commands
      IDL> cd, current=cdir
      IDL> a = cdir + delim + 'test.dat'

      where delim is the OS-dependent separator 
 METHOD:
      SPEC_DIR() decomposes the file name using FDECOMP, and appends the 
      default directory (obtained from the FILE_EXPAND_PATH) if necessary.   

      SPEC_DIR() does not check whether the constructed file name actually
      exists.
 PROCEDURES CALLED:
      FDECOMP, EXPAND_TILDE()
 REVISION HISTORY:
      Written W. Landsman         STX         July, 1987
      Expand Unix tilde if necessary              W. Landsman  September 1997
      Assume since V5.5, use FILE_EXPAND_PATH, remove VMS support        
              W. Landsman   September 2006


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

   Purpose: make sxt movies for WWW (just set up and call image2movie)

 CALLS: ***
	ARR2STR [1], Arr2Str [2], CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3]
	FILE_EXIST [2], STR2ARR [1], STR2ARR [2], TIME2FILE, anytim [1], anytim [2]
	anytim [3], anytim [4], anytim [5], concat_dir [4], configure_http, curdir [1]
	curdir [2], data_chk [1], data_chk [2], file_append [1], file_append [2]
	file_exist [1], file_exist [3], grid_data [1], grid_data [2], html_doc, http_names
	image2movie, prstr [1], prstr [2], quality_filter, rd_tfile [1], rd_tfile [2]
	ssw_strsplit, str2html [1], str2html [2], str2html [3], strextract, strjustify
	strtab2html
 CALLED BY:
	eit_proton_summary, ssw_track_demo, sxt_ssn2fits [1], trace_last_movie [1]
	trace_last_movie [3], trace_special_movie [1], trace_special_movie [2]
	trace_special_movie [3], trace_special_movie2
   EXAMPLE: REPRESENTATIVE OUTPUT FROM SPECIAL_MOVIE IS AVAILABLE AT: 
      http://www.lmsal.com/SXT/movies/lastsfd.html

   Input Parameters:
      index - time structures (any SSW format)     
      data  - 3D array
      r,g,b - optional RGB values
   
    Keyword Parameters:
      movie_name - top level movie name (XXX.html) and used as root name
                   for associated files for organizational purposes
      movie_text - optional text description (included in html doc)
                   -OR- filename conatining description
      grid_minutes - optional cadence for pseudo-regular sampling
                     (subset of index,data closest to time grid)
      nolabel - if set, dont auto-label movie frames (default puts
                time tags on frames 
      local - if set, use current directory for everything

      no_htmldoc - if set, dont make the top level html doc
                   (useful for appending to existing doc via SW)
      html (OUTPUT) - the HTML (table with thumbnail, links to movies,
                    statistics etc.
      context - if set, name(s) of context files to include
                if 1 element - inline html
                if 2 element - assumed thumbnaile/full
  


      XXX - ALL OTHER KEYWORDS USED BY IMAGE2MOVIE, including:
         table - IDL color table #
         reverse - reverse Color table
         gamma - color table gamma
         outsize - frame size for MOVIEs (data is congridded/rebinned)
         thumbsize - frame size for movie icons

   History:
      10-July-1996 (S.L.Freeland)
      25-July-1996 (S.L.Freeland) - broke html -> mk_movie_html
      21-aug-1997  (S.L.Freeland) - new technol (image2movie.pro)
      21-oct-1997  (S.L.Freeland) - keywords->image2movie (inheritance)
       8-Apr-1998  (S.L.Freeland) - add /NONLABEL switch
      14-Apr-1998  (S.L.Freeland) - add /LOCAL switch, documentation
       8-May-1998  (S.L.Freeland) - fix typo in LABEL
       1-Jun-1999  (S.L.Freeland) - reduced workload by ~50% - pass files back->image2movie
      11-Aug-1999  (S.L.Freeland) - movie_dir pass through!, only filter data on request
      11-Nov-1999  (S.L.Freeland) - improved appearence of output HTML
      09-May-2003, William Thompson - Use ssw_strsplit instead of strsplit
  
   NOTE: Movie making Brains are in <image2movie.pro> - this is just
   a convenient wrapper which calls that routine once for each of 
   three formats (mpeg, javascript, gif-animate) 
   see doc header for <image2movie.pro> routine for more details/options.


SPECPLOT__DEFINE $SSW/gen/idl/objects/specplot__define.pro
[Previous] [Next]
 Project      : HESSI

 Name         : SPECPLOT__DEFINE

 Purpose      : Define a general spectogram plot class

 Category     : objects

 Syntax       : IDL> new=obj_new('specplot')

 Modifications: 22-May-02, Zarro (L-3Com/GSFC) - written
                 8-Oct-2002, Kim.
                 - Modified plot method to make it compatible with plotman
                   Added dev2data method to convert between device and data coords.
                 - added speed-up checks for keywords
                 5-Feb-03, Zarro (EER/GSFC) - fixed DRANGE bug,
                   added FREQUENCY, FRANGE, FUNIT keywords.
                 7-May-03, Zarro (EER/GSC) - removed YLOG keyword from SPECPLOT
                 method since already passed thru EXTRA.
                 21-Mar-03, Kim.  Many changes to call new version of spectro_plot
                 10-Oct-2003, Kim.  Add call to set, _extra=extra in plot, remove log
                   from keywords in plot method, and add (Log) or (Exp) to title if
                   log_scale or exp_scale is set
                 11-April-2005, Kim.  Added call to run addplot_name routine after plotting.
                   (addplot_name and addplot_arg are properties of xyplot obj)
                 16-June-2005, Andre and Kim. Lots of new properties, major changes to plot,
                   set, set_plot.
                 12-Oct-2006, Kim. In set_plot, if set timerange to xrange, adjust for
                   utbase.

 Contact     : dzarro@solar.stanford.edu
 CALLS:


specread__DEFINE $SSW/gen/idl/objects/specread__define.pro
[Previous] [Next]
 Project     : HESSI

 Name        : specread__DEFINE

 Purpose     : Define a general SPECTROGRAM reader object

 Category    : Ancillary GBO Synoptic Objects

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

 CALLS: ***
	GET_UTC, SPECREAD::CLEANUP, SPECREAD::GET_SDIR, SPECREAD::INIT, SPECREAD::READ
	SPECREAD::SYNOP
 History     : Written 18 Nov 2002, D. Zarro (EER/GSFC)

 Contact     : dzarro@solar.stanford.edu


SPECTRA2FITS $SSW/gen/idl/fund_lib/sdac/spectra2fits.pro
[Previous] [Next]

 NAME:		SPECTRA2FITS

 PURPOSE:	Create fits binary tables using BATSE and GOES spectra data.

 CATEGORY: 	Fits Binary Table Extensions I/O

 CALLING SEQUENCE:
		spectra2fits,time,flux,date_obs,edges=edges, $
                 livetime=livetime, eflux=eflux,  $
                 flux_unit=flux_unit, $
                 direction_cosines=direction_cosines, $
                 edge_unit=edge_unit,filename=filename, status=status,$
                 clockcor=clockcor, help=help, com_head=com_head, $ 
                 com_ext1=com_ext1, com_ext2=com_ext2, com_ext3=com_ext3, $
		  head_key=head_key, ext1_key=ext1_key, ext2_key=ext2_key, $
		  ext3_key=ext3_key, y2k=y2k

 CALLS: ***
	CONVERT_2_STREAM, FCHECK, FLIPDATE, FXADDPAR [1], FXADDPAR [2], FXBADDCOL [1]
	FXBADDCOL [2], FXBCREATE [1], FXBCREATE [2], FXBFINISH [1], FXBFINISH [2]
	FXBHMAKE [1], FXBHMAKE [2], FXBWRITE [1], FXBWRITE [2], FXHMAKE [1], FXHMAKE [2]
	FXWRITE [1], FXWRITE [2], anytim [1], anytim [2], anytim [3], anytim [4], anytim [5]
	wc_where [1], wc_where [2]
 INPUTS: 
	Time: Time in seconds from start observation time.
	Flux: Flux (any size array)
	Date_obs: Obs. starting time (format accepted by anytim)

 OUTPUTS: 
	Binary fits tables with default filename 'spectra2fits.fits'

 KEYWORDS:
       EDGES: 		Energy edges (2xn format)
       LIVETIME: 	Livetime of each interval (in sec)
       EFLUX: 		Uncertainty on flux
       FLUX_UNIT: 	Unit of flux (default: counts/sec)
	DIRECTION_COSINES: Direction cosines for all 8 detectors
       EDGE_UNIT: 	Unit of edges (default: keV)
       FILENAME: 	Name for output fits file (def.: spectra2fits.fits) 
	STATUS: 	Status word (1st column must be time)
	CLOCKCOR: 	Clock correction (YES, NO or UNKNOWN)
	HELP: 		If =1, print help text
	COM_HEAD: 	Comments for primary header
	COM_EXT1: 	Comments for 1st extension
	COM_EXT2:	Comments for 2nd extension
	COM_EXT3: 	Comments for 3rd extension
	HEAD_KEY: 	Additional keywords for primary header 
	EXT1_KEY:	Additional keywords for 1st extension 
	EXT2_KEY: 	Additional keywords for 2nd extension 
	EXT3_KEY: 	Additional keywords for 3rd extension
	Y2K:		Keyword for y2k compatibility, i.e. 4 digit years 

 CALLED BY:
	FSPLOT, GFITS_W, HSI_SPECTROGRAMCHAN_OVERLAP_FIX
	HSI_SPECTROGRAM_DECIM_CORRECT, HSI_SPECTROGRAM_DECIM_TABLE
	HSI_SPECTRUM__DEFINE, SPECTROGRAM CLASS DEFINITION
	SPECTRUM CLASS DEFINITION, hsi_spectrogramACCBIN [2]
	hsi_spectrogram__define [1], hsi_spectrogram__define [2]
	hsi_spectrogram__define [3], hsi_spectrogram__get_obs [1]
	hsi_spectrogram__livetime [1]
 RESTRICTIONS:
	Time and livetime are 1-D arrays, in seconds, from observation 
	start time.
	Date_obs is the start date of observation in any format accepted 
	by anytim.
	First column of status array must be time.
	Comments for a given header are in string array format. Example:
	com_head=['line1','line2','line3']
	Additional keywords are input as structures. 
	Comments on individual keywords are written in string array format
	and then passed on as an element of the structure. Example: 
	comments=['Comment on instrument','Comment on telescope','']
	head_key={instrume:'BATSE',telescop:'CGRO',object:'Sun', $
	comments:comments}
	
 PROCEDURE: 
	This routine creates fits binary tables. 
       The primary header is a basic header. The first extension 
       contains the energy edges and direction cosines.
	The second extension contains time, flux, livetime and 
	eflux. The third extension contains status word and time.

 MODIFICATION HISTORY:
       Written September 1995, by RCJ.
       Mod. by RCJ 04/97. Adapt routine to more general use. Please
		note that it's *not* 100% general.
	Version 3 Amy.Skowronek@gsfc.nasa.gov Added y2k keyword to
		write years with four digits in FITS header.


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

PROJECT:
   Generic Display utilities

CATEGORY:
   /ssw/gen/display

PURPOSE:
       This routine displays 2d arrays as a function of
       time. This program merges functionalities of the older programs 
       tplot, rapp_plot_spectrogram,  and show_image. 
       It is a complete rewrite of the spectro_plot
       utility that was built on show_image uniquely.
       This current version just does some preparation for spectro_plot2,
       which actualy does all the work. It is the non-object oriented
       interface that can be uesed easily from the command line interface.

CALLING SEQUENCE:
       1st form:
       --------
       spectro_plot, image1, xaxis1, yaxis1, $
                     image2, xaxis2, yaxis2, $
                     ....
                     image4, xaxis4, yaxis4

       2nd form:
       --------
       spectro_plot, struct1, struct2, .... struct12

INPUT:
       image1...image4: 2d arrays
       xaxis1...xaxis4: 1d array containing the time values
                        associated with the xaxis of the array
       yaxis1...yaxis4: 1d array containing the y-values (whatever
                        they are) associated with the xaxis of the
                        array
       struct1...struct12: structures of the form
                        {spectrogram:fltarr(nx,ny), x: fltarr(nx), y:fltarr(ny)}

KEYWORDS:
       CBAR: displays a color table with the data, default: no color bar.
       INVERT: shows data inverted with the color table
       NO_INTERPOLATE: supresses the interpolation of the image
                       Note that this might lead to a wrong display,
                       as the pixels might not be aligned with the
                       y- and x-axis values.
       NO_UT: suppresses the use of utplot and plots the time axis
              with normal decimal values.
       PERCENT: ignores the last given percent of the image when scaling the data
                range to the color table.
       POSTSCRIPT: Sends the output to a postscript file (same as calling ps,
           /color)
       XRANGE: sets the time limits of the xaxis window (2-element
               array). 
       YLOG: plots the axis and the data with a logarithmic scale
       YRANGE: a 2xn_plots element setting the range to display
       ZEXP: applies exp() to the data before display
       ZLOG: applies log() to the data before display

       ... and all the keywords acccepted by PLOT

 CALLS: ***
	CHECKVAR [1], DELVARX [1], DELVARX [2], DELVARX [3], DELVARX [4], EXIST, MINMAX [1]
	MINMAX [2], PS [1], PS [2], PSCLOSE [1], PSCLOSE [2], STRUCT2SPECTROGRAM
	VALID_RANGE, checkvar [2], delvarx [5], is_struct, spectro_plot2
	str_tagarray2scalar
HISTORY:
       acs jul 2005 - revised doc, but needs more on that, cbar is not the
                      default for display.
       acs march 2005 - many things moved to spectro_plot2, by popular
                        demand, spectro_plot is a wrapper that does not need
                        any objects any more.
       acs aug 2004 - corrected a  problem w/ the time passed and
                      utbase
       acs june 2004- wrapperization, see spectro_plot_obj and spectrogram
                      for more interesting code.
       acs july 2003: corrected way of displaying spectrograms with
                      only few channels
       acs june 2003: now fully featured xstyle and ystyle keywords
       acs may 2003: fixing the x/y range problem and refactoring session
       ACS April 2003: including feedback from kim & paolo
       ACS March 2003: after meeting with AOBenz, PSG and PG extended version
                       with YINTEGRATE, NO_INTERPOLATE, YRANGE
                       PS capabilities checked
       ACS Feb 2003   : make sure it works with other plot routines
       ETH Zurich       for integration into the plotman utilities
                        (i.e. zooming etc )
                        csillag@ssl.berkeley.edu. This is basically a
                        merge between the functions of Pascal
                        Saint-Hilaire, Paolo Grigis and Peter Messmer
                        with the show_image
                        - ps option modified to be able to set the ps
                        option outside of the routine
                        - replacement of the call to utplot with the
                        set_utaxis and then axis
                        - interpolation taken from Davin (tplot)
                        - compatibility with tplot
                        - utplot is now default
                        - full logarithm implemented
       ACS Jan 2003: merged several version of the same program into
                     the first prototy of this generic
                     routines. Contributions from all people listed above.


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

PROJECT:
   Generic Display utilities

CATEGORY:
   /ssw/gen/display

PURPOSE:
       This routine is the core spectrogram display tool which is either
       called by the object specplot__define, or can also be used from the
       command line via spectro_plot. Please use one of those programs and
       not directly thsi one (although it shoudl be quite possible)

       This program merges functionalities of the programs tplot, rapp_plot_spectrogram,
       and show_image. This is a complete rewrite of the spectro_plot
       utility that was built on show_image uniquely.


 CALLS: ***
	CHECKVAR [1], CSCALE, DIST, DPRINT, EXIST, GETUTBASE [1], GETUTBASE [2], HIST_EQUAL
	INTERP_IMAGE, IS_STRING, LAST_ITEM, MINMAX [1], MINMAX [2], PLOT_MAP_COLORBAR
	SINCE_VERSION [1], SINCE_VERSION [2], SPECTRO_PLOT2_TEST, UTPLOT [1], UTPLOT [2]
	UTPLOT [3], UTPLOT [4], UTPLOT [5], UTPLOT [6], VALID_RANGE, anytim [1], anytim [2]
	anytim [3], anytim [4], anytim [5], axis_get_edges, axis_get_expanded_range
	checkvar [2], is_number [1], is_number [2]
 CALLED BY:
	SPECPLOT__DEFINE, spectro_plot
HISTORY:
       acs nov 2006 - taken away (log) and (exp) automtic insertion in the
                      title string as it seems to generate more problems than solutions.
       acs jan 2006 - made it 100x faster such that it can handle very big arrays
       acs jul 2005 - just some changes in the doc and adding a test for 2d
                      when image passed directly. I realize that cba and
                      invert do not work correctly, I'll have to correct this.
       acs mar 2005 - minor changes to make it work correctly with
                      spectrogram__define and plotman.
       acs mar 2005 - removed the object dependancy and made it a standalone
                      routine by popular demand. renamed to spectro_plot2,
                      the cli user interface is spectro_plot
       acs feb 2005 - activated the no_ut and xlog options, some significant
                      corrections on the x axis time display (in fact i throw
                      away the axis calls and replace with another utplot call)
       acs july 2004- some changes related to the problems of
                      displaying correctly only a few channels
       acs april 2004: release as spectro_plot_obj
       acs july 2003: corrected way of displaying spectrograms with
                      only few channels
       acs june 2003: now fully featured xstyle and ystyle keywords
       acs may 2003: fixing the x/y range problem and refactoring session
       ACS April 2003: including feedback from kim & paolo
       ACS March 2003: after meeting with AOBenz, PSG and PG extended version
                       with YINTEGRATE, NO_INTERPOLATE, YRANGE
                       PS capabilities checked
       ACS Feb 2003   : make sure it works with other plot routines
       ETH Zurich       for integration into the plotman utilities
                        (i.e. zooming etc )
                        csillag@ssl.berkeley.edu. This is basically a
                        merge between the functions of Pascal
                        Saint-Hilaire, Paolo Grigis and Peter Messmer
                        with the show_image
                        - ps option modified to be able to set the ps
                        option outside of the routine
                        - replacement of the call to utplot with the
                        set_utaxis and then axis
                        - interpolation taken from Davin (tplot)
                        - compatibility with tplot
                        - utplot is now default
                        - full logarithm implemented
       ACS Jan 2003: merged several version of the same program into
                     the first prototy of this generic
                     routines. Contributions from all people listed above.


SPECTROGRAM $SSW/gen/idl/objects/spectrogram.pro
[Previous] [Next]
 PROJECT:
       HESSI/PHOENIX

 NAME:
       SPECTROGRAM()

 PURPOSE:
       Constructor for the spectrogram object.

 CATEGORY:
       Generic utilities

 CALLING SEQUENCE:
       o = spectrogram( spectrogram [, time_axis, energy_axis] ) or
       o = spectrogram( spectrogram_struct )

 INPUTS:
       spectrogram: a 2d array containing the time/energy values
       time_axis: the time axis associated with the spectrogram. 
                  a 1 d vector with same # of elements as the x-axis
                  of the spectrogram. the time is referenced to 1-jan-79
                  (anytim format)
       spectrum_axis: the spectrum axis associated with the spectrogram. 
                  a 1 d vector with same # of elements as the y-axis
                  of the spectrogram
       spectrogram_struct: a spectrogram structure with tags:
                           {spectrogram, time_axis, spectrum_axis}

 OUTPUTS:
       o: a spectrogram object

 CALLED BY:
	spectrogram__define
 EXAMPLES:


 CALLS: ***
	MAKE_SPECTROGRAM
 SEE ALSO:
	http://hessi.ssl.berkeley.edu/~csillag/idl/spectrogram_howto.html
	more information in spectrogram__define
 HISTORY:
       20-jul-2004: documentation update
       Version 1, August 21, 2003,
           A Csillaghy, csillag@ssl.berkeley.edu


spectrogram__define $SSW/gen/idl/objects/spectrogram__define.pro
[Previous] [Next]
 PROJECT:
       HESSI / PHOENIX

 NAME:
       spectrogram__define

 PURPOSE:
       This class provides the basic spectrogram object to deal with
       spectral / temporal measurements.

 CATEGORY:
       generic utilities

 INSTANCE CREATION:
       o = make_spectrogram( spectrogram [, time_axis, spectrum_axis] )
       o = spectrogram(spectrogram [, time_axis, spectrum_axis] )
       o = spectrogram( spectrogram_struct )

 INPUTS:
       spectrogram: a 2d array containing the time/energy values
       time_axis: the time axis associated with the spectrogram.
                  a 1 d vector with same # of elements as the x-axis
                  of the spectrogram. the time is referenced to 1-jan-79
                  (anytim format)
       spectrum_axis: the spectrum axis associated with the spectrogram.
                  a 1 d vector with same # of elements as the y-axis
                  of the spectrogram
       spectrogram_struct: a spectrogram structure with tags:
                           {spectrogram, time_axis, spectrum_axis}

 OUTPUTS:
       o: a spectrogram object

 METHODS:
       o->set
       result = o->get()

 PARAMETERS:


 EXAMPLES:


 CALLS: ***
	ADD_TAG [1], ADD_TAG [2], DIST, ELIMWRONGCHANNELS, EXIST, IS_STRING, LOADCT
	MAKE_SPECTROGRAM, MAKE_STRUCT, MINMAX [1], MINMAX [2], RADIO_SPECTRO_FITS_READ
	SPECTROGRAM, SPECTROGRAM::BKG_SUBTRACT, SPECTROGRAM::CLEANUP, SPECTROGRAM::GET
	SPECTROGRAM::GETPLOTMAN, SPECTROGRAM::GETPLOTOBJ, SPECTROGRAM::HELP
	SPECTROGRAM::INIT, SPECTROGRAM::MAKE_STRUCT, SPECTROGRAM::PLOT
	SPECTROGRAM::PLOTMAN, SPECTROGRAM::SET, SPECTROGRAM_TEST, STRUCT2SPECTROGRAM
	VALID_RANGE, anytim [1], anytim [2], anytim [3], anytim [4], anytim [5]
	constbacksub [1], constbacksub [2], plotman, str_tagarray2scalar
 SEE ALSO:
	http://hessi.ssl.berkeley.edu/~csillag/software/spectrogram_howto.html
 HISTORY:
        1-aug-2006 - acs, added paneldesc parameter
       20-jul-2004 - acs, tested for use also with spectro_plot, for backward
                     compatibility, also reactivated the no ut option
       mar-2004 --- acs, multiplot functionality
       feb-2004 --- acs, association
       jan-2004 --- acs, first design with axes, evolution from spectro_plot
           A Csillaghy, csillag@fh-aargau.ch


spectrum2fits $SSW/gen/idl/fits/spectrum2fits.pro
[Previous] [Next]
 Name: spectrum2fits

 Category: FITS, UTIL

 Purpose: Write spectral rate data to a FITS file.

 Calling sequence:
     spectrum2fits, filename, WRITE_PRIMARY_HEADER=1,
       PRIMARY_HEADER=primary_header, EXTENSION_HEADER=extension_header,
       DATA=rate_data, ERROR=rate_error, TSTART=start_times, TSTOP=stop_times,
       MINCHAN=1, MAXCHAN=number_of_channels,
       E_MIN=min_channel_energies, E_MAX=max_channel_energies, E_UNIT='keV',
       ERR_CODE=had_err, ERR_MSG=err_msg

 Inputs:
 filename - name of FITS file to write.

 Outputs:

 Input keywords:
 WRITE_PRIMARY_HEADER - set this keyword to write a primary header to
                        the file.
 PRIMARY_HEADER - primary header for the file.  This contains any information
       that should be in the primary header in addition to
       the mandatory keywords.  Only used if
       WRITE_PRIMARY_HEADER is set.
 EXTENSION_HEADER - header for the RATE extension, with any necessary
         keywords.
 EVENT_LIST - set this keyword if a list of events is being written
              to the file.
 _EXTRA - Any keywords set in _EXTRA will be integrated into the extension
      structure array based on the number of elements.  If an entry has
      n_channel entries, it will be duplicated n_input spectra
      times and will be stored as a vector in the structure
      array.  If it has n_input spectra entries, each entry will
      be a scalar in the corresponding structure array element.
      The spectral data are passed in via the DATA keyword.

 The following keywords control writing data into the RATE
 extension and are processed in wrt_rate_ext:
 DATA - a [n_channel x n_input spectra / n_channel x n_detector x $
    n_input_spectra] array containing the the
    counts/s or counts for each spectrum in each channel.
 ERROR - an array containing the uncertainties on DATA.  Deafults to the
     square root of DATA.
 COUNTS - set if the column name for the data entry should be COUNTS
          instead of the default RATE.
 UNITS - units for DATA
  - a [ n_channel x n_input spectra / n_input spectra ] array
            containing the livetime for each [ spectrum channel / spectrum ]
 TIMECEN - Full time or time from TIMEZERO for each input spectrum or
           event.  Stored as TIME column within RATE extension.
 SPECNUM - Index to each spectrum.
 TIMEDEL - The integration time for each channel of each spectrum or
           each spectrum.
 DEADC - Dead Time Correction for each channel of each spectra, each
     spectrum, or each channel.  One of DEADC / LIVETIME should
     be set.  If n_chan elements, this will be set in the header
     for this extension.
 BACKV - background counts for each channel of each spectrum - OPTIONAL.
 BACKE - error on background counts for each channel of each spectrum.
         OPTIONAL.  Defaults to the square root of the BACKV if BACKV is set.

 The following keywords control the data that are written in the ENEBAND
 extension are passed to wrt_eneband_ext:
 NUMBAND - number of energy bands.
 MINCHAN - a numband element array containing the minimum channel number in
       each band.
 MAXCHAN - a numband element array containing the maximum channel number in
       each band.
 E_MIN - a numband element array containing the minimum energy in each band.
 E_MAX - a numband element array containing the maximum energy in each band.

 Output keywords:
 ERR_MSG = error message.  Null if no error occurred.
 ERR_CODE - 0/1 if [ no error / an error ] occurred during execution.

 Calls: ***
	FXADDPAR [1], FXADDPAR [2], FXHMAKE [1], FXHMAKE [2], FXWRITE [1], FXWRITE [2]
	wrt_eneband_ext, wrt_rate_ext
 CALLED BY:
	hsi_spectrum__filewrite, hsi_spectrum__fitswrite
 Modification History:
   18-nov-2002, Paul.Bilodeau@gsfc.nasa.gov - changed error handling to
     use GOTO's for simplification, removed CATCH staement.
   23-Aug-2004, Sandhia Bansal - Added SPEC_NUM and CHANNEL to ext_kw_list
     so that these two fields can be added to the columns in spectrum.
   03-Sep-2004, Sandhia Bansal, Added exposure to the argument list for this procedure.
                         Pass number of channels and exposure to the call for wrt_rate_ext..
                   Set prim_kw_list and prim_st_list only if the primary header is
                       to be created by this function.  Deleted TIME-OBS and
                       TIME-END from prim_kw_list - these values are already
                       included in DATE-OBS and DATE-END.
                   Replaced RA--NOM and DEC--NOM with RA_NOM and DEC_NOM.
                   Added SPEC_NUM and CHANNEL to the keyword list for rate extension (ext_kw_list,
                       and ext_st_list).
   06-Dec-2004, Sandhia Bansal - Deleted EXPOSURE keyword from the argument list.  Deleted
                                 EXPOSURE and NCHAN from call to wrt_rate_fits.


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

 PURPOSE:
	This function computes cartesion coordinates from RA and DEC

 CATEGORY:
	GEN, VECTOR ANALYSIS, UTILITY, GEOMETRY

 CALLING SEQUENCE:
	Cartesian_coordinates = SPHCART( RA, DEC)

 INPUTS:
	RA: right ascension in degrees, scalar or vector
	DEC: declination angle in degrees, scalar or vector

 CALLED BY:
	BATSE_POINTING, DET_COSINES, DET_POINT, FIND_GOOD_OCCS, GET_ANGLE, GET_OCCS
	GRO_POINT, HXRBS_OCC, OCCTIME, SUN_EARTH_SC
 EXAMPLE:
	Cartesian_coordinates = SPHCART( RA, DEC)
	xc=transpose(sphcart(x_ra(*), x_dec(*))) ;3 by nx;
	sunxyz=sphcart(sradec(0),sradec(1)) 

 MODIFICATION HISTORY:
 	Documented richard.schwartz@gsfc.nasa.gov, Version 2 , 29-mar-1996


SPHDIST $SSW/gen/idl_libs/astron/jhuapl/sphdist.pro
[Previous] [Next]
 NAME:
       SPHDIST
 PURPOSE:
       Angular distance between points on a sphere.
 CALLING SEQUENCE:
       d = sphdist(long1, lat1, long2, lat2)
 INPUTS:
       long1 = longitude of point 1, scalar or vector
       lat1 = latitude of point 1, scalar or vector
       long2 = longitude of point 2, scalar or vector
       lat2 = latitude of point 2, scalar or vector

 OPTIONAL KEYWORD INPUT PARAMETERS:
       /DEGREES - means angles are in degrees, else radians.
 OUTPUTS:
       d = angular distance between points (in radians unless /DEGREES
           is set.)
 PROCEDURES CALLED:
       RECPOL, POLREC
 NOTES:
       (1) The procedure GCIRC is similar to SPHDIST(), but may be more 
           suitable for astronomical applications.

       (2) If long1,lat1 are scalars, and long2,lat2 are vectors, then
           SPHDIST returns a vector giving the distance of each element of 
           long2,lat2 to long1,lat1.   Similarly, if long1,lat1 are vectors,
           and long2, lat2 are scalars, then SPHDIST returns a vector giving
           giving the distance of each element of long1,lat1 to to long2,lat2. 
           If both long1,lat1 and long2,lat2 are vectors then SPHDIST returns
           vector giving the distance of each element of long1,lat1 to the 
           corresponding element of long2, lat2.   If the input vectors are 
           not of equal length, then excess elements of the longer ones will 
           be ignored.
 CALLS: ***
	POLREC, RECPOL [1], RECPOL [2], RECPOL [3]
 CALLED BY:
	hsi_ast_seesource, hsi_ast_sourceangle
 MODIFICATION HISTORY:
       R. Sterner, 5 Feb, 1991
       R. Sterner, 26 Feb, 1991 --- Renamed from sphere_dist.pro

 Copyright (C) 1991, Johns Hopkins University/Applied Physics Laboratory
 This software may be used, copied, or redistributed as long as it is not
 sold and this copyright notice is reproduced on each copy made.  This
 routine is provided as is without any express or implied warranties
 whatsoever.  Other limitations apply as described in the file disclaimer.txt.
	Converted to IDL V5.0   W. Landsman   September 1997


spike_id $SSW/gen/idl/image/spike_id.pro
[Previous] [Next]
       NAME: spike_id

       PURPOSE: To locate single pixel spikes, like Cosmic Rays,
		 in 2-D images.

       METHOD: Default uses a three point median filter as a 
		reference, takes the difference and compares it with the
		cutoff value. The returned variable is a vector of pointers 
		to spikes in the input variable.

       CALLING SEQUENCE:
		out = spike_id(img,cutoff,[remove=remove,width=width])


       PARAMETERS: 	img		input image 
			cutoff		comparison cutoff

	KEYWORDS:	remove		when set return corrected 
					image
			width		median filter size (default
					is 3).
	CALLS: ***
	coord_v2l
 CALLED BY:
	cosmic_stat, spikes_off
       HISTORY: Drafted by A.McAllister, following a B.Labonte
		 algorythm, 10-jun-93.
		 Added code to handle borders, and keyword to
		 return corrected image, 2-jul-93.
		 trap for no spikes, 9-aug-93.
		 added control to filter size (default is the orginal
		 value of 3), also added absolute value on difference
		 12-Jan-94, gal
                LWA, 3/8/94, made from spikes.pro to remove absolute
                   value feature installed by GAL.
		 LWA, 3/12/94, Corrected header and fixed width keyword.


SPIRIT__DEFINE $SSW/gen/idl/synoptic/spirit__define.pro
[Previous] [Next]
 Project     : HESSI

 Name        : SPIRIT__DEFINE

 Purpose     : Define a SPIRIT data object

 Category    : Ancillary GBO Synoptic Objects

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

 CALLS: ***
	COMP_FITS_CRPIX, SPIRIT::CLEANUP, SPIRIT::INDEX2FITS, SPIRIT::INIT, SPIRIT::READ
	is_struct
 History     : Written 11 Nov 2005, D. Zarro (L-3Com/GSFC)

 Contact     : dzarro@solar.stanford.edu


spl_func $SSW/gen/idl/util/spl_func.pro
[Previous] [Next]

   Computes value of the spline function at offset 'd' and centre 'h'
   Used by BELLS.pro 

   Use:
         IDL>  y = spl_func(d,h)


   CDP Jan '92
 CALLED BY
	BELLS


split_colortab $SSW/gen/idl/display/split_colortab.pro
[Previous] [Next]
   Name: split_colortab

   Purpose: simplify some split-color tables manipulations

   Input Paramters:
      table -   idl color table(s) 
      ncolors - number of colors for each table - (def = !d.table_size/nt)
      bottom  - (optional) bottom color indices - (should auto-bottom..)

   Output Parameters
      table   (if /get) - tables currently 'dealt with'
      ncolors (if /get) - ncolors for each 'table'
      bottom  (if /get) - bottom for each 'table'
  
   Keyword Parameters
      get        (switch) - if set, RETURN  [table] , ncolors, bottom
      initialize (switch) - zero out existing 'split_colortab' info      
      restore    (switch) - if set, restore previous state
      noload     (switch) - if set, dont load CTables (via loadct)
      status     (switch) - if set, print current settings
      defined    (output) - boolean "defined?" used with /GET
  
   Calling Sequence:
      IDL> split_colortab, tables, ncs [,bottoms] [,/get] [,/init]

   Calling Context:
   IDL> split_colortab,[3,1,0],[50,25,120],/init,/status  ;<< SET split
     ----------------------------------------------       ; w/3 tables
    | Too many colors requested... clipping to 101 |      ; << !d.table_size
     ----------------------------------------------
     % LOADCT: Loading table B-W LINEAR                 
     % LOADCT: Loading table BLUE/WHITE
     % LOADCT: Loading table RED TEMPERATURE
     -----------------------                               
    | Table# NColors Bottom |                             ; < /STATUS info
    | 3      50      0      |
    | 1      25      50     |
    | 0      101     75     |
     -----------------------

    IDL> split_colortab,1,nc,bot,defined=defined, /get  ; << readback scaling
    IDL> if defined then print,nc,bot
          25      50
  
 CALLS: ***
	BOX_MESSAGE, DELVARX [1], DELVARX [2], DELVARX [3], DELVARX [4], LOADCT, delvarx [5]
	strjustify, where_arr [1], where_arr [2]
   History:
      16-April-1999 - S.L.Freeland


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

 Name        :	SPLIT_STRUCT

 Purpose     :	split two structures apart

 Explanation :

 Use         : SPLIT_STRUCT,STRUCT,INDEX,S1,S2

 Inputs      :	STRUCT = input structure to split
               INDEX  = index (or tag name) at which to break off structure
                        (all tags after and including this tag will be removed)
 Opt. Inputs :	None.

 Outputs     :	S1, S2 = split structures

 Version     :	Version 1.0, 22 January 1995
               Version 2.0, 8 Oct 1998 -- modified to use CREATE_STRUCT
               Version 3, 12-Dec-1998 -- improved memory management
               Version 4, 23-Dec-2004 -- improved with REM_TAG
 CALLS:
 CALLED BY
	ADD_TAG [2], DEF_CDS_STUDY, MK_PLAN_CUSTOM, MK_SOHO_CUSTOM


SPLIT_TAGS $SSW/gen/idl/struct/split_tags.pro
[Previous] [Next]
 Project     :	SDAC

 Name        :	SPLIT_TAGS

 Purpose     :	split duplicate tags from a structure

 Explanation :	

 Use         : split_tags,struct,s1,s2

 Inputs      :	struct = input structure (array or scalar)

 Opt. Inputs :	None.

 Outputs     :	s1,s2 = new structures with unique tags

 Opt. Outputs:	None

 Keywords    :	None

 CALLS: ***
	ADD_TAG [1], ADD_TAG [2], DATATYPE [1], DATATYPE [2], DATATYPE [3], DELVARX [1]
	DELVARX [2], DELVARX [3], DELVARX [4], HAVE_TAG, delvarx [5]
 CALLED BY:
	BLINK_MAP
 Common      :	None

 Restrictions:	None

 Side effects:	None

 Category    :	Structure handling

 Written     :	Dominic Zarro (SMA/GSFC), Jan 4, 1998

 Contact     : zarro@smmdac.nascom.nasa.gov


sprint $SSW/gen/idl/system/sprint.pro
[Previous] [Next]
 PROJECT:	SSW - GEN

 NAME:		sprint

 PURPOSE:	To spawn a print command

 CATEGORY:	PRINTER

 EXPLANATION:	The routine looks at the environment variables and the
		switches set to figure out the print command.  The
		environment variables checked are:
                  o $SSW_QUE_PS        - the queue to print PostScript file
                  o $SSW_QUE_ASCII     - the queue to print ASCII
                  o $SSW_QUE_PS_COLOR  - the queue to print color PostScript
                  o $SSW_PR_PS         - the command to print PostScript file
                  o $SSW_PR_PS_COLOR   - the command to print color PostScript
                  o $SSW_PR_ASCII      - the command to print ASCII in portrait
                  o $SSW_PR_ASCII_LAND - the command to print ASCII landscape
                  o $SSW_FMT_ASCII     - the pre-formatting for ASCII in portrait
                  o $SSW_FMT_ASCII_LAND- the pre-formatting for ASCII landscape
		   o $SSW_PR_NODE	- the output node to print to

		The PR* commands can have the string FILENAME where the names
		of the files need to be inserted, and QUEUE_NAME where the
		name of the queue needs to be inserted.

		The order for the logic for generating the print command is:
			1) The print command is passed in (cmd=cmd)
			2) The queue name is passed in (queue=queue)
			3) Use the SSW_PR* command env variables
			4) Use the SSW_QUE* command env vars.  These are ignored
			   if the SSW_PR* command env var is defined, unless it
			   is defined using QUEUE_NAME place holder.
			5) Assume some defaults based on the operating system
			6) Use the SSW_FMT* on ASCII to pre-process the file
			   and to pipe it into the print command
			7) Check if the SSW_PR_NODE option is used and
			   format the command accordingly

		Defaults:
			o Assumes it should go to the PostScript queue
			o For ASCII data, it assumes portrait

		Samples:
		    setenv SSW_QUE_PS	     lps20
		    setenv SSW_QUE_PS_COLOR  kodak
		    setenv SSW_QUE_ASCII     lps20
		    setenv SSW_PR_PS	     "lpr -P QUEUE_NAME FILENAME"
		    setenv SSW_PR_ASCII	     "lpr -P QUEUE_NAME FILENAME"
		    setenv SSW_PR_ASCII_LAND "lpr -P QUEUE_NAME FILENAME"
		    setenv SSW_FMT_ASCII     "/usr/lib/print/lptops -G -V -U -FCourier -P10pt FILENAME"
		    setenv SSW_FMT_ASCII_LAND "/usr/lib/print/lptops -G -H -U -FCourier -P8pt  FILENAME"

		    setenv SSW_PR_NODE       "diapason"
		    setenv SSW_PR_ASCII	     "/pslaser FILENAME type10 lm=1"
		    setenv SSW_PR_PS	     "cat FILENAME | rsh sxt3 lpr"

 CALLS: ***
	str_replace [1], str_replace [2]
 CALLED BY:
	disp_therm_rs232, high_mag_lat, lprint Obsolete  see sprintpro, sysprint [1]
	sysprint [2]
		NOTE: If you specify QUEUE_NAME in the command then the queue
		      MUST be define (by QUE* env var or passed in)

 SYNTAX:	sprint, 'idl.ps'

 INPUTS:	file	- The name of the file to be printed.
		cmd	- [KEYWORD] The print command to use
		queue	- [KEYWORD] The queue name to print to
		ps	- [KEYWORD] If set, use the PS command or queue
		ascii	- [KEYWORD] If set, use the ASCII command or queue
		land	- [KEYWORD] If set, use the ASCII_LAND command
		color	- [KEYWORD] If set, use the PS_COLOR command or queue
		delete	- [KEYWORD] If set, then delete the file afterwards
		nospawn	- [KEYWORD] If set, then simply display the print
			  command, but do not spawn the command
		noprint	- [KEYWORD] same as /NOSPAWN
		node	- [KEYWORD] If set, then format the statement to
			  do a "cat FILENAME | rsh node " and then the
			  print statement.  BE AWARE: The print command
			  must allow inputs to be piped into it.

 HISTORY:	Ver 1.00	27-Jun-95	M.Morrison	Written
		Ver 1.01	28-Jun-95	M.Morrison
				- Added /NOPRINT option
		Ver 1.02	29-Jun-95	M.Morrison
				- Renamed all env vars to have SSW_ preceding
		Ver 1.03	14-Apr-97	M.Morrison
				- Modified header slightly
				- Added "IS_PS" call
				- Removed MESSAGE calls, added PRINT
		Ver 1.04	14-Apr-97 	M.Morrison
				- Added SSW_FMT_ASCII* capability


SPS $SSW/gen/idl/fund_lib/sdac/sps.pro
[Previous] [Next]
 Project     : SDAC
                   
 Name        : SPS
               
 Purpose     : Set the graphic device to Postscript and use machine fonts.
               
 Category    : SPEX, GRAPHICS
               
 Explanation : Uses set_plot,'ps' and !p.font=0
               
 Use         : SET_PS [,/LAND] [,/PORTRAIT] [,/FULLPORTRAIT]
    
 Inputs      : 
               
 Opt. Inputs : None
               
 Outputs     : None

 Opt. Outputs: None
               
 Keywords    : 
	/landscape - default landscape orientation
	/portrait - default portrait orientation
	/fullportrait - full page portrait orientation
	/color    - set up for color postscript
	/encaps   - encapsulated postscript

 Calls       :
 CALLED BY:
	BATSE_FLARES_WEEK, FS_AUTO_LOG, GE_WINDOW [1], HESSI_ATTENUATOR_SPECTRA
	PLOT_ANGC [1], PLOT_ANGC [2], PLOT_GD, PLOT_HESSI_FILTERS, QLDISPLAY
 Common      : FCOLOR_PS, FENCAPS_PS
               
 Restrictions: 
               
 Side effects: None.
               
 Prev. Hist  : Was PS.PRO changed because of ssw conflict.

 Modified    : Version 1, RAS, 12-apr-1997


SQUEEZE $SSW/gen/idl/util/squeeze.pro
[Previous] [Next]
NAME:
     SQUEEZE
PURPOSE:
     Squeeze a vector down to unique elements (gets rid of values which are
     in the vector more than once, leaving only one of each).  The order of
     the input is preserved: the first instance of a value is kept and the 
     following instances are dropped.
CATEGORY:
CALLING SEQUENCE:
     xs = squeeze(x)
     xs = squeeze(x,y)
INPUTS:
     x = a vector
OPTIONAL INPUT PARAMETERS:
     y = additional constraint such that x-elements and y-elements must 
         both match for an element to be deleted.  x and y must have the 
         same dimension.
KEYWORD PARAMETERS
     yout = y values after squeezing.  If /index is set, yout is the same
            indices returned in xs.
     /index = return indices to x, instead of the squeezed x.  The indices
              are the x elements to keep, not the x elements to delete.
     /nosort = do not sort the input array.  This has the effect of only
               dropping non-unique elements which are adjacent.
OUTPUTS:
     xs = squeezed vector
 CALLED BY:
	HSI_GET_DATA, HSI_IMAGE_ERROR, HSI_PIXON_LOCAL_SMOOTH, HXT_AUTOIMG, HXT_ERROR
	LOCAL_SMOOTH, SXT_QLOOK, hxtpix, makestr, sxt_align
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
     Not guranteed to work with floating point.  
     Works with int, long and char arrays.
PROCEDURE:
MODIFICATION HISTORY:
     T. Metcalf  March 23, 1993 


SRCOR $SSW/gen/idl_libs/astron/idlphot/srcor.pro
[Previous] [Next]
 NAME:
       SRCOR
 PURPOSE:
       Correlate the source positions found on two lists.
 CALLING SEQUENCE:
       srcor,x1in,ylin,x2in,y2in,dcr,ind1,ind2
 INPUTS:
       x1in,y1in - First set of x and y coordinates.  The program
                   marches through this list element by element,
                   looking in list 2 for the closest match.  So, the program
                   will run faster if this is the shorter of the two lists.
                   Unless you use the option or magnitude keyword, there is
                   nothing to guarantee unique matches.  
       x2in,y2in - Second set of x and y coordinates.  This list is
                   searched in its entirety every time one element of list 1
                   is processed.
       dcr - Critical radius outside which correlations are rejected;
             but see 'option' below.
 CALLS: ***
	GCIRC, REMOVE [1], REMOVE [2]
 OPTIONAL KEYWORD INPUT:
       option - Changes behavior of program and description of output
                lists slightly, as follows: 
       OPTION=0 or left out
             Same as older versions of SRCOR.  The closest match from list2
             is found for each element of list 1, but if the distance is
             greater than DCR, the match is thrown out.  Thus the index
             of that element within list 1 will not appear in the IND1 output
             array.
       OPTION=1
             Forces the output mapping to be one-to-one.  OPTION=0 results,
             in general, in a many-to-one mapping from list 1 to list 2.
             Under OPTION=1, a further processing step is performed to
             keep only the minimum-distance match, whenever an entry from
             list 1 appears more than once in the initial mapping.
       OPTION=2
             Same as OPTION=1, except the critical distance parameter DCR
             is ignored.  I.e., the closest object is retrieved from list 2
             for each object in list 1 WITHOUT a critical-radius criterion,
             then the clean-up of duplicates is done as under OPTION=1.
       magnitude
             An array of stellar magnitudes corresponding to x1in and y1in.  
             If this is supplied, then the brightest star from list 1
             within the selected distance of the star in list 2 is taken.
             The option keyword is ignored in this case.
       spherical
             If SPHERICAL=1, it is assumed that the input arrays are in
             celestial coordinates (RA and Dec), with x1in and x2in in
             decimal hours and y1in and y2in in decimal degrees.  If
             SPHERICAL=2 then it is assumed that the input arrays are in
             longitude and latitude with x1in,x2in,y1in,y2in in decimal
             degrees.  In both cases, the critial radius dcr is in
             *arcseconds*.  Calculations of spherical distances are made
             with the gcirc program.
 OUTPUTS:
       ind1 - index of matched stars in first list
       ind2 - index of matched stars in second list
 COMMON BLOCKS:
       none
 SIDE EFFECTS:
       none
 METHOD:
       See under keyword LEVEL above.
 REVISON HISTORY:
       Adapted from UIT procedure  J.Wm.Parker, SwRI 29 July 1997
       Converted to IDL V5.0   W. Landsman   September 1997
       


ssw_addmm_gen $SSW/gen/idl/ssw_util/ssw_addmm_gen.pro
[Previous] [Next]
   Name: ssw_addmm_gen

   Purpose: add $SSW_MMM gen libraries for multi-instrument missions

   Input Parameters:
      mmmissions - optional vector of missions to include

   Keyword Parameters:
      no_startup - (switch) if set, don't execute $SSW/<MM>/setup/IDL_STARTUP(s) 

 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], STR2ARR [1], STR2ARR [2]
	concat_dir [4], get_logenv [1], get_logenv [2], main_execute [1]
	main_execute [2], ssw_path, str_replace [1], str_replace [2], where_arr [1]
	where_arr [2]
   History:
      9-March-2005 - S.L.Freeland - long planned rationalization...
     27-sep-2005   - S.L.Freeland - fix multi insstr/mission bug
                                    reported by W.Thompson 
     18-oct-2005   - S.L.Freeland - add <MM>/gen/setup/IDL_STARTUP support 
                                    and /NO_STARTUP keyword 
     26-jun-2006   - S.L.Freeland - turn on solarb..
     30-Sep-2006   - Zarro - added HINODE


ssw_apkpbar $SSW/gen/idl/ssw_util/ssw_apkpbar.pro
[Previous] [Next]
   Name: ssw_apkpbar
 
   Purpose: annotate utplot with ap/kp index colorbar

   Input Paramters:
      time0, time1 - optional time range - default is current UTPLOT

   Keyword Paramters:
      tickpos,ticklen,thick,labcolor,labpos - per evt_grid.pro definitions
      label - if set, annotate color bars with level
      labove/lbelow (implies /LABEL) - relative label positions (def=/labove)
      blank - if set, blank area around annotation

   History:
     9-mar-2005 - S.L.Freeland - annotate some space weather/latest events
    14-mar-2005 - S.L.Freeland - auto-scale label positions w/respect to bars 
   
 CALLS: ***
	BOX_MESSAGE, SSW_GETAPKP, SSW_LCLIMIT_COLORS, UTPLOT [1], UTPLOT [2], UTPLOT [3]
	UTPLOT [4], UTPLOT [5], UTPLOT [6], data_chk [1], data_chk [2], evt_grid
	get_utevent [1], get_utevent [2], gt_tagval [1], gt_tagval [2], reltime [1]
	reltime [2], ssw_deltat
   Side Effects:
     clobbers 1st 15 r,g,b indices


ssw_bin $SSW/gen/idl/ssw_system/ssw_bin.pro
[Previous] [Next]
   Name: ssw_bin

   Purpose: return system-dependent BIN directory OR executable name w/path

   Input Parameters:
      routine - if supplied, return executable name (with path)

   Keyword Parameters:
      found (output) - boolean (TRUE if found, FALSE if not found)
      warning - if set and routine NOT found, print a warning message

   Calling Sequence:
      bindir=ssw_bin()                            ; default SSW bin for system
      exenam=ssw_bin('name', found=found)         ; form&find executable

   Calling Examples (as run on an Alpha-OSF):
      IDL> mpeg=ssw_bin('mpeg_encode', found=found)  ; find executable
      IDL> print,strrep_logenv(mpeg,'SSW')           ; show answer  
           $SSW/bin/OSF_alpha/mpeg_encode            ; <- the SSW standard
      
      IDL> print,ssw_bin('whirlgif')            ; also checks other areas
           $HOME/bin/whirlgif                   ; found a local version

 CALLS: ***
	BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CONCAT_DIR [1], CONCAT_DIR [2]
	CONCAT_DIR [3], FILE_EXIST [2], OS_FAMILY, STR2ARR [1], STR2ARR [2], STRREP_LOGENV
	break_file [4], concat_dir [4], file_exist [1], file_exist [3], get_logenv [1]
	get_logenv [2], uniqo [1], uniqo [2]
 CALLED BY:
	F0READ, READ_PS [1], RICE, SSW_WRITE_GIF, URL_GET, WR_MOVIE, idl_server_command
	image2movie, ssw_install [2], ssw_start_rpcserver, wwwidl_server_check
   History:
      5-Mar-1997 - S.L.Freeland - written
     15-apr-1997 - S.L.Freeland - look add SSW_XXX/bin and SSW_XXX/exe
     30-apr-1997 - S.L.Freeland - check $SSW/packages/XXX/bin and exe
     18-aug-1997 - S.L.Freeland - include $SSW_BIN (scripts, mirror, etc)
      9-sep-1998 - S.L.Freeland - include user $path, add /SSW_ONLY
     24-apr-1999 - S.L.Freeland - protect agains NULL instrument...


ssw_build_trace $SSW/gen/idl/ssw_util/ssw_build_mosaic.pro
[Previous] [Next]
   Name: ssw_build_trace

   Purpose: build a mosaic from components w/ssw std.

   Input Parameters:
      index, data  - standard SSW 'index,data' cubes (trace,sxt,...)
      
   Output Parameters:
      mindex - the mosaic composite 'index' (index2map et al ready...)
      mdata  - the mosaic data
  
   Keyword Parameters:
      ref_fov - optional complete list of reference index for fov determ.
      csize - (pixels) composite size (default is extremes of components)
      fov   - solar FOV in arcminutes (default is extremes of components)
      pixmap - if set, build mosaic in off screen PIXMAP
      zbuffer - if set, build mosaic in Z-buffer  
      composite - type of compositing to do (per plot_map)
                  default=3 for "TRACE-like" (auto vignette correct)
      rotate - if set, diff-rot (via drot_map) components relative to reference
      fast   - if set, do fast diff-rot (translational) - ~ok if close in time
  
      _extra=_extra - most others passed to plot_map

   Calling Seqeunce:
     [select, process, and scale your 'data' (mosaic cube) as desired, then...]
     IDL> ssw_build_mosiac, index, data, mindex, mdata [options]

   Method:
      index2map and index2fov, $
         Then apply Dominic Zarro mapping SW to position/composite

 CALLS: ***
	BOX_MESSAGE, DROT_MAP, INDEX2MAP, PLOT_MAP2, PMM [3], SSW_BUILD_MOSAIC, WDEF [1]
	WDEF [2], anytim [1], anytim [2], anytim [3], anytim [4], anytim [5], data_chk [1]
	data_chk [2], get_infox, gt_tagval [1], gt_tagval [2], index2fov, pmm [1], pmm [2]
	rem_elem [1], rem_elem [2], tim2dset [1], tim2dset [2], time_window
	update_history
   Restrictions:
     Need index,data with SSW standards (ex: read_trace default output)
     Need at least one SOHO instrument in  SSW path  
  
   History:
      28-April-1998 - S.L.Freeland - apply SSW/Mapping techniques to TRACE
       2-Nov-1999   - S.L.Freeland - made interface copecetic, "genericize"
                                     derive default center and fov using
                                     index2fov,/extreme call
      22-Nov-1999   - S.L.Freeland - add PERCENTD to history info
      23-Nov-1999   - S.L.Freeland - add drot_map.pro hooks  (/rotate,/fast)
      18-May-2000   - B.N.Handy    - Change an 'endif' to 'endelse' so this
                                     works on solaris/IDL5.3


ssw_check_contrib $SSW/gen/idl/ssw_system/ssw_check_contrib.pro
[Previous] [Next]

   Name: ssw_check_contrib

   Purpose: check local contrib area to see if routines have made it online

   Keyword Parameters:
      loud     - if set, print some status messsages
      nomail   - if set, dont mail results (implies /LOUD)
      testing  - if set, check and mail but dont move or delete
      noaction - synonym for TESTING
      move     - optional path to move to  (default=$SSW_CONTRIB_BACKUP)
      backup   - synonym for MOVE
      delete   - if set, DELETE as well as Copy (ie, a true move)
      no_delete - if set, dont delete after copy (/DELETE IS DEFAULT)

   Calling Sequence:
      ssw_check_contrib,/delete     ; monitor $SSW_CONTRIBUTED
                                    ; move files which are identical to 1st
                                    ; $SSW match - send email 

      ssw_check_contrib,/testing    ; just check status and send email

 CALLS: ***
	BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CONCAT_DIR [1], CONCAT_DIR [2]
	CONCAT_DIR [3], FILE_EXIST [2], STR2ARR [1], STR2ARR [2], STRREP_LOGENV, UTC2DOW
	anytim2ints [1], anytim2ints [2], break_file [4], concat_dir [4], data_chk [1]
	data_chk [2], ex2fid [1], ex2fid [2], file_diff, file_exist [1], file_exist [3]
	file_info2 [1], file_info2 [2], file_list [1], file_list [2], fmt_tim [1]
	fmt_tim [2], get_logenv [1], get_logenv [2], int2secarr [1], int2secarr [2]
	mail [1], mail [2], pr_status [1], pr_status [2], prstr [1], prstr [2], rem_elem [1]
	rem_elem [2], sswloc, str_replace [1], str_replace [2], strjustify, ut_time [1]
	ut_time [2]
   History:
      6-may-1997 - S.L.Freeland
      9-may-1997 - S.L.Freeland, flag files hanging around too long
                                 files OLDER than corresponding SSW
                                 pretty up output messages.
                                 made /delete the default
                                 notify $SSW_SW_NOTIFY
      9-Sep-1997 - M.D.Morrison, Send mail only on Sundays
       3-Dec-1997 - S.L.Freeland, initialize a variable 


ssw_colors $SSW/gen/idl/ssw_util/ssw_colors.pro
[Previous] [Next]
   Name: ssw_colors

   Purpose: load SSW color tables, optionally return RGB

   Input Parameters:

   Keyword Parameters:
      Instrument - instrument prefix (eit, sxt, sumer) 

 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], FILE_EXIST [2], LOADCT
	concat_dir [4], data_chk [1], data_chk [2], file_exist [1], file_exist [3]
	get_logenv [1], get_logenv [2]
 CALLED BY:
	eit_colors
   History:
      18-Feb-1996 S.L.Freeland
      13-Nov-2000 S.L.Freeland - include trace CT.


ssw_composite $SSW/gen/idl/ssw_util/ssw_composite.pro
[Previous] [Next]
   Name: ssw_composite

   Purpose: form composite of 2 or more images

   Input Parameters:
      index, data - standard SSW 'index,data' - 3D, assumed pre-aligned

   Output Parameters:
      cindex - index - w/history record of component image times 
      cdata - the composite image

   Keyword Parameters:
      mode - type of compositing
             Mode 1 -> greatest valued pixel
             Mode 2 -> least valued pixel    [continum images for example]
             Mode 3 -> total of all images   [just does total(data,3) ]
 CALLS:


ssw_conflicts $SSW/gen/idl/ssw_system/ssw_conflicts.pro
[Previous] [Next]
   Name: ssw_conflicts

   Purpose: check input files or files matching pattern against online SSW

   Input Parameters:
      pattern - string pattern of files or paths to check (ex: 'yohkoh/gen' )

   Keyword Parameters:
      conffile     - optional conflict file name 
      full         - if set, do a full listing
      conflicts    - if set, only show conflicts
      nomail       - if set, don't mail results
      /XXX (anything else) - instrument, mission, or package to check
      except - optional string/path pattern to ignore (beta testing for examp
               might exclude release area since conflicts expected       

   Calling Sequence:
      ssw_conflicts,/xxx		; Routines instrument/mission/pack XXX 
      ssw_conflicts,'pattern'          ; check SSW files matching pattern

   Calling Examples:
      ssw_conflicts,/cds               ; conflicts under CDS branch
      ssw_conflicts,/chianti           ; conflicts under Chianti Package
      ssw_conflicts,/gen               ; conflicts under $SSW/gen/...
      ssw_conflicts,'soho/gen'         ; conflicts unser $SSW/soho/gen
      ssw_conflicts,/sxig12_YYMMDD, except='/sxig12/' ; EXCEPT to ignore "expected" conflicts

 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], FILE_EXIST [2], MORE [1], MORE [2]
	STRPAD, STRREP_LOGENV, concat_dir [4], data_chk [1], data_chk [2], file_append [1]
	file_append [2], file_diff, file_exist [1], file_exist [3], get_logenv [1]
	get_logenv [2], get_user [1], get_user [2], mail [1], mail [2], pr_status [1]
	pr_status [2], rem_elem [1], rem_elem [2], ssw_strsplit, sswloc, str_replace [1]
	str_replace [2], strjustify
   History:
      31-oct-1996 - S.L.Freeland - derive from chk_conflict 
      12-apr-1997 - protect output in case where number conflicts eq ZERO!
                    (a sign that we are making progress...)
                    add a status line (SSWLOC search pattern used)
                    cleanup and document - send mail by default
      09-May-2003, William Thompson - Use ssw_strsplit instead of strsplit
      13-May-2003, S.L.Freeland, added EXCEPT keyword and function
  
   Method:
      Call sswloc to get matching file list
      Call file_diff(/idlpro) to differentiate CODE & HEADER differences
      Keyword Inheritance used for self updating actioin
      (new misstions, instruments, packages added to SSW need no change)


ssw_contrib_info $SSW/gen/idl/ssw_system/ssw_contrib_info.pro
[Previous] [Next]
   Name: ssw_contrib_info

   Purpose: return info from ssw_contrib 'jobfile' in structure

   Input Parameters:
      jobfile - ascii ssw_contrib 'job' file (contrib summary)

   Output Parameters:
      pcnt - number of *.pro files included (may be zero...)

   Keyword Parameters:
      pros - (OUTPUT) list of *.pro files  [ strarr(pcnt) ]  
  
 CALLS: ***
	BOX_MESSAGE, FILE_EXIST [2], STR2ARR [1], STR2ARR [2], data_chk [1], data_chk [2]
	file_exist [1], file_exist [3], gt_tagval [1], gt_tagval [2], rd_tfile [1]
	rd_tfile [2], strpair2struct
 CALLED BY:
	ssw_contrib_monitor
   History:
    ~1-Jan-1998 - S.L.Freeland - original
   21-Sep-1999 - S.L.Freeland - match updated 'job' format

   Calling Seqeunce:
      jobinfo=ssw_contrib_info(jobfile [pcnt, pros=pros ])
  
   Method:
     call rd_tfile/strpair2struct/str2arr/gt_tagval

   Calling Example
                              |INPUT   |OUT  |OUT
   IDL> help,ssw_contrib_info(jobfile, pcnt, pros=pros),/str  ; << CALL
   ** Structure MS_307224832001, 9 tags, length=72:           
   FROM            STRING    ' freeland@sxt1.lmsal.com'
   MASTERIP        STRING    ' diapason.lmsal.com'
   MASTER          STRING    ' trace'
   MASTERPATH      STRING    ' /tsw'
   JOBPATH         STRING    ' /pub/incoming/ssw/freeland'
   JOBNAME         STRING    ' ssw_contrib.freeland.990921.110359'
   TARFILE         STRING    ' ssw_contrib.freeland.990921.110359.tar'
   SSWPATH         STRING    ' idl/util'
   FILESTRANSFERED STRING    ' one.pro two.pro three.pro'

   IDL> more,pros           ; *.pros returned in keyword <PROS>
      one.pro
      two.pro
      three.pro
			   


ssw_contrib_monitor $SSW/gen/idl/ssw_system/ssw_contrib_monitor.pro
[Previous] [Next]
   Name: ssw_contrib_monitor

   Purpose: monitor "ssw_contrib"uted SW, optionally online=>SSW

   Input Parameters:

   Keyword Parameters:
      incoming_dir  - local directory where ssw_contrib stuff is placed
      processed_dir - local directory where processing is done
      notify - if set, name of user(s) to notify when some processing is done
      noremove - if set, dont remove versions from incoming_dir 

   Method:
      Uses information in 'ssw_contrib' job description.

 CALLS: ***
	BOX_MESSAGE, CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], FILE_EXIST [2], POPD
	PUSHD, STR2ARR [1], STR2ARR [2], STRTAB2VECT, concat_dir [4], curdir [1], curdir [2]
	data_chk [1], data_chk [2], dir_since, file_exist [1], file_exist [3]
	get_logenv [1], get_logenv [2], gt_tagval [1], gt_tagval [2], pr_status [1]
	pr_status [2], ssw_contrib_info, ssw_contrib_ok2online, ssw_strsplit
	str2cols [1], str2cols [2], strarrcompress
   Side Effects:
     any ssw_contrib files under /<incoming_dir> are moved to /<processed_dir>

   History:
      1-Mar-1999  - S.L.Freeland
     21-Sep-1999  - S.L.Freeland - mods for update format, functional
      09-May-2003, William Thompson - Use ssw_strsplit instead of strsplit


ssw_contrib_ok2online $SSW/gen/idl/ssw_system/ssw_contrib_ok2online.pro
[Previous] [Next]
  
   Name: ssw_contrib_ok2online

   Purpose: boolean - true if JOBINFO passes sanity/security tests

  Input Parameters:
      JOBINFO - structure represtenting ssw_contrib job log
                (output from ssw_contrib_info.pro)
  
 CALLS: ***
	BOX_MESAGE, BOX_MESSAGE, STR2ARR [1], STR2ARR [2], STRTAB2VECT, gt_tagval [1]
	gt_tagval [2], is_member [1], is_member [2]
 CALLED BY:
	ssw_contrib_monitor
   History:
      21-Sep-1999 - S.L.Freeland


SSW_CROSSCORR $SSW/gen/idl/util/ssw_crosscorr.pro
[Previous] [Next]
 Project     : SDAC
                   
 Name        : SSW_CROSSCORR 
               
 Purpose     : This procedure computes a crosscorrelation function between two
		time series.
               
 Category    : MATH
               
 Explanation : 
		using the IDL function R=CORRELATE(xx,yy)
		R=TOTAL(xx*yy)/SQRT(TOTAL(xx^2)*TOTAL(yy^2))
		r0 and r1 are two arrays of equal length 
               
 Use         : CROSSCORR, R0, R1, CC, II, NPIX
		crosscorrelation function CC(R0,R1) with time delay -NPIX<II<NPIX

 Inputs      : R0 - first time series
		R1 - second time series, same length as R0, same time bins
		NPIX - half-width of crosscorrelation interval, in bin units of R0               
 Opt. Inputs : None
               
 Outputs     : CC - Crosscorrelation function vs lag.
		II - lag in units of bins of R0 and R1
 Opt. Outputs: None
               
 Keywords    : 

 Calls       : ***
	CHECKVAR [1], CORRELATE, checkvar [2]
 Common      : None
               
 Restrictions: 
               
 Side effects: None.
               
 Prev. Hist  :
		created by M.Aschwanden, March 1995
 Modified    : 
		Version 2, RAS, documented added to SDAC tree 6-jan-1997
		Version 3, RAS, fixed bugs, 26-mar-1997
		14-jun-2001, renamed from crosscorr to prevent conflict, RAS


ssw_ct2rgb $SSW/gen/idl/ssw_util/ssw_ct2rgb.pro
[Previous] [Next]
   Name: ssw_ct2rgb

   Purpose: return RGB for give IDL or SSW wavelength dependent color table

   Input Parameters:
      table - RSI color table number -OR- SSW wavelength

   Output Parameters:
      r,g,b
      name - associated ascii color table name  
    
   Keyword Parameters:
      gamma -   optional gamma factor (applied to given table)
      reverse - switch, if set, reverse color table
      low  - optional low (stretch range)
      hight - optional high (stretch range)

   Calling Sequence:
    ssw_ct2rgb,table, r,g,b [name, /reverse, gamma=gamma, low=low, high=high]
               -OR-
    ssw_ct2rgb,WAVE , r,g,b [name, /reverse, gamma=gamma, low=low, high=high]
  
 CALLED BY:
	trace_last_movie [2]
   History:
      2-Jun-1997 - S.L.Freeland - simplify some WWW work
      3-Jun-1997 - S.L.Freeland - restore incoming rgb, document
     25-apr-1998 - S.L.Freeland - combine 'ssw_colors' and 'ct2rgb' functions

   Method: uses Z-buffer 

 CALLS: ***
	BOX_MESSAGE, CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], LOADCT, STRETCH
	concat_dir [4], data_chk [1], data_chk [2], get_logenv [1], get_logenv [2]
	is_member [1], is_member [2]
   Side Effects:
     May change color table (if /loadit set OR no output RGB supplied)


ssw_deltat $SSW/gen/idl/ssw_util/ssw_deltat.pro
[Previous] [Next]
   Name: ssw_deltat

   Purpose: return deltaTime between input times in specified units
      
   Input Parameters:
       t0 - start time OR a vector of times - any SSW format
       t1 - optional end time if t0 is scalar  [output is d(timegrange) ]

   Output:
      Function returns delta-time in specified units (default seconds)
      n_elements(output) = n_elements(inputtimes)-1
  -OR-                   = n_elements(inputtimes) if REFERENCE specified
                                            
   Keyword Parameters:
      SECONDS,MINUTES,HOURS,DAYS  - output units (default=seconds)
      reference - optional reference time for compare (any SSW format)
  
   Calling Sequence:
      dt=ssw_deltat(t0,t1)			; explicit start and stop time
      dt=ssw_deltat(times)			; vector of times   
      dt=ssw_deltat(times, reference=reftime)  ; dTimes/dReference
  
   Calling Examples:
      dt=ssw_delta(index)                           ; dT (between elements) 
      dt=ssw_delta('1-feb-98', '23-mar-02', /days)  ; dT (time range)
      dt=ssw_deltat(index, reference='3-apr-1998')  ; dT/dREFERENCE

   Illustration [ timegrid and ssw_deltat ]

   IDL> tgrid=timegrid('1-feb',nsamp=3,hours=48)    ; make dummy time array
   IDL> more,anytim(tgrid,/ecs)
     1998/02/01 00:00:00.000
     1998/02/03 00:00:00.000
     1998/02/05 00:00:00.000

   IDL> more,ssw_deltat(tgrid,ref='2-feb',/days)    ; show dT/dREF
        -1.0000000
         1.0000000
         3.0000000
  
 CALLS: ***
	anytim [1], anytim [2], anytim [3], anytim [4], anytim [5], deriv_arr [1]
	deriv_arr [2]
 CALLED BY:
	GOES_TEK [1], eit_proton_summary, ftp_list_since, get_goes_defsat [1]
	get_goes_defsat [2], get_ssc_best, goes3sec_copy, hxt_impulsivness, image2movie
	leak_sub [1], leak_sub [2], leak_sub [3], les_archive_info, plot_ace, plot_goesp
	pr_his_index [1], pr_his_index [2], pr_his_index [3], rd_goesp_ascii
	rd_goesx_ascii, read_genxcat, sel_leak_image [1], sel_leak_image [3]
	sel_leak_image [4], soon_catstat, ssw_apkpbar, ssw_flare_locator
	ssw_fov_context, ssw_getcme_cactus, ssw_getdst, ssw_in_timerange
	ssw_time_compare, ssw_timestat, sxt2mpeg, sxt_is_synsfc, sxt_uvf_info [1]
	sxt_uvf_info [3], time_window, trace_cosmic2filename, trace_goodobs
	trace_movie_index [1], trace_movie_index [2]
   History:
      Circa 1-jan-1997 - S.L.Freeland
      25-May-1998 - S.L.Freeland use <anytim> in place of <anytim2ints>  
       3-Dec-1998 - S.L.Freeland - add REFERENCE and some documentation


ssw_env $SSW/gen/idl/ssw_system/ssw_env.pro
[Previous] [Next]
   Name: ssw_env

   Purpose: add & remove SSW elements IDL !path, optionally run setup.NNN

   Category: system, environment

   Calling Sequence:
      ssw_path,/instrument [,/instrument ,/remove]

 CALLS: ***
	pathfix, prstr [1], prstr [2], ssw_instruments
   History:
      15-Jun-1995 (SLF)


ssw_expand_times $SSW/gen/idl/ssw_util/ssw_expand_times.pro
[Previous] [Next]
   Name: ssw_expand_times

   Purpose: expand time vector to match sample cadence

   Input Parameters:
      intimes - structure vector with SSW compliant times

   Output Parameters:
      otimes - time vector (expanded)
      odata  - data samples (1D)

    Keyword Parameters:
      out_style - desired output time style (see anytim.pro) DEF=INTS
      _extra - Data Tag to extract (determines samples per structure)
      ddt - delta-T per sample  
      offset_ddt - optional delta-T (seonds) between intimes and 
                   first sample   
      
   Calling Sequence:
                        IN       OUT     OUT
      ssw_expand_times, intimes, otimes, odata [,out_style=out_style], $
                        ddt=ddt, offset_ddt=offset_ddt, $
                          _extra=_extra
   Calling Example:
      [ output from 'get_solar_indicies' includes 8 KP samples/structure ]
      IDL> ind=get_solar_indicies('1-nov-2001','1-dec-2001')
      IDL> ssw_expand_times,ind,kptime,kpdata,/kp,ddt=(3.*3600),out='utc_int
      IDL> help, ind, kptime, kpdata
       IND             STRUCT    = -> MS_060814109002 Array[31]
       KPTIME          STRUCT    = -> CDS_INT_TIME Array[248]
       KPDATA          INT       = Array[248]
      IDL> utplot,kptime,kpdata.... etc
 CALLS:


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

   Purpose: fill missing data with data from neighbors
  
   Input Parameters:
      cube  - data cube (output if only one parameter passed)

   Output Parameters:
      ocube - optional - output (filled cube) - default replaces input
 
   Keyword Parameters:
      missing - if set, pixel value considered 'missing' (default=0)
      times   - vector of image times (not yet implemented)
      track_progress - switch, if set, print correction status info 
      window - limit window of neighbors to check (+/- limit)
               (for large cubes, dont wander further than required 

   Output Parameters:
      orig_miss  - percent missing data in original cube [fltarr(nimages)]
      final_miss - percent missing data in final cube 

   Calling Sequence:
      ssw_fill_cube,cube		; overwrite input with filled version
      ssw_fill_cube,cube,ocube         ; filled version in ocube (orig saved)

   Calling Examples:
      ssw_fill_cube,cube, orig=orig, final=final
      ssw_fill_cube,cube, mising='aa'x  ; AA(hex) is "missing" (ex: fill data)
      ssw_fill_cube,cube, window=2      ; check neghbors within +2/-2 

 CALLED BY:
	ssw_flare_locator
   Restrictions:
      Assumes images are kindof like their neighbors 
      (normalization, wavelenth, structure, registration, time, whatever)

   History:
      24-apr-2001 S.L.Freeland - ssw_fill_cube from eit_fill_cube

   Previous History:

      17-feb-1996 S.L.Freeland - wrote eit_fill_cube
      18-Feb-1996 S.L.Freeland - add WINDOW keyword and function

   
 CALLS: ***
	data_chk [1], data_chk [2]
   Side Effects:
      Input array is filled ('clobbered') if only one parameter (for space)


ssw_find_transit $SSW/gen/idl/ssw_util/ssw_find_transit.pro
[Previous] [Next]
   Name: ssw_find_transit

   Purpose: find planet against solar disk

   Input Parameters:
      index, data - standard 'ssw' index,data 2D/3D (read_eit, read_trace..)

   Output Parameters:
      centx,centy - the weighted centroid position (planet location)

   Keyword Parameters:
     ponly   - output array of 'planet only'  (same size as data)
     boolean - if set, use boolean array instead of data array for centroid
     display - if set, show results
     sfactor - expected signal difference; default = .1 (10%)
     pixpad  - optional pixel padding (only consider this distance above limb)
               default=20 pix, increase for EUV & XRAY 
     xcen_limit - (input) optional xcen limits (restrict search to this reg)
     ycen_limit - (input) optional ycen limits (restrict search to this region)
     xpix_limit - (input) optional x pixel range restrict search to this reg)
     ypix_limit - (input) optional x pixel range restrict search to this reg)
  
     xcen,ycen - (output) centx and centy in arcsecs from sun center (ssw std)
     
   History:
      2-December-1999 - S.L.Freeland - orig for TRACE/Mercury transit
      3-December-1999 - S.L.Freeland - add call to ssw_mask_image
                        (enable xcen/ycen search limit)
 CALLS: ***
	AVERAGE, BOX_MESSAGE, CENTROIDW [1], CENTROIDW [2], SOLAR_MASK, SSW_MASK_IMAGE
	WDEF [1], WDEF [2], align_label, data_chk [1], data_chk [2]
   Restrictions:
      ~ on disk only - assumes planet signal low compared to solar disk 


ssw_flare_locator $SSW/gen/idl/ssw_util/ssw_flare_locator.pro
[Previous] [Next]
   ssw_flare_locator

   Purpose: locate flares from input data (3D or 2D)

   Input Paramters:
      index,data - ssw compliant 'index,data'; usually  
                   one "before" and another during or shortly after peak
   Output:
      function returns xcen/ycen of flare 

   Keyword Parameters:
      limb_pad - size of above limb region to consider  ( -> solar_disk.pro )
      smooth_width - width of box in boxcar smooth  
      nosmooth - switch, if set, don't apply the smoothing algorithm
      dark_flare - if set, look for dark, not bright "flare" (dimming?)
      helio - if set, function return heliographic (arcmin2hel convention)
      ldata - (output) - data array used in the location
      flare_helio (output) - flare coordinates in heliographic
      nofill - if set, dont fill missing pixels from neighbors 
           (default is to fill via ssw_fill_cube which results in zeroing out the  
            missing pixels in the differenence image, probably a reasonable thing)
      nospikes/despikes (input, synonyms) - if set, despike both images prior to
               applying flare algorithm (suggested if not done prior to call)
               Current algorithm is via ssw/gen nospike.pro (/FLARE set)
      reg_minutes - if set, number of minutes seperation when image
               registration w/differential rotation will kick in
               (default is no registration)

 CALLS: ***
	ARCMIN2HEL, BOX_MESSAGE, COMP_FITS_CRVAL, CONV_A2H [1], CONV_A2H [2], REVERSE
	SOLAR_MASK, SSW_REGISTER, anytim [1], anytim [2], anytim [3], anytim [4], anytim [5]
	coord_l2v, data_chk [1], data_chk [2], difference_movie, gt_tagval [1]
	gt_tagval [2], nospike, ssw_deltat, ssw_fill_cube, struct2ssw
   History:
      Circa Jan 1 2002 - written

      16-Mar-2004 - allow one image (make it look like 2)
                    protect against 2 image input of identical images
      12-may-2005 - add REG_MINUTES keyword and function


ssw_fov_context $SSW/gen/idl/ssw_util/ssw_fov_context.pro
[Previous] [Next]
   Name: ssw_fov_context

   Purpose: generate a 'context' image for a reduced FOV or movie sequence

   Input Parameters:
      structure - index (of index,data pairings)
      data  - the data cube (if index,data input)

   Output:
      Function returns the context image (overlay, GOES LC...)

   Keyword Parameters:
      fdmap - optional context map for overlays - if not passed, generated
      fd_type - type of context map - default = 'eit171'
                {'eit304','eit195','eit284','eit171'}  - EIT options
                { 171,195}                             - TRACE options  
                { sxt }                                - SXT optioins

      fov - arcminutes FOV of full disk to include in composite
            default is derived from [dXCEN, dYCEN]+pad

      center - FOV center of full disk
               defaults: FOV(index; ie, subfield) if only one FOV
                         Sun Center if
      oplotnar - if set, overplot NOAA AR
      offset   - per OFFSET parameter in oplot_nar.pro 
                 [offset the AR# from the location to see the action]
      midpoint - if set, only overplot middle FOV (say)
      extremes - if set, only overplot 1st and last
      ss       - user supplied subset of fovs to overplot
  
   Calling Sequence:
       IDL> context_image=ssw_fov_context(index, data [keywords] )

   Calling Example:
      IDL> context=ssw_fov_context(tindex,tdata,fdtype='eit284',/l1q, $
                      xsize=1024,grid=15,fov=20)
  
 CALLED BY:
	trace_special_movie [1], trace_special_movie [2], trace_special_movie [3]
	trace_special_movie2
   History:
       1-Jan-1999 - (Circa) - S.L.Freeland
      14-Apr-1999 - S.L.Freeland add /OPLOTNAR and OFFSET keywords
      25-May-1999 - S.L.Freeland add /MIDPOINT and SS keyword and function
       5-Oct-2001 - S.L.Freeland add SSCFILES 
      13-Feb-2002 - S.L.Freeland - for recent data, hook for $SSWDB EIT_L1Q
      17-mar-2003 - S.L.Freeland - rotate NAR if oplot_nar set (via drot_nar)

   Method:
      Use mapping SW for FOV overlay on FD image, optionally GOES/event

   Calls: ***
	BOX_MESSAGE, DELVARX [1], DELVARX [2], DELVARX [3], DELVARX [4], DO_EIT_SCALING
	DROT_MAP, DROT_NAR, EIT_PREP, FILE2TIME, FMT_TIMER [1], FMT_TIMER [2], GET_NAR
	GRID_MAP, INDEX2MAP, OPLOT_NAR [1], OPLOT_NAR [2], PLOT_GOES, PLOT_MAP, RD_XDA [1]
	RD_XDA [2], WDEF [1], WDEF [2], anytim [1], anytim [2], anytim [3], anytim [4]
	anytim [5], data_chk [1], data_chk [2], delvarx [5], evt_grid, get_infox
	get_logenv [1], get_logenv [2], get_sfm, gt_tagval [1], gt_tagval [2], index2fov
	last_nelem, read_eit, read_trace, safe_log10, sobel_scale, ssw_deltat, sswdb_files
	str2number [1], str2number [2], tim2dset [1], tim2dset [2], time_window, timegrid
   Restrictions:
      assumes desired context FD dbase online (eit, trace mosaics or SXT SFM)
      (gsfc/lmsal/medoc/???)


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

   Purpose: "get" and optionally tar currently compiled functions/procedures

   Input Paramters:
      none

   Keyword Paramters:
      outdir - directory for sources; default finds a temporary scratch area
      tarit  - if set, tar the sources - tar file name is:       
                  /OUTDIR/ssw_sources_YYYYMMDD_HHMM.tar
      tarfile - (OUTPUT) - name of derived/written tar file
      delete - delete sources after tar is made ( only if /TARIT set only ) 
      status - boolean success 1=OK , 0 = Problem w/source and/or TAR


   Calling Sequence:
      IDL> ssw_get_sources [,outdir=outdir, /tarit, delete=delete]
          
   Calling Examples:
      IDL> ssw_get_sources, outdir=curdir()  ; copy sources -> PWD
      IDL> ssw_get_sources, /tarit, /delete  ; above + make tar+delete copies 

   Calling Context:
      IDL> [run some SSW stuff]
      IDL> ssw_get_sources, /tarit, /delete, status=status, tarfile=tarfile
      IDL> if status then ... (archive TARFILE for example)

   History: 
      19-December-2002 - S.L.Freeland 

   Method:
      call RSI routine_info, copy compliled $SSW sources -> temp and
             optionally tar and delete

 CALLS: ***
	BOX_MESSAGE, BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CONCAT_DIR [1]
	CONCAT_DIR [2], CONCAT_DIR [3], CONCAT_STRUCT, FILE_EXIST [2], GET_TEMP_DIR
	MK_TEMP_DIR, SSW_FILE_DELETE, TIME2FILE, break_file [4], concat_dir [4]
	curdir [1], curdir [2], file_exist [1], file_exist [3], reltime [1], reltime [2]
   Restrictions: UNIX/Linux/MacX only


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

   Purpose: return user requested java applet for insertion into HTML doc

   Calling Sequence
      applet=ssw_getapplet,/APPLETNAME      ; return specific applet
      check=ssw_getapplet                   ; see whats available

   Input Parameters:
      NONE

   Keyword Parameters:
      /XXXXX - name of applet (ex: /GMTCLOCK)
      /HTML  - if set, include extra HTML, if any (anything after the <HTML> )

   Calling Examples:
      gmtclock=ssw_getapplet(/gmtclock [,/html] )

   History:
      20-Jun-1997 - S.L.Freeland

 CALLS: ***
	BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CONCAT_DIR [1], CONCAT_DIR [2]
	CONCAT_DIR [3], FILE_EXIST [2], STR2ARR [1], STR2ARR [2], break_file [4]
	concat_dir [4], data_chk [1], data_chk [2], file_exist [1], file_exist [3]
	file_list [1], file_list [2], get_logenv [1], get_logenv [2], prstr [1], prstr [2]
	rd_tfile [1], rd_tfile [2], strjustify
   Restrictions:
      Assume SSW environment (applet data base)

   Method:
      ascii applet files and keyword inheritence for self updating action


ssw_getcme_cactus $SSW/gen/idl/ssw_util/ssw_getcme_cactus.pro
[Previous] [Next]

   Name: ssw_getcme_cactus

   Purpose: provide ssw client interface to SIDC/CACTUS CME dbase 

   Input Parameters:
      time0, time1 - desired time range (see restriction..)

   Output:
      Function returns vector of cme structures, one per CME w/ssw times

   Keyword Paramters:
      quicklook (switch) - if set, most recent detections, not archive 
      keep_overlap (switch) - if set, keep events which are located in 
                              preceding or subsequent months

   Calling Sequence:
      ccmes=ssw_getcme_cactus(/quicklook) ; most recent "few" days
      NOTE: for time/parameter searching, use ssw_getcme_list wrapper:
      ccmes=ssw_getcme_list(time0,time1,search=['lspeed>1000,width>180'],/CACTUS)


   History:
      7-Feb-2006 - S.L.Freeland (see ssw_getcme_list.pro)
      INPUT Dbase Courtesy SIDC CACTUS project  , David Berghmans et al.
      http://www.sidc.be/cactus/about/index.html
     10-Feb-2006 - S.L.Freeland - permit archival/catalog access  
                  and /GENERATE option (restricted..)
     26-feb-2006 - S.L.Freeland - documentation;
      3-mar-2006 - S.L.Freeland - eliminate events in "adjacent" months
                   (CACTUS scan ranges overlap a few days in preceding and
                    subsequent months so this should eliminate false dupes. 
                    Add /KEEP_OVERLAP (overrides the 3-mar default)
      3-mar-2006 - protect against undefined MONTH when /QUICKLOOK set
     16-mar-2006 - protect against ZERO quicklook events...
     27-mar-2006 - SIDC server change; sidc.oma.be -> www.sidc.be
      
 CALLS: ***
	BOX_MESSAGE, SOCK_LIST, SSW_GETCME_LIST, STRTAB2VECT, anytim [1], anytim [2]
	anytim [3], anytim [4], anytim [5], reltime [1], reltime [2], ssw_deltat
	str2cols [1], str2cols [2], str2number [1], str2number [2], strarrcompress
	strextract, timegrid
   Restrictions:
      call this from ssw_getcme_list.pro which also provides
         access to the cdaw.nasa.gsfc.list by Gopalswamy & Yashiro etal


ssw_getcme_cdaw $SSW/gen/idl/ssw_util/ssw_getcme_cdaw.pro
[Previous] [Next]
   Name: ssw_getcme_cdaw

   Purpose: return LASCO CME data from CDAW site -> SSWIDL structure

   Output:
      function returns list as structure, including ssw compliant times

   Keyword Parameters:
      cdaw - if set, use list at cdaw.gsfc.nasa.gov/CME_list/ (default..)
             ( per 23-feb-2006, always implied for this routine)
             By: Gopalswamy, N., Yashrio, S., Michalek, G. and Numes, S.
  
   Calling Examples:
       PRIMARILY USED TO GENERATE missiong long CDAW->SSWDB (or reparse)
       Users may use wrapper 'ssw_getcme_list.pro' for CDAW, CACTUS 
       searches by time and CME parameter - see header. for example calls.
         
   Method:
      1st call - socket access list -> convert to "ssw" structure 
                 subsequent, use common (/REFRESH to force recopy->structs)

 CALLS: ***
	BOX_MESSAGE, DELVARX [1], DELVARX [2], DELVARX [3], DELVARX [4], SOCK_LIST
	STR2ARR [1], STR2ARR [2], STRTAB2VECT, anytim [1], anytim [2], anytim [3]
	anytim [4], anytim [5], delvarx [5], is_number [1], is_number [2], str2cols [1]
	str2cols [2]
   History:
      8-sep-2005 - S.L.Freeland - ssw_getcme_list w/cdaw hooks Written
     23-feb-2006 - S.L.Freeland - broke CDAW parsing logic from ssw_getcme_list
                   and assume That routine is primary ssw/CME interface
                   to CDAW, CACTUS , and future lists


ssw_getdst $SSW/gen/idl/ssw_util/ssw_getdst.pro
[Previous] [Next]
   Name: ssw_getdst 
   
   Purpose: return DST index for user time range

   Input Parameters:
      time0 - start time
      time1 - stop time

   Output:
      function returns utplot ready time series structure of format:
          {mjd:0L, time:0L, DST:0.d}

   Keyword Parameters:
      ace - (switch) - if set, read/use ACE data via get_acedata.pro

   Calling Example:
      dst = ssw_getdst(reltime(days=-30), reltime(/now)) ; last 30 days 

   History:
      25-Feb-2004 - S.L.Freeland coded using reference:
         http://sprg.ssl.berkeley.edu:80/dst_index/estimate.html
      26-Feb-2004 - NRT Kyoto hooks
      27-Feb-2004 - use ssw_kyoto2dst function
                    Permit older Povisional 
       8-Mar-2005 - S.L.Freeland - extend to Final Dst@kyoto
;      4-aug-2005 - S.L.Freeland - extend Provisional
                    (need to auto-update that eventually...)

 CALLS: ***
	BOX_MESSAGE, CONCAT_STRUCT, DELVARX [1], DELVARX [2], DELVARX [3], DELVARX [4]
	SINCE_VERSION [1], SINCE_VERSION [2], STR2ARR [1], STR2ARR [2], TIME2FILE
	anytim [1], anytim [2], anytim [3], anytim [4], anytim [5], data_chk [1]
	data_chk [2], delvarx [5], get_acedata, gt_tagval [1], gt_tagval [2], reltime [1]
	reltime [2], sel_timrange [1], sel_timrange [2], ssw_deltat, ssw_kyoto2dst
	timegrid
   Restrictions:
      Kyoto access via sockets so requires IDL V >=5.4


ssw_gxd_remove_flares $SSW/gen/idl/ssw_util/ssw_gxd_remove_flares.pro
[Previous] [Next]
   Name: ssw_gxd_remove_flares

   Purpose: ID,fill, or remove GOES events times from input dbase 

   Input Parameters:
      datain - input time structures (from rd_gxd only, for today at least)
              (actually the ID/remove should be dbase independent...)

   Output Parameters:
      function returns time series data with GEV (flare) times filled/remove

   Optional Keyword Parameters:
      above_classs - optionall lower limit on GOES class (via decode_gev.pro)
      remove - if set, remove flare times from input
      fill_data - If defined, fill (don't remove) times using this Value
                  (only works if input is GXD data)
      pad_minutes - optional window around flare times to remove in minutes
                    [may be scalar [+/-n mins] or 2 element [-n,+m mins]
                    (relative per [GEV START-n,  GEV STOP +m] )

      flaress - (output) boolean n_elemets(datain) -  "in progress"

   History:
      5-May-2003 - S.L.Freeland

   Method: 
      Read GEV (goes event dbase) for events within input data time
      and remove/fill those portions of timeseries data 
 
   Calls: ***
	BOX_MESSAGE, RD_GEV, anytim [1], anytim [2], anytim [3], anytim [4], anytim [5]
	decode_gev, required_tags, time_window
   Restrictions:
      Of course, only as good as the GEV data base
      (maybe I can use this to ID/patch missing GEV events... tbd)
      Removal sensitive to definition of 'FLARE Stop Time' as
      implemented by SEC/NOAA - for long baslines, you may want
      to use large numbers for PAD_MIN=[-n,+m]


SSW_HOT_PIX $SSW/gen/idl/image/ssw_hot_pix.pro
[Previous] [Next]

PRO ssw_hot_pix,  iindex,idata	 , oindex, odata, $
                    ss_start, ss_end, ss_ref, $
                    SIGMA = sigma, LOUD = loud,  $
                    clobber=clobber, reiterate=reiterate

NAME:
   SSW_HOT_PIX
PURPOSE:
   Remove "hot pixels" from a data cube. Hot pixels are those that
   are constantly above SIGMA standard deviations from the reference
   image average intensity. These are NOT radiation hits and this
   routine does not remove radiation hits.
CATEGORY:
CALLING SEQUENCE:
   ssw_hot_pix,iindex,idata,oindex,odata  
INPUTS:
   itrace, dtrace = original TRACE index and data cube. 
OPTIONAL INPUT PARAMETERS:
   ss_ref = index of the reference image in iindex,idata.  All other
            images are compared to this one.  Default = 0.
   ss_start, ss_end = If you like, you can operate on a subset of the
                      data cube.  These give the index of the start
                      and end images in itrace,dtrace.  Dafault =
                      align the full data cube.  
KEYWORD PARAMETERS:
   sigma = the number of standard deviations above the reference
           image average intensity that defines a "hot pixel". Default value
           is 5.0.
   loud = if set, prints out informational stuff; if not, is silent.
   clobber - if set and nparams=2, then clobber the input 'index,data'
   reiterate - if set and this routine has already run on this
               data set, permit rerun (default inhibits correction of
               previously run per .HISTORY

OUTPUTS:
   oindex, odata = the modified 'index' w/history & modified data cube
 CALLS: ***
	BOX_MESSAGE, STDEV, data_chk [1], data_chk [2], get_history, update_history
 CALLED BY:
	mreadfits_sxig12
COMMON BLOCKS:
   None.
SIDE EFFECTS: 
   if /CLOBBER set and only two parameters, input 'index,data' are replaced
   by modified versions
RESTRICTIONS:
    
PROCEDURE:
     Compares the first and last images in the data cube. Spikes in
     intensity which do not move are considered to be hot pixels. 

     Median values are substituted at the identified hot pixel
     locations for all images in the data cube.
MODIFICATION HISTORY:
     T. Berger  2004-Sep-29 - trace_hot_pix.pro
     S.L.Freeland 4-Oct-2004 - tweaked Tom's trace version to apply to
                               any SSW imager - added /CLOBBER switch
                               and function & update_history mod


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

   Puropose: return html for imagemap generation/reference 

   Input Parameters:
      mapfile - graphic file (gif/png/jpeg) of map relative or full URL 
      imapcoord - strarry containing comma delimited lists of coord
                  (for example, output of get_imagemap_coord,/string and
                   evt_grid,/imap,IMAGEMAP_COORD=imapcoord , etc)
      urls - urls mapping to imapcoord (1:1 vector) relative path names
                  or fully qualified URLs
   Keyword Parameters:
      mapname - optional map reference name used in html
                (default is derived from MAPFILE with extension removed)
      default_href - optional URL redirect if "unimportant" regions selected

   Output:
      function returns html  for document insertion as follows
         (items in brackets are inputs to this routine)

      First element (0) is a reference line like:
          <img border="0" src="[mapfile]" usemap="#[mapname]">
      Second element (1) is map defiinition initiation line like:
          <map name="[mapname]">
      Elements(2:n) are mapfile:imapcoord:urls mapping lines like:
          <area shape="rect" coords="[imapcoord[i]]" "[urls[i]]">
      Penultimate element and last elements are standard imap close..
          <area shape="default" nohref> ; overrided NOREF via DEFAULT_HREF
          </map>
 
 CALLS: ***
	ARR2STR [1], Arr2Str [2], BOX_MESSAGE, BREAK_FILE [1], BREAK_FILE [2]
	BREAK_FILE [3], BREAK_URL, break_file [4], data_chk [1], data_chk [2]
	ssw_strsplit
    Note: region shape is currently either 'rect' or 'circle'
          IMAPCORD input in form of "a,b,c,d" (4 elements) imlies RECT
                                    "a,b,c"   (3 elements) implies CIRCLE

   History:
      28-Feb-2002 - S.L.Freeland - a piece of the utplot,plot_map..->www puzzle 
       4-Mar-2002 - S.L.Freeland - added DEFAULT_HREF keyword/function
      09-May-2003, William Thompson - Use ssw_strsplit instead of strsplit


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

   Purpose: return boolean "are input times within input time range?"

   Input Parameters:
      times - input time vector to test ; any SSW time 
      timelo - range start for compare  ; any SSW time
      timehi - range stop for compare   ; any SSW time

   Output:
      function returns boolean, n_elements(times)

   Keyword Parameters:
      outside - if set, invert sense of test (ie, are tims outside of range)

   Calling Sequence:
      truth=ssw_in_timerange(times, rangelo, rangehi [,/outside] )

   Method:
      call ssw_deltat twice to compare input w/start and w/stop


 CALLS: ***
	BOX_MESSAGE, ssw_deltat
   History:
      S.L.Freeland - 6-June-2004


ssw_install [1] $SSW/gen/idl/ssw_system/ssw_install.pro
[Previous] [Next]
   Name: ssw_install

   Purpose: Interface routine to SolarSoft library installation

 CALLS: ***
	ARR2STR [1], Arr2Str [2], BOOST_ARRAY [1], BOOST_ARRAY [2], BOOST_ARRAY [3]
	BOX_MESSAGE, BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CONCAT_DIR [1]
	CONCAT_DIR [2], CONCAT_DIR [3], SSW_INSTR2SET, SSW_SET2SIZE, STR2ARR [1]
	STR2ARR [2], TAG_EXIST [1], TAG_EXIST [2], UNIQ [1], UNIQ [2], UNIQ [3]
	break_file [4], concat_dir [4], file_append [1], file_append [2], get_logenv [1]
	get_logenv [2], gt_tagval [1], gt_tagval [2], html_doc, rd_tfile [1], rd_tfile [2]
	ssw_install_explinkages, ssw_strsplit, ssw_upgrade [1], ssw_upgrade [2]
	str2html [1], str2html [2], str2html [3], str_replace [1], str_replace [2]
	strtab2html, tag_index [1], tag_index [2], url_decode, wc_where [1], wc_where [2]
   History:
      25-May-1996 - S.L.Freeland (Written)
       4-Jun-1996 - S.L.Freeland enhanced
      19-feb-1997 - S.L.Freeland Yohkoh reorganization (ysgen->gen, etc)    
      12-mar-1997 - S.L.Freeland allow WWW upgrade flag (inhibit site)
      10-jun-1997 - S.L.Freeland add SIZE calcualtion and info->WWW
      29-May-1998 - S.L.Freeland set 'ssw_tar_old_style' on request
      19-Nov-1999 - S.L.Freeland - add link to compressed tar (WNT/W98 users)
      29-Nov-1999 - S.L.Freeland - add Windows hooks
      30-Nov-1999 - S.L.Freeland - check for 'ssw_parent' definition (menu)
  
   Method:
      uses WWW FORM input to define generate a customized C-SHELL 
      installation script (and now Mirror package file and ssw_install.bat)
      09-May-2003, William Thompson - Use ssw_strsplit instead of strsplit


ssw_install [2] $SSW/gen/idl/ssw_system/ssw_install2.pro
[Previous] [Next]
   Name: ssw_install

   Purpose: Interface routine to SolarSoft library installation

 CALLS: ***
	ALL_VALS [1], ALL_VALS [2], ARR2STR [1], Arr2Str [2], BOOST_ARRAY [1]
	BOOST_ARRAY [2], BOOST_ARRAY [3], BOX_MESSAGE, BREAK_FILE [1], BREAK_FILE [2]
	BREAK_FILE [3], CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], FILE_EXIST [2]
	SSW_INSTALL2, SSW_INSTR2SET, SSW_SET2SIZE, STR2ARR [1], STR2ARR [2], STRTAB2VECT
	STR_LASTPOS [1], TAG_EXIST [1], TAG_EXIST [2], UNIQ [1], UNIQ [2], UNIQ [3]
	break_file [4], concat_dir [4], file_append [1], file_append [2], file_exist [1]
	file_exist [3], file_list [1], file_list [2], get_host [1], get_host [2]
	get_logenv [1], get_logenv [2], get_user [1], get_user [2], gt_tagval [1]
	gt_tagval [2], html_doc, rd_tfile [1], rd_tfile [2], ssw_bin
	ssw_install_explinkages, ssw_strsplit, ssw_upgrade [1], ssw_upgrade [2]
	str2cols [1], str2cols [2], str2html [1], str2html [2], str2html [3]
	str_lastpos [2], str_replace [1], str_replace [2], strextract, strmids [1]
	strmids [2], strtab2html, tag_index [1], tag_index [2], url_decode, wc_where [1]
	wc_where [2]
   History:
      25-May-1996 - S.L.Freeland (Written)
       4-Jun-1996 - S.L.Freeland enhanced
      19-feb-1997 - S.L.Freeland Yohkoh reorganization (ysgen->gen, etc)    
      12-mar-1997 - S.L.Freeland allow WWW upgrade flag (inhibit site)
      10-jun-1997 - S.L.Freeland add SIZE calcualtion and info->WWW
      29-May-1998 - S.L.Freeland set 'ssw_tar_old_style' on request
      19-Nov-1999 - S.L.Freeland - add link to compressed tar (WNT/W98 users)
      29-Nov-1999 - S.L.Freeland - add Windows hooks
      30-Nov-1999 - S.L.Freeland - check for 'ssw_parent' definition (menu)
      21-Feb-2000 - S.L.Freeland - more Windows automation, make Zip file.
      25-Feb-2000 - S.L.Freeland - more Windows, add information anchors
       1-Mar-2000 - S.L.Freeland - increased Perl path support, $
                                   make M.Berg suggestions
      20-Mar-2000 - S.L.Freeland - put ftp in "per-INSTR loop"
                    change some logging/redirection
      09-May-2003, William Thompson - Use ssw_strsplit instead of strsplit

   Method:
      uses WWW FORM input to define generate a customized C-SHELL 
      installation script (and now Mirror package file and ssw_install.bat)


ssw_install_explinkages $SSW/gen/idl/ssw_system/ssw_install_explinkages.pro
[Previous] [Next]
   Name: ssw_install_explinkages

   Purpose: expand SSW auto-linkages (PI team defined)

   Input Parameters:
      insets - list of one or more ssw instrument or branch elements

   Output Parameters:
      outsets - expanded list implied by insets  

   Calling Examples:
      IDL> ssw_install_explinkages, ['sxt','bcs','hessi'],outsets
      IDL> ssw_intsall_explinkages,'sxt,bcs,hess',outsets         ; equiv
  
 CALLS: ***
	BOX_MESSAGE, CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], FILE_EXIST [2]
	STR2ARR [1], STR2ARR [2], STRTAB2VECT, UNIQ [1], UNIQ [2], UNIQ [3], concat_dir [4]
	data_chk [1], data_chk [2], file_exist [1], file_exist [3], rd_tfile [1]
	rd_tfile [2], strarrcompress
 CALLED BY:
	ssw_install [1], ssw_install [2], ssw_upgrade [1], ssw_upgrade [2]
	ssw_upgrade_backup
   History:
      30-November-1999 - S.L.Freeland  

   Method:
      check INSETS for entries in $SSW/gen/setup/ssw_install.linkages  


ssw_instr_info $SSW/gen/idl/ssw_system/ssw_instr_info.pro
[Previous] [Next]
   Name: ssw_instr_info
   
   Purpose: return info about callers $SSW_INSTR
  
   Input Parameters:
      None
  
   Output Parameters:
      mpaths - mission top level paths (uniq set, order per $SSW_INSTR elements)
      ipaths - instrument top level paths (uniq)
      upaths - associated 'ucon' paths, if any
  
   Keyword Parameters:
      no_expand_path (switch) - if set, idlpaths return not expanded (parents only)
      setup_files    (output) - vector of associated setup files
      idl_startups   (output) - vector of associated IDL startup files
      idlpaths       (output) - idl path vector implied by $SSW_INSTR

   13-oct-1997 - S.L.Freeland - extract some code from ssw_path.pro
                 simplify ssw_path and compartmentalize sytstem dependencies.
      09-May-2003, William Thompson - Use ssw_strsplit instead of strsplit

 CALLS:


ssw_instruments $SSW/gen/idl/ssw_system/ssw_instruments.pro
[Previous] [Next]
   Name: ssw_instruments

   Purpose: return list of instruments under SSW 

   Calling Sequence:
      instr=ssw_instruments([/soho,/yohkoh,/trace])

 CALLS: ***
	STR2ARR [1], STR2ARR [2], get_logenv [1], get_logenv [2]
 CALLED BY:
	ssw_env, ssw_path, str_istype
   Restrictions:
      assumes SSW_MISSIONS, SSW_xxx_INSTR defined in setup


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

   Purpose: ssw interface to AniS applet for java animations

   Input Parameters:
      image_files - list of gif or jpeg  files to include in animation
                    or an ascii file containing the graphics file names
   
   Output Parameters:
      applet - the implied html/applet for inclusion in an html document

   Calling Sequence:
      IDL> ssw_javamovie,filelist,applet [,controls=...],[PARAM=VALUE]
      IDL> ssw_javamovie,file_of_filenames,applet [,controls=...],[PARAM=VALUE]

   Calling Examples:
      IDL> ssw_javamovie,gifs,applet,rate=240 ; defaults+framerate=24F/sec
      IDL> ssw_javamovie,file_of_filenames,applet ; use FILE_OF_FILENAMES

      IDL> ssw_javamovie,list1,app,/ROCKING,/USE_CACHE ; keyword inherit->AniS

   Context Example:
      IDL> html_doc,'new.html',/header         ; init an html document
      IDL> ssw_javamovie,giflist1,app1         ; make 1 java "movie"
      IDL> ssw_javamovie,giflist2,app2         ; make another java movie
      IDL> file_append,'new.html',[app1,app2]  ; movie applet -> html doc
      IDL> html_dc,'new.html',/trailer         ; terminate html doc

   Keyword Parameters:
    _extra - any PARAM names accepted by AniS 
     add_controls - take the defaults -PLUS- these (comma delimited list)
     enhance (switch) - if set, add ENHANCE to default bottom_controls
     [SEE http://www.ssec.wisc.edu/visit/AniS/anisdoc.html ]
     controls - desired subset of controls to include
                STARTSTOP,LOOPROCK,STEP,FIRSTLAST,SPEED,SHOW,ENHANCE,
                REFRESH,AUTO_TOGGLE,TOGGLE,ROTATOR,SETFRAME,ZOOM,FADER,
                OVERLAY,OVERLAY_RADIO,FRAMELABEL,AUDIO
     bottom_controls - same list as controls, but theses go on bottom of AniS window
     labels - string array of labels -or- SSW compatible times ("index")

     use_progress_bar - 
     active_zoom 
     keep_zoom 
     overlay_zoom
     use_caching
     auto_refresh - #minutes
     base_static
     start_looping - (initial loop state, def=true)
     start_frame - (frame to display after loading) 
     rate - frames/sec*10 (120->12 frames/sec)
     minimum_dwell - min dwell set wit speed slider (milliseconds, default=30)
     dwell_rates - optional interframe dwell, vector 1:1 w/nframes
     rocking - make rocking/swing mode the startup loop mode
     pause - optional pause after last frame (milliseconds, def=0)
     fade - generate intermediate fade sequence
     fade_label
 
     anisurl - local url (ie, same machine as graphics files) where you have
             copies of AniS class&jar files use this to avoid propagating
             AniS copies to implied output directory (ie, path image_files) 
     
     History:
     21-mar-2006 - S.L.Freeland
     22-mar-2006 - S.L.Freeland enable file_of_filenames, booleans 
     28-mar-2006 - S.L.Freeland Add WindowsXX tweaks, movie /ENHANCE
                   to bottom_controls, image_window_size + limit to defaults 

 CALLS: ***
	ARR2STR [1], Arr2Str [2], BOX_MESSAGE, BREAK_FILE [1], BREAK_FILE [2]
	BREAK_FILE [3], CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], FILE_EXIST [2]
	OS_FAMILY, READ_IMAGE, STR2ARR [1], STR2ARR [2], anytim [1], anytim [2], anytim [3]
	anytim [4], anytim [5], break_file [4], concat_dir [4], curdir [1], curdir [2]
	data_chk [1], data_chk [2], file_exist [1], file_exist [3], is_member [1]
	is_member [2], rd_tfile [1], rd_tfile [2]
     Restrictions:
        overlays and portals not yet implemented while I work the $;
        AniS/SSW logistics using this basal version
        The ENHANCE option looks very useful, but as of today, only
        the supplied file is invoked as a "placeholder" - since that
        was developed for terrestial weather applications.....
      
        WINDOWS - for today at least, the input graphics files must
        reside on the same disk as the SSW distribution - 
        This is a trivial limitation easily fixed by someone more
        facile at MS/DOS -                         

    Notes: this is a memory only routine; generates an applet for 
    insertion in an htmldoc - see CONTEXT EXAMPLE above.
    User may explicitly supply CONTROLS and/or BOTTOM_CONTROLS - otherwise,
    a set of defaults will be invoked - Current defaults


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

    Purpose: transfer/read implied 3D from JS movie url -or- graphics urls 

    Input Paramters:
       jsurl - URL of a JavaScript movie  

    Output Parameters:
       data - the 3D image cube
       r,g,b, - color table (if applicable)

    Keyword Parameters:
       nodelete - if set, do not delete the "temporary" files (gifs/pngs...)
       outdir - optional output directory for graphics files 
                (default will use get_temp_dir.pro)
       get_times (switch) - if set, assume file names include image times
       times (output) - if /GET_TIMES set (and valid), contains image times
       out_style - optional time format per anytim.pro (default='ECS')
       ingraphics - graphics explicitly passed (jsurl is ignored!!)

    Calling Sequence:
       ssw_jsurl2data, jsurl, data [,/get_times,times=times,outstyle=fmt]
       -ORr-
       ssw_jsurl2data, dummy, data , ingraphics=graphicsURLS (png/gif..)

 CALLS: ***
	BOX_MESSAGE, BREAK_URL, CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], FILE2TIME
	FILE_EXIST [2], GET_TEMP_DIR, SOCK_COPY, SSW_FILE_DELETE, SSW_JSURL2DATA
	concat_dir [4], data_chk [1], data_chk [2], file_exist [1], file_exist [3]
	files2data, ssw_jsurl2imagelist
    History:
      11-Jan-2006 - S.L.Freeland 


ssw_jsurl2imagelist $SSW/gen/idl/http/ssw_jsurl2imagelist.pro
[Previous] [Next]
   Name: ssw_jsurl2imagelist
 
   Purpose: return urls of image files within javascript movie html

   Input Paramters:
      jsurl - url of desired javascript movie -or- thumbnail table html

   Output:
     returns implied url list of remote graphics (png/gif)

  Keyword Parameters:
     copy - if set, copy the full list of remote -> local

  Calling Sequence:
      imgurls=ssw_jsurl2imagelist('http://.../<JSMOVIE>.html' )

 CALLS: ***
	BOX_MESSAGE, BREAK_URL, SOCK_LIST, data_chk [1], data_chk [2], strextract
 CALLED BY:
	ssw_jsulr2data
  History:
     23-Sep-2005 - S.L.Freeland
     20-Jan-2006 - S.L.Freeland - thumbnail table (still movie) hook


ssw_kyoto2dst $SSW/gen/idl/ssw_util/ssw_kyoto2dst.pro
[Previous] [Next]

  Name: ssw_kyoto2dst
 
  Purpose: convert monthy kyoto dst WWW pages -> ssw/utplot vector

    
  Input Parameters:
      kyotostuff - url of desired page (month) -or- sock_list of the url

  Output:
    function returns utplot-ready vector for page (one month of kyoto)
    vector of {mjd:0l, time:0L, dst:0.0}

  Calling Example:
     (usually invoked by wrapper ssw_getdst.pro)

     EX: read kyoto provisional dst for October 2003
     dst=ssw_kyoto2dst(http://swdcdb.kugi.kyoto-u.ac.jp/dstdir/dst1/p/dstprov20; 0310.html'
 CALLED BY:
	ssw_getdst
  History:
    27-Feb-2004  - S.L.Freeland - broke url->struct logic from ssw_getdst
    20-mar-2004 -  S.L.Freeland - remove fill data records (9999)

 CALLS: ***
	ADD_TAG [1], ADD_TAG [2], BOX_MESSAGE, SOCK_LIST, STRPAD, last_nelem, str2number [1]
	str2number [2], str_replace [1], str_replace [2], strarrcompress, strmids [1]
	strmids [2], timegrid
  Restrictions:
     url input assumes IDL V >= 5.4 due to use of sockets


SSW_LAST_UPDATE $SSW/gen/idl/ssw_system/ssw_last_update.pro
[Previous] [Next]
 Project     : HESSI
                  
 Name        : SSW_LAST_UPDATE
               
 Purpose     : spit out time of last SSW mirror update by checking date
               of $SSW/gen/setup/ssw_info_map.dat
                             
 Category    : utility
               
 Syntax      : IDL> last_ssw_update

 Inputs      : None
 
 Outputs     : time of last update printed to screen

 Keywords    : None
                                   
 CALLS: ***
	CLOSE_LUN, LOCAL_NAME, LOC_FILE [1], LOC_FILE [2], LOC_FILE [3], str_replace [1]
	str_replace [2]
 History     : Written, 19-April-2004, Zarro (L-3Com/GSFC)

 Contact     : dzarro@solar.stanford.edu


ssw_limit_colors $SSW/gen/idl/ssw_util/ssw_limit_colors.pro
[Previous] [Next]
   Name: ssw_limit_colors

   Purpose: ct for 'green/yellow/red' limit visualizations (AP,KP, EGSE..)

   Input Parameters:
      rr,gg,bb - optional user ct r,g,b (256 elements each) 
                 default starts with the RSI Table 13 (rainbow) for G/Y/R
   
   Output Paramters:
      rr,gg,bb - optionally returned if /NOLOAD requested (may clobber)
  
   Keyword Paramters:
      noload - if set, just return 
      help - if set, display a color bar (ala linecolors.pro)

 CALLS: ***
	WDEF [1], WDEF [2]
   Side Effects:
      if /NOLOAD not set, will clobber lowest 10 CT values



ssw_move $SSW/gen/idl/ssw_system/ssw_move.pro
[Previous] [Next]
   Name: ssw_move

   Purpose: assist "mass" onlines (new) or moves (existing) routines->SSW

   Input Paramters:
      files -  list of files (assumed idl routines)

   Keyword Parameters:
      script - name of script file to use (def= 'ssw_move.csh')
      infile - optionally ascii file containing files (in lieu of files)
      append - if set, append to an existing script
      local  - if set, copy 1st SSW version to local directory
      online - if set, SSW directory to move things to 

   Calling Sequence:
      IDL> ssw_move, infile='files.dat', online='$SSW/gen/idl/util'
      IDL> ssw_move, infile='files.dat', /local       ; copy from SSW->local

   Method: use 'sswloc' to find current versions
           use 'online' to move to target 
           will not move online if multiple version exist which are not
           identical (you need to resolve conflicts and use 'online')
           (those files listed in 'ssw_move_nomove.dat')

 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], concat_dir [4], curdir [1]
	curdir [2], data_chk [1], data_chk [2], file_append [1], file_append [2]
	file_diff, rd_tfile [1], rd_tfile [2], sswloc, str_replace [1], str_replace [2]
   Restrictions:
      Dont use this without an appreciation of what it does or might do


ssw_nar2armurl $SSW/gen/idl/ssw_util/ssw_nar2armurl.pro
[Previous] [Next]
   Name: ssw_nar2armurl

   Purpose: map from NAR data records -> corresponding ARM URLs

   Input Parameters:
      narrecs - vector of records from NAR dbase (Noaa Active Region)

   Keyword Parameters:
      utdate - user supplied date in lieu of NARRECS      
               (scalar in any ssw format or 1:1 vector n_elements(ar_number)
      ar_number - NOAA AR(s) - user supplied in lieu of NARRECS
      top_url - if set, return ARM parent URL
      arm_topurl - parent url of ARM; default='http://www.solarmonitor.org '

   Output:
      function returns implied ARM URL(s);
         AR urls if NARRECS or AR_NUMBER supplied
         DATE index urls if only UTDATE supplied
         TOP/ARM parent if /TOP_URL switch set

   Calling Sequence:
      armurls=ssw_nar2armurl(narrecs) ; NAR dbase -> ARM region urls
      armurls=ssw_nar2armurl(utdate=dates, ar_num=arlist) ; region urls
      armurls=ssw_nar2armurl(utdate=dates) ; By-DATE index urls
      armurls=ssw_nar2armurl(/top) ; top/parent ARM url

   Calling Examples:
      IDL> more,ssw_nar2armurl(get_nar('15-dec-2004')) ; NAR DBASE->ARM URL
      http://www.solarmonitor.org/region.php?date=20041215&region=10711
      http://www.solarmonitor.org/region.php?date=20041216&region=10710
      (..etc..)

      IDL> more,ssw_nar2armurl(utdate='15-dec-2004',ar_num=[710,711])
      http://www.solarmonitor.org/region.php?date=20041215&region=10710
      http://www.solarmonitor.org/region.php?date=20041215&region=10711

      IDL> more,ssw_nar2armurl(utdate='15-dec-2004') ; -> DATE index URLS
      http://www.solarmonitor.org/index.php?date=20041215


 CALLS: ***
	BOX_MESSAGE, TIME2FILE, anytim [1], anytim [2], anytim [3], anytim [4], anytim [5]
	data_chk [1], data_chk [2], gt_tagval [1], gt_tagval [2], required_tags
   History:
      4-aug-2005 - S.L.Freeland - single point beauty -> solarmonitor PHP


ssw_packages $SSW/gen/idl/ssw_system/ssw_packages.pro
[Previous] [Next]
   Name: ssw_packages

   Purpose: setup paths for SW packages within SSW framework

   Keyword Parameters:
      append  - if set, APPEND package path to SSW !path
      prepend - if set, PREPEND package path to SSW !path
      remove  - if set, REMOVE associated path from SSW !path
      /PACKAGE - switch to select package (if not set, current packages showwn)
      /all     - switch - include ALL packages

   Calling Sequence:
      ssw_packages, /PACKAGE

   Calling Examples:
      ssw_package                    - show available packages
      ssw_package,/chianti           - add CHIANTI package
      ssw_package,/chianti,/remove   - remove the package

   Calls: ***
	BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CHKLOG [1], CHKLOG [2]
	STR2ARR [1], STR2ARR [2], break_file [4], data_chk [1], data_chk [2]
	get_logenv [1], get_logenv [2], pathfix, prstr [1], prstr [2], ssw_path, strjustify
	wc_where [1], wc_where [2]
 CALLED BY:
	eit_flux, eit_temp, ssw_path
   Restrictions:
     Really a warning - NOT ALL PACKAGES ARE FULLY SSW COMPLIANT
                        (might provide info on SSW blessing in future version)

   History:
      20-feb-1997 - S.L.Freeland - during Chianti/SSW integration
      24-feb-1997 - S.L.Freeland - generalized for all $SSW_PACKAGES_ALL
      12-mar-1997 - S.L.Freeland - add optional package setup routine call
      23-Dec-1998 - S.L.Freeland - add /ALL switch and function
	   23-nov-2002 - Richard.Schwartz@gsfc.nasa.gov use chklog to
		fully translate in windows for ssw_packages_all


ssw_path $SSW/gen/idl/ssw_system/ssw_path.pro
[Previous] [Next]
   Name: ssw_path

   Purpose: add or remove SSW elements from IDL path

   Input Parameters:
      path - optional path to add (if not an SSW instrument)

   Keyword Parameters:
      remove  - switch, if set, remove (default is to ADD paths)
      test    - switch, if set, add/remove the TEST directory (def=idl)
      prepend - switch, if set, Prepend the paths (default is append to SSW paths)
      quiet   - switch, if set, suppress some messages
      show/inquire switch, if set, print current !path to screen and exit
      more    - switch, if set, same as SHOW with MORE-like behavior
      save    - switch, if set, store current !path prior to change
      restore - switch, if set, restore !path saved with /save (previous call)
      ops     - switch, if set, $SSW/MMM/ops/III/idl (ops software)
      full_prepend - switch, if set, then put paths at the front of everything

      <instrument> - switch, any SSW instrument [/eit,/sxt,/cds,/mdi,/bcs...]
                     (may use multiple instrument switches in single call)

   Category: environment, system

   Calling Sequence:
      ssw_path,/instrument [,/instrument ,/remove]

   Calling Examples:
      ssw_path,/show		   ; display current !path
      ssw_path,/eit,/sxt	   ; append  EIT and SXT paths
      ssw_path,/eit,/sxt,/remove  ; remove  EIT and SXT paths
      ssw_path,/cds,/prepend	   ; prepend CDS paths
      ssw_path,/save,/sumer	   ; save current !path, then add SUMER
      ssw_path,/restore	   ; restore saved !path and exit
      ssw_path,/ucon,/yohkoh	   ; add "selected" Yohkoh ucon areas 
				   ; (only those UCON with external references)
      ssw_path,/ops,/cds	   ; deal with OPS SW (instead of ANAL)

 CALLS: ***
	ARR2STR [1], Arr2Str [2], BOX_MESSAGE, CONCAT_DIR [1], CONCAT_DIR [2]
	CONCAT_DIR [3], GET_DELIM, STR2ARR [1], STR2ARR [2], STRREP_LOGENV, concat_dir [4]
	get_logenv [1], get_logenv [2], pathfix, prstr [1], prstr [2], ssw_instruments
	ssw_packages, ssw_strsplit, str_replace [1], str_replace [2], strjustify
	ucon_path, uniqo [1], uniqo [2], wc_where [1], wc_where [2]
 CALLED BY:
	go_yo_prod_batch, mdi_idl_startup, mk_ssc_batch [1], mk_ssc_batch [2]
	setssw_windows, ssw_addmm_gen, ssw_bypass [1], ssw_bypass [2], ssw_packages
	ucon_path
   Side Effects:
      *** Updates IDL !PATH *** 

   History:
      15-Jun-1995 (SLF)
      15-Feb-1996 (S.L.Freeland) - major overhaul, keywords added, etc
      13-mar-1996 (S.L.Freeland) - add /OPS keyword and function
      28-May-1996 (S.L.Freeland) - prepend atest if present
      18-aug-1996 (S.L.Freeland) - add SPARTAN
      29-aug-1996 (S.L.Freeland) - status message (order changed?) , add TRACE
      31-Oct-1996 (M.D.Morrison) - Added /FULL_PREPEND
      10-nov-1996 (S.L.Freeland) - library "protect" $SSW/gen/idl_libs/..
       4-mar-1997 (S.L.Freeland) - Applied Richard Schwartz counting correction
      30-apr-1997 (S.L.Freeland) - "Temporary" upgrade (big change coming)
                                   (chianti/ztools hook->ssw_packages)
      17-Mar-2000 (R.D.Bentley)  - added hessi bit...
      31-Mar-2000 S.L.Freeland - missing CGRO
      10-Apr-2000 S.L.Freeland - OPTICAL and RADIO
      22-Jan-2001 S.L.Freeland - HXRS 
      23-Jan-2002 S.L.Freeland - SMEI
      12-jul-2002 S.L.Freeland - GOES/SXI
      09-May-2003, William Thompson - Use ssw_strsplit instead of strsplit
      23-Jan-2004, Zarro (L-3Com/GSFC) - changed return to skip for 
                                         unrecognized instrument
      11-Feb-2004, S.L.Freeland - VOBS (egso/cosec/vso)
      12-Mar-2004, S.L.Freeland - STEREO
                                  (impact/plastic/secchi/swaves/ssc)
      30-Sep-2006, Zarro - added HINODE
       5-oct-2006, S.L.Freeland - sterinstr->hinodeinstr

   Common Block:
      ssw_path_private1 - for !path when called with /save and /restore
      
   Method:
      uses keyword inheritance for Instrument keywords 
      uses <expand_path> for additions

   Notes:
      adding an Instrument tree also adds the associated Mission tree


SSW_PICKFILE $SSW/gen/idl/widgets/ssw_pickfile.pro
[Previous] [Next]

 NAME: SSW_PICKFILE

 CATEGORY: FILE, UTIL

 PURPOSE: Wrapper routine for dialog_pickfile that returns a keyword
 indicating whether or not the selected file already exists.

 CALLING SEQUENCE: 
   file = ssw_pickfile( PATH='/my/path', FILTER='*.txt', /FIX_FILTER, $
     GET_PATH=path )

 INPUT KEYWORDS:
   See dialog_pickfile.
   _EXTRA - keywords in _extra are passed to dialog_pickfile.

 OUTPUTS:
   See dialog_pickfile.

 OUTPUT KEYWORDS: 
   GET_PATH - keyword for dialog_pickfile.  Included for keyword inheritance.
   EXISTS - set to [ 0 / 1 ] if the selected file [ does not / does ]
            exist.
   ERR_CODE - set to [ 0 / 1 ] if an error [ did not / did ] occur
              during execution.
   ERR_MSG - String containing an error message.  Null if no error occurred.

 CALLS: ***
	LOC_FILE [1], LOC_FILE [2], LOC_FILE [3]
 CALLED BY
	SPEX__DEFINE, fits2spectrum, hsi_spectrum_fitsread, hsi_ui_img, plotman_widget
	spex_preview [1], spex_preview [2], xsm_fits2spectrum


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

   Purpose: Calculate solar zenith angle from an observer's position

   Input Parameters:
      index - any ssw standard time; optionally includes .LAT,.LON fields
      lat, lon - observer's latitude/longitude (in degrees) [north/east = + ]

   Keyword Parameters:
      latitude,longitude - Keyword alternative to positional params

   Calling Sequence:
      zenith=ssw_pos2zenith(index)   ; index contains SSW UT, .LAT, .LON
         -OR-
      zenith=ssw_pos2zenith(index,lat,lon) ; index conatins SSW UT
         -OR-
      zenith=ssw_pos2zinith(index, lat=lat, lon=lon )  ;  keyword alternative

 CALLS: ***
	BOX_MESSAGE, anytim [1], anytim [2], anytim [3], anytim [4], anytim [5]
	data_chk [1], data_chk [2], get_zenang, gt_tagval [1], gt_tagval [2]
	required_tags
   History:
      15-March-2000 - S.L.Freeland - Wrapper for Greg Slater 'get_zenang.pro'
       6-Apr-2000   - S.L.Freeland - modifications per Roger J. Thomas


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

   Purpose: send a POST (or GET) query string to taget URL
   
   Input Parameters:
      posturl - desired URL to recive POST (cgi for example)
      client_string - desired POST or GET query, assumed URL-encoded
   
   Keyword Paramters:
      status - true (=1) if no errors
      socket_error -  verbatim output from socket ERR keyword
      get - if set, use GET query (default=POST) 
      noclose - if set, don't close connection
      uselun  - if set and LUN is input and OPEN, use that lun
      lun (output) - socket LUN used on most 

   History:
      23-Oct-2001 - S.L.Freeland  - to play with some peer-to-peer
                                    between SSW servers
       5-jun-2002 - S.L.Freeland - append 'http 1.0'
      26-jun-2002 - S.L.Freeland - append proper terminator

   Calling Examples:
      ssw_post_query,'http://xxx/cgi-bin/ssw_service.sh','p1=1&p2=2 '
      ssw_post_query,'http://xxx/cgi-bin/ssw_service.sh?p1=1&p2=2 '; same

 CALLS: ***
	BOX_MESSAGE, BREAK_URL, SINCE_VERSION [1], SINCE_VERSION [2], data_chk [1]
	data_chk [2], is_open, ssw_strsplit, str_replace [1], str_replace [2]
   Restrictions:
      Uses RSI 'socket' routine so requires version >=5.4
      query_string assumed url-encoded; will remove this
                   when 'url_encode.pro' is written for SSW
      NOTE: only /GET conforms to HTTP 1.1 standard as of today.
            POST standard to be added after a few more tests...


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

Purpose: Performs the rebinning using coefficient structure
   obtained from ssw_rebin_assign

 CALLS: ***
	DEFAULT, F_DIV, edge_products, ssw_rebin_assign, ssw_rebinner
 CALLED BY:
	ssw_rebin_assign, ssw_rebinner
History: 11-aug-03, richard.schwartz@gsfc.nasa.gov


ssw_rebin_assign $SSW/gen/idl/util/ssw_rebinner.pro
[Previous] [Next]
 PROJECT:
       SSW
 Name:
   ssw_rebin_assign
 Purpose:
   This function builds a structure to map a function/distribution on
   one set of edges into new edges. Coefficients are strictly proportional
   to the bin widths.

 CALLED BY:
	SSW_REBIN, ssw_rebinner
 Procedure:
 The structure array has one structure for every element of the new
 binning.  The structure looks like this:
** Structure <1b65f20>, 3 tags, length=12, data length=12, refs=1:
  I0              LONG                 0
  N               LONG                 0
  FRAC            POINTER   <PtrHeapVar1311>

 I0 - starting bin for old bin edges that map to this new bin
 N  - number of consecutive old bins to use
 FRAC - fraction of old bin value to use in new bins. FRAC is a pointer.
 This procedure creates a linear transformation matrix which can be used
 to rebin vector data such as count rates defined on a PHA scale.
 It is for a matrix with n output bins defined on energy edges EDGE1, (n+1)
 and create a transform, MAP, to interpolate a detector response, MATRIX1, from
 narrow channels to broader output channels defined by EDGE2.  The matrix
 is defined in terms of counts/channel unless the keyword FLUX is set.
 This operation is sometimes called flux rebinning.  Matrix2 is generally
 a matrix with mostly zeroes and can be easily represented with a sparse matrix
 if the matrix is square.
   for a bin defined on EDGE1 which falls wholly within a bin on EDGE2
   the map matrix element is 1
   for a bin defined on EDGE1 which falls partially within a bin on EDGE2
   the map matrix element is given by the fraction of BIN1 contained by BIN2


 Category:
   GEN, SPECTRUM, UTILITY,
 Calling Sequence:
   map = ssw_rebin_assign( edge1, edge2 )


 Inputs:
   Edge1: N+1 energy edges of N output bins or 2xN energy edges
   Edge2: K+1 output energy edges for new matrix, or 2xK edges

 Outputs:
   Map: The structure holding the transformation coefficients.
     This is to be used with rebinner().
 CALLS: ***
	DEFAULT, F_DIV, SSW_REBIN, edge_products, ssw_rebinner
 Restrictions:
   This is not an optimized procedure


 History:
   Version 1, RAS, 12-dec-2002, based on map_matrix.
   15-nov-03, ras, longword for loop index
   7-jan-2004, ras, removes old pointers instead of leaving dangling hidden pointers


ssw_rebinner $SSW/gen/idl/util/ssw_rebinner.pro
[Previous] [Next]
 PROJECT: SSW
 NAME:   ssw_rebinner.pro

 PURPOSE:  Rebin the contents of a spectrum from one set of energy edges
             to another.  This simple algorithm assumes the counts in
             each INPUT channel are UNIFORMLY distributed within that
             channel.

 CATEGORY:  Math

 CALLING SEQUENCE:

     ssw_rebinner, specin, edgesin, specout, edgesout

 INPUTS:

     specin   Input spectrum
     edgesin  Energy values of channel edges for input spectrum
     edgesout Energy values of channel edges for desired spectrum

 OUTPUTS:

     specout  Spectrum values rebinned from one set of channel
                boundaries to the other

 CALLS: ***
	DEFAULT, F_DIV, SSW_REBIN, edge_products, ssw_rebin_assign
 CALLED BY:
	Pileup_countrate_Build_Piler, Pileup_countrate_PULSE_CONVOLVE, SSW_REBIN
	ssw_rebin_assign
 Common Blocks:
   ssw_REBINNER - holds coefficient arrays and test values


 MODIFICATION HISTORY:


 10-aug-03, richard.schwartz@gsfc.nasa.gov
   saves conversion coefficients.  Frequently reused conversions
   coefficients saved in both directions.


ssw_required_path $SSW/gen/idl/ssw_system/ssw_required_path.pro
[Previous] [Next]
   Name: ssw_required_path

   Purpose: check if a required path/instrument is defined in session

   Input Parameters:
      NONE

   Keyword Parameters:
      /XXX - instrument to check

   Calling Sequence:
      truth=ssw_required_path(/XXX)  ; where XXX = instrument/mission

   Calling Example:
      if ssw_required_path(/sxt,/trace) then begin  ; true if SXT&TRACE in !path
         ....

 CALLS: ***
	BOX_MESSAGE, data_chk [1], data_chk [2], get_logenv [1], get_logenv [2]
   History:
      25-October-1998 - S.L.Freeland


ssw_sec_aktxt2struct $SSW/gen/idl/ssw_util/ssw_sec_aktxt2struct.pro
[Previous] [Next]
   Name: ssw_sec_aktxt2struct

   Purpose: convert one or more NOAA/SEC A/K index text files->ssw structures

   Input Parameters:
      aktxt_files - local nfs filenames or urls on SEC server

   Output:
      function returns ssw/utplot compliant strucutures

   Keyword Parameters:
      expand_3hour - if set, expand return structures to 3 hour K-ind cadence
      station - optional station - default=Boulder

   NOTE: - generally invoked from a wrapper routine which will map
   from user times to the implied file list - but help yourself to 
   this lower level routine as desired.

   Calling Examples:
      ==================== EX #1 =================================
      IDL> kind=ssw_sec_aktxt2struct('7day_AK.txt')  ; last 7 day SEC file
      ============================================================
      IDL> help,kind & help,kind,/str
IDL> help,kind & help,kind,/str
KIND            STRUCT    = -> <Anonymous> Array[7]  << default=1-per-day
** Structure <24fdb8>, 8 tags, length=96, data length=90, refs=4:
   MJD             LONG             53431
   TIME            LONG                 0
   STATION         STRING    'Boulder' <<<< default station
   LAT             STRING    'N49'
   LON             STRING    'W42'
   A               INT             12
   ESTAP           INT       Array[8]  <<< 8 samples per record (3hour)
   K               INT       Array[8]  <<< Ditto
      
      ================ EX #2 (override STATION and cadence defaults) ======
      IDL> kind=ssw_sec_aktxt2struct('7day_AK.txt', station='Fredericksburg',$
                                        /expand_3hour)
      ====================================================================
      IDL> help,kind & help,kind,/str
KIND            STRUCT    = -> <Anonymous> Array[56]  <<< 3 hour samples
** Structure <250208>, 8 tags, length=64, data length=62, refs=2:
   MJD             LONG             53431
   TIME            LONG                 0
   STATION         STRING    'Fredericksburg' <<< Not Boulder...
   LAT             STRING    'N38'
   LON             STRING    'W78'
   A               INT              8
   ESTAP           INT              3  <<< now "flattened"
   K               INT              2  <<< Ditto, 1 sample per 3 hour rec
      

   History:
      8-mar-2005 - S.L.Freeland
     15-mar-2005 - S.L.Freeland - moved time tags forward by 1.5 hours (center of 3 hour sample, I think..)

 CALLS: ***
	BOX_MESSAGE, BOX_MESSGES, DELVARX [1], DELVARX [2], DELVARX [3], DELVARX [4]
	FILE_EXIST [2], SOCK_LIST, STRTAB2VECT, anytim [1], anytim [2], anytim [3]
	anytim [4], anytim [5], data_chk [1], data_chk [2], delvarx [5], file_exist [1]
	file_exist [3], is_number [1], is_number [2], rd_tfiles, str2cols [1]
	str2cols [2], timegrid
   Restrictions:
      If NOAA/SEC files are not local/nfs, data is read from  
        SEC server via socket - therefore, IDL V. >= 5.4 required


SSW_SERVER $SSW/gen/idl/sockets/ssw_server.pro
[Previous] [Next]
 Project     : HESSI

 Name        : SSW_SERVER

 Purpose     : return SSW software server URL 

 Category    : synoptic
                   
 Inputs      : None

 Outputs     : SERVER = SSW software server name

 Keywords    : NETWORK = 1 if network is up

 CALLS: ***
	HAVE_NETWORK
 CALLED BY:
	SOCK_SSW
 History     : 10-Feb-2004,  D.M. Zarro (L-3Com/GSFC)  Written

 Contact     : DZARRO@SOLAR.STANFORD.EDU


ssw_set_chianti $SSW/gen/idl/ssw_system/ssw_set_chianti.pro
[Previous] [Next]
   Name: ssw_set_chianti

   Purpose: set CHIANTI system variables within SSW environment

   Input Parameters:
     NONE

   Keyword Parameters:
     UPDATE - if set, force update even if alread defined.

 CALLS: ***
	BOX_MESSAGE, CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], FILE_EXIST [2]
	STR2ARR [1], STR2ARR [2], concat_dir [4], file_exist [1], file_exist [3]
	get_logenv [1], get_logenv [2], main_execute [1], main_execute [2], rd_tfile [1]
	rd_tfile [2]
   History:
      12-mar-1997 - S.L.Freeland (called from ssw_packages)
      06-Jul-1999 - J.S.Newmark - upgraded
      13-Nov-2000 - S.L.Freeland - use $SSW_CHIANTI directly
      14-Nov-2000 - backwardly compatible/handle chianti restructure (3.1) 
                    add "installation/upgrade required" message.
      19-Sep-2002 - forward/backward compat for V4.
                    Use chianti team supplied $SSW/chianti/setup/IDL_STARTUP
                    and exit for +=V4.


ssw_set_instr $SSW/gen/idl/ssw_system/ssw_set_instr.pro
[Previous] [Next]
   Name: ssw_set_instr

   Purpose: update $SSW_INSTR (add or remove from environmental)

 CALLS: ***
	ARR2STR [1], Arr2Str [2], BOX_MESSAGE, STR2ARR [1], STR2ARR [2], data_chk [1]
	data_chk [2], get_logenv [1], get_logenv [2], rem_elem [1], rem_elem [2]
	set_logenv [1], set_logenv [2], str_replace [1], str_replace [2], uniqo [1]
	uniqo [2]
   History:
      12-Feb-1998 - S.L.Freeland - useful SSW system-level utility


ssw_setsswdb_gen $SSW/gen/idl/ssw_util/ssw_setsswdb_gen.pro
[Previous] [Next]
   Name: ssw_setsswdb_gen

   Purpose: set general use SSWDB environment not otherwise set

   Input Parameters:
      NONE

   Output Parameters:
      NONE

   Keyword Parameters:
      FORCE - if set, setup envs indpendent of pre-existing check

   Calling Sequence:
      IDL> ssw_setsswdb_gen (normally from SSW-gen IDL_STARTUP )

 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], FILE_EXIST [2], concat_dir [4]
	file_exist [1], file_exist [3], get_logenv [1], get_logenv [2], set_logenv [1]
	set_logenv [2]
   Side Effects: will set certain environmentals relative to $SSWDB & $ydb


   History:
      2-Nov-2005 - S.L.Freeland - to allow use of "Yohkoh" general
                   interest $SSWDB($ydb), such as gev, nar, & goes LC


ssw_setup_windows $SSW/gen/idl/ssw_system/ssw_setup_windows.pro
[Previous] [Next]
   Name: ssw_setup_windows

   Purpose: Initial setup for Windows

   Input Parameters:
               None
   Calling Examples:

               ssw_setup_windows

   Calls: ***
	ARR2STR [1], Arr2Str [2], CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3]
	DEVICELIB [1], DEVICELIB [2], IMAGELIB, STR_SEP, UITDBLIB [1], UITDBLIB [2]
	concat_dir [4], def_yssysv [1], def_yssysv [2], get_logenv [1], get_logenv [2]
	main_execute [1], main_execute [2], set_logenv [1], set_logenv [2]
	setssw_windows
   Restrictions:
               WINDOWS only
               should be called from initial startup file
   History:
        1-Jun-1999 - R.D.Bentley - Created
       18-Mar-2000 - R.D.Bentley - added decompose statement
                                   call idl_startup.pro if found
        8-May-2000 - R.D.Bentley - same sysvar setup as unix
       11-May-2000  (RDB) - execute idl_startup from site and personal
                            moved some of setup.ssw_* into here
       16-May-2000  (RDB) - fixed bug in search for site/setup/idl_startup
                            added check for SSW_INSTR set
       22-Jun-2000  (RDB) - do set_logenv on expanded SSW_INSTR_ALL
       30-Jun-2000  (RDB) - define hostname from site/setup/setup.hostname
       27-Jul-2000  (RDB) - use $SSW_SITE for $SSW/site
	23-Jan-2003  richard.schwartz@gsfc.nasa.gov - bye, bye, Eddie.
       23-Jan-2003  Zarro (EER/GSFC) - added !SSW system variable to 
                    identify SSW environment
       12-Feb-2004 Zarro (L-3Com/GSFC) - added TIME_CONV definition


ssw_start_rpcserver $SSW/gen/idl/ssw_util/ssw_start_rpcserver.pro
[Previous] [Next]
   Name: ssw_start_rpcserver

   Purpose: start an ssw-idl rpc server with desired ssw environment

   Input Parameters:
      serverid - desired rpc server id - default = 2010CAFE
                 if supplied via string of length 4, then '2010'SERVERID is assumed

   Keyword Parameters:
      cgidir - path to desired cgi
      interactive - if set, ask user for some parameters 
      idl_dir - desired IDL_DIR for server (def=$IDL_DIR or /usr/local/rsi/idl)
      idl_version - optionally supplied IDL V to use
      idl_highest - switch - if set, use latest available idl version
      save_script - if set, save the startup as a script in $SSW/site/setup/
      _EXTRA - optional list of ssw instruments/packages to include in server environment
               (default from current $SSW_INSTR list)
     no_execute=no_execute - do not actually start the created script
     save_script - if set, save the CSH script to $SSW/site/setup/
                   filename='setup.<host>_server_<serverid>'
     path_http - path (local NFS name) to top of desired WWW tree (default=$path_http)
     top_http  - associated URL pointing to PATH_HTTP
                 (note path_http and top_http are local vs remote WWW synonyms)

   Calling Examples:
      ssw_start_rpcserver, 'CAFA', idl_dir='/usr/local/rsi/idl_6.1'
      ssw_start_rpcserver,/interactive 
      
 CALLS: ***
	ARR2STR [1], Arr2Str [2], BOX_MESSAGE, CONCAT_DIR [1], CONCAT_DIR [2]
	CONCAT_DIR [3], FILE_EXIST [2], STR2ARR [1], STR2ARR [2], UNIQ [1], UNIQ [2]
	UNIQ [3], concat_dir [4], data_chk [1], data_chk [2], file_append [1]
	file_append [2], file_exist [1], file_exist [3], file_list [1], file_list [2]
	get_host [1], get_host [2], get_infox, get_logenv [1], get_logenv [2]
	get_user [1], get_user [2], is_member [1], is_member [2], last_nelem
	pr_status [1], pr_status [2], ssw_bin, ssw_strsplit, str_replace [1]
	str_replace [2], strmids [1], strmids [2]
   Restrictions:
      if cgidir is supplied (string or switch), user must have cgi-bin write access.
      assumes idlRPC client exists for this OS/ARCH (in $SSW_PACKAGES/...)

   History:
      23-March-2005 - S.L.Freeland - simplify user setup of ssw/cosec servers
       6-Apr-2005 - S.L.Freeland - inherit environement from caller process
                    (via get_logenv/set_logenv in IDL_STARTUP)
      14-Apr-2005 - S.L.Freeland - more control/options for server $IDL_DIR (version..)
                    made the generated IDL init file run properly 
      4-may-2005 - S.L.Freeland - add $SSW/gen/idl_libs to boot libraries
     10-jan-2005 - S.L.Freeland - trap and define null environmentals expicitly->""

   Method:
      Create implied startup script and launchit - also creates IDL startup
      and environment script so server can inherit kickoff sswidl session env.


ssw_strfind $SSW/gen/idl/ssw_system/ssw_strfind.pro
[Previous] [Next]
   Name: ssw_strfind

   Purpose: find a string pattern in SSW online files (or input file list)

   Input Parameters:
      pattern - string pattern to search for (see _EXTRA keyword for option)

   Output Parameters:
      match_files - list of files where pattern found

   Keyword Parameters:
      files          - file list to search (default is entire SSW tree)
      case_sensitive - switch, if set, search is CASE sensitive (def=insens)
      comments       - switch, if set, include COMMENTS in search (def=EXCLUDE)
      details     - switch, if set, run SEARCH.PRO on matching files
      outfile     - output file name for search results 
                    (if switch, /outfile, then name=$HOME/ssw_strfind.dat)

      _extra      - assume PATTERN passed via keyword inheritence
                    (ex: IDL> ssw_strfind,/uniq) - pattern='uniq')

 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], concat_dir [4], data_chk [1]
	data_chk [2], file_append [1], file_append [2], get_host [1], get_host [2]
	mail [1], mail [2], rd_tfile [1], rd_tfile [2], sswloc, strspecial [1]
	strspecial [2], wc_where [1], wc_where [2]
   Side Effects:
      Creates output file of search results (OUTFILE, 
                     default=$HOME/ssw_strfind.dat)

   History:
      14-oct-1996 - S.L.Freeland 
       2-may-1996 - S.L.Freeland - make file anem include part of string

   Method - calls SSWLOC, WC_WHERE, RD_TFILE, etc.


ssw_strsplit $SSW/gen/idl/string/ssw_strsplit.pro
[Previous] [Next]
   Name: ssw_strsplit

   Purpose: split string array at first (or last) occurence of pattern

   Input Paramters:
      inarry  - initial string array to split
      pattern - search string (default is blank)

   Output:
      function return value is string array 

   Calling Sequence:
      strarr=ssw_strsplit(inarray, pattern , tail=tail)
      strarr=ssw_strsplit(inarray, pattern , /tail, head=head)

   Calling Examples:
      head=ssw_strsplit(inarray, pattern)
      tail=ssw_strsplit(inarray, pattern, /tail)
 
 CALLS: ***
	UNIQ [1], UNIQ [2], UNIQ [3], data_chk [1], data_chk [2]
 CALLED BY:
	Build_Schedule, Create_update_tar, HSI_CHK_DUPLICATE, PURGE_KAPS
	SPEX_GEN__DEFINE, TAG_PREFIX, VIEW_RAW, XCOLORS [2], ace_files, disk_hog [1]
	disk_hog [2], eit_files, eit_getlimb, extract_val, files2data, fitshead2struct
	get_history, get_infox, get_utevent [1], get_utevent [2], goes_value2class
	hsi_params2script, hsi_params_write_pro, hsi_show_flags [2], image2movie
	mdi_write_genxcat, merge_genxcat, mreadfits_header, mreadfits_urls, obj_restore
	obj_save, ospex_params_write_pro, plot_ace, plotman, plotman_conf_panels
	plotman_imageoptions, read_eit, save_idl_routines, set_logvms, soxs_readfile
	special_movie, spex_gen_strategy_holder, ssw_conflicts, ssw_contrib_monitor
	ssw_imapcoord2html, ssw_install [1], ssw_install [2], ssw_instr_info, ssw_path
	ssw_post_query, ssw_start_rpcserver, ssw_swmap_info, ssw_upgrade [1]
	ssw_upgrade [2], ssw_upgrade_backup, sswdb_upgrade, strextract, strpair2struct
	sxi_files, sxt_get_grill [1], sxt_get_grill [2], sxt_patch_att, url_decode
   History:
      13-Jan-1993 (SLF)
      11-Mar-1993 (SLF) 'released'
      10-jun-1994 (SLF) bug fix
      15-mar-2001 (RAS) renamed strsplit to ssw_strsplit


ssw_subimage $SSW/gen/idl/ssw_util/ssw_subimage.pro
[Previous] [Next]
   Name: ssw_subimage

   Purpose: extract sub images from 'index,data'

   Input Parameters:
      index, data - input 2D or 3D 

   Output Parameters:
      oindex,odata - extracted sub image 2D or 3D, SSW tags adjusted

   Keyword Parameters:
         ll,lr,ul,ur,center  - quadrant keywords
         pixsub - sub image in pixel space - [x,y,nx,ny] (x,y=lower left)
         pixcen - sub image center, pixel    [x,y]       (x,y=center pixel)
         xycen  - sub image center, arcsec   [xcen,ycen]
         xypix  - npix [nx,ny] used with pixcen -or- xycen
         overwrite - if set, then clobber 'index,data' (memory management)

 CALLED BY:
	trace_special_movie [2], trace_special_movie [3]
   History:
      25-July-2001 - S.L.Freeland

 CALLS: ***
	BOX_MESSAGE, INDEX2MAP, SUB_MAP, data_chk [1], data_chk [2], gt_tagval [1]
	gt_tagval [2], required_tags, struct2ssw
   Restrictions:
      Only PIXSUB for now (assume data already aligned...)


ssw_swmap_bestof $SSW/gen/idl/ssw_system/ssw_swmap_bestof.pro
[Previous] [Next]

   Name: ssw_swmap_bestof

   Purpose: generate 'bestof' subset of SSW one-liner/category map file

   Input Parameters:
      bestfiles - files to search (default $SSW_SITE_SETUP/bestof.USERNAME
 CALLS: ***
	BOX_MESSAGE, BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CONCAT_DIR [1]
	CONCAT_DIR [2], CONCAT_DIR [3], UNIQ [1], UNIQ [2], UNIQ [3], break_file [4]
	concat_dir [4], data_chk [1], data_chk [2], file_append [1], file_append [2]
	file_list [1], file_list [2], pr_status [1], pr_status [2], rd_tfiles
	str_replace [1], str_replace [2]
   History:
       9-sep-1998 - S.L.Freeland 
      14-Oct-1998 - S.L.Freeland - look in $SSW_SITE_SETUP  for 'bestof'
                                   files if not supplied


ssw_swmap_info $SSW/gen/idl/ssw_system/ssw_swmap_info.pro
[Previous] [Next]

   Name: ssw_swmap_info

   Purpose: Generate 'enhanced' SSW mapfile to add one liners and categories

   Category: ssw,system

 CALLS: ***
	ARR2STR [1], Arr2Str [2], BOX_MESSAGE, CONCAT_DIR [1], CONCAT_DIR [2]
	CONCAT_DIR [3], break_doc [1], break_doc [2], break_doc [3], concat_dir [4]
	file_append [1], file_append [2], pr_status [1], pr_status [2], rd_tfile [1]
	rd_tfile [2], ssw_strsplit, sswloc, str2cols [1], str2cols [2], str_replace [1]
	str_replace [2], strextract, strmids [1], strmids [2], wc_where [1], wc_where [2]
   History:
       8-sep-1998 - S.L.Freeland 
      10-sep-1998 - S.L.Freeland - make temporary version till finished
       6-Oct-1998 - S.L.Freeland - add N.A. to purpose if not defined
      09-May-2003, William Thompson - Use ssw_strsplit instead of strsplit


ssw_swmap_uniqinfo $SSW/gen/idl/ssw_system/ssw_swmap_uniqinfo.pro
[Previous] [Next]

   Name: ssw_swmap_uniqinfo

   Purpose: Generate or return lists of uniq 'instruments' and uniq categories

   Input Parameters:
      NONE:

   Output Parameters:
      ucat -   uniq categories 
      uinstr - uniq "instruments" (instrument,missions,pacakges...)

   Calling Sequence:
       ssw_swmap_uniqinfo, ucat, uinstr   - return uniq lists from files
   -OR-
       ssw_swmap_uniqinfo, /generate      - make the uniq list files
                                            (usually part of cron process)

   Category: ssw,system,documentation

 CALLS: ***
	ALL_VALS [1], ALL_VALS [2], CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3]
	FILE_EXIST [2], concat_dir [4], data_chk [1], data_chk [2], file_append [1]
	file_append [2], file_exist [1], file_exist [3], rd_tfile [1], rd_tfile [2]
	str2cols [1], str2cols [2], strarrcompress, strmids [1], strmids [2]
   History:
       6-Oct-1998 - S.L.Freeland - supplement swmap_info 
       9-Oct-1998 - S.L.Freeland - "flatten" uniq categories (1D)
                                   via new str2cols call


ssw_time2filelist $SSW/gen/idl/ssw_util/ssw_time2filelist.pro
[Previous] [Next]
   Name: ssw_time2filelist

   Purpose: return files within time range, optionally listing

   Input Paramters:
      time0, time1 - time range desired

   Keyword Parameters
      parent - optional top level; assumed structured <parent>/yyyy/mm/dd
      paths  - list of explicit paths to search (if not chron subdirs)
      in_files - explicit file list or url list (skip listing segment)
      pattern - optional file pattern
      recurse - (switch) recursive search for all PATHS 
      fits - (switch) - if set, imply PATTERN='*.fts' or '*.fits'
      daily,weekly,monthly,year_2digit - in conjunction w/PARENT, define
         directory structure - default=/DAILY -> <parent>/yyyy/mm/dd/<files>
      flat (switch -> ssw_time2paths) - if subdirectories are not nested.
              for example,  <parent>/yyyymmdd instead of <parent>/yyyy/mm/dd

   Calling Examples:
      IDL> eitqkl=ssw_time2filelist(reltime(hours=-6),reltime(/now),parent='$EIT_QKL')
      IDL> help,eitqkl & more,[eitqkl(0),last_nelem(eitqkl)]
           /service/eit_data/quicklook/2006/07/31/efr20060731.160009 ; YYYY/MM/DD org
           /service/eit_data/quicklook/2006/07/31/efr20060731.202409

      IDL> eitlz=ssw_time2filelist('12:00 15-mar-2001','06:00 16-mar-2001',$
                     parent='$EIT_LZ',/MONTHLY)
      IDL> help,eitlz & more,[eitlz(0),last_nelem(eitlz)]
      IDL> /service/eit_data/lz/2001/03/efz20010315.120011 ; YYYY/MM org (/MONTHLY)
      IDL> /service/eit_data/lz/2001/03/efz20010316.054810
      

 CALLED BY:
	secchi_time2files
   History:
      27-Jul-2006 - S.L.Freeland - recast file/dir time search using
                    sss_time2paths & RSI 'file_search' & 'strmatch'
       4-Dec-2006 - S.L.Freeland - document /FLAT option, used by
                    STEREO/SECCHI for example (via secchi_time2filelist)
                    Fixed a type (temporarary mispell in heretofore unexplored path)

   Methdod:
      combine implied calls to ssw_time2paths, file_search & strmatch

 CALLS: ***
	BOX_MESSAGE, SINCE_VERSION [1], SINCE_VERSION [2], TIME2FILE, anytim [1]
	anytim [2], anytim [3], anytim [4], anytim [5], curdir [1], curdir [2], data_chk [1]
	data_chk [2], extract_fids, reltime [1], reltime [2], ssw_time2paths
	strspecial [1], strspecial [2]
   Restrictions:
      if 'in_files' supplied, assume ...[yy]yymmdd[delim[hhmm[ss[mss]]]]]....
      Need at least V5.4 if internal listing is desired (RSI file_search)
      Need at least V5.3 if IN_FILES supplied (ie, no listing - need RSI strmatch) 
      If PARENT supplied, then we assume "standard" chronological 
      subdirectory ordering per ssw_time2paths - in that case, PATHS
      is derived from the implied and derived path list


ssw_time2paths $SSW/gen/idl/ssw_util/ssw_time2paths.pro
[Previous] [Next]
   Name: ssw_time2paths

   Purpose: return implied path list for time range; optionally w/file search

   Input Parameters:
      time0, time1 - desired time range
      parentx - optional positional synonym for keywor PARENT  (see that)

   Output Parameters:
     function returns directory list 
       -OR- full file path  if FILE_PAT supplied 

   Keyword Parameters:
     parent - path to top of tree (may be NFS path or URL for example)
     file_pat - optional file pattern for file search 
     daily - set if organization is <parent>/yyyy/mm/dd/
     monthly - set if organization is <parent>/yyyy/mm/
     weekly  - set if organization is <parent>/weekid (per anytim2weekinfo.pro)
     exist - if set, check for existence and return only those   
             (could be much slower; default returns "idealized" list)
     count - number of elements returned by this function
     flat - switch - if set,paths are flattened
            e.g. <parent>/yyyymmdd instead of <parent>/yyyy/mm/dd/

   Calling Example:
      paths=ssw_time2paths('1-jan-1999','31-jan-1999',parent='/top',/daily)
      paths=ssw_time2paths('1-jan-1999','31-jan-1999','/top',/daily) ; same
      help,paths & more,[paths(0:3),last_nelem(paths,3)]

 CALLS: ***
	BOX_MESSAGE, CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], DELVARX [1]
	DELVARX [2], DELVARX [3], DELVARX [4], FILE_EXIST [2], UNIQ [1], UNIQ [2], UNIQ [3]
	anytim [1], anytim [2], anytim [3], anytim [4], anytim [5], anytim2weekinfo
	concat_dir [4], curdir [1], curdir [2], data_chk [1], data_chk [2], delvarx [5]
	file_exist [1], file_exist [3], file_list [1], file_list [2], str_replace [1]
	str_replace [2], timegrid
 CALLED BY:
	ssw_time2filelist
   History:
      22-Aug-2005 - S.L.Freeland - common client/service utility
       2-nov-2005 - S.L.Freeland - add /QUIET to timegrid call
      24-apr-2006 - S.L.Freeland - truncate times to /DATE_ONLY to force
                    pickup of last element 
       4-dec-2006 - S.L.Freeland - add /FLAT keyword&function (STEREO for ex)


ssw_time_compare $SSW/gen/idl/ssw_util/ssw_time_compare.pro
[Previous] [Next]
   Name: ssw_time_compare

   Purpose: boolean time or file-time compare (combine some SSW functions)

   Input Parameters:
      times - time vector, any SSW format. If /FILES set, times=filenames
      reference - the reference time for boolean compare, any SSW
  
   Output:
      function returns truth as implied by user keywords
      Scalar if TIMES is scalar, Vector if TIMES is vector  
     
   Keyword Parameters:
      reference - the reference time to compare, any SSW format
      later    (switch) - if set, return true = TIMES newer than REFERENCE
      after    (switch) - synonym for LATER
      earlier  (switch) - if set, return true = TIMES older than REFERENCE
      before   (switch) - synonym for EARLIER
      files    (switch) - USE THIS IF 'times' are file names (assume inc UT) 

   Calling Examples:
      if ssw_time_compare(time,reftime,/earlier) then ...  
      if ssw_time_compare(time,reftime,/later) then...
      earlyss=where(ssw_time_compare(index,'1-feb-98',/earlier),earlycount)
      newerfiless=where(ssw_time_compare,FILELIST,'1-feb-98',/files,/later)
  
 CALLED BY:
	IRU_S2Y, get_epoch_sfcs [1], get_epoch_sfcs [2], mk_sdc [2], mk_sdc [3]
	mk_sdc [4], mk_syn_sfc [1], mk_syn_sfc [2], mk_synsfc_coeff [1]
	mk_synsfc_coeff [2], sel_dc_image [1], sel_dc_image [2], sel_dc_image [3]
	sfc_prep [1], sfc_prep [2], sxt_get_grill [1], sxt_get_grill [2]
   History:
      3-December-1998 S.L.Freeland - convenient interface for standard call

   Method:
      call ssw_deltat - compare times to reference and return truth
      
   Calls: ***
	BOX_MESSAGE, FILE2TIME, ssw_deltat


ssw_timestat $SSW/gen/idl/ssw_util/ssw_timestat.pro
[Previous] [Next]
   Name: ssw_timestat

   Purpose: return time 'statistics'

   Input Paramters:
      times - vector of times, any SSW format (per anytim.pro)

   Output:
      function returns requested value based on user keywords

   Keyword Parameters:
      average - return average of input times
      mean    - return mean time
      mindiff - return time with minimum residuals 
      out_style - optional output time style (for 'average') per anytim.pro
      ss - if set, return the SS (subscript) of <times> (def= actual time)

 CALLS: ***
	AVERAGE, BOX_MESSAGE, anytim [1], anytim [2], anytim [3], anytim [4], anytim [5]
	ssw_deltat, tim2dset [1], tim2dset [2]
   History:
      3-November-1999 - S.L.Freeland - simplify some repeat logic

   Method:
      call ssw_deltat and act per user keyword settings


ssw_track_demo $SSW/gen/idl/ssw_util/ssw_track_demo.pro
[Previous] [Next]
   Name: ssw_track_demo

   Purpose: make level1 EIT movies for WWW, demo some SSW/EIT SW.

   History:
      8-Nov-1998 - S.L.Freeland - string together some common EIT/SSW stuff
                   (based on mk_lasteit_movie, trace_special_movie, etc)  
  
   Input Parameters:
      time0, time1 - time range of interest

   Keyword Parameters:
      ref_map - (optional) a map (per DMZ) of reduced FOV to track  
                [if not supplied, user selection of FOV 1st wavelen]
      hours   - desired movie cadence
      waves   - optional set of waves (default is all=[171,195,284,304]  )
      _extra  - other keywords passed via inheritance to special_movie.  

   Calls: ***
	BOX_MESSAGE, CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], EIT_PREP, FILE2TIME
	STR2ARR [1], STR2ARR [2], STRETCH, concat_dir [4], data_chk [1], data_chk [2]
	eit_colors, eit_files, file_append [1], file_append [2], grid_data [1]
	grid_data [2], html_doc, read_eit, sobel_scale, special_movie, ssw_track_fov


ssw_track_fov $SSW/gen/idl/ssw_util/ssw_track_fov.pro
[Previous] [Next]
 NAME:
    ssw_track_fov

 PURPOSE:
    Extract a sub-field from the SSW-compliant (2D) image data
    based on the reference time and reference coordinates.
 CALLING SEQUENCE:
     ssw_track_fov, index, data, outindex, outdata,/interactive 
 CALLS:
 CALLED BY
	EIT_SUB_MOVIE, ssw_track_demo, trace_special_movie [1]
	trace_special_movie [2], trace_special_movie2


ssw_unspike_cube $SSW/gen/idl/ssw_util/ssw_unspike_cube.pro
[Previous] [Next]
 Project     : SSW (TRACE/CDS/SXT/SXI...)

 Name        : ssw_unspike_cube

 Purpose     : temporal despiking of CCD image cube using neighbor images

 Category    : Image processing

 Explanation : (from trace_unpike_time header)
               This algorithm cleans up spiky pixel in TRACE images which are either
		high because of a cosmic ray hit or represent "hot pixels" that are 
		temporarily enhanced. Because this algorithm is based on spatial and
		temporal next neighbors (from the 3x3x3 cube around the spiky pixel) it 
		requires a 3D data cube with a sequence of images DATA(*,*,NTIMES), 
		NTIMES>3. It filters out noisy spikes that exceed a threshold factor THRES 
		above the average of 2x8 nearest spatial neighbors of the preceding and
		following image. The 8 nearest spatial neighbors in the simultaneous image
		are not used because of the ring-like sidelobes produced by the jpeg compression
		around a cosmic ray hit. The spiky pixel is replaced by the average of the
		nearest 2 temporal pixels if the spikly pixel is a cosmic ray hit but 
		not a "hot pixel". The noisy pixel is replaced by average of the 2x8 nearest 
		(non-simultaneous) spatial neighbors if it is a "hot pixel".
		This algorighm works similar to TRACE_DESPIKE and TRACE_DESTREAK, 
		but seems to produce cleaner images for long exposure times where 
		cosmic ray hit rate is high. Multiple iterations of this algorithm are 
		recommended for deep cleaning (e.g. THESH=1.15), while a single iteration
		if sufficient for coarse cleaning (e.g. THRESH=1.5).
		This IDL algorithm is a vectorized version. 


   Input Parameters: 
      index, data - standaard read_xxx 'index,data' output
 
   Output Paramters:
      outindex - optional, index with .HISTORY updated 

    Keyword Parameters:
      threshold - sensitivity threshold, default = 1.5
      verbose/loud (synonyms) - if set, be noiser to TTY
      display - if set, display to image device
      logfile - if string, name of logfile to write statistics too
                if set (/LOGFILE), log to $HOME/trace_unspkike_time.dat
      new - if set and logfile defined or set, force new logfile (def=append)
      update_hist - if set, update .HISTORY tag of input index vector
                    [optionally, can return same in 3rd parameter to avoid
                     clobbering input]
  
    Calling Sequence:
       cleaned=ssw_unspike_cube(index,data [,newindex] [,theshold=threshold] , $
                   [ /verbose, /loud, /logfile, /display]
    History
      Version 1,  30-MAR-1990,  Markus J. Aschwanden, LMSAL,  Written
      Version 2,  19-July-1999, S.L.Freeland, LMSAL, rename ->function
                   sswify it, remove explicit LUN, make it quiet
                   by default, make logging statistics optional
      Version 2.1 20-July-1999, S.L.F. added UPDATE_HISTORY keyword and function
      Version 2.2 15-Sep-1999,  S.L.F. correct a call to 'concat_dir'
      Version 2.3 24-jul-2000, S.L.Freeland - minor gentrification and
                               -> ssw/gen

    Usage:
       Suggest 2D despiking pass first and image registration
       Cadence should be reasonable relative to lifetime of transient 
       small features (XRay Bright Points for example)
       
 Contact     : aschwanden@lmsal.com / freeland@penumbra.nascom.nasa.gov
 CALLS:
 CALLED BY
	eit_proton_summary, trace_special_movie [2], trace_special_movie [3]


ssw_upgrade [1] $SSW/gen/idl/ssw_system/ssw_upgrade.pro
[Previous] [Next]
 Name: ssw_upgrade

 Purpose: generate SSW set list, generate packages and spawn mirror job

 Keyword Parameters:
   SITE - if set, include $SSW/site (only on request)
   XXX  - ex: /eit, /mdi, /sxt, /trace.. update only specified instruments
                (if none specified , list is derived from $SSW_INSTR)
   outdir -     local path to keep mirror files (def=$SSW_SITE_MIRROR)
   outpackage - name of mirror file (def='ssw_upgrade.mirror')
   no package - if set, do not generate new package 
   spawnit    - if set, spawn the mirror job
   nospawn    - if set, do not spawn/execute mirror (ex: just make package) DEFAULT
   noexecute  - synonym for nospawn
   remote_sets (output) - list of remote sets/paths (on SSW master)
   local_sets  (output) - list of local ( relative to $SSW)
   loud - switch, if set, echo Mirror output 
   verbose - switch , if set, synonym for /LOUD
   result (output) - output of mirror command
   mirror - optional path/name of mirror to run (default = ssw_bin('mirror'))
   ssw_parent - optional '$SSW' (default is local)
   ssw_instr  - optional list   (default is local)
   update_log - (switch) - if set, update $SSW/site/logs/ssw_upgrade_xxx.log
   passive_ftp - (switch) - if set, tell make_mirror to use passive_ftp
                            (alternately, via $ssw_passive_ftp env) 
 Calling Examples:
   ssw_upgrade,/eit,/sxt,/spawn  - update specified instrument trees (and required GENs)
   ssw_upgrade,/eit,/sxt         - generate same package but dont spawn mirror job
   ssw_upgrade,/spawn            - update trees implied by $SSW_INSTR
   ssw_upgrade,/site,/spawn      - same but update SITE (! warning)
   ssw_upgrade, remote=remote, local=local,/nospawn, /nopackage - just return paths
   ssw_upgrade, /eit, mirror='$SSW/packages/mirror/mirror' ; use specified 
                                                           ; mirror

 CALLED BY:
	ssw_install [1], ssw_install [2]
 History:
    1-Dec-1996 - Written by Samuel Freeland   
   16-Jan-1997 - S.L.Freeland - added /SPAWN and made /NOSPAWN the default
                 Some auto definition of OUTDIR
   31-mar-1997 - S.L.Freeland - add /LOUD,/VERBOSE, and RESULT
   16-apr-1997 - S.L.Freeland - add USER & GROUP
   23-apr-1997 - S.L.Freeland - adjust to allow single instrument missions
                                to exist directly under $SSW
                                assure USER and GROUP are defined
   22-may-1997 - S.L.Freeland - set MAX_DELETE_FILE&MAX_DELTE_DIRS to 99%
   19-aug-1997 - S.L.Freeland - if MIRROR not passed, call ssw_bin('mirror')
   10-sep-1997 - S.L.Freeland - use $SSW/gen/mirror if mirror not passed
   16-sep-1997 - S.L.Freeland - print warning and abort if cannot update
                                existing mirror file  
    5-nov-1997 - S.L.Freeland - make yohkoh/gen imply yohkoh/ucon
   26-Mar-1998 - M.D.Morrison - Added SSW_MIRROR_PKG env var option
   22-Feb-1999 - S.L.Freeland - use /NO_SYMBOLIC_LINK in make_mirror call
   27-Feb-1999 - S.L.Freeland - add /nomult to str2arr call for $SSW_INSTR
                                (assures no 'null' instrumnents)
   30-Nov-1999 - S.L.Freeland - add ssw_parent, ssw_instr, update_logs
                                (allow faking for different environment -
                                 for example , make WINDOWS package under UNIX)
   18-Apr-2001 - S.L.Freeland - file_delete->ssw_file_delete
                                due to RSI screwup...
    4-Oct-2001 - S.L.Freeland - check for $ssw_passive_ftp (firewall client?)
      09-May-2003, William Thompson - Use ssw_strsplit instead of strsplit
   16-feb-2004 - S.L.Freeland - add solarb and vobs to multi-instr missions
   27-apr-2004 - S.L.Freeland - add stereo to multi-instr missions...
   18-apr-2005 - S.L.Freeland - find perl (used by mirror) if not in "expected" place
   30-mar-2006 - s.L.Freeland - enable Windows use & enable RHESSI/HESSI synonym
                                (at least for the weekend, callit ssw_upgrade2.pro)
    6-oct-2006 - D.M.Zarro / Freeland - solarb->hinode
    2-jan-2007 - S.L.Freeland - optical->multi_miss (optical/gen now available)

 CALLS: ***
	BOX_MESSAGE, BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CONCAT_DIR [1]
	CONCAT_DIR [2], CONCAT_DIR [3], FILE_EXIST [2], OS_FAMILY, SSW_FILE_DELETE
	STR2ARR [1], STR2ARR [2], UNIQ [1], UNIQ [2], UNIQ [3], break_file [4]
	concat_dir [4], curdir [1], curdir [2], data_chk [1], data_chk [2]
	file_append [1], file_append [2], file_exist [1], file_exist [3], get_group
	get_logenv [1], get_logenv [2], get_user [1], get_user [2], make_mirror, prstr [1]
	prstr [2], rd_tfile [1], rd_tfile [2], set_logenv [1], set_logenv [2]
	ssw_install_explinkages, ssw_strsplit, ssw_whereis_perl, str_replace [1]
	str_replace [2], strjustify, where_arr [1], where_arr [2]
 Restrictions:
   For now, all local in terms of local $SSW (no split instrument trees)
   Assume SolarSoft, Perl and Mirror must be installed on local machine (if /SPAWN)


ssw_upgrade [2] $SSW/gen/idl/ssw_system/ssw_upgrade2.pro
[Previous] [Next]
 Name: ssw_upgrade

 Purpose: generate SSW set list, generate packages and spawn mirror job

 Keyword Parameters:
   SITE - if set, include $SSW/site (only on request)
   XXX  - ex: /eit, /mdi, /sxt, /trace.. update only specified instruments
                (if none specified , list is derived from $SSW_INSTR)
   outdir -     local path to keep mirror files (def=$SSW_SITE_MIRROR)
   outpackage - name of mirror file (def='ssw_upgrade.mirror')
   no package - if set, do not generate new package 
   spawnit    - if set, spawn the mirror job
   nospawn    - if set, do not spawn/execute mirror (ex: just make package) DEFAULT
   noexecute  - synonym for nospawn
   remote_sets (output) - list of remote sets/paths (on SSW master)
   local_sets  (output) - list of local ( relative to $SSW)
   loud - switch, if set, echo Mirror output 
   verbose - switch , if set, synonym for /LOUD
   result (output) - output of mirror command
   mirror - optional path/name of mirror to run (default = ssw_bin('mirror'))
   ssw_parent - optional '$SSW' (default is local)
   ssw_instr  - optional list   (default is local)
   update_log - (switch) - if set, update $SSW/site/logs/ssw_upgrade_xxx.log
   passive_ftp - (switch) - if set, tell make_mirror to use passive_ftp
                            (alternately, via $ssw_passive_ftp env) 
 Calling Examples:
   ssw_upgrade,/eit,/sxt,/spawn  - update specified instrument trees (and required GENs)
   ssw_upgrade,/eit,/sxt         - generate same package but dont spawn mirror job
   ssw_upgrade,/spawn            - update trees implied by $SSW_INSTR
   ssw_upgrade,/site,/spawn      - same but update SITE (! warning)
   ssw_upgrade, remote=remote, local=local,/nospawn, /nopackage - just return paths
   ssw_upgrade, /eit, mirror='$SSW/packages/mirror/mirror' ; use specified 
                                                           ; mirror

 CALLED BY:
	ssw_install [1], ssw_install [2]
 History:
    1-Dec-1996 - Written by Samuel Freeland   
   16-Jan-1997 - S.L.Freeland - added /SPAWN and made /NOSPAWN the default
                 Some auto definition of OUTDIR
   31-mar-1997 - S.L.Freeland - add /LOUD,/VERBOSE, and RESULT
   16-apr-1997 - S.L.Freeland - add USER & GROUP
   23-apr-1997 - S.L.Freeland - adjust to allow single instrument missions
                                to exist directly under $SSW
                                assure USER and GROUP are defined
   22-may-1997 - S.L.Freeland - set MAX_DELETE_FILE&MAX_DELTE_DIRS to 99%
   19-aug-1997 - S.L.Freeland - if MIRROR not passed, call ssw_bin('mirror')
   10-sep-1997 - S.L.Freeland - use $SSW/gen/mirror if mirror not passed
   16-sep-1997 - S.L.Freeland - print warning and abort if cannot update
                                existing mirror file  
    5-nov-1997 - S.L.Freeland - make yohkoh/gen imply yohkoh/ucon
   26-Mar-1998 - M.D.Morrison - Added SSW_MIRROR_PKG env var option
   22-Feb-1999 - S.L.Freeland - use /NO_SYMBOLIC_LINK in make_mirror call
   27-Feb-1999 - S.L.Freeland - add /nomult to str2arr call for $SSW_INSTR
                                (assures no 'null' instrumnents)
   30-Nov-1999 - S.L.Freeland - add ssw_parent, ssw_instr, update_logs
                                (allow faking for different environment -
                                 for example , make WINDOWS package under UNIX)
   18-Apr-2001 - S.L.Freeland - file_delete->ssw_file_delete
                                due to RSI screwup...
    4-Oct-2001 - S.L.Freeland - check for $ssw_passive_ftp (firewall client?)
      09-May-2003, William Thompson - Use ssw_strsplit instead of strsplit
   16-feb-2004 - S.L.Freeland - add solarb and vobs to multi-instr missions
   27-apr-2004 - S.L.Freeland - add stereo to multi-instr missions...
   18-apr-2005 - S.L.Freeland - find perl (used by mirror) if not in "expected" place
   30-mar-2006 - s.L.Freeland - enable Windows use & enable RHESSI/HESSI synonym
                                (at least for the weekend, callit ssw_upgrade2.pro)

 CALLS: ***
	BOX_MESSAGE, BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CONCAT_DIR [1]
	CONCAT_DIR [2], CONCAT_DIR [3], FILE_EXIST [2], OS_FAMILY, SSW_FILE_DELETE
	SSW_UPGRADE2, STR2ARR [1], STR2ARR [2], UNIQ [1], UNIQ [2], UNIQ [3], break_file [4]
	concat_dir [4], curdir [1], curdir [2], data_chk [1], data_chk [2]
	file_append [1], file_append [2], file_exist [1], file_exist [3], get_group
	get_logenv [1], get_logenv [2], get_user [1], get_user [2], make_mirror, prstr [1]
	prstr [2], rd_tfile [1], rd_tfile [2], set_logenv [1], set_logenv [2]
	ssw_install_explinkages, ssw_strsplit, ssw_whereis_perl, str_replace [1]
	str_replace [2], strjustify, where_arr [1], where_arr [2]
 Restrictions:
   For now, all local in terms of local $SSW (no split instrument trees)
   Assume SolarSoft, Perl and Mirror must be installed on local machine (if /SPAWN)


ssw_upgrade_backup $SSW/gen/idl/ssw_system/ssw_upgrade_backup.pro
[Previous] [Next]
 Name: ssw_upgrade_backup

 Purpose: generate SSW set list, generate packages and spawn mirror job
          THIS VERSION IS A BACKUP IN CASE ssw_upgrade.pro FAILS...

 Keyword Parameters:
   SITE - if set, include $SSW/site (only on request)
   XXX  - ex: /eit, /mdi, /sxt, /trace.. update only specified instruments
                (if none specified , list is derived from $SSW_INSTR)
   outdir -     local path to keep mirror files (def=$SSW_SITE_MIRROR)
   outpackage - name of mirror file (def='ssw_upgrade.mirror')
   no package - if set, do not generate new package 
   spawnit    - if set, spawn the mirror job
   nospawn    - if set, do not spawn/execute mirror (ex: just make package) DEFAULT
   noexecute  - synonym for nospawn
   remote_sets (output) - list of remote sets/paths (on SSW master)
   local_sets  (output) - list of local ( relative to $SSW)
   loud - switch, if set, echo Mirror output 
   verbose - switch , if set, synonym for /LOUD
   result (output) - output of mirror command
   mirror - optional path/name of mirror to run (default = ssw_bin('mirror'))
   ssw_parent - optional '$SSW' (default is local)
   ssw_instr  - optional list   (default is local)
   update_log - (switch) - if set, update $SSW/site/logs/ssw_upgrade_xxx.log
   passive_ftp - (switch) - if set, tell make_mirror to use passive_ftp
                            (alternately, via $ssw_passive_ftp env) 
 Calling Examples:
   ssw_upgrade,/eit,/sxt,/spawn  - update specified instrument trees (and required GENs)
   ssw_upgrade,/eit,/sxt         - generate same package but dont spawn mirror job
   ssw_upgrade,/spawn            - update trees implied by $SSW_INSTR
   ssw_upgrade,/site,/spawn      - same but update SITE (! warning)
   ssw_upgrade, remote=remote, local=local,/nospawn, /nopackage - just return paths
   ssw_upgrade, /eit, mirror='$SSW/packages/mirror/mirror' ; use specified 
                                                           ; mirror

 History:
    1-Dec-1996 - Written by Samuel Freeland   
   16-Jan-1997 - S.L.Freeland - added /SPAWN and made /NOSPAWN the default
                 Some auto definition of OUTDIR
   31-mar-1997 - S.L.Freeland - add /LOUD,/VERBOSE, and RESULT
   16-apr-1997 - S.L.Freeland - add USER & GROUP
   23-apr-1997 - S.L.Freeland - adjust to allow single instrument missions
                                to exist directly under $SSW
                                assure USER and GROUP are defined
   22-may-1997 - S.L.Freeland - set MAX_DELETE_FILE&MAX_DELTE_DIRS to 99%
   19-aug-1997 - S.L.Freeland - if MIRROR not passed, call ssw_bin('mirror')
   10-sep-1997 - S.L.Freeland - use $SSW/gen/mirror if mirror not passed
   16-sep-1997 - S.L.Freeland - print warning and abort if cannot update
                                existing mirror file  
    5-nov-1997 - S.L.Freeland - make yohkoh/gen imply yohkoh/ucon
   26-Mar-1998 - M.D.Morrison - Added SSW_MIRROR_PKG env var option
   22-Feb-1999 - S.L.Freeland - use /NO_SYMBOLIC_LINK in make_mirror call
   27-Feb-1999 - S.L.Freeland - add /nomult to str2arr call for $SSW_INSTR
                                (assures no 'null' instrumnents)
   30-Nov-1999 - S.L.Freeland - add ssw_parent, ssw_instr, update_logs
                                (allow faking for different environment -
                                 for example , make WINDOWS package under UNIX)
   18-Apr-2001 - S.L.Freeland - file_delete->ssw_file_delete
                                due to RSI screwup...
    4-Oct-2001 - S.L.Freeland - check for $ssw_passive_ftp (firewall client?)
      09-May-2003, William Thompson - Use ssw_strsplit instead of strsplit
   16-feb-2004 - S.L.Freeland - add solarb and vobs to multi-instr missions
   27-apr-2004 - S.L.Freeland - add stereo to multi-instr missions...
   18-apr-2005 - S.L.Freeland - ssw_upgrade -> ssw_upgrade_backup
                                THIS IS A RECOVERY VERSION
 CALLS: ***
	BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CONCAT_DIR [1], CONCAT_DIR [2]
	CONCAT_DIR [3], FILE_EXIST [2], SSW_FILE_DELETE, STR2ARR [1], STR2ARR [2]
	UNIQ [1], UNIQ [2], UNIQ [3], break_file [4], concat_dir [4], data_chk [1]
	data_chk [2], file_exist [1], file_exist [3], get_group, get_logenv [1]
	get_logenv [2], get_user [1], get_user [2], make_mirror, prstr [1], prstr [2]
	set_logenv [1], set_logenv [2], ssw_install_explinkages, ssw_strsplit
	str_replace [1], str_replace [2], strjustify, where_arr [1], where_arr [2]
 Restrictions:
   For now, all local in terms of local $SSW (no split instrument trees)
   Assume SolarSoft, Perl and Mirror must be installed on local machine (if /SPAWN)


ssw_url2data $SSW/gen/idl/ssw_util/ssw_url2data.pro
[Previous] [Next]
   Name: ssw_url2data

   Purpose: copy ftp or http files->local; optionally read

   Input Parameters:
      urls - one or more URLs to collect (http://.., ftp://..., /local...)
   
   Output Paramters:
      index, data - optional 'index,data' outputo;
   
   Keyword Parameters"
      outdir & tempdir (synonyms) - output for local files

 CALLS: ***
	BOX_MESSAGE, BREAK_URL, CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3]
	FILE_EXIST [2], GET_TEMP_DIR, SMART_FTP, SOCK_COPY, SSW_READ_XXX, concat_dir [4]
	data_chk [1], data_chk [2], file_exist [1], file_exist [3]
   History:
      24-Sep-2001 - S.L.Freeland - inteface to http/ftp/local gets
      Circa 1-jan-2003 - replace url_get with DMZarro sock_copy call


ssw_whereis_perl $SSW/gen/idl/ssw_system/ssw_whereis_perl.pro
[Previous] [Next]
   Name: ssw_whereis_perl

   Purpose: return path to perl on this system

   Calling Sequence:
      perlpath=ssw_whereis_perl

   Keyword Parameters:
      default (switch) - if set, return 'SSW default' but dont verify
      (for use in caller via "if ssw_whereis_perl() ne  ssw_whereis_perl(/default) then ..."
      status - 1 if returned path to perl is valid on system (ie, exists)

   Motiviation:
      ssw_upgrade helper function - in case perl is not in the place "expected"
         by the default Mirror.pl script historically /usr/local/bin/perl

 CALLS:
 CALLED BY
	ssw_upgrade [1], ssw_upgrade [2]


SSW_WRITE_GIF $SSW/gen/idl/io/ssw_write_gif.pro
[Previous] [Next]
 NAME:
	SSW_WRITE_GIF

 PURPOSE:
	Write an IDL image and color table vectors to a
	GIF (graphics interchange format) file.

       For IDL 5.3 and earlier, this routine simply calls WRITE_GIF.  For
       later versions of IDL, WRITE_PPM is called, and ppmtogif is spawned
       (Unix only).

 CATEGORY:

 CALLING SEQUENCE:

	SSW_WRITE_GIF, File, Image  ;Write a given array.

	SSW_WRITE_GIF, File, Image, R, G, B  ;Write array with color tables.


 INPUTS:
	Image:	The 2D array to be output.

 OPTIONAL INPUT PARAMETERS:
      R, G, B:	The Red, Green, and Blue color vectors to be written
		with Image.
 Keyword Inputs:
       None.  The WRITE_GIF keywords are not supported.

 OUTPUTS:
	If R, G, B values are not provided, the last color table
	established using LOADCT is saved. The table is padded to
	256 entries. If LOADCT has never been called, we call it with
	the gray scale entry.


 CALLS: ***
	ALLOW_GIF, LOADCT, REVERSE, WRITE_GIF, WRITE_PPM, ssw_bin
 CALLED BY:
	ARR2GIF, CDS_THUMBNAIL, DAT2GIF, FIT2GIF, MAP2GIF, MK_CDS_GIF, MK_GIF, SAVEIMAGE
	WR_MOVIE, X2GIF, mkthumb, sxi_latest, testcube
 COMMON BLOCKS:
	COLORS

 SIDE EFFECTS:
	If R, G, and B aren't supplied and LOADCT hasn't been called yet,
	this routine uses LOADCT to load the B/W tables.

 RESTRICTIONS:
	This routine only writes 8-bit deep GIF files of the standard
	type: (non-interlaced, global colormap, 1 image, no local colormap)

       For IDL versions 5.4 and above, the ppmtogif program must be installed,
       and in the user's path.  This program is part of the Netpbm package,
       available at http://netpbm.sourceforge.net/

	The Graphics Interchange Format(c) is the Copyright property
	of CompuServ Incorporated.  GIF(sm) is a Service Mark property of
	CompuServ Incorporated.

 MODIFICATION HISTORY:
	Version 1, 8-Aug-2003, William Thompson
       Version 2, 13-Aug-2003, William Thompson
               Call ALLOW_GIF


sswdb_files $SSW/gen/idl/ssw_system/sswdb_files.pro
[Previous] [Next]
   Name: sswdb_files

   Purpose: return various $SSWDB file lists

   Input Parameters:
      time0, time1 - optional time range for dbsets which are time-centric

   Keyword Parameters:
      pattern - optional file pattern to match
      _extra - instrument, environmental and/or dbset 
               (for string match

   Calling Example:
      files=sswdb_files(/hessi,/test)
   
   Calls: ***
	BOX_MESSAGE, CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], FILE2TIME, anytim [1]
	anytim [2], anytim [3], anytim [4], anytim [5], concat_dir [4], data_chk [1]
	data_chk [2], file_list [1], file_list [2], sel_timrange [1], sel_timrange [2]
	sswdb_info, str_replace [1], str_replace [2], tim2dset [1], tim2dset [2]
 CALLED BY:
	ssw_fov_context
   History:
      14-Feb-2002 - S.L.Freeland - exploit $SSWDB org. and sswdb_info.pro
      18-Mar-2003 - S.L.Freeland - add /BETWEEN to sel_timrange

   Restrictions:
      if time/time range specified, dbfile names assume UT time [yy]yymmdd[...]


sswdb_info $SSW/gen/idl/ssw_system/sswdb_info.pro
[Previous] [Next]
   Name: sswdb_info

   Purpose: return info about SSWDB data bases (sizes, descriptions...)

   Input Parameters:
      dbsets - desired dbsets, either ENV name or relative path (def=all)

   Keyword Parameters:
      all output keywords map to DBSETS (user input or all)
      dbenv   - (out) environmental names for DBSETS 
      prefix  - (out) file prefix for DBSETS, if any
      relpath - (out) relative pathname (relative to $SSWDB or env)
      default - (out) flag if 'suggested' dbase (yes/no) (not yet used)
      description (out) one line description
      environ - (out) - local translation of dbenv
      status - (out) - success flag, 0=> no matching sets found
      pattern - (in) - one or more patterns to match

 CALLS: ***
	BOX_MESSAGE, CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], STR2ARR [1]
	STR2ARR [2], STRPAD, STRTAB2VECT, concat_dir [4], data_chk [1], data_chk [2]
	file_append [1], file_append [2], get_logenv [1], get_logenv [2], html_doc
	html_highlight, rd_tfile [1], rd_tfile [2], rem_elem [1], rem_elem [2]
	str2cols [1], str2cols [2], str_replace [1], str_replace [2], strarrcompress
	strjustify, strtab2html
 CALLED BY:
	sswdb_files, sswdb_install, sswdb_upgrade
   History:
      25-Jan-1999 - S.L.Freeland  - for WWW and local sswdb config.
      27-Jan-1999 - S.L.Freeland  - fixed teeny bug (kept it from working...)
      23-Jan-2001 - S.L.Freeland -  changed cgi pointer
       6-Feb-2001 - S.L.Freeland -  added STATUS output


sswdb_install $SSW/gen/idl/ssw_system/sswdb_install.pro
[Previous] [Next]
   Name: sswdb_install

   Purpose: Interface routine to SolarSoft library installation

 CALLS: ***
	BOX_MESSAGE, BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CONCAT_DIR [1]
	CONCAT_DIR [2], CONCAT_DIR [3], break_file [4], concat_dir [4], file_append [1]
	file_append [2], file_size [1], file_size [2], get_logenv [1], get_logenv [2]
	html_doc, http_names, sswdb_info, str2cols [1], str2cols [2], str_replace [1]
	str_replace [2], strtab2html, url_decode
   History:
      22-Jan-1999 - S.L.Freeland - Written (from ssw_install.pro)
  
   Method:
      uses WWW FORM input to define generate a customized site configuration
      file...


sswdb_upgrade $SSW/gen/idl/ssw_system/sswdb_upgrade.pro
[Previous] [Next]
 Name: sswdb_upgrade

 Purpose: generate SSWDB set list, generate packages and spawn mirror job

 Input Parameters:
   relsets -    list of directories under $SSWDB, or list of environment
                variables, indicateing direcories to be updated.
                (optional - if absent, tries to use setup.sswdb_upgrade)

 Keyword Parameters:
   outdir -     local path to keep mirror files (def=$SSW_SITE_MIRROR)
   outpackage - name of mirror file (def='sswdb_upgrade.mirror')
   no package - if set, do not generate new package
   spawnit    - if set, spawn the mirror job
   nospawn    - if set, do not spawn/execute mirror (ex: just make package) DEFAULT
   noexecute  - synonym for nospawn
   remote_sets (output) - list of remote sets/paths (on SSW master)
   local_sets  (output) - list of local ( relative to $SSWDB)
   loud - switch, if set, echo Mirror output
   verbose - switch , if set, synonym for /LOUD
   result (output) - output of mirror command
   mirror - optional path/name of mirror to run (default = ssw_bin('mirror'))
   passive_ftp - force use of Passive ftp, required by some firewalls/proxys
                 (same effect is had by setting $ssw_passive_ftp outside)

 Calling Examples:

   sswdb_upgrade,['ydb','tdb']       ; update $SSWDB/ydb/... and
                                            $SSWDB/tdb/...
   sswdb_upgrade,'ydb/att'           ; update $SSWDB/ydb/att (only)
                                       NOTE: no leading "/"
   sswdb_upgrade                     ; update SSWDB sets listed in
                                     ; $SSW/site/setup/setup.sswdb_upgrade

 History:
    11-Feb-1998 - S.L.Freeland - Starting from ssw_upgrade.pro
    22-Jan-1999 - S.L.Freeland - If relsets not passed in and
                  $SSW/site/setup/setup.sswdb_upgrade exists, use
                  sets in that site configuration file
    26-Jan-1999 - S.L.Freeland - allow DBSETS (relsets) to be
                  environmentals as well as relative paths
                  (removes earlier restriction on 'split trees'
    22-Jun-2000 - RDB - added conditional code for Windows
    29-Jun-2000 - RDB - corrected case statement so command line request
                  takes precedence over any files
                  Flag error under windows if $SSWDB does not exist
     6-Feb-2001 - Verify sswdb_info returned valid data - exit on error
    22-Jun-2001 - S.L.Freeland - 'file_delete'->'ssw_file_delete' since RSI 
                  screwed me again in V5.4
     6-Feb-2002 - S.L.Freeland - added PASSIVE_FTP keyword and function
      09-May-2003, William Thompson - Use ssw_strsplit instead of strsplit
     28-Apr-2004 - S.L.Freeland - protect against inadvertant use of $HOME
                   for $tdb/$ydb/$PERM_DATA/$smm per Jeff Payne commen.
                  

 CALLS: ***
	BOX_MESSAGE, BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], CONCAT_DIR [1]
	CONCAT_DIR [2], CONCAT_DIR [3], FILE_EXIST [2], GET_DELIM, SSW_FILE_DELETE
	STR2ARR [1], STR2ARR [2], UNIQ [1], UNIQ [2], UNIQ [3], break_file [4]
	concat_dir [4], data_chk [1], data_chk [2], file_exist [1], file_exist [3]
	get_group, get_logenv [1], get_logenv [2], get_user [1], get_user [2], make_mirror
	prstr [1], prstr [2], rd_tfile [1], rd_tfile [2], set_logenv [1], set_logenv [2]
	ssw_strsplit, sswdb_info, str_replace [1], str_replace [2], strjustify
	strmids [1], strmids [2], strnocomment, where_arr [1], where_arr [2]
 Restrictions:
   Assume SolarSoft & Perl installed on local machine


sswfits_struct [1] $SSW/gen/idl/ssw_util/sswfits_struct.pro
[Previous] [Next]
   Name: sswfits_struct

   Purpose: return "STANDARD" ssw structure  (FITs->IDL mapping)

   Input Parameters:
      number (optional) - number structures returned  - default is one  
  
   Keyword Parameters:
      addfits - switch , if set, include FITS required minimal tags

   Calling Sequence:
      str=sswfits_struct( [number] [/addfits] )

 CALLS: ***
	JOIN_STRUCT [1], JOIN_STRUCT [2]
 CALLED BY:
	STEREO_SIMUL, anahead2struct, fitshead2struct, map2index, struct2ssw, zcheck_hdr
   History:
      15-jan-1997 - S.L. Freeland (from 'eit_struct.pro')
      25-feb-1997 - SSW generic
      10-apr-1998 - add CROTA (CED)
       8-sep-1998 - add EXPTIME and WAVELNTH (CED)
      15-oct-1998 - S.L.Freeland add SOLAR_L0, SOLAR_P, CROTA2,
                    XCEN, YCEN
                    /ADDFITS keyword and function - made version=2
       4-Apr-2000 -  Add CROTACN1 and CROTACN2 (floating)


sswloc $SSW/gen/idl/ssw_system/sswloc.pro
[Previous] [Next]

   Name: sswloc

   Purpose: use SSW mapfile to see online SSW routines

   Input Paramters:
      pattern - pattern to match (if not defined, all routines returned)

   Output Paramters
      matches - full SSW pathname of matches
      nmatch  - number of matches

   Keyword Parameters:
      mapfile - optional mapfile (default=$SSW/site/setup/ssw_map.dat)
      quiet   - if set, dont print (ex: called by programs)
      refresh - if set, re-read mapfile (default is only read 1st call)
      more    - if set, display first occurence to terminal
      limit   - (terminal use) - cutoff limit on number displayed (def=10)
      all     - (switch - terminal use) - if set, display all nomatter how many
      except - optional pattern to ignore 
   
   Calling Sequence:
      sswloc,'pattern' [, matches, /more]
      sswloc,/PATTERN ,[, matches, /more]   ;use Keyword Inherited pattern 

   Calling Example:
      sswloc,/sswloc,/more        ; find and display THIS routine
      sswloc,'zzz',/more,/instr   ; find and display 'xxx.pro'
                                  ; insterms of $SSW_XXX (instrument tree)
      sswloc,'find',/all          ; show all to terminal 
      sswloc,/xxx,/limit          ; same as LIMIT=1, only 1st 'xxx' match
      sswloc,/xxx,except='goes/sxig12/'  ; ingore a particular branch

 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], MORE [1], MORE [2], concat_dir [4]
	data_chk [1], data_chk [2], get_logenv [1], get_logenv [2], prstr [1], prstr [2]
	rd_tfile [1], rd_tfile [2], str_replace [1], str_replace [2], strjustify
	wc_where [1], wc_where [2]
 CALLED BY:
	ssw_check_contrib, ssw_conflicts, ssw_move, ssw_strfind, ssw_swmap_info
   History:
       1-Oct-1996 - S.L.Freeland
      29-Oct-1996 - S.L.Freeland - use GEN version if SITE not available 
      11-Dec-1996 - S.L.Freeland - add /MORE switch
       8-sep-1998 - S.L.Freeland - add /INSTRUMENT switch
      12-nov-1998 - S.L.Freeland - always use the GEN version
      27-Apr-1999 - S.L.Freeland - add LIMIT and /ALL
      13-May-2003 - S.L.Freeland - add EXCEPT keyword and function
                               


sswstruct_fill [1] $SSW/gen/idl/ssw_util/sswstruct_fill.pro
[Previous] [Next]
   Name: sswstruct_fill

   Purpose: fill missing SSW tags , if possible

 CALLS: ***
	BOX_MESSAGE, COMP_FITS_CEN, COMP_FITS_CRPIX, CONV_HXT2A, DELVARX [1], DELVARX [2]
	DELVARX [3], DELVARX [4], FLIPDATE, STR2ARR [1], STR2ARR [2], anytim [1], anytim [2]
	anytim [3], anytim [4], anytim [5], anytim2ints [1], anytim2ints [2], data_chk [1]
	data_chk [2], delvarx [5], get_roll, gt_expdur [1], gt_expdur [2], gt_pix_size
	gt_tagval [1], gt_tagval [2], id_esc, required_tags, str2cols [1], str2cols [2]
	str2number [1], str2number [2], struct2ssw, tag_index [1], tag_index [2]
 CALLED BY:
	struct2ssw
   History:
      24-October-1998 - S.L.Freeland - combine common function
      25-October-1998 - S.L.Freeland - allow explicit pass via keyword inherit
      27-November-1998 - D.M. Zarro - made more FITS standard compliant
      2-December-1998 - Zarro - removed case block for modifying CRVAL
                        as this caused downstream problems.
      7-Januaray-1999 - S.L.Freeland - auto flip date if DATE-OBS
                        uses old FITS standard
     12-Januaray-1999 - S.L.Freeland - fill in HXT/HXI part
     20-Januaray-1999 - S.L.Freeland - fix variable typo name for HXI conv.
     25-feb-1999 - S.L.Freeland - add CROTA for sxt
      2-Mar-1999 - S.L.Freeland - use 'str2number' instead of st2num
                                  for DATE-OBS/TIME-OBS->SSW check
     17-apr-1999 - S.L.Freeland - check SXT history for roll correction
     22-apr-1999 - S.L.Freeland - pass ROLL/CROTA->gt_center
     11-aug-1999 - S.L.Freeland - fixed a logic error in XCEN/YCEN->ssw derivation
     8-Oct-2001 - Zarro (EITI/GSFC) - added logic that if roll correction
                is not applied, then do not roll center fov
    18-Mar-2002 - S.L.Freeland - relax DATE_OBS verification (iso change?)
    24-Nov-2002 - Zarro(EER)/Biesecker(NOAA) - fixed degenerate structure dimension error
     4-jan-2006 - S.L.Freeland - add /XCEN_YCEN (force use of xcen, ycen even if [0,0])

   Input Parameters:
      sswstr - Structure vector, usually including SSW standards

   Keyword Parameters:
      nosolar    - if set, do not fill in Solar ephemeris tags
      notime     - if set, do not fill in Time tags
      nopointing - if set, do not fill in Pointing tags
      xxx=value  - where XXX =standard tag name, fill with VALUE

   Category:
      structure , SSW , time , alignment


st2num $SSW/gen/idl/string/st2num.pro
[Previous] [Next]
 NAME:
              st2num
 PURPOSE:
              convert string variable into numeric array
 CATEGORY:
              utility
 CALLING SEQUENCE:
              output=stnum(input,status)
 INPUTS:
              input=string variable, e.g. '1,2,3,4,5'
 OPTIONAL INPUT PARAMETERS:
              none
 OUTPUTS:
              output=numeric array, e.g. [1,2,3,4,5]
 OPTIONAL OUTPUT PARAMETERS:
              np = no of elements in output
              status = 1 if conversion successful else 0
 CALLED BY:
	HSI_RD_FITS_SPECTRUM, hessi_fits2drm [1], hessi_fits2drm [2]
	hessi_fits2drm [3], read_hessi_4_ospex, read_hessi_4_spex [1]
	read_hessi_4_spex [2], read_xsm_4_ospex, spex_hessi_fits2drm
	spex_xsm_fits2drm
 SIDE EFFECTS:
              none
 RESTRICTIONS:
              input must contain numeric characters and no ascii
 PROCEDURE:
              uses execute function to add '[' before first character 
              and ']' after last.
 MODIFICATION HISTORY:
              written Apr '88 (DMZ, ARC)


ST_DISK_DATA $SSW/gen/idl_libs/astron/sdas/st_diskread.pro
[Previous] [Next]
 NAME:
       ST_DISK_DATA 

 PURPOSE:
       Routine to read next header and data array from an HST FITS disk file.
       This is a subroutine of ST_DISKREAD and not intended for stand alone 
       use.

CALLING SEQUENCE:
       st_disk_data,unit,h,data,name,gcount,dimen,opsize,nbytes,itype

INPUTS:
       unit - logical unit number.

OUTPUTS:
       h - FITS header
       data - data array
       name - file name
       gcount - number of groups
       dimen - data dimensions
       opsize - parameter blocks size
       nbytes - bytes per data group
       itype - idl data type

 Notes:
       This is not a standalone program. Use ST_DISKREAD.

 PROCEDURES CALLED:
       GETTOK(), SXPAR()
 CALLS: ***
	FTGET, FTINFO, FTSIZE, ST_DISKREAD, ST_DISK_GEIS, ST_DISK_TABLE, SXPAR [1], SXPAR [2]
	SXPAR [3], TAB_CREATE, TAB_PUT, TAB_WRITE
 CALLED BY:
	ST_DISKREAD, ST_DISK_GEIS, ST_DISK_TABLE
 HISTORY:
       10/17/94        JKF/ACC         - taken from ST_TAPE_DATA.

***************************************************************************


ST_DISK_GEIS $SSW/gen/idl_libs/astron/sdas/st_diskread.pro
[Previous] [Next]
 NAME:
       ST_DISK_GEIS 

 PURPOSE:
        Routine to construct GEIS files from ST FITS disk files.

 CALLING SEQUENCE:
       ST_DISK_GEIS, h, data, htab, tab, table_available, name, gcount, 
               dimen,opsize, nbytes_g,itype

 INPUT PARAMETERS:
       h - header for data
       data - data array
       htab - header for the table
       tab - fits table
       table_available - logical variable (1 if table was found)
       name - data set name
       gcount - number of groups
       dimen - data dimensions
       opsize - original parameter block size
       nbytes_g - number of bytes per group
       itype - idl integer data type value for the output data groups

 CALLS: ***
	FTGET, FTINFO, FTSIZE, ST_DISKREAD, ST_DISK_DATA, ST_DISK_TABLE, SXPAR [1], SXPAR [2]
	SXPAR [3], TAB_CREATE, TAB_PUT, TAB_WRITE
 CALLED BY:
	ST_DISKREAD, ST_DISK_DATA, ST_DISK_TABLE
 SIDE EFFECTS:

       GEIS file updated with group parameters in unit 1 (already open)
       and header file created

 NOTES:
       This is not a standalone program. Use st_diskread.

       During the creation of the header, this routine performs the 
       following steps:
       1) create a basic fits header (7 keywords)
       2) adjust basic fits header for the number of axis present (i.e. >1)
       3) adjust basic fits header for parameter keywords (i.e. ptype,etc)
       4) from this point, sequentially copies keywords until it hits one of
               the following keywords 'INSTRUME','INSTRUID', or 'CONFG'.
       5) append 'END' statement

 PROCEDURES CALLED:
       FTSIZE, SXADDPAR, SXHWRITE
 HISTORY:
       10/17/94        JKF/ACC         - taken from ST_DISK_GEIS

****************************************************************************


ST_DISK_TABLE $SSW/gen/idl_libs/astron/sdas/st_diskread.pro
[Previous] [Next]
NAME:
       ST_DISK_TABLE 

 PURPOSE:
       Routine to read FITS table from an ST fits on disk.
       This is a subroutine of st_diskread and not intended for stand alone 
       use.

 CALLING SEQUENCE:
       st_disk_table,unit,h,data

 INPUTS PARAMETER:
       unit - disk unit number


 OUTPUTS:
       h - FITS header
       data - table array

 NOTES:
       This is not a standalone program. Use ST_DISKREAD.
          
 CALLS: ***
	FTGET, FTINFO, FTSIZE, ST_DISKREAD, ST_DISK_DATA, ST_DISK_GEIS, SXPAR [1], SXPAR [2]
	SXPAR [3], TAB_CREATE, TAB_PUT, TAB_WRITE
 CALLED BY:
	ST_DISKREAD, ST_DISK_DATA, ST_DISK_GEIS
 HISTORY:
       10/17/94        JKF/ACC - taken from ST_TAPE_TABLE.
       12/7/95         JKF/ACC - handle tables for jitter data.
                                            
****************************************************************************


ST_DISKREAD $SSW/gen/idl_libs/astron/sdas/st_diskread.pro
[Previous] [Next]
 NAME: 
       ST_DISKREAD

 PURPOSE:  
       Read HST FITS formatted disk files and reconstruct GEIS (STSDAS) files.

 CALLING SEQUENCE:  
       ST_DISKREAD, infiles

 INPUT PARAMETER:
       infiles - (scalar string) input disk files to be converted into GEIS
                       files. Wildcards are allowed.
 FILES CREATED:

   GEIS files:
         The GEIS file is reconstructed from each input Fits file. The 
       output filename is composed from the rootname of the observation
       and the appropriate GEIS file extension (i.e. d0h/d, c0h/d, etc.).
   Tables:
         If input file is a fits table, the output is an SDAS table.

 CALLS: ***
	FTGET, FTINFO, FTSIZE, ST_DISK_DATA, ST_DISK_GEIS, ST_DISK_TABLE, SXPAR [1], SXPAR [2]
	SXPAR [3], TAB_CREATE, TAB_PUT, TAB_WRITE
 CALLED BY:
	ST_DISK_DATA, ST_DISK_GEIS, ST_DISK_TABLE
 EXAMPLES:
       a) Reconstruct the GEIS file for disk FITS file z29i020ct*.fits.
               st_diskread,'z29i020ct*.fits'

 PROCEDURES CALLED:
       ST_DISK_DATA, ST_DISK_TABLE, ST_DISK_GEIS
       FTSIZE,SXPAR(),TAB_CREATE, TAB_WRITE
 HISTORY: 
       10/17/94        JKF/ACC - taken from ST_TAPEREAD.
       11/02/94        JKF/ACC - added /block on open statement to
                                 handle files with 512 bytes/record.
       12/6/95         JKF/ACC - include new jitter files...replaces
                                               st_read_jitter.pro.
       03/5/96         W. Landsman, change FORRD to READU, remove Version 1
                               type codes, add message facility
       05/20/00        W. Landsman, remove obsolete !ERR calls, new calling
                               sequence to FTINFO
       09/2006        W. Landsman, remove obsolete keywords to OPEN

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


STACK__DEFINE $SSW/gen/idl/xml/stack__define.pro
[Previous] [Next]
 Project     : Virtual Solar Observatory                                 
                                                                         
 Name        : STACK__DEFINE                                             
                                                                         
 Purpose     : To define a 'stack' object (mutable array)                
                                                                         
 Category    : Utility, VSO                                              
                                                                         
 Explanation : The 'stack' object is a mutable array, which              
               can have 0 elements, or can have items 'push'ed           
               on to the end of it.  It's just a wrapper around          
               a pointer so I don't have to do garbage collection        
                                                                         
 Syntax      : IDL> temp = obj_new('stack')                              
                                                                         
 CALLS: ***
	STACK::CALL_PROCEDURE, STACK::CALL_PROCEDURE, STACK::CLEANUP, STACK::CONTENTS
	STACK::FOREACH, STACK::FOREACH, STACK::INIT, STACK::ITEM, STACK::N_ELEMENTS
	STACK::PUSH, STACK::PUSH, is_number [1], is_number [2]
 Examples    : IDL> temp = obj_new('stack')                              
               IDL> temp->push,'one'                                     
               IDL> temp->push, ['two', 'three']                         
               IDL> results = temp->contents()                           
                                                                         
 History     : Version 1, 08-Nov-2005, J A Hourcle. Released             
               Modified 1-Jan-2006, Zarro (L-3Com/GSFC) 
                - improved memory management
                                                                         
 Contact     : oneiros@grace.nascom.nasa.gov                             


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

   Purpose: get staggered label coordinates for auto-label positioning

   Calling Sequence:
      norm_pos=stag_lab(labels [,min=min, max=max, sep=sep])

 CALLED BY:
	show_contacts
   History:
      10-apr-1995 (SLF) - for evt_grid use


STARAST $SSW/gen/idl_libs/astron/astrom/starast.pro
[Previous] [Next]
 NAME:
       STARAST 
 PURPOSE:
       Compute astrometric solution using positions of 2 or 3 reference stars
 EXPLANATION:
       Computes an exact astrometric solution using the positions and 
       coordinates from 2 or 3 reference stars and assuming a tangent 
       (gnomonic) projection.   If 2 stars are used, then
       the X and Y plate scales are assumed to be identical, and the
       axis are assumed to be orthogonal.   Use of three stars will
       allow a unique determination of each element of the CD matrix.

 CALLING SEQUENCE:
       starast, ra, dec, x, y, cd, [/Righthanded, HDR = h, PROJECTION=]

 INPUTS:
       RA - 2 or 3 element vector containing the Right Ascension in DEGREES
       DEC- 2 or 3 element vector containing the Declination in DEGREES
       X -  2 or 3 element vector giving the X position of reference stars
       Y -  2 or 3 element vector giving the Y position of reference stars
 OUTPUTS:
       CD - CD (Coordinate Description) matrix (DEGREES/PIXEL) determined 
               from stellar positions and coordinates.
 OPTIONAL INPUT KEYWORD:
       /RightHanded - If only 2 stars are supplied, then there is an ambiguity
               in the orientation of the coordinate system.   By default,
               STARAST assumes the astronomical standard left-handed system
               (R.A. increase to the left).   If /Right is set then a 
               righthanded coordinate is assumed.  This keyword has no effect
               if 3 star positions are supplied.
        PROJECTION - Either a 3 letter scalar string giving the projection
               type (e.g. 'TAN' or 'SIN') or an integer 1 - 25 specifying the
               projection as given in the WCSSPH2XY procedure.   If not 
               specified then a tangent projection is computed.
 OPTIONAL INPUT-OUTPUT KEYWORD:
        HDR - If a FITS header string array is supplied, then an astrometry 
              solution is added to the header using the CD matrix and star 0
              as the reference pixel (see example).   Equinox 2000 is assumed.
 CALLS: ***
	MAKE_ASTR, PUTAST, WCSSPH2XY
 CALLED BY:
	GSSS_STDAST
 EXAMPLE:
        To use STARAST to add astrometry to a FITS header H;

        IDL> starast,ra,dec,x,y,cd       ;Determine CD matrix
        IDL> crval = [ra[0],dec[0]]      ;Use Star 0 as reference star
        IDL> crpix = [x[0],y[0]] +1      ;FITS is offset 1 pixel from IDL
        IDL> putast,H,cd,crpix,crval     ;Add parameters to header

        This is equivalent to the following command:
        IDL> STARAST,ra,dec,x,y,hdr=h      
  
 METHOD:
       The CD parameters are determined by solving the linear set of equations
       relating position to local coordinates (l,m)

       For highest accuracy the first star position should be the one closest
       to the reference pixel.
 REVISION HISTORY:
       Written, W. Landsman             January 1988
       Converted to IDL V5.0   W. Landsman   September 1997
       Added /RightHanded and HDR keywords   W. Landsman   September 2000
       Write CTYPE values into header   W. Landsman/A. Surkov  December 2002
       CD matrix was mistakenly transpose in 3 star solution
       Added projection keyword    W. Landsman   September 2003 


STC_CLONE $SSW/gen/idl/struct/stc_clone.pro
[Previous] [Next]
 Project     : HESSI

 Name        : STC_CLONE

 Purpose     : Clone a structure by saving it to an IDL save file
               and then restoring it into a new structure

 Category    : utility structures

 Syntax      : IDL> clone=stc_clone(structure)

 Inputs      : structure = structure to clone (array or scalar)

 Outputs     : CLONE = cloned structure

 CALLS: ***
	CLONE_VAR, EXIST
 CALLED BY:
	CLONE__DEFINE, plotman, plotman_imageoptions, plotman_panel_control_event
	plotman_window_control_event
 History     : Written 29 Nov 2002, D. Zarro (EER/GSFC)

 Contact     : dzarro@solar.stanford.edu


stc_compress $SSW/gen/idl/struct/stc_compress.pro
[Previous] [Next]
 Project     :	HESSI

 Name        :	stc_compress

 Purpose     :	compress all string fields in a structure

 Category    :	Structure handling

 Syntax      : IDL> output=stc_compress(input)

 Inputs      :	INPUT = input structure array

 Outputs     :	OUTPUT = array of compressed string structures

 Keywords    :	REM = compress all whitespace
               NO_COPY = don't make new copy of input

 Written     : Zarro (EIT/GSFC), 10 AUG 2001

 Contact     : dzarro@solar.stanford.edu
 CALLED BY
	db_gbo, ihy_db


stc_sum $SSW/gen/idl/struct/stc_sum.pro
[Previous] [Next]
 Project     :	HESSI

 Name        :	stc_sum

 Purpose     :	Sum structure tag values into one huge string
               (used by STC_UNIQ for sorting structure arrays)

 Category    :	Structure handling

 Syntax      : IDL> output=stc_sum(input)

 Inputs      :	INPUT = input structure array

 Outputs     :	SUM = string array of summed tag values

 Keywords    :	EXCLUDE = tag names to exclude
               SKIP_BAD   = skip non-string/numeric/scalar values
               CASE_SENSITIVE = set for case sensitivity

 CALLS: ***
	EXIST, IS_STRING, TRIM
 CALLED BY:
	stc_uniq, stc_where
 Restrictions: Structure elements cannot be arrays or structures

 Written     : Zarro (EIT/GSFC), 10 July 2001

 Contact     : dzarro@solar.stanford.edu


stc_uniq $SSW/gen/idl/struct/stc_uniq.pro
[Previous] [Next]
 Project     :	HESSI

 Name        :	stc_uniq

 Purpose     :	return unique structures from an array

 Category    :	Structure handling

 Syntax      : IDL> output=stc_uniq(input)

 Inputs      :	INPUT = input structure array

 Outputs     :	OUTPUT = array of unique structures

 Optional Out: SORDER = sorted indicies

 Keywords    :	EXCLUDE = tag names to exclude

 CALLS: ***
	IS_BLANK, get_uniq, stc_sum
 CALLED BY:
	db_gbo, ihy_db
 Restrictions: Structure elements cannot be arrays or structures

 Written     : Zarro (EIT/GSFC), 10 July 2001

 Contact     : dzarro@solar.stanford.edu


stc_where $SSW/gen/idl/struct/stc_where.pro
[Previous] [Next]
 Project     :	HESSI

 Name        :	stc_where

 Purpose     :	Fast, cheap WHERE function for structures

 Category    : Structure handling

 Syntax      : IDL> chk=stc_where(input,structs)

 Inputs      :	INPUT = input structure array to test
               STRUCTS = structure array to test against

 Outputs     :	CHK = indicies where INPUT matches STRUCTS

 Keywords    :	EXCLUDE = tag names to exclude
               COUNT = # of matches

 CALLS: ***
	IS_BLANK, stc_sum
 CALLED BY:
	db_gbo, ihy_db
 Restrictions: Structure elements cannot be arrays, structures, pointers, or
               objects

 Written     : Zarro (EIT/GSFC), 13 Aug 2001

 Contact     : dzarro@solar.stanford.edu


STDEV $SSW/gen/idl/util/stdev.pro
[Previous] [Next]
 NAME:
	STDEV

 PURPOSE:
	Compute the standard deviation and, optionally, the
	mean of any array.

 CATEGORY:
	G1- Simple calculations on statistical data.

 CALLING SEQUENCE:
	Result = STDEV(Array [, Mean])

 INPUTS:
	Array:	The data array.  Array may be any type except string.

 OUTPUTS:
	STDEV returns the standard deviation (sample variance
	because the divisor is N-1) of Array.
		
 OPTIONAL OUTPUT PARAMETERS:
	Mean:	Upon return, this parameter contains the mean of the values
		in the data array.

 CALLED BY:
	BASELINE, CALC_DARK_BIAS, CCCA, CDS_QUASI_FIT, CHECK_SFC_PNT
	COMPUTE_MONEXP_FACTORS, COMPUTE_MONEXP_RATIO, COMPUTE_STD_VALS, CR_CORRECT
	DISPLOI_MON5K, Eliminate wrong channels, FILTMEDIAN, FIND_CHORD_CTR, FIND_LIMB
	FIND_LIMB2, FIND_LIMB_GEN, FIND_LIMB_INIT, FTEMAP, GOES2DPE
	HESSI CALIBRATED EVENTLIST CLASS DEFINITION [3], HOTPIX_FUDGE, HXT_BACK
	Histogram Facility, LOCAL_SCALE, MKDI_C1, MOVIE_MAKER, NIS_WAVECAL_DEMO
	OVER_THE_LIMB, PIXON_MAP, PLOT_EXPINT, PLOT_EXP_FACTOR, POLY_FIT_MOST, QUICK_LOOK
	RATIO_PLOTTER [1], READ_TRACE_FOV, REDUCE_STATISTICS, REDUCE_STATISTICS2
	SDC_VERIFY, SLOFO  SLOw FOurier, SSW_HOT_PIX, STATSUM, STDIMGPLOT, STDIMGPLOT2
	SUMER_DISPLAY_IMA, SUMMARY_PLOT, SXT_HOTPIX_FUDGE, SYNOP_STAB_DEMO, TERM_QUICK
	UPD_CDS_POINT, data_sum2fits, disp_dt_genx, disp_gen [1], disp_gen [2], disp_sci5k
	divyup, emi_plot [1], emi_summary, emieit, emilook, emiview
	exp_scale min_exp max_exp [1], exp_scale min_exp max_exp [2], filter_1d
	fit_gcross, fit_limb, get_linearity sig, get_linearity sig e_min e_max
	go_hxt_hk_temps, hxtaccumulate, img_summary [1], img_summary [2], interp1d [1]
	interp1d [2], interp1d [3], jitter_gif_xyimg, ltc, lxfr, make_avg_daily_roll
	mdi_display, mdidust, mk_kuhn_flat, mk_sdmi, mk_stdim_hdr, mk_sxh
	mk_synsfc_coeff [1], mk_synsfc_coeff [2], monitor_center [1], nospike
	op_term_score, pattern1 [1], pattern1 [2], plot_fft, plot_loi_mmad, pr_stats [1]
	pr_stats [2], ratio_plotter [2], read_ltc file, sxt_align, sxt_clean [1]
	sxt_clean [2], sxt_flux [1], sxt_flux [2], sxt_flux [3], sxt_psd, sxt_psf
	sxt_sharpen, tfr_summary2, tr_decode_head [1], tr_decode_head [2]
	tr_scan_images, tr_wrt_fits_i1 [1], tr_wrt_fits_i1 [2], xdisp_fits, xdisp_sci5k
	xdisp_trace [1], xdisp_trace [2], xdisp_trace2, xdisp_trace3
 COMMON BLOCKS:
	None.

 SIDE EFFECTS:
	None.

 RESTRICTIONS:
	None.

 PROCEDURE:
	Mean = TOTAL(Array)/N_ELEMENTS(Array)
	Stdev = SQRT(TOTAL((Array-Mean)^2/(N-1)))

 MODIFICATION HISTORY:
	DMS, RSI, Sept. 1983.


STEPPER [1] $SSW/gen/idl/display/stepper.pro
[Previous] [Next]
  NAME:
	STEPPER
  PURPOSE:
	Step through individual images a single frame at a time.
  SAMPLE CALLING SEQUENCE:
	STEPPER, DATA
	STEPPER, INDEX, DATA
	STEPPER, INDEX, DATA, INFO_ARRAY
	STEPPER, DATA, INFO_ARRAY		; Info can be the 2nd parameter
	STEPPER, INDEX, DATA, /FILTER_PANELS	; To show each filter separate
  INPUTS:
	DATA = Three-dimensional array
  OPTIONAL INPUTS:
	INDEX         = The index structure that goes with the data
       INFO_ARRAY    = descriptive text string (pass as parameter or keyword)
  OPTIONAL INPUT KEYWORDS:
	XSIZE,YSIZE = If present, the routine will use rebin to using the
			the /sample option.  If only XSIZE is present, YSIZE
			will be set equal to XSIZE.

			If one of the "panels" options is used, then this is the
			size of a single panel (the size that a single image 
			should be displayed)
	START	    = Index of starting image
	INFO_ARRAY  = String array containing descriptive text
	NOSCALE	    = If set, will turn off tvscale
	SUBSCRIPT   = Subset of array is displayed.
	MOVIE	    = If present and =1, will initiate movie mode when called
 	INTERP      = Controls how REBIN is done.  If present and set to 1,
		      /INTERP ==> REBIN(A,xsize,ysize)
		      else    ==> REBIN(A,xsize,ysize,/sample)
	COLOR	    = The color to use for displaying the info text string.

	noinfo	- If set, then do not build the INFO_ARRAY string even
		  when the index is passed in.
	panels	- An array with the same number of images as the data saying
		  which panel to display the image in (ie: 0,1,2,3,0,1,2...).
		  This allows images from a different filters to be displayed
		  in a different region on the x-window.
	filter_panels - If set, then build the "panels" array based on the
		  unique filters
	sequence_panels - If set, then build the "panels" array based on the
		  SXT sequence number
	nolcur	- If set, then stepper is being called from LCUR_IMAGE and
		  it should not allow the LCUR option to be used
  VERSION:
	V1.2    17-NOV-92
	V2.0	19-Oct-93
 CALLS: ***
	STEPPER_S1, UNIQ [1], UNIQ [2], UNIQ [3], data_type [1], data_type [2], get_info [1]
	get_info [2], get_info [3], get_info [4], gt_filta, gt_filtb, gt_seq_num
 CALLED BY:
	ALIGN1BIGGRAM, BOX_LC, LAY1GKM, PIXEL_LC, ext_subset [1], ext_subset [2], fstepper
	go_nvs4, lastsfd [1], lastsfd [2], lastspd, lcur_image, video_title, wdefroi [3]
	wdefroi [4]
  HISTORY:
	Written 20-sep-91, JRL and LWA
	Updated 21-sep-91, JRL:  Added xloadct and zoom options.
	Updated 24-sep-91, JRL:  Added SUBSCRIPT and MOVIE options.
	Updated  2-dec-91, JRL:  Break the text string into two lines if
				 info_array is > 44
	Updated 15-dec-91, slf;  Replaced get_kbrd calls with get_kbrd2
				 to work around SGI anomoly
	Updated 16-apr-92, slf;  To work with single image
	Updated 28-apr-92, JRL:  Break text if strlen(info) > 38 
	Updated 29-apr-92, JRL:  Added the INTERP keyword
	Updated 17-nov-92, JRL:  Added color keyword.  Allow info_array to
				 be a 2nd parameter
	Updated 15-mar-93, JRL:  Added an option to call profiles
	Updated 13-may-93, SLF;  Return last selected in lastss
	------------------------------------------------------------
	Updated 17-Oct-93, MDM;  Broke the routine into two parts
				 Allowed new options
					"g" will plot sxt grids
					"l" will call LCUR_PLOT to plot curves
					"h" will make hardcopies
					"c" will call loadct
					different panels for different filters
	Updated 29-Nov-93, MDM;  Added NOLCUR option
	Updated 24-Aug-94, MDM;  Added NONORMALIZE option


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

   Purpose: overly title on graphics device for stepper/xstepper

   History - slf, 10-Jun-92 - provide single point maint for title
	      slf, 31-aug-93 - add charsize and color keywords


   Side Effects - title is written to default graphics device
 CALLED BY
	chk_pointing, get_daily [1], get_daily [2], lastsfd [1], lastsfd [2], update_image
	xspr [1], xspr [2], xstepper_event


STOKESFIT $SSW/gen/idl/solar/stokesfit.pro
[Previous] [Next]
NAME:
     STOKESFIT
PURPOSE:
     Fits Unno profiles, including magneto-optical effects, to Stokes
     profiles to derive magnetic field parameters. 
CATEGORY:
CALLING SEQUENCE:
     fit = stokesfit(Ist,Qst,Ust,Vst,dlambda,dl_deriv,glande,lambda,mu)
INPUTS:
     Ist,Qst,Ust,Vst = Stokes profiles (all same size arrays).
     dlambda = relative wavelenth in A, same size as Ist, etc.
     dl_deriv = wavelength (A), relative to line center, at which to
                compute JLS field.  default = 0.1 if set to empty
                variable. 
     glande = Lande g factor for this spectral line.
     lambda = wavelenth of line in A.
     mu = cosine of position angle on solar disk.
          mu is cos(lat)*cos(b0)*cos(long) + sin(lat)*sin(b0)
OPTIONAL INPUT PARAMETERS:
KEYWORD PARAMETERS:
     aiquv = on output contains the fit parameter array.
     sigma = errors on aiquv.  Only set when curvefit or lmfit is used.
     guess = on input contains the initial guess for the fit
             parameter array.  If not set, something reasonable is
             assumed.  Not recommended unless you are sure you have a
             really good guess.
     /nocheckguess = if a guess is input the values are checked and
                     may be modified to more sane values if they seem
                     off.  If /nocheckguess is set, the guess is
                     taken as is.
     wiquv = the noise in I, Q, U, and V is, by default, set to
             sqrt(I), sqrt(2I), sqrt(2I), and sqrt(2I).  wiquv is a
             four element vector which multipies these noise levels.
             So, 1./sqrt(wiquv) is the relative weighting for I, Q, U,
             and V.
     weight = weight of each spectral point in the fit, must be the
              same size as dlambda.  Default = replicate(1.0,nlambda).
              To keep the chi^2 calculation correct, the weight array
              should have a mean of 1.
     vpguess = Set guess for Voigt parameter.  If a valid guess parameter
               is also set, this is ignored.
     doppguess = Set guess for Doppler width (A)  If a valid guess parameter
               is also set, this is ignored.
     eta0guess,eta0nmguess = Set guess for eta0,eta0nm.  If a valid guess parameter
               is also set, this is ignored.
     b0guess,b0nmguessb1guess = Set guess for B0,B0nm,B1  If a valid guess parameter
               is also set, this is ignored.
     x0guess = Set guess for line center in units of dlambda.
     x1guess = Set guess for non-magnetic line center in units of
               dlambda.  Ignored if /nofitmagcenter is set.
     /use_curvefit = Use the curvefit routine to fit the Unno
                     profiles.  This is the fastest algorithm and is
                     the default.
     /use_lmfit = Use the IDL lmfit routine to fit the Unno profiles.
                  Very similar to curvefit.  In principle, the IDL
                  routines curvefit and lmfit do the same thing, but,
                  since they are diffent implementations, I include
                  both. 
     /use_powell = Use the powell routine to fit the Unno profiles.
                   Very slow, but possibly more robust than
                   curvefit.
     /use_dfpmin = Use the dfpmin routine to fit the Unno profiles.
                   Almost as fast as curvefit, but less robust.
     /use_amoeba = Use the amoeba routine to fit the Unno profiles.
                   Faster than powell, slower than curvefit.  Less
                   robust than both.
     /use_genetic = Use genetic algorithm to fit the Unno profiles.
                    This algorithm is hopelessly slow, but very
                    robust *if you let it run for enough generations*.
                    (see ngenerations keyword, below). If all else
                    fails, /use_genetic will likely find 
                    the right answer, but you'll have to be patient.
                    You must have the ipikaia package in 
                    your path for this to work.  See
                    http://zeus.nascom.nasa.gov/~scott/ga.html and
                    http://www.hao.ucar.edu/public/research/si/pikaia/pikaia.htm
     cfit_itmax  = Maximum number of iterations for curvefit.
                   Default is 1000 (which is alot).
     amoeba_nmax = passed on to amoeba as the nmax keyword.
                   Controls how many function calls are allowed.
                   The default is 20000L.
     ngenerations = max number of generations to use in the genetic
                    algorithm.  Default = 1000.  
     decimalplaces = number of decimal places to use in the pikaia
                     genetic algorithm.  Default = 7.  5 or 6 is
                     likely enough accuracy (smaller is faster). 4 is
                     too small.
     /smooth = If set, smooth I,Q,U, and V before fitting.  If set, the
               spectral response (spprofile) is convolved with the
               smoothing kernel.  If there is not spectral response
               set, then the spectral response is set to the
               smoothing kernel.
     kernel = Smoothing kernel for Q, U, V.  Must be symmetric,
              positive-definite, and have an odd number of elements
              to avoid shifts. Def = [.05,.2,.5,.2,.05].  Ignored
              unless /smooth is set. 
     /nofitfill = Do not fit the filling factor (assume fill=1.0).
     min_fill = Minimum filling factor (default = 0.0).
     /nofitqu = Do not fit Q and U, only I and V.  Qst and Ust are
                ignored, but dummy variables must be in the argument
                list.
     /nofitmagcenter = do not allow the line center of the magnetic and
                     non-magnetic components to vary independently.
                     Default if /nofitfill is set.  Setting this
                     keyword will speed the algorithm up
                     significantly.  
     fitmaglimit = Polarization limit below which the magnetic and
                   non-magnetic line centers are not fit
                   independently.  Ignored if /nofitmagcenter is set.
                   Default = 0.0 (always fit magnetic line center).
     spprofile = Spectral response of the instrument.  This profile
                 is convolved with the Unno profiles before comparing
                 to the data.  Must have the same number of elements
                 as Ist, etc., and it must be centered in the array at
                 spectral point (n-1)/2 where n is the number of
                 spectral points.  If it is not properly centered, 
                 the Unno profiles will be shifted. If this keyword
                 is not set, then fields will typically be
                 underestimated by an amount that depends on your
                 instrument.  If the spectral response is narrow,
                 there will be little or no impact.  The convolutions
                 slow things down considerably, but if you can
                 contrive to have n a power of 2 it will help
                 since the convolutions are done with fft.
     /spdeconvolve = Directly deconvolve spprofile from the spectra.
                     This option is much faster than the default
                     forward method when spprofile is set, but it may
                     cause problems if your spectra are noisy.  A
                     Wiener filter is applied to make the
                     deconvolution more stable. This keyword is
                     ignored if spprofile is not set.
     /use_observed_derivative = If set, use the observed derivative
                                of Ist in the JLS calculation.  The
                                default is to use the analytic
                                derivative of the magnetic profile.
                                If this keyword is set, the JLS
                                result is the flux, not the field.
                                Setting this keyword can make the
                                code very slow as the number 
                                of wavelength points becomes large.
                                The smoothing of the derivative is
                                set by the noise on Ist, so be sure
                                that wiquv is set correctly if you
                                use this keyword.  If this keyword is
                                set, it is highly recommended that
                                /nofitfill or /nofitmagcenter also be
                                set, otherwise the wavelength where the
                                derivative is taken may not be what
                                you expect with potentially bizarre
                                results. 
     /double = Use double precision.  Slower, but possibly more
               robust. 
     /plot = Plot final fit.
     /nofixplotrange = do not fix the plot range of the final plot:
                       let it float.
     /verbose = Output text diagnostics along the way and, if /plot
                is set, also plot the initial guess.
     /quiet = Try to work with only minimal text output.
OUTPUTS:
     fit = structure with lots of data in it:

            aparam:     Voigt parameter (Unno fit)
            doppler:    Doppler width in A (Unno fit)
            eta0:       absorption coefficient (Unno fit)
            eta0nm:     absorption coefficient, non-magnetic (Unno fit)
            b0:         coeff of linear source function (Unno fit)
            b0nm:       coeff of linear source function, non-magnetic (Unno fit)
            b1:         coeff of linear source function (Unno fit)
            btotal:     total magnetic field in G (Unno fit)
            gamma:      field inclination, degrees (Unno fit)
            chi:        field azimuth, degrees (Unno fit)
            blong:      LOS B(Gauss) from Unno fit (btotal*cos(gamma))
            btran:      Transverse B(Gauss) from Unno fit (btotal*sin(gamma))
            bazim:      Transverse B azimuth (degrees) from Unno fit (chi)
            fill:       filling factor and/or scattered light fraction (Unno fit) 
            x0:         Magnetic Line center in dlambda units (Unno fit)
            x1:         Non-Magnetic Line center in dlambda units (Unno fit)
            btotal_jls: Total magnetic field in G from JLS method
            blong_jls:  LOS B (Gauss) from JLS method
            btran_jls:  Transverse B (Gauss) from JLS method
            bazim_jls:  Transverse B azimuth (degrees) from JLS method
            gamma_jls:  field inclination, degrees from JLS method
            dl_deriv:   DLambda used by JLS (input)
            btotal_int  total magnetic field (G) from integral method
            blong_int:  LOS magnetic field (G) from integral method
            btran_int:  Transverse magnetic field (G) from integral method
            bazim_int:  Transverse B azimuth (degrees) from integral method
            gamma_int:  field inclination (degrees) from integral method
            glande:     Lande g factor (input)
            lambda:     Wavelength of line in A (input)
            mu:         cosine of postion angle on disk (input)
            ichi2:      Chi^2 for the Unno I fit
            qchi2:      Chi^2 for the Unno Q fit
            uchi2:      Chi^2 for the Unno U fit
            vchi2:      Chi^2 for the Unno V fit
            chi2:       Chi^2 for the Unno fit (I, Q, U, and V)
            okfit:      Is the Unno fit good? 0=no, 1=yes
            okjls:      Is the JLS calculation good? 0=no, 1=yes
            version:    stokesfit.pro version

     btotal, blong, and btran from the unno fit and the JLS method are the magnetic
     field, assuming that the filling factor was fit (and fit
     correctly). However, if /use_observed_derivative is set, then
     the JLS result is the flux not the field, even if the filling
     factor is fit (btrans_jls*sqrt(fill) is the transverse flux if
     use_observed_derivative is set, as with the integral method).
     blong_int from the integral method is the flux density, so the
     field would be blong_int/fill.  btrans_int is neither the field
     nor the flux density since the filling factor comes into the
     btrans_int calculation as sqrt(fill).  The field would be
     btrans_int/sqrt(fill) and the flux density would be
     btrans_int*sqrt(fill), if you believe the derived filling 
     factor.  The integral method tends to saturate (weak field
     limit) well below where the JLS values saturate. 
 CALLS: ***
	AMOEBAX, CHI2_IQUV, CHISQR_CVF, CURVEFIT, DELVARX [1], DELVARX [2], DELVARX [3]
	DELVARX [4], DERIV, DFP_DERIV_IQUV, DIMDL, GAUSSFIT [1], GAUSSFIT [2], GAUSSFIT [3]
	GAUSSFIT [4], GAUSSFIT [5], HANNING, INTERPOL, INT_TABULATED, IQUV_WIENER_FILTER
	LMFIT, PIKAIA, PIKAIA_IQUV, POLY_FIT, VOIGTFIT [1], VOIGTFIT [2], VOIGT_FUNCT_IQUV
	VOIGT_FUNCT_IQUV_LMFIT, delvarx [5], deriv_lud, voigt
COMMON BLOCKS:
     lots of private common blocks
SIDE EFFECTS:
RESTRICTIONS:
     The center of the line must be visible in I.  The magnetic field
     is limited to 10000 G, the voigt parameter is limited to 100,
     the doppler width is limited to lamda/50, eta0 is limited
     to 1000, and the difference between the magnetic and
     non-magnetic line centers is limited to 10 km/sec.  The field
     parameters for the integral method in the output structure are
     only computed when an initial guess is *not* passed into this
     routine; otherwise they are set to zero. 
EXAMPLES:
     The code runs much faster if you pass in a very good initial
     guess.  If you are analyzing multiple, related data points you
     can pass nearby results (keyword aiquv) in as the guess
     (keyword guess), but be sure to check the okfit tag in the
     output structure.  If okfit is 0, do not use the result in the
     guess for the next data point.  But I prefer to pass in vpguess,
     doppguess, eta0guess, b0guess, b1guess, and x0guess rather
     than passing in a full set of parameters into the guess keyword.
     This allows the magnetic field guess to be set by the integral
     method rather than from the field nearby.
PROCEDURE:
     Calls curvefit, lmfit, dfpmin, powell, or amoeba to compute the
     best fit to the Unno profiles.  The fit has 13 parameters and
     fits I, Q, U, and V simultaneously.   The fit parameters are:
          Voigt parameter
          Doppler width 
          absorption coefficient, magnetic
          absorption coefficient, non-magnetic
          coeff of linear source function, magnetic
          coeff of linear source function, non-magnetic
          slope of linear source function
          Bz
          Bx
          By             (unless /nofitqu is set)
          filling factor (unless /nofitfill is set)
          Non-magnetic line center *shift* (if /nofitmagcenter and /nofitfill are not set)
          Magnetic line center in dlambda units
     The Unno profiles include magneto-optical effects: see Landolfi
     and Landi Degl'Innocenti 1982, Solar Physics, 78, 355. 
MODIFICATION HISTORY:
     T. Metcalf  January 31, 2004  Version 1.0
     Feb 2, 2004 TRM  Added /nofitqu keyword. verstion 1.1
     Feb 4, 2004 TRM  Version 1.2
                      Fixed a bit of confusion between double and
                      float that was causing curvefit to think it was
                      not converging even though it was.  This
                      happened when the I,Q,U,V fits were double, but
                      the derivatives were float.  Also changed the
                      way the emission/absorption line is detected to
                      make it more robust.
     Feb 4, 2004 TRM  Version 1.3
                      The /nofitqu algorithm was improved.
     Feb 5, 2004 TRM  Version 1.4 
                      Fit Bx but not By when /nofitqu is set.  This is
                      necessary since the line splitting is
                      proportional to btotal and Bx plays the role of
                      btrans.  This works since I and V depend on
                      btrans through btotal, but do not depend on the
                      azimuthal angle of the transverse field.  Fixed
                      numerical problem with curvefit when bt=0
                      (needed to fix bx and by derivs in this case).
     Feb 6, 2004 TRM  Version 1.5
                      Force curvefit to reduce the filling factor
                      slowly so that the algorithm does not get stuck
                      with huge field and tiny fill factor.
     Feb 12, 2004 TRM Version 1.6
                      Improved the calculation of B0,B1, and eta0 in
                      the initial guess.  This better initial guess
                      improves the robustness of the curvefit
                      algorithm considerably. 
     Feb 13, 2004 TRM Version 1.7
                      Fixed sign of Q and U in the JLS calculation
                      when the line is in emsission.
     Feb 20, 2004 TRM Version 1.8
                      Added some error checking in the initial
                      guess.   Added okfit and okjls tags to output
                      structure.  Made sure the weight is always
                      positive.  Added upper limits to the voigt
                      parameter, the Doppler width, and eta0.  Added
                      upper and lower limits to x0.
     Feb 24, 2004 TRM Version 1.9
                      Added sanity checks on any initial guess that
                      is input.  Fixed small bug in initial guess
                      where qtest and utest were interpolated using
                      dlambda rather than dl.  Added integral field
                      parameters to the output structure.
     Feb 27, 2004 TRM Version 1.95
                      Added /use_dfpmin keyword.  Added smoothing in
                      the initial guess when computing the sign of Q,
                      U, and V.
     Mar 9, 2004  TRM Version 2.0
                      Added x1 option to the fit parameters.  If the
                      initial guess fails the sanity checks, compute
                      a new guess from scratch.  Force a guess passed
                      in to use fill=1 and flux density.  Added
                      vpguess, doppguess, et0guess, b0guess, b1guess,
                      x0guess, and x1guess keywords. 
     Mar 10, 2004 TRM Version 2.01
                      Added fitmaglimit keyword to limit lowest
                      polarization at which the fitmagcenter keyword
                      is valid.
     May 21, 2004 TRM Version 2.02
                      Added lmfit option and the /use_lmfit keyword.
     May 26, 2004 TRM Version 2.03
                      Added /quiet keyword.  Better scale calculation
                      for amoeba, dfpmin, and powell algorithms.
                      Added amoeba_nmax keyword.
     Jun 3, 2004  TRM Version 2.04
                      Added spprofile keyword.
     Jun 8, 2004  TRM Version 2.05
                      Fixed typo in dQ_da, dI_dx1
     Jun 11, 2004 TRM Version 2.06
                      Convolve spprofile with the smoothing kernel.
                      Added wiquv keyword.  Make curvefit quiet when
                      /quiet is set.  Make /fitmagcenter work with
                      /nofitqu. 
     Aug 4, 2004  TRM Version 2.07
                      Added /nofixplotrange keyword.  Added
                      /nocheckguess keyword.
     Oct 14, 2004 TRM Version 2.08 
                      Changed the default value of fitmaglimt to 0.0
                      from 0.025.
     Oct 15, 2004 TRM Version 3.00
                      Added eta0nm and b0nm to the fit.
                      fitmagcenter -> nofitmagcenter.
                      Added ssa, ssdopp, sseta0, etc. to simplify the
                      indexing in the code considerably.
     Oct 19, 2004 TRM Version 3.01
                      Use the analytic derivative of the magnetic I
                      profile when computing the JLS field.
     Oct 20, 2004 TRM Version 3.02
                      Added min_fill keyword.
     Oct 25, 2004 TRM Version 3.03
                      Added weight keyword.
     Nov 19, 2004 TRM Version 3.04
                      Added /use_genetic.
     Nov 22, 2004 TRM Version 3.05
                      Made pikaia fitwatch more robust.
     Dec 02, 2004 TRM Version 3.06
                      Minor change to error output when no_fit_fill
                      is set.
     Dec 17, 2004 TRM Version 3.07
                      Fixed bug in JLS calculation.  I,Q,U,V used for
                      the JLS calculation erroneously had the
                      instrument spectral response and smoothing
                      applied to them which is inconsistent with the
                      way the analytical derivative is computed.
                      Also fixed a bug in which the smoothing profile
                      was applied twice if the instrument spectral
                      response was not set. Smooth I as well as Q,U,V
                      when /smooth is set.  This is required for
                      consistency since the spectral profile is set
                      to the smoothing kernel.  eta0 out of range is
                      not an error since, when eta0 is >> 1, it is
                      folded into b1: removed this check.  No longer
                      set a bad fit when the initial guess is
                      out-of-range. 
     Dec 20, 2004 TRM Version 3.08
                      Added /spdeconvolve and the Wiener filter.
     Apr 14, 2005 TRM Version 3.09
                      Use amoebax instead of amoeba.
     Apr 19, 2005 TRM Version 3.10
                      Added /use_observed_derivative keyword.
     Apr 20, 2005 TRM Version 3.11
                      Added error checking aroud deriv_lud call which
                      is called when use_observed_derivative is set.


STORE_ARRAY [1] $SSW/gen/idl/util/store_array.pro
[Previous] [Next]
 NAME:
	STORE_ARRAY
 PURPOSE:
	Insert array INSERT into the array DESTINATION
 EXPLANATION:
	The dimensions of the DESTINATION array are adjusted to accomodate
	the inserted array.
 CATEGOBY:
	Utility
 CALLING SEQUENCE:
	STORE_ARRAY, DESTINATION, INSERT, INDEX
 INPUT:
	DESTINATION	= Array to be expanded.
	INSERT		= Array to insert into DESTINATION.
	INDEX		= Index of the final dimension of DESTINATION to insert
			  INSERT into.
 OUTPUTS:
	DESTINATION	= Expanded output array.  If both input arrays have the
			  same number of dimensions, then the DESTINATION will
			  be replaced with INSERT.
 CALLED BY:
	FXBPARSE [1], FXBPARSE [2]
 RESTRICTIONS:
	DESTINATION and INSERT have to be either both of type string or both of
	numerical types.

	INSERT must not have more dimensions than DESTINATION.

 MODIFICATION HISTOBY:
	William Thompson, Feb. 1992, from BOOST_ARRAY by D. Zarro and P. Hick.
	Converted to IDL V5.0   W. Landsman   September 1997


STORE_ARRAY [2] $SSW/gen/idl_libs/astron/misc/store_array.pro
[Previous] [Next]
 NAME:
	STORE_ARRAY
 PURPOSE:
	Insert array INSERT into the array DESTINATION
 EXPLANATION:
	The dimensions of the DESTINATION array are adjusted to accomodate
	the inserted array.
 CATEGOBY:
	Utility
 CALLING SEQUENCE:
	STORE_ARRAY, DESTINATION, INSERT, INDEX
 INPUT:
	DESTINATION	= Array to be expanded.
	INSERT		= Array to insert into DESTINATION.
	INDEX		= Index of the final dimension of DESTINATION to insert
			  INSERT into.
 OUTPUTS:
	DESTINATION	= Expanded output array.  If both input arrays have the
			  same number of dimensions, then the DESTINATION will
			  be replaced with INSERT.
 CALLED BY:
	FXBPARSE [1], FXBPARSE [2]
 RESTRICTIONS:
	DESTINATION and INSERT have to be either both of type string or both of
	numerical types.

	INSERT must not have more dimensions than DESTINATION.

 MODIFICATION HISTOBY:
	William Thompson, Feb. 1992, from BOOST_ARRAY by D. Zarro and P. Hick.
	Converted to IDL V5.0   W. Landsman   September 1997


STORE_PLOTVAR $SSW/gen/idl/utplot/store_plotvar.pro
[Previous] [Next]
 PROJECT:
	SDAC
 NAME: 
	STORE_PLOTVAR

 PURPOSE:
	This procedure loads system variable structures into common.

 CATEGORY:
	Graphics, Utplot

 CALLING SEQUENCE:
	Store_plotvar

 CALLS:
	none
 INPUTS:
       none explicit, only through commons;

 OPTIONAL INPUTS:
	none

 OUTPUTS:
       none explicit, only through commons;

 OPTIONAL OUTPUTS:
	none

 KEYWORDS:
	none
 CALLED BY:
	RESTORE_PLOTVAR, SET_UTAXIS
 COMMON BLOCKS:
	STORE_PLOTVAR_COMMON

 SIDE EFFECTS:
	none

 RESTRICTIONS:
	none

 PROCEDURE:
	none

 MODIFICATION HISTORY:
	Version 1, ~1990
	Version 2, Documented, richard.schwartz@gsfc.nasa.gov, 23-mar-1998.


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

 Name        : 
	STORE_TV_SCALE
 Purpose     : 
	Store information about displayed images.
 Explanation : 
	Stores information about images displayed by EXPTV, PUT, and other
	routines.  Called from SCALE_TV.

	Data arrays containing the passed parameters, as well as !D.NAME,
	!D.WINDOW, and the parameters from SETIMAGE, are stored in the TV_SCALE
	common block.  Each time the routine is called, if the common block
	already contains an entry for the NAME, WINDOW and SETIMAGE variables,
	then the other variables are updated.  Otherwise, another entry is
	added to the database.

 Use         : 
	STORE_TV_SCALE, SX, SY, MX, MY, JX, JY
 Inputs      : 
	SX, SY	= Image size, in data pixels
	MX, MY	= Image size, in screen pixels
	JX, JY	= Position of lower left-hand corner of displayed image, in
		  screen pixels.
 Opt. Inputs : 
	None.
 Outputs     : 
	None.
 Opt. Outputs: 
	None.
 Keywords    : 
	DISABLE  = If set, then TVSELECT not used.
	ORIGIN	 = Two-element array containing the coordinate value in
		   physical units of the center of the first pixel in the
		   image.  If not passed, then [0,0] is assumed.
	SCALE	 = Pixel scale in physical units.  Can have either one or two
		   elements.  If not passed, then 1 is assumed in both
		   directions.
	DATA	 = Used to override the ORIGIN and SCALE keywords.  The value
		   of this keyword is a structure variable containing the data
		   needed to convert pixel coordinates into data coordinates.
		   The main use of this keyword is to support the routine
		   TVAXIS.
 Calls       : ***
	BOOST_ARRAY [1], BOOST_ARRAY [2], BOOST_ARRAY [3], TVSELECT, TVUNSELECT
 CALLED BY:
	EXPAND_TV, TVAXIS
 Common      : 
	TV_SCALE contains the passed parameters as a function of graphics
	device, window, and SETIMAGE settings.  The parameters needed to
	translate pixel coordinates into data coordinates are also store in
	this common block.

	IMAGE_AREA contains switch IMAGE_SET and position IX, NX, IY, NY, from
	SETIMAGE.

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

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

 Side effects: 
	None.
 Category    : 
	Utilities, Image_display.
 Prev. Hist. : 
	William Thompson, May 1992.
 Written     : 
	William Thompson, GSFC, May 1992.
 Modified    : 
	Version 1, William Thompson, GSFC, 12 May 1993.
		Incorporated into CDS library.
	Version 2, William Thompson, GSFC, 1 September 1993.
		Added calculation of data coordinates.
		Added ORIGIN and SCALE keywords.
		Added variable DATA to TV_SCALE common block.
	Version 3, William Thompson, GSFC, 9 November 1993.
		Removed (unnecessary) restriction that scales be positive.
 Version     : 
	Version 3, 9 November 1993.


STR2ARR [1] $SSW/gen/idl/string/str2arr.pro
[Previous] [Next]

 PROJECT: SSW

 NAME:
 	STR2ARR	

 PURPOSE:
	Convert delimited string into string array

 INPUT PARAMETERS:
	instring  - delimited string to be split into components
       delim     - delimiter to use (default=comma)

 OUTPUT:
      function output is string array, n_elements=number delimiters+1
 
 KEYWORD PARAMETERS:
      delimit - delimiter - equiv to positional DELIM; for backward compat.
      numult  - switch, if set, dont return nulls for consecutive delimiters
      list    - if set, display array to terminal (via more)
      array  (output) - string array, number elements=number of delimeters+1
                        (same as function output)

 CALLING SEQUENCE:
	array=STR2ARR(string [, delimiter, delimit=delimit, /nomult, /list] 

 CALLING EXAMPLES:
       IDL> more,str2arr('this,is,a,test')                    ; default delim
       this                                                   ; (ie: comma)
       is
       a
       test

       IDL> more,str2arr('this$$$is$$$another$$$test','$$$') ; delim='$$$'
       this
       is
       a
       test


 COMMON BLOCKS;
	NONE

 CALLS: ***
	deriv_arr [1], deriv_arr [2]
 CALLED BY:
	ACOPY [1], ACOPY_TEST, BCS_INFIL, BSC_CHAN, CATEGORY, CDS_WAVE_CAT, CHIANTI_NE
	CHIANTI_TE, CkFurFiles, DB_CHECK, DISK_SUMMARY, DsetVec, EIS_IMAGE_TOOL_EVENT [1]
	EIS_IMAGE_TOOL_EVENT [2], EXP_DBASE, Energy_res [2], FIND_CAT, FIX_DATE
	FTP__DEFINE, F_CON_LIN, GET_BSA_ANS [1], GET_BSA_ANS [2], GET_SOHO_ROLL, GET_SSWDB
	GE_WINDOW_SIM, GIS_HV_CAL, GT_CDS_WINDOW, HESSI FRAMEWORK TEMPLATE CLASS [2]
	HESSI FRAMEWORK TEMPLATE CLASS [3], HSI_CLKDELTAFILETIME_2_UT
	HSI_DRM_MOD CLASS, HSI_DRM_MOD_CONTROL__DEFINE, HSI_RD_FITS_SPECTRUM
	HTTP__DEFINE, IMAGE_TOOL_EVENT, INDEX2MAP, ITOOL_GETFILE, KILL_JOB, KeySea [1]
	KeySea [2], KeySearch, LIST_GEV, LIST_NAR, Load_recs, MAKE_ION_LIST, MAKE_STR [1]
	MAKE_STR [2], MAX_TEMP, MERGE_DISCSP_HKG_OCC, MK_PLAN_FORM, MK_PLAN_POINT, MK_SOHO
	MK_SOHO_TARGET, MkFnMapMake Filename Map, MkInsArr, Modify_Merge_list [1]
	Modify_Merge_list [2], OCC_DBASE, OP_COM [1], OP_COM [2], PARSE_GROSSC_ATTITUDE
	PLOT_MAP, PRINT_GEV, PRINT_NAR, PRINT_STR, PURPOSE, ParsKey, QL_RD_LLIST, RD_CHIANTI
	RD_GEN [1], RD_GEN [2], RD_LINE_LIST, RD_SERTS, RD_TAR, READ_ANALIST, READ_KAP_ITEM
	REORDER_PATH, RdTap [1], RdTap [2], RdTap [3], SETUP_DRM, SHOW_EVARS, SITE__DEFINE
	SOHO_CAMPAIGN, SOHO_ITEMS_HTML, SPEX_DRM__DEFINE, SPEX_FIT__DEFINE
	SPEX_THISTORY [1], SPEX_THISTORY [2], STR_DEBLANK, STR_EXPAND, STR_MATCH, STR_SEP2
	SUMM_CALS, SYNOP_DB__DEFINE, SYNOP_DEFINE, Strs2Mat, TrimDvec, UNIX_CMD [1]
	UNIX_CMD [2], UPDATE_CAMPAIGN, UPDATE_DEX, WLOADC, XCAT, XSTRUCT, align_label, ar_prep
	break_doc [1], break_doc [2], break_doc [3], cal_fig_mich, cat_form
	cdrom_files [2], check_process [1], check_process [2], chkffscl, compare_resp
	ctraj2orbit, db_gbo, dbase2disk, dejitter, disk_monitor [1], disk_monitor [2]
	diskfree [1], diskfree [2], disp_sci160k [1], disp_sci160k [2], disp_therm_rs232
	doc1liners, eit_genx_cat, expand_dirs, extract_val, file_info [1], file_info [2]
	file_info2 [1], file_info2 [2], file_purge [1], file_purge [2], files_since [1]
	files_since [2], fit_comp_kw, fits2rm, fitstap2tap [1], fitstap2tap [2], fix_path
	fl_summary [1], fl_summary [2], fl_summary [3], flare_hist, flares2disk
	fmt_doc [1], fmt_doc [2], fmt_doc [3], gen_fn [1], gen_fn [2], get1gbo
	get_atomic [1], get_atomic [2], get_bsc_anno, get_dn_rate [1], get_dn_rate [2]
	get_eit_info, get_fninfo, get_group, get_hk_info [1], get_hk_info [2]
	get_host [1], get_host [2], get_infox, get_ksc_holiday, get_selsis, get_site
	get_visible, getm1ans, gettime, go_batch [1], go_batch [2], go_mk_cd, go_nvs4
	go_rdtap [1], go_rdtap [2], go_yo_prod_batch, goes3sec_copy, goes_plot [1]
	goes_plot [2], goes_plot [3], goes_plot [4], goes_plot [5], goes_value2class
	gt2exe [1], gt2exe [2], gt_yo_station, hist_count, hist_summary, hsi_1orbit_allpak
	hsi_get_file_verno, hsi_get_flare_flags, hxt_rdpara, idl_server_control, ihy_db
	img_sumtr2, index2fov, ip_que_dmpver, is_alive [1], is_alive [2], is_bestnode [1]
	is_bestnode [2], is_open, jitter_gif_xyimg, keyword_db, killold [1], killold [2]
	ksc_commands, lapalma_cat, lastgki, make_32 [2], make_views, map2index, mdilaser
	mk_bad_pix_map_load, mk_cd [1], mk_cd [2], mk_dpc_image, mk_formt_html [1]
	mk_formt_html [2], mk_formt_html [3], mk_hst_summary, mk_mapfile [1]
	mk_mapfile [2], mk_sdc [2], mk_sdc [3], mk_sdc [4], mk_sfc [1], mk_sfc [2]
	mk_ssc_batch [1], mk_ssc_batch [2], mk_vcr, mktap, mo_check, mo_filelist, mo_patch
	modvolume_inf [1], modvolume_inf [2], momount, mon_sci5k, mreadfits_fixup
	newfiles [1], newfiles [2], newfiles [3], nn_rd2_sxt_noaa, nn_rd_sxt_noaa
	op_rd_special, op_term_score, orcent, path_ucon, pathfix, plot_ace, pr_his_index [1]
	pr_his_index [2], pr_his_index [3], pr_path [1], pr_path [2], pr_visible
	prcols [1], prcols [2], prcols [3], pro_list [1], pro_list [2], rd_atodat [1]
	rd_atodat [2], rd_fdss_durevt_fil, rd_fdss_orbevt_fil, rd_fdss_viewpd_fil
	rd_ionbal [1], rd_ionbal [2], rd_pkt_head [1], rd_pkt_head [2], rd_rasm
	rd_raw_station_plan, rd_selsis, rd_soup, rd_srspas, rd_taer, rd_tfile [1]
	rd_tfile [2], rd_tr_seq_head, rd_trace_i0 [1], rd_trace_i0 [2], rd_ulin_col
	rd_video_menu, read_eit, read_mdi, redo_disploi, redo_mon_sci5k, reg_check
	required_tags, run_dsnfil, savegen [1], savegen [2], set_fastpath [1]
	set_fastpath [2], set_logwindows, setssw_windows, soon_cadence, soon_catstat
	soon_table, sooncat_cadence, special_movie, spex_convert_results [1]
	spex_convert_results [2], spex_hessi_image__define, ssw_addmm_gen, ssw_bin
	ssw_check_contrib, ssw_contrib_info, ssw_contrib_monitor
	ssw_contrib_ok2online, ssw_findstuff2html, ssw_fs_maskdbase, ssw_getapplet
	ssw_getcme_cdaw, ssw_getdst, ssw_install [1], ssw_install [2]
	ssw_install_explinkages, ssw_instr_info, ssw_instruments, ssw_javamovie
	ssw_packages, ssw_path, ssw_set_chianti, ssw_set_instr, ssw_start_rpcserver
	ssw_track_demo, ssw_upgrade [1], ssw_upgrade [2], ssw_upgrade_backup, sswdb_info
	sswdb_upgrade, sswstruct_fill [1], str_pow_conv, str_replace [1]
	str_replace [2], str_subset, strfind_urls, struct2fitshead, sw_tape, sxt_prep_exe
	sxt_ssc2file, syst2ex [1], syst2ex [2], syst2ex [3], table2struct, term_times
	timeline, timstr2ex [1], timstr2ex [2]
	to check data generated by the IP instruction TWAVG
	to return information about a function which can consist of multiple
	topsdb [1], topsdb [2], tr_rd_index, tr_rd_inventory, trace_cosmic2hist_accum
	trace_dph2struct [1], trace_files, trace_get1www_image, trace_goodobs
	trace_make_tmr [1], trace_make_tmr [2], trace_movie_index [1]
	trace_movie_index [2], trace_movies_prioritize [1]
	trace_movies_prioritize [2], trace_prioritize_um, trace_special_movie [1]
	trace_special_movie [2], trace_special_movie [3], trace_special_movie2
	trace_struct2filename, trace_uniq_movies, trace_wave2point, trace_wavename2num
	url_decode, url_encode, valid_pass4 [1], valid_pass4 [2], video_title
	wc_where [1], wc_where [2], web_seq, where_pattern [1], where_pattern [2]
	wrttapdir, wrtwkdat, wwwidl_server_check, x_new hsi_set_file_vernofilex verno
	xcheckip, xdate [1], xdate [2], xdisp_fits, xhkplot, xset_chain [1], xset_chain [2]
	xsw2tree, xsw2tree_event, xswlist [2], xsxt_prep_event, ycopy, ydb_install [1]
	ydb_install [2], ydump, yoh_orb_interp [1], yoh_orb_interp [2], yow_sz [1]
	yow_sz [2], ys_contrib [1], ys_contrib [2]
 MODIFICATION HISTORY:
	Version 0 - Sam Freeland (Yohkoh)
	slf - feature correction (occur is array, then prob.)
	slf - 25-feb-92 - added positional delim parameter
       slf -  2-feb-93 - changed recursion to loop for memory problems
       slf - 19-mar-93 - optimize case where delimiter is 1 character (comma)
       slf - 20-mar-93 - fixed a minor bug with major implications
       slf - 16-Jan-97 - merge Dave Pike (RAL) changes for SSW GEN 
                         (LIST and NOMULT keyword and function)
       slf -  8-may-97 - added to header
       Zarro (SM&A/GSFC), 14-Sep-99, threw in couple of temporary's for memory


str2cols [1] $SSW/gen/idl/string/str2cols.pro
[Previous] [Next]
   Name: str2cols

   Purpose: break strarry into columns at specified delimiter

   Input Parameters:
      inarr - string or string array to break

   Optional Keyword Parameters:
      ncols  - number of columns in output (default is number delimiters+1)
      colpos - user supplied position breaks (default is via delimiter search)
      trim   - if set, trim leading and trailing blanks from output
      unaligned - use this if any columns might overlap
   
 CALLED BY:
	READ_ANALIST, cdrom_files [2], cont2time [1], cont2time [2]
	fit_model_components, flares2disk, ftp_copy_new, ftp_list_since, get_selsis
	get_utevent [1], get_utevent [2], get_uvxsections, go_yo_prod_batch
	gtt_wave_tru, hessi_var, hsi_params_write_pro, hsi_plot_flux, idl_server_control
	killold [1], killold [2], map_env2dir, mk_sfc [1], mk_sfc [2], mk_ssc_batch [1]
	mk_ssc_batch [2], mo_patch, mobad_summ, msok_copy_jpg, msok_poi_copy [1]
	msok_poi_copy [2], password_info, pctime2ssw, rd_exec_synop_index, rd_tfiles
	rd_ulin_col, rmosaic [1], rmosaic [2], rmosaic [3], set_logwindows, show_contacts
	soon_cadence, soon_catstat, soon_table, ssw_contrib_monitor, ssw_findstuff2html
	ssw_getcme_cactus, ssw_getcme_cdaw, ssw_install [2], ssw_sec_aktxt2struct
	ssw_swmap_info, ssw_swmap_uniqinfo, sswdb_info, sswdb_install
	sswstruct_fill [1], sxt_patch_att, sxt_plan, tim2dbase, tr_decode_head [1]
	tr_decode_head [2], tr_summary_head, trace_get1www_image, trace_success_file
	trace_uniq_movies, track_proc [1], track_proc [2], unixtime2ex, uvf_interval
	xgen_widget, xhkplot, ydb_use
   History:
      19-May-1994 (SLF) Written
       2-Jun-1994 (SLF) call revised remtab if delimiter is blank
       3-Jun-1994 (SLF) return value order = arr(cols,rows)
      13-Jun-1994 (SLF) change leading blank handler, add TRIM
      14-Jun-1994 (SLF) protect against ncols > ndelimiters!
       9-mar-1996 (SLF) more elegant algorithm (total delimiter bit map 
			                         along columns)
       6-Jun-1996 (SLF) allow 1 element (string) input
      13-apr-1997 (SLF) allow partial lines
	26-Nov-97  (MDM) Added QSTOP
		   (MDM) Corrected error where there are leading blanks
			 in front of each line for the first column
		   (MDM) Added /IGNORE_EXTRA_COLS
	 1-Dec-97 (MDM) Corrected 26-Nov change for when NCOLS inx
			is not passed in
	 1-Dec-97 (MDM) Further patch to 26-Nov
        7-Oct-98 S.L.Freeland - add /UNALIGNED keyword and function

 CALLS: ***
	data_chk [1], data_chk [2], deriv_arr [1], deriv_arr [2], remtab [1], remtab [2]
   Restrictions:
      USE /UNALIGNED if any columns might overlap
      (default algorithm looks for columns of delimiters)

   Method:
      convert to bytes (makes 2D array)
      total columns where character=delimiter - if zero, column of delimiters
      For /UNALIGNED case, call <strmids> for every column
  


STR2FILE $SSW/gen/idl/string/str2file.pro
[Previous] [Next]
 Project     : SOHO - CDS

 Name        : STR2FILE

 Purpose     : print string array to a file

 Category    : utility

 Explanation : 

 Syntax      : IDL> str2file,array,file


 Inputs      : ARRAY = string array to print

 Opt. Inputs : FILE = filename for output
               (if not given, defaults to str2file.tmp home directory)

 Outputs     : None

 Opt. Outputs: None

 Keywords    : VERBOSE - set to output info
               ERR - error string

 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], DATATYPE [1], DATATYPE [2]
	DATATYPE [3], FILE_BREAK, TEST_OPEN, concat_dir [4]
 CALLED BY:
	SCANPATH, SEND_MAIL, SEND_PRINT, XCAMP, XCAT, XREPORT, XREPORT_EDIT, XTEXT
 Common      : None

 Restrictions: ARRAY must be string

 Side effects: None

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

 Contact     : DZARRO@SOLAR.STANFORD.EDU


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

   Purpose: format a block of free-form ascii text into a standard 'html'

   Input Parameters:
      text - string array to convert to html
      link_text - if present, lable links with this text 
                  (default = URL file name)
      noparagraph - if set, inhibit leading <p>  (1st output element) 

   Calling Sequence:
      html=str2html(text)
      html=str2html(text, link_text=link_labels, /nopar)

   Calling Examples:
      These examples are scalar strings for illustration but this routine
      will convert a text array (ex: ascii file contents) in one call
      URLS may be embedded anywhere in the array
 
      IDL> more,str2html('http://www/big.gif',/nopar )<< IN
         <A HREF="http://www/big.gif"><B>http://www/big.gif</B></A> << OUT

      IDL> more,str2html('img/big.gif', link='img/thumb.gif',/nopar)  << IN
         <A HREF="img/big.gif"><B><IMG SRC="img/thumb.gif"></B></A>   << OUT

   Method:
      identify tables - block with <p><pre>TABLE</pre> ;
         (note - see strtab2html.pro for IDL string->Version 3 table convert)
      replace null lines with <p>			; paragraph
      insert link when URL is detected 
      some fuzzy logic list detection/conversion is possible
      
 CALLS: ***
	UNIQ [1], UNIQ [2], UNIQ [3], deriv_arr [1], deriv_arr [2], remtab [1], remtab [2]
	str_replace [1], str_replace [2], strlist2html [1], strlist2html [2]
	wc_where [1], wc_where [2], where_table [1], where_table [2], where_table [3]
	where_title [1], where_title [2]
 CALLED BY:
	genx2html [1], genx2html [2], go_sxt_sss2secondary, html_linklist, image2movie
	soon_catstat, soon_search_www, special_movie, ssw_findstuff2html
	ssw_install [1], ssw_install [2], sxt_ssn2fits [1], thumbnail_table_html
	timeline, topsdb [1], topsdb [2], trace_movie_index [1], trace_movie_index [2]
	web_seq, xset_chain [1], xset_chain [2]
   History:
      29-mar-1995 (S. L. Freeland) - for automated TEXT->HTML conversions
       2-jun-1995 (SLF) - add auto links and NOLINKS keyword
       6-jun-1995 (SLF) - add auto-title & auto <hr>
      26-jul-1995 (SLF) - add call to strlist2html
       8-aug-1995 (SLF) - fixed typo in ascii URL->html reference code
      25-aug-1995 (SLF) - add LINK_TEXT keyword
      23-aug-1995 (SLF) - allow LINK_TEXT to be a vector
			   (to format linked diretory lists, for example) 
      17-jun-1996 (SLF) - use ".html" instead of "html" for auto-url dectection
       5-mar-1997 (SLF) - Major upgrade - call <strfind_urls> to simplify
                          this routine and permit extension to RELATIVE urls
                          (previous rev only auto-linked ABSOLUTE urls)
                          Changed default link text to associated URL name
                          If LINK_TEXT includes .gif or .jpg, they  are
                          assumed to be inlined images - <img src="... added
                          All added html is capatilized (industry standard...)
      27-sep-2005 (SLF) - change default link to non-Bold ; use /BOLD to change back
      Circa 1-jan-2005 (SLF) - made /NOPAR the default;
                         use /PARAGRAPH to restore "old" behavior


str2html [2] $SSW/gen/idl_fix/soft/old310/str2html.pro
[Previous] [Next]
   Name: str2html

   Purpose: format a block of free-form ascii text into a standard 'html'

   Method:
      identify tables - block with <p><pre>TABLE</pre> ;
      replace null lines with <p>			; paragraph
      
 CALLS: ***
	UNIQ [1], UNIQ [2], UNIQ [3], deriv_arr [1], deriv_arr [2], remtab [1], remtab [2]
	str_replace [1], str_replace [2], strlist2html [1], strlist2html [2]
	wc_where [1], wc_where [2], where_table [1], where_table [2], where_table [3]
	where_title [1], where_title [2]
 CALLED BY:
	genx2html [1], genx2html [2], go_sxt_sss2secondary, html_linklist, image2movie
	soon_catstat, soon_search_www, special_movie, ssw_findstuff2html
	ssw_install [1], ssw_install [2], sxt_ssn2fits [1], thumbnail_table_html
	timeline, topsdb [1], topsdb [2], trace_movie_index [1], trace_movie_index [2]
	web_seq, xset_chain [1], xset_chain [2]
   History:
      29-mar-1995 (SLF)
      30-mar-1995 (SLF) - for pre-keyword inheritance IDL (dummy)


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

   Purpose: add anchor html to input vector 

   Input Parameters:
      anchor_names - one or more anchor reference strings 
      anchor_text - optional anchor text (default is same as ANCHOR_NAMES)

   Output:
      function returns specifed anchor html; nelements=n_elements(anchor_names)

   Keyword Parameters:
      link_anchor - output html is: <A "#ANCHOR_NAMES">ANCHOR_TEXT</A>"
      drop_anchor - output html is: <A name="ANCHOR_NAMES"></a>'

   Calling Sequence:
      The following 2 line sequence sets an forward anchor reference link
      with text='anchor 1 test' and then marks then anchor later in the 
      html document.
      
      IDL> str2html_anchor,'anchor1','anchor 1 test', /link_anchor
           [---- some intervening html -----]
      IDL> str2html_anchor,'anchor1', /drop_anchor       

 CALLS: ***
	BOX_MESSAGE, data_chk [1], data_chk [2]
   History:
      20-Jan-2000 - S.L.Freeland


STR2LINES $SSW/gen/idl/string/str2lines.pro
[Previous] [Next]
 PROJECT:
       SOHO - CDS/SUMER

 NAME:
       STR2LINES()

 PURPOSE:
       Convert a string into a series lines (string array) at certain length

 CATEGORY:
       Utility

 SYNTAX:
       Result = str2lines(str)

 INPUTS:
       STR - String to be converted

 OPTIONAL INPUTS:
       None.

 OUTPUTS:
       None.

 OPTIONAL OUTPUTS:
       None.

 KEYWORDS:
       LENGTH    - Maximum length of output string array elements
                   (defaults to 72)
       REVERSE   - Set this keyword to convert sentences to a long string
       WARNING   - Contains warning message (if any returned line is
                   longer than LENGTH)
       JUST_CODE - String scalar, code of justification:
            '<':  left justification  (this is default)
            '>':  right justification
            '|':  center justified
            '||': full justification (not implemented)

 CALLS: ***
	DATATYPE [1], DATATYPE [2], DATATYPE [3], JUSTIFY
 CALLED BY:
	SUPPRESS_MESSAGE, TEXT_ANOMALY, UPDATE_CAMPAIGN, XCAMP, XCAT, XREPORT_EDIT, db_gbo
	hsi_params_write_pro, ihy_db, ospex_params_write_pro
 COMMON:
       None.

 RESTRICTIONS:
       None.

 SIDE EFFECTS:
       Retured string array is compressed (with all whitespace
       [blanks and tabs] compressed to a single space)

 HISTORY:
       Version 1, January 25, 1996, Liyun Wang, GSFC/ARC. Written
       24-Jan-2002, Kim Tolbert.  Corrected bug in STRMID call

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


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

   Purpose: return numeric part of a string or string array

   Input Parameters:
      strarr - string or string array which contain numeric info

   Output:
      Function returns numeric array (long or floating, as appropriate)
      For elements w/no numeric info, output set to zero (0)

   Keyword Parameters:
      loud - if set, print warning if one or more strings contain no number

   Calling Sequence:
      numbers=str2number(strarr)  ; return numeric portion of strarr
      

   Calling Example:
      IDL> print,str2number(['as34','asdfsadf','a234.5','asdf-8.734asdf'])
      % STR2NUMBER: Some input contains no numeric data (set those to zero)
            34.0000      0.00000      234.500     -8.73400
 CALLED BY:
	get_history, get_xfont [1], get_xfont [2], lasco_time2file, merge_genxcat
	mk_week_file [1], mk_week_file [2], plot_ace, reltime [1], reltime [2]
	soon_search_www, ssw_fov_context, ssw_getcme_cactus, ssw_kyoto2dst
	ssw_unspike_cube, sswstruct_fill [1], trace_cosmic2hist_accum
	trace_get_vignette, trace_movie_context, trace_unspike_time, update_history
   History:
      1-May-1995 (SLF)  Written (to return font sizes orignially)
				  form='FONTNAMEfonssize'
     23-may-1995 (SLF)  Made QUIET the default (use /loud to override)

   Method:
      make non-numeric characters blanks and eliminate with strcompress

   Restrictions:
      exponential format not recognized 


str2pages $SSW/gen/idl/string/str2pages.pro
[Previous] [Next]
NAME:
	str2pages
PURPOSE:
	To take a string array and to break it into page blocks
SAMPLE CALLING SEQUENCE
	out2 = str2pages(str, tit, page_tit, /page_numbers, nlin=35)
INPUT:
	str	- The 1-D string array
OPTINAL INPUT:
	tit	- A fixed set of lines to put at the top of each page
	page_tit- A 2-D array of  Npages X NLinesOfHeaderof header
		  information to prepend on each page (used when
		  different header information is needed on each 
		  page
 CALLED BY:
	tr_tab_head
OPTIONAL KEYWORD INPUT:
	page_numbers - Add a string "Page 1 of 30" type of string
	nlin	- The number of non-title information per page
		  (default is 40)
HISTORY:
	Written 24-Feb-98 by M.Morrison
	11-Mar-98 (MDM) - Correction to handle where there is one page


STR2TOKEN $SSW/gen/idl/string/str2token.pro
[Previous] [Next]
 PROJECT:
       SOHO - CDS/SUMER

 NAME:
       STR2TOKEN()

 PURPOSE:
       Convert a string into an array of tokens

 CATEGORY:
       String, utility

 EXPLANATION:
       A token is defined as an entity which is composed of only alphabetic
       and numerical letters plus the underscore sign ("_").

 SYNTAX:
       Result = str2token(str)

 EXAMPLES:
       IDL> token = str2token('STRTRIM(STRCOMPRESS(STRING(bstr)), 2)')
       IDL> help, token
       <Expression>    STRING    = Array(5)
       IDL> print, token
       STRTRIM  STRCOMPRESS  STRING  bstr  2
       IDL>

 INPUTS:
       STR - String scalar to be examined

 OPTIONAL INPUTS:
       None.

 OUTPUTS:
       RESULT - String array containing tokens in STR; the null string is
                returned if an error occurrs

 OPTIONAL OUTPUTS:
       None.

 KEYWORDS:
       ERROR - String containing possible error message; the null string is
               returned if no error
       DOT   - Set this keyword to allow structure type token
       EXCLAMATION - Set this keyword to allow system variable

 COMMON:
       None.

 RESTRICTIONS:
       None.

 SIDE EFFECTS:
       None.

 HISTORY:
       Version 1, February 5, 1997, Liyun Wang, NASA/GSFC. Written
       Version 2, February 10, 1997, Liyun Wang, NASA/GSFC
          Added DOT and EXCLAMATION keyword

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


STR2UTC [1] $SSW/gen/idl/time/str2utc.pro
[Previous] [Next]
 Project     :	SOHO - CDS

 Name        :	STR2UTC()

 Purpose     :	Parses UTC time strings.

 Explanation :	This procedure parses UTC time strings to extract the date and
		time.

 Use         :	Result = STR2UTC( UTC )
		Result = STR2UTC( UTC, /EXTERNAL )

 Inputs      :	UTC	= A character string containing the date and time.  The
			  target format is the CCSDS ASCII Calendar Segmented
			  Time Code format (ISO 8601), e.g.

				"1988-01-18T17:20:43.123Z"

			  The "Z" is optional.  The month and day can be
			  replaced with the day-of-year, e.g.

				"1988-018T17:20:43.123Z"

			  Other variations include

				"1988-01-18T17:20:43.12345"
				"1988-01-18T17:20:43"
				"1988-01-18"
				"17:20:43.123"

			  Also, the "T" can be replaced by a blank, and the
			  dashes "-" can be replaced by a slash "/".  This is
			  the format used by the SOHO ECS.  (Another optional
			  format, as used at Wilcox observatory, is to replace
			  the "T" with an underscore "_", and the dashes with
			  periods.)

			  In addition this routine can parse dates where only
			  two digits of the year is given--the year is assumed
			  to be between 1950 and 2049.

			  Character string months, e.g. "JAN" or "January", can
			  be used instead of the number.  In that case, it
			  assumes that the date is either in day-month-year or
			  month-day-year format, e.g. "18-JAN-1988" or
			  "Jan-18-1988".  However, if the first parameter is
			  four digits, then year-month-day is assumed, e.g.
			  "1988-Jan-18".

			  Dates in a different order than year-month-day are
			  supported, but unless the month is given as a
			  character string, then these are only supported
			  through the /MDY and /DMY keywords.

 Opt. Inputs :	None.

 Outputs     :	The result of the function is a structure containing the (long
		integer) tags:

			MJD:	The Modified Julian Day number.
			TIME:	The time of day, in milliseconds since the
				beginning of the day.

		Alternatively, if the EXTERNAL keyword is set, then the result
		is a structure with the elements YEAR, MONTH, DAY, HOUR,
		MINUTE, SECOND, and MILLISECOND.

		Any elements not found in the input character string will be
		set to zero.		

 Opt. Outputs:	None.

 Keywords    :	EXTERNAL = If set, then the output is in CDS external format,
			   as described above.

		DMY	 = Normally the date is in the order year-month-day.
			   However, if DMY is set then the order is
			   day-month-year.  Note that if the month is given as
			   a character string, then the default is
			   day-month-year.

		MDY	 = If set, then the date is in the order
			   month-day-year.

		YMD	 = If set, then the date is in the order
			   year-month-day.

		TEMPLATE = If set, then the first string in the input array UTC
			   is used as a template for all the strings to follow.
			   This speeds up processing of large string arrays.
			   However, it requires that all the strings have
			   *EXACTLY* the same format.  In other words, all the
			   date fields must be in exactly the same places, with
			   exactly the same widths.

			   If the TEMPLATE keyword is not passed, then the
			   software tries to automatically determine the
			   correct setting, based on the positions of separator
			   characters, and the total length of the string.  If
			   these match for all the strings, then TEMPLATE is
			   automatically set to 1.  Use TEMPLATE=0 to override.

		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 = STR2UTC( UTC, ERRMSG=ERRMSG )
				IF ERRMSG NE '' THEN ...

 Calls       : ***
	DATATYPE [1], DATATYPE [2], DATATYPE [3], DATE2MJD [1], DATE2MJD [2], DATE2MJD [3]
	MJD2DATE, STR_SEP, UTC2INT [1], UTC2INT [2], UTC2INT [3], VALID_NUM [1]
	VALID_NUM [2], VALID_NUM [3]
 CALLED BY:
	ADJUST_DATE_OBS, ANYTIM2UTC [1], ANYTIM2UTC [2], C2_CALFACTOR, C2_CALIBRATE
	C3_CALFACTOR [1], C3_CALIBRATE, CAT_FITS, CDS_OUTPLOT, CDS_UTPLOT, CDS_UTSTRING
	COMBINE_MVI, COMB_FULL_EQ, DAYS2LAUNCH, DOY2UTC, GETBKGIMG, GET_CAL_STRUCT
	GET_CROTA, GET_ORBIT_CDF, GET_SUN_CENTER [1], GT_DURATION, GT_START, KAP_DATE, KDAY
	LIST_FITS, LOCAL_DIFF, MAKE_ALL_DAYS, MAKE_ALL_MINDAYS, MAKE_ALL_MONEXP
	MAKE_ALL_MONTHS, MAKE_DAILY_IMAGE, MAKE_FITS_HDR, MAKE_GIFS, MKMOVIE
	MKMOVIE0 obsolete version of mkmoviepro, MKMOVIEM, MKMOVIEWLC, MKMOVIE_kpd
	MK_ALL_MIN, MK_DAILY_C1_MED, MK_DAILY_MED, MK_DAILY_MIN, MK_IMG, MK_MONTHLY_MIN
	MLO_FITSHDR2STRUCT, MONITOR_EXP, MVI2FRAMES, OCCLTR_CNTR, OFFSET_BIAS, PB_INVERTER
	PLOT_CDS_CRAYS, PLOT_EXPINT, PLOT_EXP_FACTOR, PLOT_HT, PLOT_RASTER, PLOT_SCI_TLM
	PLOT_TEMP_POS, READ_CARR_LONG, READ_DOOR_STATUS, READ_HT, READ_MSP_ITEM
	READ_OCC_DAT, REDUCE_IMG_HDR, REDUCE_MAIN, REDUCE_TRANSFER, REGEN_SYNOP, REMOVE_CR
	ROLL_TIMES, RTMOVIE, RTMVI [1], RTMVIPLAY [1], RTMVIPLAY [2], RTMVIPLAYPNG
	SHOW_PLAN, SYNOPTIC_STATS, UNPACK_LZ_SCIENCE, UPDATE_HDR_ROLLXY, UPDATE_MPG
	UTC2DOW, UTC2DOY, UTC2INT [1], UTC2INT [2], UTC2INT [3], UTC2TAI, V4MCART, V4MSPH
	WMESSAGE [1], WPLOT_NONOP, WPLOT_SUBHTR [2], WRITE_HT, WRITE_SUMMARIES [1]
	WSAVE_PS [2], XCME_MES, XCOR_CDS, YYMMDD2UTC, carrmapmaker2
	cmap2gif ftsfile maxdmind ROOTroot CONTROLcontrol, cube_interp, datify
	get_soho_ephem, later
	rt_carrmapmaker yymmdd num_r rad limb wlimb hdr disp saveset nextrot
	zcheck_hdr, zintervals, zpb0r [1], zpb0r [2], zstr2utc [1], zstr2utc [2]
 Common      :	None.

 Restrictions:	The components of the time should be separated by the colon ":"
		character, except between the seconds and fractional seconds
		parts, where the separator is the period "." character.  As of
		version 21, the colon separator can be omitted, but this is not
		recommended.

		The components of the date must be separated by either the dash
		"-" or slash "/" character.

		The only spaces allowed are at the beginning or end of the
		string, or between the date and the time.

		This routine does not check to see if the dates entered are
		valid.  For example, it would not object to the date
		"1993-February-31", even though there is no such date.
		In this case, the date would be converted to "1993-March-3".

 Side effects:	If an error is encountered and the ERRMSG keyword is set, 
		STR2UTC returns an integer scalar equal to -1.

 Category    :	Utilities, Time.

 Prev. Hist. :	Part of the logic of this routine is taken from TIMSTR2EX by M.
		Morrison, LPARL.  However, the behavior of this routine is
		different from the Yohkoh routine.  Also, the concept of
		"internal" and "external" time is based in part on the Yohkoh
		software by M. Morrison and G. Linford, LPARL.

 Written     :	William Thompson, GSFC, 13 September 1993.

 Modified    :	Version 1, William Thompson, GSFC, 21 September 1993.
		Version 2, William Thompson, GSFC, 28 September 1993.
			Expanded the capabilities of this routine based on
  			TIMSTR2EX.
		Version 3, William Thompson, GSFC, 20 October 1993.
			Corrected small bug when the time string contains
			fractional milliseconds, as suggested by Mark Hadfield,
			NIWA Oceanographic.
		Version 4, William Thompson, GSFC, 18 April 1994.
			Corrected bugs involved with passing arrays as
			input--routine was not calling itself reiteratively
			correctly.
		Version 5, Donald G. Luttermoser, GSFC/ARC, 28 December 1994
			Added the keyword ERRMSG.
		Version 6, 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 7, William Thompson, GSFC, 26 January 1995
			Modified to support VMS-style format.
			Made error-handling more robust.
		Version 8, Donald G. Luttermoser, GSFC/ARC, 30 January 1995
			Added ERRMSG keyword to internally called procedures.
			Note that this routine can handle both scalars and
			vectors as input.
		Version 9, William Thompson, GSFC, 2 February 1995
			Fixed bug with years input with two-digits.
		Version 10, William Thompson, GSFC, 22 March 1995
			Fixed bug when date string contains OCT in capital
			letters.
		Version 11, William Thompson, GSFC, 15 June 1995
			Modified so that the default behavior is different when
			the month is given as a character string.  In that
			case, it now assumes that the year is the *last*
			parameter in the string unless given with all four
			digits.
		Version 12, William Thompson, GSFC, 19 June 1995
			Made logic used in version 11 more robust.  Added
			keyword YMD.
		Version 13, William Thompson, GSFC, 6 October 1995
			Added ability to recognize strings that end in either
			AM or PM.
		Version 14, William Thompson, GSFC, 15 January 1996
			Extended bug fix of version 10 to "SEPT" and "AUGUST".
		Version 15, Dominic Zarro, GSFC, 15 January 1997
			Included input UTC string in output error message
		Version 16, William Thompson, GSFC, 27 January 1997
			Include support for Wilcox/MDI time format, e.g.
			"1988.01.18_17:20"
		Version 17, William Thompson, GSFC, 28 January 1997
			Allow for long input arrays.
		Version 18, William Thompson, GSFC, 7 February 1997
			Further refined support for Wilcox/MDI time format,
			allowing the string to end in _TAI or _UT.
		Version 19, William Thompson, GSFC, 30 September 1997
			Fixed bug involving times before dates, and month
			strings containing the letter T.
		Version 20, William Thompson, GSFC, 8 June 1999
			Avoid conflict with date.pro
		Version 21, 07-Apr-2000, William Thompson, GSFC
			Allow ":" to be omitted in time string.
			Call CHECK_EXT_TIME
		Version 22, 10-Apr-2000, William Thompson, GSFC
			Added keyword TEMPLATE
		Version 23, 28-Apr-2000, William Thompson, GSFC
			Fixed bug with /TEMPLATE and only dates, no times.
               Version 24, 30-Apr-2000, S.L.Freeland, LMSAL
                       Made backwardly compatible with Version < 5
                       Scalarize 1 element DAY/MONTH/YEAR 	  
		Version 25, 1-May-2000, William Thompson, GSFC
			Corrected scalarization of YEAR/MONTH/DAY
		Version 26, 30-Jun-2000, William Thompson, GSFC
			Fixed bug with only hours, no minutes or seconds.
		Version 27, 05-Jul-2000, William Thompson, GSFC
			If no date passed, then use today.
               Version 28, 04-Aug-2004, William Thompson, GSFC
                       Test for too many colons.
               Version 29, 09-Aug-2005, William Thompson, GSFC
                       Automatic test for TEMPLATE setting
               Version 30, 06-Dec-2005, William Thompson, GSFC
                       Catch case with TEMPLATE when some strings start with a
                       blank, e.g. " 1-Nov-2005"

 Version     :	Version 30, 06-Dec-2005


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

   Purpose: turn structure checks on or off (for make_str.pro)

   Keyword Parameters:
      on - if set, turns checking on  (more diagnostic messages but avoids
					conflicts with idl save files)
     off - if set, turns checking off (quieter but may conflict with
					idl save files)

 CALLED BY:
	MAKE_STR [1], MAKE_STR [2], WBDA [1], WBDA [2]
   History:
      slf, 3-feb-1993
      slf, 4-feb-1993	; add diagnostics and quiet keyword
      slf,26-mar-1993  ; document inquire keyword 

   Calling Sequence:
      str_checks  		; enable checks (and noisy messages)
      str_checks,/on		; equivilent to above
      str_checks,/off  	; disable checks 
      str_checks,/inquire	; check flag state but dont change it

   Common Blocks:
      make_str_blk1

   Restrictions: uses common block - should be handled by system variable 
		  when system variable definitions are full integrated 



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

 NAME:	
       STR_CHOP()

 PURPOSE:
       Chop off a substring from a string scalar or vector

 EXPLANATION:
       
 CALLING SEQUENCE: 
       Result = STR_CHOP(strings, substr)

 INPUTS:
       STRINGS - String scalar or vector from which a substring is chopped
       SUBSTR  - Substring to be chopped from STRINGS

 OPTIONAL INPUTS: 
       None.

 OUTPUTS:
       RESULT - A new string scalar or vector in which STRSUB has been
                removed from each of its elements.

 OPTIONAL OUTPUTS:
       None.

 KEYWORD PARAMETERS: 
       None.

 CALLS: ***
	ARR2STR [1], Arr2Str [2], DATATYPE [1], DATATYPE [2], DATATYPE [3], GREP, STR_SEP
 CALLED BY:
	HESSI PACKET FILE ABSTRACT CLASS, UNIVERSAL SUPERCLASS DEFINITION, WHICH
	hsi_ui_flarecat, sumer_ffdb
 COMMON BLOCKS:
       None.

 RESTRICTIONS: 
       None.

 SIDE EFFECTS:
       None.

 CATEGORY:
       
 PREVIOUS HISTORY:
       Written January 20, 1995, Liyun Wang, GSFC/ARC

 MODIFICATION HISTORY:
       
 VERSION:
       Version 1, January 20, 1995


STR_CHUNK $SSW/gen/idl/string/str_chunk.pro
[Previous] [Next]
 Project     : SOHO - CDS

 Name        : STR_CHUNK

 Category    : string, utility

 Purpose     :	Break a string into equi-sized chunks

 Explanation :	

 Syntax      : IDL> out=str_chunk(in,size)

 Inputs      : IN = input string
               SIZE = string size of each chunk

 Opt. Inputs : None

 Outputs     : OUT = string array of individual chunks

 Opt. Outputs: None

 Keywords    : None

 CALLS: ***
	APPEND_ARR, DATATYPE [1], DATATYPE [2], DATATYPE [3], EXIST, PR_SYNTAX
 CALLED BY:
	str_pow_conv
 Common      : None

 Restrictions: None

 Side effects: None

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

 Contact     : DZARRO@SOLAR.STANFORD.EDU


str_concat [1] $SSW/gen/idl/struct/str_concat.pro
[Previous] [Next]
   Name: str_concat

   Purpose: allow concatenation of identical structures even though
	     the structure name may differ

   Input Parameters
	str1 - first structure or structure array
	str2 - second structure or structure array
   Output: ;	function returns concatenated vector of structure name=str1

   Method: uses str_copy which is recursive for nested structures

 CALLS: ***
	HIS_EXIST, his_index, str_copy_tags [1], str_copy_tags [2], str_copy_tags [3]
	str_copy_tags [4]
 CALLED BY:
	FIX_SFD, RD_BDA_DP, RD_LP, RECONCILE_SFD_INFIL, UPDATE_TERM, deciyr2ints
	doc_summ [1], doc_summ [2], eit_catrd [3], last_lc, mk_daily_ints, mk_trace_i1
	mxfread, pfi_dominant, rd_sci5k, rd_xbd, search_obs, sort_index [1], sort_index [2]
	sxl_analysis, sxt_av_teem, sxt_dark_sample, term_obs, trace_make_tmr [1]
	wrt_fits_bin_exten [2]
   History: slf, 10/23/91
	 2-Mar-94 (MDM) - Modified to create SXT history index portion
			  if only one input has the .HIS portion
			- Modified to use STR_COPY_TAGS instead of
			  STR_COPY 


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

   Purpose: copy structures  - required when two structures are
            identical in structure but differ in idl name
            avoids conflicting data structure name

   Input Parameters:
      str1 - destination structure (template)
      str2 - source structurei

   Output: function return value is type str1 copy of str2 contents

 CALLED BY:
	RD_ADA, RD_ADA_DATA, RD_BDA [1], mk_mo_log, str_insert [1], str_insert [2]
	struct2ms [1], struct2ms [2], timeline, topsdb [1], topsdb [2], web_seq
	xset_chain [1], xset_chain [2]
   History: slf, 10/24/91
	     slf, 10/24/91 - streamlined recursive segment
            6-Sep-05 Zarro (L-3Com/GSFC) - added STRUCT_ASSIGN

   Method: recursive for nested structures



if (not is_struct(str1)) then return,-1
if (not is_struct(str2)) then return,str1


str_copy_tags [1] $SSW/gen/idl/struct/str_copy_tags.pro
[Previous] [Next]
   Name: str_copy_tags

   Purpose: copy structures where the tag names match.  The
	     default is NOT to copy the tags "index_version"
	     and "entry_type"

   Input Parameters:
      str1 - destination structure (template)
      str2 - source structure
   Optional Input:
	vercopy - If present, then the keywords "index_version" and
		    "entry_type" are not copied (to preserve the
		    new structure version number)

   Output: function return value is type str1 copy of str2 contents

 CALLED BY:
	BSC_FIELD, EIT_CATRD [1], EIT_PREP, MK_SSX, RD_XDA [1], RD_XDA [2], TRACE_PREP
	def_yssysv [1], def_yssysv [2], fit_bsc, fit_bsc_as, get_dc_image [2]
	get_dc_image [3], get_leak_image [1], get_leak_image [2], get_leak_image [3]
	get_sxa, mk_week_file [1], mk_week_file [2], rd_dt_genx, rd_sdl, rd_sld, rd_sls
	rd_sot, rd_sxtgoes, rd_trace_i0 [1], rd_trace_i0 [2], rd_week_file [1]
	rd_week_file [2], rd_week_file [3], rd_week_file [4], read_genxcat
	str_concat [1], str_concat [2], str_ver_update [1], str_ver_update [2]
	sxt_prep [1], sxt_prep [2], sxt_prep [3], weekid [2], ydb_exist [2]
   History: slf, 10/24/91
	     slf, 10/24/91 - streamlined recursive segment
	     mdm, 11/10/91 - took "str_copy" and made it copy by
			     matching tag names
	12-Nov-91 MDM - Added "spare1" and "spare2" to the skip-list
	18-Dec-92 MDM - Added code to avoid copying any SPARE tags all the
			time (not just if /vercopy is set)
	 4-Jan-94 MDM - Modified so that it will work if passing in
			an index with .GEN, .SXT, and .HIS and the other
			structure just has .GEN and .SXT.
		      - Previously, the input structure was being modified.
			Made changes to not corrupt the input template
	29-Sep-97 MDM - Patch to not crash when trying to copy a longer
			input into an output
       12-Mar-98 SLF - fix 'subscript w/-1' bug in 29-sep change
       11-Mar-2003 - SLF - sprinle liberally with 'reform's sinc RSI
                     screwed us with degenerate structure/vector dimensions
                     circa IDL V5.5
       15-apr-2003 - SLF - remove one of the 11-March reforms per Barry Labonte
                     suggested - avoid problems at least on linux 5.6
	

   Method: recursive for nested structures


str_cut $SSW/gen/idl/string/str_cut.pro
[Previous] [Next]
 Project     : HESSI     
                   
 Name        : str_cut
               
 Purpose     : cut string to max size, appending "..."
               e.g, str_cut('testing',4) -> 'test...'
               
 Category    : string utility
               
 Syntax      : IDL> spos=str_cut(in,max)

 Inputs      : IN = input string 
               MAX = max size or string
               
 Outputs     : cut string

 CALLS: ***
	EXIST, IS_BLANK, STRPAD, is_number [1], is_number [2]
 CALLED BY:
	SHOW_SYNOP__DEFINE, db_gbo, ihy_db
 History     : 5-May-2000,  D M Zarro (SM&A/GSFC)  Written
     
 Contact     : dzarro@solar.stanford.edu


STR_DEBLANK $SSW/gen/idl/string/str_deblank.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : STR_DEBLANK
               
 Purpose     : replace blank delimiters in a string with commas
               
 Category    : utility
               
 Explanation : 
               
 Syntax      : IDL> result=str_deblank(variable,format)
    
 CALLED BY:
	MK_PLAN_XY
 Examples    : a='1,2,3 5 6,7'
               print,str_deblank(a)
               '1,2,3,4,5,6,9'

 Inputs      : VARIABLE = string to deblank
               
 Opt. Inputs : FORMAT  = string format to use 
               
 Outputs     : RESULT = deblanked variable

 Opt. Outputs: None
               
 Keywords    : None

 CALLS: ***
	ARR2STR [1], Arr2Str [2], DATATYPE [1], DATATYPE [2], DATATYPE [3], EXIST
	STR2ARR [1], STR2ARR [2], STREP [1], STREP [2], STREP [3], STREP [4], STREP [5]
 Common      : None
               
 Restrictions: None
               
 Side effects: None
               
 History     : Version 1,  4-May-1996,  D M Zarro.  Written

 Contact     : DMZARRO


str_ebc2asc [1] $SSW/gen/idl/genutil/str_ebc2asc.pro
[Previous] [Next]
NAME:
	str_ebc2asc
PURPOSE:
	To convert a string from EBCDIC to ASCII
INPUT:
	in	- Input string (or byte array)
OUTPUT:
	RETURNS	- The byte array equivalent in EBCDIC of the
		  input.  If the "str" keyword is used, the
		  output is converted to a string variable
OPTIONAL INPUT:
	qstop	- Stop the routine at the end (for debugging)
	str	- If set, the value returned is converted to
		  a string. 
 CALLED BY:
	wrt_ebc2asc [1], wrt_ebc2asc [2]
HISTORY:
	Written Oct-91 by M.Morrison


STR_EXPAND $SSW/gen/idl/string/str_expand.pro
[Previous] [Next]
 Project     : HESSI
                  
 Name        : STR_EXPAND
               
 Purpose     : Expand delimited string into an array.
               Like STR2ARR but delimiter is OS dependent, and
               input can be vector. Will also recursively expand '+'.
                             
 Category    : string system utility
               
 Syntax      : IDL> a=str_expand(b)
                (e.g. b='test1:test2:test3' 
                      a=['test1','test2','test3']

 Inputs      : B = string to expand
               
 Outputs     : A = expanded string
               
 Keywords    : VERBOSE = set for messaging
               
 CALLS: ***
	APPEND_ARR, DATATYPE [1], DATATYPE [2], DATATYPE [3], EXIST, GET_PATH_DELIM
	STR2ARR [1], STR2ARR [2]
 CALLED BY:
	LOC_FILE [2]
 History     : Written, 28-May-2000, Zarro (EIT/GSFC)

 Contact     : dzarro@solar.stanford.edu


STR_FIND $SSW/gen/idl/string/str_find.pro
[Previous] [Next]
 Project     : HESSI

 Name        : STR_FIND

 Purpose     : find matches in an array of strings

 Category    : string utility
                   
 Inputs      : INPUT = array of strings to search
               PATT = string pattern to match (e.g. '*fits')

 Outputs     : Match results

 Keywords    : CASE_SENS: set for case sensitive match (def = no case)
               COUNT = # of matched

 CALLS: ***
	ARR2STR [1], Arr2Str [2], COMDIM2, str_replace [1], str_replace [2]
 CALLED BY:
	HESSI MONITOR RATE  CLASS DEFINITION, SOCK_FIND
 History     : 27-Dec-2001,  D.M. Zarro (EITI/GSFC)  Written

 Contact     : DZARRO@SOLAR.STANFORD.EDU


STR_FORMAT $SSW/gen/idl/string/str_format.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : STR_FORMAT
               
 Purpose     : format a variable to a string
               
 Category    : utility
               
 Explanation : 
               
 Syntax      : IDL> result=STR_format(variable,format)
    
 Inputs      : VARIABLE = variable to format
               
 Opt. Inputs : FORMAT  = string format to use [def = '(f15.3')]
               
 Outputs     : RESULT = variable formatted as a string

 CALLS: ***
	EXIST, IS_BLANK
 CALLED BY:
	CHECK_CDS_MODES, EIS_LIST_EXPER [1], EIS_LIST_EXPER [2], EIS_LIST_MAIN [1]
	EIS_LIST_MAIN [2], FTP_MWSO, GET_CDS_FOV, GET_CDS_OH, GET_CDS_XY, GET_PLAN_TT
	HTTP__DEFINE, HXRS__DEFINE, MAP2GIF, MAP2JPEG, MK_CDS_PLAN, MK_PLAN_COMP
	MK_PLAN_FIND [1], MK_PLAN_FIND [2], MK_PLAN_RECAL, MK_PLAN_SORT, MK_PLAN_WHERE
	MK_PLAN_WRITE, MK_PLAN_XY, OPLOT_NAR [1], OVSA_LTC_DEFINE, READ_KAP, RSTN__DEFINE
	SITE__DEFINE, TIME2FID, UPD_SCI_PLAN, XCPT, db_gbo, hsi_gbo, ihy_db, vso_format
 History     : Version 1,  4-May-1996,  D M Zarro.  Written

 Contact     : DMZARRO


STR_FUZZY $SSW/gen/idl/string/str_fuzzy.pro
[Previous] [Next]
 Project     : HESSI

 Name        : STR_FUZZY

 Purpose     : fuzzy string pattern match

 Method      : INPUT contains an array of the minimum characters required for a match.
               PATTERN contains a string that must at least have the characters in input
               for a match but could contain other characters.  Useful for user input, where
               users might roughly remember parameter name, but not exactly.
 CALLS: ***
	GREP
 CALLED BY:
	SPEX_GEN__DEFINE
 Example     :
               Say the user requested 'rates' but the standard parameter name is 'rate'
               standard_name = ['counts', 'rate', 'flux']
               print,standard_name (str_fuzzy( ['co', 'ra', 'fl'], 'rates') )

 Category    : string utility

 Inputs      : INPUT = input string or string vector
               PATTERN = scalar string pattern to find (approximately) in input string(s)

 Outputs     : Index into INPUT of match, or -1 if no match

 Keywords    : NONE

 Written:  Kim Tolbert,  July 2003


STR_INDEX [1] $SSW/gen/idl/string/str_index.pro
[Previous] [Next]
 NAME:
       STR_INDEX()

 PURPOSE:
       Get indices of a substring (SUBSTR) in string.

 EXPLANATION:
       The IDL intrinsic function STRPOS returns only the index of the first
       occurrence of a substring. This routine calls itself recursively to get
       indices of the remaining occurrences.

 CALLING SEQUENCE:
       result= STR_INDEX(str, substr [, offset])

 INPUTS:
       STR    -- The string in which the substring is searched for
       SUBSTR -- The substring to be searched for within STR

 OPTIONAL INPUTS:
       OFFSET -- The character position at which the search is begun. If
                 omitted or being negative, the search begins at the first
                 character (character position 0).

 OUTPUTS:
       RESULT -- Integer scalar or vector containing the indices of SUBSTR
                 within STR. If no substring is found, it is -1.

 CALLS: ***
	DELVARX [1], DELVARX [2], DELVARX [3], DELVARX [4], delvarx [5]
 CALLED BY:
	CDUP, CHK_DIR [1], CHK_DIR [2], CONVERT_TERMS, CONVERT_TERMS_ALL, EIT_DAILY
	REDUCE_MAIN, SOHO_ITEMS_HTML
 COMMON BLOCKS:
       STR_INDEX -- internal common block. The variable save in the block is
                    deleted upon final exit of this routine.

 CATEGORY:
       Utility, string

 MODIFICATION HISTORY:
       Written January 3, 1995, Liyun Wang, GSFC/ARC
       Converted to IDL V5.0   W. Landsman   September 1997
       Use size(/TNAME) instead of DATATYPE()   W. Landsman   October 2001
       


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

 PURPOSE:
       Get indices of a substring (SUBSTR) in string.

 EXPLANATION:
       The IDL intrinsic function STRPOS returns only the index of the first
       occurrence of a substring. This routine calls itself recursively to get
       indices of the remaining occurrences.

 CALLING SEQUENCE:
       result= STR_INDEX(str, substr [, offset])

 INPUTS:
       STR    -- The string in which the substring is searched for
       SUBSTR -- The substring to be searched for within STR

 OPTIONAL INPUTS:
       OFFSET -- The character position at which the search is begun. If
                 omitted or being negative, the search begins at the first
                 character (character position 0).

 OUTPUTS:
       RESULT -- Integer scalar or vector containing the indices of SUBSTR
                 within STR. If no substring is found, it is -1.

 CALLS: ***
	DELVARX [1], DELVARX [2], DELVARX [3], DELVARX [4], delvarx [5]
 CALLED BY:
	CDUP, CHK_DIR [1], CHK_DIR [2], CONVERT_TERMS, CONVERT_TERMS_ALL, EIT_DAILY
	REDUCE_MAIN, SOHO_ITEMS_HTML
 COMMON BLOCKS:
       STR_INDEX -- internal common block. The variable save in the block is
                    deleted upon final exit of this routine.

 CATEGORY:
       Utility, string

 MODIFICATION HISTORY:
       Written January 3, 1995, Liyun Wang, GSFC/ARC
       Converted to IDL V5.0   W. Landsman   September 1997
       Use size(/TNAME) instead of DATATYPE()   W. Landsman   October 2001
       


str_insert [1] $SSW/gen/idl/genutil/str_insert.pro
[Previous] [Next]
NAME:
	str_insert
PURPOSE:
	To insert one structure into an identical array of structures,
	but which might have a different structure name.
SAMPLE CALLING SEQUENCE:
	str_insert, str_array, str, i
INPUT/OUTPUT:
	str_array - the array of structures
INPUT:
	str	- The structure to put into the array of structures
	i	- The indicy of where to insert "str"
 CALLS: ***
	str_copy
HISTORY:
	Written 6-Jun-93 by M.Morrison


str_is [1] $SSW/gen/idl/struct/str_is.pro
[Previous] [Next]
   Name: str_is

   Purpose: boolean function - is input a structure or structure array?

   Input:
      test - data structure to test

   Output:
      function returns: 1 if test is structure
			 0 if test is not a structure

 CALLED BY
	diff_str [1], diff_str [2], get_doc [1], get_doc [2], get_doc [3], get_info [1]
	get_info [2], get_info_lp, saa_in [1], saa_in [2], tim2tfss


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

   Purpose: boolean function - check for structure type (instrument)

   Calling Sequence:
      truth=str_istype(struct, /KEYWORD)
            keyword=tag name   

   History:
      5-jun-1995 (SLF)
   
 CALLS: ***
	is_member [1], is_member [2], ssw_instruments
   Restrictions:
      proto


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

 Name        : str_key

 Purpose     : Extract keyword/values pairs into a structure

 Category    : Utility

 Syntax      : IDL> stc=stc_key(array)

 Inputs      : ARRAY = array to parse

 Outputs     : STC = structure with keywords as tag names, and corresponding
                     value

 Keywords    : None

 CALLS: ***
	ADD_TAG [1], ADD_TAG [2], IS_BLANK, STC_KEY, TRIM, is_struct
 History     : 25-June-2002,  Zarro (LAC/GSFC)

 Contact     : DZARRO@SOLAR.STANFORD.EDU


STR_LASTPOS [1] $SSW/gen/idl/string/str_lastpos.pro
[Previous] [Next]
 Project     :	SOHO - CDS

 Name        :	STR_LASTPOS()

 Purpose     :	Find last occurence of a substring in the source string

 Category    :	String

 Explanation :	

 Syntax      :	Result = STR_LASTPOS( SOURCE, SUBSTRING )

 CALLED BY:
	FILE_EXIST [2], HESSI_DATA_PATHS [1], break_doc [1], break_doc [2]
	break_doc [3], build_str [1], build_str [2], dir_since, file_exist [1]
	file_exist [3], finddir [1], finddir [2], get1doc [1], get1doc [2], hessi_version
	pro_list [1], pro_list [2], read_trace, show_pix [1], show_pix [2]
	ssw_install [2], wc_where [1], wc_where [2], yohkoh_legacy_files [1]
	yohkoh_legacy_files [2]
 Examples    :	

 Inputs      :	SOURCE	  = String or string array to search
		SUBSTRING = String to search for

 Opt. Inputs :	None.

 Outputs     :	Return value is position in string or -1 if not present.

 Opt. Outputs:	None.

 Keywords    :	None.

 Calls       : ***
	REVERSE
 Common      :	None.

 Restrictions:	None.

 Side effects:	None.

 Prev. Hist. :	slf, 11/1/91
		modified, 11/19/91 to allow string arrays for source

 History     :	Version 1, 15-Jan-1996, William Thompson, GSFC
			Incorporated into SSW tree.

 Contact     :	WTHOMPSON


STR_MATCH $SSW/gen/idl/string/str_match.pro
[Previous] [Next]
 Project     : HESSI

 Name        : STR_MATCH

 Purpose     : match patterns in a string 
               (not to be confused with RSI's intrinsic and better STRMATCH)

 Category    : string utility
                   
 Inputs      : SOURCE = source string
               PATT = pattern to match (e.g. 'fits')
               (can be vector, or scalar string delimited by comma)

 Outputs     : Match results

 Keywords    : CASE_SENS: set for case sensitive match (def = no case)
               BOOL_AND: set for boolean AND match (def = OR)
               COUNT = # of matched

 CALLS: ***
	STR2ARR [1], STR2ARR [2], TRIM2, str_replace [1], str_replace [2]
 CALLED BY:
	HTTP__DEFINE, IS_COMPRESSED, SHOW_SYNOP__DEFINE, SITE__DEFINE, fit_comp__define
	is_winnt
 History     : 4-Apr-2000,  D.M. Zarro.  Written

 Contact     : DZARRO@SOLAR.STANFORD.EDU


str_merge [1] $SSW/gen/idl/struct/str_merge.pro
[Previous] [Next]
   Name: str_merge

   Purpose: merge (append) a new structure tag into an existing structure

   Input Parameters:
      str1 - top level structure (or vector of stuctures)
      str2 - new structure to merge (becomes new tag of str1)

   Optional Keyword Parameters:
      nest_name - optional tag name (default is 1st 3 char of structure name)
      down      - switch, if set, nest str1 (str1 and str2 at same level)

 CALLS: ***
	FMT_TAG [1], FMT_TAG [2], MAKE_STR [1], MAKE_STR [2]
 CALLED BY:
	BSC_FIELD, MK_BSC_STR [1], MK_BSC_STR [2], fort2hxi [1], fort2hxi [2], his_index
	hxt_memimg, hxt_multimg, hxt_sources, hxtpix, makimg0
   History: 30-Jun-93 (SLF) - Adapt 'make_str' to MDM str_merge logic
	      7-Jul-93 (SLF) - allow vectors and assign values properly
	      8-Jul-93 (MDM) - Corrected problem when STR2 was one element
				and STR1 had several elements.
	     28-Jul-93 (SLF) - allow non-structure tages
	     29-Jul-93 (SLF) - 1 parameter option, down keyword (recursive)
            20-Nov-02 (Zarro) - fixed potential IDL >5.4 structure array problem
                                and duplicate tag names when using /nest
   Calling Sequence:
      newstr=str_merge(str1, str2 [,nest_name=nest_name, /down])

   Calling Examples:
      newstr=str_merge(str1,str2)	 ; str2 becomes new tag of str1
      newstr=str_merge(str1)		 ; nests str1 one level down
      newstr=str_merge(str1,str2,/down) ; same and then merges str2

   Method: uses make_str to assure uniq structure names


str_near $SSW/gen/idl/string/str_near.pro
[Previous] [Next]
 Project     : VSO

 Name        : str_near

 Purpose     : Find nearest string element to input token
               (useful for finding files nearest in time to time-based
                filenames)

 Category    : utility string

 Syntax      : IDL> near=str_nearest(input,token)

 Inputs      : INPUT = input string array
               TOKEN = string token 

 Outputs     : NEAR = index of INPUT element nearest TOKEN

 Keywords    : ERR = error string

 CALLS: ***
	BSORT [1], BSORT [2], BSORT [3], BSORT [4], IS_STRING
 History     : 28-Dec-2005, Zarro (L-3Com/GSFC) - written

 Contact     : DZARRO@SOLAR.STANFORD.EDU


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

   Purpose: return string array which contains all permutations of
	     the concatenation of arr1 and arr2
      
   Input Parameters:
      arr1, arr2 - arrays to concatenate

 CALLS: ***
	MKDARR [1], MKDARR [2]
 CALLED BY:
	dbase2disk, dir_list [1], dir_list [2], flares2disk, goes3sec_copy, mo_check
	mo_filelist, trace_files
   History:
      slf 1-apr-93


STR_PICK $SSW/gen/idl/string/str_pick.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : STR_PICK()
               
 Purpose     : Extract a substring bounded by given characters.
               
 Explanation : Given an input string and two bounding characters (or
               substrings), the function returns the extracted substring.  
               Default delimiters are first and second spaces.  
               If only one is given then substring returned
               is from there to the end of the string. If both characters
               are specified and one of them does not exist then a null
               string is returned.
               
 Use         : IDL> text = str_pick(in_text, char1, char2)

               eg print, str_pick('this is <crazy>.', '<','>')

                        --->  crazy
    
 Inputs      : in_text  -  string from which to extract
               
               
 Opt. Inputs : char1 - left boundary character (or substring)
               char2 - right boundary character (or substring)
               
 Outputs     : Function returns extracted substring
               
 Opt. Outputs: None
               
 Keywords    : INC_FIRST - include first substring in output
               INC_LAST  - include last substring in output

 Calls       : Standard str_ routines
 CALLED BY:
	CAT_DURATION, CAT_FITS, CDS_AR_OBS, GIS_HV_CAL, GT_FPOINT, LIST_FITS, LOAD_TP_STRUCT
	MK_HEAD_CAT, MK_STUDY, SHOW_FITS_HDR, SHOW_SYNOPTIC
 Common      : None
               
 Restrictions: None
               
 Side effects: None
               
 Category    : Util, string
               
 Prev. Hist. : None

 Written     : C D Pike, RAL, 27-Mar-95
               
 Modified    : Allow boundaries to be substrings.  CDP, 10-Apr-95
               Allow array inputs and add keywords.  CDP, 24-Apr-97
               Long the loop counter.  CDP, 14-Jul-97

 Version     : Version 4, 14-Jul-97


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

 Category: HESSI, UTIL

 Purpose: Convert a units string with exponentials [ to/from ] [ IDL plot
 	control format / FITS format ].  A units string of 'keV cm**(-2)' becomes
 	'keV cm!U-2!N', or vice versa.

 Calling sequence:  new_units_string = str_pow_conv( input, 'FITS' )

 Inputs:
 	input - string to be converted

 Input keywords:
 	IDL_PLOT - set if converting from FITS style string to IDL plot unit string
 	FITS - set if converting from IDL plot style string to FITS unit string
 Output keywords:
 	ERR_MSG = error message.  Null if no error occurred.
 	ERR_CODE - 0/1 if [ no error / an error ] occurred during execution.

 Calls: ***
	ARR2STR [1], Arr2Str [2], STR2ARR [1], STR2ARR [2], STR_CHUNK
 CALLED BY:
	HSI_RD_FITS_SPECTRUM, hsi_spectrum__filewrite, plotman
 Restrictions:
 	Components of the units string must be separated by spaces.  If a units string
 	of the form 'counts cm**(-2)keV**(-1)s**(-1)' is passed, only the first
 	occurrence of the control characters will be converted, and even that may
 	not be converted properly.

 Written: Paul Bilodeau, RITSS / NASA-GSFC, 18-May-2001


str_replace [1] $SSW/gen/idl/string/str_replace.pro
[Previous] [Next]
   Name: str_replace

   Purpose: replace all occurences of a substring with a replacement 
	     if no replacement string is specified, a NULL is inserted 

   Input Parameters:
      source - source string (vector ok) 
      insub - target string for replace
      outsub - replacement string - default is NULL String (per 2001 mod)
               (pre 2001 default was a BLANK)

   Calling Example:
      new=str_replace(strings,'old','new') ; 
      new=str_replace(strings,'asdfa,' ')  ; replace 'asdfa' with ' '
      new=str_replace(strings,'x','')      ; remove 'x' (-> null)
      new=str_replace(strings,'x')         ; same (default=NULL)

 CALLS: ***
	ARR2STR [1], Arr2Str [2], STR2ARR [1], STR2ARR [2]
 CALLED BY:
	ACOPY [1], ADD_METHOD, BREAK_FILE [1], BREAK_FILE [3], BSC2BSD, CACHE_LIST
	CACHE__DATA, DISPLOI_MON5K, EIS_ITOOL_STC [1], EIS_ITOOL_STC [2], EIT__DEFINE
	FIND_CAT, FIND_COMPRESSED, FIX_DATE, FIX_IAP, FTP__DEFINE, GET_SSWDB
	GET_SUMER_FILES, GET_SUMER_FLAT, HTTP__DEFINE, KANZ__DEFINE, LATEST_SFDS_GIF
	LIST_FILE, LOC_FILE [2], MAKE_BROWSE [1], MK_SUMER_DBASE, ParsKey, ROUND_TIME
	SITE__DEFINE, SOCK_FIND, SOCK_SSW, SPEX__DEFINE, SSEL_DATCOL, SSW_LAST_UPDATE
	STRIP_ARG, STR_FIND, STR_MATCH, SYNOP_DEFINE, UTPLOT [1], UTPLOT [2], UTPLOT [3]
	UTPLOT [4], UTPLOT [5], WHERE_VAL, Y2KFIX, break_file [4], cdrom_files [2]
	cfl_summary [1], cfl_summary [2], ch_ss, check_compile [1], check_compile [2]
	chk_flares [1], chk_flares [2], chk_pointing, configure_http, ctraj2orbit
	daily_forecast [2], data2files, db_gbo, def_save, def_tapd [1], def_tapd [2]
	def_tapd [3], dir_exist [1], dir_exist [2], dir_since, disp_sci5k, doc1liners
	dps_proc_lev0_hk, eis_acronym_input_gui, eis_get_study_descriptions_path [1]
	eis_get_study_descriptions_path [2], eis_import_acronym_gui
	eis_import_title_gui, eit_files, eit_fulldiskdb, eit_genx_cat, eit_mirror
	eit_proton_summary, event_movie [1], event_movie [2], extract_val, file_list [1]
	file_list [2], file_purge [1], file_purge [2], file_uncompress [1]
	file_uncompress [2], fits_interp, fitshead2struct, fix_path, fix_slash
	full_graph_gif, genx2html [1], genx2html [2], get_ads [1], get_ads [2]
	get_atomic [1], get_atomic [2], get_dn_rate [1], get_dn_rate [2], get_eit_data
	get_gevloc_data, get_hk_info [1], get_hk_info [2], get_last_tfr, get_sirius [1]
	get_sirius [2], get_subdirs [1], get_subdirs [2], get_xfont [1], get_xfont [2]
	get_ydbhelp [1], get_ydbhelp [2], go_sxt_sss2secondary, go_yo_prod_batch
	goes_gaps, gt2exe [1], gt2exe [2], gzip, hsi_format_flare, hsi_get_flare_flags
	hsi_image_plot, hsi_ui_img, html_basics, html_doc, html_form_addtime [1]
	html_form_addtime [2], html_form_addtime [3], html_get_files
	html_remove_template, http_names, id2nam, ihy_db, image2movie, image_summary
	ip_que_dmpver, jitter_gif_xyimg, last_lc, lastgbo, lastsfd [1], lastsfd [2]
	les_archive_info, make_32 [2], make_mirror, make_ssw_mirror, map_env2dir
	mk_ascii_list, mk_bad_pix_map_load, mk_dpc_image, mk_formt_html [1]
	mk_formt_html [2], mk_formt_html [3], mk_gev [1], mk_gev [2], mk_gx
	mk_hst_summary, mk_imgsum_html, mk_lasteit_movie, mk_limb_pixmap, mk_mdi_fits
	mk_nar [1], mk_nar [2], mk_obs_str, mk_orbit [1], mk_orbit [2], mk_pix [1]
	mk_pix [2], mk_pubydb, mk_query [1], mk_query [2], mk_query_genx, mk_sdm, mk_sfc [1]
	mk_sfc [2], mk_spd, mk_ssc_batch [1], mk_ssc_batch [2], mk_sumer_dbase_ff, mk_sxh
	mk_syn_sfc [1], mk_syn_sfc [2], mk_synsfc_coeff [1], mk_synsfc_coeff [2]
	mk_trace_i0, mk_week_file [1], mk_week_file [2], mk_ydbtab, mktap_prep, mo_patch
	mon_sci5k, mreadfits_header, netscape_control, new_disp_sci5k [1]
	new_disp_sci5k [2], password_info, path_data [1], path_data [2], path_sw [1]
	path_sw [2], plot_goesp, pref_super, raw_list2pixmap, rd_goesp_ascii, rd_hk [1]
	rd_hk [2], rd_rasm, rd_rdb [1], rd_rdb [2], rd_sumer [1], rd_sumer [2]
	rd_therm_rs232, rd_week_file [2], rd_ydbtap, read_eit, read_hessi_4_ospex
	read_msok_jpg, read_spartan, read_xsm_4_ospex, redo_disploi, redo_mon_sci5k
	reg_check, rename [1], rename [2], rep_logenv, safe_log10, save_idl_routines
	savegenx, selsis_copy [1], selsis_copy [2], selsis_week, set_logwindows
	show_pix [1], show_pix [2], soon_cadence, soon_catstat, soon_com2html
	soon_search_www, spartan_pb2fits, spartan_roll2fits [1], spex_hessi_fits2drm
	spex_image__define, sprint, ssw_addmm_gen, ssw_check_contrib, ssw_conflicts
	ssw_findstuff2html, ssw_install [1], ssw_install [2], ssw_kyoto2dst, ssw_move
	ssw_path, ssw_post_query, ssw_set_instr, ssw_start_rpcserver, ssw_swmap_bestof
	ssw_swmap_info, ssw_time2paths, ssw_upgrade [1], ssw_upgrade [2]
	ssw_upgrade_backup, sswdb_files, sswdb_info, sswdb_install, sswdb_upgrade, sswloc
	str2html [1], str2html [2], str2html [3], strcapitalize [1], strcapitalize [2]
	strlist2html [1], strlist2html [2], strrempat [1], strrempat [2], sxi_files
	sxt2file, sxt2mpeg, sxt_html, sxt_plan, sxt_prep [1], sxt_prep [2], sxt_prep [3]
	sxt_prep_exe, sxt_ssc2sss, sxt_ssn2fits [1], synop_link, sysprint [1]
	sysprint [2], teambb [1], teambb [2], thumbnail_table_html, timeline, topsdb [1]
	topsdb [2], tr_list_frames, tr_rd_inventory, tr_reformat, trace_cosmic2filename
	trace_do_data_requests, trace_dph2struct [1], trace_files, trace_jpeg_decomp
	trace_last_movie [1], trace_last_movie [3], trace_make_tma, trace_make_tmr [1]
	trace_make_tmr [2], trace_make_tsma, trace_request_summary
	trace_special_movie [1], trace_special_movie [2], trace_special_movie [3]
	trace_special_movie2, trace_submit_request, trace_success_file
	trace_uniq_movies, trace_wavename2num, trace_write_genxcat, uncompress
	url_decode, url_encode, valid_pass4 [1], valid_pass4 [2], web_seq, weekid [1]
	weekid [2], weekid [3], which_hessi_version, write_trace, wrt_fits_bin_exten [2]
	wrt_sci160k_img, xanal_emi, xdisp_fits, xdisp_sci5k, xdisp_tfr, xdisp_trace [1]
	xdisp_trace2, xdisp_trace3, xset_chain [1], xset_chain [2], xspr [1], xspr [2]
	xsxt_prep_event, ydb_exist [2], ydb_use, yo_index2path, yo_xda2legacy, yoyo_man2
	ys_contrib [1], ys_contrib [2]
   History: slf, 11/19/91
            slf, 19-mar-93	; optimize case where insub and outsub
				; are each 1 character in length
	     mdm, 21-Jul-97	; patch to handle big arrays
            fz,  12-May-98     ; change loop variable to long
            Zarro (EITI/GSFC), 17-Mar-01, used STRPOS instead of WHERE
            when checking for delimiters
            26-Jul-2005 - S.L.Freeland - DOCUMENTATION ONLY
                          changed Documented default delimiter from blank 
                          to null since the CODE default was changed in 
                          the 2001 modification
            Zarro (L-3Com/GSFC), 23-Oct-05; protect against insub/outsub 
                          coming in as vectors


STR_SEP $SSW/gen/idl/string/str_sep.pro
[Previous] [Next]
 NAME:
    STR_SEP

 PURPOSE:
    This routine cuts a string into pieces which are separated by the 
    separator string.
 CATEGORY:
    String processing.
 CALLING SEQUENCE:
    arr = STR_SEP(str, separator)

 INPUTS:
    str - The string to be separated.
    separator - The separator.

 KEYWORDS:
    ESC = escape character.  Only valid if separator is a single character.
		Characters following the escape character are treated
		literally and not interpreted as separators.
		For example, if the separator is a comma,
		and the escape character is a backslash, the character
		sequence 'a\,b' is a single field containing the characters
		'a,b'.
    REMOVE_ALL = if set, remove all blanks from fields.
    TRIM = if set, remove only leading and trailing blanks from fields.

 OUTPUT: 
    An array of strings as function value.

 CALLED BY:
	ADD_MISSING_BLOCKS, ADD_PATH [1], ADD_PATH [2], ANALYZE [1], ANYNAME2STD
	ANYTIM2UTC [1], ANYTIM2UTC [2], APPLY_CDS_ADEF, BASFIT, BATSE_TIME_INPUT
	BREAK_PATH [1], BREAK_PATH [2], BREAK_PATH [3], CDD, CDS_GEN_HELP, CDS_MOSAIC
	CDS_SLINE_DATA, CDS_SLIT6_BURNIN, CDS_WAVE_LABEL, CENTER_NRH2, CNVRT_MSPTIME
	COMP_DATE, CONGRID [2], CREATE_NRH_CFILE, CREATE_NRH_PFILE, CTRL_NRHFILE
	CWF_COMPONENT, CWF_STATUS, CWQ_SPECTR [1], CW_CUBEVEIW, CW_REGION
	Create_update_tar, DISPLAY_CDS_BURNIN, DMY2YMD, DN_FILE, DSPEXP, DSP_AUX, DSP_WAV
	EIS_CPT_OBSTBL_MAP_DESCRIPTION [1], EIS_CPT_OBSTBL_MAP_DESCRIPTION [2]
	EIT_CATRD [1], EIT_DISPLAY, EIT_SUBFIELD, EIT_SUB_FIXOFF, EIT_SUB_MAN_INPUT
	EIT_SUB_SC_PIXEL, ERROR_MESSAGE, FILE_DATE_MOD, FIND_CDS_STUDIES
	FIND_WITH_DEF [1], FIND_WITH_DEF [2], FIND_WITH_DEF [3], FLAREMETER
	FORM_FILENAME [1], FORM_FILENAME [2], FSC_COLOR [1], FSC_COLOR [2], FSC_FIELD
	FSC_PLOTWINDOW, FSC_PSCONFIG__DEFINE, GET_CROTA, GET_OBS_DATE, GET_REGN
	GET_SUMER_FLAT, GET_WIDTH_CORR, GHOST_BUSTER, GIFDIR2JPG24, HMS, HV_FINDER
	IDL_ROUTINE, INTEGRAL_CALC, INTGCOMP_NRH2, ION2SPECTROSCOPIC, ITOOL_GET_TIME
	LEC1D, LECDESCR, LIT_HEADER_NRH1, LZ_DISK_INIT [2], LZ_START_DATE [2]
	LZ_START_DATE3, MENUBCKGRD, MENUCALCFLUX1D, MENUCALCPOS2D, MENUSHIFTRH1D
	MENUTRACEISOPH, MENUTRACEPROF, MENUVERIF, MOD_NRHFILE, NRH_FOPEN, NRH_HSI_FITS
	OCCLTR_CNTR, OVIEW2WEB, PARCHECK, PARSE_GROSSC_ATTITUDE, PEEK, PICKFITS
	PICKFONT  use to be XFONT, PLOT_ASC, PLOT_HT, PLOT_ZOOM, POP_SOLVER, PRINTMSG
	PROGRESSBAR__DEFINE, QUICKLOOK, RATIO_PLOTTER [1], READ_ANALIST, READ_GDFILE_GD
	READ_NIMCP_CAL, REDUCE_IMG_HDR, REDUCE_LEVEL_1, REGION_EVENT, REMOVE_PATH
	REM_MULT_CHAR, RM_PATH [1], RM_PATH [2], RTMOVIE, RTMVI [1], SCHEDULE, SELECT_DEV
	SEP_FILENAME, SET_GRAPHICS [1], SET_GRAPHICS [2], SFITSLIST, SHIFTRH1D, SOL2TXT
	SOLAID, SOLB_READ_REPOINT [1], SOLB_READ_REPOINT [2], SPECTROSCOPIC2ION
	SPEX_ENV [2], SPEX_ENV [4], SPEX_ENV [5], SPEX_HANDLES [1], SPEX_HANDLES [2]
	SPEX_PLOT_SAVED [1], SPEX_PLOT_SAVED [2], SPEX_SAVE_DATA [1]
	SPEX_SAVE_DATA [2], STDNAME2USER, STR2UTC [1], STR2UTC [2], STR2UTC [3], STRUNF
	STR_CHOP, SUBFIELD_EV, SUBMIT_CAP, SUBMIT_IAP, SUN_IMAGE, TEXT_MATCH, TFTD, TOP20
	TVIMAGE [3], TVSCALE [1], TVSCALE [2], TWO_PHOTON, UPDATE_MPG, UPD_NRH2DFITS
	UVALUE_REGION, VDS_BURNIN_NEW, VDS_BURNIN_ORIG, WDIALOG_HISTORY, WHICH
	WRITE_IN_BOX, XCALENDAR, XCDS_ANALYSIS, XCFIT_BLOCK, XCME_MES, XCROP_CUBE, XDIFF
	XEDITFRAME, XPLOT_HT, XRECORDER, XSTARTHT, ch_ss
	cmap2gif ftsfile maxdmind ROOTroot CONTROLcontrol, convertname
	cwq_spectr [2], display_jpg, dsp_menu, eit_files, filename2time, fits_interp
	get_ovsa_log, hsi_rd_grid_parm_table, lists2matrix [2], mees_log_read
	mees_name_format, mk_query [1], mk_query [2], mk_query_genx, mk_sumer_dbase_ff
	model_to_score_params, ratio_plotter [2], read_ftp, read_ps [2], sec_name_format
	self_help, set_logvms, setssw_windows, spex_spec_plot [1], spex_spec_plot [2]
	spex_spec_plot [3], spex_spec_plot [4], ssw_setup_windows, sumer_ffdb
	synthetic_plot, togglecolorcolorlandscapelandscapeportraitportrait
 COMMON BLOCKS:
    None

 SIDE EFFECTS:
    No known side effects.

 RESTRICTIONS:
    None.

 EXAMPLE:
    array = STR_SEP ("ulib.usca.test", ".")

 MODIFICATION HISTORY:
	July 1992, AH,	CreaSo		Created.
	December, 1994, DMS, RSI	Added TRIM and REMOVE_ALL.


STR_SIZE [1] $SSW/gen/idl/string/str_size.pro
[Previous] [Next]
 NAME:
  STR_SIZE

 PURPOSE:

  The purpose of this function is to return the proper
  character size to make a specified string a specifed
  width in a window. The width is specified in normalized
  coordinates. The function is extremely useful for sizing
  strings and labels in resizeable graphics windows.

 AUTHOR:

   FANNING SOFTWARE CONSULTING
   David Fanning, Ph.D.
   1645 Sheely Drive
   Fort Collins, CO 80526 USA
   Phone: 970-221-0438
   E-mail: davidf@dfanning.com
   Coyote's Guide to IDL Programming: http://www.dfanning.com/

 CATEGORY:

  Graphics Programs, Widgets.

 CALLING SEQUENCE:

  thisCharSize = STR_SIZE(thisSting, targetWidth)

 INPUTS:

  thisString:  This is the string that you want to make a specifed
     target size or width.

 OPTIONAL INPUTS:

  targetWidth:  This is the target width of the string in normalized
     coordinates in the current graphics window. The character
     size of the string (returned as thisCharSize) will be
     calculated to get the string width as close as possible to
     the target width. The default is 0.25.

 KEYWORD PARAMETERS:

  INITSIZE:  This is the initial size of the string. Default is 1.0.

  STEP:   This is the amount the string size will change in each step
     of the interative process of calculating the string size.
     The default value is 0.05.

  XPOS:   X position of the output test string. This can be
     used on the Postscript device, where no pixmap windows are
     available and where therefore the test strings would appear on
     the printable area. Default is 0.5 on most devices. If !D.NAME
     is PS, the default is 2.0 to draw the test string out of the
     drawable window area.

  YPOS:   Y position of the output test string. This can be
     used on the Postscript device, where no pixmap windows are
     available and where therefore the test strings would appear on
     the printable area. Default is 0.5 on most devices. If !D.NAME
     is PS, the default is 2.0 to draw the test string out of the
     drawable window area.

 OUTPUTS:

  thisCharSize:  This is the size the specified string should be set
     to if you want to produce output of the specified target
     width. The value is in standard character size units where
     1.0 is the standard character size.

 CALLED BY:
	eis_plot_spectrum [1], eis_plot_spectrum [2]
 EXAMPLE:

  To make the string "Happy Holidays" take up 30% of the width of
  the current graphics window, type this:

      XYOUTS, 0.5, 0.5, ALIGN=0.5, "Happy Holidays", $
        CHARSIZE=STR_SIZE("Happy Holidays", 0.3)

 MODIFICATION HISTORY:

  Written by: David Fanning, 17 DEC 96.
  Added a scaling factor to take into account the aspect ratio
     of the window in determing the character size. 28 Oct 97. DWF
  Added check to be sure hardware fonts are not selected. 29 April 2000. DWF.
  Added a pixmap to get proper scaling in skinny windows. 16 May 2000. DWF.
  Forgot I can't do pixmaps in all devices. :-( Fixed. 7 Aug 2000. DWF.
  Added support of PostScript at behest of Benjamin Hornberger. 11 November 2004. DWF.


STR_SPACE $SSW/gen/idl/string/str_space.pro
[Previous] [Next]
 Project     : SOHO - CDS

 Name        : STR_SPACE

 Purpose     : Break up a string array with spaces between elements 
               into an array of separate pieces without spaces.

 Category    : Utility

 Explanation : 

 Syntax      : IDL> new=str_space(array)

 Inputs      : ARRAY = array to break

 Opt. Inputs : None

 Outputs     : NEW = new string array

 Opt. Outputs: None

 Keywords    : None

 CALLS: ***
	BOOST_ARRAY [1], BOOST_ARRAY [2], BOOST_ARRAY [3], DATATYPE [1], DATATYPE [2]
	DATATYPE [3], DELVARX [1], DELVARX [2], DELVARX [3], DELVARX [4], EXIST, TRIM
	delvarx [5]
 CALLED BY:
	FIX_IAP
 Common      : None

 Restrictions: None

 Side effects: None

 History     : Version 1,  25-May-1997,  D.M. Zarro.  Written

 Contact     : DZARRO@SOLAR.STANFORD.EDU


str_sub2top $SSW/gen/idl/struct/str_sub2top.pro
[Previous] [Next]
 Name: str_sub2top

 Category: UTIL

 Purpose:
 Move all structure tags to the top level, removing pointers and object
 references while recursing on nested structures.  Nested structure fields
 are moved to the top-level with their names appended to the parent structure
 name with a '$$' as a separator.  Named structures have their name,
 prepended by '_$_', used as the prefix for their tags.

 Calling sequence:  top_struct = str_sub2top( my_struct )

 Input:
 struct - structure of interest for de-nesting

 Output:
 top-level structure, or -1 if an error occurred

 Input keywords:

 Output keywords:
 ERR_MSG - string containing error message.  Null if no errors occurred during
   execution.
 ERR_CODE - 0/1 if no error/ an error occurred during execution.

 Calls: ***
	ADD_TAG [1], ADD_TAG [2], APPEND_ARR, REM_TAG [1], REM_TAG [2], REP_TAG_NAME
 CALLED BY:
	FITS WRITER CLASS FOR RHESSI IMAGES, HESSI IMAGE FILE CLASS DEFINITION [1]
	hsi_params_2_top_struct
 Modification History:
       9-May-2002,  Paul Bilodeau - now store names of named structures.
       25-Jun-2002, Paul, Kim - speed up by storing tags to remove, and if test in else
	23-Jan-2003, Kim - corrected error for named structures by replacing rem_tag and
	                   add_tag with rep_tag_name
       07-Oct-2004, Andre Csillaghy - Make it work for array of structures.


str_subset $SSW/gen/idl/struct/str_subset.pro
[Previous] [Next]
   Name: str_subset

   Purpose: generate a (smaller) structure with a subset of selected tags

   Input Parameters:
     instructs - the parent structure(s)
     taglist   - list of tag names to include (or exclude) in output structure
                 (string array, comma delimited string, or template structure)

   Keyword Parameters:
     version   - optional structure version number to include (float)
     exclude   - if set, TAGLIST is list of tags to EXCLUDE
     quiet       - if set, doesn't print message about no tags matching
     status     - returns 0 if no tags matched, 1 otherwise
     regex     - if set, uses regular expression to
                 select the subset of tags

   Calling Sequence:
      smallstr=str_subset(bigstruct, taglist [,/exclude] [,version= nn.] )

   Calling Examples:
   IDL> new=str_subset(eitstruct,'filename,wavelnth,filter,object,date_obs')
   IDL> help,new,/str
        ** Structure MS_232241394011, 5 tags, length=72:
        DATE_OBS        STRING    '1997-04-30T00:20:22.000Z'
        FILENAME        STRING    'efr19970430.002022'
        OBJECT          STRING    'full FOV'
        WAVELNTH        INT            195
        FILTER          STRING    'Clear'

 CALLED BY:
	FRAME ABSTRACT CLASS DEFINITION, FRAMEWORK ABSTRACT CLASS DEFINITION
	HESSI IMAGE FILE CLASS DEFINITION [1]
	HESSI IMAGE STRATEGY CLASS DEFINITION, HESSI PACKET FILE ABSTRACT CLASS
	HSI_SPECTROGRAMCHAN_OVERLAP_FIX, HSI_SPECTROGRAM_DECIM_CORRECT
	HSI_SPECTROGRAM_DECIM_TABLE, HSI_SPECTRUM__DEFINE
	SPECTROGRAM CLASS DEFINITION, SPECTRUM CLASS DEFINITION, SPEX__DEFINE
	STRUCTURE MANAGER CLASS, XSET_STRUCT, align_label, hsi_image__getaxis [2]
	hsi_image_raw__define, hsi_spectrogramACCBIN [2]
	hsi_spectrogram__define [1], hsi_spectrogram__define [2]
	hsi_spectrogram__define [3], hsi_spectrogram__get_obs [1]
	hsi_spectrogram__livetime [1], img_sumtr2, make_mirror, mdi_write_genxcat
	mreadfits_header, mwritefits, read_hessi_4_ospex_params, read_trace
	ssw_findstuff_struct, struct2ssw, trace_write_genxcat
   History:
      6-may-1997 - S.L.Freeland
		31-Aug-2000 - Kim Tolbert.  Added quiet and status
                             keywords
               01-Sep-2004 - Andre Csillaghy. Added regex keyword
               10-mar-2005 - S.L.Freeland - raised the Version# cutoff
                             on 1-sep-2004 enhancment (>5.3)
               16-mar-2005 - S.L.Freeland - per Andre C suggestion, quoted the
                             10-mar-2005 Version number...
               23-mar-2005 - Andre - Corrected to work properly with
                             structure arrays and tag arrays

   Calls: ***
	FMT_TAG [1], FMT_TAG [2], MAKE_STR [1], MAKE_STR [2], SINCE_VERSION [1]
	SINCE_VERSION [2], STR2ARR [1], STR2ARR [2], UNIQ [1], UNIQ [2], UNIQ [3]
	data_chk [1], data_chk [2], is_member [1], is_member [2], is_number [1]
	is_number [2], wc_where_arr, where_arr [1], where_arr [2]
   Restrictions:
      nested structure handling only for Version>=5.4


str_tagarray2scalar $SSW/gen/idl/struct/str_tagarray2scalar.pro
[Previous] [Next]
NAME:
   str_tagarray2scalar

PROJECT:
   PHOENIX

CATEGORY:
   Structure handling

PURPOSE:
   Transforms a structure that contains tag arrays into a structure
   that contains tag scalar, for a specific index value. 

   This is useful to extract values for keyword parameters catched
   within the _extra structure. See examples.

CALLING SEQUENCE:
   scalar_struct = str_tagarray2scalar(array_struct, index)

INPUT:
   array_struct: a structure containing tag arrays
   index: the index in the array to extract the scalar

KEYWORDS:
   none yet

 CALLS: ***
	REP_TAG_VALUE
 CALLED BY:
	HSI_SPECTROGRAMCHAN_OVERLAP_FIX, HSI_SPECTROGRAM_DECIM_CORRECT
	HSI_SPECTROGRAM_DECIM_TABLE, SPECTROGRAM CLASS DEFINITION
	hsi_spectrogramACCBIN [2], hsi_spectrogram__define [1]
	hsi_spectrogram__define [2], hsi_spectrogram__define [3]
	hsi_spectrogram__get_obs [1], hsi_spectrogram__livetime [1], spectro_plot
	spectrogram__define
EXAMPLE:
   extra = {first_keyword: [0,1,2,3,4], $
            second_keyword: [7,5,4,3,2], $
            third_keyword: 1}
 
   help, str_tagarray2scalar( extra, 3 ), /str
** Structure <84c258c>, 3 tags, length=6, data length=6, refs=1:
   FIRST_KEYWORD   INT              3
   SECOND_KEYWORD  INT              3
   THIRD_KEYEORD   INT              1

HISTORY:
        acs march 2005 - extracte from spectro_plot weher it was usted internally


str_taginfo $SSW/gen/idl/struct/str_taginfo.pro
[Previous] [Next]
   Name: str_taginfo

   Purpose: return info about all tags in the input structure

   Input Parameters:
      structure - structure containing tags of interest

   Output Parameters:
      function returns specified information:
         info specified by keyword (TYPE (default), NDIMENSION, etc)
         *OR* boolean (STRING, STRUCTURE, etc) if tag is of specified type
              [function output is always vector of length = (ntags(structure))]

      bcnt - (booleans only) - count of TRUE values

   Keyword Parameters:
      TYPE -       if set, return IDL data type of tag (per IDL SIZE function)
      NDIMENSION - if set, return number of dimensions (size(tag))(0)
      STRING     - if set, boolean (1 if corresponding tag is string, 0 otherwise)
      STRUCTURE  - if set, boolena (1 if corrsponding tag is structure...)
      NOTT       - if set, invert boolean
      ss (output)- boolean - tag indices where true

   Calling Sequence:
      info=str_taginfo(structure [,/type, /ndimension]
      truth=str_taginfo(structure [,/string, /struct, count)

   Calling Examples:
      tagtypes=str_taginfo(structure,/type)                  ; TYPES
      stringchekc=str_taginfo(structure,/string,count)       ; strings?
      notstructs=str_taginfo(structure,/struct,/nott,count)  ; not structures?

   16-aug-1996 - S.L.Freeland
   24-Sep-1998 - S.L.Freeland - fixed typo per RAS suggestion
 CALLS:
 CALLED BY
	TAG_DEREFERENCE struct, mwritefits


str_tagval [1] $SSW/gen/idl/struct/str_tagval.pro
[Previous] [Next]
   Name: str_tagval

   Purpose: return value stored in specified tag - (nested N-deep struct OK)

   Input Parameters:
      item       - structure
      tag/field  - tag to search for
      
   Optional Keyword Parameters:
      str_pattern (input)  - optional match pattern in structure name
      struct 	   (output) - structure name at match level 
      level       (output) - nest level where match found 
		   [ -1 -> not found, 0 -> top level, 1 -> nested one down, etc)
      found       (output) - boolean found? (level ne -1)

      (rfound&recurse - for internal use only)
		                                           
   Calling Sequence:
      tag_val=str_tagval(item, tagname [,str_patt='pattern', struct=struct, $
					level=level)

   Calling Examples:
      tagval=str_tagval(structure,/tagname, level=level) ; via keyword inherit
      tagval=str_tagval(structure,'tagname',level=level)
      tagval=str_tagval(index,'periph',str_pattern='sxt',level=level)
      tagval=str_tagval(rmap ,'periph',str_pattern='sxt',level=level)

   Method:
      recursive for nested structures

 CALLS: ***
	data_chk [1], data_chk [2], tag_index [1], tag_index [2], wc_where [1]
	wc_where [2]
 CALLED BY:
	fitsgen, gt_EITfilter, gt_EITsector
   Restrictions:
     need to add case where item is FITS header (call WT routine)
     
   History:
      Circa 1-dec-1995 S.L.Freeland
      15-aug-1996      S.L.Freeland add FOUND keyword (gt_tagval compat)
      28-oct-1996      S.L.Freeland allow TAG via keyword inheritance


str_top2sub $SSW/gen/idl/struct/str_top2sub.pro
[Previous] [Next]
 Name: str_top2sub

 Category: UTIL

 Purpose:
 Recreate a nested structure that was de-nested with str_sub2top.
 The delimiter expected for substructures is '$$' between valid
 structure tag names.  Named structures are expected to have '_$_'
 before the name, followed by '_$' and the tag names of the structure.

 Calling sequence:  struct = str_top2sub( my_struct )

 Input:
 top - structure of interest for re-nesting.

 Output:
 structure, or -1 if an error occurred

 Input keywords:

 Output keywords:
 ERR_MSG - string containing error message.  Null if no errors occurred during
 	execution.
 ERR_CODE - 0/1 if no error/ an error occurred during execution.

 Calls: ***
	ADD_TAG [1], ADD_TAG [2], APPEND_ARR, REM_TAG [1], REM_TAG [2], TRIM, UNIQ [1]
	UNIQ [2], UNIQ [3]
 CALLED BY:
	HESSI IMAGE STRATEGY CLASS DEFINITION, hsi_image__getaxis [2]
	hsi_image_fitsread, hsi_spectrum_fitsread, read_hessi_4_ospex_params
 Modification History:
        9-May-2002, Paul Bilodeau - now recreates named structures.
	26-Jul-2004, Kim.  When recreating named structures, if there's an error (like
	  no xxx__define file for that named structure, previously would return -1.  Now
	  returns the rest of the structure that it could handle - just won't include the
	  substructures with the error.  No message will be printed - have to look at err_msg
	  returned.
        6-Jul-2005, Andre / Kim modifs to make it work with sunstrcutures that contain arrays
         as well as corrected a case where it returned -1 instead of the structure


STR_TRAIL $SSW/gen/idl/string/str_trail.pro
[Previous] [Next]
 Project     : HESSI                                                            
                                                                                
 Name        : STR_TRAIL                                                        
                                                                                
 Purpose     : remove a trailing item from a string                             
                                                                                
 Category    : system utility string                                            
                                                                                
 Syntax      : IDL> out=str_trail(value,item)                                   
                                                                                
 Inputs      : VALUE = string value (can be array) [e.g. pub/]                  
               ITEM  = end item to remove (can be array)) [e.g. /]              
                                                                                
 Outputs     : OUT = trimmed string [e.g. pub]                                  
                                                                                
 Keywords    : COUNT = matching count                                           
               MATCHING = strings                                               
                                                                                
 CALLS: ***
	ARR2STR [1], Arr2Str [2], IS_BLANK
 CALLED BY:
	FTP__DEFINE, LIST_DIR, LIST_FILE, STRUCTURE TO VOTABLE, fix_path
 History     : Written, 6-March-2000, Zarro (SM&A/GSFC)                         
               Modified, 30-May-2006, Zarro (L-3Com/GSFC) - vectorized          
                                                                                
 Contact     : dzarro@solar.stanford.edu                                        


str_ver_update [1] $SSW/gen/idl/genutil/str_ver_update.pro
[Previous] [Next]
NAME:
	str_ver_update
PURPOSE:
	Allow old structures to be copied to new structure definitions
	where the tag names match.
INPUT:
	str	- old structure
	ref_str	- reference structure type which should have the data
		  copied over to
OUTPUT:
	returns	- a structure of type "ref_str" with the contents of
		  "str" copied into it.
 CALLS: ***
	str_copy_tags [1], str_copy_tags [2], str_copy_tags [3], str_copy_tags [4]
 CALLED BY:
	RD_BDA_DP
RESTRICTIONS:
	It assumes that the general organization of the two structures
	is close and that only a few tags do not match.
HISTORY:
	Written 10-Nov-91 by M.Morrison


strarrcompress $SSW/gen/idl/string/strarrcompress.pro
[Previous] [Next]
   Name: strarrcompress

   Purpose: remove null elements from string arrays (1D 2D)

   Input Paramters:
      strarray - string array

   Keyword Parameters:
      rows    - switch (2D only) - if set, eliminate null rows
      columns - switch (2D only) - if set, eliminate null columns
      trim    - if set, trim non-null elements (leading/trailing blanks) 

   Calling Sequence:
      comparr=strarrcompress(strarr)

 CALLED BY:
	HTTP__DEFINE, READ_ANALIST, fitshead2struct, lasco_time2file, lasco_time2nrlwww
	plot_goesp, pr_his_index [1], pr_his_index [2], pr_his_index [3]
	save_idl_routines, soon_catstat, soon_table, ssw_contrib_monitor
	ssw_getcme_cactus, ssw_install_explinkages, ssw_instr_info, ssw_kyoto2dst
	ssw_swmap_uniqinfo, ssw_unspike_cube, sswdb_info, strtab2html
	trace_unspike_time, yo_xda2legacy, yohkoh_legacy_files [1]
	yohkoh_legacy_files [2]
   History:
      14-May-1996 - S.L.Freeland


strarrinsert $SSW/gen/idl/string/strarrinsert.pro
[Previous] [Next]
   Name: strarrinsert

   Purpose: insert/replace one text array into/by another at specifed delimiter

   Input Parameters:
      strdest   - destination string/text array 
      strsource - source - string/text array to be inserted->strdest
      d1 - optional delimeter - string pattern -> target for insertion
           (default is first line of <strdest> )
      d2 - optional last delimiter - in this case, text strdest(d1:d2)
           is REPLACED  by strsource

   Keyword Parameters:
      first,last,multi - in case of multple delimiter matches, these
                         EXCLUSIVE switches direct which one to use
      deldelim - if set, line with delimiter is replaced/deleted
      status - insertion/replacement success? 1=OK, 0=NOT OK
      quiet  - if set, suppress status messages

   Calling Sequence:
      newtext=strarrinsert(oldtext,newarray [,d1 , d2, /first,/last,/multi]

   Calling Example:
     newhtml=strarrinsert(curhtml,newhtml,'<!** insert here **>')

     ---- Example - Replace documentation header in ROUTINE  ---
     newrout=strarrinsert(rd_tfile(routine),newdoc,';+',';-',status=status)
     if status then file_append,routine,newrout
     ------------

   Illusrations:
   IDL> print,strarrinsert(['a','b','c','d'],['one','two'],'c')    ; << insert
        a b c one two d
   IDL> print,strarrinsert(['a','b','c','d'],['one','two'],'a','d') ;<< replace
        a one two d

 CALLS: ***
	data_chk [1], data_chk [2]
 CALLED BY:
	html_doc, html_linklist, trace_recent_movie_summary
   History:
     12-Jun-1997 - S.L.Freeland - simplify common text/html functions


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

   Purpose: capatilize first letters in Names and Titles

   Input Parameters:
      strarr - string array to capitalize
   
   Keyword Parameters:
      except     - (switch) - if set, dont capitalize 'a', 'the'
      <ANYTHING> - input - other words NOT to capitalize (any other keyword)

   Calling Sequence:
      cap=strcapitalize(strarr [,/except ,/ANYTHING])

   Calling Examples:
      cap=strcapitalize(strarr ,/is)	; dont capitlize a, the, or "is"

 CALLS: ***
	data_chk [1], data_chk [2], str_replace [1], str_replace [2]
 CALLED BY:
	hsi_select_flare, mk_formt_html [1], mk_formt_html [2], mk_formt_html [3]
	soon_catstat, timeline, web_seq
   History: 
      5-jul-1995 (SLF) - prettying up html and other documents...


STREP [1] $SSW/gen/idl/fund_lib/jhuapl/stress.pro
[Previous] [Next]
 NAME:
       STREP
 PURPOSE:
       Edit a string by position. Precede, Follow, Replace, Delete.
 CATEGORY:
 CALLING SEQUENCE:
       newstring = strep(string,cmd,p,ss,[iflg])
 INPUTS:
       string = string to edit.                               in
       cmd = edit command:                                    in
         'P' = precede position p with substring ss.
         'F' = follow position p with substring ss.
         'R' = replace text starting at position p
               with text from substring ss.
         'D' = delete N characters starting at
               position p.  The calling sequence for
               this command is slightly different:
               IFLG = STREP(string,'D',p,n,[iflg])
               Where n = number of characters to delete.
       p = character position to use.                         in
           0 = first char.  Any number larger
           than the string length = last char.
       ss = substring to use.  For 'D' command                in
            n is used instead of ss.
 KEYWORD PARAMETERS:
 OUTPUTS:
       iflg = 0 for a successful edit,                        out
       iflg = -1 for an error and no change to string.
       newstring = edited string.                             out
 CALLS: ***
	STRESS [1], STRESS [2], STRESS [3], strsub
 CALLED BY:
	CHECK_KAP_ANOMALY, FIND_CAT, FTEMAP, HEAD2STC, MK_SOHO_SETUP, PLOTFIT, STRESS [1]
	STRESS [2], STRESS [3], STRIP_WILD, STR_DEBLANK, ST_SUMER
 COMMON BLOCKS:
 NOTES:
 MODIFICATION HISTORY:
       Written by R. Sterner, 27 Dec, 1984.
       Converted to SUN 13 Aug, 1989 --- R. Sterner.
       Johns Hopkins University Applied Physics Laboratory.

 Copyright (C) 1984, Johns Hopkins University/Applied Physics Laboratory
 This software may be used, copied, or redistributed as long as it is not
 sold and this copyright notice is reproduced on each copy made.  This
 routine is provided as is without any express or implied warranties
 whatsoever.  Other limitations apply as described in the file disclaimer.txt.


STREP [2] $SSW/gen/idl/string/strep.pro
[Previous] [Next]
 Project     :	SOHO - CDS

 Name        :	STREP

 Purpose     : Replaces first occurrence of given string within a string.

 Explanation : Within the given string the routine will replace the first
               occurrence of the supplied substring with the requested
               replacement.

               eg. IDL> x = 'abcdefgcd'
                        print, strep(x,'cd','qq')  --> 'abqqefgcd'

               see also REPSTR() for replacement of all occurrences.

 Use         : Result = output=strep(input,old,new,/all)

 Inputs      :
               input=any string
               old=old characters
               new=new characters

 Opt. Inputs : None.

 Outputs     : Result = new string.

 Opt. Outputs: None.

 Keywords    : all = replace all characters

 Calls       : uses STRMID
 CALLED BY:
	CHECK_KAP_ANOMALY, FIND_CAT, FTEMAP, HEAD2STC, MK_SOHO_SETUP, PLOTFIT, STRESS [1]
	STRESS [2], STRESS [3], STRIP_WILD, STR_DEBLANK, ST_SUMER
 Common      : None.

 Restrictions: None.

 Side effects: None.

 Category    : String processing

 Prev. Hist. : None.

 Written     :	DMZ (ARC) August 1993

 Modified    : Documentation header update.  CDP, 26-Sep-94

 Version     : Version 2, 26-Sep-94
               Version 3, 8-Jun-98, Zarro (SAC/GSFC) - added /compress


STRESS [1] $SSW/gen/idl/fund_lib/jhuapl/stress.pro
[Previous] [Next]
 NAME:
       STRESS
 PURPOSE:
       String edit by sub-string. Precede, Follow, Delete, Replace.
 CATEGORY:
 CALLING SEQUENCE:
       new = stress(old,cmd,n,oldss,newss,ned)
 INPUTS:
       old = string to edit.                               in
       cmd = edit command:                                 in
         'P' = precede.
         'F' = follow.
         'D' = delete.
         'R' = replace.
       n = occurrence number to process (0 = all).         in
       oldss = reference substring.                        in
       oldss may have any of the following forms:
         1. s	  a single substring.
         2. s...    start at substring s, end at end of string.
         3. ...e    from start of string to substring e.
         4. s...e   from subs s to subs e.
         5. ...     entire string.
       newss = substring to add. Not needed for 'D'        in
 KEYWORD PARAMETERS:
 OUTPUTS:
       ned = number of occurrences actually changed.       out
       new = resulting string after editing.               out
 CALLS: ***
	STREP [1], STREP [2], STREP [3], STREP [4], STREP [5], strsub
 CALLED BY:
	DT_TM_MAK [1], DT_TM_MAK [2], DT_TM_MAK [3], STREP [1], STREP [4]
 COMMON BLOCKS:
 NOTES:
       Notes: oldss and newss may be arrays.
 MODIFICATION HISTORY:
       Written by R. Sterner, 6 Jan, 1985.
       Johns Hopkins University Applied Physics Laboratory.
       RES --- 23 May, 1988 fixed a bug in SSTYP = 2.
       Converted to SUN 13 Aug, 1989 --- R. Sterner. (FOR loop change).
       --- 8 Dec, 1992 added recursion so that OLDSS and NEWSS may be arrays
       T.J.Harris, University of Adelaide.

 Copyright (C) 1985, Johns Hopkins University/Applied Physics Laboratory
 This software may be used, copied, or redistributed as long as it is not
 sold and this copyright notice is reproduced on each copy made.  This
 routine is provided as is without any express or implied warranties
 whatsoever.  Other limitations apply as described in the file disclaimer.txt.


stretch_box $SSW/gen/idl/display/stretch_box.pro
[Previous] [Next]
 PROJECT:  HESSI

 NAME: stretch_box

 PURPOSE: draw rubberband box

 CATEGORY: display

 CALLING SEQUENCE:
	xy = stretch_box (widget_id, color=color, $
		device=device, data=data, normal=normal, event=event)

 INPUTS:
	widget_id - widget id of draw widget

 OPTIONAL INPUTS (KEYWORDS):
	color - color index to draw box with
	device - if set returns corners of box in device coordinates
	data - if set returns corners of box in data coordinates
	normal - if set returns corners of box in normal coordinates
	event - draw window left click event that has already occurred, e.g. user
		has already left clicked in draw widget, and this position should
		be used as starting position for stretch box
	no_sort - if set, order of x and y coords is first/last corner, not min/max

 OUTPUTS:
	Result of function is fltarr(2,2) where
	xy(0,*) are x min and max of box (see no_sort keyword)
	xy(1,*) are y min and max of box (see no_sort keyword)

 OPTIONAL OUTPUTS:  None

 Calls: ***
	CHECKVAR [1], MINMAX [1], MINMAX [2], STRETCH_BOX_EVENT, checkvar [2]
 CALLED BY:
	plotman_zoom
 COMMON BLOCKS: None

 PROCEDURE:

 RESTRICTIONS: Requires that window be a draw widget

 SIDE EFFECTS: None.

 EXAMPLES:

 HISTORY:
	Written, Kim Tolbert, Dec 99
	Kim, Mar 22, 00 - Added event keyword
	Kim. Jul 9, 2005 - Added no_sort option


stretch_circle $SSW/gen/idl/display/stretch_circle.pro
[Previous] [Next]
 PROJECT:  HESSI

 NAME: stretch_circle

 PURPOSE: draw rubberband circle

 METHOD: User can move center of circle by moving mouse, change size
	of circle by holding down left button and dragging. Right click
   to finish.  20 (or npts) points defining circle are returned to user
   in device(default), data, or normalized coordinates.

 CATEGORY: display

 CALLING SEQUENCE:
	xy = stretch_circle (widget_id, color=color, $
		device=device, data=data, normal=normal, event=event)

 INPUTS:
	widget_id - widget id of draw widget

 OPTIONAL INPUTS (KEYWORDS):
	color - color index to draw circle with
	device - if set returns circle in device coordinates (default)
	data - if set returns circle in data coordinates
	normal - if set returns circle in normal coordinates
	event - draw window left click event that has already occurred, e.g. user
		has already left clicked in draw widget, and this position should
		be used as starting position for stretch circle
   npts - number of points used to define circle (default=20)
	radius_start - initial radius of circle in data coordinates
	message_id - widget id of a widget to display message in

 OUTPUTS:
	Result of function is fltarr(2,npts) where
	xy(0,*) are x values
	xy(1,*) are y values

 OPTIONAL OUTPUTS:  None

 Calls: ***
	CHECKVAR [1], EXIST, STRETCH_CIRCLE_EVENT, checkvar [2], draw_circle [1]
	draw_circle [2], draw_circle [3]
 COMMON BLOCKS: None

 PROCEDURE:

 RESTRICTIONS: Requires that window be a draw widget

 SIDE EFFECTS: None.

 EXAMPLES:

 HISTORY:
	Written, Kim Tolbert, 24-Apr-2001
 Modifications:
	4-June-2001, Kim.  Added radius_start and message_id keywords


STRETCH_RANGE $SSW/gen/idl/genutil/stretch_range.pro
[Previous] [Next]
 NAME:
	STRETCH_RANGE

 PURPOSE:
       stretch color table (stretch within user supplied range only)

 CATEGORY:
	Image processing, point operations.

 CALLING SEQUENCE:
	STRETCH_RANGE, Low, High [, /CHOP], range=[min,max]

 INPUTS:
	Low:	The lowest pixel value to use.  If this parameter is omitted,
		0 is assumed.  Appropriate values range from 0 to the number 
		of available colors-1.

	High:	The highest pixel value to use.  If this parameter is omitted,
		the number of colors-1 is assumed.  Appropriate values range 
		from 0 to the number of available colors-1.

 OPTIONAL INPUTS:
	Gamma:	Gamma correction factor.  If this value is omitted, 1.0 is 
		assumed.  Gamma correction works by raising the color indices
		to the Gamma power, assuming they are scaled into the range 
		0 to 1.

 KEYWORD PARAMETERS:
	CHOP:	If this keyword is set, color values above the upper threshold
		are set to color index 0.  Normally, values above the upper 
		threshold are set to the maximum color index.

       RANGE:  If set, only effect indices within this range 
               (if not set, behaves like RSI parent program: stretch.pro)
 OUTPUTS:
	No explicit outputs.

 CALLED BY:
	line_table
 COMMON BLOCKS:
	COLORS:	The common block that contains R, G, and B color
		tables loaded by LOADCT, HSV, HLS and others.

 SIDE EFFECTS:
	Image display color tables are loaded.

 RESTRICTIONS:
	Common block COLORS must be loaded before calling STRETCH.

 PROCEDURE:
	New R, G, and B vectors are created by linearly interpolating
	the vectors in the common block from Low to High.  Vectors in the 
	common block are not changed.

	If NO parameters are supplied, the original color tables are
	restored.

 EXAMPLE:
	Load the STD GAMMA-II color table by entering:

		LOADCT, 5

	Create and display and image by entering:

		TVSCL, DIST(300)

	Now adjust the color table with STRETCH.  Make the entire color table
	fit in the range 0 to 70 by entering:

		STRETCH, 0, 70

	Notice that pixel values above 70 are now colored white.  Restore the
	original color table by entering:

		STRETCH

 MODIFICATION HISTORY:
	DMS, RSI, Dec, 1983.
	DMS, April, 1987.	Changed common.
	DMS, October, 1987.	For unix.
	DMS, RSI, Nov., 1990.	Added GAMMA parameter.
       16-July-1996 - S.L.Freeland - add RANGE and changed name


strextract $SSW/gen/idl/string/strextract.pro
[Previous] [Next]
   Name: strextract

   Purpose: extract substring between patt1 and patt2

   Input Parameters:
      source  - source string or string array 
      patt1   - pattern 1
      patt2   - pattern 2

   Keyword Parameters:
      include - if set, return substrings include patt1/patt2 (delimiters)

   Calling Sequence:
      substr=strextract(source, patt1, patt2)

   Calling Examples:
      IDL> print,strextract('this is a "test" of strextract','"','"')
           test

      IDL> print,strextract('<a "file/junk.html"><b>descript</b>','"')
           file/junk.html            
      
      IDL> print,strextract('<a "file/junk.html"><b>descript</b>','"',/include)
           "file/junk.html"


 CALLS: ***
	ssw_strsplit
 CALLED BY:
	MK_ANALYSIS, gt2exe [1], gt2exe [2], hsi_imagefile_2_plotman
	hsi_ui_img_doimage [1], hsi_ui_img_doimage [2], html_get_files
	lasco_time2file, lasco_time2nrlwww, les_archive_info, plot_goesp, rd_tr_seq_head
	read_genxcat, special_movie, ssw_getcme_cactus, ssw_install [2]
	ssw_jsurl2imagelist, ssw_swmap_info, sxi_files, sxt_mornint
	trace_recent_movie_summary, yohkoh_legacy_files [1], yohkoh_legacy_files [2]
   History:
       16-dec-96 - S.L.Freeland - simplify common parsing function
	28-May-97 - M.D.Morrison - Mod to send output out as scalar if 
				   it is a single element
      09-May-2003, William Thompson - Use ssw_strsplit instead of strsplit

  Method: call ssw_strsplit  twice (implies vector inuput is fine)


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

  Purpose: find URLS in a text array, useful for TEXT->HTML conversions

  Input Parameters:
     text - text array to process

  Keyword Parameters:
     numberfound (output) - number of URLS found (and #structures returned)
  
  Output: 
     function returns structure vector (nelements=number URLS) of format:
     {line_n:    0L         ; line number (relative to text subscripts)
      start_pos: 0L         ; position info for extraction, conversion...
      stop_pos:  0L         ; ditto
      line:      ''         ; The pristine line
      URL:       ''}        ; URL identified (checking, str_replace, etc)


 CALLS: ***
	STR2ARR [1], STR2ARR [2], strlastchar [1], strlastchar [2]
 CALLED BY:
	html_get_files
   History:
      5-mar-1997 - S.L.Freeland - for auto TEXT->HTML converters
                   (simplify <str2html.pro> and expand to relative links)


STRIP_ARG $SSW/gen/idl/help/strip_arg.pro
[Previous] [Next]
 Name        : STRIP_ARG

 Purpose     : Strip argument and keyword calls from an IDL program.

 Explanation : 

 Syntax:     : strip_arg,proc

 Inputs      : PROC = string array with text of program.

 Outputs     : QUIET = inhibit printing

 Keywords    : OUT = list of procedure/function calls

 Category    : Documentation, Online_help.

 CALLS: ***
	APPEND_ARR, DATATYPE [1], DATATYPE [2], DATATYPE [3], EXIST, str_replace [1]
	str_replace [2]
 CALLED BY:
	CHKARG
 History     : Written, Dominic Zarro, ARC, 10 October 1994.
               Modified, Zarro (SM&A/GSFC), 8 Oct 1999
                -- fixed bug with $ continuations  

 Contact     : DZARRO@SOLAR.STANFORD.EDU 


strip_crt $SSW/gen/idl/io/strip_crt.pro
[Previous] [Next]
 Project     : VSO

 Name        : strip_crt

 Purpose     : strip annoying <CR>'s from ASCII file

 Category    : utility string

 Syntax      : IDL> strip_return,ifile,ofile

 Inputs      : IFILE = input file

 Outputs     : OFILE = output file
               [if not present, then IFILE is clobbered]

 Keywords    : ERR = error string

 CALLS: ***
	FILE_BREAK, IS_BLANK, LOC_FILE [1], LOC_FILE [2], LOC_FILE [3], PR_SYNTAX
	RD_ASCII [1], RD_ASCII [2], WRT_ASCII
 History     : 12-Nov-2005, Zarro (L-3Com/GSFC) - written

 Contact     : DZARRO@SOLAR.STANFORD.EDU


STRIP_DIRNAME [1] $SSW/gen/idl/system/strip_dirname.pro
[Previous] [Next]
 PROJECT:
       SOHO - CDS

 NAME:
       STRIP_DIRNAME()

 PURPOSE: 
       Strip off directory name associated with filenames.

 EXPLANATION:
       Given a string array containing full filenames (including
       directory paths), this routine will strip off directory names
       and return only the file names.

 CALLING SEQUENCE: 
       Results = STRIP_DIRNAME(full_names [,path=path])

 INPUTS:
       FULL_NAMES -- String array containing full names of files
                     including directory paths.
   
 OPTIONAL INPUTS: 
       None.

 OUTPUTS:
       Results -- String array in which directory paths have beeb
                  stripped off from the full filename.

 OPTIONAL OUTPUTS:
       PATH -- An optional return variable that contains the stripped path
               string of the file names.

 KEYWORD PARAMETERS: 
       None.

 CALLS: ***
	DATATYPE [1], DATATYPE [2], DATATYPE [3], RSTRPOS
 CALLED BY:
	CAT_RAW, EIS_CPT_PROCESS_REAL_COMMAND_SEQUENCES [1]
	EIS_CPT_PROCESS_REAL_COMMAND_SEQUENCES [2], EIS_IMAGE_TOOL [1]
	EIS_IMAGE_TOOL [2], EIS_IMAGE_TOOL_EVENT [1], EIS_IMAGE_TOOL_EVENT [2]
	EIS_LOAD_IMAGE [1], EIS_LOAD_IMAGE [2], IMAGE_TOOL, IMAGE_TOOL_EVENT
	ITOOL_LOAD_IMAGE, ITOOL_PICKFILE, XGET_SYNOPTIC
 COMMON BLOCKS:
       None.

 RESTRICTIONS: 
       None.

 SIDE EFFECTS:
       None.

 CATEGORY:
       Utilities, os

 PREVIOUS HISTORY:
       Written September 19, 1994, by Liyun Wang, GSFC/ARC

 MODIFICATION HISTORY:
       Liyun Wang, GSFC/ARC, September 20, 1994
          Added the PATH keyword.
	Version 2, 29-Aug-1995, William Thompson, GSFC
		Changed to use OS_FAMILY
       Version 3, 09-Jan-2006, William Thompson, GSFC
               Made FOR loop long integer
       
 VERSION: 
       Version 3, 09-Jan-2006
       


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

 Name        : STRIP_DOC

 Purpose     : Strip internal documentation from an IDL program.

 Explanation : 

 Syntax      : doc=strip_doc(array)

 Inputs      : 
	        ARRAY = string array with text of program.

 Outputs     : 
	        DOC = string array with documentation part.

 Keywords    : ERR = error string

 Category    : Documentation, Online_help.

 CALLS: ***
	DATATYPE [1], DATATYPE [2], DATATYPE [3]
 CALLED BY:
	HSI_SPECTROSCOPY_LIST, SCANPATH
 History     : Written, Dominic Zarro, ARC, 10 October 1994.

 Contact     : DZARRO@SOLAR.STANFORD.EDU 


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

 Name        :	STRIP_STRUCT

 Purpose     :	Strip down a structure by removing tags

 Use         : SUB=STRIP_STRUCT(STRUCT,INDEX,LEN)

 Inputs      :	STRUCT = input structure to strip
               INDEX  = index (or tag name) to start trip
               LEN    = # of tags to strip

 Outputs     :	SUB = stripped structure

 Keywords    :	NAME = new name for stripped structure
		INVERSE = If set, return structure with only tags that would
					have been stripped.

 Category    :	Structure handling

 Written     :	Dominic Zarro (ARC)

 Version     :	Version 1.0, 8 Oct 1998 - Zarro (SMA/GSFC)
 Modified:	2 Jan 1999 - Kim Tolbert.  Added inverse keyword
               24 Dec 2004 - Zarro (L-3Com/GSFC), vectorized
 CALLS:


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

 Name        : STRIP_WILD

 Category    : Utility, string, help

 Purpose     : Strip wild characters (*,?) from procedure name

 Explanation : Used in WWW search engine

 Syntax      : IDL> fproc=strip_wild(proc)

 Inputs      : PROC = procedure name (e.g. *xdoc, or xdoc*)

 Opt. Inputs : None

 Outputs     : FPROC = stripped name (e.g. xdoc)

 Opt. Outputs: None

 Keywords    : WBEGIN = true if input has wild character at beginning

 CALLS: ***
	BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], DATATYPE [1], DATATYPE [2]
	DATATYPE [3], STREP [1], STREP [2], STREP [3], STREP [4], STREP [5], break_file [4]
 CALLED BY:
	FIND_CAT, FIND_PROC
 Common      : None

 Restrictions: None

 Side effects: None

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

 Contact     : DZARRO@SOLAR.STANFORD.EDU


strjustify $SSW/gen/idl/string/strjustify.pro
[Previous] [Next]
   Name: strjustify

   Purpose: left/right justify or center string array 

   Input Parameters:
      inarry - string array input
      
   Output:
      return value is justified or centered version of inarry (padded)

   Keyword Parameters:
      left - switch, if set, left justify
      right - switch, if set, right justify
      center - switch, if set, center 
      width - strlen of returned array (default is max(strlen(inarrary))
      pad - pad character (default is blank)
      boxtext = boxtext

   Calling Sequence:
      justtext=strjustify(text [,/left, /right, /center, /box, width=width]
 CALLS: ***
	UNIQ [1], UNIQ [2], UNIQ [3], data_chk [1], data_chk [2]
 CALLED BY:
	FIRST_LIGHT [1], FIRST_LIGHT [2], SPEX_DRM__DEFINE, check_oldprocess [1]
	check_oldprocess [2], check_oldprocess [3], check_oldprocess [4], dbase2disk
	disk_hog [1], disk_hog [2], do_demo [1], do_demo [2], eit_fulldiskdb, eit_getobs
	fitshead2struct, fmt_rasm, ftp_copy_new, get_infox, get_selsis, get_sfc_info
	hessi_var, image2movie, image_summary, img_sumtr2, killold [1], killold [2]
	map_env2dir, mk_lasteit_movie, mk_pubydb, mk_sfc [1], mk_sfc [2], mk_ydbtape [1]
	mk_ydbtape [2], mreadfits_fixup, multi_hda2hxi, mxf_decomp_data, mxf_dset_map
	mxf_read_data, mxfdset_map, mxfread, plot_ace, pr_his_index [1], pr_his_index [2]
	pr_his_index [3], pr_logenv, pr_status [1], pr_status [2], prcols [1], prcols [2]
	prcols [3], quality_filter, rd_ydbtap, rep_logenv, rmosaic [1], rmosaic [2]
	rmosaic [3], show_contacts, soon_catstat, special_movie, split_colortab
	ssw_check_contrib, ssw_conflicts, ssw_getapplet, ssw_packages, ssw_path
	ssw_upgrade [1], ssw_upgrade [2], ssw_upgrade_backup, sswdb_info, sswdb_upgrade
	sswloc, sxt_plan, sxt_uvf_info [1], sxt_uvf_info [3], table2struct, tim2pass
	tr_head_info, trace_goodobs, trace_uniq_movies, xso_butevents [1]
	xso_butevents [2]
   History:
      16-May-1994 (SLF) Written
       1-oct-1994 (SLF) add BOXTEXT keyword and fuction
      14-apr-1995 (SLF) protect against scaler input
      10-apr-1997 (SLF) protect against all null string input
      


strlastchar [1] $SSW/gen/idl/genutil/strlastchar.pro
[Previous] [Next]
   Name: strlastchar
   
   Purpose: return last non-blank character(s) in a string or string array

   Input Parameters:
      array - string or string array

   Calling Sequence:
      lastchar=strlastchar(strarr)

 CALLS: ***
	REVERSE
 CALLED BY:
	hsi_params_write_pro, make_mirror, ospex_params_write_pro, rd_gxd [1]
	rd_gxd [2], rd_gxd [3], strfind_urls, strspecial [1], strspecial [2], timeline
	topsdb [1], topsdb [2], web_seq
   History:
      29-jul-1995 (SLF)


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

   Purpose: identify ordered/unordered lists in string array and cnvt->html

   Input Parameters:
      array - string array to search

   Keyword Parameters:
      ordered -   if set, ordered lists only (default)
      unordered - if set, unordereed lists only 
      all       - if set, ordered AND unordered lists (recursive)
      maxsep - maximum seperation expected between list entries (def=3 lines)
      loud - if set, print some diagnostics

   Calling Sequence:
      list=strlist2html(array [/ordered, /unordered, /all, maxsep=NN]

 CALLS: ***
	ARR2STR [1], Arr2Str [2], deriv_arr [1], deriv_arr [2], str_replace [1]
	str_replace [2], strspecial [1], strspecial [2], strsplit
 CALLED BY:
	str2html [1], str2html [2], str2html [3]
   Restrictions:
      may let some lists slip through the cracks...
      
   History:
      26-jul-1995 (SLF) - 
       5-mar-1997 (S.L.Freeland ) added /LOUD and made quiet the default
      09-May-2003, William Thompson - Use ssw_strsplit instead of strsplit


strmids [1] $SSW/gen/idl/string/strmids.pro
[Previous] [Next]
   Name: strmids

   Purpose: strmid with vectorized parameters

   Input Parameters:
      inarry  - initial string array to split
      start_position - first position (array ok)
      exlength - length to extract (array ok)

   Output:
      function return value is trimmed string array 

   Calling Sequence:
      strarr=strmid(inarray, start_positions, exlength )

   Calling Examples:
    IDL> more,strmids(replicate('123456789',5), indgen(5), indgen(5)+1 )
           1
           23
           345
           4567
           56789

 
 CALLS: ***
	UNIQ [1], UNIQ [2], UNIQ [3], data_chk [1], data_chk [2]
 CALLED BY:
	LIST_PRINTER_UNIX, MDI_COPY, UNFORMAT_INTERVALS, ef2time, eit_file2path
	extract_fids, gt2exe [1], gt2exe [2], hsi_ui_qlimage, html_get_files, make_mirror
	mk_sxh, mreadfits_header, read_trace, soon_cadence, ssw_install [2]
	ssw_instr_info, ssw_kyoto2dst, ssw_start_rpcserver, ssw_swmap_info
	ssw_swmap_uniqinfo, sswdb_upgrade, timeline, topsdb [1], topsdb [2]
	tr_mk_seq_alph, trace_dph2struct [1], trace_files, trace_movie_context
	trace_request_summary, trace_struct2filename, url_encode, web_seq, xdisp_fits
   History:
      12-sep-1997 - S.L.Freeland 
      16-sep-1997 - S.L.Freeland - ignore action for any '-1' paramters
                                   (allow strpos direct pass through)  
      17-sep-1997 - S.L.Freeland - dont bother initializing output array

   Method:
      calls strmid - vectorized for uniq combinations of 
                     of start position and length  


STRN [1] $SSW/gen/idl/string/strn.pro
[Previous] [Next]
 NAME:
	STRN
 PURPOSE:
	Convert a number to a string and remove padded blanks.
 EXPLANATION:
	The main and original purpose of this procedure is to convert a number
	to an unpadded string (i.e. with no blanks around it.)  However, it 
	has been expanded to be a multi-purpose formatting tool.  You may 
	specify a length for the output string; the returned string is either 
	set to that length or padded to be that length.  You may specify 
	characters to be used in padding and which side to be padded.  Finally,
	you may also specify a format for the number.  NOTE that the input 
	"number" need not be a number; it may be a string, or anything.  It is
	converted to string.

 CALLING SEQEUNCE:
	tmp = STRN( number, [ LENGTH=, PADTYPE=, PADCHAR=, FORMAT = ] )

 INPUT:
	NUMBER    This is the input variable to be operated on.  Traditionally,
		 it was a number, but it may be any scalar type.

 OPTIONAL INPUT:
	LENGTH    This KEYWORD specifies the length of the returned string.  
		If the output would have been longer, it is truncated.  If 
		the output would have been shorter, it is padded to the right 
		length.
	PADTYPE   This KEYWORD specifies the type of padding to be used, if any.
		0=Padded at End, 1=Padded at front, 2=Centered (pad front/end)
		IF not specified, PADTYPE=1
	PADCHAR   This KEYWORD specifies the character to be used when padding.
		The default is a space (' ').
	FORMAT    This keyword allows the FORTRAN type formatting of the input
		number (e.g. '(f6.2)')

 OUTPUT:
	tmp       The formatted string

 USEFUL EXAMPLES:
	print,'Used ',strn(stars),' stars.'  ==> 'Used 22 stars.'
	print,'Attempted ',strn(ret,leng=6,padt=1,padch='0'),' retries.'
		==> 'Attempted 000043 retries.'
	print,strn('M81 Star List',length=80,padtype=2)
		==> an 80 character line with 'M81 Star List' centered.
	print,'Error: ',strn(err,format='(f15.2)')
		==> 'Error: 3.24'     or ==> 'Error: 323535.22'

 CALLED BY:
	APER, Automatic polarization determination with background subtraction
	Determine Drift Rate, EXTGRP, EXTRAP, FITS_INFO [1], FITS_INFO [2], FTPRINT, GETPSF
	HBOXAVE, HCONGRID, HEXTRACT, HREBIN, HREVERSE, HROT, MEANCLIP, NSTAR, SKYADJ_CUBE, VECT
	XDISPSTR, rhessi_get_spin_axis_position
 HISTORY:
	03-JUL-90 Version 1 written by Eric W. Deutsch
	10-JUL-90 Trimming and padding options added         (E. Deutsch)
	29-JUL-91 Changed to keywords and header spiffed up     (E. Deutsch)
	Ma7 92 Work correctly for byte values (W. Landsman)
	19-NOV-92 Added Patch to work around IDL 2.4.0 bug which caused an
	error when STRN('(123)') was encountered.            (E. Deutsch)
	Converted to IDL V5.0   W. Landsman   September 1997


STRN [2] $SSW/gen/idl_libs/astron/misc/strn.pro
[Previous] [Next]
 NAME:
	STRN
 PURPOSE:
	Convert a number to a string and remove padded blanks.
 EXPLANATION:
	The main and original purpose of this procedure is to convert a number
	to an unpadded string (i.e. with no blanks around it.)  However, it 
	has been expanded to be a multi-purpose formatting tool.  You may 
	specify a length for the output string; the returned string is either 
	set to that length or padded to be that length.  You may specify 
	characters to be used in padding and which side to be padded.  Finally,
	you may also specify a format for the number.  NOTE that the input 
	"number" need not be a number; it may be a string, or anything.  It is
	converted to string.

 CALLING SEQEUNCE:
	tmp = STRN( number, [ LENGTH=, PADTYPE=, PADCHAR=, FORMAT = ] )

 INPUT:
	NUMBER    This is the input variable to be operated on.  Traditionally,
		 it was a number, but it may be any scalar type.

 OPTIONAL INPUT:
	LENGTH    This KEYWORD specifies the length of the returned string.  
		If the output would have been longer, it is truncated.  If 
		the output would have been shorter, it is padded to the right 
		length.
	PADTYPE   This KEYWORD specifies the type of padding to be used, if any.
		0=Padded at End, 1=Padded at front, 2=Centered (pad front/end)
		IF not specified, PADTYPE=1
	PADCHAR   This KEYWORD specifies the character to be used when padding.
		The default is a space (' ').
	FORMAT    This keyword allows the FORTRAN type formatting of the input
		number (e.g. '(f6.2)')

 OUTPUT:
	tmp       The formatted string

 USEFUL EXAMPLES:
	print,'Used ',strn(stars),' stars.'  ==> 'Used 22 stars.'
	print,'Attempted ',strn(ret,leng=6,padt=1,padch='0'),' retries.'
		==> 'Attempted 000043 retries.'
	print,strn('M81 Star List',length=80,padtype=2)
		==> an 80 character line with 'M81 Star List' centered.
	print,'Error: ',strn(err,format='(f15.2)')
		==> 'Error: 3.24'     or ==> 'Error: 323535.22'

 CALLED BY:
	APER, Automatic polarization determination with background subtraction
	Determine Drift Rate, EXTGRP, EXTRAP, FITS_INFO [1], FITS_INFO [2], FTPRINT, GETPSF
	HBOXAVE, HCONGRID, HEXTRACT, HREBIN, HREVERSE, HROT, MEANCLIP, NSTAR, SKYADJ_CUBE, VECT
	XDISPSTR, rhessi_get_spin_axis_position
 HISTORY:
	03-JUL-90 Version 1 written by Eric W. Deutsch
	10-JUL-90 Trimming and padding options added         (E. Deutsch)
	29-JUL-91 Changed to keywords and header spiffed up     (E. Deutsch)
	Ma7 92 Work correctly for byte values (W. Landsman)
	19-NOV-92 Added Patch to work around IDL 2.4.0 bug which caused an
	error when STRN('(123)') was encountered.            (E. Deutsch)
	Converted to IDL V5.0   W. Landsman   September 1997


strnocomment $SSW/gen/idl/string/strnocomment.pro
[Previous] [Next]
   Name: strnocomment

   Purpose: de-comment a string / string array

   Input Parameters:
      inarray - string or string array

   Keyword Parameters:
      comment - optional comment character (defaul derived from data/system)
      remove_nulls - switch, if set, remove null lines (after comments remove)
      leave_inline_comments - switch, if set, remove comment only if entire line is comment

   Calling Sequence:
     nocomm=strno_comment(array [ ,comment='character', /remove_nulls ])

   Method:
      uses byte operation for big-array efficiency (no for loops)

 CALLS: ***
	data_chk [1], data_chk [2]
 CALLED BY:
	LIST_PRINTER_UNIX, fit_model_components, hessi_var, hsi_params_write_pro
	map_env2dir, ospex_params_write_pro, rd_tfiles, sswdb_upgrade, table2struct
	trace_success_file
   History:
      18-March-1996 (S.L.Freeland)
      28-Nov-2001, kim.tolbert@gsfc.nasa.gov.  Added leave_inline_comments keyword.


STRNUMBER [1] $SSW/gen/idl/string/strnumber.pro
[Previous] [Next]
 NAME:
      STRNUMBER
 PURPOSE:
      Function to determine if a string is a valid numeric value.

 CALLING SEQUENCE:
      result = strnumber( st, [val, /HEX] )

 INPUTS:
      st - any IDL scalar string

 OUTPUTS:
      1 is returned as the function value if the string st has a
      valid numeric value, otherwise, 0 is returned.

 OPTIONAL OUTPUT:
      val - (optional) value of the string.  real*8

 KEYWORDS:
	Hex - If present and nonzero, the string is treated as a hexadecimal
	      longword integer.

 CALLED BY:
	APER, CREATE_STRUCT [1], CREATE_STRUCT [2], DBFPARSE [1], DBFPARSE [2]
	DBFPARSE [3], GETPSF, HESSI SOHDATA CLASS DEFINITION, NORH_CREATE_STRUCT [1]
	NORH_CREATE_STRUCT [2], NORH_FITS_INTERP [1], NORH_FITS_INTERP [2]
	READCOL [1], READCOL [2], READCOL [3], READFMT, SXPAR [1], SXPAR [2], SXPAR [3]
	TBPRINT, fits_interp
 EXAMPLES:
      IDL> res = strnumber(' ',val)
           returns res=0 (not a number) and val is undefined

      IDL> res = strnumber('0.2d', val)
           returns res=1 (a valid number), and val = 0.2000d
              
 NOTES:
      (1) STRNUMBER was modified in February 1993 to include a special test for 
      empty or null strings, which now returns a 0 (not a number).    Without
      this special test, it was found that a empty string (' ') could corrupt
      the stack.

       (2) STRNUMBER will return a string such as '23.45uyrg' as a valid 
      number (=23.45) since this is how IDL performs the type conversion.  If
      you want a stricter definition of valid number then use the VALID_NUM
      function.
 HISTORY:
      version 1  By D. Lindler Aug. 1987
      test for empty string, W. Landsman          February, 1993
      Converted to IDL V5.0   W. Landsman   September 1997
      Hex keyword added.  MRG, RITSS, 15 March 2000.


STRNUMBER [2] $SSW/gen/idl_libs/astron/misc/strnumber.pro
[Previous] [Next]
 NAME:
      STRNUMBER()
 PURPOSE:
      Function to determine if a string is a valid numeric value.

 EXPLANATION:
      A string is considered a valid numeric value if IDL can convert it
      to a numeric variable without error.    
 CALLING SEQUENCE:
      result = strnumber( st, [val, /HEX] )

 INPUTS:
      st - any IDL scalar string

 OUTPUTS:
      1 is returned as the function value if the string st has a
      valid numeric value, otherwise, 0 is returned.

 OPTIONAL OUTPUT:
      val - (optional) value of the string.  real*8

 OPTIONAL INPUT KEYWORD:
       /HEX - If present and nonzero, the string is treated as a hexadecimal
             longword integer.
       /NAN - if set, then the value of an empty string is returned as NaN,
              by default the returned value is 0.0d.     In either case,
              an empty string is considered a valid numeric value.

 CALLED BY:
	APER, CREATE_STRUCT [1], CREATE_STRUCT [2], DBFPARSE [1], DBFPARSE [2]
	DBFPARSE [3], GETPSF, HESSI SOHDATA CLASS DEFINITION, NORH_CREATE_STRUCT [1]
	NORH_CREATE_STRUCT [2], NORH_FITS_INTERP [1], NORH_FITS_INTERP [2]
	READCOL [1], READCOL [2], READCOL [3], READFMT, SXPAR [1], SXPAR [2], SXPAR [3]
	TBPRINT, fits_interp
 EXAMPLES:
      IDL> res = strnumber('0.2d', val)
           returns res=1 (a valid number), and val = 0.2000d
              
 NOTES:
      (1) STRNUMBER was modified in August 2006 so that an empty string is 
      considered a valid number.   Earlier versions of strnumber.pro did not 
      do this because in very early (pre-V4.0) versions of IDL
      this could corrupt the IDL session.

       (2) STRNUMBER will return a string such as '23.45uyrg' as a valid 
      number (=23.45) since this is how IDL performs the type conversion.  If
      you want a stricter definition of valid number then use the VALID_NUM
      function.
 HISTORY:
      version 1  By D. Lindler Aug. 1987
      test for empty string, W. Landsman          February, 1993
      Converted to IDL V5.0   W. Landsman   September 1997
      Hex keyword added.  MRG, RITSS, 15 March 2000.
      An empty string is a valid number   W. Landsman    August 2006
      Added /NAN keyword  W. Landsman August 2006


STRPAD $SSW/gen/idl/string/strpad.pro
[Previous] [Next]
 Project     : SOHO - CDS

 Name        : STRPAD

 Purpose     : Pads a string with blanks (or whatever) to specified width


 Explanation : Spaces are added in front of the input string to
		make the returned string have LENGTH characters.
		Use /AFTER to add spaces at the end.

 Use         : str = strpad(value, length, /after, fill=fill])

 Inputs      : VALUE:  A string..
		LENGTH: The desired length of the result in characters

 Opt. Inputs : None.

 Outputs     : Returns the padded string.

 Opt. Outputs: None.

 Keywords    : AFTER : Set to add spaces at the end.
               FILL  : The character with which to pad out the string.
                        Default is the space character

 CALLED BY:
	CALC_DMM_DR, CALC_DMM_TR, CAT_DURATION, CAT_FITS, CDS_AR_OBS, CDS_PLAN_BRIEF
	CDS_SATURATE, CDS_SLINE, CDS_SNAPSHOT, CFITSLIST, CHECK_KAP, CHIANTI_DEM
	CH_LINE_LIST, CW_DROPLIST, DEF2STRUCT, DEF_ANOMALY, DEF_PROGRAM, EIS_CAT [1]
	EIS_CAT [2], GT_WLIMITS, ISOTHERMAL, LIST_FITS, MK_CDS_DBASE, MK_CDS_PLAN
	MK_PLAN_SBASE, MK_PLAN_XY, MK_RASTER, MONITOR_EXP_IMG, PICKFITS, PLOT_POPULATIONS
	POP_PROCESSES, READ_MONEXP_DATA, SCANPATH, SEL_LINE_MENU, SFITSLIST, SHOW_DATAWIN
	SHOW_EVARS, SHOW_PLAN, SHOW_STUDY, SOHO_CAMPAIGN, SPEX__DEFINE, SYNTHETIC
	TP_DUMP_SETUP, TP_GET_DESC, TP_RASDUR, WHICH_LINE [1], WHICH_LINE [2], WRT_ASCII
	XCAMP, XCAT, XDIFF, XLIST, XPROGRAM, XREPORT, XREPORT_EDIT, XSEL_LIST [1], XSEL_LIST [2]
	XSPECT, XSTUDY, XZOOM_PLAN, ch_ss, emiss_select, ssw_conflicts, ssw_kyoto2dst
	sswdb_info, str_cut
 Restrictions: Value must be a scalar string

 CALLS: ***
	EXIST
 Side effects: If the input string is longer than the desired
		width, it is returned without truncation

 Category    : Utilities, Strings

 Written     : Stein Vidar Hagfors Haugan, 27 September 1993

 Modified    : Corrected typo which stopped /after working.  CDP, 28-Sep-94
               Increased possible length used.  CDP, 22-Dec-94
               Handle arrays of strings.  CDP, 16-Mar-95
               Add FILL keyword and stop overwriting input. CDP, 30-Apr-95
		Vectorized, richard.schwartz@gsfc.nasa.gov, 23-jan-2003
               Vectorized even better, Zarro (EER/GSFC), 24-Jan-2003
               Fixed degenerate dimension bug, Zarro (EER/GSFC), 29-Mar-2003


strpair2struct $SSW/gen/idl/string/strpair2struct.pro
[Previous] [Next]
   Name: strpair2struct

   Purpose: convert string array of field/value pairs to structure

   Input Parameters:
       strings - string array of pairs or file name containing same
       delim   - optional field/value delimiter (default="=")
      
   Output Parameters:
      function returns structure of form:
           {xx, tag1:val1 [,tag2:val2, tag2:val3 ... tagNN:valNN] }

   Keyword Parameters:
      delim - field/value delimiter (default is blank)

   Calling Sequence:
      struct=strpair2struct(strings [,delim=delim] )

 CALLS: ***
	ARR2STR [1], Arr2Str [2], FILE_EXIST [2], MAKE_STR [1], MAKE_STR [2], data_chk [1]
	data_chk [2], file_exist [1], file_exist [3], rd_tfile [1], rd_tfile [2]
	ssw_strsplit
 CALLED BY:
	ssw_contrib_info
   Example:
      help,strpair2struct(['one=1','two=2','name=xxx']),/struct
		** Structure MS_205021778009, 3 tags, length=24:
		   ONE             STRING    '1'
		   TWO             STRING    '2'
		   NAME            STRING    'xxx';    

   Method:
      use ssw_strsplit, rd_tfile, & make_str to do dirty work

   Catagory:
      programming, system, WWW

   History:
      25-June-1996 - S.L.Freeland (originally for environment via CGI)
      09-May-2003, William Thompson - Use ssw_strsplit instead of strsplit


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

   Purpose: find position of 1st or last occurence of substring in each element
	     of a string array (extended array version of idl strpos)

   Input Paramters:
	source - string or string array to search
	substring - substring to match 

   Optional Keyword Paramters:
       lastpos - if set, position of last occurence is returned
		  (calls str_lastpos instead of strpos)

   Ouptut Paramters:
	function returns long array with each element = character postion
	of first match; return element is -1 if no match 

 CALLED BY:
	break_doc [1], break_doc [2], break_doc [3], get1doc [1], get1doc [2]
	tr_mk_seq_alph
   History: slf, 24-July-1992O


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

   Purpose: identify/remove 1st occurence of pattern in inarray 

   Input Paramters:
      inarray - string array 
      pattern - pattern to remove 
      remcount - number of elements in inarray where pattern was found

   Keyword Parameters:
      trunc - if set, truncation after pattern (not removal) is performed)
      all   - if set, all occurences are removed (using str_replace)
      patss    - returns subscripts of inarray where pattern matctched


   Method: 1st occurence of pattern in inarray is found
	    (since idl does not allow strmid with vector positions)
	    this routine uses vector operations for simular pattern 
	    positions for optimization instead of looping through each 
	    element of inarray

 CALLS: ***
	UNIQ [1], UNIQ [2], UNIQ [3], str_replace [1], str_replace [2]
 CALLED BY:
	wc_where [1], wc_where [2]
   History:
      slf, 7-jan-1992

   Category:
      gen , util, string


STRSEC [1] $SSW/gen/idl/fund_lib/jhuapl/strsec.pro
[Previous] [Next]
 NAME:
       STRSEC
 PURPOSE:
       Convert seconds after midnight to a time string.
 CATEGORY:
 CALLING SEQUENCE:
       tstr = strsec(sec, [d])
 INPUTS:
       sec = seconds after midnight.             in
         Scalar or array.
       d = optional denominator for a fraction.  in
 KEYWORD PARAMETERS:
       Keywords:
          /HOURS forces largest time unit to be hours instead of days.
 OUTPUTS:
       tstr = resulting text string.             out
 CALLS: ***
	ARRAY_JHUAPL [1], ARRAY_JHUAPL [2], ISARRAY [1], ISARRAY [2], ISARRAY [3]
 CALLED BY:
	SUN [1], SUN [2], TIMER
 COMMON BLOCKS:
 NOTES:
       Notes: Output is of the form: [DDD/]hh:mm:ss[:nnn/ddd]
         where DDD=days, hh=hours, mm=minutes, ss=seconds,
         nnn/ddd=fraction of a sec given denominator ddd in call.
         If sec is double precision then 1/10 second can be
         resolved in more than 10,000 days.  Use double precision when
         possible. Time is truncated, so to round to nearest second,
         when not using fractions, add .5 to sec.
 MODIFICATION HISTORY:
       Written by R. Sterner, 8 Jan, 1985.
       Johns Hopkins University Applied Physics Laboratory.
       RES --- Added day: 21 Feb, 1985.
       RES 19 Sep, 1989 --- converted to SUN
       RES 18 Mar, 1990 --- allowed arrays.
       TRM 08 May, 1991 --- changed array to array_jhuapl

 Copyright (C) 1985, Johns Hopkins University/Applied Physics Laboratory
 This software may be used, copied, or redistributed as long as it is not
 sold and this copyright notice is reproduced on each copy made.  This
 routine is provided as is without any express or implied warranties
 whatsoever.  Other limitations apply as described in the file disclaimer.txt.


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

   Purpose: return true if input is a 'special' character (or as defined by keyword)

   Input Parameters:
      strarray - scaler string or string array 

   Output
      function returns truth value (VECTOR) , depending upon keyords set

   Keyword Parameters:
      lastchar (input)  switch, look at LAST character  (default is FIRST)
      firstchar (input) switch, look at FIRST character (default for arrays)
      digit -  (input)  switch, return TRUE where character in {0-9}
      alpha -  (input)  switch, return TRUE where character in {a-z, A-Z} 
      lchar -  (output) return LAST character array (last char in strarray)
      chkall - (input)  strarray must be scaler - boolean for entire string

   Calling Sequence:
      truth=strspecial(arr)             ; =1 where leading chars are special
      truth=strspecial(arr,/digit)      ; =1 where leading chars in {0-9}
      truth=strspecial(arr,/alpha,/last); =1 where trailing chars in {a-z,A-Z} 
      
   Sample Calls:
      A: Scaler input, no positional keywords (FIRSTCHAR & LASTCHAR)
      IDL> print,strspecial('*-TITLE-*')	    ; boolean for each character
           1 1 0 0 0 0 0 
      B: Scaler input w/ positional keyword	
      IDL> print,strspecial('abcd1',/last,/digit)  ; only first or last
           1
      C: Array input (default looks at FIRSTCHAR of each element)
      IDL> print,strspecial(['abc','123','!@#'],/lastchar)
           0       0       1 
 CALLED BY:
	extract_fids, fitshead2struct, image2movie, keyword_db, save_idl_routines
	soon_search [1], soon_search [3], ssw_strfind, ssw_time2filelist
	strlist2html [1], strlist2html [2], trace_dph2struct [1], where_title [1]
	where_title [2]
   History:
      15-jul-1995
      28-jul-1995 - add DIGIT, ALPHA, LASCHAR keywords
       2-aug-1995 - added recursive segment for all characters of scaler

 CALLS: ***
	data_chk [1], data_chk [2], strlastchar [1], strlastchar [2]
   Restrictions:
      just looks at FIRST or LAST characters if input is an ARRAY
      trailing blanks are not "special" 

   Method: recursive for scaler strings


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

   Purpose: check to see if the input structure name exists

   Input Parameters:
	strname = string containing structure name to check

   Optional Keyword Parameters:
	quiet - if keyword set then quietinformational messages are
		inhibited 

   Output:
	function returns 1 if structure exists
		 returns 0 if structure does not exist

 CALLED BY:
	BFITS, MAKE_STR [1], MAKE_STR [2], add2str [1], add2str [2], substruc
   Side Effects:
       prints informational message if info is set
   
   History: SLF, 10/23/91 to allow make_str to avoid previously
	     allocated names as occured when idl restore was used


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

   Purpose: generate html Table (V3 table format) from table (string array)

   Input Parameters:
      table_array - 1D or 2D table (1D will be -> 2D)
 
   Optional Keyword Parameters:
      cellpadding, cellspacing - per html table formatting spec.
      padding, spacing		- synonyms for above
      border			- per html table formatting spec.
      row0header - switch, if set, use row0 values for header labels (bold)
      right,left,center - switches - alignment of values in cells
   
   Calling Sequence:
      table_html=strtab2html(table_array, /center, /right, /left, $
    		                           border=NN, cellpad=NN, cellspace=NN)

   Calling Examples:
      table_html=strtab2html(strarr_1D)	; break into columns, -> html
      table_html=strtab2html(strarr_2D)	; user table -> html
      table_html=strtab2html(strarr_2D,cellspac=10,border=20)
      table_html=strtab2html(strarr_2D,/row0head) ; use row 0 as header lables

 CALLS: ***
	strarrcompress
 CALLED BY:
	eit_proton_summary, html_linklist, image2movie, soon_catstat, soon_search_www
	special_movie, ssw_findstuff2html, ssw_install [1], ssw_install [2], sswdb_info
	sswdb_install, thumbnail_table_html, timeline2html, trace_cosmic2hist_accum
	trace_get1www_image, trace_movie_index [1], trace_movie_index [2]
	trace_recent_movie_summary, trace_request_summary, trace_success_file
   History:
      8-march-1996 S.L.Freeland
      7-May-1996   S.L.Freeland - changed to keyword inheritance
      9-May-1996   S.L.Freeland - force output to be 1D vector 
     10-May-1996   S.L.Freeland - add NULL_FILL keyword (default to '-')
     14-May-1996   S.L.Freeland - call 'strarrcompress' to remove null rows
     15-May-1996   S.L.Freeland - remove keyword inheritance
     23-Jul-1997   S.L.Freeland - dont call str2cols (assume user knows)     
     19-jan-1998   S.L.Freeland - added missing /LEFT, /RIGHT, /CENTER KWs


struct2fitshead $SSW/gen/idl/fits/struct2fitshead.pro
[Previous] [Next]
   Name: struct2fitshead

   Purpose: Map FITS Header-Structure structure back-> fits header (strarr)

   Input Parameters:
      hdrstr - IDL structure to map into fits header (ex: output of mreadfits)
      data - Data array associated with fits header.  If not passed, then the
             relevant parameters are taken from hdrstr, if available.  It's
             highly recommended that data be passed.

   Output:
      function returns FITS header derived from structure

   Calling Sequence:
      header=struct2fitshead(structure [, data])

   Calling Example:
	mreadfits,f,hdr,data
	ahdr = struct2fitshead(hdr(0))
	writefits,"new-"+f(0),f(0),ahdr

   Keywords:
       USE_SXADDPAR    = Use the routine SXADDPAR
       USE_FXADDPAR    = Use the routine FXADDPAR
       ALLOW_CROTA     = Allow CROTA to be written to the FITS header.
                         Normally, the non-standard keyword CROTA is
                         translated into the standard keyword CROTA2.  Using
                         /ALLOW_CROTA disables this check to enable CROTA to
                         coexist with World Coordinate System PC matrices.
	DATEUNDERSCORE2DASH = If tag contains 'DATE_', replace with 'DATE-' for 
			  FITS compatibility
 CALLED BY:
	EIT_PARTIAL, EIT_PREP, FITSHEAD2WCS, MAP__DEFINE, WCS2FITSHEAD, fixinate_eit
	mwritefits, update_history, write_trace, zwritefits
   History:
      Craig DeForrest w/S.L.Freeland - 11-apr-1997
      2-March-1998 - S.L.Freeland add some error checking...
                     add /USE_SXADDPAR keyword (eventual default?)
                     (default if NAXIS etc missing - just do it)
      6-Mar-1998 - S.L.Freeland - add COMMENTS input keyword
      6-May-1998 - S.L.Freeland - ORDER a few standard FITS
     23-Jun-1998 - C.E. DeForest - call ID_UNESC before stuffing the tags 
		    into the fits header (complements ID_ESC in fitshead2struct).
      3-Feb-2000 - S.L.Freeland - NOTE: made USE_SXADDPAR the default
                                  (more forgiving about TAG contents/order)

      10-Jul-2003, William Thompson - Treat CROTA1/CROTA2 correctly
      23-Sep-2004, William Thompson - Rewrite to form FITS header correctly,
                                      using fxhmake and fxhclean.
                                      Added data as input parameter.
                                      Made use_fxaddpar a keyword.
      27-Sep-2004, William Thompson - Put in backward compatibility for
                                      passing use_fxaddpar as a parameter.
                                      Allow keywords to fxhmake.
      10-Jan-2006, William Thompson - Added /ALLOW_CROTA.  Changed translation
                                      to CROTA2, which is the actual standard
      17-Feb-2006, William Thompson - Ignore substructs, pointers, obj refs
                                      (e.g. WCS_POINTER)
   Calls: ***
	BOX_MESSAGE, FXADDPAR [1], FXADDPAR [2], FXHMAKE [1], FXHMAKE [2], NTRIM
	STR2ARR [1], STR2ARR [2], TAG_EXIST [1], TAG_EXIST [2], data_chk [1], data_chk [2]
	id_unesc, tag_index [1], tag_index [2]


struct2ms [1] $SSW/gen/idl/genutil/struct2ms.pro
[Previous] [Next]
   Name: struct2ms
   
   Purpose: convert an structure to a make_str structure
	     (allow nesting of anonymous structures)

 CALLS: ***
	FMT_TAG [1], FMT_TAG [2], MAKE_STR [1], MAKE_STR [2], data_chk [1], data_chk [2]
	str_copy
   History:
       10-Feb-1994 (SLF)
	10-Feb-1996 (MDM) - Modified to handle nested structures


struct2ssw $SSW/gen/idl/ssw_util/struct2ssw.pro
[Previous] [Next]
   Name: struct2ssw

   Purpose: add SSW standard tags to input structure, optionally rationalize

   Input Parameters:
      structs - vector of strutuctures to work on
      data - optional - corresponding data , for deriving missing fields

 CALLS: ***
	BOX_MESSAGE, JOIN_STRUCT [1], JOIN_STRUCT [2], data_chk [1], data_chk [2]
	rem_elem [1], rem_elem [2], sswfits_struct [1], sswfits_struct [2]
	sswstruct_fill [1], sswstruct_fill [2], str_subset
 CALLED BY:
	COORD_ADDINDEX, MDI__DEFINE, anahead2struct, map2index, mdi_write_genxcat
	read_lapalma, read_soon, read_sxt, ssw_flare_locator, ssw_subimage, ssw_track_fov
	sswstruct_fill [1], sxt_ssc2file, sxt_ssn2fits [1], sxt_ssn2fits [2]
   History:
      24-October-1998 - S.L.Freeland - combine a few useful functions
      28-October-1998 - S.L.Freeland - allow scalar input index...
  
   Category:
      structure, fits, image , 2D , 3D , SSW , alignment, time


struct_subset $SSW/gen/idl/struct/struct_subset.pro
[Previous] [Next]
 Name: struct_subset

 Category: UTIL

 Purpose:
 Create a structure with a subset of given tags from an input structure.

 Calling sequence:  
 struct = struct_subset( struct, tags_to_keep )
 struct = struct_subset( struct, tags_to_remove, /EXCLUDE )

 Input:
 input - structure of interest

 Output:
 structure with specified tags, -1 if there are no tags that meet the
 given criteria, or -1 if an error occurred

 Input keywords:
 EXCLUDE - set this if result should be structure with all tags
           _except_ those input.

 Output keywords:
 ERR_MSG - string containing error message.  Null if no errors occurred during
 	execution.
 ERR_CODE - [0/1] if [no error / an error] occurred during execution.
 STATUS - [0/1] if a structure is returned.  Indicates that some of
          the input structure tags met the given criterion. 
 QUIET - Set if no error messages should be printed.

 Calls: ***
	IS_STRING, is_struct, where_arr [1], where_arr [2]
 CALLED BY
	STRUCTURE MANAGER CLASS, hsi_image_fitsread, hsi_spectrum_fitsread


struct_where $SSW/gen/idl/struct/struct_where.pro
[Previous] [Next]
   Name: struct_where

   Purpose: filter a structure array; return SubScripts which satisfy

   Input Parameters:
      structures - The structure vector to match
 
   Output Parameters:
      count - number of matches

   Keyword Parameters:
 	test_array  - string array containing the tag tests
       search_array - synonym for 'test_array', maybe more intuitive 
       conf_file   - name of configuration file (instead of test_array)
       quiet 	  - if set, suppress messages
	gtarr     - Debugging variable that gets a list of the
			expressions executed
	debug	  - Cause struct_where to stop before returning
        

   Calling Sequence:
        ss=struct_where(structures [,count], conf_file=FILENAME)
   -OR- ss=struct_where(structures [,count], test_array=test_array)
   -OR- ss=struct_where(structures [,count], search_array=search_array) 

 CALLED BY:
	TRACE_COPY, TRACE_GBO, datify, get_ssc_best, tace_time2level1, trace_make_vignette
   Examples:
      the contents of CONF_FILE or TEST_ARRAY or SEARCH_ARRAY are of the form:
         <TAG> <OPERARTOR> <VALUE>
      For example, a conf_file might contain:
         --------------------------------------------
         ; you can include free-form comments using ';' delimiter
         NAXIS1 = 512,1024                ; Lists (comma delimited)
         IMG_MIN > 1.                     ; Single value (boolean)
         WAVE_LEN = 171,195,284           ;
         XCEN=600.~800.                   ; Range (tilde separated)
         IMG_AVG > 100 && IMG_MAX < 4096  ; Compound Boolean
         -------------------------------------------
     The function output would then contain the subscripts of STRUCTURES which
     meet all the the criteria
     See function <gt2exe.pro> for more details on the accepted strings.

   History:
       2-Feb-1998 - S.L.Freeland - wrote trace_where (adapt sxt_where to TRACE)
	7-Sep-1998 - C.E. DeForest- adapt trace_where to the general case
      24-Sep-9998 - S.L.Freeland - Documentation, some error checking
      26-sep-2005 - S.L.Freeland - add _extra -> gt2exe.pro
      28-sep-2006 - S.L.Freeland - add SEARCH_ARRAY synonym for TEST_ARRAY

   Calls: ***
	BOX_MESSAGE, CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], FILE_EXIST [2]
	concat_dir [4], data_chk [1], data_chk [2], file_exist [1], file_exist [3]
	get_logenv [1], get_logenv [2], gt2exe [1], gt2exe [2], rd_tfile [1], rd_tfile [2]


STRUNF $SSW/gen/idl/struct/strunf.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : STRUNF
               
 Purpose     : Unfold structure, produce template for struct_tags.hlp
               
 Explanation : This procedure recursively unfolds a structure variable
               and prints a template suitable for use in the struct_tags.hlp
               file.
               
 Use         : STRUNF,STRUCT,PREFIXB,PREFIXA
    
 Inputs      : STRUCT : A structure variable
               
               PREFIX : The "fiducial name" of a structure variable
                         of this type. E.g., "QLDS". Appears in front
                         of each tag in the visible entries for the
                         struct_tags.hlp file.
               
 Opt. Inputs : None.
               
 Outputs     : Prints a template for use in the struct_tags.hlp file.
               
 Opt. Outputs: None.
               
 Keywords    : None.

 Calls       : ***
	DATATYPE [1], DATATYPE [2], DATATYPE [3], PARCHECK, STR_SEP, TYP
 Common      : None.
               
 Restrictions: None.
               
 Side effects: None.
               
 Category    : Utility
               
 Prev. Hist. : None.

 Written     : Stein Vidar H. Haugan, UiO, 9 April 1996
               
 Modified    : Version 2, SVHH, 13 April 1996
                       Recursive tag names for the !!!!!!! entries taken
                       out (to conform with XPL_STRUCT behaviour).

 Version     : 2, 13 April 1996


STRUP $SSW/gen/idl/string/strup.pro
[Previous] [Next]
 Project     : HESSI
                  
 Name        : STRUP
               
 Purpose     : simultaneously trim and uppercase a string
                             
 Category    : string utility
               
 Syntax      : IDL> out=strup(in)

 Inputs      : IN = input string
                                   
 Outputs     : OUT = output string
                              
 CALLS: ***
	TRIM2
 CALLED BY:
	ADD_TAG [1], ALLOW_FONT, BOOST_TAG, DO_EIT_SCALING, GET_PLAN_PROG, GOES__DEFINE
	INDEX2MAP, ITOOL_LOAD_IMAGE, ITOOL_RD_FITS, REM_TAG [1], REM_TAG [2]
	REP_STRUCT_NAME, REP_TAG_NAME, REP_TAG_VALUE, TAG_PREFIX, UTPLOT__DEFINE
 History     : Written, 4-Jan-2000, Zarro (SM&A/GSFC)

 Contact     : dzarro@solar.stanford.edu


strwhere $SSW/gen/idl/string/strwhere.pro
[Previous] [Next]
 NAME:
       strwhere
 PURPOSE
       Search for occurrences of a string in a string array.
 CALLING SEQUENCE
`      ss=strwhere(st_array,'search_st')
 CALLING EXAMPLE
       ss=strwhere(sfrs,'*911226.14*')
 INPUT
       st_array = string array to be searched.
       search_st = string for which to search.
               Wildcards (*) can be used.
 OUTPUT
       ss = indices where desired string is found in array.
       mcount - number of matches

 PROGRAMS CALLED
       strmatch, where
 HISTORY
       15-jan-2001  LWA, Written.
       15-Feb-2001  SLF, make backwardly compatible
                    (strmatch only available >=5.3)
                    [ use similar 'wc_where.pro' ]

 CALLS:
 CALLED BY
	ssc_scan2


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

 Name        : SUB_MAP

 Purpose     : get subimage of an image map

 Category    : imaging

 Explanation : Calling this procedure with /plot will invoke PLOT_MAP
               and sub region is selected with a cursor.
               In this case, XRANGE and YRANGE are returned as outputs.
               Alternatively, XRANGE and YRANGE can be input variables
               and will be used for extraction.
               If REF_MAP is a valid map, then its XRANGE, YRANGE are used
               for extraction

 Syntax      : sub_map,map

 Inputs      : MAP = map structure created by MAKE_MAP

 Opt. Inputs : None

 Outputs     : SMAP = subimage of map

 Opt. Outputs: None

 Keywords    : NOPLOT = don't invoke PLOT_MAP for graphical selection
               XRANGE = [x1,x2] = min/max x-coord's (data units)
               YRANGE = [y1,y2] = min/max y-coord's
               IRANGE =[x1,x2,y1,y2] = output subarray of indicies (pixel units)
               INDEX = map index for multiple maps (if plotting)
               REF_MAP = reference map for inferring XRANGE, YRANGE
               PRESERVE = output dimensions of SMAP same as REF_MAP
               PIXEL = XRANGE/YRANGE are in pixel units
               INIT = start all over again

 CALLS: ***
	DELVARX [1], DELVARX [2], DELVARX [3], DELVARX [4], DPRINT, EXIST, GET_MAP_PROP
	GET_MAP_SUB, GET_SUB_REGION, MERGE_STRUCT, PLOT_MAP, PR_SYNTAX, REPACK_MAP
	REP_TAG_VALUE, VALID_MAP, VALID_RANGE, data_chk [1], data_chk [2], delvarx [5]
 CALLED BY:
	DROT_MAP, GET_SUB_MAP, MAP__DEFINE, ssw_subimage
 History     : Written 22 November 1997, D. Zarro, SAC/GSFC
               Modified 10 June 2003, Zarro (EER/GSFC) - changed SUB keyword
               to IRANGE

 Contact     : dzarro@solar.stanford.edu


SUBSTAR $SSW/gen/idl_libs/astron/idlphot/substar.pro
[Previous] [Next]
 NAME:
	SUBSTAR
 PURPOSE:
	Subtract a scaled point spread function at specified star position(s).
 EXPLANATION:
	Part of the IDL-DAOPHOT photometry sequence

 CALLING SEQUENCE:
	SUBSTAR, image, x, y, mag, [ id, psfname, /VERBOSE] 

 INPUT-OUTPUT:
	IMAGE -  On input, IMAGE is the original image array.  A scaled
		PSF will be subtracted from IMAGE at specified star positions.
		Make a copy of IMAGE before calling SUBSTAR, if you want to
		keep a copy of the unsubtracted image array

 INPUTS:
	X -   REAL Vector of X positions found by NSTAR (or FIND)
	Y -   REAL Vector of Y positions found by NSTAR (or FIND)        
	MAG - REAL Vector of stellar magnitudes found by NSTAR (or APER)
		Used to scale the PSF to match intensity at star position.
		Stars with magnitude values of 0.0 are assumed missing and 
		ignored in the subtraction.

 OPTIONAL INPUTS:
	ID -  Index vector indicating which stars are to be subtracted.  If
		omitted, (or set equal to -1), then stars will be subtracted 
		at all positions specified by the X and Y vectors.

	PSFNAME - Name of the FITS file containing the PSF residuals, as
		generated by GETPSF.  SUBSTAR will prompt for this parameter
		if not supplied.      

 OPTIONAL INPUT KEYWORD:
	VERBOSE - If this keyword is set and nonzero, then SUBSTAR will 
		display the star that it is currently processing      

 CALLS: ***
	DAO_VALUE, READFITS [1], READFITS [2], READFITS [3], REMOVE [1], REMOVE [2]
	SXPAR [1], SXPAR [2], SXPAR [3]
 CALLED BY:
	T_SUBSTAR
 COMMON BLOCKS:
	The RINTER common block is used (see RINTER.PRO) to save time in the
	PSF calculations

 PROCEDURES CALLED:
	DAO_VALUE(), READFITS(), REMOVE, SXOPEN, SXPAR(), SXREAD()
 REVISION HISTORY:
	Written, W. Landsman                      August, 1988
	Added VERBOSE keyword                     January, 1992
	Fix star subtraction near edges, W. Landsman    May, 1996
	Assume the PSF file is in FITS format  W. Landsman   July, 1997
	Converted to IDL V5.0   W. Landsman   September 1997


SUM [1] $SSW/gen/idl/util/sumit.pro
[Previous] [Next]
 NAME:
	SUM
 PURPOSE:
  	Function to do a 1-d summation of a 2-d data set.
 CALLING SEQUENCE:  
	out = SUMIT(in)
 INPUTS:
	in	2-d input array
 OUTPUTS:
	out	1-d summation of array
 OPTIONAL OUTPUTS:

 CALLS: ***
	SUMIT
 RESTRICTIONS:

 PROCEDURE:

 MODIFICATION HISTORY:
	RDB	1990	Emulated IDL version 1 routine


SUM_COL $SSW/gen/idl/util/sum_col.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : SUM_COL()
               
 Purpose     : Sums along the columns of a matrix.
               
 Explanation : Sums along the columns of a matrix.
               
 Use         : col = sum_col(array)
    
 Inputs      : array  -  the array to be column-summed
               
 Opt. Inputs : None
               
 Outputs     : None
               
 Opt. Outputs: None
               
 Keywords    : None

 Calls       : None
 Common      : None
               
 Restrictions: None
               
 Side effects: None
               
 Category    : Util, arrays
               
 Prev. Hist. : None

 Written     : C D Pike, RAL, 4-Jan-94
               
 Modified    : 

 Version     : Version 1, 4-Jan-94


SUM_ROW $SSW/gen/idl/util/sum_row.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : SUM_ROW()
               
 Purpose     : Sums along the rows of a matrix.
               
 Explanation : Sums along the rows of a matrix.
               
 Use         : row = sum_row(array)
    
 Inputs      : array  -  the array to be row-summed
               
 Opt. Inputs : None
               
 Outputs     : None
               
 Opt. Outputs: None
               
 Keywords    : None

 Calls       : None
 Common      : None
               
 Restrictions: None
               
 Side effects: None
               
 Category    : Util, arrays
               
 Prev. Hist. : None

 Written     : C D Pike, RAL, 4-Jan-94
               
 Modified    : 

 Version     : Version 1, 4-Jan-94


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

  PURPOSE:
	Some along columns of a matrix

  CALLING SEQUENCE:
	Vector = SUMCOL(A)

 CALLED BY
	font_size [1], font_size [2], sat_obs_loc, text_size


SUMER_POINT_STC $SSW/gen/idl/image_tool/sumer_point_stc.pro
[Previous] [Next]
 PROJECT:
       SOHO - SUMER

 NAME:
       SUMER_POINT_STC()

 PURPOSE:
       Make pointing structure for IMAGE_TOOL from SUMER study

 EXPLANATION:

 CALLING SEQUENCE:
       Result = sumer_point_stc(sumer_study)

 INPUTS:
       SUMER_DETAIL - SUMER detail structure returned from GET_DETAIL.
                      It currently (as of January 26, 1995) has the 
                      following tags: 

          STRUCT_TYPE - The character string 'SUMER-DETAIL'
          PROG_ID     - Program ID, linking one or more studies together
          STUDY_ID    - Number defining the study
          STUDYVAR    - The number 0 (for compatibility with CDS software).
          SCI_OBJ     - Science objective from the daily science meeting
          SCI_SPEC    - Specific science objective from meeting
          CMP_NO      - Campaign number
          OBJECT      - Code for object planned to be observed
          OBJ_ID      - Object identification
          DATE_OBS    - Date/time of beginning of observation, in TAI format
          DATE_END    - Date/time of end of observation, in TAI format
          TIME_TAGGED - True (1) if the start of the study is to be a 
                        time-tagged event.  Otherwise, the study will begin
                        immediately after the previous study.
          N_POINTINGS - Number of pointing areas associated with the study.
          POINTINGS   - A array describing the area for each study to be 
                        used during the study.  If there are no pointings
                        associated with the array, then this tag will have a
                        dummyvalue instead.
          
          The pointing descriptions themselves are structures, of
          type "sumer_plan_pnt", with the following tags:
          
          XCEN        - Center pointing of the study part in the X direction.
          YCEN        - Same in the Y direction.
          WIDTH       - Width to use for the study.
          HEIGHT      - Height to use for the study.
          ZONE_ID - 1-byte integer, the zone ID for the pointing.
          ZONE    - String, the zone description, e.g. "Off Limb"

 OPTIONAL INPUTS:
       None.

 OUTPUTS:
       RESULT - Pointing structure that has the following tags:

          INSTRUME   - Code specifying the instrument; e.g., 'C' for CDS
          G_LABEL    - Generic label for the pointing; e.g., 'RASTER'
          X_LABEL    - Label for X coordinate of pointing; e.g., 'INS_X1'
          Y_LABEL    - Label for Y coordinate of pointing; e.g., 'INS_Y1'
          POINT_NUM  - Number of pointings to be performed by IMAGE_TOOL
          POINT_SPEC - Pointing specification (identifier)
          X_COORD    - X coordinate in arcs
          Y_COORD    - Y coordinate in arcs
          WIDTH      - Area width in arcsec
          HEIGHT     - Area height in arcsec
          OFF_LIMB   - An interger with value 1 or 0 indicating whether
                       or not the pointing area should be off limb


       Note: POINT_SPEC, X_COORD, Y_COORD, WIDTH, HEIGHT are all POINT_NUM
             element arrays

 OPTIONAL OUTPUTS:
       None.

 KEYWORD PARAMETERS:
       None.

 CALLS: ***
	DATATYPE [1], DATATYPE [2], DATATYPE [3], MK_POINT_STC, NUM2STR
 COMMON BLOCKS:
       None.

 RESTRICTIONS:
       None.

 SIDE EFFECTS:
       None.

 CATEGORY:

 PREVIOUS HISTORY:
       Written January 26, 1995, Liyun Wang, NASA/GSFC

 MODIFICATION HISTORY:
       Version 1, created, Liyun Wang, NASA/GSFC, January 26, 1995

 VERSION:
       Version 1, January 26, 1995


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

  PURPOSE:
	Some along rows of a matrix

  CALLING SEQUENCE:
	Vector = SUMROW(A)

 CALLED BY
	HXT_LOW_SUM, font_size [1], font_size [2], lcwda, sat_obs_loc, text_size


SUN [1] $SSW/gen/idl/fund_lib/jhuapl/sun.pro
[Previous] [Next]
 NAME:
       SUN
 PURPOSE:
       Computes geocentric physical ephemeris of the sun.
 CATEGORY:
 CALLING SEQUENCE:
       sun, y, m, d, et
 INPUTS:
       y = year.                      in
       m = month number.              in
       d = monthday number.           in
       et = ephemeris time in hours.  in
         Delta T = ET - UT which is not completely
         predictable but is about 1 minute now.
         This difference is noticable slightly.
 KEYWORD PARAMETERS:
       Keywords:
         /LIST displays values on screen.
         DIST = distance in AU.
         SD = semidiameter of disk in arc seconds.
         TRUE_LONG = true longitude (deg).
         TRUE_LAT = 0 always.
         APP_LONG = apparent longitude (deg).
         APP_LAT = 0 always.
         TRUE_RA = true RA (hours).
         TRUE_DEC = true Dec (deg).
         APP_RA = apparent RA (hours).
         APP_DEC = apparent Dec (deg).
         LAT0 = latitude at center of disk (deg).
         LONG0 = longitude at center of disk (deg).
         PA = position angle of rotation axis (deg).
	  CARRINGTON = Carrington rotation number.
 OUTPUTS:
 CALLS: ***
	MONTHNAMES [1], MONTHNAMES [2], MONTHNAMES [3], RECPOL [1], RECPOL [2], RECPOL [3]
	STRSEC [1], STRSEC [2], YMD2JD [1], YMD2JD [2], YMD2JD [3]
 CALLED BY:
	BURSTER_POSITION, STONY, ULYSSES_FEM, carr2btime [1], carr2btime [2]
	get_helio_dist, hsi_sas, hsi_sas_radii_norm, plot_lat_cmd, rd_sfd_carr, ret_day
 COMMON BLOCKS:
 NOTES:
       Notes: based on the book Astronomical Formulae
         for Calculators, by Jean Meeus.
         If no arguments given will prompt and list values.
 MODIFICATION HISTORY:
       R. Sterner, 19 Feb, 1991
	24 July, 1991 --- added Carrington Rotation number
	  based on an equation from Howard Cohl, Sac Peak.

 Copyright (C) 1991, Johns Hopkins University/Applied Physics Laboratory
 This software may be used, copied, or redistributed as long as it is not
 sold and this copyright notice is reproduced on each copy made.  This
 routine is provided as is without any express or implied warranties
 whatsoever.  Other limitations apply as described in the file disclaimer.txt.


sun2vax [1] $SSW/gen/idl/genutil/sun2vax.pro
[Previous] [Next]
NAME:
	sun2vax
PURPOSE:
	Converts data written on a DEC machine to SUN format by swapping
	bytes appropriately for the type of the input data.
CATEGORY:
	Byte-swapping
CALLING SEQUENCE:
	sun2vax,a
INPUTS:
	a = input variable which is to have its bytes swapped
OPTIONAL INPUT PARAMETERS:
	none
KEYWORD PARAMETERS
	none
OUTPUTS:
	a = reformatted variable is passed back in the original variable
 CALLS: ***
	ieee2vax [1], ieee2vax [2]
 CALLED BY:
	BFITS
COMMON BLOCKS:
	None
SIDE EFFECTS:
	None
RESTRICTIONS:
	None.
PROCEDURE:
	Determines the type of the variable and swaps the bytes depending
	on the type.  If the variable is a structure, the tags are 
	recursively searched so that the bytes are swapped throughout
	the structure.
MODIFICATION HISTORY:
	T. Metcalf 9/17/91  Version 1.0
           Modified vax2sun.pro


SUN_POS $SSW/gen/idl/solar/sun_pos.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : SUN_POS
               
 Purpose     : Calculate solar ephemeris parameters.
               
 Explanation : Allows for planetary and lunar perturbations in the calculation
               of solar longitude at date and various other solar positional
               parameters.
               
 Use         : IDL> sun_pos, date, longitude, ra, dec, app_long, obliq
    
 Inputs      : date - fractional number of days since JD 2415020.0 
               
 Opt. Inputs : None
               
 Outputs     : longitude  -  Longitude of sun for mean equinox of date (degs)
               ra         -  Apparent RA for true equinox of date (degs)
               dec        -  Apparent declination for true equinox of date (degs)
               app_long   -  Apparent longitude (degs)
               obliq      -  True obliquity (degs)
               
 Opt. Outputs: All above
               
 Keywords    : None

 Calls       : None
 CALLED BY:
	PB0R, SUN_EPHEM
 Common      : None
               
 Restrictions: None
               
 Side effects: None
               
 Category    : Util, coords
               
 Prev. Hist. : From Fortran routine by B Emerson (RGO).

 Written     : CDS/IDL version by C D Pike, RAL, 17-May-94
               
 Modified    : 

 Version     : Version 1, 17-May-94


SUNPOS $SSW/gen/idl_libs/astron/astro/sunpos.pro
[Previous] [Next]
 NAME:
       SUNPOS
 PURPOSE:
       To compute the RA and Dec of the Sun at a given date.

 CALLING SEQUENCE:
       SUNPOS, jd, ra, dec, [elong, obliquity, /RADIAN ]
 INPUTS:
       jd    - The Julian date of the day (and time), scalar or vector
               usually double precision
 OUTPUTS:
       ra    - The right ascension of the sun at that date in DEGREES
               double precision, same number of elements as jd
       dec   - The declination of the sun at that date in DEGREES

 OPTIONAL OUTPUTS:
       elong - Ecliptic longitude of the sun at that date in DEGREES.
       obliquity - the obliquity of the ecliptic, in DEGREES

 OPTIONAL INPUT KEYWORD:
       /RADIAN - If this keyword is set and non-zero, then all output variables 
               are given in Radians rather than Degrees

 NOTES:
       Patrick Wallace (Rutherford Appleton Laboratory, UK) has tested the
       accuracy of a C adaptation of the sunpos.pro code and found the 
       following results.   From 1900-2100 SUNPOS  gave 7.3 arcsec maximum 
       error, 2.6 arcsec RMS.  Over the shorter interval 1950-2050 the figures
       were 6.4 arcsec max, 2.2 arcsec RMS.  

       The returned RA and Dec are in the given date's equinox.

       Procedure was extensively revised in May 1996, and the new calling
       sequence is incompatible with the old one.
 METHOD:
       Uses a truncated version of Newcomb's Sun.    Adapted from the IDL
       routine SUN_POS by CD Pike, which was adapted from a FORTRAN routine
       by B. Emerson (RGO).
 CALLED BY:
	CO_ABERRATION, MPHASE, SOLEPHUT, atmospheric_refraction, get_zenang
	hsi_ast_sourceangle, hsi_earthangle
 EXAMPLE:
       (1) Find the apparent RA and Dec of the Sun on May 1, 1982
       
       IDL> jdcnv, 1982, 5, 1,0 ,jd      ;Find Julian date jd = 2445090.5   
       IDL> sunpos, jd, ra, dec
       IDL> print,adstring(ra,dec,2)
                02 31 32.61  +14 54 34.9

       The Astronomical Almanac gives 02 31 32.58 +14 54 34.9 so the error
               in SUNPOS for this case is < 0.5".      

       (2) Find the apparent RA and Dec of the Sun for every day in 1997

       IDL> jdcnv, 1997,1,1,0, jd                ;Julian date on Jan 1, 1997
       IDL> sunpos, jd+ dindgen(365), ra, dec    ;RA and Dec for each day 

 MODIFICATION HISTORY:
       Written by Michael R. Greason, STX, 28 October 1988.
       Accept vector arguments, W. Landsman     April,1989
       Eliminated negative right ascensions.  MRG, Hughes STX, 6 May 1992.
       Rewritten using the 1993 Almanac.  Keywords added.  MRG, HSTX, 
               10 February 1994.
       Major rewrite, improved accuracy, always return values in degrees
       W. Landsman  May, 1996 
       Added /RADIAN keyword,    W. Landsman       August, 1997
       Converted to IDL V5.0   W. Landsman   September 1997


SUNSYMBOL $SSW/gen/idl_libs/astron/plot/sunsymbol.pro
[Previous] [Next]
 NAME:
	SUNSYMBOL
 PURPOSE:
	Return the Sun symbol as a subscripted postscript character string
 EXPLANATION:
	Returns the Sun symbol (circle with a dot in the middle) as a 
	(subscripted) postscript character string.    Needed because although 
	the Sun symbol	is available using the vector fonts as the string 
	'!9n', it is not in the standard postscript set.   

 CALLING SEQUENCE:
	result = SUNSYMBOL([FONT= ])

 INPUTS:
	None

 OPTIONAL INPUT KEYWORDS:
       font = scalar font graphics keyword (-1,0 or 1) for text.   Note that
              this keyword is useful for printing text with XYOUTS but *not*
              e.g. the XTIT keyword to PLOT where the font call to PLOT takes
              precedence.

 OUTPUTS:
	result - a scalar string representing the Sun symbol.   A different
		string is output depending (1) the device is postscript and
		hardware fonts are used (!P.FONT=0), (2) vector fonts are used,
		or (3) hardware fonts are used on a non-postscript device.
		For case (3), SUNSYMBOL simply outputs the 3 character string
		'Sun'

 EXAMPLE:
	To make the X-axis of a plot read  M/M_Sun
	IDL>  plot,indgen(10),xtit = 'M / M' + sunsymbol()

 RESTRICTIONS:
	(1) The postscript output does not have the dot perfectly centered in 
		the circle
	(2) SUNSYMBOL() includes subscript output positioning commands in the 
		output string.
       (3) True type fonts (!p.font = 1) are not supported.   If you want
           to make a Sun symbol with true type fonts, see the discussion of
           installing the Marvosym font at http://tinyurl.com/mst5q
 REVISION HISTORY:
	Written,  W. Landsman,    HSTX          April, 1997
	Converted to IDL V5.0   W. Landsman   September 1997
       Allow font keyword to be passed.  T. Robishaw Apr. 2006


SUNVIEW [1] $SSW/gen/idl/display/sunview.pro
[Previous] [Next]
 Project     : SOHO - CDS

 Name        : SUNVIEW

 Purpose     : Switch to SunView mode.

 Explanation : SETPLOT is called to save and set the system variables.

 Use         : SUNVIEW

 Inputs      : None.

 Opt. Inputs : None.

 Outputs     : A message is printed to the screen.

 Opt. Outputs: None.

 Keywords    : None.

 Calls       : ***
	SETPLOT [1], SETPLOT [2]
 Common      : None.  But calls SETPLOT, which uses common block PLOTFILE.

 Restrictions: It is best if the routines TEK, REGIS, etc. (i.e.  those
		routines that use SETPLOT) are used to change the plotting
		device.

		In general, the SERTS graphics devices routines use the special
		system variables !BCOLOR and !ASPECT.  These system variables
		are defined in the procedure DEVICELIB.  It is suggested that
		the command DEVICELIB be placed in the user's IDL_STARTUP file.

 Side effects: If not the first time this routine is called, then system
		variables that affect plotting are reset to previous values.

 Category    : Utilities, Devices.

 Prev. Hist. : William Thompson

 Written     : William Thompson, GSFC.

 Modified    : Version 1, William Thompson, GSFC, 27 April 1993.
			Incorporated into CDS library.
		Version 2, William Thompson, GSFC, 21 October 1993.
			Renamed to SUNVIEW.

 Version     : Version 2, 21 October 1993.


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

 Name        : SUPPRESS_MESSAGE

 Purpose     : check if a suppressed message is stored in COMMON 

 Category    : utility

 Explanation : useful for controlling display of messages in widget apps
               such as XACK

 Syntax      : IDL> s=suppress_message(mess)

 Inputs      : MESS = message string (array or scalar)

 Opt. Inputs : None

 Outputs     : S = 1 if message is suppressed in COMMON, 0 otherwise

 Opt. Outputs: None

 Keywords    : /ADD - store message in COMMON
               /REMOVE - remove message from COMMON
               /CLEAR - clear all messages from COMMON

 CALLS: ***
	DATATYPE [1], DATATYPE [2], DATATYPE [3], DELVARX [1], DELVARX [2], DELVARX [3]
	DELVARX [4], STR2LINES, TRIM, delvarx [5]
 CALLED BY:
	XACK, XANSWER
 Common      : SUPPRESS_MESSAGE

 Restrictions: None

 Side effects: None

 History     : Version 1,  11-Sep-1996,  D.M. Zarro.  Written

 Contact     : DZARRO@SOLAR.STANFORD.EDU


SWAP [1] $SSW/gen/idl/genutil/swap.pro
[Previous] [Next]
 NAME:
   SWAP
 PURPOSE:
   Procedure to swap bytes
 CALLING SEQUENCE:
   SWAP,X
 INPUT:
   X - variable to be byte swapped.  Can be BYTE, INTEGER*2 or INTEGER*4.
       The order of the bytes will be reversed. For a byte array, 
       the number of bytes should be even and every other byte will be 
       swapped.
 REVISION HISTORY:
   Written  D. Lindler 1986
   Converted to version 2 IDL B. Pfarr, STX, 1/90 added code to 
      swap bytes in byte array
	19-May-93 (MDM) - Made the INDGEN statement a LINDGEN to handle
			  large arrays.
 CALLED BY
	EDITFRAME, PTEST, XEDITFRAME


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

 Name        : SWISS_CHEESE

 Purpose     : take an array and set every adjacent pixel to a 
               specified value [def=0]

 Category    : imaging

 Explanation : useful for overlaying two images in a semi-transparent way

 Syntax      : sdata=swiss_cheese(data)

 CALLED BY:
	PLOT_MAP, PLOT_MAP2 WARNINGTEMPORARY FIX ONLY FOR 16 bit ZBuffer support
 Examples    :

 Inputs      : DATA = data array (1- or 2-d)

 Opt. Inputs : VALUE = value to set each adjacent pixel to [def=0]

 Outputs     : SDATA = modified DATA

 Opt. Outputs: None

 Keywords    : SHIFT_VALUE = set to offset setting value
               NO_COPY = don't make new copy of data (i.e, destroy input data)

 CALLS: ***
	EXIST, PR_SYNTAX
 Common      : None

 Restrictions: None

 Side effects: None

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

 Contact     : dzarro@solar.stanford.edu


SXADDHIST [1] $SSW/gen/idl_libs/astron/fits/sxaddhist.pro
[Previous] [Next]
 NAME:
	SXADDHIST                           
 PURPOSE:
	Procedure to add HISTORY (or COMMENT) line(s) to a FITS header

 EXPLANATION:
       The advantage of using SXADDHIST instead of SXADDPAR is that with 
       SXADDHIST many HISTORY or COMMENT records can be added in a single call.

 CALLING SEQUENCE
	sxaddhist, history, header, [ /PDU, /COMMENT ]

 INPUTS:
	history - string or string array containing history or comment line(s)
		to add to the FITS header
 INPUT/OUTPUT
	header - FITS header (string array).   Upon output, it will contain the
               specified HISTORY records added to the end

 OPTIONAL KEYWORD INPUTS:
       /BLANK - If specified then blank ('       ') keywords will be written
              rather than 'HISTORY ' keywords.
       /COMMENT - If specified, then 'COMMENT ' keyword will be written rather
              than 'HISTORY ' keywords.    
              Note that according to the FITS definition, any number of 
              'COMMENT' and 'HISTORY' or blank keywords may appear in a header,
              whereas all other keywords may appear only once.   
	LOCATION=key - If present, the history will be added before this
	       keyword.  Otherwise put it at the end.
	/PDU - if specified, the history will be added to the primary
		data unit header, (before the line beginning BEGIN EXTENSION...)               
		Otherwise, it will be added to the end of the header.
               This has meaning only for extension headers using the STScI
               inheritance convention. 
 OUTPUTS:
	header - updated FITS header

 CALLED BY:
	FITS_CD_FIX, FTKEEPROW, FTSORT, GETPSF, GSSS_STDAST, HASTROM, HCONGRID, HEULER, HEXTRACT
	HPRECESS, HROTATE, PUTAST, TABLE_CALC, T_APER, T_FIND, T_GETPSF, T_GROUP, T_NSTAR
	WFPC2_READ
 EXAMPLES:
	sxaddhist, 'I DID THIS', header      ;Add one history record

	hist = strarr(3)
	hist[0] = 'history line number 1'
	hist[1[ = 'the next history line'
	hist[2] = 'the last history line'
	sxaddhist, hist, header              ;Add three history records

 SIDE EFFECTS:
       Header array is truncated to the final END statement
	LOCATION overrides PDU.
 HISTORY:
	D. Lindler  Feb. 87
	April 90  Converted to new idl  D. Lindler
	Put only a single space after HISTORY   W. Landsman  November 1992
	Aug. 95	  Added PDU keyword parameters
	Converted to IDL V5.0   W. Landsman   September 1997
	LOCATION added.  M. Greason, 28 September 2004.


SXADDPAR [1] $SSW/gen/idl/fits/sxaddpar.pro
[Previous] [Next]
 NAME:
       SXADDPAR
 PURPOSE:
       Add or modify a parameter in a FITS header array.

 CALLING SEQUENCE:
       SXADDPAR, Header, Name, Value, [ Comment,  Location, /SaveComment, 
                               BEFORE =, AFTER = , FORMAT= , /PDU]

 INPUTS:
       Header = String array containing FITS or STSDAS header.    The
               length of each element must be 80 characters.    If not 
               defined, then SXADDPAR will create an empty FITS header array.

       Name = Name of parameter. If Name is already in the header the value 
               and possibly comment fields are modified.  Otherwise a new 
               record is added to the header.  If name is equal to 'COMMENT'
               or 'HISTORY' or a blank string then the value will be added to 
               the record without replacement.  For these cases, the comment 
               parameter is ignored.

       Value = Value for parameter.  The value expression must be of the 
               correct type, e.g. integer, floating or string.  String values
                of 'T' or 'F' are considered logical values.

 OPTIONAL INPUT PARAMETERS:
       Comment = String field.  The '/' is added by this routine.  Added 
               starting in position 31.    If not supplied, or set equal to 
               '', or /SAVECOMMENT is set, then the previous comment field is 
               retained (when found) 

       Location = Keyword string name.  The parameter will be placed before the
               location of this keyword.    This parameter is identical to
               the BEFORE keyword and is kept only for consistency with
               earlier versions of SXADDPAR.

 OPTIONAL INPUT KEYWORD PARAMETERS:
       BEFORE  = Keyword string name.  The parameter will be placed before the
               location of this keyword.  For example, if BEFORE='HISTORY'
               then the parameter will be placed before the first history
               location.  This applies only when adding a new keyword;
               keywords already in the header are kept in the same position.

       AFTER   = Same as BEFORE, but the parameter will be placed after the
               location of this keyword.  This keyword takes precedence over
               BEFORE.

       FORMAT  = Specifies FORTRAN-like format for parameter, e.g. "F7.3".  A
               scalar string should be used.  For complex numbers the format
               should be defined so that it can be applied separately to the
               real and imaginary parts.  If not supplied then the default is
               'G19.12' for double precision, and 'G14.7' for floating point.

       /PDU    = specifies keyword is to be added to the primary data unit
               header. If it already exists, it's current value is updated in
               the current position and it is not moved.
       /SAVECOMMENT = if set, then any existing comment is retained, i.e. the
               COMMENT parameter only has effect if the keyword did not 
               previously exist in the header.
 OUTPUTS:
       Header = updated FITS header array.

 CALLED BY:
	ATV, CREATE_NRH_CFILE, CREATE_NRH_PFILE, DISPLOI_MON5K, EXTGRP, FITS_ADD_CHECKSUM
	FITS_CD_FIX, FITS_READ, FITS_WRITE, FTADDCOL, FTCREATE, FTDELCOL, FTDELROW, FTHMOD
	FTKEEPROW, FTPUT, GETPSF, GSSS_STDAST, HASTROM, HBOXAVE, HCONGRID, HEXTRACT, HPRECESS
	HREBIN, HREVERSE, HROT, HROTATE, INTGCOMP_NRH2, IRAFRD, MKHDR [1], MKHDR [2], MODFITS
	PUTAST, RDPSF, READFITS [1], READFITS [2], READFITS [3], READFITSL, RFITS2 [1]
	RFITS2 [2], RH_GET_HEADER, RH_RDIMCUBE, SUM_XINPUT, SXHMAKE, SXHWRITE, SXMAKE
	TAB_READ, TBDELCOL, TBDELROW, T_APER, T_FIND, T_GETPSF, T_GROUP, T_NSTAR, WFPC2_READ
	WRITEFITS [1], WRITEFITS [2], WRITE_FLUXNRH, WRITE_POSINRH, WRITE_SUMMARIES [2]
	ZDEGR, ZGETPLUME, ZMKHDR, ZPICK, cal_pol, imcalc, las_auto_exp, mk_limb_pixmap
	mk_mdi_fits, mk_minim, mk_stdim, mk_stdim_hdr, mk_stdim_list, poly_diffim
	raw_list2pixmap, read_mdi, scan4limb, sda2fits, zd4, zoverlay [1], zoverlay [2]
	zreadfits, zregister_eit, zstructify, zwritefits
 EXAMPLE:
       Add a keyword 'TELESCOP' with the value 'KPNO-4m' and comment 'Name
       of Telescope' to an existing FITS header h.

       IDL> sxaddpar, h, 'TELESCOPE','KPNO-4m','Name of Telescope'
 NOTES:
       The functions SXADDPAR() and FXADDPAR() are nearly identical, with the
       major difference being that FXADDPAR forces required FITS keywords
       BITPIX, NAXISi, EXTEND, PCOUNT, GCOUNT to appear in the required order
       in the header, and FXADDPAR supports the OGIP LongString convention.   
       There is no particular reason for having two nearly identical 
       procedures, but both are too widely used to drop either one.

       All HISTORY records are inserted in order at the end of the header.

       All COMMENT records are also inserted in order at the end of the header
       header, but before the HISTORY records.  The BEFORE and AFTER keywords
       can override this.

       All records with no keyword (blank) are inserted in order at the end of
       the header, but before the COMMENT and HISTORY records.  The BEFORE and
       AFTER keywords can override this.

 RESTRICTIONS:
       Warning -- Parameters and names are not checked
               against valid FITS parameter names, values and types.

 MODIFICATION HISTORY:
       DMS, RSI, July, 1983.
       D. Lindler Oct. 86  Added longer string value capability
       Converted to NEWIDL  D. Lindler April 90
       Added Format keyword, J. Isensee, July, 1990
       Added keywords BEFORE and AFTER. K. Venkatakrishna, May '92
       Pad string values to at least 8 characters   W. Landsman  April 94
       Aug 95: added /PDU option and changed routine to update last occurence
               of an existing keyword (the one SXPAR reads) instead of the
               first occurence.
       Comment for string data can start after column 32 W. Landsman June 97
       Make sure closing quote supplied with string value  W. Landsman  June 98
       Converted to IDL V5.0    W. Landsman   June 98
       Increase precision of default formatting of double precision floating
               point values.   C. Gehman, JPL  September 1998
       Mar 2000, D. Lindler, Modified to use capital E instead of lower case
               e for exponential formats.
       Apr 2000, Make user-supplied format upper-case  W. Landsman 
       Oct 2001, Treat COMMENT or blank string like HISTORY keyword W. Landsman
       Jan 2002, Allow BEFORE, AFTER to apply to COMMENT keywords W. Landsman
       June 2003, Added SAVECOMMENT keyword    W. Landsman
       Jan 2004, If END is missing, then add it at the end W. Landsman
       


SXADDPAR [2] $SSW/gen/idl_libs/astron/fits/sxaddpar.pro
[Previous] [Next]
 NAME:
       SXADDPAR
 PURPOSE:
       Add or modify a parameter in a FITS header array.

 CALLING SEQUENCE:
       SXADDPAR, Header, Name, Value, [ Comment,  Location, /SaveComment, 
                               BEFORE =, AFTER = , FORMAT= , /PDU]

 INPUTS:
       Header = String array containing FITS or STSDAS header.    The
               length of each element must be 80 characters.    If not 
               defined, then SXADDPAR will create an empty FITS header array.

       Name = Name of parameter. If Name is already in the header the value 
               and possibly comment fields are modified.  Otherwise a new 
               record is added to the header.  If name is equal to 'COMMENT'
               or 'HISTORY' or a blank string then the value will be added to 
               the record without replacement.  For these cases, the comment 
               parameter is ignored.

       Value = Value for parameter.  The value expression must be of the 
               correct type, e.g. integer, floating or string.  String values
                of 'T' or 'F' are considered logical values.

 OPTIONAL INPUT PARAMETERS:
       Comment = String field.  The '/' is added by this routine.  Added 
               starting in position 31.    If not supplied, or set equal to 
               '', or /SAVECOMMENT is set, then the previous comment field is 
               retained (when found) 

       Location = Keyword string name.  The parameter will be placed before the
               location of this keyword.    This parameter is identical to
               the BEFORE keyword and is kept only for consistency with
               earlier versions of SXADDPAR.

 OPTIONAL INPUT KEYWORD PARAMETERS:
       BEFORE  = Keyword string name.  The parameter will be placed before the
               location of this keyword.  For example, if BEFORE='HISTORY'
               then the parameter will be placed before the first history
               location.  This applies only when adding a new keyword;
               keywords already in the header are kept in the same position.

       AFTER   = Same as BEFORE, but the parameter will be placed after the
               location of this keyword.  This keyword takes precedence over
               BEFORE.

       FORMAT  = Specifies FORTRAN-like format for parameter, e.g. "F7.3".  A
               scalar string should be used.  For complex numbers the format
               should be defined so that it can be applied separately to the
               real and imaginary parts.  If not supplied then the default is
               'G19.12' for double precision, and 'G14.7' for floating point.

       /PDU    = specifies keyword is to be added to the primary data unit
               header. If it already exists, it's current value is updated in
               the current position and it is not moved.
       /SAVECOMMENT = if set, then any existing comment is retained, i.e. the
               COMMENT parameter only has effect if the keyword did not 
               previously exist in the header.
 OUTPUTS:
       Header = updated FITS header array.

 CALLED BY:
	ATV, CREATE_NRH_CFILE, CREATE_NRH_PFILE, DISPLOI_MON5K, EXTGRP, FITS_ADD_CHECKSUM
	FITS_CD_FIX, FITS_READ, FITS_WRITE, FTADDCOL, FTCREATE, FTDELCOL, FTDELROW, FTHMOD
	FTKEEPROW, FTPUT, GETPSF, GSSS_STDAST, HASTROM, HBOXAVE, HCONGRID, HEXTRACT, HPRECESS
	HREBIN, HREVERSE, HROT, HROTATE, INTGCOMP_NRH2, IRAFRD, MKHDR [1], MKHDR [2], MODFITS
	PUTAST, RDPSF, READFITS [1], READFITS [2], READFITS [3], READFITSL, RFITS2 [1]
	RFITS2 [2], RH_GET_HEADER, RH_RDIMCUBE, SUM_XINPUT, SXHMAKE, SXHWRITE, SXMAKE
	TAB_READ, TBDELCOL, TBDELROW, T_APER, T_FIND, T_GETPSF, T_GROUP, T_NSTAR, WFPC2_READ
	WRITEFITS [1], WRITEFITS [2], WRITE_FLUXNRH, WRITE_POSINRH, WRITE_SUMMARIES [2]
	ZDEGR, ZGETPLUME, ZMKHDR, ZPICK, cal_pol, imcalc, las_auto_exp, mk_limb_pixmap
	mk_mdi_fits, mk_minim, mk_stdim, mk_stdim_hdr, mk_stdim_list, poly_diffim
	raw_list2pixmap, read_mdi, scan4limb, sda2fits, zd4, zoverlay [1], zoverlay [2]
	zreadfits, zregister_eit, zstructify, zwritefits
 EXAMPLE:
       Add a keyword 'TELESCOP' with the value 'KPNO-4m' and comment 'Name
       of Telescope' to an existing FITS header h.

       IDL> sxaddpar, h, 'TELESCOPE','KPNO-4m','Name of Telescope'
 NOTES:
       The functions SXADDPAR() and FXADDPAR() are nearly identical, with the
       major difference being that FXADDPAR forces required FITS keywords
       BITPIX, NAXISi, EXTEND, PCOUNT, GCOUNT to appear in the required order
       in the header, and FXADDPAR supports the OGIP LongString convention.   
       There is no particular reason for having two nearly identical 
       procedures, but both are too widely used to drop either one.

       All HISTORY records are inserted in order at the end of the header.

       All COMMENT records are also inserted in order at the end of the header
       header, but before the HISTORY records.  The BEFORE and AFTER keywords
       can override this.

       All records with no keyword (blank) are inserted in order at the end of
       the header, but before the COMMENT and HISTORY records.  The BEFORE and
       AFTER keywords can override this.

 RESTRICTIONS:
       Warning -- Parameters and names are not checked
               against valid FITS parameter names, values and types.

 MODIFICATION HISTORY:
       DMS, RSI, July, 1983.
       D. Lindler Oct. 86  Added longer string value capability
       Converted to NEWIDL  D. Lindler April 90
       Added Format keyword, J. Isensee, July, 1990
       Added keywords BEFORE and AFTER. K. Venkatakrishna, May '92
       Pad string values to at least 8 characters   W. Landsman  April 94
       Aug 95: added /PDU option and changed routine to update last occurence
               of an existing keyword (the one SXPAR reads) instead of the
               first occurence.
       Comment for string data can start after column 32 W. Landsman June 97
       Make sure closing quote supplied with string value  W. Landsman  June 98
       Converted to IDL V5.0    W. Landsman   June 98
       Increase precision of default formatting of double precision floating
               point values.   C. Gehman, JPL  September 1998
       Mar 2000, D. Lindler, Modified to use capital E instead of lower case
               e for exponential formats.
       Apr 2000, Make user-supplied format upper-case  W. Landsman 
       Oct 2001, Treat COMMENT or blank string like HISTORY keyword W. Landsman
       Jan 2002, Allow BEFORE, AFTER to apply to COMMENT keywords W. Landsman
       June 2003, Added SAVECOMMENT keyword    W. Landsman
       Jan 2004, If END is missing, then add it at the end W. Landsman
       May 2005 Fix SAVECOMMENT error with non-string values W. Landsman
       Oct 2005 Jan 2004 change made SXADDPAR fail for empty strings W.L. 
       


SXDELPAR [1] $SSW/gen/idl/fits/sxdelpar.pro
[Previous] [Next]
 NAME:
	SXDELPAR
 PURPOSE:
	Procedure to delete a keyword parameter(s) from a FITS header

 CALLING SEQUENCE:
	sxdelpar, h, parname

 INPUTS:
	h - FITS or STSDAS header, string array
	parname - string or string array of keyword name(s) to delete

 OUTPUTS:
	h - updated FITS header, If all lines are deleted from 
		the header, then h is returned with a value of 0

 CALLED BY:
	CDS_SIMPLE_FITS, CHECK_FITS [1], CHECK_FITS [2], FITS_CD_FIX, FITS_OPEN, FITS_READ
	FITS_WRITE, FXHCLEAN [1], FXHCLEAN [2], GSSS_STDAST, HCONGRID, HREBIN, INTGCOMP_NRH2
	NRH_HSI_FITS, PUTAST, RH_GET_HEADER, SXIG12_PREP, T_FIND, WCS_HCLEAN, WRITEFITS [1]
	WRITEFITS [2], WRITE_FLUXNRH, WRITE_POSINRH, WRITE_SUMMARIES [2], ZPICK
	mk_stdim_hdr, zstructify
 EXAMPLE:
	Delete the astrometry keywords CDn_n from a FITS header, h

	IDL> sxdelpar, h, ['CD1_1','CD1_2','CD2_1','CD2_2']

 NOTES:
	(1)  No message is returned if the keyword to be deleted is not found
	(2)  All appearances of a keyword in the header will be deleted
 HISTORY:
	version 1  D. Lindler Feb. 1987
	Converted to new IDL  April 1990 by D. Lindler
	Test for case where all keywords are deleted    W. Landsman Aug 1995 
	Converted to IDL V5.0   W. Landsman   September 1997
       Allow for headers with more than 32767 lines W. Landsman Jan. 2003


SXDELPAR [2] $SSW/gen/idl_libs/astron/fits/sxdelpar.pro
[Previous] [Next]
 NAME:
	SXDELPAR
 PURPOSE:
	Procedure to delete a keyword parameter(s) from a FITS header

 CALLING SEQUENCE:
	sxdelpar, h, parname

 INPUTS:
	h - FITS or STSDAS header, string array
	parname - string or string array of keyword name(s) to delete

 OUTPUTS:
	h - updated FITS header, If all lines are deleted from 
		the header, then h is returned with a value of 0

 CALLED BY:
	CDS_SIMPLE_FITS, CHECK_FITS [1], CHECK_FITS [2], FITS_CD_FIX, FITS_OPEN, FITS_READ
	FITS_WRITE, FXHCLEAN [1], FXHCLEAN [2], GSSS_STDAST, HCONGRID, HREBIN, INTGCOMP_NRH2
	NRH_HSI_FITS, PUTAST, RH_GET_HEADER, SXIG12_PREP, T_FIND, WCS_HCLEAN, WRITEFITS [1]
	WRITEFITS [2], WRITE_FLUXNRH, WRITE_POSINRH, WRITE_SUMMARIES [2], ZPICK
	mk_stdim_hdr, zstructify
 EXAMPLE:
	Delete the astrometry keywords CDn_n from a FITS header, h

	IDL> sxdelpar, h, ['CD1_1','CD1_2','CD2_1','CD2_2']

 NOTES:
	(1)  No message is returned if the keyword to be deleted is not found
	(2)  All appearances of a keyword in the header will be deleted
 HISTORY:
	version 1  D. Lindler Feb. 1987
	Converted to new IDL  April 1990 by D. Lindler
	Test for case where all keywords are deleted    W. Landsman Aug 1995 
	Converted to IDL V5.0   W. Landsman   September 1997
       Allow for headers with more than 32767 lines W. Landsman Jan. 2003


SXGINFO $SSW/gen/idl_libs/astron/sdas/sxginfo.pro
[Previous] [Next]
 NAME:
	SXGINFO

 PURPOSE:
	Return information on all group parameters in an STSDAS header.
 EXPLANATION:
	Return datatype, starting byte, and number bytes for all group
	parameters in an STSDAS file.     Obtaining these values 
	greatly speed up execution time in subsequent calls to SXGPAR.

 CALLING SEQUENCE:
	sxginfo, h, par, type, sbyte, nbytes

 INPUTS:
	h - header returned by SXOPEN
	par - parameter block returned by SXREAD or multiple
		parameter blocks stored in array of dimension
		greater than one.

 OUTPUT:
	type - data type (if not supplied or null string, the
		header is searched for type,sbyte, and nbytes)
	sbyte - starting byte in parameter block for data
	nbytes - number of bytes in parameter block for data

	The number of elements in type,sbyte and nbytes equals the total
	number of group parameters.

 METHOD:
	The parameter type for each parameter is obtained
	from PDTYPEn keyword.  If not found then DATATYPE keyword
	value is used.  If that is not found then BITPIX is
	used.  BITPIX=8, byte; BITPIX=16 integer*2; BITPIX=32
	integer*4.

 NOTES:
	For an example of the use of SXGINFO, see CONV_STSDAS

 CALLS: ***
	SXPAR [1], SXPAR [2], SXPAR [3]
 HISTORY:
	version 1  W. Landsman   Apr. 93

	Converted to IDL V5.0   W. Landsman   September 1997


SXGPAR $SSW/gen/idl_libs/astron/sdas/sxgpar.pro
[Previous] [Next]
 NAME:
	SXGPAR                           

 PURPOSE:
	Obtain group parameter value in SDAS/FITS file

 CALLING SEQUENCE:
	result = sxgpar( h, par, name, [ type, sbyte, nbytes] )

 INPUTS:
	h - header returned by SXOPEN
	par - parameter block returned by SXREAD or multiple
		parameter blocks stored in array of dimension
		greater than one.
	name - parameter name (keyword PTYPEn) or integer
		parameter number.

 OPTIONAL INPUT/OUTPUT
	type - data type (if not supplied or null string, the
		header is searched for type,sbyte, and nbytes)
	sbyte - starting byte in parameter block for data
	nbytes - number of bytes in parameter block for data

 OUTPUT:
	parameter value or value(s) returned as function value

 CALLS: ***
	SXPAR [1], SXPAR [2], SXPAR [3]
 CALLED BY:
	EXTGRP
 SIDE EFFECTS:
	If an error occured then !err is set to -1

 OPERATIONAL NOTES:
	Supplying type, sbyte and nbytes greatly decreases execution
	time.  The best way to get the types is on the first call
	pass undefined variables for the three parameters or set
	type = ''.  The routine will then return their values for
	use in subsequent calls.
	
 METHOD:
	The parameter type for parameter n is obtained
	from PDTYPEn keyword.  If not found then DATATYPE keyword
	value is used.  If that is not found then BITPIX is
	used.  BITPIX=8, byte; BITPIX=16 integer*2; BITPIX=32
	integer*4.

 HISTORY:
	version 1  D. Lindler  Oct. 86
	version 2  D. Lindler Jan. 90  added ability to process
		multiple parameter blocks in single call
	version 3  D. Lindler  (converted to New vaxidl)
       Apr 14 1991      JKF/ACC - fixed make_array datatypes(float/double)
	Converted to IDL V5.0   W. Landsman   September 1997


SXGREAD $SSW/gen/idl_libs/astron/sdas/sxgread.pro
[Previous] [Next]
 NAME:
	SXGREAD
 PURPOSE:
	Read group parameters from a Space Telescope STSDAS image file     

 CALLING SEQUENCE:
	grouppar = sxgread( unit, group )

 INPUTS:
	UNIT   = Supply same unit as used in SXOPEN.
	GROUP  =  group number to read.  if omitted, read first group.
		The first group is number 0.

 OUTPUTS:
	GROUPPAR  =  parameter values from fits group parameter block.
		It is a byte array which may contain multiple data types.
		The function SXGPAR can be used to retrieve values from it.

 COMMON BLOCKS:
	Uses IDL Common STCOMMN to access parameters.
 SIDE EFFECTS:
	IO is performed. 
 MODIFICATION HISTORY:
	WRITTEN, Don Lindler, July, 1 1987
	MODIFIED, Don Neill, Jan 11, 1991 - derived from sxread.pro
	Converted to IDL V5.0   W. Landsman   September 1997


SXHCOPY $SSW/gen/idl_libs/astron/sdas/sxhcopy.pro
[Previous] [Next]
 NAME:
	SXHCOPY                            
 PURPOSE:
	Copies selected portions of one header to another

 CALLING SEQUENCE:
	sxhcopy, h, keyword1, keyword2, hout

 INPUTS:
	h - input header
	keyword1 - first keyword to copy
	keyword2 - last keyword to copy

 INPUT/OUTPUT:
	hout - header to copy the information to.

 METHOD:
	the headers lines from keyword1 to keyword2 are copied to
	the end of the output header.  No check is made to verify
	that a keyword value already exists in the output header.

 HISTORY:
	version 1  D. Lindler    Sept. 1989
	Converted to IDL V5.0   W. Landsman   September 1997


SXHMAKE $SSW/gen/idl_libs/astron/sdas/sxhmake.pro
[Previous] [Next]
 NAME:
       SXHMAKE
 PURPOSE:
       Create a basic STSDAS header file from an IDL data array

 CALLING SEQUENCE:
       sxhmake, Data, Groups, Header

 INPUTS:
       Data = IDL data array of the same type, dimensions and
               size as are to be written to file.
       Groups = # of groups to be written.

 OUTPUTS:
       Header = String array containing ST header file.

 CALLS: ***
	GET_DATE [1], GET_DATE [2], SXADDPAR [1], SXADDPAR [2], SXADDPAR [3]
 PROCEDURE:
       Call sxhmake to create a header file.  Then call sxopen to
       open output image, followed by sxwrite to write the data.
       If you do not plan to change the header created by sxhmake
       before calling sxopen, you might consider using sxmake which
       does both steps.

 MODIFICATION HISTORY:
       Don Lindler  Feb 1990 modified from SXMAKE by DMS, July, 1983.
       D. Lindler April 90  Converted to new VMS IDL
       M. Greason May 1990  Header creation bugs eliminated.
       W. Landsman Aug 1997 Use SYSTIME() instead of !STIME for V5.0 
       Converted to IDL V5.0   W. Landsman   September 1997
       Recognize unsigned datatype    January 2000   W. Landsman 


SXHREAD $SSW/gen/idl_libs/astron/sdas/sxhread.pro
[Previous] [Next]
 NAME:
       SXHREAD
 PURPOSE:
       Procedure to read a STSDAS header from disk.
 EXPLANATION:
       This version of SXHREAD can read two types of disk files
       (1)  Unix stream files with a CR after every 80 bytes
       (2)  Variable length record files 
       (3)  Fixed length (80 byte) record files

 CALLING SEQUENCE:
       sxhread, name, header

 INPUT:
       name - file name, scalar string.  An extension of .hhh is appended
               if not already supplied.   (Note STSDAS headers are required
               to have a 3 letter extension ending in 'h'.)   gzip extensions
               .gz will be recognized as compressed.
 OUTPUT:
       header - STSDAS header, string array
 NOTES:
       SXHREAD  does not do any checking to see if the file is a valid
       STSDAS header.    It simply reads the file into a string array with
       80 byte elements

 CALLED BY:
	SXOPEN
 HISTORY:
       Version 1  D. Lindler  July, 1987
       Version 2  M. Greason, August 1990
       Use READU for certain ST VAX GEIS files   W. Landsman January, 1992
       Read variable length Unix files  E. Deutsch/W. Landsman November, 1994
       Converted to IDL V5.0   W. Landsman   September 1997
       Updated by E. Artigau to handle gzipped fits  August 2004
       Remove VMS support, W. Lnadsman September 2006


SXHWRITE $SSW/gen/idl_libs/astron/sdas/sxhwrite.pro
[Previous] [Next]
 NAME:
       SXHWRITE
 PURPOSE:
       Procedure to write an STSDAS or FITS header to disk as a *.hhh file.

 CALLING SEQUENCE:
       SXHWRITE,name,h

 INPUTS:
       name - file name. If an extension is supplied it must be 3 characters
               ending in "h".
       h - FITS header, string array

 CALLS: ***
	FDECOMP [1], FDECOMP [2], FDECOMP [3], SXADDPAR [1], SXADDPAR [2], SXADDPAR [3]
	ZPARCHECK [1], ZPARCHECK [2], ZPARCHECK [3]
 CALLED BY:
	SXOPEN
 SIDE EFFECTS:
       File with specified name is written.  If qualifier not specified
       then .hhh is used
   
       SXHWRITE will modify the header in the following ways, if necessary
       (1)  If not already present, an END statement is added as the 
               last line.   Lines after an existing END statment are
               deleted.
       (2)  Spaces are appended to force each line to be 80 characters.
       (3)  On Unix machines, a carriage return is appended at the end
               of each line.   This is consistent with STSDAS and allows
               the file to be directly displayed on a stream device

 PROCEDURES USED:
       zparcheck, fdecomp
 HISTORY:
       version 1  D. Lindler  June 1987
       conversion cleaned up.  M. Greason, June 1990
       Add carriage return at the end of Unix files   W. Landsman Oct 1991
       Use SYSTIME() instead of !STIME for V5.0 compatibility Aug 1997
       Assume since V55, remove VMS support


SXI_COPY $SSW/gen/idl/fund_lib/sxi/sxi_copy.pro
[Previous] [Next]
 Project     : SXI

 Name        : SXI_COPY

 Purpose     : copy SXI file via HTTP sockets

 Category    : utility system sockets

 Syntax      : IDL> sxi_copy,file,outdir=outdir
                   
 Inputs      : FILE = remote file name to copy with URL path (optional)

 Outputs     : None

 Keywords    : OUT_DIR = output directory to copy file
               ERR   = string error message

 Example     :
              First list remote files from NGDC server using 'sxi_files'  

              IDL> f=sxi_files('1-dec-01','2-dec-01',/ngdc,/full)
              IDL> sxi_copy,f,/progress
              
              Or copy without including path name:

              IDL> sxi_copy,'SXI_20011201_000202041_BB_12.FTS'

 History     : 15-Jan-2003,  D.M. Zarro (EER/GSFC)  Written

 Contact     : DZARRO@SOLAR.STANFORD.EDU


sxi_files $SSW/gen/idl/fund_lib/sxi/sxi_files.pro
[Previous] [Next]
   Name: sxi_files

   Purpose: return sxi filnames

   Input Paramters:
      time0 - vector of desired times or start time of range
      time1 - stop time if range desired

   Keyword Parameters:
      nfiles (output) - number of files returned
      level0 (switch) - if set, return level0 names
      level1 (switch) - if set, return level1 names (default)
      graphics (switch) - if set, return graphics file names (*.png)
      ngdc (switch) - if set, use direct NGDC socket listing (not catalog)
      goesn - GOES sat# desired (default=12) 
      full_path (switch) - if set, return full path (def is just file name)
 
   Calling Sequence:
      sxifiles=sxi_files(time0,time1 [/level0, /graphics, nfiles=nfiles]

   Calling Examples:
      sxifiles=sxi_files('12:30 2-dec-2000','14:00 3-dec-2000') ; level1 in range
      sxifiles=sxi_files(eitindex) ; sxi closest to input EIT index (times)

   History:
      11-Jan-2003 - S.L.Freeland - from mdi_files/eit_files analog
      12-Jan-2003 - Zarro (EER/GFSC), added obj_destroy for cleanup
      13-Jan-2003 - S.L.Freeland - add /PARSE_TIME switch to file2time call
      14-Jan-2003 - Zarro (EER/GSFC) - added call to SXI_SERVER() and optimized
                    for Windows
      17-Jan-2003 - Zarro (ERR/GSFC) - anytim->parse_time, unix delim(server)
      17-Jan-2003 - S.L.Freeland - remove xtra day pad from range stop time
                                   for time vector option, only uniq subdirs
      20-Jan-2003 - Zarro - removed extra directory search,
                            redundant PARSE_TIME call, and
                            extra time range search for date only input times 
      26-Jan-2003 - Zarro - added check for text file listing
                            in remote directory
       4-aug-2003 - S.L.Freeland - fixed problem when start and stop times
                    were on a day boundry (incorrect subscripting)
                    enhanced filter to reject non image lines in html html index 
       5-jun-2004 - S.L.Freeland - additonal parse required for ngdc change
      16-mar-2005 - S.L.Freeland - add /LEVEL2 keyword (coronal hole product for example)
       1-aug-2006 - S.L.Freeland - pass GOESN->sxi_server.pro (top_path sat#dependent)

   Method:
      Two options:
         Use SSW sxi catalog 
         Direct listing via sockets->ngdc (via DMZarro socket package)

 CALLS: ***
	BOX_MESSAGE, CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], DPRINT, EXIST
	FILE2TIME, LOCAL_NAME, SINCE_VERSION [1], SINCE_VERSION [2], SXI_SERVER, UNIQ [1]
	UNIQ [2], UNIQ [3], anytim [1], anytim [2], anytim [3], anytim [4], anytim [5]
	concat_dir [4], sel_timrange [1], sel_timrange [2], ssw_strsplit
	str_replace [1], str_replace [2], strextract, tim2dset [1], tim2dset [2], timegrid
  Restrictions:
    Only /NGDC (direct socket listing) option available for now
    (which I'll use to generate and enable catalog option asap...) 


SXI_GBO $SSW/gen/idl/synoptic/sxi_gbo.pro
[Previous] [Next]
 Project     : RHESSI

 Name        : SXI_GBO

 Purpose     : update Max Millennium catalog with SXI flare observations

 Category    : synoptic gbo 

 Syntax      : IDL> sxi_gbo,gev

 Inputs      : GEV = GOES events structure from RD_GEV
     
 Keywords    : REPROCESS = reprocess existing entries
               VERBOSE = set verbose output
             
 CALLS: ***
	ANYTIM2TAI, ANYTIM2UTC [1], ANYTIM2UTC [2], ARR2STR [1], Arr2Str [2], DEF_GBO, EXIST
	FILE_BREAK, LIST_NAR, PURGE_GBO, RESTORE_GBO, TRIM, TRIM2, UPDATE_GBO, decode_gev
	gt_day [1], gt_day [2], gt_time [1], gt_time [2], is_number [1], is_number [2]
	is_struct
 CALLED BY:
	UPDATE_MM
 History     : Written 10 March 2003, D. Zarro (EER/GSFC)

 Contact     : dzarro@solar.stanford.edu


sxi_latest $SSW/gen/idl/fund_lib/sxi/sxi_latest.pro
[Previous] [Next]
 Project     : SXI

 Name        : sxi_latest

 Purpose     : Searches, downloads, and plots latest GOES12/SXI Level-1 image
               from NGDC. 

 Category    : Synoptic display

 Syntax      : IDL> sxi_latest,file

 Inputs      : None

 Outputs     : FILE = name of FITS file found and plotted.
               Plot to current window, or PNG file (/PNG)

 Keywords    : PNG = set to plot PNG
               OUT_DIR = directory to download FITS file and create PNG file
               BACK = # of days to look back [def = 3]
               CLEANUP = cleanup downloaded files
               NOPLOT = skip plotting to screen
               GIF = set to plot GIF
               HOURS = limit search to HOURS [def= 24]
               NO_ROLL = do not correct for ROLL

 CALLS: ***
	ALLOW_GIF, BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], IS_STRING
	SSW_WRITE_GIF, break_file [4]
 History     : Written 8 March 2003, Zarro (EER/GSFC)
               Modified, 13-Aug-2003, William Thompson
                      - Use SSW_WRITE_GIF instead of WRITE_GIF
               Modified, 3-Jan-2006, Zarro (L-3Com/GSFC)
                      - remove COMMON block
               Modified, 28-Jul-2006, Zarro (ADNET/GSFC)
                      - added SATELLITE keyword

 Contact     : dzarro@solar.stanford.edu


SXI_SERVER $SSW/gen/idl/fund_lib/sxi/sxi_server.pro
[Previous] [Next]
 Project     : SXI                                             
                                                               
 Name        : SXI_SERVER                                      
                                                               
 Purpose     : return first available SXI data server          
                                                               
 Category    : synoptic sockets                                
                                                               
 Inputs      : None                                            
                                                               
 Outputs     : SERVER = SXI data server name                   
                                                               
 Keywords    : NETWORK = 1 if network is up                    
               PATH = top data path                            
               NO_CHECK= skip network check                    
               FULL = include HTTP in server name              
               SATELLITE = GOES satellite [def=12]
                                                               
 CALLS: ***
	HAVE_NETWORK, is_number [1], is_number [2]
 CALLED BY:
	sxi_files
 History     : 15-Jan-2003,  D.M. Zarro (EER/GSFC) - written    
               28-Jul-2006, Zarro (ADNET/GSFC) - added SATELLITE
                                                               
 Contact     : DZARRO@SOLAR.STANFORD.EDU                       


SXI_STARTUP $SSW/gen/idl/fund_lib/sxi/sxi_startup.pro
[Previous] [Next]
Project      : SXI

 Name        : SXI_STARTUP

 Purpose     : Load SXI software and databases

 Category    : system
                   
 Inputs      : None

 Outputs     : None

 Keywords    : QUIET = set for no output

 CALLS: ***
	LOAD_PATH
 History     : 31-Jan-2003,  D.M. Zarro (EER/GSFC)  Written

 Contact     : DZARRO@SOLAR.STANFORD.EDU


SXMAKE $SSW/gen/idl_libs/astron/sdas/sxmake.pro
[Previous] [Next]
 NAME:
       SXMAKE
 PURPOSE:
       Create a basic ST header file from an IDL array prior to writing data.

 CALLING SEQUENCE:
       sxmake, Unit, File, Data, Par, Groups, Header, [ PSIZE = ]

 INPUTS:
       Unit = Logical unit number from 1 to 9.
       File = file name of data and header files to create.   If no file name
              extension is supplied then the default is to use .hhh for the
              header file extension and .hhd for the data file extension    
              If an extension is supplied, it should be of the form .xxh
              where xx are any alphanumeric characters.
       Data = IDL data array of the same type, dimensions and
               size as are to be written to file.
       Par = # of elements in each parameter block for each data record.  If 
             set equal to 0, then parameter blocks will not be written.  The 
             data type of the parameter blocks must be the same as the data 
             array.   To get around this restriction, use the PSIZE keyword.
       Groups = # of groups to write.  If 0 then write in basic
               format without groups.  

 OPTIONAL INPUT PARAMETERS:
       Header = String array containing ST header file.  If this
               parameter is omitted, a basic header is constructed.
               If included, the basic parameters are added to the
               header using sxaddpar.  The END keyword must terminate
               the parameters in Header.

 OPTIONAL KEYWORD INPUT PARAMETER:
        PSIZE - Integer scalar giving the number of bits in the parameter 
               block.    If the PSIZE keyword is given, then the Par input
               parameter is ignored.
                
 OPTIONAL OUTPUT PARAMETERS:
       Header = ST header array, an 80 by N character array.

 CALLS: ***
	GET_DATE [1], GET_DATE [2], SXADDPAR [1], SXADDPAR [2], SXADDPAR [3], SXOPEN
 COMMON BLOCKS:
       Stcommn - as used in sxwrite, sxopen, etc.

 SIDE EFFECTS:
       The header file is created and written and then the
       data file is opened on the designated unit.

 RESTRICTIONS:
       Header files must be named .xxh and data files must be
       named .xxd, where xx are any alphanumeric characters.

 PROCEDURE:
       Call sxmake to create a header file.  Then call sxwrite
       to output each group.
 
 PROCEDURES USED:
       GET_DATE, SXADDPAR, SXOPEN
 MODIFICATION HISTORY:
       DMS, July, 1983.
       converted to new VMS IDL  April 90
       Use SYSTIME() instead of !STIME   W. Landsman   Aug 1997
       Converted to IDL V5.0   W. Landsman   September 1997
       Added optional PSIZE keyword   August 1999 W. Landsman 
       Recognize unsigned datatype    January 2000   W. Landsman 


SXOPEN $SSW/gen/idl_libs/astron/sdas/sxopen.pro
[Previous] [Next]
 NAME:
       SXOPEN
 PURPOSE:
       Open a Space Telescope formatted (STSDAS) header file.
 EXPLANATION:
       Saves the parameters required subsequent SX routines in
       the common block Stcommn.  Optionally save the header in 
       the string array Header, and the history in the string array
       History.  Open the data file associated with this
       header on the same unit.

 CALLING SEQUENCE:
       SXOPEN, Unit, Fname [, Header [,History] [,Access]]

 INPUTS:
       Unit = IDL unit used for IO.  Must be from 1 to 9.
       Fname = File name of header file.  Default extension
               is .hhh for header files and .hhd for data
               files.    If an extension is supplied it must have the 
               form .xxh where xx are any alphanumeric characters. The
               data file must have extension .xxd
               No version number is allowed.  Most recent versions
               of the files are used.

 OPTIONAL INPUT PARAMETER:
       Access = 'R' to open for read, 'W' to open for write.

 OUTPUTS:
       Stcommn = Common block containing ST parameter blocks.
               (Long arrays.)

 OPTIONAL OUTPUT PARAMETERS:
       Header = 80 char by N string array containing the
               names, values and comments from the FITS header.
               Use the function SXPAR to obtain individual
               parameter values.
       History = String array containing the value of the
               history parameter.

 CALLS: ***
	SXHREAD, SXHWRITE
 CALLED BY:
	SXMAKE, WFPC2_READ
 COMMON BLOCKS:
       STCOMMN - Contains RESULT(20,10) where RESULT(i,LUN) =
       0 - 121147 for consistency check, 1 - Unit for consistency,
       2 - bitpix, 3 - naxis, 4 - groups (0 or 1), 5 - pcount,
       6 - gcount, 7 - psize, 8 - data type as idl type code,
       9 - bytes / record, 10 to 10+N-1 - dimension N,
       17 = record length of file in bytes.
       18 - # of groups written, 19 = gcount.

 SIDE EFFECTS:
       The data and header files are accessed.

 RESTRICTIONS:
       Works only for disc files.  The data file must have
       must have the extension ".xxd" and the header file must
       have the extension ".xxh" where x is any alphanumeric character

 PROCEDURE:
       The header file is opened and each line is read.
       Important parameters are stored in the output
       parameter.  If the last two parameters are specified
       the parameter names and values are stored.  The common
       block STCOMMN is filled with the type of data, dimensions,
       etc. for use by SXREAD.

       If access is for write, each element of the header
       array, which must be supplied, is written to the
       header file.  The common block is filled with
       relevant parameters for SXWRITE.  A keyword of "END"
       ends the header.

 MODIFICATION HISTORY:
       Written, DMS, May, 1983.
       D. Lindler Feb. 1990
               Modified to allow var. record length header files.
       D. Lindler April 1990   Conversion to new VMS IDL
       Added /BLOCK when opening new .hhd file
       Converted to IDL V5.0   W. Landsman   September 1997
       Recognize unsigned datatype for V5.1 or greater   W. Landsman Jan 2000
       Assume since V5.5  W. Landsman Sep 2006


SXPAR [1] $SSW/gen/idl/fits/sxpar.pro
[Previous] [Next]
 NAME:
      SXPAR
 PURPOSE:
      Obtain the value of a parameter in a FITS header

 CALLING SEQUENCE:
      result = SXPAR( Hdr, Name, [ Abort, COUNT=, COMMENT =, /NoCONTINUE  ])   

 INPUTS:
      Hdr =  FITS header array, (e.g. as returned by READFITS) 
             string array, each element should have a length of 80 characters      

      Name = String name of the parameter to return.   If Name is of the
             form 'keyword*' then an array is returned containing values of
             keywordN where N is an integer.  The value of keywordN will be
             placed in RESULT(N-1).  The data type of RESULT will be the
             type of the first valid match of keywordN found.

 OPTIONAL INPUTS:
       ABORT - string specifying that SXPAR should do a RETALL
               if a parameter is not found.  ABORT should contain
               a string to be printed if the keyword parameter is not found.
               If not supplied, SXPAR will return quietly with COUNT = 0
               (and !ERR = -1) if a keyword is not found.

 OPTIONAL INPUT KEYWORDS: 
       /NOCONTINUE = If set, then continuation lines will not be read, even
                 if present in the header
       /SILENT - Set this keyword to suppress warning messages about duplicate
                 keywords in the FITS header.

 OPTIONAL OUTPUT KEYWORDS:
       COUNT - Optional keyword to return a value equal to the number of 
               parameters found by SXPAR, integer scalar

       COMMENT - Array of comments associated with the returned values

 OUTPUTS:
       Function value = value of parameter in header.
               If parameter is double precision, floating, long or string,
               the result is of that type.  Apostrophes are stripped
               from strings.  If the parameter is logical, 1b is
               returned for T, and 0b is returned for F.
               If Name was of form 'keyword*' then a vector of values
               are returned.

 CALLS: ***
	STRNUMBER [1], STRNUMBER [2], STRNUMBER [3], STRNUMBER [4]
 CALLED BY:
	ABSCAL, ADXY, ARCBAR, ATV, CDSHEADFITS, COORD [1], CURVAL, ELLIPSE_MAILLE, EXTGRP
	FITS CLASS DEFINITION, FITS_ADD_CHECKSUM, FITS_CD_FIX, FITS_INFO [1]
	FITS_INFO [2], FITS_OPEN, FITS_READ, FITS_TEST_CHECKSUM [1]
	FITS_TEST_CHECKSUM [2], FITS_WRITE, FTAB_HELP, FTDELROW, FTHELP, FTINFO, FTKEEPROW
	FTSIZE, FXMOVE [1], FXMOVE [2], GET_EQUINOX, GET_LIST, GSSSEXTAST, GSSS_STDAST
	HASTROM, HBOXAVE, HCONGRID, HEADFITS [3], HEXTRACT, HREBIN, IMCONTOUR, IMDBASE, IRAFRD
	MKDI_C1, MKMOVIE_kpd, MKQUERY, MODFITS, MOVIE_MAKER, NSTAR, OVSA2MAP, Open Packet File
	Open Score File, PB_INVERTER, POINTING3, PUTAST, RDPSF, READFITS [1], READFITS [2]
	READFITS [3], READFITSL, READ_COMPRESSED, REDUCE_IMG_HDR2
	Radio Astronomy Group Fits Read, ST_DISKREAD, ST_DISK_DATA, ST_DISK_GEIS
	ST_DISK_TABLE, SUBSTAR, SUMMARY_PLOT, SXGINFO, SXGPAR, SXI_021_HDR [1], TAB_WRITE
	TBDELROW, TBHELP, TBINFO, TBSIZE, TVLASER, T_APER, T_FIND, T_GETPSF, T_NSTAR, VALIDCDSHEAD
	WFLIMB, WFPC2_METRIC, WFPC2_READ, WRITEFITS [1], WRITEFITS [2], WSAVE_PS [2], ZDEGR
	ZGETPLUME, ZPICK, ZPRINTSUN, cal_fig_mich, cal_fig_pol, check_dumps [1]
	disp_sci160k [1], disp_sci160k [2], disp_sci5k, display_ovsamap, dpc_img_summary
	edac_summary, exp_scale min_exp max_exp [1], fits_disp_month [1]
	fits_disp_month [2], fp_iwcw, fpc1_phot, get_linearity sig e_min e_max
	getl05hdrparam, imagr [1], ipcom, is_fits [1], is_fits [2], las_auto_exp
	las_exp_norm, ltc, mask_out, mdi_comp_eff, mdipict, mk_ascii_list, mk_dpc_image
	mk_mdi_fits, mk_minim, mk_stdim, mk_stdim_hdr, mk_stdim_list, mon_health [1]
	mon_health [2], monitor_center [1], new_disp_sci5k [1], new_disp_sci5k [2]
	new_edac_summary, new_mon_health [1], new_mon_health [2], od_bright
	polariz_display, poly_diffim, read_ltc file, read_mdi, sxpar2 [1], sxpar2 [2]
	wrt_sci160k_img, wsave1, wsave2, xdisp_tfr, zd4, zoverlay [1], zoverlay [2], zprfits
	zreadfits, zregister_eit, zstructify, zwritefits
 SIDE EFFECTS:
       !ERR is set to -1 if parameter not found, 0 for a scalar
       value returned.  If a vector is returned it is set to the
       number of keyword matches found.    The use of !ERR is deprecated, and
       instead the COUNT keyword is preferred

       If a keyword (except HISTORY or COMMENT) occurs more than once in a 
       header, a warning is given, and the *last* occurence is used.

 EXAMPLES:
       Given a FITS header, h, return the values of all the NAXISi values
       into a vector.    Then place the history records into a string vector.

       IDL> naxisi = sxpar( h ,'NAXIS*')         ; Extract NAXISi value
       IDL> history = sxpar( h, 'HISTORY' )      ; Extract HISTORY records

 PROCEDURE:
       The first 8 chacters of each element of Hdr are searched for a 
       match to Name.  The value from the last 20 characters is returned.  
       An error occurs if there is no parameter with the given name.

       If a numeric value has no decimal point it is returned as type
       LONG.   If it contains more than 8 numerals, or contains the 
       characters 'D' or 'E', then it is returned as type DOUBLE.  Otherwise
       it is returned as type FLOAT.    Very large integer values, outside
       the range of valid LONG, are returned as DOUBLE.

       If the value is too long for one line, it may be continued on to the
       the next input card, using the OGIP CONTINUE convention.  For more info,
       http://heasarc.gsfc.nasa.gov/docs/heasarc/ofwg/docs/ofwg_recomm/r13.html

       Complex numbers are recognized as two numbers separated by one or more
       space characters.

       If a numeric value has no decimal point (or E or D) it is returned as
       type LONG.  If it contains more than 8 numerals, or contains the
       character 'D', then it is returned as type DOUBLE.  Otherwise it is
       returned as type FLOAT.    If an integer is too large to be stored as
       type LONG, then it is returned as DOUBLE.

 NOTES:
       The functions SXPAR() and FXPAR() are nearly identical, although
       FXPAR() has slightly more sophisticated parsing.   There is no
       particular reason for having two nearly identical procedures, but
       both are too widely used to drop either one.

 PROCEDURES CALLED:
       GETTOK(), VALID_NUM()
 MODIFICATION HISTORY:
       DMS, May, 1983, STPAR Written.
       D. Lindler Jan 90 added ABORT input parameter
       J. Isensee Jul,90 added COUNT keyword
       W. Thompson, Feb. 1992, added support for FITS complex values.
       W. Thompson, May 1992, corrected problem with HISTORY/COMMENT/blank
               keywords, and complex value error correction.
       W. Landsman, November 1994, fix case where NAME is an empty string 
       W. Landsman, March 1995,  Added COMMENT keyword, ability to read
               values longer than 20 character
       W. Landsman, July 1995, Removed /NOZERO from MAKE_ARRAY call
       T. Beck May 1998, Return logical as type BYTE
       W. Landsman May 1998, Make sure integer values are within range of LONG
       Converted to IDL V5.0, May 1998
       W. Landsman Feb 1998, Recognize CONTINUE convention 
       W. Landsman Oct 1999, Recognize numbers such as 1E-10 as floating point
       W. Landsman Jan 2000, Only accept integer N values when name = keywordN
       W. Landsman Dec 2001, Optional /SILENT keyword to suppress warnings
       W. Landsman/D. Finkbeiner  Mar 2002  Make sure extracted vectors 
             of mixed data type are returned with the highest type.


SXPAR [2] $SSW/gen/idl_libs/astron/fits/sxpar.pro
[Previous] [Next]
 NAME:
      SXPAR
 PURPOSE:
      Obtain the value of a parameter in a FITS header

 CALLING SEQUENCE:
      result = SXPAR( Hdr, Name, [ Abort, COUNT=, COMMENT =, /NoCONTINUE  ])   

 INPUTS:
      Hdr =  FITS header array, (e.g. as returned by READFITS) 
             string array, each element should have a length of 80 characters      

      Name = String name of the parameter to return.   If Name is of the
             form 'keyword*' then an array is returned containing values of
             keywordN where N is an integer.  The value of keywordN will be
             placed in RESULT(N-1).  The data type of RESULT will be the
             type of the first valid match of keywordN found.

 OPTIONAL INPUTS:
       ABORT - string specifying that SXPAR should do a RETALL
               if a parameter is not found.  ABORT should contain
               a string to be printed if the keyword parameter is not found.
               If not supplied, SXPAR will return quietly with COUNT = 0
               (and !ERR = -1) if a keyword is not found.

 OPTIONAL INPUT KEYWORDS: 
       /NOCONTINUE = If set, then continuation lines will not be read, even
                 if present in the header
       /SILENT - Set this keyword to suppress warning messages about duplicate
                 keywords in the FITS header.

 OPTIONAL OUTPUT KEYWORDS:
       COUNT - Optional keyword to return a value equal to the number of 
               parameters found by SXPAR, integer scalar

       COMMENT - Array of comments associated with the returned values

 OUTPUTS:
       Function value = value of parameter in header.
               If parameter is double precision, floating, long or string,
               the result is of that type.  Apostrophes are stripped
               from strings.  If the parameter is logical, 1b is
               returned for T, and 0b is returned for F.
               If Name was of form 'keyword*' then a vector of values
               are returned.

 CALLS: ***
	STRNUMBER [1], STRNUMBER [2], STRNUMBER [3], STRNUMBER [4]
 CALLED BY:
	ABSCAL, ADXY, ARCBAR, ATV, CDSHEADFITS, COORD [1], CURVAL, ELLIPSE_MAILLE, EXTGRP
	FITS CLASS DEFINITION, FITS_ADD_CHECKSUM, FITS_CD_FIX, FITS_INFO [1]
	FITS_INFO [2], FITS_OPEN, FITS_READ, FITS_TEST_CHECKSUM [1]
	FITS_TEST_CHECKSUM [2], FITS_WRITE, FTAB_HELP, FTDELROW, FTHELP, FTINFO, FTKEEPROW
	FTSIZE, FXMOVE [1], FXMOVE [2], GET_EQUINOX, GET_LIST, GSSSEXTAST, GSSS_STDAST
	HASTROM, HBOXAVE, HCONGRID, HEADFITS [3], HEXTRACT, HREBIN, IMCONTOUR, IMDBASE, IRAFRD
	MKDI_C1, MKMOVIE_kpd, MKQUERY, MODFITS, MOVIE_MAKER, NSTAR, OVSA2MAP, Open Packet File
	Open Score File, PB_INVERTER, POINTING3, PUTAST, RDPSF, READFITS [1], READFITS [2]
	READFITS [3], READFITSL, READ_COMPRESSED, REDUCE_IMG_HDR2
	Radio Astronomy Group Fits Read, ST_DISKREAD, ST_DISK_DATA, ST_DISK_GEIS
	ST_DISK_TABLE, SUBSTAR, SUMMARY_PLOT, SXGINFO, SXGPAR, SXI_021_HDR [1], TAB_WRITE
	TBDELROW, TBHELP, TBINFO, TBSIZE, TVLASER, T_APER, T_FIND, T_GETPSF, T_NSTAR, VALIDCDSHEAD
	WFLIMB, WFPC2_METRIC, WFPC2_READ, WRITEFITS [1], WRITEFITS [2], WSAVE_PS [2], ZDEGR
	ZGETPLUME, ZPICK, ZPRINTSUN, cal_fig_mich, cal_fig_pol, check_dumps [1]
	disp_sci160k [1], disp_sci160k [2], disp_sci5k, display_ovsamap, dpc_img_summary
	edac_summary, exp_scale min_exp max_exp [1], fits_disp_month [1]
	fits_disp_month [2], fp_iwcw, fpc1_phot, get_linearity sig e_min e_max
	getl05hdrparam, imagr [1], ipcom, is_fits [1], is_fits [2], las_auto_exp
	las_exp_norm, ltc, mask_out, mdi_comp_eff, mdipict, mk_ascii_list, mk_dpc_image
	mk_mdi_fits, mk_minim, mk_stdim, mk_stdim_hdr, mk_stdim_list, mon_health [1]
	mon_health [2], monitor_center [1], new_disp_sci5k [1], new_disp_sci5k [2]
	new_edac_summary, new_mon_health [1], new_mon_health [2], od_bright
	polariz_display, poly_diffim, read_ltc file, read_mdi, sxpar2 [1], sxpar2 [2]
	wrt_sci160k_img, wsave1, wsave2, xdisp_tfr, zd4, zoverlay [1], zoverlay [2], zprfits
	zreadfits, zregister_eit, zstructify, zwritefits
 SIDE EFFECTS:
       !ERR is set to -1 if parameter not found, 0 for a scalar
       value returned.  If a vector is returned it is set to the
       number of keyword matches found.    The use of !ERR is deprecated, and
       instead the COUNT keyword is preferred

       If a keyword (except HISTORY or COMMENT) occurs more than once in a 
       header, a warning is given, and the *last* occurence is used.

 EXAMPLES:
       Given a FITS header, h, return the values of all the NAXISi values
       into a vector.    Then place the history records into a string vector.

       IDL> naxisi = sxpar( h ,'NAXIS*')         ; Extract NAXISi value
       IDL> history = sxpar( h, 'HISTORY' )      ; Extract HISTORY records

 PROCEDURE:
       The first 8 chacters of each element of Hdr are searched for a 
       match to Name.  The value from the last 20 characters is returned.  
       An error occurs if there is no parameter with the given name.

       If a numeric value has no decimal point it is returned as type
       LONG.   If it contains more than 8 numerals, or contains the 
       characters 'D' or 'E', then it is returned as type DOUBLE.  Otherwise
       it is returned as type FLOAT.    Very large integer values, outside
       the range of valid LONG, are returned as DOUBLE.

       If the value is too long for one line, it may be continued on to the
       the next input card, using the OGIP CONTINUE convention.  For more info,
       http://heasarc.gsfc.nasa.gov/docs/heasarc/ofwg/docs/ofwg_recomm/r13.html

       Complex numbers are recognized as two numbers separated by one or more
       space characters.

       If a numeric value has no decimal point (or E or D) it is returned as
       type LONG.  If it contains more than 8 numerals, or contains the
       character 'D', then it is returned as type DOUBLE.  Otherwise it is
       returned as type FLOAT.    If an integer is too large to be stored as
       type LONG, then it is returned as DOUBLE.

 NOTES:
       The functions SXPAR() and FXPAR() are nearly identical, although
       FXPAR() has slightly more sophisticated parsing.   There is no
       particular reason for having two nearly identical procedures, but
       both are too widely used to drop either one.

 PROCEDURES CALLED:
       GETTOK(), VALID_NUM()
 MODIFICATION HISTORY:
       DMS, May, 1983, STPAR Written.
       D. Lindler Jan 90 added ABORT input parameter
       J. Isensee Jul,90 added COUNT keyword
       W. Thompson, Feb. 1992, added support for FITS complex values.
       W. Thompson, May 1992, corrected problem with HISTORY/COMMENT/blank
               keywords, and complex value error correction.
       W. Landsman, November 1994, fix case where NAME is an empty string 
       W. Landsman, March 1995,  Added COMMENT keyword, ability to read
               values longer than 20 character
       W. Landsman, July 1995, Removed /NOZERO from MAKE_ARRAY call
       T. Beck May 1998, Return logical as type BYTE
       W. Landsman May 1998, Make sure integer values are within range of LONG
       Converted to IDL V5.0, May 1998
       W. Landsman Feb 1998, Recognize CONTINUE convention 
       W. Landsman Oct 1999, Recognize numbers such as 1E-10 as floating point
       W. Landsman Jan 2000, Only accept integer N values when name = keywordN
       W. Landsman Dec 2001, Optional /SILENT keyword to suppress warnings
       W. Landsman/D. Finkbeiner  Mar 2002  Make sure extracted vectors 
             of mixed data type are returned with the highest type.


sxpar2 [1] $SSW/gen/idl/genutil/sxpar2.pro
[Previous] [Next]
NAME:
	sxpar2
PURPOSE:
	Allow a 2-D array to have the keyword extracted
SAMPLE CALLING SEQUENCE:
	out = sxpar2(h, 'REFTIME')
 CALLS: ***
	SXPAR [1], SXPAR [2], SXPAR [3], data_type [1], data_type [2]
 CALLED BY:
	mon_health [1], mon_health [2], new_mon_health [1], new_mon_health [2]
HISTORY:
	Written 23-May-96 by M.Morrison


SXREAD $SSW/gen/idl_libs/astron/sdas/sxread.pro
[Previous] [Next]
 NAME:
	SXREAD
 PURPOSE:
	Read a Space Telescope STSDAS image file     

 CALLING SEQUENCE:
	result = sxread( Unit, group , [par] )

 INPUTS:
	UNIT  =  Unit number of file, must be from 1 to 9.
		Unit must have been opened with SXOPEN.
	GROUP  =  group number to read.  if omitted, read first record.
		The first record is number 0.
 OUTPUTS:
	Result of function  =  array constructed from designated record.

 OPTIONAL OUTPUT:
	PAR  =  Variable name into which parameter values from STSDAS
		group parameter block are read.  It is a byte array
		which may contain multiple data types.  The function
		SXGPAR can be used to retrieve values from it.

 CALLED BY:
	WFPC2_READ
 COMMON BLOCKS:
	Uses IDL Common STCOMMN to access parameters.

 NOTES:
	Use the function SXGREAD to read the group parameter blocks without
	having to read the group array.

	If the STSDAS file does not contain groups, then the optional output
	parameter PAR is returned undefined, but no error message is given.

 SIDE EFFECTS:
	IO is performed. 
 MODIFICATION HISTORY:
	WRITTEN, Don Lindler, July, 1 1987
	Converted to IDL V5.0   W. Landsman   September 1997


SXT__DEFINE $SSW/gen/idl/synoptic/sxt__define.pro
[Previous] [Next]
 Project     : HESSI

 Name        : SXT__DEFINE

 Purpose     : Define an SXT map object

 Category    : imaging maps

 Explanation : The map object is actually a structure with a pointer
               field. The map structure is stored in this pointer.
               The SXT object inherits MAP object properties and methods,
               and includes a special SXT reader.
          
 Syntax      : This procedure is invoked when a new SXT object is
               created via:

               IDL> new=obj_new('sxt')
 Examples    :

 Inputs      : 'SXT' = object classname (a subclass of MAP)

 Opt. Inputs : map = map structure created by MAKE_MAP

 Outputs     : A MAP object with methods: SET, GET, & PLOT

 Opt. Outputs: None

 Keywords    : None

 CALLS: ***
	EXIST, INDEX2MAP, LOADCT, LOC_FILE [1], LOC_FILE [2], LOC_FILE [3], PLOT_MAP
	SXT::INIT, SXT::LOADCT, SXT::PLOT, SXT::READ, VALID_MAP, read_sxt
 Common      : None

 Restrictions: None

 Side effects: None

 History     : Written 19 May 1998, D. Zarro, SM&A/GSFC

 Contact     : dzarro@solar.stanford.edu


SXWRITE $SSW/gen/idl_libs/astron/sdas/sxwrite.pro
[Previous] [Next]
 NAME:
	SXWRITE
 PURPOSE:
	Write a group of data and parameters in ST format
	to a STSDAS data file.

 CALLING SEQUENCE:
	SXWRITE, Unit, Data,[ Par]

 INPUTS:
	Unit = unit number of file.  The file must have been
		previously opened by SXOPEN.
	Data = Array of data to be written.  The dimensions
		must agree with those supplied to SXOPEN and written
		into the FITS header.  The type is converted if
		necessary.

 OPTIONAL INPUT PARAMETERS:
	Par = parameter block.  The size of this array must
		agree with the Psize parameter in the FITS header.

 OUTPUTS:
	None.
 COMMON BLOCKS:
	STCOMMN - Contains RESULT(20,10) where RESULT(i,LUN) =
	0 - 121147 for consistency check, 1 - Unit for consistency,
	2 - bitpix, 3 - naxis, 4 - groups (0 or 1), 5 - pcount,
	6 - gcount, 7 - psize, 8 - data type as idl type code,
	9 - bytes / record, 10 to 10+N-1 - dimension N,
	18 - # of groups written, 19 = gcount.

 SIDE EFFECTS:
	The data are written into the next group.

 RESTRICTIONS:
	SXOPEN must have been called to initialize the
	header and the common block.

 MODIFICATION HISTORY:
	DMS, July, 1983.
	D.Lindler July, 1986 - changed block size of file to 512
			moved group parameters after the groups data.
	D.Lindler July, 1987 - modified to allow any size parameter block
			(in bytes).
	D. Lindler  April, 1990 - converted to new VMS IDL
	Converted to IDL V5.0   W. Landsman   September 1997


SYNOP_DB__DEFINE $SSW/gen/idl/synoptic/synop_db__define.pro
[Previous] [Next]
 Project     : HESSI

 Name        : SYNOP_DB__DEFINE

 Purpose     : Define database for Synoptic data achive

 Category    : HESSI, Synoptic, Database, widgets, objects

 CALLS: ***
	DPRINT, IS_BLANK, IS_STRING, PTR_ALLOC, REVERSE, STR2ARR [1], STR2ARR [2]
	SYNOP_DB::CLEANUP, SYNOP_DB::INIT, SYNOP_DB::INIT_DESC, SYNOP_DB::INIT_NAMES
	SYNOP_DB::IS_REMOTE, SYNOP_DB::LIST_SYNOP_DESC, SYNOP_DB::LIST_SYNOP_DIRS
	SYNOP_DB::LIST_SYNOP_NAMES, SYNOP_DB::LIST_SYNOP_SITES
	SYNOP_DB::LIST_SYNOP_WAVES, SYNOP_DB::MAKE_DB, SYNOP_DB::VALID_SYNOP_DIRS
	WHERE_VECTOR, get_uniq
 History     : 13-Aug-2000,  D.M. Zarro (EIT/GSFC)  Written

 Contact     : DZARRO@SOLAR.STANFORD.EDU


SYNOP_DEFINE $SSW/gen/idl/synoptic/synop__define.pro
[Previous] [Next]
 Project     : HESSI                                                                        
                                                                                            
 Name        : SYNOP_DEFINE                                                                 
                                                                                            
 Purpose     : Define a SYNOP data object                                                   
                                                                                            
 Category    : GBO Synoptic Objects                                                         
                                                                                            
 Syntax      : IDL> c=obj_new('synop')                                                      
                                                                                            
 CALLS: ***
	ALLOW_SOCKETS, ANYTIM2TAI, APPEND_ARR, ARR2STR [1], Arr2Str [2], CHKLOG [1]
	CHKLOG [2], COMDIM2, DPRINT, ERR_STATE, GET_TEMP_DIR, HAVE_PROC, IS_BLANK, IS_DIR
	IS_STRING, MK_DFONT, PARSE_TIME, SOCK_COPY, STR2ARR [1], STR2ARR [2], SYNOP::APPLY
	SYNOP::CLEANUP, SYNOP::CONFIG, SYNOP::FETCH, SYNOP::GET_CACHE_ID
	SYNOP::GET_CATS, SYNOP::GET_SEARCH_DIRS, SYNOP::GET_SYNOP_DIRS, SYNOP::HGET
	SYNOP::HSEARCH, SYNOP::INIT, SYNOP::LIST, SYNOP::LSEARCH, SYNOP::RCOPY
	SYNOP::RSEARCH, SYNOP::SETPROP, SYNOP::SET_SYNOP_DIRS, SYNOP::SHOW
	SYNOP::SYNOP_EVENT, SYNOP_EVENT, SYNOP_PATH, SYNOP_SERVER, SYNOP__DEFINE, TRIM
	TRIM2, WHERE2, WHERE_VECTOR, WIDGET_MBASE, WRITE_DIR, XACK, XKILL, XMANAGER, XMENU2
	XREALIZE, YMD2DATE, curdir [1], curdir [2], get_uniq, is_number [1], is_number [2]
	is_struct, str_replace [1], str_replace [2]
 History     : Written 5 March 2000, D. Zarro, SM&A/GSFC                                     
               Modified 29 March 2006, Zarro (L-3Com/GSFC) 
                - fixed remote file checking     
               Modified 18 Nov 2006, Zarro (ADNET/GSFC) 
                - removed HTTP as a property (caused persistence problems)
                                                                                            
 Contact     : dzarro@solar.stanford.edu                                                    


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

 Name        : synop_link

 Purpose     : make a link between SYNOP data files and 
               $SYNOP_DATA/target_dir

 Category    : synoptic gbo

 Syntax      : IDL> synop_link,site,tstart,tend,back=back

 Inputs      : SITE = site abbreviation (e.g. bbso)
               TSTART, TEND = start and end times to consider

 Outputs     : None

 Keywords    : BACK = days to look back
               TARGET_DIR = target directory for links

 CALLS: ***
	ARR2STR [1], Arr2Str [2], CHKLOG [1], CHKLOG [2], CONCAT_DIR [1], CONCAT_DIR [2]
	CONCAT_DIR [3], ESPAWN, IS_BLANK, MK_DIR, OS_FAMILY, SYNOP_SERVER, WRITE_DIR
	concat_dir [4], get_host [1], get_host [2], str_replace [1], str_replace [2]
 CALLED BY:
	BBSO__DEFINE, KANZ__DEFINE, KISF__DEFINE, MEUDON__DEFINE, NANCAY__DEFINE
	NOBE__DEFINE, TRACE_COPY
 Restrictions: Unix only

 History     : Written 8 March 2001, D. Zarro (EITI/GSFC)

 Contact     : dzarro@solar.stanford.edu


SYNOP_PATH $SSW/gen/idl/synoptic/synop_path.pro
[Previous] [Next]
 Project     : HESSI

 Name        : SYNOP_PATH

 Purpose     : return path to synoptic data files based on date

 Category    : synoptic sockets
                   
 Inputs      : DATE = input date [def = current time]
               SERVER = synoptic server name to check [def = beauty]

 Outputs     : PATH = path to synoptic data files

 Keywords    : None

 CALLS: ***
	ANYTIM2TAI, GET_UTC, IS_BLANK, LIST_SYNOP, TRIM
 CALLED BY:
	MDI_GBO, SYNOP_DEFINE
 History     : 28-Dec-2004,  D.M. Zarro (L-3Com/GSFC) - Written.
               20-Jan-2007, Zarro (ADNET/GSFC) - added beauty as def.

 Contact     : DZARRO@SOLAR.STANFORD.EDU


SYNOP_SERVER $SSW/gen/idl/synoptic/synop_server.pro
[Previous] [Next]
 Project     : HESSI

 Name        : SYNOP_SERVER

 Purpose     : return first available Synoptic data server

 Category    : synoptic sockets
                   
 Inputs      : None

 Outputs     : SERVER = Synoptic data server name

 Keywords    : NETWORK = 1 if network is up
               PATH = path to synoptic data
               NO_CHECK = don't check network status
               FULL_NAME = prepend 'http:// '
               SOHO = force SOHO server

 CALLS: ***
	HAVE_NETWORK, LIST_SYNOP
 CALLED BY:
	EIS_SOCK_FIND [1], EIS_SOCK_FIND [2], EIT_GBO, GET_SOHO_ROLL, MDI_GBO
	SYNOP_DEFINE, TRACE_GBO, synop_link
 History     : 29-Dec-2001,  D.M. Zarro (EITI/GSFC) -written
               20-Jan-2007, Zarro (ADNET/GSFC) - added achilles

 Contact     : DZARRO@SOLAR.STANFORD.EDU


SYS2UT $SSW/gen/idl/utplot/sys2ut.pro
[Previous] [Next]

 NAME: 
	SYS2UT

 PURPOSE:
 function to get current time (which is given in seconds since 70/1/1) and
 convert it to seconds since 79/1/1,0 so we can use atime and get ASCII
 time in our normal format yy/mm/dd,hhmm:ss.xxx


 CATEGORY:
	GEN

 CALLING SEQUENCE:
	result = SYS2UT()

 CALLS:
	none
 INPUTS:
       none, dummy 

 OPTIONAL INPUTS:
	none

 OUTPUTS:
       The result is time in seconds from 1-jan-1979

 OPTIONAL OUTPUTS:
	none

 KEYWORDS:
	none
 CALLED BY:
	ASCII_RATES, ASCII_RAW, BATSE_FLARES_WEEK, CONT_EDGES, Create_update_tar
	DISCSP_EDGES, EDGES_HVSPEC, FLARE_LIST, FLIST, FLISTOC, FS_PRINT, FS_READ_DD
	FS_SUBTITLE, GD, GFITS_W, HXRFITS_EXT1, HXRFITS_EXT2, HXRFITS_HEAD, MK_MODUL_PATRN
	QL_DAY_PLOT, QL_ORBIT_PLOT, READ_DISCLA_FITS, WRITE_MONTH_CAT, gfits_ext1
	gfits_ext2, gfits_head, read_dd
 COMMON BLOCKS:
	none

 SIDE EFFECTS:
	none

 RESTRICTIONS:
	none

 PROCEDURE:
	Uses IDL systime function. Time from 1-jan-1970.

 MODIFICATION HISTORY:
 akt 4/7/91


syst2ex [1] $SSW/gen/idl/fund_lib/yohkoh/syst2ex.pro
[Previous] [Next]
   Name: syst2ex

   Purpose: return current time in yohkoh db terms

   slf, 6-mar-92 from existing routines 

 CALLS:
 CALLED BY
	adsdirs [1], adsdirs [2], ccd_sunc [1], ccd_sunc [2], check_process [1]
	check_process [2], cnvtimstr, diskbench, goes_gaps, goes_plot [1], goes_plot [2]
	goes_plot [3], goes_plot [4], goes_plot [5], goes_summary, last_lc, launch [1]
	launch [2], mk_ydbtape [1], mk_ydbtape [2], rdtbl


SYSTIM $SSW/gen/idl/time/systim.pro
[Previous] [Next]
 Project     : RHESSI

 Name        : SYSTIM

 Purpose     : Wrapper around IDL systime that returns more sensible
               string times

 Category    : utility time

 Syntax      : IDL> time=systim()

 Inputs      : Same as SYSTIME

 Outputs     : Same as SYSTIME, except for the following difference:
                IDL> print,systime()
                  Sun Jan  1 12:42:03 2006
                IDL> print,systim()
                  1-Jan-2006 17:41:42.254

 Keywords    : Same as SYSTIME

 CALLS: ***
	ANYTIM2TAI, EXIST, IS_STRING, TAI2UTC, UT_DIFF
 CALLED BY:
	eis_cpt_gui [1], eis_cpt_gui [2], eis_import_linelist [1]
	eis_import_linelist [2], eis_import_raster [1], eis_import_raster [2]
	eis_read_linelist_block [1], eis_read_linelist_block [2]
	eis_read_raster_block [1], eis_read_raster_block [2]
	eis_read_study_block [1], eis_read_study_block [2]
	eis_timeline_plot_gui [1], eis_timeline_plot_gui [2]
 History     : 1-Jan-2006, Zarro (L-3Com/GSFC) - first IDL program of 2006

 Contact     : DZARRO@SOLAR.STANFORD.EDU