PAD_TAG $SSW/gen/idl/struct/pad_tag.pro
[Previous] [Next]
 Project     : EIS

 Name        : PAD_TAG

 Purpose     : pad strings tags in structure to have non-zero length

 Category    : structures

 Syntax      : IDL> pad_tag,struct

 Inputs      : STRUCT = input structure

 Outputs     : STRUCT = padded structure

 Keywords    : None

 CALLS: ***
	is_struct
 History     : 2-Jan-2005,  D.M. Zarro (L-3Com/GSFC)  Written

 Contact     : DZARRO@SOLAR.STANFORD.EDU


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

 Name        : PAIR_STRUCT

 Category    : structures, utility

 Purpose     :	Pair a structure down into component "tag:value" pairs

 Explanation :	Useful for input to CREATE_STRUCT

 Syntax      : IDL>pair =pair_struct(struct)

 Inputs      : STRUCT = structure to pair

 Opt. Inputs : None

 Outputs     : PAIR = string array of pairs,
                e.g: {a:1,b:2} --> ["a",s.(0),"b",s.(1)]

 Opt. Outputs: None

 Keywords    : DUPLICATE = set to allow duplicate tag names
               EQUAL = if set, then
               {a:1,b:2} --> 'a=s.(0),b=s.(1)'
               COLON = if set, then
               {a:1,b:2} --> 'a:s.(0),b:s.(1)'

 CALLS: ***
	APPEND_ARR, ARR2STR [1], Arr2Str [2], DATATYPE [1], DATATYPE [2], DATATYPE [3]
	EXIST, IS_STRING, PR_SYNTAX, TRIM
 CALLED BY:
	JOIN_STRUCT [2], MAKE_MAP, REM_DUP_TAG, REM_TAG [2]
 History     : Written,  1-Apr-1997,  D.M. Zarro (ARC)
             : Modified, 1-Nov-1999,  D.M. Zarro (SM&A) - add /EQUAL
             : Modified, 13-Sept-2001,  D.M. Zarro (EITI/GSFC) - add /COLON

 Contact     : DZARRO@SOLAR.STANFORD.EDU


PARAPEAK $SSW/gen/idl/image/parapeak.pro
[Previous] [Next]
 PROJECT:
       HESSI
 NAME:
	PARAPEAK

 PURPOSE:
	Given a 3x3 array, does parabolic fits to determine position and value of peak

 CATEGORY:
	IMAGE

 CALLING SEQUENCE:
	Result = parapeak (z, err_msg=err_msg)

 INPUTS:
	z - (3,3) array of image values.  Middle value should be highest, corners lowest.

 OUTPUT KEYWORDS:
	err_msg - '' if no error, otherwise contains error message

 OUTPUT:
   Returns a 3-element vector containing the x,y coordinates of the peak (relative to the middle
     of the central pixel) in units of pixel size and the value at the inferred peak.

 CALLED BY:
	HSI_MAP_EVALUATOR [1], HSI_MAP_EVALUATOR [2], hsi_imagefile2png
 PROCEDURE:
   Given a 3x3 array in which the corner values are lower than any intermediate value,
   PARAPEAK assumes that these correspond to the top of a 2-D circular gaussian; does
   a pair of 1-D parabolic fits and returns the 2-D peak location and value.
   The 3x3 array supposedly represents the function z at x=0,1,2 and y=0,1,2

   Note that there is considerable redundancy in the data which has not been exploited.
   An alternate technique would be to use just the 5 values in the '+' shaped configuration.

 CALLS: ***
	MEAN, SAME_DATA [1], SAME_DATA [2]
 COMMON BLOCKS:
	None.

 WRITTEN:  Gordon Hurford Dec 2000, ghurford@ssl.berkeley.edu
 MODIFICATIONS:
   2-Aug-2002, Kim.  Added documentation and error checks


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

 Name        :	
	PARCHECK
 Purpose     :	
	Routine to check user parameters to a procedure
 Explanation :	
	Routine to check user parameters to a procedure
 Use         :	
	parcheck, parameter, parnum, types, dimens, [ message ]

 CALLED BY:
	CDS_LINEFIT_WRAP, CDS_READ_MISSING, CDS_SAVE_MISSING, CFITSLIST, CFIT_APATCH
	CFIT_BLOCK, COPY_TAG_VALUES, CWQ_DSPWAV [1], CWQ_IMAGE [1], CWQ_SPECTR [1]
	CWQ_WINSEL [1], CW_MOUSE, CW_PLOTZ [1], CW_PSELECT, CW_PZOOM [1], DISCP_RESP
	DSP_MOVIE, DSP_POINT, DSP_WAV, FIND_FILES, GT_BIMAGE, GT_CDS_TIME, GT_DETY, GT_HDR
	GT_IIMAGE, GT_LAMBDA, GT_MIMAGE, GT_SCANP, GT_SCANT, GT_SCANX, GT_SCANY, GT_SOLARX
	GT_SOLARY, GT_SPECTRUM, GT_VALID, GT_WAVEBAND, GT_WINDATA, GT_WINDESC, GT_WINDOW
	LAD_RESP, PICKFITS, RD_ASCII [1], SFITSLIST, STRUNF, ST_WINDATA, TEXT_MATCH
	XCDS_COSMIC, XCFIT, XCFIT_BLOCK, XDIFF, XPLOTSCALE, XTVSCALE, cw_plotz [2]
	cw_pzoom [2], cwq_dspwav [2], cwq_image [2], cwq_spectr [2], cwq_winsel [2]
	EXAMPLE:

	IDL> parcheck, hdr, 2, 7, 1, 'FITS Image Header'

	This example checks whether the parameter 'hdr' is of type string (=7)
	and is a vector (1 dimension).   If either of these tests fail, a 
	message will be printed
		"Parameter 2 (FITS Image Header) is undefined"
		"Valid dimensions are 1"
		"Valid types are string"	

 Inputs      :	
 ###	progname  - scalar string name of calling procedure
	parameter - parameter passed to the routine
	parnum    - integer parameter number
	types     - integer scalar or vector of valid types
		 1 - byte        2 - integer  3 - int*4
		 4 - real*4      5 - real*8   6 - complex
		 7 - string      8 - structure
	dimens   - integer scalar or vector giving number
		      of allowed dimensions.

 Opt. Inputs :	
	message - string message describing the parameter to be printed if an 
		error is found


 Outputs     :	None.

 Opt. Outputs:	None.

 Keywords    :	RESULT: Receives the error messages (string array)
                       if the keyword /NOERROR is set.
               
               NOERROR: Set to avoid error message (stopping)
                 
               MINVAL: Minimum value for the parameter. Checked
                       agains MIN([parameter]).

               MAXVAL: Maximum value for the parameter.

 Calls       : ***
	DEFAULT, STR_SEP, TRIM
 Common      :	None.

 Restrictions:	None.

 Side effects:	
	If an error in the parameter is a message is printed
	a RETALL issued

 Category    :	Utilities, Miscellaneous

 Prev. Hist. :	
       Taken from ZPARCHECK:
	version 1  D. Lindler  Dec. 86
	documentation updated.  M. Greason, May 1990.
       

 Written     :	D. Lindler, GSFC/HRS, December 1986

 Modified    :	Version 1 (ZPARCHECK), William Thompson, GSFC, 29 March 1994
			Incorporated into CDS library
               Version 2, Stein Vidar Haugan, UiO, October 1995

 Version     :	Version 2, 11-October-1995


PARSE_ATIME [1] $SSW/gen/idl/utplot/parse_atime.pro
[Previous] [Next]
 Project     : SDAC    
                   
 Name        : PARSE_ATIME
               
 Purpose     : This procedure parses a time in any of the allowed 
		formats and returns year, month, day, hour, minutes, 
		and/or seconds depending on which keyword parameters
		have been passed.  If the keyword STRING is set, 
		the values are returned as strings, otherwise as numbers.

               
 Category    : UTPLOT, TIME 
               
 Explanation : Input is converted to HXRBS format and quantities
		extracted by position in string using STRMID.
               
 Use         : 
    
 Inputs      : Time- Time in format handled by ANYTIM.PRO
               
 Opt. Inputs : None
               
 Outputs     : None

 Opt. Outputs: None
               
 Keywords    : YEAR   - Integer years, last two digits only.
		MONTH  - Integer months.
		DAY    - Integer days.
		HOUR   - Integer hours, ZULU.
		MIN    - Integer minutes.
		SEC    - Seconds, including fractions
		STRING - If set, return numbers as strings.
		ERROR  - Set if ANYTIM fails.

 Calls       : ***
	anytim [1], anytim [2], anytim [3], anytim [4], anytim [5]
 CALLED BY:
	BAT_MERGE, DO_ALANSLIST, DO_EVENTLISTS, DO_QLARCHIVE, FILELIST, FLARE_F_NAME
	GETFLARE, HXRFITS_EXT1, HXRFITS_EXT2, HXRFITS_HEAD, MAIN_HTML, PLOTBATSE_QL
	PROCESS_SLLD_DBASE, QLPRINT, QL_ORBIT_PLOT, QL_PLOTTER, READQUAL, RESTORE_QLOOK
	SAVE_DCDATA, TWIDGET, WRITE_FDB, cp_catwidget, gfits_ext1, gfits_ext2, gfits_files
	gfits_head, mksort
 Common      : None
               
 Restrictions: 
               
 Side effects: None.
               
 Prev. Hist  : Written by Kim Tolbert, 3/5/92


 Modified    : Version 2,  
		1/11/94 by AKT to allow any kind of time as 
		input (previously required an ASCII time), and call 
		anytim instead of atime.
		Version 3, RAS, 5-feb-1997 documentation header


PARSE_COMLINE $SSW/gen/idl/string/parse_comline.pro
[Previous] [Next]

 NAME:
	PARSE_COMLINE 

 PURPOSE:
       This function parses a string that has fields separated by commas or blanks and 
       return an array of strings, one string per field.

 CATEGORY:
       STRING

 CALLING SEQUENCE:
       Result = PARSE_COMLINE(Input_string,Nvalues) 

 CALLS: ***
	CHECKVAR [1], checkvar [2]
 INPUTS:
 	Input_string:	String to parse.

 OUTPUTS:
	Result:		Parsed string.

 OPTIONAL OUTPUTS:
	Nvalues:	Number of separate fields found on line.

 KEYWORDS:
       NOCOMMAS:	Blanks separate fields in Input_string rather than
   		 	commas.See PROCEDURE for explanation.
	DELIM:		Alternative delimiter to comma, single character
	NOCASE:		If set, case of command line is left unchanged, 
			otherwise it is changed to uppercase. 

 CALLED BY:
	FIND_DBFILE, FLDISPLAY, FLISTOC, FLSTRING_TYPE, GETFLARE, GET_SPEC_GAIN
	Help_spex [1], Help_spex [2], OP_COM [1], OP_COM [2], SPEX_COMMONS [2]
	SPEX_COMMONS [4], SPEX_PROC [1], SPEX_PROC [2]
 PROCEDURE:
       When the NOCOMMA keyword is set, blanks separate fields.  When 
	NOCOMMA is not set, commas separate fields, and fields may contain 
	blanks.  Used mainly for user-input strings that contain multiple 
	entries in one string. 

 MODIFICATION HISTORY:
       RAS, 1992
	Mod. 11/28/94  Fixed bug with non-comma delimiters!
	Mod. 07/14/94  Delim input left as string
       Mod. 05/08/96 by RCJ. Added documentation.


parse_lines [1] $SSW/gen/idl/genutil/parse_lines.pro
[Previous] [Next]
NAME:
	parse_lines
PURPOSE:
	To take a string (or an array of strings) and to 
	reformat it so that a given string is no longer than
	a given value.  Breaks are done at with space
SAMPLE CALLING SEQUENCE:
	mat = parse_lines(input, ncpl)
	mat = parse_lines(mat0, 50)
INPUT:
	input	- The string (or string array)
	ncpl	- number of characters per line
OUTPUT:
	returns a string array with maximum length of "ncpl"
 CALLS: ***
	ARR2STR [1], Arr2Str [2]
 CALLED BY:
	doc1liners, timeline
HISTORY:
	Written 1996 by M.Morrison
	 6-Nov-96 (MDM) - Added documentation header
	28-May-97 (MDM) - Added protection for when words are longer
			  than the parsing length


PARSE_TIME $SSW/gen/idl/time/parse_time.pro
[Previous] [Next]
 Project     : RHESSI

 Name        : PARSE_TIME

 Purpose     : Parse time in a filename encoded with date/time, e.g.
               sxi_20020101_010302.fits. Uses fast REGEX.

 Category    : I/O utility time 

 Syntax      : IDL> times=parse_time(files)

 Inputs      : FILES = file names 

 Outputs     : TIMES = structure with .year, .month, .day, .hour, .minute, 
                       .millisecond fields.

 Keywords    : DELIM = time delimiter (def= '_')
               COUNT = # of files that parse correctly
               SS = indicies of files that parse correctly
               YMD = year/month/day 
               SEPARATOR = separator for YMD [def='/']
               TAI = return time in TAI format
               REGEX = user-supplied REGEX
               UTC = return UTC format
               SHORT = shorten YMD to using 2 digit yer

 CALLS: ***
	ANYTIM2TAI, ANYTIM2UTC [1], ANYTIM2UTC [2], COMDIM2, DPRINT, GET_CALLER, IS_STRING
	TRIM
 CALLED BY:
	EIT_GBO, HFITS__DEFINE, HTTP__DEFINE, MDI_GBO, MESOLA__DEFINE, NOBE__DEFINE
	SITE__DEFINE, SYNOP_DEFINE
 History     : 10-Jan-2002, Zarro (EER/GSFC)
               15-Dec-2004, Zarro (L-3Com/GSFC) - fixed IDL 6.1 space bug 
               20-Feb-2005, Zarro (L-3Com/GSFC) - added /UTC

 Contact     : DZARRO@SOLAR.STANFORD.EDU


PARTVELVEC $SSW/gen/idl_libs/astron/plot/partvelvec.pro
[Previous] [Next]
 NAME:
      PARTVELVEC

 PURPOSE:
       Plot the velocity vectors of particles at their positions
 EXPLANATION:
       This procedure plots the velocity vectors of particles (at the
       positions of the particles).

 CATEGORY:
       Plotting, Two-dimensional.

 CALLING SEQUENCE:
       PARTVELVEC, VELX, VELY, POSX, POSY [, X, Y]

 INPUTS:
       VELX:  An array of any dimension, containing the x-components
              of the particle velocities.
       VELY:  An array of the same dimension as velx, containing the
              y-components of the particle velocities.
       POSX:  An array of the same dimension as velx, containing the
              x-components of the particle positions.
       POSY:  An array of the same dimension as velx, containing the
              y-components of the particle positions.

 OPTIONAL INPUTS:
       X:   Optional abcissae values. X must be a vector.
       Y:   Optional ordinate values. Y must be a vector. If only X
            is specified, then Y is taken equal to be equal to X.

 OPTIONAL INPUT KEYWORD PARAMETERS:
       FRACTION:   The fraction of the vectors to plot. They are
                   taken at random from the complete sample.    Default is
              FRACTION = 1.0, use all vectors

       LENGTH:     The maximum vectorlength relative to the plot data
                   window.   Default = 0.08

       COLOR:      The color for the vectors, axes and titles.
              Default=!P.COLOR

       OVER:       Plot over the previous plot

       VECCOLORS:  The vector colors. Must be either a scalar, or
                   a vector the same size as VELX. Is set to COLOR by default.

       Plot        All other keywords available to PLOT are also used
       Keywords:   by this procedure.

 OUTPUTS:
       This procedure plots the velocity vectors (VELX,VELY) at the
       positions of the particles, (POSX,POSY). If X and Y are not
       specified, then the size of the plot is such that all vectors
       just fit within in the plot data window.

 SIDE EFFECTS:
       Plotting on the current device is performed.

 EXAMPLE:
       Generate some particle positions and velocities.

         POSX=RANDOMU(seed,200)
         POSY=RANDOMU(seed,200)
         VELX=RANDOMU(seed,200)-0.5
         VELY=RANDOMU(seed,200)-0.5

       Plot the particle velocities.

         PARTVELVEC, VELX, VELY, POSX, POSY

       Example using vector colors.

         POSX=RANDOMU(seed,200)
         POSY=RANDOMU(seed,200)
         VELX=RANDOMU(seed,200)-0.5
         VELY=RANDOMU(seed,200)-0.5
         magnitude = SQRT(velx^2 + vely^2)
         LOADCT, 5, NCOLORS=254, BOTTOM=1 ; Load vector colors
         TVLCT, 0, 255, 0, 255 ; Plot in GREEN
         colors = BytScl(magnitude, Top=254) + 1B
         PARTVELVEC, VELX, VELY, POSX, POSY, COLOR=255, VECCOLORS=colors

 MODIFICATION HISTORY:
       Written by:  Joop Schaye (jschaye@astro.rug.nl), Sep 1996.
       Converted to IDL V5.0   W. Landsman   September 1997
       Added /OVER keyword   Theo Brauers (th.brauers@fz-juelich.de) Jul 2002
       Added VECCOLORS keyword. David Fanning (david@dfanning.com) March, 2005


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

   Purpose: read/parse password file  - optionlly match user PATTERN

 CALLS: ***
	BOX_MESAGE, BOX_MESSAGE, FILE_EXIST [2], OS_FAMILY, STRTAB2VECT, data_chk [1]
	data_chk [2], file_exist [1], file_exist [3], rd_tfile [1], rd_tfile [2]
	str2cols [1], str2cols [2], str_replace [1], str_replace [2], wc_where [1]
	wc_where [2]
   History:
      23-Sep-1999 - S.L.Freeland - sytem management and ssw maint

   Input Parameters:
       pattern - optional string pattern to match
 
   Output Parameters:
      extracted field from passwd file, value depends on keyword

   Keyword  Parameters:
      /user, /password, /uid, /gid, /who, /home, /shell
      (mutually exclusive switches determine output)
  
   Calling Sequence:
      table=password_info( ['PATTERN'])            ; strarr(7,nusers)
      field=password_info( ['PATTERN' ] /FIELD)    ; 
  
   Calling Examples:
     users=password_info(/user)               ; return all users in pwf
     home=password_info(users(n),/home)       ; $HOME for user=users(n)
     IDL> if password_info('ftp',/home) eq '' then $
              message,'No anonymous ftp on this machine...'

     IDL> help,password_info()                      ; no switch? -> all info
          <Expression>    STRING    = Array[7, 26]  ; 

     IDL> help,password_info(get_user())            ; no switch w/pattern?
          <Expression>    STRING    = Array[7]      ; matching info


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

 Name        : PATCH_MAP

 Purpose     : patch plot an array of maps

 Category    : imaging

 Explanation : 

 Syntax      : patch_map,map

 Examples    :

 Inputs      : MAP = image map array

 Opt. Inputs : None

 Outputs     : None

 Opt. Outputs: None

 Keywords    : None

 CALLS: ***
	EXIST, GET_MAP_DRANGE, GET_MAP_XRANGE, GET_MAP_YRANGE, PLOT_MAP, PR_SYNTAX
	VALID_MAP
 Common      : None

 Restrictions: None

 Side effects: None

 History     : Written 26 April 1998, D. Zarro, SAC/GSFC

 Contact     : dzarro@solar.stanford.edu


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

   Purpose: return the path to on-line reformatted data files 

   Input Parmeters:
      module 	- reformatted file name or pattern

   Optional Keyword Parameters:
      nopath - if set, only return the module names (no path info)
      nopro  - if set, all file types in path matching module are returned
      multi  - if set, all occurences are returned (default is first)
      bydir  - if set, match is against pathname not module name

   Output Parameters: function returns full path specification 
      count - number of matches found
	
   Calling Sequence: 
	refiles=path_data(module [,count , /nopath , /bydir 

   Category:
      system, swmaint, util, gen

   Method - first call, reads generic file $DIR_GEN_SETUP/data/datamap.genx
	     into a common block - once common is established, finding module
	     is via. table lookup.  File is generated via mk_mapfile,/data.

   History: slf, 8-Aug-92
	     slf, 18-nov-92 - altered path_sw to path_data(force some keywords)
			      (change common block name and map input file)
	     slf, 22-sep-93 - read from site/setupd/datamap
  
 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], UNIQ [1], UNIQ [2], UNIQ [3]
	concat_dir [4], restgen [1], restgen [2], str_replace [1], str_replace [2]
   Restrictions: wild cards not yet handled properly


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

   Purpose: return system dependent !path delimiter

   Input Parameters:
     NONE
   
   Keyword Parameters:
     OS - used for getting other OS delimiters

   Calling Sequence:
     pdelim=path_delimiter()       ; one for this OS
     pdelim=path_delimiter(os=xxx) ; test other OS

   History:
      2-April-1998 - replace corrupted version in SSW

   Calls: ***
	OS_FAMILY


PATH_DIR $SSW/gen/idl/system/path_dir.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : PATH_DIR()
               
 Purpose     : Return directories in the path containing the input string
               
 Explanation : Searches the IDL path and returns an array of any directory
               names that include the input string.  All directories are
               returned if no input string is given. 
               
 Use         : IDL> print, path_dir(string)
               IDL> pd = path_dir('util', /show)
    
 Inputs      : None
               
 Opt. Inputs : string - search string
               
 Outputs     : Function returns a string array.
               
 Opt. Outputs: None
               
 Keywords    : SHOW  -  print output to screen

 Calls       : ***
	BREAK_PATH [1], BREAK_PATH [2], BREAK_PATH [3], GREP, PRINT_STR
 CALLED BY:
	BATSE_ONTIMES, EDGES_HVSPEC, FLDISPLAY, FLIST, FSPLOT, HESSI_DATA_PATHS [2]
	HSI_CHK_DUPLICATE, LOCAL_DIFFS, PARSE_GROSSC_ATTITUDE, PLOT_ANGC [1]
	PLOT_ANGC [2], QLDISPLAY, RAWDUMP, ROUTINE_NAME [4], ROUTINE_NAME [7], batse_menu
	hesi_grid_trans, hessi_grid_trans, pro ratesdump, setup_spex [1], setup_spex [2]
 Common      : None
               
 Restrictions: None
               
 Side effects: None
               
 Category    : Util, string
               
 Prev. Hist. : None

 Written     : C D Pike, RAL, 4-Jan-95
               
 Modified    : 

 Version     : Version 1, 4-Jan-95


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

 Name        : 
	PATH_EXPAND
 Purpose     : 
	Expands VMS logical names in a search path.
 Explanation : 
	Expands any logical names in an IDL search PATH (e.g. !PATH) into the
	directories defined by that logical name.   *** VMS only. ***
 Use         : 
	Result = PATH_EXPAND(PATH)
 Inputs      : 
	PATH = Valid IDL search path, e.g. !PATH.
 Opt. Inputs : 
	None.
 Outputs     : 
	The result of the function is a string containing a modified search
	path with the logical names expanded.
 Opt. Outputs: 
	None.
 Keywords    : 
	None.
 Calls       : ***
	GETTOK [1], GETTOK [2], GETTOK [3], GETTOK [4]
 CALLED BY:
	DOC_MENU
 Common      : 
	None.
 Restrictions: 
	The variable PATH must be in the proper format for !PATH.
 Side effects: 
	None.
 Category    : 
	Documentation, Online_help.
 Prev. Hist. : 
	William Thompson
 Written     : 
	William Thompson, GSFC, 1992.
 Modified    : 
	Version 1, William Thompson, GSFC, 23 April 1993.
		Incorporated into CDS library.
	Version 2, William Thompson, GSFC, 24 September 1993.
		Renamed to PATH_EXPAND so as to not conflict with IDL v3.1
		internal routine called EXPAND_PATH.
       Version 3, Liyun Wang, NASA/GSFC, October 2, 1996
               Used CALL_FUNCTION to call TRNLOG, which is available
               only on VMS system           
 Version     : 
	Version 3, October 2, 1996


PATH_LIB [1] $SSW/gen/idl/genutil/path_lib.pro
[Previous] [Next]
 NAME:
	PATH_LIB
 PURPOSE:
	Extract the path of one or more procedures.
 CATEGORY:
	
 CALLING SEQUENCE:
	path = path_lib()	; For prompting.
	path = path_lib(name)   ; Find full path for procedure Name using
				  the current !PATH.
 INPUTS:
	Name = string containing the name of the procedure.
	Under Unix, Name may be "*" for all modules.
	
 KEYWORDS:
 Unix KEYWORDS:
	DIRECTORY = directory to search.  If omitted, use  current directory
		and !PATH.
	MULTI = flag to allow the return of more than one pathname if the module
		exists in more than one directory in the path + the current
		directory.
       NOPRO = If present and set, then ".pro" is not appended to name.
 VMS KEYWORDS:
	None.

 OUTPUTS:
	The path name is returned as a string array.
 CALLS: ***
	PATH_LIB_UNIX [1], PATH_LIB_UNIX [2]
 CALLED BY:
	check_log [1], check_log [2], doc_library2 [1], doc_library2 [2]
	pr_path_lib [1], pr_path_lib [2], rd_soup, run_dsnfil, ys_contrib [1]
	ys_contrib [2]
 COMMON BLOCKS:
	None.
 SIDE EFFECTS:
	None.
 RESTRICTIONS:
	Nothing happens under VMS, except a warning message is printed.
 MODIFICATION HISTORY:
	Written, J. R. Lemen, 2-mar-92


PATH_LIB_UNIX [1] $SSW/gen/idl/genutil/path_lib_unix.pro
[Previous] [Next]
 NAME:
	PATH_LIB_UNIX
 PURPOSE:
	Extract the path of one or more procedures.
 CATEGORY:
	
 CALLING SEQUENCE:
	path = path_lib_unix()	; For prompting.
	path = path_lib_unix(name)	; Find full path for procedure Name
					; using the current !PATH.
 INPUTS:
	Name = string containing the name of the procedure or "*" for all.
	
 OPTIONAL INPUT PARAMETERS:
	DIRECTORY = directory to search.  If omitted, use  current directory
		and !PATH.
	MULTI = flag to allow printing of more than one file if the module
		exists in more than one directory in the path + the current
		directory.
       NOPRO =	If present and set, then ".pro" is not appended to name.
 OUTPUTS:
	The routine returns one or more paths as a string array.
 CALLED BY:
	PATH_LIB [1], PATH_LIB [2]
 COMMON BLOCKS:
	None.
 SIDE EFFECTS:
	None.
 RESTRICTIONS:
	??
 PROCEDURE:
	Straightforward.
 MODIFICATION HISTORY:
	Written, 2-mar-92, J. R. Lemen


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

   Purpose: remove elements from !path or restore original !path
   
 CALLS: ***
	ARR2STR [1], Arr2Str [2], STR2ARR [1], STR2ARR [2], rem_elem [1], rem_elem [2]
	wc_where [1], wc_where [2]
 CALLED BY:
	path_ucon, ssw_env, ssw_packages, ssw_path, ucon_path
   History:
      14-Apr-1994 (SLF) Written 
       1-Feb-1995 (SLF) added quiet keyword and function
      28-feb-1997 (SLF) pass QUIET through recursive call


PAUSE [1] $SSW/gen/idl/genutil/pause.pro
[Previous] [Next]
 Project     :	SOHO

 Name        :	PAUSE

 Purpose     :	Request that the user hit <CR> between plots.

 Category    :

 Explanation :	Use this procedure to request that the user hit <CR> between
		plots.  Ignored if the output device is Postscript or other
		printer, or the Z-buffer.

		If a "q" or "Q" is entered at the "Pause" prompt, then the
		program stops within the calling procedure (useful for
		debugging).

		If an "e" or "E" is entered at the "Pause" prompt, then exit
		completely, and return to the main level.

 Syntax      :	PAUSE  [, /QUIET ]  [, /FORCE ]  [, /RING ]

 CALLED BY:
	CF_174LG, CF_177LG, CF_180LG, CF_765LG, CF_770LG, CF_GIS1C, DTMAP, SFD_TEK, TERM_QUICK
	TERM_REVIEW, TERM_REVIEW_GIF, cal_fig_mich, check_dumps [1], do_fit_gcross
	fit_gcross, help_roll, jitter_gif_xyimg, lwa_plot_arc, make_fake_dark, mdidust
	mdipdist, mdipict, mon_health [1], mon_health [2], monthly_summary, plot_arc [1]
	plot_arc [2], plot_arc [3], plot_door_open, plot_gcross, plot_pzt_corr, plot_ssl
	pr_seq_frame_info, sat_obs_loc, scat_avg, sld_sls_vstrips, sld_vstrips, sunsets
	sxt_xsaa, synop_movie, therm_plot, tr_scan_images, trace_euv_resp [1]
	trace_euv_resp [2]
 Examples    :

 Inputs      :	None.

 Opt. Inputs :	None.

 Outputs     :	None.

 Opt. Outputs:	None.

 Keywords    :	QUIET	= If set, then the word "Pause" is not written to the
			  terminal.

		FORCE	= If set, then force a pause, even if the graphics
			  device is a printer.

		RING	= Ring the terminal bell the number of times indicated
			  by its value, or use /RING to ring once.

 Calls       :	BELL
 Common      :	None.

 Restrictions:	None.

 Side effects:	None.

 Prev. Hist. :	None.

 History     :	Written 1991 by M.Morrison
		5-Nov-96 (MDM) - Added documentation header
		Version 3, 17-Feb-1998, William Thompson, GSFC
			More graceful exit when Q key is pressed.
			Use get_kbrd instead of read.
			Allow "E"xit option.
		Version 4, 02-Mar-1998, William Thompson, GSFC
			Don't use GET_KBRD in Windows--doesn't recognize
			carriage returns.
		Version 5, 1998 Mar 02, Roger J. Thomas, GSFC  (Add /RING)

 Contact     :	MMORRISON


PB0R $SSW/gen/idl/solar/pb0r.pro
[Previous] [Next]
 Project     : SOHO - CDS

 Name        : PB0R

 Purpose     : To calculate the solar P, B0 angles and the semi-diameter.

 Explanation : Uses semi-rigorous formulae to calculate the solar P (position
               angle of pole) and B0 (latitude of point at disk centre) angles
               and also the semi-diameter of the solar disk at the date/time
               requested.

 Use         : IDL> ang = pb0r(date_time,/soho)

 Inputs      : date_time  -  the date/time specified in any CDS format

 Outputs     : Function returns a 3-element array with
                                    ang(0)  = P  (degrees)
                                    ang(1)  = B0 (degrees)
                                    ang(2)  = R  semi-diameter (arcmin or
                                                                arcsec if
                                                                keyword set)

 Keywords    : SOHO - if present the semi-diameter returned is as viewed
                      from the SOHO spacecraft
               ARCSEC - returns semi-diameter in arcsec rather than arcmins
               ERROR  - Output keyword containing error message;
                        a null string is returned if no error occurs
               RETAIN - passed to get_orbit to determine whether orbit file
                        is left open or not.
               EARTH  - set internal environment variable to EARTH view

 CALLS: ***
	ANYTIM2UTC [1], ANYTIM2UTC [2], DPRINT, EXIST, GET_UTC, HAVE_PROC, SOHO_VIEW, SUN_POS
	XREGISTERED, anytim2jd
 CALLED BY:
	ARCMIN2HEL, ARCMIN2HEL2, CONGRID [1], CONGRID [2], DROT_COORD, DROT_MAP
	DROT_MAP_FAST, DROT_RASTER, DROT_XY, EIS_IMAGE_TOOL_EVENT [1]
	EIS_IMAGE_TOOL_EVENT [2], GET_FITS_CDELT, HEL2ARCMIN [1], HEL2ARCMIN [2]
	IMAGE_TOOL_EVENT, ITOOL_LIMBFITTER, ITOOL_RD_FITS, ITOOL_SET_CSI, LAT2Y, LIMB_INFO
	MAKE_AUTO_FIT, MAKE_MANUAL_FIT, MAP2WCS, MAP__DEFINE, MDI__DEFINE, MK_LIMBFIT_BS
	NANCAY__DEFINE, PLOT_HELIO [1], PLOT_HELIO [2]
	PLOT_MAP2 WARNINGTEMPORARY FIX ONLY FOR 16 bit ZBuffer support
	RD_IMAGE_FITS, REM_MAP_LIMB, ROT_XY, UPDATE_FITLIMB, WCS_FIND_POSITION
	WHERE_OFF_LIMB, XCAT, XCOR_CDS
	cmap2gif ftsfile maxdmind ROOTroot CONTROLcontrol, eitoversxt, fixinate_mdi
	get_survey, hsi_plot_flux, laser8ew, make_grid_sphere, pmtras_analysis, read_sxt
	soho_fac, ssw_track_fov, todays_targets, zpb0r [1], zpb0r [2], ztrack
 Common      : pb0r_common (internal common block)

 Category    : Util, coords

 Prev. Hist. : Based on Fortran programs by Hohenkerk and Emerson (RGO)

 Written     : CDS/IDL version, C D Pike, RAL, 16-May-94

 Modified    : Update semi-diameter calculation, CDP, 20-May-94
		Version 3, William Thompson, GSFC, 14 November 1994
			Modified .DAY to .MJD
               Version 4, CDP, 10-Jan-96
                  Add SOHO/ARCSEC keywords and make NOW the default.
               Version 5, Liyun Wang, GSFC/ARC, March 12, 1996
                  Modified such that point of view can be changed to
                     SOHO if the env variable SC_VIEW is set to 1
                     (via the call to USE_SOHO_VIEW)
                  Added ERROR keyword
               Version 6, Liyun Wang, GSFC/ARC, March 14, 1996
                  Replaced call to GET_ORBIT with the IDL call_function
               Version 7, Liyun Wang, GSFC/ARC, March 21, 1996
                  Modified such that if no orbit file is found, earth
                     view is used
               Version 8, Liyun Wang, GSFC/ARC, April 10, 1996
                  Set SC_VIEW to 0 if no orbit files are found
               Version 9, February 6, 1997, Liyun Wang, NASA/GSFC
                  Changed call to ANYTIM2JD instead of CDS2JD
               Version 10, April 17 1997, CDP.  Added RETAIN keyword
               Version 11, July 28 1997, DMZ, fixed bug in common block
               Version 12, Nov 17 1997, DMZ, added /EARTH
		Version 13, 26 Jan 1998, William Thompson
			Correct by 1% if no orbit files are found, instead of
			setting SC_VIEW to 0.
			Fix bug involving when to recalculate SOHO positions.
               Version 14, 7 Jan 1999, Zarro (SMA/GSFC) 
                       Fixed another bug involving SC_VIEW
                       (deprecated EARTH keyword)
               Version 15, 20 Jan 1999, Zarro (SMA/GSFC)
                       Added check for GET_ORBIT in !path
		Version 16, 06-Feb-2003, William Thompson, GSFC
			Fixed bug in common block (Previous fix somehow lost?)
		Version 17, 20-Feb-2003, Zarro (EER/GSFC) 
			Added check for IMAGE_TOOL running and removed
                       silly 'goto'
               Modified, 8-Jan-2005, Zarro (L-3Com/GSFC) - added /DEBUG


PCA $SSW/gen/idl_libs/astron/math/pca.pro
[Previous] [Next]
 NAME:
    PCA

 PURPOSE:
    Carry out a Principal Components Analysis (Karhunen-Loeve Transform)
 EXPLANATION:
    Results can be directed to the screen, a file, or output variables
    See notes below for comparison with the intrinsic IDL function PCOMP.

 CALLING SEQUENCE:
    PCA, data, eigenval, eigenvect, percentages, proj_obj, proj_atr, 
             [MATRIX =, TEXTOUT = ,/COVARIANCE, /SSQ, /SILENT ]

 INPUT PARAMETERS:
     data -  2-d data matrix, data(i,j) contains the jth attribute value
               for the ith object in the sample.    If N_OBJ is the total
               number of objects (rows) in the sample, and N_ATTRIB is the 
               total number of attributes (columns) then data should be
               dimensioned N_OBJ x N_ATTRIB.

 OPTIONAL INPUT KEYWORD PARAMETERS:
     /COVARIANCE - if this keyword is set, then the PCA will be carried out
              on the covariance matrix (rare), the default is to use the
              correlation matrix
     /SILENT - If this keyword is set, then no output is printed
     /SSQ - if this keyword is set, then the PCA will be carried out on
               on the sums-of-squares & cross-products matrix (rare)
     TEXTOUT - Controls print output device, defaults to !TEXTOUT

              textout=1       TERMINAL using /more option
              textout=2       TERMINAL without /more option
              textout=3       <program>.prt
              textout=4       laser.tmp
              textout=5      user must open file
              textout = filename (default extension of .prt)

 OPTIONAL OUTPUT PARAMETERS:
     eigenval -  N_ATTRIB element vector containing the sorted eigenvalues
     eigenvect - N_ATRRIB x N_ATTRIB matrix containing the corresponding 
               eigenvectors
     percentages - N_ATTRIB element containing the cumulative percentage 
             variances associated with the principal components
     proj_obj - N_OBJ by N_ATTRIB matrix containing the projections of the 
             objects on the principal components
     proj_atr - N_ATTRIB by N_ATTRIB matrix containing the projections of 
               the attributes on the principal components

 OPTIONAL OUTPUT PARAMETER
      MATRIX   = analysed matrix, either the covariance matrix if /COVARIANCE
              is set, the "sum of squares and cross-products" matrix if
              /SSQ is set, or the (by default) correlation matrix.    Matrix
              will have dimensions N_ATTRIB x N_ATTRIB

 NOTES:
      This procedure performs Principal Components Analysis (Karhunen-Loeve
      Transform) according to the method described in "Multivariate Data 
      Analysis" by Murtagh & Heck [Reidel : Dordrecht 1987], pp. 33-48. 

      Keywords /COVARIANCE and /SSQ are mutually exclusive.

      The printout contains only (at most) the first seven principle 
      eigenvectors.    However, the output variables EIGENVECT contain 
      all the eigenvectors
       
      Different authors scale the covariance matrix in different ways.
      The eigenvalues output by PCA may have to be scaled by 1/N_OBJ or
      1/(N_OBJ-1) to agree with other calculations when /COVAR is set.

      PCA uses the non-standard system variables !TEXTOUT and !TEXTUNIT.
      These can be added to one's session using the procedure ASTROLIB.

      The intrinsic IDL function PCOMP (introduced in V5.0) duplicates most
      most of the functionality of PCA, but uses different conventions and
      normalizations.   Note the following:

   (1) PCOMP requires a N_ATTRIB x N_OBJ input array; this is the transpose
         of what PCA expects
   (2) PCA uses standardized variables; use /STANDARIZE keyword to PCOMP
         for a direct comparison.
   (3) PCA (unlike PCOMP) normalizes the eigenvectors by the square root
         of the eigenvalues.
   (4) PCA returns cumulative percentages; the VARIANCES keyword of PCOMP
         returns the variance in each variable

 CALLS: ***
	REVERSE, TEXTCLOSE [1], TEXTCLOSE [2], TEXTCLOSE [3], TEXTOPEN [1], TEXTOPEN [2]
	TEXTOPEN [3]
 EXAMPLE:
      Perform a PCA analysis on the covariance matrix of a data matrix, DATA,
      and write the results to a file

      IDL> PCA, data, /COVAR, t = 'pca.dat'

      Perform a PCA analysis on the correlation matrix.   Suppress all 
      printing, and save the eigenvectors and eigenvalues in output variables

      IDL> PCA, data, eigenval, eigenvect, /SILENT

 PROCEDURES CALLED:
      TEXTOPEN, TEXTCLOSE

 REVISION HISTORY:
      Immanuel Freedman (after Murtagh F. and Heck A.).     December 1993
      Wayne Landsman, modified I/O              December 1993
      Converted to IDL V5.0   W. Landsman   September 1997
      Fix MATRIX output, remove GOTO statements   W. Landsman August 1998      
      Changed some index variable to type LONG    W. Landsman March 2000


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

 Name        : 
	PCL
 Purpose     : 
	Sets graphics device to HP LaserJet PCL file.
 Explanation : 
	This procedure sets the system variables needed to write HP LaserJet
	PCL plot files.  The plot is done in landscape mode, using most of the
	paper.

	SETPLOT is called to save and set the system variables, and DEVICE is
	called to set the plot window size and orientation, and to open the
	file.

	If the plot file is already open, then calling PCL without any
	parameters or keywords allows the user to write into the already opened
	file, in the same mode as before.

 Use         : 
	PCL  [, FILENAME ]

	PCL				;Open PCL plot file
	   ... plotting commands ...	;Create plot
	PCLPLOT				;Close & plot file, reset to prev. dev.
	   or
	PCLCLOSE			;Close w/o printing,  "    "   "    "

 Inputs      : 
	None required.
 Opt. Inputs : 
	FILENAME - Name of PCL plot file to be opened.  If not passed, and no
		   filename was previously passed, "idl.pcl" is assumed.
 Outputs     : 
	A message is printed to the screen.
 Opt. Outputs: 
	None.
 Keywords    : 
	LANDSCAPE = If set, then plotting is done in LANDSCAPE mode (default).
	PORTRAIT  = If set, then plotting is done in PORTRAIT mode.  PORTRAIT
		    takes precedent over LANDSCAPE.
 Calls       : ***
	FORM_FILENAME [1], FORM_FILENAME [2], SETPLOT [1], SETPLOT [2]
 CALLED BY:
	TVPRINT
 Common      : 
	PCL_FILE which contains PCL_FILENAME, the name of the plotting file,
	and LAST_DEVICE, which is the name of the previous graphics device.
 
	Also calls SETPLOT, which uses common block PLOTFILE.
 
 Restrictions: 
	Only the routines PCLPLOT and PCLCLOSE can be used to close the PCL
	plot file.  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 the FILENAME parameter, or either the LANDSCAPE or PORTRAIT
	keywords, is passed then DEVICE is called to open a new file.  Any
	previously opened PCL plot file would be closed.
 
	If a new file is opened, then the DEVICE routine is called with the
	/LANDSCAPE or /PORTRAIT switch to set the size and orientation of the
	plot window.
 
	If not the first time this routine is called, then system variables
	that affect plotting are reset to previous values.  If it is the first 
	time the routine is called, !FANCY is set to 1.

	In UNIX, if a new file is opened with the same name as an existing
	file, then the old file is lost.
 
 Category    : 
	Utilities, Devices.
 Prev. Hist. : 
	None.
 Written     : 
	William Thompson, GSFC, 15 June 1993.
 Modified    : 
	Version 1, William Thompson, GSFC, 15 June 1993.
		Based on QMS.PRO
 Version     : 
	Version 1, 15 June 1993.


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

 Name        : 
	PCLCLOSE
 Purpose     : 
	Close an HP LaserJet PCL plot file, reset graphics device.
 Explanation : 
	The currently opened HP LaserJet PCL plot file is closed, and the
	graphics device is reset to what was used previously.
 Use         : 
	PCLCLOSE

	PCL				;Open PCL plot file
	   ... plotting commands ...	;Create plot
	PCLPLOT				;Close & plot file, reset to prev. dev.
	   or
	PCLCLOSE			;Close w/o printing,  "    "   "    "

 Inputs      : 
	None.
 Opt. Inputs : 
	None.
 Outputs     : 
	A message is printed to the screen.
 Opt. Outputs: 
	None.
 Keywords    : 
	None.
 Calls       : ***
	SETPLOT [1], SETPLOT [2], TRIM
 CALLED BY:
	TVPRINT
 Common      : 
	PCL_FILE which contains PCL_FILENAME, the name of the plotting file,
	and LAST_DEVICE, which is the name of the previous graphics device.
 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: 
	The previous plotting device is reset.
 Category    : 
	Utilities, Devices.
 Prev. Hist. : 
	None.
 Written     : 
	William Thompson, GSFC, 15 June 1993.
 Modified    : 
	Version 1, William Thompson, GSFC, 15 June 1993.
		Based on QMCLOSE.PRO.
 Version     : 
	Version 1, 15 June 1993.


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

 Name        : 
	PCLPLOT
 Purpose     : 
	Print an HP LaserJet PCL plot file, reset graphics device.
 Explanation : 
	Sends a PCL plot file generated by IDL to the HP LaserJet PCL laser
	printer.  The default queue is defined by the logical name/environment
	variable HPLASER.  The graphics device is reset to what was used
	previously.
 Use         : 
	PCLPLOT  [, FILE ]  [, /DELETE ]

	PCL				;Open PCL plot file
	   ... plotting commands ...	;Create plot
	PCLPLOT				;Close & plot file, reset to prev. dev.
	   or
	PCLCLOSE			;Close w/o printing,  "    "   "    "

 Inputs      : 
	None required.
 Opt. Inputs : 
	The default filename is either taken from the last call to the PCL
	routine, or is "idl.pcl".

	A filename other than the default can be passed in one of three ways:

		Explicitly:		e.g. PCLPLOT,'graph.pcl'
		By number (VMS)		e.g. PCLPLOT,3   for "idl.pcl;3"
		All versions (VMS)	e.g. PCLPLOT,'*' for "idl.pcl;*"
		All ".pcl" files (UNIX)	e.g. PCLPLOT,'*' for "*.pcl"
 Outputs     : 
	A message is printed to the screen.
 Opt. Outputs: 
	None.
 Keywords    : 
	DELETE	= If set, then file is deleted after printing.
	QUEUE	= Name of printer queue to be used in printing the file.
	COMMAND	= (Unix only.)  Command to be used to send the plot file to the
		  printer.  If not passed, then the environment variable
		  PRINTCOM is checked.  If neither of these is set, then the
		  standard command "lpr" is used.
 Calls       : 
	SETPLOT [1], SETPLOT [2]
 CALLED BY:
	TVPRINT
 Common      : 
	PCL_FILE which contains PCL_FILENAME, the name of the plotting file,
	and LAST_DEVICE, which is the name of the previous graphics device.
 Restrictions: 
	The requested plot file must exist.

	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 plot file is queued on the printer HPLASER.  Also, any files
	"idl.pcl" that may be open will be closed.  The previous plotting
	device is reset.
 Category    : 
	Utilities, Devices.
 Prev. Hist. : 
	None.
 Written     : 
	William Thompson, GSFC, 15 June 1993.
 Modified    : 
	Version 1, William Thompson, GSFC, 15 June 1993.
		Based on QMPLOT.PRO.
	Version 2, William Thompson, GSFC, 8 June 1994
		Added keyword COMMAND
 Version     : 
	Version 2, 8 June 1994.


PCONVERT $SSW/gen/idl/display/pconvert.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : PCONVERT()
               
 Purpose     : Convert Plot DEVICE, DATA, NORMAL and PIXEL coordinates
               
 Explanation : Uses the data stored for each Plot Region to calculate
		to and from different coordinate systems.
               
 Use         : DEVICE_X = PCONVERT(PLOTREG,COORD)
    
 Inputs      : PLOTREG : A plot region ID as returned by PSTORE or PFIND

		COORD : The coordinate to be converted. See Restrictions.
               
 Opt. Inputs : None.
               
 Outputs     : Return value.
               
 Opt. Outputs: None.
               
 Keywords    : Y : 	Set to mark that it's the Y coordinate that is
			supplied.

		DEVICE/DATA/
		NORMAL/
		PIXEL  : Set to indicate the type of the supplied coordinate.
			Default is DEVICE.

		TO_DEVICE/TO_DATA/
		TO_NORMAL/
		TO_PIXEL: Set to indicate the type of coordinate to convert
			into. Default is DATA.
		
		LOWER: In converting PIXEL -> other units, it is normally
			assumed that the supplied coordinate is the 
			pixel _number_, i.e., the expected output is the
			value at the center of the pixel. If you are 
			supplying 'real' pixel values (with pixel 
			number 2 lying in the interval <1.0, 2.0>) or if
			you want the coordinates at the left/lower border of
			where the pixel is displayed, use this keyword to
			notify. E.g:

			pconvert(P,0,/pixel,/to_data) yields 0.000
			but:
			pconvert(P,0,/pixel,/to_data,/lower) yields -0.500
			given that the data coordinate system is set up
			to correspond with pixel index numbers.

 Calls       : ***
	TRIM
 CALLED BY:
	CW_PLOTZ [1], CW_PZOOM [1], DSPEXP, GDSPSPEC, NDSPSPEC, PQLPROFILE, PQLZOOM
	XCROP_CUBE, XSPECT, cw_plotz [2], cw_pzoom [2]
 Common      : WSTORE
               
 Restrictions: There must exist a data coordinate system for the
		specified plot region, stored with PSTORE()

		When converting to and from PIXEL values it is assumed
		that:

		For one-dimensional data, the plot is generated
		with XRANGE = [MIN(x),MAX(x)],XSTYLE=1, and it is
		assumed that the pixels are placed at constant intervals.

		For two-dimensional data, the plot is generated with
		XRANGE = [MIN(x)-XSTEP,MAX(x)+XSTEP],XSTYLE=1, (and
		vice versa for Y) where XSTEP is the (DATA coordinate) 
		distance between two consecutive pixels.
		This is also necessary to get the axis ticks correct
		on the plot/TV'ed data.
               
 Side effects: None.
               
 Category    : Utilities, Graphics
               
 Prev. Hist. : Combined earlier ppix2dat/ppix2dev .... etc.

 Written     : SV Hagfors Haugan, 30-May-1994
               
 Modified    : SVHH, 1-June-1994 -- Found that IDL sometimes chops a pixel
			when calculating !X.S/!Y.S - fixed.
		SVHH, 25-November-1994 -- The above "fix" removed -- better
			to make sure that IDL is not missing the pixel
			using e.g., plot,[..],position=pos+0.0001,/dev
			--  this (hopefully) keeps IDL from miscalculations
			of !P.clip etc.
			Included bounds on /TO_PIXEL conversions.
               Version 2, SVHH, 15 June 1996
                       Added recognition of logarithmic axis scaling.
                       
 Version     : 2, 15 June 1996


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

 Name        :	PCORRE()

 Purpose     :	Calculate significance of correlation coefficient.

 Category    :	Error-analysis, Class3

 Explanation :	Calculates the probability that a given cross-correlation
		coefficient could be generated by chance.

 Syntax      :	Result = PCORRE(R, NPTS)
		Result = PCORRE(P1, P2, CORRELATION=CORR)

 Examples    :	IDL> PRINT, PCORRE(0.1, 30)
		      0.59904802
		IDL> PRINT, PCORRE(0.5, 30)
		    0.0048999337

		This means that, for two random populations of 30 points each,
		there's 59.9% probability that the cross-correlation
		coefficient between them will be 0.1 or better.  However,
		there's only a 0.49% probability of generating a coefficient of
		0.5 or higher.

 Inputs      :	One of two sets of input parameters must be passed, either

		  R	= The cross correlation coefficient to test.  This must
			  be between -1 and 1.

		  NPTS	= The number of data points in each of the two
			  populations.  This must be at least 3.

		or

		  P1,P2	= Two arrays to take the cross-correlation of.  These
			  must both have the same number of elements.

 Opt. Inputs :	None.

 Outputs     :	The result of the function is the probability of generating a
		coefficient greater than or equal to R strictly by chance with
		two arrays of NPTS values each.  This will be between 0 and 1.
		If an error occurs, then -1 will be returned.

 Opt. Outputs:	None.

 Keywords    :	CORRELATION = If P1 and P2 are passed, then the correlation
			      between then will be returned in this parameter.

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

				ERRMSG = ''
				RESULT = PCORRE(ERRMSG=ERRMSG, ...)
				IF ERRMSG NE '' THEN ...

 Calls       : ***
	CORRELATE, GAMMA
 Common      :	None.

 Restrictions:	The input parameters must be scalar.

 Side effects:	Different algorithms are used for even and odd values of NPTS.
		Above NPTS=70, only the odd algorithm is used, due to problems
		with the even algorithm for large numbers.  When NPTS is even
		and >70, then NPTS-1 is substituted.  This will result in a
		slight overestimate of the probability.

 Prev. Hist. :	Adapted from P. R. Bevington, 1969, "Data Reduction and Error
		Analysis for the Physical Sciences".

 History     :	Version 1, 10-Sep-1998, W. Thompson, GSFC
		Version 2, 11-Apr-2000, W. Thompson, GSFC
			Added P1,P2 option, and keyword CORRELATION
		Version 3, 17-Nov-2000, W. Thompson, GSFC
			Corrected error with large numbers of points.
 Contact     :	WTHOMPSON


pctime2ssw $SSW/gen/idl/ssw_util/pctime2ssw.pro
[Previous] [Next]
   Name: pctime2ssw

   Purpose: convert a PC time->SSW (anytim output)

   Input Parameters:
      pctime - vector of PC format times ( DD-MM-YYYY HH:MM:SS )  

   Keyword Parameters:
      out_style - descibe output format (see anytim.pro) - default INTERNAL
  
 CALLS: ***
	anytim [1], anytim [2], anytim [3], anytim [4], anytim [5], str2cols [1]
	str2cols [2]
   History:
      22-dec-1998 - S.L.Freeland


pcurse $SSW/gen/idl/display/pcurse.pro
[Previous] [Next]
 NAME:
      pcurse
 PURPOSE:
      user cursor to select points from plot
 CALLING SEQUENCE:
      pcurse,x,y
 INPUTS:
      none
 OUTPUTS:           
      x,y = vector of selected points
 KEYWORDS:
      npoints (in,out) = # of points to select or selected
      newlabel (in)    = message label to override def message
      cross (in)       = plot cross at selected points
      xl,yl (in)       = normalized position coordinates of message label
 CALLED BY:
	BSC_LRANGE, lsplot
 MODIFICATION HISTORY:     
      Jun'94, DMZ (ARC) -- written.


PD $SSW/gen/idl/system/pd.pro
[Previous] [Next]
 NAME:
	PD

 PURPOSE:
	Push a directory onto the top of a directory stack

 CALLING SEQUENCE:
	PD [, dir] [,rotate=rot_num]

 EXAMPLE:
       Suppose the current directory stack is:

          ~ ~/doc ~/idl /usr/local/bin

       Result of "pd":        ~/doc ~ ~/idl /usr/local/bin
       Result of "pd,r=2":    ~/idl ~ ~/doc /usr/local/bin
       Result of "pd,r=3":    /usr/local/bin ~ ~/doc ~/idl 
       Result of "pd,'~/cds': ~/cds ~ ~/doc ~/idl /usr/local/bin

 OPTIONAL INPUTS:
	DIR     - The directory to be pushed. If DIR is not present, or is
		  an undefined variable, PD will swap the first tow directory
                 on the top of the stack, or rotate the directory stack if
                 keyword ROTATE is set.
       ROT_NUM - Number of the directory to be rotated to the top of
                 stack.

 CALLS: ***
	CDD
 OTHER RELATED ROUTINES:
       CDD, PPD, SD, and CDUP

 SIDE EFFECTS:
       None.

 COMMON BLOCKS:
	DIR_STACK:  Contains the stack.
       CDD:        Common block used by CDD.

 MODIFICATION HISTORY:
       Version 1, Liyun Wang, GSFC/ARC, November 12, 1994
          Modified from PUSHD for use with CDD.
       Version 2, Liyun Wang, GSFC/ARC, January 11, 1995
          Added the ROTATE keyword
       Version 3, Liyun Wang, GSFC/ARC, January 18, 1995
          Fixed problem of changing directories from one disk to the
             other on VMS system
       Version 4, September 24, 1997, Liyun Wang, NASA/GSFC
          Chopped off '/tmp_mnt' from directory name for UNIX system

 VERSION:
       Version 4, September 24, 1997


PEEK $SSW/gen/idl/help/peek.pro
[Previous] [Next]
 PROJECT:
       SOHO - CDS

 NAME:
       PEEK

 PURPOSE:
       Search and print IDL routine.

 EXPLANATION:

 CALLING SEQUENCE:
       PEEK, doc_name

 INPUTS:
       DOC_NAME -- String scalar, name of the IDL routine

 OPTIONAL INPUTS:
       None.

 OUTPUTS:
       None.

 OPTIONAL OUTPUTS:
       None.

 KEYWORD PARAMETERS:
       EXTRACT - If set, extract the document to current directory

 CALLS: ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], GET_MOD, GREP, STR_SEP
	concat_dir [4]
 COMMON BLOCKS:
       None.

 RESTRICTIONS:
       Under VMS, if a paging command is to be used (rather than the default
       "TYPE/PAGE" command), it has to be defined as a symbol with name
       "page" and can take one argument.

 SIDE EFFECTS:
       None.

 CATEGORY:
       Utility/Help

 PREVIOUS HISTORY:
       Written September 27, 1994, by Liyun Wang, GSFC/ARC

 MODIFICATION HISTORY:
      Liyun Wang, GSFC/ARC, October 5, 1994
         Current directory also gets searched now.
       Version 2, Liyun Wang, GSFC/ARC, December 6, 1994
          Added the EXTRACT keyword
       Version 3, Liyun Wang, GSFC/ARC, December 15, 1994
          Made it work on VMS system
       Version 4, Liyun Wang, GSFC/ARC, December 29, 1994
          Use the environment variable (or symbol name under VMS) PAGE,
             if defined, as the paging command  

 VERSION:
       Version 4, December 29, 1994


PENT $SSW/gen/idl_libs/astron/math/pent.pro
[Previous] [Next]
 NAME:
       PENT
 PURPOSE:
       Return the information entropy of a time series
 EXPLANATION:
       This function will return S, the information entropy of a time series
       for a set of trial periods 

 CATEGORY:
       Time series analysis, period finding, astronomical utilities.

 CALLING SEQUENCE:
       Result = PENT(P, T, X, [N, M ] )

 INPUTS:
       P - array of trial period values.
       T - array of observation times (same units as P).
       X - array of observations.

 OPTIONAL INPUTS:
       N   - If  four parameters are given then the 4th parameter is assumed
               to be N. Then NxN boxes are used to calculate S.
       M,N - If five parameters are given then parameter 4 is M and parameter
               5 is N. S is then calculated using MxN boxes - M partitions for the
               phase and N partitions for the data.
       
 OUTPUTS:
       This function returns S, the information entropy of the time series for
       the periods given in P as defined by Cincotta, Me'ndez & Nu'n~ez
       (Astrophysical Journal 449, 231-235, 1995). The minima of S occur at
       values of P where X shows periodicity.
   
 PROCEDURE:
       The procedure involves dividing the phase space into N^2 partitions 
       (NxN boxes) and then calculating:
       
               __ N^2
         S = - \        mu_i . ln(mu_i)  for all mu_i <> 0
               /_  
                 i = 1 

       where  mu_i is the number of data points in partition i normalised by 
       the number of partitions.

       The option of using MxN boxes is an additional feature of this routine.

 EXAMPLE:

       To generate a similar sythetic data set to Cincotta et al. we
        do the following:

       IDL> P0 = 173.015                        ; Fundamental period
       IDL> T = randomu(seed,400)*15000         ; 400 random observation times
       IDL> A0 = 14.0                           ; Mean magnitude
       IDL> M0 = -0.5  * sin(2*!pi*T/P0)        ; Fundamental mode
       IDL> M1 = -0.15 * sin(4*!pi*T/P0)        ; 1st harmonic
       IDL> M2 = -0.05 * sin(6*!pi*T/P0)        ; 2nd harmonic
       IDL> sig = randomu(seed,400)*0.03        ; noise
       IDL> U = A0 + M0 + M1 + M2 + sig         ; Synthetic data
       IDL> Ptest = 100. + findgen(2000)/2.     ; Trial periods 
       IDL> S = pent(Ptest,T,U)                 ; Calculate S
               ... this takes a few seconds ...
       IDL> plot,Ptest,S,xtitle="P",ytitle="S"  ; plot S v. P
       IDL> print,Ptest(where(S eq min(S)))     ; Print best period (+/- 0.5)

       The plot produced should be similar to Fig. 2 of Cincotta et al.

 RESTRICTIONS:

       My own (limited) experience with this routine suggests that it is not
       as good as other techniques for finding  weak,  multi-periodic signals in 
       poorly sampled  data, but is good for establishing periods of eclipsing
       binary stars when M is quite large (try MxN = 64x16, 128x16 or even 
       256x16).  This suggests it may be good for other periodic light curves 
       (Cepheids, RR Lyrae etc.).
       I would be glad to receive reports of other peoples experience with
       this technique (e-mail pflm@bro730.astro.ku.dk).

 MODIFICATION HISTORY:
       Written by:   Pierre Maxted, 14Sep95
       Modifications:
       Normalisation of S corrected, T-min(T) taken out of loop.
               -  Pierre Maxted, 15Sep95
       Converted to IDL V5.0   W. Landsman   September 1997


PERIODOGRAM $SSW/gen/idl/util/periodogram.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : PERIODOGRAM()
               
 Purpose     : Calculate periodogram of (unevenly spaced) time series.
               
 Explanation : Uses method of Horne and Baliuna (Ap.J. 1986) to calculate
               the periodogram within user-set frequency or period limits 
               a time series of data.  Data need not be equally spaced in 
               time.

               eg:
	        IDL> t = findgen(1000)
               IDL> x = sin(2.0*!dpi*t/27.0)
               IDL> power=periodogram(t,x,per=[20,30],npts=100)
               IDL> plot,power(0,*),power(1,*)


 Use         : IDL> power = periodogram(time, data,$
                                 [frequency_range=frequency_range, $
                                 period_range=period_range, taper=taper,$
                                 npts=npts])
    
 Inputs      : time - time values to which values in data correspond.
               data - data values corresponding to 'time'.
               
 Opt. Inputs : Either 'freq' or 'period' (see keywords) values must be 
               specified.
               
 Outputs     : Function returns a (2,npts) array.
               array(0,*) = frequency or period array (depends on input given)
               array(1,*) = periodogram power at returned values of array(0,*)
               
 Opt. Outputs: None
               
 Keywords    : freq   - 2 value array giving interval over which to calculate
                        periodogram, given in frequency.
               OR
               period - period values over which to calculate periodogram.

               np     - number of points in calculated periodogram 
                        (default = number of input data points).
               taper  - fraction of time series to be tapered to alleviate
                        end effects. taper=0.25 tapers first and last 25%
                        (default = 0)

               quiet  - set this to not receive statistical info on screen

 Calls       : ***
	AVERAGE, FMT_VECT
 Common      : None
               
 Restrictions: Not fast for large data sets.
               
 Side effects: None
               
 Category    : Util,  numerical
               
 Prev. Hist. : Original by Judith Lean/John Mariska, NRL.

 Written     : Cosmetic CDS version by C D Pike, RAL, 16-Jan-95 
               
 Modified    : 

 Version     : Version 1, 16-Jan-95


PFIND $SSW/gen/idl/display/pfind.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : PFIND()
               
 Purpose     : Find Plot Region ID corresponding to an event.
               
 Explanation : PFIND is used to return the ID of any plot region that
               has ben stored with PSTORE, whose clip coordinates include
               the position of the supplied event's coordinates.

 Use         : PFIND, EVENT [,FOUND]
    
 Inputs      : EVENT : A WIDGET_DRAW event.

 Opt. Inputs : None.
               
 Outputs     : Return value: The Plot Region ID, or -1 if none found.
               
 Opt. Outputs: FOUND: This is set to 1 if a region was found, 0 if not.
               
 Keywords    : PLOT_NUMBER: Set to a named variable to return the plot number
                            that was sent to PSTORE().

               CURRENT: Set to indicate that the event only contains
                        information ; on X/Y coordinates, and that the
                        current plot window ; should be searched.

 Calls       : 
 CALLED BY:
	CW_PLOTZ [1], CW_PZOOM [1], DSPEXP, GDSPSPEC, NDSPSPEC, PQLPROFILE, PQLZOOM, PTEST
	cw_plotz [2], cw_pzoom [2]
 Common      : WSTORE
               
 Restrictions: None.
               
 Side effects: None.
               
 Category    : Utility, Graphics
               
 Prev. Hist. : None.

 Written     : Stein Vidar Hagfors Haugan, May 1994
               
 Modified    : Version 2, SVHH, 22 January 1997
                       Removed dependency on CDSNOTIFY
                       
 Version     : 1, May 1994


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

 Name        : PICK_TIMES

 Purpose     : pick times from a selection

 Category    : planning

 Explanation : User enters TSTART/TEND. If either is not defined then
               defaults are used. If /LAST is set, then the last used
               times are used

 Syntax      : IDL> times=pick_times(tstart,tend)

 Inputs      : TSTART, TEND = input times to start selection

 Opt. Inputs : None

 Outputs     : TIMES= selected times

 Opt. Outputs: None

 Keywords    : CTIMES = last times to use if /LAST set
               DTIMES = default times to use if TSTART/TEND not given

 CALLS: ***
	ANYTIM2TAI, EXIST
 CALLED BY:
	XCAMP, XCAT, XCPT, XIAP, XPORT, XREPORT
 Common      : None

 Restrictions: None

 Side effects: None

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

 Contact     : DZARRO@SOLAR.STANFORD.EDU


PICKFILE $SSW/gen/idl/system/bigpickfile.pro
[Previous] [Next]
 NAME:
       PICKFILE

 PURPOSE:
       This function allows the user to interactively pick a file.  A file
       selection tool with a graphical user interface is created.  Files
       can be selected from the current directory or other directories.

 CATEGORY:
       Widgets.

 CALLING SEQUENCE:
       Result = PICKFILE()

 KEYWORD PARAMETERS:

       FILE:   A string value for setting the initial value of the
               selection. Useful if there is a default file

       GET_PATH: Set to a named variable. Returns the path at the
               time of selection.

       GROUP:  The widget ID of the widget that calls PICKFILE.  When this
               ID is specified, a death of the caller results in the death of
               the PICKFILE widget application.

       READ:   Set this keyword to make the title of the PICKFILE window
               "Select File to Read".

       WRITE:  Set this keyword to make the title of the PICKFILE window
               "Select File to Write".

       PATH:   The initial path to select files from.  If this keyword is
               not set, the current directory is used.

       FILTER: A string value for filtering the files in the file list.  This
               keyword is used to reduce the number of files to choose from.
               The user can modify the filter unless the FIX_FILTER keyword
               is set.  Example filter values might be "*.pro" or "*.dat".

       FIX_FILTER: When this keyword is set, only files that satisfy the
               filter can be selected.  The user has no ability to modify
               the filter and the filter is not shown.

       TITLE:  A scalar string to be used for the window title.  If it is
               not specified, the default title is "Select File"

       NOCONFIRM: Return immediately upon selection of a file.  The default
               behavior is to display the selection and then return the
               file when the user uses the "ok" button.

       MUST_EXIST: When set, only files that actually exist can be selected.

 OUTPUTS:
       PICKFILE returns a string that contains the name of the file selected.
       If no file is selected, PICKFILE returns a null string.

 CALLS: ***
	BIGPICKFILE, GETDIRS, GETFILES, OS_PICKFILE, PICKFILE_EV, SINCE_VERSION [1]
	SINCE_VERSION [2], VALID_DIR, XDISPLAYFILE [1], XDISPLAYFILE [2], XMANAGER
	XREGISTERED
 CALLED BY:
	ADJUST_REFCAL, BIGPICKFILE, C3_CME, C3_CME_FRONT, CAT_RAW, CDSLOG, CHIANTI_DEM
	CH_SYNTHETIC, CME_MASS, CME_MASSIMG2TOTAL, DSP_RASTER, MAKE_VHS_GIF, MAX_TEMP
	MK_CDS_PLAN, PICKFILES, PICKFITS, PLOT_CHIANTI_NE, PLOT_CHIANTI_TE, PLOT_DRM
	PLOT_HT, PLOT_IONEQ, PLOT_SUBHTR, PS_FORM [1], PS_FORM [2], READ_TPFAC, RTMOVIE
	RTMVIPLAY [1], RTMVIPLAY [2], RTMVIPLAYPNG, SCHEDULE, SOLAID, SPEX_SAVE_DATA [1]
	SPEX_SAVE_DATA [2], SUMER_PICK_FLAT, SUMER_RASTER_SAVE, SUMER_SPECTROGRAM_SAVE
	TPSOLVE, TRUNCATE, VIEW_PHA, VIEW_RAW, WDIALOG_HISTORY, WDUMPREC, WLISTER, WLOAD, WLOADC
	WPREFERENCES, WRUNMOVIE [2], WRUNMOVIE4, WRUNMOVIEM, WRUNMOVIEM3, WRUNMOVIEM_RT
	XCAMP, XCAT, XCDS_COSMIC, XCME_MES, XEDITFRAME, XPLOT_HT, XRECORDER, XREPORT
	XREPORT_EDIT, XSEL_PD_EVENT, XSTARTHT, XSTUDY, eit_flux, get_contributions, rd_asc
	sxt_mauna, w_las_exp_norm, wprint
 COMMON BLOCKS:
       PICKER: COMMON block that maintains state for the widget.

 SIDE EFFECTS:
       This function initiates the XMANAGER if it is not already running.

 RESTRICTIONS:
       This routine is known to work on Suns (OPEN LOOK), MIPS, RS/6000,
       DEC Ultrix, HP/700, VAX/VMS and SGI machines.

       Only one instance of the PICKFILE widget can be running at one time.

       PICKFILE does not recognize symbolic links to other files in UNIX.

 PROCEDURE:
       Create and register the widget and then exit, returning the filename
       that was picked.

 EXAMPLE:
       Create a PICKFILE widget that lets users select only files with
       the extensions 'pro' and 'dat'.  Use the 'Select File to Read' title
       and store the name of the selected file in the variable F.  Enter:

               F = PICKFILE(/READ, FILTER = '*.pro *.dat')

 MODIFICATION HISTORY:
       Written by:     Steve Richards, April, 1991
       July, 1991      Added a FILTER keyword to allow users
                       to select files with a given extension or
                       extensions.
       August, 1991    Fixed bugs caused by differences between
                       spawned ls commands on different machines.
       September, 1991 Made Myfindfile so only one pass was
                       necessary to find files and directories.
       3/92 - ACY      Corrected initialization of dirsave, change spawn
                       command to "ls -lL" and added case for links
                       add NOCONFIRM keyword for auto exiting on selection
       8/92 - SMR      Rewrote pickfile as a compound widget.
       10/92 - SMR     Fixed a bug where extremely large file namess didn't
                       show up properly in the file list or as return
                       values.
       12/92 - JWG     Add better machine dependency code
       1/93 - JWG      Added FILE, GET_PATH keywords.
       1/93 - TAC      Added Windows Common dialog pickfile code
       2/93 - SMR      Fixed the documentation example for multiple extensions
       1/94 - KDB      If directory had no execute permission on Unix
                       platforms, CD fails and causes error. Added check
                       for this. Increased spawn speed by using /sh for unix.
                       Added -a switch to ls so that all files can be found
                       on unix machines.
       2/94 - KDB	Values passed to CD cannot end in a '\' on DOS
			platforms. Program would crash if the PATH keyword
			was supplied a value that ended with a "\". Added
		        a check for this.
	3/94 - BMH	Deleted the reference here to OS_PICKFILE for the
			Unix platforms and created an IDL routine to
			to call the Mac and Windows specific OS_PICKFILE
			routines.  This solved the saving and restoring on
	 		different platforms problem.
	4/94 - KDB      The vms call to lib$findfile in valid_dir was
		        commented out. This caused errors when path was
			changed by user. Uncommented. In Valid_Dir, with
			vms the type of directory specification was not
		        checked (directory can be a path or a filename):
			Fixed this. In dirlist section of event handler,
		        a "[-]" would get trimmed to "" and cause error:
			Fixed.
	8/94 - ACY      Change the spawn command in getdirs to send error
			output to /dev/null.
	12/94 - DJE	Fix the FIX_FILTER option for the MacOS.


PICKFONT use to be XFONT $SSW/gen/idl/fund_lib/sdac/pickfont.pro
[Previous] [Next]
 NAME:
	PICKFONT  use to be XFONT
 PURPOSE:
	Modal widget for selecting and viewing an X Windows font.
 
 CATEGORY:
	Widgets, Fonts
 CALLING SEQUENCE:
	Selected_font = PICKFONT()
 INPUTS:
	No explicit inputs.
 KEYWORD PARAMETERS:
	GROUP = The widget ID of the widget that calls pickfont.  When this
		ID is specified, a death of the caller results in a death of
		pickfont.
	PRESERVE = saves the server font directory in common blocks
		so that subsequent calls to PICKFONT start-up much faster.
		If not set, the common block is cleaned.
	MESSAGE = message to be displayed by the view window.
 OUTPUTS:
	A string containing the font name.  If nothing is selected, or
	the CANCEL button is pressed, the null string is returned.
 CALLS: ***
	FILEPATH, PICKFONT, PICKFONT_EVENT, PICKFONT_SCAL_FNAME, PICKFONT_SELECT, STR_SEP
	UNIQ [1], UNIQ [2], UNIQ [3], XDISPLAYFILE [1], XDISPLAYFILE [2], XMANAGER
	XREGISTERED
 COMMON BLOCKS:
	PICKFONT_COM.
 SIDE EFFECTS:
	Initiates the XManager if it is not already running.
	Resets the current X Window font.  
 RESTRICTIONS:
	The current X window font is manipulated without being restored.
 PROCEDURE:
	Create and register the widget and then exit.
 MODIFICATION HISTORY:
	Modified from a template written by: Hans-Joachim Bothe, CreaSo GmbH,
		November, 1991, by DMS, RSI, November, 1992.
       oct 93 elaine einfalt - changed the name from xfont
			        added message keyword
				added code to display 


PICKLAMBDA [1] $SSW/gen/idl/spectra/picklambda.pro
[Previous] [Next]
 NAME:  PICKLAMBDA
 PURPOSE:
     To sum the lines at the same wavelengths
 CATEGORY:
 CALLING SEQUENCE:
	picklambda, wvl, lflux, dummy, dumflx
 INPUTS:
	wvl = 1-d array of wavelengths of lines in the original Mewe file
	lflux = 2-d array of line strengths with temperature (first 
		subscript) and wavelength (second subscript)
 OPTIONAL INPUTS: none.
 OUTPUTS:
	dummy = 1-d array of new wavelengths after eliminating the 
		overlapping ones
	dumflx = 2-d array of line strengths with temperature and
		 new wavelength (dummy)
 OPTIONAL OUTPUTS: none.
 CALLED BY:
	linflx [1], linflx [2], xlinflx
 COMMON BLOCKS: none.
 SIDE EFFECTS: none.
 RESTRICTIONS: none.
 MODIFICATIONS: written by N.Nitta, April 1991.
		 J. R. Lemen, 25-jan-93 Renamed to picklambda


PIXCOLOR $SSW/gen/idl_libs/astron/tv/pixcolor.pro
[Previous] [Next]
 NAME:
	PIXCOLOR
 PURPOSE:
	Assign colors to specified pixel values in a color lookup table

 CALLING SEQUENCE:
      	PIXCOLOR, pixvalue, color         ;Set color at specified pixel values

 OPTIONAL INPUT PARMETERS:
	pixvalue - value or range of pixel value whose color will be modified.
		A single pixel value may be specified by an integer
		If a range of values is specified, then it must be written
		as a string, with a colon denoting the range (e.g.'102:123')
		If omitted, program will prompt for this parameter.

	color -    single character string giving specified color values.
		Available options are 'R' (red), 'B' (blue), 'G' (green)
		'Y' (yellow), 'T' (turquoise), 'V' (violet), 'W' (white)
		or 'D' (dark).  If omitted, program will prompt for this 
		parameter.

 OUTPUTS:
	None
 CALLED BY:
	TVLASER
 PROCEDURE:
	TVLCT is used in RGB mode to load the specified pixel values.

 CALLS: ***
	GETTOK [1], GETTOK [2], GETTOK [3], GETTOK [4]
 EXAMPLE:
	Set pixel values of 245 to a color of red

	IDL> pixcolor,245,'R'

 NOTES:
       A much larger number of colors and options is available from David
       Fanning's FSC_COLOR
       http://www.dfanning.com/programs/fsc_color.pro
      
 REVISION HISTORY:
	Written, W. Landsman ST Systems Corp.		February, 1987
	Converted to IDL V5.0   W. Landsman   September 1997


PIXSQUARE $SSW/gen/idl/genutil/pixsquare.pro
[Previous] [Next]
NAME:
     PIXSQUARE
PURPOSE:
     Computes a !P.POSITION type vector which makes pixels square when 
     plotting an image.
CATEGORY:
CALLING SEQUENCE:
     !P.POSITION = pixsquare(nx,ny)
INPUTS:
     nx = x dimension of the image
     ny = y dimension of the image
OPTIONAL INPUT PARAMETERS:
KEYWORD PARAMETERS
     position = a 4 element position vector specifying the plot area.
                (def = [0,0,1,1,0,1], i.e. the entire window).  Must be
                in normal coordinates.
     xyscale = a magnification factor for the image
     xstep = the size of an x pixel (def = 1.0) relative to a y pixel
     edge = a structure with tags top, bottom, left, right which give
            the minimum size of the borders in centimeters.  If the plot
            is too large (large xyscale), the edge may be reduced in order
            to ensure square pixels.
OUTPUTS:
     The position vector which will make square pixels in the plot (normal
     coordinates).
 CALLS: ***
	add2str [1], add2str [2], tag_index [1], tag_index [2]
 CALLED BY:
	PLOT_HSI, PLOT_HXT
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
     Assumes that !D.X_PX_CM and !D.Y_PX_CM are correct.  If their ratio is 
     correct but the values are wrong, the pixels will still be square, but 
     the edge keyword will be affected.  If even the ratio is wrong, the 
     pixels will not be square.

     The pixels are not quite square with landscape postscript.  I don't
     know why.
PROCEDURE:
     Only the aspect ratio nx/ny is actually used, so a "zoom" factor is not
     relevant here.  The xyscale keyword is applied to the size of the 
     plotting region specified by position, i.e. to the size of the plotting
     region in normal coordinates.  
MODIFICATION HISTORY:
     Written by T. Metcalf 05-Oct-93

        TRM 13-Oct-93 Added checks to ensure that the output position is
                      not out-of-range.  With a large xyscale, it still 
                      can be out-of-range, but a warning is printed.


PIXWT $SSW/gen/idl_libs/astron/idlphot/pixwt.pro
[Previous] [Next]
 NAME:
	PIXWT
 PURPOSE: 
	Circle-rectangle overlap area computation.
 DESCRIPTION:
	Compute the fraction of a unit pixel that is interior to a circle.
	The circle has a radius r and is centered at (xc, yc).  The center of
	the unit pixel (length of sides = 1) is at (x, y).

 CATEGORY:
	CCD data processing
 CALLING SEQUENCE:
	area = Pixwt( xc, yc, r, x, y )
 INPUTS:
	xc, yc : Center of the circle, numeric scalars
	r      : Radius of the circle, numeric scalars
	x, y   : Center of the unit pixel, numeric scalar or vector
 OPTIONAL INPUT PARAMETERS:
	None.
 KEYWORD PARAMETERS:
	None.
 OUTPUTS:
	Function value: Computed overlap area.
 CALLED BY:
	APER
 EXAMPLE:
       What is the area of overlap of a circle with radius 3.44 units centered
       on the point 3.23, 4.22 with the pixel centered at [5,7]

       IDL> print,pixwt(3.23,4.22,3.44,5,7)  ==>  0.6502
 CALLS: ***
	ARC, CHORD, INTAREA, ONESIDE
 COMMON BLOCKS:
    None.
 PROCEDURE:
	Divides the circle and rectangle into a series of sectors and
	triangles.  Determines which of nine possible cases for the
	overlap applies and sums the areas of the corresponding sectors
	and triangles.    Called by aper.pro

 NOTES:
      If improved speed is needed then a C version of this routines, with
      notes on how to linkimage it to IDL is available at   
       ftp://ftp.lowell.edu/pub/buie/idl/custom/

 MODIFICATION HISTORY:
     Ported by Doug Loucks, Lowell Observatory, 1992 Sep, from the
    routine pixwt.c, by Marc Buie.


PKFIT [1] $SSW/gen/idl_libs/astron/idlphot/pkfit.pro
[Previous] [Next]
 NAME:
	PKFIT
 PURPOSE:
	Subroutine of  GETPSF to perform a one-star least-squares fit 
 EXPLANATION:
	Part of the DAOPHOT PSF photometry sequence

 CALLING SEQUENCE:
	PKFIT, f, scale, x, y, sky, radius, ronois, phpadu, gauss, psf, 
				errmag, chi, sharp, Niter, /DEBUG 
 INPUTS:
	F      - NX by NY array containing actual picture data.           
	X, Y   - the initial estimates of the centroid of the star relative
		to the corner (0,0) of the subarray.  Upon return, the
		final computed values of X and Y will be passed back to the
		calling routine.
	SKY  -   the local sky brightness value, as obtained from APER
	RADIUS-  the fitting radius-- only pixels within RADIUS of the
		instantaneous estimate of the star's centroid will be
		included in the fit, scalar
	RONOIS - readout noise per pixel, scalar
	PHPADU - photons per analog digital unit, scalar
	GAUSS -  vector containing the values of the five parameters defining
		the analytic Gaussian which approximates the core of the PSF.
	PSF   -  an NPSF by NPSF look-up table containing corrections from
		the Gaussian approximation of the PSF to the true PSF.

 INPUT-OUTPUT:
	SCALE  - the initial estimate of the brightness of the star,
		expressed as a fraction of the brightness of the PSF.
		Upon return, the final computed value of SCALE will be
		passed back to the calling routine.
 OUTPUTS:
	ERRMAG - the estimated standard error of the value of SCALE
		returned by this routine.
	CHI    - the estimated goodness-of-fit statistic:  the ratio
		of the observed pixel-to-pixel mean absolute deviation from
		the profile fit, to the value expected on the basis of the
		noise as determined from Poisson statistics and the 
		readout noise.
	SHARP  - a goodness-of-fit statistic describing how much broader  
		the actual profile of the object appears than the
		profile of the PSF.
	NITER -  the number of iterations the solution required to achieve
		convergence.  If NITER = 25, the solution did not converge.
		If for some reason a singular matrix occurs during the least-
		squares solution, this will be flagged by setting NITER = -1.

 CALLS: ***
	DAO_VALUE, REMOVE [1], REMOVE [2]
 CALLED BY:
	GETPSF
 RESTRICTIONS:
	No parameter checking is performed
 REVISON HISTORY:
	Adapted from the official DAO version of 1985 January 25
	Version 2.0 W. Landsman STX             November 1988
	Converted to IDL V5.0   W. Landsman   September 1997


PL_SCALE $SSW/gen/idl/fund_lib/sdac/pl_scale.pro
[Previous] [Next]
 Project     : SDAC
                   
 Name        : PL_SCALE
               
 Purpose     : This function  scales distance in graphics output and multiplot environment.

 Use         : Result = pl_scale( d, xcorr = xcorr, ycorr=ycorr)

 INPUTS:
	D	-distance in normal units for full scale plot.
 KEYWORD INPUTS:
	YCORR	-Keyword indicating y axis scaling.
	XCORR   -Keyword indicating x axis scaling.

 CALLED BY:
	DRAW_FLARE, FS_ARCHIVE_DRAW, FS_GRAPH, GE_WINDOW [1], HXARCHIVE, HXFITS
	QL_ORBIT_PLOT, pl_scale d xcorr  xcorr ycorrycorr
 Examples    :
    y1 = y1 - pl_scale(.025,/y)
    nx1lab = nx1 + pl_scale(.0081,/xc)
    ylab = t - pl_scale(.04,/yc)

 CALLS       : ***
	FCHECK
 Category    : GRAPHICS
 
 MODIFICATION HISTORY:
       Modified 8/29/94 by AES.  checks for existence of variable global
       in scalecom.  If it exists, output multiplied by global.  Put in
       to scale up graph labels in multiple plot.
	Version 3, richard.schwartz@gsfc.nasa.gov, 7-sep-1997, more documentation


PLANCK $SSW/gen/idl_libs/astron/astro/planck.pro
[Previous] [Next]
 NAME:
       PLANCK()   
 PURPOSE: 
       To calculate the Planck function in units of ergs/cm2/s/A  

 CALLING SEQUENCE: 
       bbflux = PLANCK( wave, temp) 

 INPUT PARAMETERS: 
       WAVE   Scalar or vector giving the wavelength(s) in **Angstroms**
               at which the Planck function is to be evaluated.
       TEMP   Scalar giving the temperature of the planck function in degree K

 OUTPUT PARAMETERS:
       BBFLUX - Scalar or vector giving the blackbody flux (i.e. !pi*Intensity)
               in erg/cm^2/s/A in at the specified wavelength points.

 EXAMPLES:
       To calculate the blackbody flux at 30,000 K every 100 Angstroms between
       2000A and 2900 A
   
       IDL> wave = 2000 + findgen(10)*100
       IDL> bbflux = planck(wave,30000)

       If a star with a blackbody spectrum has a radius R, and distance,d, then
       the flux at Earth in erg/cm^2/s/A will be bbflux*R^2/d^2
 PROCEDURE:
       The wavelength data are converted to cm, and the Planck function
       is calculated for each wavelength point. See Allen (1973), Astrophysical
       Quantities, section 44 for more information.

 NOTES:
       See the procedure planck_radiance.pro in 
       ftp://origin.ssec.wisc.edu/pub/paulv/idl/Radiance/planck_radiance.pro
       for computation of Planck radiance given wavenumber in cm-1 or  
       wavelength in microns 
 MODIFICATION HISTORY:
       Adapted from the IUE RDAF               August, 1989
       Converted to IDL V5.0   W. Landsman   September 1997
       Improve precision of constants    W. Landsman  January 2002


PLANET_COORDS $SSW/gen/idl_libs/astron/astro/planet_coords.pro
[Previous] [Next]
 NAME:
    PLANET_COORDS
 PURPOSE:  
    Find low or high precision RA and DEC for the planets given a date

 EXPLANATION:
    For low precision this routine uses HELIO to get the heliocentric ecliptic
    coordinates of the planets at the given date, then converts these to 
    geocentric ecliptic coordinates ala "Astronomical Algorithms" by Jean 
    Meeus (1991, p 209). These are then converted to RA and Dec using EULER.
    The accuracy between the years 1800 and 2050 is better than 1 arcminute 
    for  the terrestial planets, but reaches 10 arcminutes for Saturn.    
    Before 1850 or after 2050 the accuracy can get much worse.   

    For high precision use the /JPL option ito use the full JPL ephemeris.
 CALLING SEQUENCE:
    PLANET_COORDS, DATE, RA, DEC, [ PLANET = , /JD, /JPL]

 INPUTS:
       DATE - If /JD is not set, then date is a 3-6 element vector containing
              year,month (1-12), day, and optionally hour, minute, & second.
              If /JD is set then DATE is a Julian date.   An advantage of the
              /JD option is that it allows the use of vector dates.
 OUTPUTS:
       RA - right ascension of planet(s), J2000 degrees, double precision
       DEC - declination of   planet(s), J2000 degrees, double precision

 OPTIONAL INPUT KEYWORD:
       PLANET - scalar string giving name of a planet, e.g. 'venus'. Default 
               is to compute coords for all of them (except Earth).
       /JD - If set, then the date parameter should be supplied as Julian date
       JPL - if /JPL set, then PLANET_COORDS will call the procedure 
             JPLEPHINTERP to compute positions using the full JPL ephemeris.   
             The JPL ephemeris FITS file JPLEPH.405 must exist in either the 
             current directory, or in the directory specified by the 
             environment variable ASTRO_DATA.   Alternatively, the JPL keyword
             can be set to the full path and name of the ephemeris file.
             A copy of the JPL ephemeris FITS file JPLEPH.405 is available in
                 http://idlastro.gsfc.nasa.gov/ftp/data/
 CALLS: ***
	EULER, FIND_WITH_DEF [1], FIND_WITH_DEF [2], FIND_WITH_DEF [3], HELIO
	JPLEPHINTERP, JPLEPHREAD, JULDATE
 EXAMPLES:
    (1)  Find the RA, Dec of Venus on 1992 Dec 20
          IDL> planet_coords, [1992,12,20], ra,dec    ;Compute for all planets
          IDL> print,adstring(ra[1],dec[1],1)         ;Venus is second planet
     ====> RA = 21 05  2.66  Dec = -18 51 45.7
    This position is 37" from the full DE406 ephemeris position of
          RA = 21 05  5.24        -18 51 43.1

    (2) Return the current RA and Dec of all 8 planets using JPL ephemeris
          IDL> get_juldate, jd                 ;Get current Julian Date
          IDL> planet_coords,jd,ra,dec,/jd,/jpl  ;Find positions of all planets
          IDL> forprint,adstring(ra,dec,0)     ;Display positions   

    (3) Plot the declination of Mars for every day in the year 2001
          IDL> jdcnv,2001,1,1,0,jd      ;Get Julian date of midnight on Jan 1 
               Now get Mars RA,Dec for 365 consecutive days
          IDL> planet_coords,jd+indgen(365),ra,dec,/jd, planet = 'mars'     
          IDL> plot,indgen(365)+1,dec
 NOTES:
          HELIO is based on the two-body problem and neglects interactions 
           between the planets.   This is why the worst results are for
           Saturn.   Use the /JPL option or the online ephemeris generator 
           http://ssd.jpl.nasa.gov/cgi-bin/eph for more accuracy.

           The procedure returns astrometric coordinates, i.e. no correction
           for aberration.   A correction for light travel time is applied
           when /JPL is set, but not for the default low-precision calculation.
 PROCEDURES USED:
        JULDATE 
        EULER, HELIO  - if /JPL is not set
        JPLEPHREAD, JPLEPHINTERP - if /JPL is set
 REVISION HISTORY:
        Written P.Plait & W. Landsman     August 2000
        Fixed Julian date conversion   W. Landsman August 2000
        Added /JPL keyword  W. Landsman   July 2001
        Allow vector Julian dates with JPL ephemeris W. Landsman December 2002


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

   Purpose: plot ACE timeseries for user selected time/instrument

   Input Parameters:
      pt0, pt1 - time range (any SSW formats)

   Keyword Parameters:
      /EPAM, /SWEPAM, /SIS, /MAG - which ACE instrument to plot

      ytype - rsi standard ( /YTYPE <=> YTYPE=1 <=> log plot )

      protons_only - if set, only plot protons (EPAM only)
      electrons_only - if set, only plot electrons (EPAM only)
      particles - if set, particle summary (EPAM e, p, + SIS) stack 
      wind      - if set, SWEPAM (wind/density/temp) + MAG-Bz stack
      status (output) - return zero (0) if no data in range, 1 if data found
      use_data (input) - user/caller supplied vector of acedata
                         (used in recusively to avoid re-reads of multi-channel data 
                          in multi-plot modes like /PARTICLE and /WIND) 

   History:
      19-October-2001 - S.L.Freeland 
      11-Nov-2002 - S.L.Freeland - add some options 
                    (TAG,/PARTICLES,/WIND)
       5-Dec-2002 - add USE_DATA keyword and function
       1-jun-2003 - S.L.Freeland - add /CLEAR_LEGEND (-> legend.pro,/CLEAR)

   Calls: ***
	BOX_MESSAGE, DELVARX [1], DELVARX [2], DELVARX [3], DELVARX [4], EXIST
	GET_TAG_INDEX, LEGEND2, OUTPLOT [1], OUTPLOT [2], OUTPLOT [3], SSW_DBASE_INFO
	STR2ARR [1], STR2ARR [2], WDEF [1], WDEF [2], 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], linecolors [1], linecolors [2], reltime [1]
	reltime [2], required_tags, ssw_deltat, ssw_strsplit, str2number [1]
	str2number [2], strjustify, tag_index [1], tag_index [2]


plot_arc [1] $SSW/gen/idl/display/plot_arc.pro
[Previous] [Next]
NAME:
	plot_arc
PURPOSE:
	To allow a user to mark an arc on an image and the intensity
	along that arc will be plotted
SAMPLE CALLING SEQUENCE:
	plot_arc, index, image
	plot_arc, 0, gbo_image, /sample
	plot_arc, index, image, width, bin=bin
	plot_arc, index(1), data(*,*,1), 10, bin=4, /use_poly
	plot_arc, index(1), data(*,*,1), /enhance
RESTRICTIONS:
	The image must be re-displayed to insure that the user is marking
	the image in the proper location and proper scaling.
INPUT:
	image	- The image for which the curve wants to be plotted
OPTIONAL INPUT:
	width	- The width in original pixels of the curve.
		  (ie: the number of lines to add together)
		  This is the width of the channel for which to get
		  the light curve.
 CALLS: ***
	DEFROI [1], DEFROI [2], DERIV, PAUSE [1], POLY, POLY_FIT, SPLINE, TVPLOT, WDEF [1]
	WDEF [2], deriv_arr [1], deriv_arr [2], enhancer, gt_res, pause [2], plottime [1]
	plottime [2]
OPTIONAL KEYWORD INPUT:
	bin	- The rebinning factor.
		  If not passed, it will be set to whatever it takes
		  to make the image be 512 in the x direction.
	use_spline - If set, then use the SPLINE method for smoothing
		  the curve (Default is to use SPLINE)
	use_poly - If set, then use the POLYNOMIAL FIT method for smoothing
		  the curve (Default is to use SPLINE)
	ndeg	- The polynomial degree to be used for the fits.  If
		  not passed, it will use 4th degree polynomial.
	enhance - If you wish to use the function ENHANCE for displaying
		  the image, then pass the index in for the image being
		  displayed.
	sample	- If set, then use /SAMPLE option within REBIN instead
		  of interpolate (which is the default)
OPTIONAL KEYWORD OUTPUT:
	xlcur	- The x-array for the light curve array (relative units
		  of full resolution pixels)
	lcur	- The light curve array.  The units are the same as whatever
		  is being passed in, independent of BIN or WIDTH.  
		       Prior to 21-Jul-94, the units were:
		  (whatever was passed in) * (bin factor) * (width).
METHOD:
	DEFROI is used to mark the points on the image to make the
	arc.  The default is to make a polynomial fit to the x and
	y positions separately (as a function of the distance down
	the arc). 
HISTORY:
	Written 21-Oct-93 by M.Morrison
	15-Nov-93 (MDM) - Changed the calling sequence (to index,data)
			- Added ENHANCE and SAMPLE options (as per LWA program)
	 9-Jun-94 (MDM) - Modified to not crash when passing in a 1024x512
			  image (make bin = 0.5 for that case).
			- Corrected a bug for cases when bin = 0.5.
 V2.0	21-Jul-94 (MDM) - Corrected to not use the ENHANCED data for the
			  arc signal (when /enhance was set)
			- Corrected to normalize for the width and binning used,
			  so that units are in the same units as what is passed
			  in.
			- Added documentation information
 V2.1	25-Jul-94 (MDM) - Added /RESTORE to DEFROI call


PLOT_BOX $SSW/gen/idl/display/plot_box.pro
[Previous] [Next]
 Project     : RHESSI

 Name        : PLOT_BOX

 Purpose     : just plot a box

 Category    : display

 Syntax      : plot_box,xcen,ycen,width,height

 Inputs      : XCEN, YCEN - box center coordinates
               WIDTH, HEIGHT - box width & height
               [Default units are data]

 Keywords    : all plot keywords

 CALLS: ***
	ERR_STATE, PR_SYNTAX
 History     : Written:  D. Zarro, 23-May-04 (L-3Com/GSFC)

 Contact     : dzarro@solar.stanford.edu


PLOT_BSC [1] $SSW/gen/idl_fix/soft/old350/plot_bsc.pro
[Previous] [Next]
 NAME:
       PLOT_BSC
 PURPOSE:
       plot a BSC spectrum
 CALLING SEQUENCE:
       PLOT_BSC,BSC_INDEX,BSC_DATA
       PLOT_BSC,BSC_INDEX,BSC_DATA,/NOWIDGET
 INPUTS:
       BSC_INDEX    - BSC index structures
       BSC_DATA     - BSC data structure
 KEYWORDS:
       NOWIDGET     - Don't use the widget environment
 CALLS: ***
	BCS_SPEC_PLOT, BSC_CHECK [1], BSC_CHECK [2], CHKARG, GT_BSC_CHAN [1]
	GT_BSC_CHAN [2], GT_BSC_CRATE, OUTPLOT [1], OUTPLOT [2], OUTPLOT [3], SEL_BSC
	UTPLOT [1], UTPLOT [2], UTPLOT [3], UTPLOT [4], UTPLOT [5], UTPLOT [6], WBSC [1]
	WBSC [2], clearplot [1], clearplot [2], input [1], input [2], int2secarr [1]
	int2secarr [2]
 HISTORY:
       Nov'92  - written by D. Zarro (ARC)
       Sept'93 - added call to BCS_SPEC_PLOT for single spectrum case
	30-sep-93, JRL, Check on ss= for call to BCS_SPEC_PLOT
	15-oct-93, DMZ, Added ebar keyword
       30-Nov-93, DMZ, added /SECOND keyword to oplot 2nd cmpt
        9-Dec-93, DMZ, added VUNIT switch
       13-Dec-93, DMZ, added /BLUE switch 
        (same effect as /second, and consistent with FIT_BSC and CAL_BSC)
       24-Jan-94, DMZ, added CLEARPLOT and /PRIMARY keyword


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

 Name        :	PLOT_ERR

 Purpose     :	Plot data with error bars in both X and Y directions

 Explanation :	Plots data points with accompanying error bars in both the X
		and Y directions.

		A plot of X versus Y with error bars drawn from X-XERR to
		X+XERR and from Y-YERR to Y+YERR is written to the output
		device.  Optionally, one can give different sizes for the lower
		and upper error bars.

		If !BCOLOR is not zero, then that color is used for error bars.

 Use         :	PLOT_ERR, [ X, ]  Y  [, XERR=XERR]  [, YERR=YERR]

 Inputs      :	Y = array of Y values.

 Opt. Inputs :	X = array of X values.  If not passed, then the index of Y is
		    used instead.

 Outputs     :	None.

 Opt. Outputs:	None.

 Keywords    :	XERR	  = Array of errors in X
		YERR	  = array of errors in Y.

		The error arrays can take one of two forms:

		    * Same dimensions as the data arrays, in which case the
		      error is applied in both the X and Y directions

		    * An extra initial dimension of 2, in which case the
		      first value is the size of the lower (or left) error bar,
		      and the second value is the size of the upper (or right)
		      error bar.

		PSYM	  = Symbol to use for plotting.  Default is 7 (X).
		SYMSIZE   = Symbol size
		COLOR	  = Color to use for plotting.
		BCOLOR	  = Color to use instead of !BCOLOR for error bars.
		LINESTYLE = Line style
		THICK	  = Line thickness
		UTPLOT	  = If set, then the first (X) parameter is considered
			    to be time in one of the CDS time formats.  This is
			    only allowed if both X and Y are passed.  If used,
			    then XERR is in seconds.

		Also, most PLOT keywords are supported.

 Calls       : ***
	DATATYPE [1], DATATYPE [2], DATATYPE [3], OUTPLOT [1], OUTPLOT [2], OUTPLOT [3]
	TAI2UTC, UTC2TAI, UTPLOT [1], UTPLOT [2], UTPLOT [3], UTPLOT [4], UTPLOT [5]
	UTPLOT [6]
 CALLED BY:
	PLOT_VDS_BIAS
 Common      :	None.

 Restrictions:	Requires that the system parameter !BCOLOR be defined.

 Side effects:	None.

 Category    :	Utilities, Plotting

 Prev. Hist. :	Based on an earlier routine called PLOTERR2.

 Written     :	William Thompson, GSFC, 19 April 1995

 Modified    :	Version 1, William Thompson, 19 April 1995
		Version 2, William Thompson, GSFC, 20 April 1995
			Added keyword UTPLOT.
			Made determination of symmetrical/asymmetrical error
			bars more robust.
               Version 3 CDP, 30-Nov-95
                       Cut linestyle from plot call so keyword is acted upon
		Version 4, William Thompson, GSFC, 18 December 2002
			Changed !COLOR to !P.COLOR

 Version     :	Version 4, 18 December 2002


plot_gbl [1] $SSW/gen/idl_fix/soft/old310/plot_gbl.pro
[Previous] [Next]
NAME:
	plot_gbl
PURPOSE:
	To plot the GRO/BATSE light curve data
SAMPLE CALLING SEQUENCE:
	plot_gbl, '8-may-91 13:00', '8-may-91 13:15'
	plot_gbl, event=1000
INPUT:
	sttim	- The start time to plot
	entim	- The end time to plot
 CALLS: ***
	RD_GBE, UTPLOT [1], UTPLOT [2], UTPLOT [3], UTPLOT [4], UTPLOT [5], UTPLOT [6]
	anytim2ints [1], anytim2ints [2], rd_gbl
 CALLED BY:
	monthly_summary
OPTIONAL KEYWORD INPUT:
	event	- If set, plot the light curve for that event
	yrange	- The Y plotting range
HISTORY:
	Written 16-Apr-93 by M.Morrison
	 6-May-93 (MDM) - Added YRANGE


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

   Purpose: demo read & plot GOES proton/electron values

   Input Parameters:
      p0 - Tstart for  read/plot OR vector of GOES particle structures (rd_goesp_ascii output)
      p1 - Tstop time for read/plot GOES particle structure.

   Output Parameters:
      goesp - optional output GOES particle records (if p0/p1 = time range)
     
   Keyword Parameters:
      nodefcolors - (switch) - if set, dont use "fancy" colors
      nowindow - (switch) - dont make a new window
      reverse - (switch) - implies /NODEFCOLORS - true for white on black
      pchannels - (optional) - array of Proton/Part channels to plot ( def=indgen(6) )
      echannels - (optional) - array of Electron channesl to plot ( def=indgen(3) )
      hour_window - optional time window (in hours) to plot (1 or 2 elem array)
                    (ignored if time range or structure are input)
      _extra - unrecognized keywords -> utplot via inheritance
      proton_only - (switch) if set, only plot proton data
      electron_only - (switch) if set, only plot electron data
      ytype - (standard RSI definition - pass to utplot)
      log   - sets ytype=1 (log plot)
      goesN (where N in {8,9,10,12}) - desired GOES satellite

   Calling Sequence:
      IDL> plot_goesp, time0, time1 [,/xray] [,pchannels=parray] [,echannels=earray]

   Calling Examples:
      IDL> plot_goesp, time0, time1, [OPTIONS] ; user supplied time range  
           -OR- 
      IDL> plot_goesp, goesp         [OPTIONS] ; user supplied GOESP structures    
                                               ; ( ie, rd_goesp_ascii output)

           Plot all Proton and Electron channels, log (garish!)
      IDL> plot_goesp,'14-jul-2000','17-jul-2000',/ytype  

           Plot only 3 low proton channels , linear, to Zbuffer
      IDL> plot_goesp,'14-jul-2000','17-jul-2000',pchan=[0,1,2],/proton,/zbuff

           Plot only low electron channel in existing color table, reversed
           Structure vector returned in GOESP (3rd parameter)
      IDL> plot_goesp,'14-jul-2000','17-jul-2000',goesp,/electron,echan=0,/reverse
                                                 | OUT |
   Referenced Routines:
      rd_goesp_ascii, rd_gxd, time_window, linecolors, wdef, 
      utplot, required_tags, data_chk

 CALLED BY:
	eit_proton_summary
   History:
      17-July-2000 - demo use of 'rd_goesp_ascii' and/or do some summary plots
      19-Oct-2001  - allow no parameters (last ~24 hours)
       9-apr-2001 - add /GOES10 + /GOES12 (-> rd_goesp_ascii) - GOES 8 off ~8-apr-2003
   
 CALLS: ***
	ALL_VALS [1], ALL_VALS [2], ARR2STR [1], Arr2Str [2], BOX_MESSAGE, EXIST, LEGEND [1]
	LEGEND [2], LEGEND [3], OUTPLOT [1], OUTPLOT [2], OUTPLOT [3], WDEF [1], WDEF [2]
	data_chk [1], data_chk [2], gt_tagval [1], gt_tagval [2], linecolors [1]
	linecolors [2], rd_goesp_ascii, reltime [1], reltime [2], required_tags
	ssw_deltat, str_replace [1], str_replace [2], strarrcompress, strextract
	time_window
   Side Effects:
      May make an Xwindow (override via /ZBUFFER)
      loads 'linecolors.pro' color table (override via /REVERSE or /NODEFCOL)


PLOT_HELIO [1] $SSW/gen/idl/solar/plot_helio.pro
[Previous] [Next]
 Project     : SMM-XRP

 Name        : PLOT_HELIO

 Purpose     : Plot solar heliographic grid and limb

 Category    : Plotting

 Explanation : Uses heliographic formulae from:
               "Textbook on Spherical Astronomy",
               by W.M. Smart (see page 174).

 Syntax      : plot_helio,date,grid=grid,glabel=glabel

 Inputs      : DATE = date/time

 Opt. Outputs: LAT,LON = latitude and longitude arrays

 Keywords    : GRID_SPACING = spacing (deg) of lat-long  [def = 10]
               GLABEL = label lat-long grid with coordinate values (def = no labels)
               OVER = control erasing of previously drawn plot. Setting this
                        to 1 will cause grid to be overlaid on a drawn plot
               GCOLOR  = color index for grid
               GFONT   = gfont index for grid label
               ROLL = solar roll (deg) clockwise from solar north
               CENTER = roll center [def = 0,0]
               GSTYLE = grid linestyle [def=0]
               GTHICK = grid thickness
               XRANGE,YRANGE = data ranges in arcsecs
               LIMB_PLOT =  plot limb
               LMCOLOR = color index for limb
               LMTHICK = thickness of limb

 CALLS: ***
	ANYTIM2UTC [1], ANYTIM2UTC [2], DPRINT, EXIST, GET_UTC, HEL2ARCMIN [1]
	HEL2ARCMIN [2], IS_WOPEN, NINT [1], NINT [2], PB0R, WDEF [1], WDEF [2], is_number [1]
	is_number [2], roll_xy
 CALLED BY:
	PLOT_CDS_POINT [1], PLOT_CDS_POINT [2], PLOT_MAP
	PLOT_MAP2 WARNINGTEMPORARY FIX ONLY FOR 16 bit ZBuffer support
	SOLB_PLOT_POINTING [1], SOLB_PLOT_POINTING [2]
 History     : Written, 22 December 1991, D. Zarro, ARC/GSFC
               Modified,30 November 1999, Zarro (SM&A/GSFC) - added RANGE
                keywords
               Modified,17 April 2000, Zarro (SM&A/GSFC) - added /LIMB
               and made SOHO/Yohkoh cross-compatible
               Modified, 1-Sept-2001, Zarro (EITI/GSFC) - ensure PSYM=0
               when plotting limb
               Modified, 16-Sept-2001, Zarro (EITI/GSFC) - added
               check for ROLL_CENTER within image
               Modified, 10-Oct-2001, Zarro (EITI/GSFC) - fixed bug in
               limb calculation when roll is applied
               Modified, 10-Jan-2002, Zarro (EITI/GSFC) - fixed bug in
               use of /SOHO
               Modified, 4-Nov-2002, Zarro (EER/GSFC) - added GCOLOR
               Modified, 23-Feb-2004, Kim Tolbert - added lmthick
               Modified, 24-Feb-2004, Zarro (L-3Com/GSFC) - changed
               lcolor to lmcolor for consistency with lmthick
               Modified, 26-Oct-2004, Yurow (L-3Com/GSFC) - added
               _EXTRA keyword that is passed to the plot command.
               Modified 11-Jan-2004, Zarro (L-3Com/GSFC) - added b0 keyword
               Modified 17-Jul-2005, Zarro (L-3Com/GSFC) - added GTHICK keyword

 Contact     : dzarro@solar.stanford.edu


plot_hist [1] $SSW/gen/idl/genutil/plot_hist.pro
[Previous] [Next]
NAME:
	plot_hist
PURPOSE:
	To plot a histogram with a properly labeled X axis.
SAMPLE CALLING SEQUENCE:
	plot_hist, img
	plot_hist, img, x, h
	plot_hist, img, bin=0.1
	plot_hist, img, xrange=xrange, yrange=yrange, tit=tit
INPUT:
	data	- The data to perform the historam on
OUTPUT:
	x	- The x axis for the plotting
	h	- The histogram
OPTIONAL KEYWORD INPUTS:
	bin	- The bin size to use (default is 1)
	xrange	- The x plotting range
	yrange	- The y plotting range
	[x,y]style  - See plot keyword options
	{x,y]margin - See plot keyword options
	[x,y]ticklen - See plot keyword options
	[x,y]title - Optional titles for the x and y axes
	title	- The title
	log	- If set, then plot the y axis in log form
	oplot   - If set, overplot on previous histogram
 CALLED BY:
	plot_expos_hist
		NOTE:  If bin is not equal 1 then you MUST specify 
		bin for oplot to match properties of original plot.
	color   - Choose color for plot
HISTORY:
	Written Apr-95 by M.Morrison
	18-May-95 (MDM) - Added /LOG switch
			- Plot such that the minimum occurance is 0.1
	 7-Jul-95 (MDM) - Fixed the plot so that min occurance is 0.1
	27-Nov-95 (LWA) - Added noerase, linestyle, charsize  keywords.
	 8-Nov-96 (MDM) - Merged 27-Nov-95 changes with the ones below:
		17-May-96 (MDM) - Added xtitle
		11-Sep-96 (MDM) - Added ROUND when creating "data0"
	 8-Nov-96 (MDM) - Added "oplot" option
	21-Apr-99 (LWA) - Added xstyle and ystyle keywords.
	30-Apr-99 (LWA) - Added [x,y]ticklen, [x,y]title, [x,y]margin keywords.
	 9-Nov-02 (LWA) - Added keyword color


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

 Name        :	PLOT_HISTO

 Purpose     :	Plots a histogram from the variable ARRAY.

 Category    :	Class3, Graphics

 Explanation :	Plots a histogram from the variable ARRAY.  Calls FORM_HISTO to
		decide what the coarseness of the histogram should be.  Then
		PLOTBAR is called to plot the histogram.

 Syntax      :	PLOT_HISTO, ARRAY  [, STEPS, HISTO ]

 Examples    :	PLOT_HISTO, ARRAY

 Inputs      :	ARRAY	= Array to plot histogram of.

 Opt. Inputs :	None.

 Outputs     :	None.

 Opt. Outputs:	STEPS	= Values at which histogram is taken.  Each value
			  represents histogram between STEP(I) and STEP(I+1).
		HISTO	= Histogram values.

 Keywords    :	DELTA	= Distance between histogram steps.  If not passed,
			  then FORM_HISTO chooses a suitable value.
		XLOG	= If set, then X axis is logarithmic.
		YLOG	= If set, then Y axis is logarithmic.
		BCOLOR	= Color to use instead of !BCOLOR for bar interiors.
               MISSING = Value flagging missing pixels.  Missing pixels can
                         also be flagged as Not-A-Number.

 Calls       : ***
	FORM_HISTO, PLOTBAR
 Common      :	None.

 Restrictions:	None.

 Side effects:	None.

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

	William Thompson, December 1991, added keywords XTYPE and YTYPE.
	William Thompson, May 1992, added keywords XRANGE and YRANGE.

 History     :	Version 1, 22-Jan-1996, William Thompson, GSFC
			Incorporated into CDS library
		Version 2, 22-May-2000, William Thompson, GSFC
			Replaced several keywords with _EXTRA mechanism.
			Renamed XTYPE, YTYPE with more modern XLOG, YLOG
			Corrected handling of logarithmic axes.
               Version 3, 19-Jun-2006, William Thompson, GSFC
                       Added keyword MISSING.  Use FORM_HISTO,ERRMSG=...

 Contact     :	WTHOMPSON


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

 Name        : 
	PLOT_IMAGE
 Purpose     : 
	Display images with plot axes around it.
 Explanation : 
	Display images with plot axes around it.  Subsequent graphics commands,
	such as OPLOT and CURSOR, can then be called in the ordinary way.  In
	other words, the concept is to make displaying an image a graphics
	command, like PLOT or CONTOUR.  Then the special TV calls don't have to
	be used.

	SETSCALE is called to set the scale.  Axes are then plotted, and
	EXPAND_TV is called to display the image.  SETSCALE is then called
	again to reset to the default.

	If the NOSQUARE keyword is set, then SETSCALE is not called.  In this
	case, either the scale will be chosen in the normal manner, or a
	predefined scale (e.g. using SETSCALE) will be used.

	Will plot true color images if the device has enough colors and if
	IMAGE is a 3D Array with the third dimension color (red, green, blue).
	(See also the TRUE keyword.)

 Use         : 
	PLOT_IMAGE, IMAGE
 Inputs      : 
	IMAGE	 = Two dimensional image array to be displayed, or 3 images in 
		   an array [Nx,Ny,3] to be displayed as a true color image.
		   (See also the TRUE keyword.)
 Opt. Inputs : 
	None.
 Outputs     : 
	None.
 Opt. Outputs: 
	None.
 Keywords    : 
	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.
	NOERASE	 = If set, then the screen is not erased before putting up the
		   plot.
	NOSQUARE = If set, then the scales in the X and Y directions are not
		   forced to be the same.
	NOADJUST = If set, then the viewport parameters !SC1,!SC2,!SC3,!SC4 are
		   not modified.  Ignored if NOSQUARE is set.
	SMOOTH	 = If set, then the image is expanded with bilinear
		   interpolation.
	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.
	COLOR	 = Color used for drawing the axes.
	MAX	 = The maximum value of ARRAY to be considered in scaling the
		   image, as used by BYTSCL.  The default is the maximum value
		   of ARRAY.
	MIN	 = The minimum value of ARRAY to be considered in scaling the
		   image, as used by BYTSCL.  The default is the minimum value
		   of ARRAY.
	TOP	 = The maximum value of the scaled image array, as used by
		   BYTSCL.  The default is !D.N_COLORS-1.
	BOTTOM	 = The minimum value of the scaled image array, as used by
		   BYTSCL.  The default is 0.
	VELOCITY = If set, then the image is scaled using FORM_VEL as a
		   velocity image.  Can be used in conjunction with COMBINED
		   keyword.  Ignored if NOSCALE is set.
	COMBINED = Signals that the image is to be displayed in one of two
		   combined color tables.  Can be used by itself, or in
		   conjunction with the VELOCITY or LOWER keywords.
	LOWER	 = If set, then the image is placed in the lower part of the
		   color table, rather than the upper.  Used in conjunction
		   with COMBINED keyword.
       BSCALED  = Returns the bytescaled image passed to the TV command.
	TITLE	 = Main plot title, default is !P.TITLE.
	XTITLE	 = X axis title, default is !X.TITLE.
	YTITLE	 = Y axis title, default is !Y.TITLE.
	XTICK_GET= Same as for PLOT
	YTICK_GET= Same as for PLOT
	CHARSIZE = Character size to use in making plot.
	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.

	Also, any other keyword used by PLOT is supported.

 Calls       : ***
	EXPAND_TV, SETSCALE [1], SETSCALE [2]
 CALLED BY:
	BP_SEEK_POS, CONNECT, Determine Drift Rate, EIS_RASTER_BROWSER [1]
	HESSI Compound Widget Simulation, HESSI_IMAGE_TEST, HSI_IMAGE_TEST [2]
	HSI_IMAGE_TEST__define, HSI_LOCATE_FLARE [2], HSI_LOCATE_FLARE [4]
	HSI_MEM_SATO [1], HSI_MODPAT_TEST, HSI_PSF_TEST, HSI_SCORE_BPROJ, MONO_SPEC
	NIS_QUICKLOOK, OVSA_BG, OVSA__DEFINE, POINT SPREAD FUNCTION CLASS DEFINITION
	POLY_SPEC, SHOW_SYNOPTIC, SLIT45_IMAGE_DEMO, XCOR_CDS, eis_raster_browser [2]
	hsi_locate_flare [1], hsi_locate_flare [3], ovsa_interact
 Common      : 
	None.
 Restrictions: 
	The graphics device must be capable of displaying images.

	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: 
	Unless the NOSQUARE keyword is set, the system variables !X.STYLE,
	!Y.STYLE, !X.S, !Y.S, !X.RANGE (!XMIN and !XMAX) and !Y.RANGE (!YMIN
	and !YMAX) are modified.  Any previous settings are lost.

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

	Messages about the size and position of the displayed image are printed
	to the terminal screen.  This can be turned off by setting !QUIET to 1.

 Category    : 
	Utilities, Image_display.
 Prev. Hist. : 
	William Thompson, May 1992.
	William Thompson, August 1992, renamed BADPIXEL to MISSING.
	William Thompson, September 1992, use COMBINED keyword in place of
		INTENSITY.
	William Thompson, October 1992, modified so that keyword ORIGIN refers
		to the center of the first pixel, rather than to the lower left
		corner.
	William Thompson, November 1992, modified behavior when /NOSQUARE
		keyword is used to force exact X and Y ranges.
	William Thompson, November 1992, modified to be compatible with
		!P.MULTI.
	William Thompson, January 1993, modified to use modern system variable
		names.
	William Thompson, 28 April 1993, fixed bug with COLOR keyword.
	William Thompson, 30 April 1993, fixed bug with !P.MULTI.
 Written     : 
	William Thompson, GSFC, May 1992.
 Modified    : 
	Version 1, William Thompson, GSFC, 12 May 1993.
		Incorporated into CDS library.
	Version 2, William Thompson, GSFC, 9 November 1993.
		Removed (unnecessary) restriction that scales be positive.
	Version 3, William Thompson, GSFC, 26 December 1995
		Removed NOSTORE keyword from EXPAND_TV call.
	Version 4, William Thompson, GSFC, 8 October 1996
		Added _EXTRA keyword, to allow any keyword used by PLOT.
		Added CHARSIZE keyword.
	Version 5, William Thompson, GSFC, 9 April 1997
		Added XRANGE and YRANGE keywords to call to PLOT, as suggested
		by Vincenzo Andretta
	Version 6, Terry Kucera, GSFC, 29 March 2000
		Added XTICK_GET and YTICK_GET
	Version 7, Terry Kucera, GSFC, 16 October 2001
		Automatically does a true color display if the third array dimension = 3 
	Version 8, William Thompson, GSFC, 13 November 2001
		Added keyword TRUE
	Version 9, William Thompson, GSFC, 18 December 2002
		Changed !COLOR to !P.COLOR
       Version 10, William Thompson, GSFC, 12 October 2004
               Extend true-color to PostScript
       Version 11, William Thompson, GSFC, 3-Jan-2006
               Added keyword BOTTOM
       Version 12, William Thompson, GSFC, 26-Sep-2006
               Added keyword BSCALED
 Version     : 
	Version 12, 26-Sep-2006


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

 Name        :	PLOT_ITEM

 Purpose     :	Plots individual planning items on science plan.

 Explanation :	This routine plots lines for the beginning and end times of a
		given planning item for a particular instrument at the
		appropriate point on the science plan display.  The text label
		for the item is then written inside the resulting box.

 Use         :	PLOT_ITEM, T1, T2, ROW, LABEL

 Inputs      :	T1	= The start time for the item.
		T2	= The end time for the item.
		ROW	= The row that the item belongs to.
		LABEL	= The label for the item.

 Opt. Inputs :	None.

 Outputs     :	None.

 Opt. Outputs:	None.

 Keywords    :	MAXCHARSIZE = The maximum character size to use in displaying
			      the message.  If not passed, then determined from
			      !P.CHARSIZE.
		COLOR	    = The color in which the item should be drawn.
               TT          = 1 or 0 if ITEM is TIME-TAGGED or NOT
		UCOLOR	    = The color in which the un-time-tagged
		              item should be drawn.

 Calls       : ***
	WRITE_IN_BOX
 CALLED BY:
	OPLOT_SPLAN, PLOT_SPLAN, eis_timeline_plot_gui [1], eis_timeline_plot_gui [2]
 Common      :	None.

 Restrictions:	PLAN_FRAME must be called first.

 Side effects:	None.

 Category    :	Planning, Science.

 Prev. Hist. :	None.

 Written     :	William Thompson, GSFC, 16 July 1993.

 Modified    :	Version 1, William Thompson, GSFC, 16 July 1993.
		Version 2, Elaine Einfalt, GSFC (HSTX), 23 March 1994
			Added the COLOR keyword to the call to WRITE_IN_BOX.
               Version 2.1, Dominic Zarro (ARC), 18 September 1994
                       Vectorized
               Version 2.2, Liyun Wang, GSFC/ARC, May 17, 1995
                       Changed name from plan_item_plot.
               Version 2.3, Liyun Wang, GSFC/ARC, Liyun Wang, GSFC/ARC
                       Made the line for an item that is cut off by the
                          display plotted dashed line
               Version 2.3.1, Dominic Zarro, ARC, added UCOLOR and TT
               Version 2.4, Liyun Wang, GSFC/ARC, August 22, 1995
                       Modified such that if LABEL is an empty string, 
                          the item is plotted with the polyfill function

 Version     :	Version 2.4, August 22, 1995


plot_lcur [1] $SSW/gen/idl/display/plot_lcur.pro
[Previous] [Next]
NAME:
	plot_lcur
PURPOSE:
	Plot a light curve and allow the user to blowup
	on certain areas.  It returns the subscripts of
	the last selected region.
CALLING SEQUENCE:
	ss = plot_lcur(roadmap, roadmap.sxs1)
	ss = plot_lcur(roadmap, /nodata, qblowup=qblowup)
	ss = plot_lcur(index, gt_sum_l(index), plotr=a, title=title)
	ss = plot_lcur(index, gt_sum_l(index), /nohard)
INPUTS:
	struct	- the structure that holds the .time and .day fields
		  If struct is a floating point array, and ref_time is
		  not passed in, then PLOT will be used instead of UTPLOT
	array	- the array to be plotted
OPTIONAL INPUT PARAMETERS:
	ref_time- The reference time to use with UTPLOT.  If it is
		  undefined, then struct(0) is used.  Must be in form of
		  a structure (.time, .day fields) (?)

	noplot	- If set, do not plot any data, but allow the user
		  to select a starting and ending time to be blown
		  up (used for cases where the data to be plotted is
		  more complex)
	psym	- the plotting symbol used.  Default is 1 (a + sign)
	title	- A title string for the plot
	nohard	- If set, do not allow or display the hardcopy capabiltiy
	nomultiset - If set, do not allow multiple selection
	extra1	- A string with a description to be used for the lower left
		  box/right button key option
	nowhere	- If set, then do not do a "where" to find the subscripts
		  of the selected times.  It is used in conjunction with
		  the /NOPLOT option and the XSEL value is passed back
		  to be used by the calling routine
OPTIONAL OUTPUT PARAMETERS:
	qblowup	- used with the /noplot option.  Tells the calling
		  procedure that the user wants a blowup of the
		  selected area.
	plotr	- Returns the min and max subscripts of the input
		  vector that were used for the last plot (refresh of
		  the screen).  This allows a programmer to plot light
		  curves for the extracted datasets AND for a larger
		  region that goes beyond the extracted datasets.
		  Bob Bentley requested this capability
	multiset- If the user wants to select multiple start and end times,
		  using the middle button on the left box, the resulting
		  matrix of 2xN subscripts will be returned, where the
		  (0,*) is the starting subscript and (1,*) is the end.
		  Using the reset option will clear the accumulated
		  marks.
	qhard	- used with the /noplot option.  Tells the calling
		  procedure that the user wants a hardcopy of the
		  selected area.
	qhard	- used with the /noplot option.  Tells the calling
		  procedure that the user wants to reset to the full
		  range.
	qextra1	- if bottom left box/right button was select, return
		  true
	xsel	- the x data coordinates selected.
	ysel	- the y data coordinates selected.
 CALLS: ***
	BOX_CURSOR, PLOT_VLINE, UTPLOT [1], UTPLOT [2], UTPLOT [3], UTPLOT [4], UTPLOT [5]
	UTPLOT [6], data_type [1], data_type [2], int2secarr [1], int2secarr [2]
	pprint [1], pprint [2]
 CALLED BY:
	BORN_AGAIN, HXT_TEEM, SXSPC, box_sxthxt_fsp, choose_interval, get_bcs
	goes_reducer [1], hxt_hs_bgd, hxtbox_fsp, plot_fem, plot_trav [1], plot_trav [2]
	plot_trav [3], ploty [1], ploty [2], rd_wbs_pha [1], rd_wbs_pha [2], show_obs4
	soup_obs2, sxtbox_fsp
 RESTRICTIONS:
	Only works on workstations that have a puck to allow the
	CURSOR function to work.
 HISTORY:
	Written 4-Mar-92 by M.Morrison
	20-Mar-92 (MDM) - Added "plotr" and "title" options
			- Also added hard copy capability
	20-Mar-92 (MDM) - Added the "multiset" option
	29-Apr-92 (MDM) - Removed the /DELETE command from hardcopy
			  option
	29-Apr-92 (MDM) - Added "qhard" and "qreset" option
	 2-May-92 (MDM) - Added "extra1" and "qextra1" options as
			  well as "xsel" and "ysel" option
	 5-May-92 (MDM) - Changed "extra" option to use box_cursor
			  to mark the box to select
			- Added "nomultiset" option
	26-May-92 (MDM) - Expanded to work with TEK plotting device
	29-May-92 (MDM) - Added "ynozero"
	 9-Jun-92 (MDM) - Adjusted so that an floating array can be passed in
			  as the X parameter (previously it had to be a structure)
	14-Jul-93 (MDM) - Added SYMSIZE
	25-Jul-94 (MDM) - Moved the print statement for the instructions outside
			  of the loop
	10-Mar-95 (MDM) - Modified to accept a floating point array as "x" input
			  and to simply plot "x" versus "y" if REF_TIME is not
			  passed in (ie: not to call UTPLOT)
	15-Jan-95 (LWA) - Replaced indgen with lindgen to handle larger arrays.
	 3-Apr-00 (LWA) - Added YRANGE and YSTYLE.
	Jun-01, Paul Hick
			Added check for !d.name = 'WIN' to make it work on windows
			Added _extra keyword and removed all generic plot keywords passed
				to utplot and plot.
			Replaced calls to 'plot_vline' by call to 'oplot'
			Added erase of vertical line of previous selection of left/right boundary


PLOT_MAP $SSW/gen/idl/mapping/plot_map.pro
[Previous] [Next]
 Project     : SOHO_CDS

 Name        : PLOT_MAP

 Purpose     : Plot an image map

 Category    : imaging

 Syntax      : plot_map,map

 Inputs      : MAP = image structure map created by MAKE_MAP
               INDEX = optional index (if array of maps) [def=0]

 Keywords    :
     /OVERLAY = overlay on previous image
     /CONT = contour the image
     SMOOTH_WIDTH = smoothing width (> 1)
     FOV = [fx,fy] = field of view to be plotted
     GRID_SPACING = grid spacing (deg) for latitude-longitude grid [def= 0, no grid]
     GLABEL = label grid with coordinate values [def = 0, no labels]
     GSTYLE = grid linestyle [def=0]
     CENTER = [xc,yc] = center coordinates (arcsec) of FOV [def = center of image]
            (if center is a valid map, then use its center)
     DMIN,DMAX = min, max data for plot [def = data min,max]
     BORDER = draw border around image [def = no]
     /TAIL = allows user to tailor contours
     /LOG  = log_10 scale image
     WINDOW = window index to send plot to
     /NOAXES = inhibit plotting axes
     /NOTITLE = inhibit printing title
     /NOLABELS = inhibit axis labels
     /NOXTICKS = inhibit X-tick labels
     /NOYTICKS = inhibit Y-tick labels
     /DROTATE  = solar rotate image contour
     LEVELS  = user specified contour levels
     /POSITIVE_ONLY = plot positive data
     /NEGATIVE_ONLY = plot negative data
     XRANGE,YRANGE = cartesian plot limits
     /INTERLACE = interlace two images when overlaying
     /COMPOSITE = simultaneously plot two images when overlaying
                = type of compositing:
                  1: original , 2: latest(new), 3: max(new/old) 4: min(new/old)
     /AVERAGE   = average two images when using /COMPOSITE
     BOTTOM = lowermost color index to use in color scaling [def=0]
     LAST_SCALE = use MIN/MAX from previous plot, or if LAST is a valid map
                  use scaling from it
     LIMB_PLOT = overplot solar limb
     ROLL = roll image contour
     BTHICK = border thickness
     CTHICK, C_THICK = contour thickness
     BCOLOR = border line color (defaults to white)
     LCOLOR, C_COLORS = contour line color (defaults to white)
     GCOLOR = grid color  (defaults to white)
     GTHICK = grid thickness
     LMCOLOR = limb color (defaults to white)
     LMTHICK = limb thickness
     MULTI = set for multiple plots per page, e.g. mult=[2,2] (or 2) for 4
             plots per page (!p.multi remains at this value until cleared)
     NOERASE = don't erase previous plot
     SQUARE_SCALE = force equal aspect ratio (by adjusting position)
     CLABEL  = label contours
     CSTYLE, C_STYLE  = contour linestyle
     MARGIN  = margin around plot [normalized coords, used only if /SQUARE]
     /SURFACE = show the image as a wire surface
     /SHADE_SURF = show the image as a shaded surface
     AX_SURF = Angle of rotation about X axis for surface (degrees)
     AZ_SURF = Angle of rotation about Z axis for surface (degrees)
     ERR_MSG = String error message if any
     STATUS = 0/1 means failure/success
     CBAR = 0/1 means draw colorbar on image plots (only works in > IDL 5.2)
     CCHARSIZE = size of characters used for contour level labels.  (if not set, but charsize is
        passed in extra, then c_charsize is .75 * charsize.  Otherwise 0.)
     PERCENT = if levels are entered, they are in % of data max
     MARK_POINT = if set to a 2-element array, it is the x,y data coords of a point to be marked
        If point is not within plot, and arrow off edge of plot shows direction to point.
     NEAREST = if maps is an array, then plot map nearest in time to this value
     XSHIFT, YSHIFT = arcsec shifts to apply to map (same as TRANS)
     NO_ROLL = do not apply roll correction
     DURTITLE = If set, plot title will include duration of image.  Title will be
        map.id +  dd-mmm-yy hh:mm:ss-hh:mm:ss

 CALLS: ***
	ADD_TAG [1], ADD_TAG [2], ANYTIM2TAI, ANYTIM2UTC [1], ANYTIM2UTC [2], APPEND_ARR
	CONGRID [1], CONGRID [2], CONGRID [3], CSCALE, DATATYPE [1], DATATYPE [2]
	DATATYPE [3], DELVARX [1], DELVARX [2], DELVARX [3], DELVARX [4], DPRINT, DROT_XY
	DSCALE, EXIST, GET_ASPECT, GET_DROT_DUR, GET_MAP_CENTER, GET_MAP_DRANGE, GET_MAP_FOV
	GET_MAP_PROP, GET_MAP_SUB, GET_MAP_TIME, GET_MAP_XP, GET_MAP_XRANGE, GET_MAP_YP
	GET_MAP_YRANGE, GET_XWIN [1], HAVE_TAG, IS_STRING, MARK_POINT, NINT [1], NINT [2]
	PLOT_HELIO [1], PLOT_HELIO [2], PLOT_MAP_COLORBAR, PLOT_MAP_WHITE, PR_SYNTAX
	REM_TAG [1], REM_TAG [2], REP_TAG_NAME, REP_TAG_VALUE, SHOW3, SINCE_VERSION [1]
	SINCE_VERSION [2], SMART_WINDOW, STR2ARR [1], STR2ARR [2], SWISS_CHEESE
	TAG_EXIST [1], TAG_EXIST [2], TRIM, UNIQ [1], UNIQ [2], UNIQ [3], VALID_MAP
	VALID_RANGE, VALID_TIME, WHERE_OFF_LIMB, anytim [1], anytim [2], anytim [3]
	anytim [4], anytim [5], data_chk [1], data_chk [2], delvarx [5], get_xwin [2]
	is_number [1], is_number [2], is_struct, roll_xy, wc_where [1], wc_where [2]
 CALLED BY:
	BLINK_MAP, LOCATE_FFCAL, MAP2GIF, MAP2JPEG, MAP2MPEG, MAP__DEFINE, MOVIE_MAP
	PATCH_MAP, PLOT_CDS_POINT [1], PLOT_CDS_POINT [2], SUB_MAP, SXT__DEFINE
	display_ovsamap, hsi_image_plot, norh_plot, norh_plot_alpha, region_mark
	ssw_fov_context, todays_targets, trace_movie_context
 Restrictions:
      - do not set /GRID unless absolute coordinates of image are known
      - do not set /OVERLAY unless a plot exists on the current device

 History     : Written 22 December 1996, D. Zarro, SAC/GSFC
             : S.L.Freeland - let COMPOSITE have different interpretations
             : Major modifications 15 Feb 1999, Zarro (SM&A/GSFC)
                -- reorganized
                -- sped-up sub-field extraction
                -- fixed potential bug in contour levels scaling
                -- fixed potential bug in image color scaling
                -- fixed roll correction
             : Zarro (SM&A/GSFC) 28 April 1999
                -- fixed roll_center interpretation
                (heaven help me for onlining this during Gopal's CDAW)
             : Zarro (SM&A/GSFC) 3 May 1999
                -- allowed overlaying images with different roll centers.
             : Zarro (SM&A/GSFC) 5 Aug 1999
                -- Made VIEW_ADJUST=1 the default
             : Zarro (SM&A/GSFC) 25 Sep 1999
                -- Made VIEW_ADJUST=0 the default
             : Zarro (SM&A/GSFC) 1 Nov 1999
                -- Added GSTYLE grid style keyword
             : Zarro (SM&A/GSFC) 30 Nov 1999
                -- Added OVERLAY=2 hidden feature
             : Zarro (SM&A/GSFC) 14 Feb 2000
                -- changed CONT keyword to CONTOUR, and added /EXTEND
             : Zarro (SM&A/GSFC) 27 Mar 2000
                -- changed CLABEL, removed old keywords
             : Zarro (SM&A/GSFC) 7 Apr 2000
                -- fixed roundoff errors causing edge pixels
                   to spill over during hardcopying. Also improved smoothing.
             : Zarro (SM&A/GSFC) 25 Apr 2000
                -- fixed problem with image viewport falling outside plot
                   limits; removed EXTENDS, VIEW_ADJUST keywords
             : Zarro (EIT/GSFC) 10 May 2000, added optional INDEX argument
             : Zarro (EIT/GSFC) 28 June 2000, added MARGIN keyword and call
                to GET_ASPECT
             : Kim 27 Sep 2000 - added surface and shade_surface options
             : Kim 29 Sep 2000 - removed some keywords to stay under 64
                argument limit in versions < 5.3.  Handle new keywords in
                _extra
             : Kim 1 Oct 2000 - added show3 option
             : Kim 4 Oct 2000 - added status keyword.  err keyword became
                err_msg.
             : Zarro (EIT/GSFC): 6 Oct 2000 -- restored capability to overlay
                images without using contours.
                                13 Oct 2000 -- added rescale zoom logic
             : Kim 9 Jan 2001 - added colorbar option (for > IDL V 5.2)
                and ccharsize keyword
             : Khan (MSSL/ISAS): 2001 Mar 30 -- Changed Kim's colorbar to
                cbar to avoid conflict with color keyword
             : Zarro (EITI/GSFC): 2001 Jun 18 -- Fixed Z-buffer bug
             : Zarro (EITI/GSFC): 2001 Sept 1 -- added /PERCENT
             : Kim: 2001 Sep 6 - don't draw limb for surface, shade_surf,
                or show3
             : Zarro (EITI/GSFC): 1 Dec 2001 - made /SQUARE the default
             : Kim Tolbert: 24-Jan-2002 -- Added mark_point keyword
             : Zarro (EITI/GSFC): 16 Mar 2002 - check for unnecessary call
                to PLOT_HELIO when GRID/LIMB=0
             : Zarro (LAC/GSFC): 8 Oct 2002 - fixed roll bug + added check
                for subfields outside fov + better handling of off-limb
                pixels during solar rotation
             : Zarro (EER/GSFC): 4 Nov 2002 - added GCOLOR and LMCOLOR for
                grid and limb colors
             : Henney (SOLIS/NSO): 15 Nov 2002 - replaced black background
                with !p.background
             : A. Caspi (SSL): 16 Dec 2002 - added BCOLOR for border color
             : Zarro (EER/GSFC), 17 Dec 2002 - added /NODATA option
             : Zarro (EER/GSFC), 22 Dec 2002 - fixed yet another ROLL bug and a problem
               with ZOOM. It just never ends.
             : Zarro (EER/GSFC), 20 Jan 2003 - fixed bug with DMIN/DMAX
               keywords being ignored.
             : Zarro (EER/GSFC), 24 Feb 2003 - added BORDER option for
               contour overlays
             : Kim, 23-Apr-2003. Removed /xstyle, /ystyle from call to show3
             : Kim, 22-May-2003. Added log keyword to plot_map_colorbar
             : Kim, 10-June-2003. Added NEAREST keyword
             : Zarro (L-3/GSFC), 23 November 2003 - added check for roll values
               less than 1 degree. Treat these as effectively 0 degree roll.
             : Zarro (L-3Com/GSFC), 13 January 2004 - fixed FOV/CENTER
               keyword inconsistency.
             : Kim, 23-Feb-2004, added lmthick keyword for limb thickness
             : Zarro (L-3Com/GSFC), 24 January 2004 - fixed minor roll bug
               and moved PLOT_HELIO keywords to _EXTRA
             : Zarro (L-3Com/GSFC), 27 February 2004 - added XSHIFT/YSHIFT/NO_ROLL
             : Zarro (L-3Com/GSFC), 24 March 2004 - fixed problem with
               masking out pixels that spill outside plot window in PS plots
             : Zarro (L-3Com/GSFC), 27 April 2004 - preserved bytescale range
               when compositing images.
             : Zarro (L-3Com/GSFC), 11 Jan 2005 - added check for b0 in map
             : Metcalf, 24 Jan 2005 - use square brackets on arange
               to avoid confusion with the arange function
             ; Kim, 17 Feb 2005, added durtitle keyword to put duration in title
             ; Zarro (L-3Com/GSFC) 17 July 2005 - added 
               c_thick, c_style, c_colors, c_label for compatibility with RSI

 Contact     : dzarro@solar.stanford.edu


PLOT_MAP2 WARNINGTEMPORARY FIX ONLY FOR 16 bit ZBuffer support $SSW/gen/idl/mapping/plot_map2.pro
[Previous] [Next]
 Project     : SOHO_CDS

 Name        : PLOT_MAP2 [WARNING-TEMPORARY FIX ONLY FOR 16 bit Z-Buffer support]

 Purpose     : Plot an image map 

 Category    : imaging

 Explanation : 

 Syntax      : plot_map,map

 Examples    :

 Inputs      : MAP = image structure map created by MAKE_MAP

 Opt. Inputs : None;

 Outputs     : None

 Opt. Outputs: None

 Keywords    : 
     /OVER = overlay on previous image
     /CONT = contour the image
     /SMOOTH = smooth the image
     FOV = [fx,fy] = field of view to be plotted 
     GRID = grid spacing (deg) for latitude-longitude grid [def= 0, no grid]
     GLABEL = label grid with coordinate values [def = 0, no labels]
     GSTYLE = grid linestyle [def=0]
     CENTER = [xc,yc] = center coordinates (arcsec) of FOV [def = center of image]
            (if center is a valid map, then use its center)
     DMIN,DMAX = min, max data for plot [def = data min,max]
     BORDER = draw border around image [def = no]
     DRAW = alerts PLOT_MAP that window is a DRAW widget
     /TAIL = allows user to tailor contours
     /LOG  = log_10 scale image
     WINDOW = window index to send plot to
     /NOAXES = inhibit plotting axes
     /NOTITLE = inhibit printing title
     /NOLABELS = inhibit axis labels
     /NOXTICKS = inhibit X-tick labels
     /NOYTICKS = inhibit Y-tick labels
     /DROTATE  = solar rotate image contour
     LEVELS  = user specified contour levels
     /POSITIVE = plot positive data
     /NEGATIVE = plot negative data
     XRANGE,YRANGE = cartesian plot limits 
     /INTERLACE = interlace two images when overlaying
     /COMPOSITE = simultaneously plot two images when overlaying
                = type of compositing:
                  1: original , 2: latest(new), 3: max(new/old) 4: min(new/old)
     /AVERAGE   = average two images when using /COMPOSITE
     BOTTOM = lowermost color index to use in color scaling [def=0]
     LAST_SCALE = use MIN/MAX from previous plot, or if LAST is a valid map
                  use scaling from it
     LIMB = overplot solar limb
     ROLL = roll image contour
     BTHICK = border thickness
     CTHICK = contour thickness
     LCOLOR = contour line color [0 = black]
     VIEW_ADJUST = adjust for different spacecraft views when overlaying
     MULTI = set for multiple plots per page, e.g. mult=[2,2] (or 2) for 4 
             plots per page (!p.multi remains at this value until cleared)
     NOERASE = don't erase previous plot
     SQUARE = force equal aspect ratio (by adjusting position)

 Restrictions: None
      - do not set /GRID unless absolute coordinates of image are known
      - do not set /OVER unless a plot exists on the current device

 CALLS: ***
	ADD_TAG [1], ADD_TAG [2], ANYTIM2UTC [1], ANYTIM2UTC [2], COLORS, CONGRID [1]
	CONGRID [2], CONGRID [3], CSCALE, DATATYPE [1], DATATYPE [2], DATATYPE [3]
	DELVARX [1], DELVARX [2], DELVARX [3], DELVARX [4], DPRINT, DROT_XY, EXIST, GET_ASPECT
	GET_DROT_DUR, GET_MAP_FOV, GET_MAP_PROP, GET_MAP_SUB, GET_MAP_TIME, GET_XWIN [1]
	HAVE_TAG, PB0R, PLOT_HELIO [1], PLOT_HELIO [2], PLOT_MAP2, PR_SYNTAX, REP_TAG_NAME
	REP_TAG_VALUE, SMART_WINDOW, SWISS_CHEESE, TAG_EXIST [1], TAG_EXIST [2], TRIM
	UNIQ [1], UNIQ [2], UNIQ [3], VALID_MAP, WHERE_OFF_LIMB, data_chk [1], data_chk [2]
	delvarx [5], get_xwin [2], is_number [1], is_number [2], is_struct, roll_xy
 Side effects: None

 History     : Written 22 December 1996, D. Zarro, SAC/GSFC
             : S.L.Freeland - let COMPOSITE have different interpretations
             : Major modifications 15 Feb 1999, Zarro (SM&A/GSFC) 
                -- reorganized
                -- sped-up sub-field extraction
                -- fixed potential bug in contour levels scaling                 
                -- fixed potential bug in image color scaling
                -- fixed roll correction
             : Zarro (SM&A/GSFC) 28 April 1999
                -- fixed roll_center interpretation
                (heaven help me for onlining this during Gopal's CDAW)
             : Zarro (SM&A/GSFC) 3 May 1999
                -- allowed overlaying images with different roll centers.
             : Zarro (SM&A/GSFC) 5 Aug 1999
                -- Made VIEW_ADJUST=1 the default
             : Zarro (SM&A/GSFC) 25 Sep 1999
                -- Made VIEW_ADJUST=0 the default
             : Zarro (SM&A/GSFC) 1 Nov 1999
                -- Added GSTYLE grid style keyword
             : Freeland (LMSAL) - KLUDGE for Z-buffer, 16 bit support
               (Called from 'ssw_build_mosaic.pro')

 Contact     : dzarro@solar.stanford.edu


plot_map_aspect $SSW/gen/idl/mapping/plot_map_aspect.pro
[Previous] [Next]
 Name: plot_map_aspect

 Purpose: include file for plot_map


plot_map_com $SSW/gen/idl/mapping/plot_map_com.pro
[Previous] [Next]
 Name: plot_map_com

 Purpose: PLOT_MAP common block


plot_map_contour $SSW/gen/idl/mapping/plot_map_cont.pro
[Previous] [Next]
 Name: plot_map_contour

 Purpose: include file for plot_map
 Mod: Kim, 9-Jan-2001 - added c_charsize stuff.
 Modified, 31-Aug-2001, Zarro (EITI/GSFC) - added % check for levels
 Modified, 30-Oct-2003, Zarro (L-3/GSFC) - fixed call to DSCALE
 Modified, 20-Nov-2003, Kim - fixed bug with percentage contours on log plots
 Modified, 25-Nov-2003, Zarro (L-3Com/GSFC) - fixed bug with plot range
 Modified, 21-Jul-2005, Zarro (L-3Com/GSFC) - fixed bug with c_colors


PLOT_MAP_DEFINE $SSW/gen/idl/objects/plot_map__define.pro
[Previous] [Next]
 Project     : HESSI                                                                  
                                                                                      
 Name        : PLOT_MAP_DEFINE                                                        
                                                                                      
 Purpose     : Define object to store PLOT_MAP plot properties                        
                                                                                      
 Category    : objects                                                                
                                                                                      
 Syntax      : IDL> c=obj_new('plot_map')                                             
                                                                                      
 CALLS: ***
	ADD_METHOD, DPRINT, FIX_EXTRA, PLOT_MAP::CLEANUP, PLOT_MAP::INIT, PLOT_MAP::SET
	PLOT_MAP__DEFINE, is_struct
 History     : Written 5 Oct 2002, D. Zarro (LAC/GSFC)                                
               Modified 9 May 2006, Zarro (L-3Com/GSFC) - added COLOR properties      
                                                                                      
 Contact     : dzarro@solar.stanford.edu                                              


PLOT_SPEC [1] $SSW/gen/idl/display/plotspec.pro
[Previous] [Next]
 NAME:
       PLOT_SPEC
 PURPOSE:
      plot spectra
 CALLING SEQUENCE:
      plotspec,x,y
 INPUTS:
      x = wavelength array
      y = data array
 KEYWORDS:
      /bin  : value by which to bin spectrum (e.g. bin=2 will double bin data)
      /over : to overplot successive spectra
      /avg  : to average successive spectra
       gang : value by which to gang plots (e.g. 2 gives 2x2; [2,3] gives 2x3)
      /draw : alerts PLOT_SPEC that window may be a DRAW widget
      /logx : Log x-axis
      /logy : Log y-axis
 CALLS: ***
	DELVARX [1], DELVARX [2], DELVARX [3], DELVARX [4], EPLOT, PLOTSPEC, binup
	delvarx [5]
 MODIFICATION HISTORY:     
      DMZ (ARC) Jan'92
      May'94, DMZ, added keyword inheritance


plot_ssw_fov $SSW/gen/idl/ssw_util/plot_ssw_fov.pro
[Previous] [Next]
NAME:
       plot_ssw_fov
PURPOSE:
       Plot fields of view of selected instruments from catalogs
SAMPLE CALLING SEQUENCE:
       plot_ssw_fov,st_time,en_time     [,/trace][,/sxt][,/all]
	plot_ssw_fov,'4-jun-98 01:00','4-jun-98 02:00',/trace
INPUTS:
       st_time     - start time 
	en_time     - end time
Keyword Inputs:
       all         - if set, plot all available FOVs  (the default)
       sxt         - if set, Yohkoh/SXT FOV
       trace       - if set, TRACE FOV
       cds         - if set, SoHO/CDS FOV
       eit         - if set, SoHO/EIT FOV (304A image backdrop to CDS)

	nonar       - inhibits numbering of the NOAA Active Regions
       notime      - inhibits plotting of the timeline
       reset       - cleans up if UTPLOT gets confused...
PROCEDURE:
       Reads catalogs for the selected instruments
       Plots FOV of each on outline of solar disk
	Plots timeline showing channels used on SXT and TRACE
 CALLS: ***
	ADDTIME [1], ADDTIME [2], ALL_VALS [1], ALL_VALS [2], BOX_MESSAGE
	CLEAR_UTPLOT [1], CLEAR_UTPLOT [2], LOADCT, OUTPLOT [1], OUTPLOT [2], OUTPLOT [3]
	PLOT_CDS_POINT [1], PLOT_CDS_POINT [2], UNIQ [1], UNIQ [2], UNIQ [3], UTPLOT [1]
	UTPLOT [2], UTPLOT [3], UTPLOT [4], UTPLOT [5], UTPLOT [6], anytim2ints [1]
	anytim2ints [2], draw_boxcensiz [1], draw_boxcensiz [2], fmt_tim [1]
	fmt_tim [2], get_rb0p [1], get_rb0p [2], grid_data [1], grid_data [2], gt_center
	gt_filtb, gt_res, gt_shape, rd_obs, systime2 [1], systime2 [2], trace_cat
RESTRICTIONS:
	You MUST enter IDL with SSW_INSTR including "cds eit sxt trace" 
	Required catalogs must be on line and required env. variables defined.
	For this routine to fully function, it needs:
	   The SXT FFI and PFI observing logs  (osf and osp file)
          The TRACE catalog  (tcl files)
          The CDS observing logs  (too many to mention)
          The EIT 304A summary images  (very optional; draws limb if absent)
	If any are missing, that part will not be plotted...
	Will not try to plot CDS and EIT at times when SOHO was disabled.
	Will not try tp plot before an instrument was launched...

HISTORY:
          Feb-99       Written by R.D.Bentley (MSSL/UCL)
	08-Dec-99  rdb  Enhanced routine; reuse if times the same
			Added CDS plot (with EIT background; NAR overplot)
	21-dec-99  rdb  Corrected sxt utplot


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

 Name        :	
	PLOT_STRING
 Purpose     :	
	Plot an X, Y array using a character string as the symbol.
 Explanation :	
	PLOT is first called with no plotting symbol.  If /LINE is selected,
	then OPLOT is called with a plotting symbol of zero.  Finally, XYOUTS
	is called to draw the string at the X,Y coordinates.
 Use         :	
	PLOT_STRING,  [ X, ]  Y, STRING
 Inputs      :	
	Y	= Y array, as in PLOT,Y or PLOT,X,Y
	STRING	= Character string to use as plotting symbol, e.g. "A".  If a
		  number is passed, then it is converted into a string.
 Opt. Inputs :	
	X	= X array, as in PLOT,X,Y
 Outputs     :	
	None.
 Opt. Outputs:	
	None.
 Keywords    :	
	LINE	= If present and non-zero, then connecting lines are drawn
		  between data points.
	COLOR	= Color used for the plotting symbol, and for any connecting
		  lines between data points.
	CHARSIZE= Character size to use for the character plotting symbol.
	TITLE	= Main plot title, default is !P.TITLE.
	XTITLE	= X axis title, default is !X.TITLE.
	YTITLE	= Y axis title, default is !Y.TITLE.
	XTYPE	= If set, then X axis is logarithmic.
	YTYPE	= If set, then Y axis is logarithmic.
	XRANGE	= Range of data values in the X direction.
	YRANGE	= Range of data values in the Y direction.
 Calls       : ***
	TRIM
 Common      :	
	None.
 Restrictions:	
	X and Y must be arrays.  STRING must be a character string scalar.
 Side effects:	
	None.
 Category    :	
	None.
 Prev. Hist. :	
	W.T.T., May, 1990.
	William Thompson, December 1991, added keywords XTYPE and YTYPE.
	William Thompson, May 1992, added keywords XRANGE and YRANGE.
 Written     :	
	William Thompson, GSFC, May 1990.
 Modified    :	
	Version 1, William Thompson, GSFC, 9 July 1993.
		Incorporated into CDS library.
		Added CHARSIZE keyword.
		Adjusted vertical spacing to better center characters.
		Fixed bug with logarithmic plots.
	Version 2, William Thompson, GSFC, 18 December 2002
		Changed !COLOR to !P.COLOR
 Version     :	
	Version 2, 18 December 2002


PLOT_ZOOM $SSW/gen/idl/display/plot_zoom.pro
[Previous] [Next]
 Name:
      PLOT_ZOOM

 Purpose:
      Wrapper of PLOT with zoom function.

 Category:
      Plot

 Calling sequence:
      PLOT_ZOOM, x, y [ /PRINT, ZOOM_FACTOR=zoom_factor ,  
                 all keywords accepted by PLOT , 
                 O_FUNCTION=o_function , O_COLOR=o_color , 
                 O_LINESTYLE=o_linestyle , O_PSYM=o_psym ,
                 O_SYMSIZE=o_symsize , O_THICK=o_thick ,
                 O_MIN_VALUE=o_min_value , O_MAX_VALUE=o_max_value

 Input:
      x : abscissa
      y : ordinate

 Keyword parameters:
      PRINT: if given, prints the current cursor position
      ZOOM_FACTOR: zoom factor (e.g. 0.1 will zoom in/out by 10%)
      All valid graphic keywords accepted by PLOT
      O_FUNCTION : values of the function to be overplotted
      O_COLOR    : same as COLOR keyword, but for the overplotted function
      O_LINESTYLE:    "  LINESTYLE  "
      O_NSUM     :    "     NSUM    "
      O_PSYM     :    "     PSYM    "
      O_SYMSIZE  :    "   SYMSIZE   "
      O_THICK    :    "    THICK    "
      O_MIN_VALUE:    "  MIN_VALUE  "
      O_MAX_VALUE:    "  MAX_VALUE  "

 Output:
      Plot

 Common blocks:
      None

 Calls: ***
	STR_SEP, XYCURSOR
 Side effects:
      None

 Restrictions:
      - Do not use within draw widgets (see documentation of routine XYCURSOR).
      - Maximum zoom factor allowed: 90%
      - It doesn't work well with multiplot settings of !P.MULTI.

 Modification history:
      V. Andretta, 21/Feb/1998 - Created
      V. Andretta, 24/Feb/1998 - Handles cursor through XYCURSOR
      V. Andretta, 25/Feb/1998 - Forces XSTYLE=1 and YSTYLE=1 (some values 
        of !X.STYLE and !Y.STYLE could interfere with zooming)
      V. Andretta, 10/Jun/1998 - Uses system defaults for undefined O_* 
        keywords (required by IDL versions earlier than 5.0)

 Contact:
      andretta@gsfc.nasa.gov


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

 Name        :	PLOTBAR

 Purpose     :	Plot a bar graph filled in with a pattern.

 Category    :	Class3, Graphics

 Explanation :	

 Syntax      :	PLOTBAR, [ X ,]  Y

 CALLED BY:
	PLOT_HISTO
 Examples    :	

 Inputs      :	Y = array of values along the Y axis.

 Opt. Inputs :	X = optional array of values along the X axis.  Y(i) is plotted
		    from X(i) to X(i+1), with the last point being plotted over
		    a distance equal to its predecessor.  The procedure tests
		    whether or not the second parameter passed is a vector to
		    decide if X was passed.  If not passed, then INDGEN(Y) is
		    assumed.

		If !BCOLOR is nonzero, then it controls the color of the filled
		in region.

 Outputs     :	None.

 Opt. Outputs:	None.

 Keywords    :	XLOG	= If set, then X axis is logarithmic.
		YLOG	= If set, then Y axis is logarithmic.
		BCOLOR	= Color to use instead of !BCOLOR for bar interiors.
		Any other normal plotting keywords can also be used.

 Calls       :	POLYFILL
 Common      :	None.

 Restrictions:	The variables must not be of type string.

 Side effects:	None.

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

	William Thompson, December 1991, added keywords XTYPE and YTYPE.
	W.T.T., May 1992, added BCOLOR keyword.
	William Thompson, May 1992, added keywords XRANGE and YRANGE.
	William Thompson, November 1992, modified to be compatible with
		!P.MULTI.
	William Thompson, January 1993, modified to use modern system parameter
		names.
	William Thompson, 30 April 1993, fixed bug with !P.MULTI.

 History     :	Version 1, 22-Jan-1996, William Thompson, GSFC
			Incorporated into CDS library
		Version 2, 22-May-2000, William Thompson, GSFC
			Replaced several keywords with _EXTRA mechanism.
			Renamed XTYPE, YTYPE with more modern XLOG, YLOG
			Corrected handling of logarithmic axes.
		Version 3, 30-Nov-2000, William Thompson, GSFC
			Improved handling of logarithmic axes.
		Version 4, 26-Apr-2001, William Thompson, GSFC
			Corrected occasional problem with tickmarks
		Version 5, 18-Dec-2002, William Thompson, GSFC
			Corrected obsolete system variables !COLOR and !NOERAS

 Contact     :	WTHOMPSON


PLOTERR [1] $SSW/gen/idl/display/ploterr.pro
[Previous] [Next]
 NAME:
	PLOTERR
 PURPOSE:
	Plot data points with accompanying X or Y error bars.
	This is a greatly enhanced version of a standard IDL Library routine.

 CALLING SEQUENCE:
	ploterr, [ x,]  y, [xerr], yerr [, TYPE =, /NOHAT, HATLENGTH= ,
		 ERRTHICK=, ERRSTYLE=, ERRCOLOR = ]

 INPUTS:
	X = array of abcissae.
	Y = array of Y values.
	XERR = array of error bar values (along X)
	YERR = array of error bar values (along Y)

 OPTIONAL INPUT KEYWORD PARAMETERS:
	TYPE = type of plot produced.  The possible types are:
		TYPE = 0 :	X Linear - Y Linear  (default)
		TYPE = 1 :	X Linear - Y Log
		TYPE = 2 :	X Log    - Y Linear
		TYPE = 3 :	X Log    - Y Log
	       Actually, if 0 is specified, the XLOG and YLOG keywords
	       are used.  If these aren't specified, then a linear-linear
	       plot is produced.  This keyword is available to maintain
	       compatibility with the previous version of PLOTERR.
	NOHAT     = if specified and non-zero, the error bars are drawn
	            without hats.
	HATLENGTH = the length of the hat lines used to cap the error bars.
	            Defaults to !D.X_VSIZE / 100).
	ERRTHICK  = the thickness of the error bar lines.  Defaults to the
	            THICK plotting keyword.
	ERRSTYLE  = the line style to use when drawing the error bars.  Uses
	            the same codes as LINESTYLE.
	ERRCOLOR =  scalar integer (0 - !D.N_TABLE) specifying the color to
			use for the error bars
	NSKIP = Integer specifying the error bars to be plotted.   For example,
		if NSKIP = 2 then every other error bar is plotted; if NSKIP=3
		then every third error bar is plotted.   Default is to plot
		every error bar (NSKIP = 1)


 RESTRICTIONS:
	Arrays must not be of type string.  There must be enough points to plot.
	If only three parameters are input, they will be taken as X, Y and
	YERR respectively.

 EXAMPLE:
       Suppose one has X and Y vectors with associated errors XERR and YERR

       (1) Plot Y vs. X with both X and Y errors and no lines connecting
           the points
                  IDL> ploterr, x, y, xerr, yerr, psym=3

       (2) Like (1) but plot only the Y errors bars and omits "hats"
                  IDL> ploterr, x, y, yerr, psym=3, /NOHAT

 WARNING:
	This an enhanced version of a procedure that already exists in the
	standard IDL V4.0 distribution.   Any call to the standard IDL version
	should also work with this version, but the reverse is not true.
	
 PROCEDURE:
	A plot of X versus Y with error bars drawn from Y - YERR to Y + YERR
	and optionally from X - XERR to X + XERR is written to the output device

 MODIFICATION HISTORY:
	William Thompson	Applied Research Corporation  July, 1986
	DMS, April, 1989	Modified for Unix
	Michael R. Greason	ST Systems
	May, 1991		Added most of the plotting keywords, put hats
				on the error bars.
	K. Venkatakrishna       Added option to plot xerr, May, 1992
	Michael R. Greason	Corrected handling of reversed axes.  Aug. 1992.
	W. Landsman             Removed CHAN keyword for V4.0 compat. June 1995
	W. Landsman             Use _EXTRA keyword                    July 1995
	W. Landsman             Plot more than 32767 points           Feb 1996
	W. Landsman	Fix Y scaling when only XRANGE supplied       Nov 1996
	W. Landsman     Added NSKIP keyword                           Dec 1996
	W. Landsman     Use XLOG, YLOG instead of XTYPE, YTYPE        Jan 1998


PLOTERROR $SSW/gen/idl_libs/astron/plot/ploterror.pro
[Previous] [Next]
 NAME:
     PLOTERROR
 PURPOSE:
     Plot data points with accompanying X or Y error bars.
 EXPLANATION:
     This is a greatly enhanced version of the standard IDL Library routine
     PLOTERR

 CALLING SEQUENCE:
     ploterror, [ x,]  y, [xerr], yerr [, TYPE=, /NOHAT, HATLENGTH= , NSUM =
                  ERRTHICK=, ERRSTYLE=, ERRCOLOR=, NSKIP=, .. PLOT keywords]

 INPUTS:
     X = array of abcissae.
     Y = array of Y values.
     XERR = array of error bar values (along X)
     YERR = array of error bar values (along Y)

 OPTIONAL INPUT KEYWORD PARAMETERS:
     TYPE = type of plot produced.  The possible types are:
              TYPE = 0 :       X Linear - Y Linear  (default)
              TYPE = 1 :       X Linear - Y Log
              TYPE = 2 :       X Log    - Y Linear
              TYPE = 3 :       X Log    - Y Log
              Actually, if 0 is specified, the XLOG and YLOG keywords
              are used.  If these aren't specified, then a linear-linear
              plot is produced.  This keyword is available to maintain
              compatibility with the previous version of PLOTERROR.
     /NOHAT     = if specified and non-zero, the error bars are drawn
              without hats.
     HATLENGTH = the length of the hat lines in device units used to cap the 
              error bars.   Defaults to !D.X_VSIZE / 100).
     ERRTHICK  = the thickness of the error bar lines.  Defaults to the
              THICK plotting keyword.
     ERRSTYLE  = the line style to use when drawing the error bars.  Uses
              the same codes as LINESTYLE.
     ERRCOLOR =  scalar integer (0 - !D.N_TABLE) specifying the color to
              use for the error bars
     NSKIP = Integer specifying the error bars to be plotted.   For example,
              if NSKIP = 2 then every other error bar is plotted; if NSKIP=3
              then every third error bar is plotted.   Default is to plot
              every error bar (NSKIP = 1)
     NSUM =  Number of points to average over before plotting, default=!P.NSUM
             The errors are also averaged, and then divided by sqrt(NSUM).   
             This  approximation is meaningful only when the neighboring error
             bars have similar sizes.    PLOTERROR does not pass the NSUM 
             keyword to the PLOT command, but rather computes the binning 
             itself using the  FREBIN function.

     Any valid keywords to the PLOT command (e.g. PSYM, YRANGE) are also 
     accepted by PLOTERROR via the _EXTRA facility.

 CALLS: ***
	FREBIN
 CALLED BY:
	inv_save_electrons [1], inv_save_photons
 RESTRICTIONS:
       Arrays must not be of type string.  There must be enough points to plot.
       If only three parameters are input, they will be taken as X, Y and
       YERR respectively.

       PLOTERROR cannot be used for asymmetric error bars.   Instead use
       OPLOTERROR with the /LOBAR and /HIBAR keywords.

       Any data points with NAN values in the X, Y, or error vectors are 
       ignored.
 EXAMPLE:
       Suppose one has X and Y vectors with associated errors XERR and YERR

       (1) Plot Y vs. X with both X and Y errors and no lines connecting
           the points
                  IDL> ploterror, x, y, xerr, yerr, psym=3

       (2) Like (1) but plot only the Y errors bars and omits "hats"
                  IDL> ploterror, x, y, yerr, psym=3, /NOHAT

 WARNING:
       This an enhanced version of the procedure PLOTERR in the standard IDL
       distribution.    It was renamed from PLOTERR to PLOTERROR in June 1998
       in the IDL Astronomy Library to avoid conflict with the RSI procedure.

 PROCEDURE:
       A plot of X versus Y with error bars drawn from Y - YERR to Y + YERR
       and optionally from X - XERR to X + XERR is written to the output device

 PROCEDURE CALLS:
     FREBIN - used to compute binning if NSUM keyword is present
 MODIFICATION HISTORY:
     William Thompson        Applied Research Corporation  July, 1986
     DMS, April, 1989        Modified for Unix
     Michael R. Greason      ST Systems
     May, 1991               Added most of the plotting keywords, put hats
                               on the error bars.
     K. Venkatakrishna       Added option to plot xerr, May, 1992
     Michael R. Greason      Corrected handling of reversed axes.  Aug. 1992
     W. Landsman             Use _EXTRA keyword                    July 1995
     W. Landsman             Plot more than 32767 points           Feb 1996
     W. Landsman     Fix Y scaling when only XRANGE supplied       Nov 1996
     W. Landsman     Added NSKIP keyword                           Dec 1996
     W. Landsman     Use XLOG, YLOG instead of XTYPE, YTYPE        Jan 1998
     W. Landsman     Rename to PLOTERROR, OPLOTERROR               Jun 1998
     W. Landsman     Convert to IDL V5.0                           Jun 1998
     W. Landsman  Better default scaling when NSKIP supplied       Oct 1998 
     W. Landsman  Ignore !P.PSYM when drawing error bars           Jan 1999
     W. Landsman  Handle NSUM keyword correctly                    Aug 1999
     W. Landsman  Fix case of /XLOG but no X error bars            Oct 1999
     W. Landsman  Work in the presence of NAN values               Nov 2000
     W. Landsman  Improve logic when NSUM or !P.NSUM is set        Jan 2001
     W. Landsman  Only draw error bars with in XRANGE (for speed)  Jan 2002
     W. Landsman  Fix Jan 2002 update to work with log plots       Jun 2002
     W. Landsman  Added _STRICT_EXTRA                              Jul 2005


PLOTHIST $SSW/gen/idl_libs/astron/plot/plothist.pro
[Previous] [Next]
 NAME:
      PLOTHIST
 PURPOSE:
      Plot the histogram of an array with the corresponding abcissa.

 CALLING SEQUENCE:
      plothist, arr, xhist, yhist, [, BIN=, /FILL, /NOPLOT, /OVERPLOT, PEAK=,
                                     /AUTOBIN,  ...plotting keywords]
 INPUTS:
      arr - The array to plot the histogram of.   It can include negative
            values, but non-integral values will be truncated.              

 OPTIONAL OUTPUTS:
      xhist - X vector used in making the plot  
              ( = lindgen( N_elements(h)) * bin + min(arr) )
      yhist - Y vector used in making the plot  (= histogram(arr/bin))

 OPTIONAL INPUT KEYWORDS:
      /AUTOBIN - Automatically determines bin size of the histogram as the
                 square root of the number of samples. Only valid when BIN
                 is not set.
      BIN -  The size of each bin of the histogram,  scalar (not necessarily
             integral).  If not present (or zero), the bin size is set to 1.
      /BOXPLOT - If set, then each histogram data value will be plotted
             "box style" with vertical lines drawn from Y=0 at each end of 
              the bin width
      /HALFBIN - Set this keyword to a nonzero value to shift the binning by
              half a bin size.     This is useful for integer data, where e.g.
              the bin for values of 6 will go from 5.5 to 6.5.   The default
              is to set the HALFBIN keyword for integer data, and not for
              non-integer data.    Note: prior to May 2002, the default was 
              to always shift the binning by half a bin.                
      /NAN - If set, then check for the occurence of IEEE not-a-number values
      /NOPLOT - If set, will not plot the result.  Useful if intention is to
             only get the xhist and yhist outputs.
      /OVERPLOT - If set, will overplot the data on the current plot.  User
            must take care that only keywords valid for OPLOT are used.
      PEAK - if non-zero, then the entire histogram is normalized to have
             a maximum value equal to the value in PEAK.  If PEAK is
             negative, the histogram is inverted.
      /FILL - if set, will plot a filled (rather than line) histogram.

 The following keywords take effect only if the FILL keyword is set:
      FCOLOR - color to use for filling the histogram
      /FLINE - if set, will use lines rather than solid color for fill (see
              the LINE_FILL keyword in the POLYFILL routine)
      FORIENTATION - angle of lines for fill (see the ORIENTATION keyword
              in the POLYFILL routine)
      FPATTERN - the pattern to use for the fill (see the PATTERN keyword
              in the POLYFILL routine)
      FSPACING - the spacing of the lines to use in the fill (see the SPACING
              keyword in the POLYFILL routine)

 Any input keyword that can be supplied to the PLOT procedure (e.g. XRANGE,
    LINESTYLE, /XLOG, /YLOG) can also be supplied to PLOTHIST.

 EXAMPLE:
       (1) Create a vector of random 1000 values derived from a Gaussian of 
       mean 0, and sigma of 1.    Plot the histogram of these values with a 
       binsize of 0.1, and use a box plotting style.

       IDL> a = randomn(seed,1000)
       IDL> plothist,a, bin = 0.1, /boxplot

       (2) As before, but fill the plot with diagonal lines at a 45 degree 
           angle

       IDL> plothist,a, bin=0.1, /fill, /fline, forient=45

 MODIFICATION HISTORY:
        Written     W. Landsman            January, 1991
        Add inherited keywords W. Landsman        March, 1994
        Use ROUND instead of NINT  W. Landsman   August, 1995
        Add NoPlot and Overplot keywords.   J.Wm.Parker  July, 1997
        Add Peak keyword.   J.Wm.Parker  Jan, 1998
        Add FILL,FCOLOR,FLINE,FPATTERN,FSPACING keywords. J.Wm.Parker Jan, 1998
	 Converted to IDL V5.0   W. Landsman 21-Jan-1998
        Add /NAN keyword        W. Landsman October 2001
        Don't plot out of range with /FILL, added HALFBIN keyword, make
        half bin shift default for integer only W. Landsman/J. Kurk May 2002
        Add BOXPLOT keyword, use exact XRANGE as default W.L.  May 2006
        Allow use of /XLOG and /YLOG keywords  W.L. June 2006


plotltc [1] $SSW/gen/idl/display/plotltc.pro
[Previous] [Next]
 NAME:
	plotltc
 PURPOSE:
	plot light curve
 CATEGORY:
       plotting
 CALLING SEQUENCE:
	plotltc,t,y,utbase
 INPUTS:
       x = time axis
       y = data array
       utbase = UTBASE of data (string for SMM UTPLOT, float for YOHKOH)
 KEYWORDS:
       ebar = data uncertainties 
       /log = plot lightcurve on logarithmic scale
       /draw = plot window may be a DRAW widget
       /over = overplot lightcurves
 CALLS: ***
	EPLOT, UTPLOT [1], UTPLOT [2], UTPLOT [3], UTPLOT [4], UTPLOT [5], UTPLOT [6]
 CALLED BY:
	BCS, PLOTFIT, WBDA [1], WBDA [2], WBSC [1], WBSC [2], WBSC_FPAR_EV [1]
	WBSC_FPAR_EV [2], plot_bda, plotbrr
 PROCEDURE:
	uses UTPLOT
 MODIFICATION HISTORY:
	Written by DMZ (ARC) Jan'92
       May'94, DMZ, added keyword inheritance


plotltc [2] $SSW/gen/idl_fix/soft/old350/plotltc.pro
[Previous] [Next]
 NAME:
	plotltc
 PURPOSE:
	plot light curve
 CATEGORY:
       plotting
 CALLING SEQUENCE:
	plotltc,t,y,utbase,ebar=ebar,/log,/hard,xrange=xrange,yrange=yrange,xtitle=xtitle,$
       ytitle=ytitle,mtitle=mtitle,plabels=plabels,/draw,/over,interval
 INPUTS:
       x = time axis
       y = data array
       utbase = UTBASE of data (string for SMM UTPLOT, float for YOHKOH)
 KEYWORDS:
       ebar = data uncertainties 
       /log = plot lightcurve on logarithmic scale
       /hard = make a hard copy of each plot
       /draw = plot window may be a DRAW widget
       /over = overplot lightcurves
 CALLS: ***
	EPLOT, UTPLOT [1], UTPLOT [2], UTPLOT [3], UTPLOT [4], UTPLOT [5], UTPLOT [6]
 CALLED BY:
	BCS, PLOTFIT, WBDA [1], WBDA [2], WBSC [1], WBSC [2], WBSC_FPAR_EV [1]
	WBSC_FPAR_EV [2], plot_bda, plotbrr
 PROCEDURE:
	uses UTPLOT
 MODIFICATION HISTORY:
	Written by DMZ (ARC) Jan'92


PLOTSPEC $SSW/gen/idl_fix/soft/old350/plotspec.pro
[Previous] [Next]
 NAME:
       PLOTSPEC
 PURPOSE:
      plot spectra
 CALLING SEQUENCE:
      plotspec,x,y
 INPUTS:
      x = wavelength array
      y = data array
 KEYWORDS:
      /hard : to hard copy spectrum
      /bin  : value by which to bin spectrum (e.g. bin=2 will double bin data)
      /over : to overplot successive spectra
      /avg  : to average successive spectra
       gang : value by which to gang plots (e.g. 2 gives 2x2; [2,3] gives 2x3)
      plabels : plot information labels
      /draw : alerts PLOTSPEC that window may be a DRAW widget
      /logx : Log x-axis
      /logy : Log y-axis
      linestyle,psym : obvious
      xtitle,ytitle : obvious
 CALLS: ***
	DELVARX [1], DELVARX [2], DELVARX [3], DELVARX [4], EPLOT, binup, delvarx [5]
 CALLED BY:
	BCS, FCS, FE25_BSC_TEMP, PLOTFIT, PLOT_BSC_AS2, PLOT_SPEC [1], WBDA [1], WBDA [2]
	plot_bda, plotbrr, plotfda, plotfis
 MODIFICATION HISTORY:     
      DMZ (ARC) Jan'92


plottime [1] $SSW/gen/idl/genutil/plottime.pro
[Previous] [Next]
NAME:
	plottime
PURPOSE:
	Originally it simply put a message "Plot Made dd-MMM-yy hh:mm:ss"
	message on the plots.  It was generalized to effectively do
	what "xyouts, /normalize" does (before that capability was
	around
SAMPLE CALLING SEQUENCE:
	plottime
	plottime, 0.1, 0.9, 'Infil: ' + infil
	plottime, xf, yf, str, siz, dir, align=align
INPUT:
	xf	- fractional position in the x
	yf	- fractional position in the y
	str	- the string to write out
	dir	- the direction (rotation)
 CALLED BY:
	TERM_QUICK, TERM_REVIEW_GIF, disp1focus [2], disp1focus_flt, edac_summary
	emi_plot [1], exp_scale min_exp max_exp [1], get_linearity sig e_min e_max
	ipcom, jitter_gif_xyimg, ltc, lwa_plot_arc, mdipdist, mon_health [1], mon_health [2]
	new_edac_summary, new_mon_health [1], new_mon_health [2], pl_dt_genx
	pl_monitor_center, plot_arc [1], plot_arc [2], plot_door_open, plot_expos_hist
	plot_fem, plot_fft, plot_gcross, plot_gsn, plot_img_cadence, plot_loi_mmad
	plot_loi_summary [1], plot_loi_summary [2], plot_pzt_corr, plot_shutter_perf
	plot_ssl, plot_therm_rs232a, plot_therm_rs232c, plot_trav [1], plot_trav [2]
	plot_trav [3], plotiss, plots_bda, plots_wda, ploty [1], ploty [2], read_ltc file
	seq_frame_info, sld_sls_vstrips, sld_vstrips, sxt_temps, therm_plot
OPTIONAL KEYWORD INPUT:
	align	- IDL align option
	color	- permit to specify color
HISTORY:
	Written 1991 by M.Morrison
	 6-Mar-95 (MDM) - Added ALIGN keyword
	 5-Nov-96 (MDM) - Added documentation header
	 3-Dec-01 (LWA) - Added color keyword
	 7-Dec-01 (MDM) - Fixed 3-Dec mod to continue to work if color
			  is not specified


plottimes [1] $SSW/gen/idl/genutil/plottimes.pro
[Previous] [Next]
NAME:
       plottimes
PURPOSE:
	Ancient routine which effectively does an "xyouts, /norm"
	but relative to the PLOT window, not the whole page.
SAMPLE CALLING SEQUENCE:
       plottimes, 0.1, 0.9, 'Infil: ' + infil
       plottimes, xf, yf, str, siz, dir
INPUT:
       xf      - fractional position in the x
       yf      - fractional position in the y
       str     - the string to write out
       dir     - the direction (rotation)
 CALLS: ***
	bits [1], bits [2]
 CALLED BY:
	find_contig [2], get_pks, plot_fft
HISTORY:
       Written 1991 by M.Morrison
        5-Nov-96 (MDM) - Added documentation header
	 14-May-2001, William Thompson, GSFC, use modern system variables.


pmm [1] $SSW/gen/idl/genutil/pmm.pro
[Previous] [Next]
NAME: pmm
PURPOSE: print min, max of given argument (up to ten arguments)
CATEGORY: analysis
CALLING SEQUENCE: pmm,blarch	;blarch = array, image, vector, etc...
                  pmm,blarch,/mm
INPUTS: blarch
OPTIONAL INPUT PARAMETERS: none
KEYWORD PARAMETERS: /help, /mm
OUTPUTS: prints min, max of blarch.  with mm set, return the min and max
          for it too, with mm=FLTARR(2,N) for N positional parameters.
 CALLS: ***
	DOC_LIBRARY
 CALLED BY:
	HSI_EVENTLIST_TEST, HSI_EVFILE_TEST, HSI_IMAGE_TEST [2]
	HSI_IMAGE_TEST__define, OBS_PLOT, READ_TRACE_FOV, VIEW_TRACE_MOSAIC, azi_calc
	azimuth_teem [2], fit_gcross, fudge_scale, hsi_count_rebin, rd_hk [1], rd_hk [2]
	ssw_build_trace, sxl2radiance, sxt_erg_per_dn
COMMON BLOCKS: none
SIDE EFFECTS: none
RESTRICTIONS: none
PROCEDURE: simple min, max call
MODIFICATION HISTORY: ANM 910507. Updated 911031. Doc'd DKL 930426


POIDEV $SSW/gen/idl_libs/astron/math/poidev.pro
[Previous] [Next]
 NAME:
     POIDEV
 PURPOSE:
     Generate a Poisson random deviate
 EXPLANATION:
     Return an integer random deviate drawn from a Poisson distribution with
     a specified mean.    Adapted from procedure of the same name in 
     "Numerical Recipes" by Press et al. (1992), Section 7.3

 CALLED BY:
	fsp_mc, hxt_mcaccum, mc_unc, phi_stamps
     NOTE: This routine became partially obsolete in V5.0 with the 
     introduction of the POISSON keyword to the intrinsic functions 
     RANDOMU and RANDOMN.     However, POIDEV is still useful for adding 
     Poisson noise to an existing image array, for which the coding is much 
     simpler than it would be using RANDOMU (see example 1) 
 CALLING SEQUENCE:
     result = POIDEV( xm, [ SEED = ] )

 INPUTS:
     xm - numeric scalar, vector or array, specifying the mean(s) of the 
          Poisson distribution

 OUTPUT:
     result - Long integer scalar or vector, same size as xm

 OPTIONAL KEYWORD INPUT-OUTPUT:
     SEED -  Scalar to be used as the seed for the random distribution.  
             For best results, SEED should be a large (>100) integer.
             If SEED is undefined, then its value is taken from the system 
             clock (see RANDOMU).    The value of SEED is always updated 
             upon output.   This keyword can be used to have POIDEV give 
             identical results on consecutive runs.     

 EXAMPLE:
     (1) Add Poisson noise to an integral image array, im
              IDL> imnoise = POIDEV( im)

     (2) Verify the expected mean  and sigma for an input value of 81
              IDL> p = POIDEV( intarr(10000) + 81)   ;Test for 10,000 points
              IDL> print,avg(p),sigma(p)
     Average and sigma of the 10000 points should be close to 81 and 9

 METHOD: 
     For small values (< 20) independent exponential deviates are generated 
     until their sum exceeds the specified mean, the number of events 
     required is returned as the Poisson deviate.   For large (> 20) values,
     uniform random variates are compared with a Lorentzian distribution 
     function.

 NOTES:
     Negative values in the input array will be returned as zeros.  

     Versions 5.1.1 and 5.2 of IDL have a bug in the RANDOMU function, such
     that it is initialized to the same value at the start of each IDL session
     rather than being initialized to the system clock.    This bug will affect
     POIDEV in a similar manner.
       
 REVISION HISTORY:
      Version 1               Wayne Landsman        July  1992
      Added SEED keyword                            September 1992
      Call intrinsic LNGAMMA function               November 1994
      Converted to IDL V5.0   W. Landsman   September 1997


POINT [1] $SSW/gen/idl/fund_lib/sdac/point.pro
[Previous] [Next]
 Project     : SDAC
                   
 Name        : POINT

 USE         : 
       POINT,X,Y,[/DEVICE],[/NORMAL],[/DATA] [,npoints=npoints] [,/nocrossbar] $
       [,newlabel=newlabel] [,/widget],[,/continue] [,/compile] $
       [buttons=buttons, val_buttons=val_buttons, mess_wedg=mess_widg] $
       [,xoffset=xoffset] [,yoffset=yoffset], $
       [drawline=drawline, thick=thick, color=color, linestyle=linestyle]
 CALLED BY:
	BACKG_MARK, FLARE_MARK, FSPLOT, HXRBS, Intervals [1], Intervals [2], SETUP_DRM
	pro set_bpow [1], pro set_bpow [2], pro set_vth_bpow [1], pro set_vth_bpow [2]
	setup_spex [1], setup_spex [2], spex_intervals [1], spex_intervals [2]
 EXAMPLES:
        point, x, npoint=1, newlabel= newlabel, color=color, thick=2, /draw, /linestyle, $
        xoffset = xoffsets(0), yoffset=yoffsets(0), $
        continue = (n_elements(iselect)-1) < 1, $
        buttons = ['Continue by Selecting from Plot Window','DONE'], val_but=['X','F']

 INPUTS:
       none.
 OUTPUTS:
       X & Y - x and y values of points selected by cursor.

 PROCEDURE   :
 Call up CURSOR. When operator presses a key, over plot a cross bar 
 and print x and y data values on the screen.  User should hold down
 cursor until they receive feedback using crossbar or draw options.

 CALLS: ***
	ARR2STR [1], ATIME [1], ATIME [2], Arr2Str [2], CHECKVAR [1], CRANGE, FCHECK
	F_USE_WIDGET, GETUT [1], GETUT [2], GRAPHICS_PAGE, POINT_CONTINUE, RESPOND_WIDG
	XDEVICE, checkvar [2]
 COMMON BLOCKS:
       POINT_COMMON
 restrictions:
       if the return command is given before selecting any points,
       then x and y are returned as the strings 'null'
       widgets only enabled for x windows graphics

       widget interface uses f_use_widget.pro and respond_widg.pro
 modified by Richard Schwartz, March 21, 1991
 modified by AKT 11/26/91 to handle X or Tektronix graphics.
 mod, RAS, 3 Oct 1993, npoints, newlabel, and nocrossbar added.
       allows return without any points selected, ras, 4 Oct. 93
 ras, 8-jun-94, added widget controls
 ras, 10-jul-94, improvements to widget controls
 ras, 30-aug-94, made exit more reliable if only one point is needed
 Version 8, richard.schwartz@gsfc.nasa.gov, 7-sep-1997, more documentation
 Version 9, 5-june-1998 richard.schwartz@gsfc.nasa.gov
		 support all windowing OS.
 Version 10, 19-aug-1998, establish xdisplay from xdevice as you enter, otherwise a bizarre
	error mode ensues which I haven't diagnosed, but this stops it. richard.schwartz

**********************************************************************


POLAR_GRID $SSW/gen/idl/solar/polar_grid.pro
[Previous] [Next]
 NAME:
       POLAR_GRID
 EXAMPLES:
 PURPOSE:
       Overlay a polar grid on an image
       Interactively display polar coodinates of the cursor
 CATEGORY:
       Image display.
 CALLING SEQUENCE:
	polar_grid, $
	  item, data, center=center, img_siz=img_siz, $
	  phi_sep=phi_sep, phi_res=phi_res, $
	  r_sep=r_sep, r_res=r_res, r_max=r_max, $
	  grid_color=grid_color, grid_thick=grid_thick, $
	  draw_limb=draw_limb, limb_color=limb_color, limb_thick=limb_thick, $
	  erase=erase, norestsys=norestsys, read_out=read_out, $
	  charsize=charsize, charthick=charthick, km=km, qs=qs
 EXAMPLE CALLS:
       polar_grid, index
       polar_grid, index, data, /draw_limb, /read_out
       polar_grid, r_pix, x, data, /draw_limb, /read_out
 REQUIRED INPUTS:
       ITEM         May be:
			SXT index or roadmap record
			R_PIX, the radius of the disk in image pixels
 OPTIONAL INPUTS:
   POSITIONAL PARAMETERS:
       DATA         Image array.  If passed it is displayed.
   KEYWORDS PARAMETERS:
	CENTER	     Center of disk relative to lower left corner of
		     image, in image pixel coordinates.
	IMG_SIZ	     Size of image: [x_size, y_size]
       PHI_SEP    Grid separation interval for lines of constant
                    phi, in degrees (def = 5 deg).
       R_SEP        Grid separation interval for lines of constant
                    radius, in units of fractional disk radius (def = 0.2).
	PHI_RES    Point separation interval for lines of constant
		     radius, in degrees (def is 2 deg).
	R_RES        Point separation interval for lines of constant
                    radius, in units of fractional disk radius (def = 0.1).
	R_MAX	     Outer limit of lines of constant radius, in units of
		     fractional disk radius (def = 2.0).
       ERASE	     If present and nonzero, window is erased prior
                    to drawing grid (def is 0).
       READ_OUT     If present and non-zero, the polar coordinates
                    of the cursor are displayed in a window-let.
       SPHERICAL  If set, then in place of a linear radial coordinate use
		     the angle between the specified point and the axis
                    defined by the center of the solar sphere and the center
                    of the solar disk.
	KM	     If present and non-zero, and if READ_OUT is also set,
		     then the displayed value of R will be in kilometers
		     when R greater than the disk radius.
	GRID_COLOR   Obvious.
	GRID_THICK   Obvious.
       DRAW_LIMB    If present and non-zero, limb is drawn.
	LIMB_COLOR   Obvious.
	LIMB_THICK   Obvious.
	CHARSIZE     Obvious.
	CHARTHICK    Obvious.
	NORESTSYS    If present and non-zero, do not reset plot parameters
		     on return.
	QS	     If present and non-zero, stop execution within POLAR_GRID
 OUTPUTS:
   POSITIONAL PARAMETERS:
       none.
   KEYWORDS PARAMETERS:
       LAST_RPHI  Last position of cursor (during /READ_OUT mode)
 CALLS: ***
	MAKVEC, WDEF [1], WDEF [2], get_rb0p [1], get_rb0p [2], gt_corner, gt_res, gt_shape
	restsys [1], restsys [2], savesys [1], savesys [2], sxt_cen [1], sxt_cen [2]
 COMMON BLOCKS:
       None.
 SIDE EFFECTS:
 RESTRICTIONS:
 PROCEDURE:
 MODIFICATION HISTORY:
       24-Aug-94 - GLS, based on DRAW_GRID and PLOT_CLON
	08-Apr-98 - William Thompson, GSFC
		Changed !D.N_COLORS to !D.TABLE_SIZE for 24-bit displays


POLINT $SSW/gen/idl_libs/astron/math/polint.pro
[Previous] [Next]
 NAME:
     POLINT
 PURPOSE:
     Interpolate a set of N points by fitting a polynomial of degree N-1
 EXPLANATION:
     Adapted from algorithm in Numerical Recipes, Press et al. (1992), 
     Section 3.1.

 CALLING SEQUENCE
     POLINT, xa, ya, x, y, [ dy ]
 INPUTS:
     XA - X Numeric vector, all values must be distinct.   The number of
          values in XA should rarely exceed 10 (i.e. a 9th order polynomial)
     YA - Y Numeric vector, same number of elements
     X - Numeric scalar specifying value to be interpolated 

 OUTPUT:
     Y - Scalar, interpolated value in (XA,YA) corresponding to X

 OPTIONAL OUTPUT
     DY - Error estimate on Y, scalar

 EXAMPLE:
     Find sin(2.5) by polynomial interpolation on sin(indgen(10))

               IDL> xa = indgen(10)
               IDL> ya = sin( xa )
               IDL> polint, xa, ya, 2.5, y ,dy
             
     The above method gives  y = .5988 & dy = 3.1e-4  a close
     approximation to the actual sin(2.5) = .5985

 METHOD:
     Uses Neville's algorithm to iteratively build up the correct
     polynomial, with each iteration containing one higher order.

 REVISION HISTORY:
     Written W. Landsman                 January, 1992
     Converted to IDL V5.0   W. Landsman   September 1997


POLREC $SSW/gen/idl_libs/astron/jhuapl/polrec.pro
[Previous] [Next]
 NAME:
       POLREC
 PURPOSE:
       Convert 2-d polar coordinates to rectangular coordinates.
 CATEGORY:
 CALLING SEQUENCE:
       polrec, r, a, x, y
 INPUTS:
       r, a = vector in polar form: radius, angle (radians).  in
 KEYWORD PARAMETERS:
       Keywords:
         /DEGREES means angle is in degrees, else radians.
 OUTPUTS:
       x, y = vector in rectangular form, double precision     out
 CALLED BY:
	SPHDIST
 COMMON BLOCKS:
 NOTES:
 MODIFICATION HISTORY:
       R. Sterner. 18 Aug, 1986.
       Johns Hopkins University Applied Physics Laboratory.
       RES 13 Feb, 1991 --- added /degrees.
	Converted to IDL V5.0   W. Landsman   September 1997
       1999 May 03 --- Made double precision.  R. Sterner.

 Copyright (C) 1986, 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.


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

 Name        :	POLY_FIT_MOST()

 Purpose     :	Fit a polynomial to a curve, ignoring outriders.

 Category    :	Fitting, Class4

 Explanation :	Polynomial fits are applied in a reiterative process, where
		points more than 2 sigma away from the fit are removed after
		each iteration.

 Syntax      :	PARAM = POLY_FIT_MOST(X, Y, NDEGREE  [, YFIT ])

 Examples    :	Use like POLY_FIT or POLYFITW.

 Inputs      :	X	= The independent variable vector
		Y	= The dependent variable vector
		NDEGREE	= The degree of the polynomial, e.g. 1 for a linear
			  fit.  This can also be set to 0 to fit a simple
			  average (unlike POLY_FIT or POLYFITW).

 Opt. Inputs :	None.

 Outputs     :	The result of the function contains the parameters of the
		polynomial fit.

 Opt. Outputs:	YFIT	= The array of fitted values.

 Keywords    :	WEIGHT	= An array of weights to use.  If the WEIGHT keyword is
			  passed, then POLYFITW is called instead of POLY_FIT.

		DOUBLE	= If set, then the calculation is done in double
			  precision.  (Recommended)

		THRESHOLD = The multiplier of the standard deviation used to
			    determine which points should be filtered out.  The
			    default is 2.

		USED	= Returns the indices of the points used to calculate
			  the fit.

 Calls       : ***
	AVERAGE, POLY, POLYFITW, POLY_FIT, STDEV
 Common      :	None.

 Restrictions:	None.

 Side effects:	None.

 Prev. Hist. :	None.

 History     :	Version 1, 18 February 1998, William Thompson, GSFC
		Version 2, 01-May-2000, William Thompson, GSFC
			Added keyword THRESHOLD
		Version 3, 18-Oct-2000, William Thompson, GSFC
			Added keyword DOUBLE
		Version 4, 09-Apr-2002, William Thompson, GSFC
			Added keyword USED

 Contact     :	WTHOMPSON


POLY_SMOOTH $SSW/gen/idl_libs/astron/math/poly_smooth.pro
[Previous] [Next]
 NAME:
       POLY_SMOOTH  

 PURPOSE:
       Apply a least-squares (Savitzky-Golay) polynomial smoothing filter
 EXPLANATION:
       Reduce noise in 1-D data (e.g. time-series, spectrum) but retain 
       dynamic range of variations in the data by applying a least squares 
       smoothing polynomial filter,

       Also called the Savitzky-Golay smoothing filter, cf. Numerical
       Recipes (Press et al. 1992, Sec.14.8)

       The low-pass filter coefficients are computed by effectively
       least-squares fitting a polynomial in moving window,
       centered on each data point, so the new value will be the
       zero-th coefficient of the polynomial. Approximate first derivates
       of the data can be computed by using first degree coefficient of
       each polynomial, and so on. The filter coefficients for a specified
       polynomial degree and window width are computed independent of any
       data, and stored in a common block. The filter is then convolved
       with the data array to result in smoothed data with reduced noise,
       but retaining higher order variations (better than SMOOTH).

       This procedure became partially obsolete in IDL V5.4 with the 
       introduction of the SAVGOL function, which computes the smoothing
       coefficients.
 CALLING SEQUENCE:

       spectrum = poly_smooth( data, [ width, DEGREE = , NLEFT = , NRIGHT = 
                                       DERIV_ORDER = ,COEFF = ]

 INPUTS:
       data = 1-D array, such as a spectrum or time-series.

       width = total number of data points to use in filter convolution,
               (default = 5, using 2 past and 2 future data points),
               must be larger than DEGREE of polynomials, and a guideline is to
               make WIDTH between 1 and 2 times the FWHM of desired features.

 OPTIONAL INPUT KEYWORDS:

       DEGREE = degree of polynomials to use in designing the filter
               via least squares fits, (default DEGREE = 2)
               The higher degrees will preserve sharper features.

       NLEFT = # of past data points to use in filter convolution,
               excluding current point, overrides width parameter,
               so that width = NLEFT + NRIGHT + 1.  (default = NRIGHT)

       NRIGHT = # of future data points to use (default = NLEFT).

       DERIV_ORDER = order of derivative desired (default = 0, no derivative).

 OPTIONAL OUTPUT KEYWORD:

       COEFFICIENTS = optional output of the filter coefficients applied,
               but they are all stored in common block for reuse, anyway.
 RESULTS:
       Function returns the data convolved with polynomial filter coefs.

 EXAMPLE:

       Given a wavelength - flux spectrum (w,f), apply a 31 point quadratic
       smoothing filter and plot

       IDL> plot, w, poly_smooth(f,31) 
 COMMON BLOCKS:
       common poly_smooth, degc, nlc, nrc, coefs, ordermax

 PROCEDURE:
       As described in Numerical Recipies, 2nd edition sec.14.8, 
       Savitsky-Golay filter.
       Matrix of normal eqs. is formed by starting with small terms
       and then adding progressively larger terms (powers).
       The filter coefficients of up to derivative ordermax are stored
       in common, until the specifications change, then recompute coefficients.
       Coefficients are stored in convolution order, zero lag in the middle.

 MODIFICATION HISTORY:
       Written, Frank Varosi NASA/GSFC 1993.
       Converted to IDL V5.0   W. Landsman   September 1997
       Use /EDGE_TRUNCATE keyword to CONVOL  W. Landsman March 2006


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

 Name        : 
	POLY_VAL()
 Purpose     : 
	Returns values from polygonal areas of displayed images.
 Explanation : 
	The TV cursor is activated, and the user is prompted to enter in a 
	series of points defining a polygon surrounding the region of interest 
	on the displayed image.  This procedure is completed by entering in the
	same point twice.  Then POLYFILLV is used to get the positions POS 
	within that polygon.
 Use         : 
	VAL= POLY_VAL( IMAGE, POS, XVAL, YVAL  [, MX, MY, IX, IY ] )
 Inputs      : 
	IMAGE		= The image to take the positions and values from.
 Opt. Inputs : 
	MX, MY	 = Size of displayed image.
	IX, IY	 = Position of the lower left-hand corner of the image.

	If the optional parameters are not passed, then they are retrieved with
	GET_TV_SCALE.  It is anticipated that these optional parameters will
	only be used in extremely rare circumstances.

 Outputs     : 
	Function value	= Values of the points within the selected area.
	POS		= Positions of the points within the selected area.
	XVAL,YVAL	= The X,Y positions of the surrounding polygon.
 Opt. Outputs: 

 Keywords    : 
	DISABLE  = If set, then TVSELECT not used.
 Calls       : ***
	GET_TV_SCALE, TVPOINTS
 Common      : 
	None.
 Restrictions: 
	Since this routine works interactively with the cursor, the image 
	must be displayed on the TV screen.  It is best if the image is 
	displayed using EXPTV.  But other methods of display are supported by 
	passing MX, MY, and IX, IY directly to the procedure.

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

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

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

 Side effects: 
	A polygon surrounding the selected area is drawn on the image display 
	screen.
 Category    : 
	Utilities, Image_display.
 Prev. Hist. : 
	W.T.T., Oct. 1987.
	William Thompson, May 1992, modified to use GET_TV_SCALE.
 Written     : 
	William Thompson, GSFC, October 1987.
 Modified    : 
	Version 1, William Thompson, GSFC, 12 May 1993.
		Incorporated into CDS library.
 Version     : 
	Version 1, 12 May 1993.


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

 NAME:
       POLYGON_CSR

 PURPOSE:
       Make a size-fixed polygon cursor movable with a mouse

 EXPLANATION:

 CALLING SEQUENCE:
       POLYGON_CSR, px, py, wlabel=wlabel

 INPUTS:
       px -- Array that holds initial X position of points that make
             the polygon, also returns the final position upon exit
             this program.
       py -- Array that holds initial Y position of points that make
             the polygon, also returns the final position upon exit
             this program.
       SCALE -- scaling factor, arcsecond/data pixels
       CSI -- Coordinate system information structure that contains some
              basic information of the coordinate systems involved. It should
              have the following 14 tags:

              XD0 -- X position of the first pixcel of the
                     image (lower left coner), in device pixels
              YD0 -- Y position of the first pixcel of the
                     image (lower left coner), in device pixels
              XU0 -- X position of the first pixcel of the image (lower 
                     left coner), in user (or data) pixels. 
              YU0 -- Y position of the first pixcel of the image (lower 
                     left coner), in user (or data) pixels
              MX  -- X size of the image in device pixels
              MY  -- Y size of the image in device pixels
              RX  -- ratio of SX/MX, (data unit)/(device pixel), where 
                     SX is the image size in X direction in data pixels
              RY  -- ratio of SY/MY, (data unit)/(device pixel), where 
                     SY is the image size in Y direction in data pixels
              X0  -- X position of the reference point in data pixels
              Y0  -- Y position of the reference point in data pixels
              XV0 -- X value of the reference point in absolute units
              YV0 -- Y value of the reference point in absolute units
              SRX -- scaling factor for X direction in arcsec/(data pixel)
              SRY -- scaling factor for Y direction in arcsec/(data pixel)

 CALLED BY:
	MK_POINT_BASE
              Note: Units used for XV0 ans YV0 are arc senconds in
                    case of solar images. If the reference point is
                    the solar disk center, XV0 = YV0 = 0.0. The
                    reference point can also be the first pixel of
                    the image (i.e., the pixcel on the lower-left
                    coner of the image).
                    When the whole image is displayed, XU0 and YU0 are all
                    equal to 0; for subimages, XU0 and YU0 may not be zero.

       D_MODE -- This is set in accordence with the
                 IMAGE_TOOL. It is a code of showing the
                 cursor position in different ways. Default
                 display mode is 2.

 OPTIONAL INPUTS:
       None.

 OUTPUTS:
       px -- Final X position of points of the polygon
       py -- Final Y position of points of the polygon

 OPTIONAL OUTPUTS:
       POINTING -- A 2-element vector that contains the coordinates of the
                   first point of the polygon.

 KEYWORD PARAMETERS:
       COLOR -- Index of the color to be used to draw the polygon
       GROUP -- ID of the widget who serves as a group leader
       KEEP_CSR -- If set, will retian the final cursor on the screen 
                   upon exit; otherwise the cursor is removed.

 CALLS: ***
	CURSOR_INFO
 COMMON BLOCKS:
       IMG_SCALE -- Common block used in IMAGE_TOOL

 RESTRICTIONS:
       None.

 SIDE EFFECTS:
       None.

 CATEGORY:

 PREVIOUS HISTORY:
       Written September 9, 1994, by Liyun Wang, GSFC/ARC

 MODIFICATION HISTORY:
       September 14, 1994, Liyun Wang, GSFC/ARC
          Added common block and allowed to display cursor posistion
          in a text widget.  
       Version 2, Liyun Wang, GSFC/ARC, October 31, 1994
          Report of the position of the polygon made in terms of that of the
          polygon center (defined by 0.5*(x_max+x_min) and 0.5*(x_max+x_min)
          where x_max/x_min and y_max/y_min are max and min values of the
          polygon in X and Y directions respectively.
       Version 3, Liyun Wang, GSFC/ARC, November 18, 1994
          Coordinate system conversion is made by CNVT_COORD; removed the
             common block IMG_SCALE
	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


POLYLEG $SSW/gen/idl_libs/astron/math/polyleg.pro
[Previous] [Next]
 NAME:
       POLYLEG

 PURPOSE:
       Evaluate a Legendre polynomial with specified coefficients.
 EXPLANATION:
       Meant to be used analogously to the POLY function in the IDL User's
       Library distribution.

 CALLING SEQUENCE:
       Result = POLYLEG( X, C )        

 INPUTS:
       X - input variable, scalar or vector    
       C - vector of Legendre polynomial coefficients. 
 OUTPUTS:
       POLYLEG returns a result equal to:
               C[0] + C[1]*P_1(x) + C[2]*P_2(x) + ...

       where P_j(x) is the jth Legendre polynomial.   The output will have
       the same dimensions as the input X variable.

 EXAMPLE:
       If x = [0.5, 1.0] and C = [2.4, 1.3, 2.5] then
       print, polyleg(x, c)    ====> [2.7375, 6.20]

       The result can be checked using the first 3 Legendre polynomial terms
       C[0] + C[1]*x + C[2]*(0.5*(3*x^2-1))
 METHOD:
       Uses the recurrence relation of Legendre polynomials
               (n+1)*P_n+1(x) = (2n+1)*x*P_n(x) - n*P_n-1(x)
       evaluated with the Clenshaw recurrence formula, see Numerical Recipes
       by Press et al. (1992), Section 5.5

 REVISION HISTORY:
       Written W. Landsman   Hughes STX Co.        April, 1995    
       Fixed for double precision  W. Landsman     May, 1997
       Converted to IDL V5.0   W. Landsman   September 1997


popup_menu $SSW/gen/idl/widgets/popup_menu.pro
[Previous] [Next]
 PROJECT:  HESSI

 NAME: popup_menu

 PURPOSE:  pop up a menu with a list of options to choose from

 CATEGORY: widgets

 CALLING SEQUENCE:
	choice = popup_menu (list, title=title, group=group, position=position, $
		width=width, height=height, index=index, popup_base=base)

 INPUTS:
	list - string array of options

 OPTIONAL INPUTS (KEYWORDS):
	title - title to put at top of list (default = 'Options:')
	group - widget id of group leader
	position - fltarr(2) - x,y position of top left corner of popup widget
		relative to top left corner of screen
	width - width of widget will be "width' characters
	height - number of lines in widget
	index - if set, return index into list of selection.  Otherwise return string.


 OUTPUTS:
	Results of function is string selected from list, or index of selection if INDEX
	keyword is set.

 OPTIONAL OUTPUTS:
	popup_base - widget id of popup widget

 Calls: ***
	FCHECK, POPUP_MENU_EVENT, XMANAGER
 COMMON BLOCKS: Uses an internal common called popup_menu_common

 PROCEDURE:

 RESTRICTIONS: None

 SIDE EFFECTS: None.

 EXAMPLES:

 HISTORY:
	Written, Kim, Nov 99
	Mod, Kim, 7-Sep-2000. Made widget base modal.


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

 NAME:
       POPUP_MSG

 PURPOSE:
       Display a message from a popup text widget.

 Explanation:
     This routine creates a message window that informs the user with a
     message and requires the user to read the message and to dismiss the
     window before control will return to the calling procedure.

 Calling sequence:
     popup_msg, message [, title=title, group=group, font=font,$
                           multiple=multiple, verbatim=verbatim]

  calls to  :  xregistered('pop_msg'), xmanager,'popup_msg'

 CALLS: ***
	GET_DFONT [1], GET_DFONT [2], JUSTIFY, POPUP_MSG_EVENT, XMANAGER, XREGISTERED
 CALLED BY:
	CP_GET_HISTORY, CP_GET_MNEMONIC, EIS_IMAGE_TOOL [1], EIS_IMAGE_TOOL [2]
	EIS_IMAGE_TOOL_EVENT [1], EIS_IMAGE_TOOL_EVENT [2], IMAGE_TOOL
	IMAGE_TOOL_EVENT, ITOOL_RD_FITS, MK_RASTER, RD_IMAGE_FITS, TP_CALL_HELP, WIN_DUMP
	WRUNMOVIEM, WRUNMOVIEM3, WRUNMOVIEM_RT, XCDS_SNAPSHOT, XSEL_LIST [1]
	XSEL_LIST [2]
  common    :  none

 INPUT
     message:  string or string vector containing a message
		that will be displayed on the screen for the
		user to read.
		(multi-line messages are aesthetically better)

 Optional inputs:
     title:    Optional title of the message window
     group:    ID number of the widget which acts as a group leader
     modal:    Make the calling widget inactive if set
     space:    Number of lines to space text; default to 4

 Keywords:
     left_justify - Left justify text (default is to centre it)
     right        - Right justify text
     verbatim     - Don't do any adjustment of text layout

 OUTPUT
     none

 MODIFICATION HISTORY
	JAN 1993        -- Elaine Einfalt (HSTX)
       August 19, 1994 -- Liyun Wang (ARC)
       August 31, 1994 -- Liyun Wang (ARC), added GROUP keyword
       Feb 16 1995     -- C D Pike, RAL.  Added FONT and MULTIPLE keywords.
       Feb 20 1995     -- Added crude left justify option.
       April 27, 1995  -- Liyun Wang, GSFC/ARC, Added keywords SPACE, RIGHT
       April 30, 1995  -- C D Pike, RAL, Added VERBATIM keyword.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


POSANG $SSW/gen/idl_libs/astron/astro/posang.pro
[Previous] [Next]
 NAME:
       POSANG
 PURPOSE:
       Computes rigorous position angle of source 2 relative to source 1
       
 EXPLANATION:
       Computes the rigorous position angle of source 2 (with given RA, Dec) 
       using source 1 (with given RA, Dec) as the center.
 
 CALLING SEQUENCE:
       POSANG, U, RA1, DC1, RA2, DC2, ANGLE

 INPUTS:
       U    -- Describes units of inputs and output:
               0:  everything radians
               1:  RAx in decimal hours, DCx in decimal
                       degrees, ANGLE in degrees
       RA1  -- Right ascension of point 1
       DC1  -- Declination of point 1
       RA2  -- Right ascension of point 2
       DC2  -- Declination of point 2

   OUTPUTS:
       ANGLE-- Angle of the great circle containing [ra2, dc2] from
               the meridian containing [ra1, dc1], in the sense north
               through east rotating about [ra1, dc1].  See U above 
               for units.

   PROCEDURE:
       The "four-parts formula" from spherical trig (p. 12 of Smart's
       Spherical Astronomy or p. 12 of Green' Spherical Astronomy).

 CALLS: ***
	ISARRAY [1], ISARRAY [2], ISARRAY [3]
   EXAMPLE:
       For the star 56 Per, the Hipparcos catalog gives a position of 
       RA = 66.15593384, Dec = 33.94988843 for component A, and 
       RA = 66.15646079, Dec =  33.96100069 for component B.   What is the
       position angle of B relative to A?

       IDL> RA1 = 66.15593384/15.d   & DC1 = 33.95988843
       IDL> RA2 = 66.15646079/15.d   & DC2 = 33.96100069
       IDL> posang,1,ra1,dc1,ra2,dc2, ang
            will give the answer of ang = 21.4 degrees
   NOTES:
       (1) If RA1,DC1 are scalars, and RA2,DC2 are vectors, then ANGLE is a
       vector giving the position angle between each element of RA2,DC2 and 
       RA1,DC1.   Similarly, if RA1,DC1 are vectors, and RA2, DC2 are scalars,
       then DIS is a vector giving the position angle of each element of RA1, 
       DC1 and RA2, DC2.    If both RA1,DC1 and RA2,DC2 are vectors then ANGLE 
       is a vector giving the position angle between each element of RA1,DC1 
       and the corresponding element of RA2,DC2.    If then vectors are not the
       same length, then excess elements of the longer one will be ignored.

       (2) Note that POSANG is not commutative -- the position angle between
        A and B is theta, then the position angle between B and A is 180+theta 
   PROCEDURE CALLS:
        ISARRAY()
   HISTORY:
       Modified from GCIRC, R. S. Hill, RSTX, 1 Apr. 1998


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

   Purpose: boolean - 1 (true) if positive - scaler/arrays ok

   Keyword Parameters:
      inval - switch, if set, invalid data returns 0 (false) not -1 (invalid)

   Calling Sequence:
      pos=positive(array [,/inval])
      
   Calling Example:
      if positive(scaler) then .. 	  ; scaler returns scaler for boolean
					  ; compare (assume arithmetic input)
      if positive(scaler,/inval) then... ; false if negative OR invalid input
					  ; type (string/structure/undefined)
 CALLED BY:
	html_highlight
   History:
      27-Apr-1993 (SLF)
   
   Restrictions:
      no strings/structures/undefined input please (returns -1)


POSITIVITY $SSW/gen/idl_libs/astron/image/positivity.pro
[Previous] [Next]
 NAME:
	POSITIVITY
 PURPOSE:
	Map an image uniquely and smoothly into all positive values.
 EXPLANATION:
	Take unconstrained x (usually an image), and map it uniquely and 
	smoothly into positive values.   Negative values of x get mapped to 
	interval ( 0, sqrt( epsilon )/2 ], positive values go to 
	( sqrt( epsilon )/2, oo ) with deriv approaching 1.  Derivative is 
	always 1/2 at x=0.   Derivative is used by the MRL deconvolution 
	algorithm.

 CALLING SEQUENCE:
	result = POSITIVITY( x, [ /DERIVATIVE, EPSILON = )

 INPUTS:
	x - input array, unconstrained

 OUTPUT:
	result =  output array = ((x + sqrt(x^2 + epsilon))/2
		if the /DERIV keyword is set then instead the derivative of
		the above expression with respect to X is returned

 OPTIONAL INPUT KEYWORDS:
	DERIV -  if this keyword set, then the derivative of the positivity
		mapping is returned, rather than the mapping itself
	EPSILON - real scalar specifying the interval into which to map
		negative values.    If EPSILON EQ 0 then the mapping reduces to 
		positive truncation.   If EPSILON LT then the mapping reduces to
		an identity (no change).  Default is EPSILON = 1e-9 

 REVISION HISTORY:
	 F.Varosi NASA/GSFC 1992, as suggested by R.Pina UCSD.
	Converted to IDL V5.0   W. Landsman   September 1997
 CALLED BY
	MAX_LIKELIHOOD


PPD $SSW/gen/idl/system/ppd.pro
[Previous] [Next]
 NAME:
	PPD

 PURPOSE:
       Pop up directory name from the directory stack and CD to it.

 CALLING SEQUENCE:
	PPD

 SIDE EFFECTS:
	The top entry of the directory stack is removed.

 RESTRICTIONS:
	Popping up a directory from an empty stack causes a warning
	message to be printed.  The current directory is not changed
	in this case.

 CALLS: ***
	CDD, DELVARX [1], DELVARX [2], DELVARX [3], DELVARX [4], delvarx [5]
 COMMON BLOCKS:
	STACK_DIR:  Contains the stack.
       CDD:        Common block used by CDD.

 MODIFICATION HISTORY:
	17, July, 1989, Written by AB, RSI.
       Version 2, Liyun Wang, GSFC/ARC, November 12, 1994
          Modified from POPD for use with CDD and PD.

 VERSION:
       Version 2, November 12, 1994


PPINVERT $SSW/gen/idl/image/ppinvert.pro
[Previous] [Next]
NAME:
     PPINVERT
PURPOSE:
     Invert a "pp" matrix obtained from setpts.pro.  This converts the 
     pp variable representing the transformation from A to B into a pp
     variable representing the transformation from B to A.
CATEGORY:
CALLING SEQUENCE:
     inverse = invertpp(pp)
INPUTS:
     pp = pp variable obtained from setpts.pro
OPTIONAL INPUT PARAMETERS:
KEYWORD PARAMETERS
OUTPUTS:
     inverse = inverted pp variable
 CALLED BY:
	AUTO_ALIGN_IMAGES
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
PROCEDURE:
     Very straightforward but hard to remember so I put the 3 lines into
     a function.
MODIFICATION HISTORY:
     29-Sep-93 Written by T. Metcalf


pprint OBSOLETE See SPRINTPRO [1] $SSW/gen/idl/system/pprint.pro
[Previous] [Next]
NAME:
	pprint (OBSOLETE -- See SPRINT.PRO)
PURPOSE:
       Closes currently open hardcopy plot device (if necessary) and 
	sends the plot file to the appropriate device.
	This is the Unix Version of the routine.
CALLING SEQUENCE:
	pprint
	pprint, 'idl_save.ps'
OPTIONAL INPUTS:
	file	- if present, filename to print (default=idl.ps)
KEYWORD INPUTS:
       dev_que	- if set, device name or number (default=lp0)
	delete	- if set, delete file after spooling
	reset	- if set, sets plot to X before exit 
	color 	- if set, use color (device = lp1)
	banner	- if set, print banner page (default is no banner page)
			------ OBSOLETE - NOT USED BY SPRINT ------
	force_print - If set, then issue the print command even if the
		  plot device is not PS.
	node	- If set, the use an "rsh" and "cat" command to send 
		  the print command to the remote machine.
	qdebug	- If set, then print the spawn command
 CALLS: ***
	get_host [1], get_host [2], get_logenv [1], get_logenv [2], is_member [1]
	is_member [2], pprint [1], pprint [2]
HISTORY:
	Starting point was "lprint.pro"	slf, 12/5/91
		slf, 1/22/92 - isass mods  
		mdm, 3/3/92 - Do not print anything if device is not PS
	12-Mar-92 (MDM) - Renamed to pprint
	21-aug-92 JRL, Fixed dev_que option.
	 6-feb-93 JRL, Fixed for use at LPARL
	 6-Oct-93 MDM,  Expanded to use "lp" queue if on flare machine
			Added /FORCE_PRINT
	 7-Oct-93 MDM,  Minor changes in the organization
			Added /QDEBUG option
	 9-Oct-93 MDM,  Removed ban option for printing to SGI
	28-Jan-94 MDM,  Added check for PRINTER enviroment variable
	15-Mar-94 MDM,  Added check for PRINTER_CMD environment variable
       28-Mar-94 SLF,  Change print command on SGI to:/usr/local/bin/lps20ps
	15-Apr-94 MDM,  Added check for PPRINT_NODE environment variable
	 3-May-94 MDM,  Added "-c" option for lp command to kodak from SXT
			so that the file is copied (spooled)
       16-feb-95 SLF,  fix lparl color queue name (and force_print)
       17-Feb-95 SLF,  ignore PRINTER if /color set
	27-Feb-95 MDM,  Removed "force_print=1"
	19-Sep-95 MDM,  Made it work with remote NODE and PRINTER_CMD together
	 4-Apr-96 MDM,  Added PRINTER_COLOR option and changed default printer
			to kodak for color
	15-Apr-97 MDM,  Gutted and modified to call SPRINT (SSW routine)


PQ2PP $SSW/gen/idl/image/pq2pp.pro
[Previous] [Next]
NAME:
     PQ2PP
PURPOSE:
     Converts the P and Q variables used in poly2d into a pp matrix which
     simulates the output from setpts.pro.  This is the inverse of caltrans.
CATEGORY:
CALLING SEQUENCE:
     pp = pq2pp(p,q)  OR
     pp = pq2pp(t)
INPUTS:
     p = p matrix used by poly2d
     q = q matrix used by poly2d
     t = transformation matrix from caltrans.pro
OPTIONAL INPUT PARAMETERS:
KEYWORD PARAMETERS
     x = x values to use in the transformation (optional)
     y = y values to use in the transformation (optional)
OUTPUTS:
     pp = fltarr(2,2,*)  (see setpts.pro)
 CALLED BY:
	AUTO_ALIGN_IMAGES
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
     Only works for linear transformations.

     If x and y are specified they must have the same dimension.
PROCEDURE:
MODIFICATION HISTORY:
     Written by T. Metcalf 12-Aug-93


PQ2RSS $SSW/gen/idl/image/pq2rss.pro
[Previous] [Next]
NAME:
     PQ2RSS
PURPOSE:
     Converts the P and Q variables in a call to poly_2d into a rotation, 
     scale change, and shift.
CATEGORY:
CALLING SEQUENCE:
     pq2rss,p,q,erot,exscl,eyscl,exshft,eyshft,enrss,nx,ny
INPUTS:
     p,q = p,q for poly_2d.  P and Q should be 4-element vectors and represent
           the first order transformation from poly_warp.
OPTIONAL INPUT PARAMETERS:
     nx,ny = the size of the image which is being warped.  These are required
             to fix the center of the rotation.  If /center is set, they are
             required.
KEYWORD PARAMETERS
      anchor = [x0,y0] defines the center of the rotation.
     /center = rotate about the center rather thatn the lower left corner
               This affects only the output value of exshft and eyshft.
     /rotfirst = Do the rotation before the shift.  Not normally a good idea.
                 Ignored unless center or anchor is set.
     /quiet = don't print the answer
OUTPUTS:
     erot = equivalent rotaion in degrees
     exscl = equivalent x scale as a fraction of the original sacle
     eyscl = equivalent y scale as a fraction of the original sacle
     exshft = equivalent x shift in pixels
     eyshft = equivalent y shift in pixels
     enrss = warping ... this is whatever bit of p,q does not fit into the
             simple rotation/scale/shift.  fltarr(4,2)
 CALLS: ***
	RSS2PQ, arange
 CALLED BY:
	AUTO_ALIGN_IMAGES, TRACE_MDI_ALIGN
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
     The first order P,Q transformation also includes a warping (x*y term)
     which is not really included here.  enrss returns the leftover P,Q
     which represent this term to some extent.
PROCEDURE:
EXAMPLES:
     IDL> pq2rss,[1,0,1,0],[1,1,0,0]
 
        rotation =  0.00000 degrees
        scale x =  1.00000
        scale y =  1.00000
        shift x =  -1.00000
        shift y =  -1.00000
MODIFICATION HISTORY:
     Written by T. Metcalf  March 30, 1993
     TRM 27-June-93   Sepearted this code into a separate program from 
                      align_img.pro
     TRM 1994-11-10   Added anchor keyword.
     TRM 2001-09-26   Added rotfirst keyword so that the default call to
                      pq2rss is the inverse of the default call to rss2pq.
     TRM 2001-09-27   Changed to double precision since there are matrix
                      inversions to do.
     TRM 2005-01-25   /center now implies an anchor point of
                      [(nx-1)/2,(ny-1)/2] rather than [nx/2,ny/2].


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

pro pq2xy,x,y,pin,qin,xprime,yprime

NAME:
   PQ2XY
PURPOSE:
   Takes a poly_2d transformation and uses it to convert an
   x,y vector into the xprime,yprime coordinates after the 
   transformation.
CATEGORY:
CALLING SEQUENCE:
   pq2xy,x,y,p,q,xprime,yprime
INPUTS:
   x,y = input coordinates
   p,q = the poly_2d transformation
OPTIONAL INPUT PARAMETERS:
KEYWORD PARAMETERS
OUTPUTS:
   xprime,yprime = the transformed coordinates
 CALLED BY:
	MK_MDI_MAP_EARTH, MK_SOHO_MAP_EARTH, PQINVERT, TRACE_CUBE_POINTING
	TRACE_MDI_ALIGN
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
PROCEDURE:
MODIFICATION HISTORY:
     T. Metcalf 2001-Oct-09


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

pro pqinvert,pin,qin,pout,qout,x,y,degree=degree

NAME:
     PQINVERT
PURPOSE:
     Invert a set of p,q arrays (see poly_2d) so that the
     transformation goes the other direction
CATEGORY:
CALLING SEQUENCE:
     pqinvert,pin,qin,pout,qout,x,y
INPUTS:
     p,q = input transformation
     x,y = the x,y coordinates for which the transformation is to be
           computed.
OPTIONAL INPUT PARAMETERS:
KEYWORD PARAMETERS
OUTPUTS:
     pout,qout = inverted transformation
 CALLS: ***
	POLYWARP, PQ2XY
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
PROCEDURE:
     Straighforward use of polywarp.
MODIFICATION HISTORY:
     T. Metcalf  2001-Oct-09


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

   Purpose: simple synonym for pr_logenv

   SEE DOC HEADER FOR PR_LOGENV

 CALLS: ***
	PR_ENV, pr_logenv, pr_logwindows
 CALLED BY:
	FIRST_LIGHT [1], FIRST_LIGHT [2]
   History:
      15-feb-1996 (S.L.Freeland)
      26-Jul-2000 (R.D.Bentley) - modified for windows


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

   Purpose: print or return Environment/Logical definitions

   Calling Sequence:
      pr_logenv [, /PATTERN1 [, /PATTERN2, /PATTERN3...] , /hc]

   Calling Examples:
      pr_logenv, /ssw

   Input Parameters:
      NONE
   
   Keyword Parameters:
      leading -  if set, match leading patterns only  (patt*) default (*patt*)
      trailing - if set, match trailing patterns only (*patt) default (*patt*)
      hc     -   if set, produce hardcopy
      status -   if set, prepend status (user/machine/date/!version...)
      PATTERN -  ALL OTHER SWITCHES ARE INTERPRETED AS SEARCH STRINGS

   Method:
      keyword inheritance used to pass in search patterns as switches

 CALLS: ***
	get_logenv [1], get_logenv [2], pr_status [1], pr_status [2], prstr [1], prstr [2]
	strjustify
 CALLED BY:
	HSI_DIAGNOSTICS, pr_evn [1]
   History:
      23-jun-1995 (SLF) 


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

   Purpose: print or return Environment/Logical definitions

   Calling Sequence:
      pr_logenv [, /PATTERN1 [, /PATTERN2, /PATTERN3...] , /hc]

   Calling Examples:
      pr_logenv, /ssw

   Input Parameters:
      NONE

   Keyword Parameters:
;;      leading -  if set, match leading patterns only  (patt*) default (*patt*)
;;      trailing - if set, match trailing patterns only (*patt) default (*patt*)
      hc     -   if set, produce file c:\temp\setenv.txt
      PATTERN -  ALL OTHER SWITCHES ARE INTERPRETED AS SEARCH STRINGS

   Method:
      keyword inheritance used to pass in search patterns as switches

 CALLS: ***
	MORE [1], MORE [2], prstr [1], prstr [2]
 CALLED BY:
	pr_evn [1]
   Restrictions:
      WINDOWS only
      will only list env. vars. set by set_logenv (=> set_logwindows)

   History:
      28-Jul-2000 (RDB)


pr_path [1] $SSW/gen/idl/system/pr_path.pro
[Previous] [Next]
NAME:
	pr_path
PURPOSE:
	Procedure to print the IDL !path variable (since it
	is so long for Yohkoh users and returns an error with
	the command "print,!path"
CALLING SEQUENCE:
	pr_path
	pr_path, path
OPTIONAL OUTPUT:
	path	- a string array of the directories in the path
 CALLS: ***
	STR2ARR [1], STR2ARR [2], prstr [1], prstr [2]
HISTORY:
	Written 17-Apr-92 by M.Morrison
	25-Apr-94 (MDM) - Removed "more-like" code and replace with PRSTR
	 8-May-00 (RDB) - use ";" as delimiter for windows


pr_path_lib [1] $SSW/gen/idl/genutil/pr_path_lib.pro
[Previous] [Next]
 NAME:
   pr_path_lib
 PURPOSE:
   Print the path of a file in !path
   Calls path_lib() to do the work.
 CALLING SEQUENCE:
   pr_path_lib,'yodat'
   pr_path_lib,'gt_*'
 INPUTS:
   String containing search string
 OPTIONAL INPUT KEYWORDS:
   nopro	= Set to search for non *.pro files
   multi	= Multiple file search.  Default (unless name caontains
		  a * (wildcard) is search until first match.  Setting
		  multi will cause the search to continue through the
		  entire tree.
   directory	= directory to search.  If omitted, use the !path and
		  current directories.
 OPTIONAL OUTPUT KEYWORDS:
   out		= String vector of all cases found
 CALLS: ***
	DOC_LIBRARY, PATH_LIB [1], PATH_LIB [2]
 MODIFICATION HISTORY:
   30-apr-93, J. R. Lemen, Written


pr_stats [1] $SSW/gen/idl/genutil/pr_stats.pro
[Previous] [Next]
NAME:
	pr_stats
PURPOSE:
	To print the min/max/avg/dev for an array
	Optionally loop through one of the dimensions
	Returns a structure with what it had found
SAMPLE CALLING SEQUENCE:
	pr_stats, var
	pr_stats, var_3d_arr, 1
	pr_stats, var, dim, info
	pr_stats, filename_arr, junk, info
INPUT:
	var	- The variable to get the stats on
				(OR)
		  the list of FITS file names to process
OPTIONAL INPUT
	dim	- The dimension to cycle through
OUTPUT:
	info	- A structure with tags
			.avg - holds the average
			.dev - holds the standard deviation
			.min - holds the minimum
			.max - holds the maximum
 CALLS: ***
	PR_STATS1, STDEV
HISTORY:
	Written 1996 by M.Morrison
	 6-Nov-96 (MDM) - Added documentation header
	 2-Jul-97 (MDM) - Added FITS filename array option


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

   Purpose: print and/or return some status info
            (userid, hostid, idl version, local and uttime)

   Input Parameters:
      NONE:
   Output Parameters:
      text - formatted status info

   Keyword Parameters:
      noprint -    if set dont print to terminal
      idlcomment - if set, prepend comment chars ";" so text can be inserted in idljob
      idldoc     - same as idlcomment, with doc delimters added (;+  ;-)
      caller - string name of routine calling (adds a line to status info)
      header - string or string array of user info to prepend to status info
      
   Calling Examples:
     pr_status			   ; display to terminal
     pr_status,text, /noprint     ; return via text paramter
     pr_status,text, /idldoc	   ; prepend idl doc delimiters (;+...;...;-)
     pr_status,text, /idldoc, caller="ROUTINE" ; adds a line to status info
     pr_status,text, header=strarry ; user info to prepend
     pr_status,text, /idlcomment  ; prepend ";" for insertion into idl jobfiles
     (the above command returns the following...)
  -------------------------------------------
 | User Name: freeland                       |
 | Host Name: isass2.solar.isas.ac.jp        |
 | Directory: /usr/people/freeland/dev/batch |
 |                                           |
 | IDL Version: 3.5.1                        |
 | Host OS    : ultrix                       |
 | Host ARCH  : mipsel                       |
 |                                           |
 | Local Time:  1-OCT-94  15:12:34           |
 | UT Time   :  1-OCT-94  06:12:34           |
  -------------------------------------------

 CALLS: ***
	MORE [1], MORE [2], curdir [1], curdir [2], data_chk [1], data_chk [2], fmt_tim [1]
	fmt_tim [2], get_host [1], get_host [2], get_user [1], get_user [2], strjustify
	ut_time [1], ut_time [2]
 CALLED BY:
	eit_genx_cat, go_batch [1], go_batch [2], go_yo_prod_batch, killold [1]
	killold [2], laststat [1], laststat [2], map_env2dir, mk_pubydb, mk_sfc [1]
	mk_sfc [2], mk_ssc_batch [1], mk_ssc_batch [2], mo_job0, mo_job1, mostrip, pr_logenv
	pref_super, soon_catstat, ssw_check_contrib, ssw_conflicts, ssw_contrib_monitor
	ssw_start_rpcserver, ssw_swmap_bestof, ssw_swmap_info, sxt2file
   History:
      1-Oct-1994 (SLF)


PR_SYNTAX $SSW/gen/idl/util/pr_syntax.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : PR_SYNTAX
               
 Purpose     : print syntax of calling procedure/function
               
 Category    : utility
               
 Explanation : 
               
 Syntax      : IDL> pr_syntax,input
    
 CALLED BY:
	ADD_METHOD, ADD_PROP, ADD_TAG [1], BLINK_MAP, BOOST_TAG, BREAK_MAP, CHECK_FTP
	COMP_FITS_CEN, COMP_FITS_CRPIX, COMP_FITS_CRVAL, COREG_MAP, DB_CHECK, DIFF_MAP
	DO_EIT_MAP, DO_EIT_SCALING, DROT_MAP, DROT_MAP_FAST, DROT_NAR, DROT_XY, DSCALE
	EIS_ITOOL_STC [1], EIS_ITOOL_STC [2], EIS_LIST_EXPER [1], EIS_LIST_EXPER [2]
	EIS_LIST_MAIN [1], EIS_LIST_MAIN [2], EIS_PLAN_STC [1], EIS_PLAN_STC [2]
	EXEC_STRUCT, FID2TIME, FILE2FID, FILT_DATA, FIND_CAT, FIND_COMPRESSED, FIND_FID
	FIND_PROC, FITS2MAP [1], FITS2MAP [2], FLIP_MAP, FTP_SYNOP, GET_ARR_CENTER
	GET_CDS_ASRUN, GET_CDS_FOV, GET_CDS_XY, GET_DROT_DUR, GET_FITS_CDELT, GET_FITS_CEN
	GET_FITS_TIME, GET_MAP_FOV, GET_MAP_PROP, GET_MAP_REGION, GET_MAP_SUB
	GET_MAP_TIME, GET_SUMER_FILES, GET_SUMER_FLAT, GRID_MAP, GRID_XY, GT_CDS_WINDOW
	GT_VMAP, HAVE_FILES, HAVE_METHOD, INDEX2MAP, INTER_MAP, JOIN_STRUCT [1]
	JOIN_STRUCT [2], LTC_MAP, LVIEW_XY, MAKE_MAP, MAKE_XY, MAP2FITS, MAP2GIF, MAP2JPEG
	MAP2MPEG, MEAN_MAP, MERGE_MAP, MK_24BIT, MK_8BIT, MK_EIT_MAP, MK_IVM_MAP, MK_LINK
	MK_MPEG, MK_NEW_MAP, MK_OLD_MAP, MK_TEMP_DIR, MOVIE_MAP, NEAREST_GEV, OBJ_COPY
	OBJ_DISSECT, OPLOT_NAR [1], PAIR_STRUCT, PATCH_MAP, PLOT_BOX, PLOT_MAP
	PLOT_MAP2 WARNINGTEMPORARY FIX ONLY FOR 16 bit ZBuffer support, PTR_COPY
	RD_GOES_SDAC, RD_RSTN, RD_SPIRIT, READ_CDS, READ_EIT_FILE, REBIN_FID, REBIN_MAP
	REDUCE_MAP, REM_MAP_LIMB, REM_TAG [1], REP_FITS_HEAD, REP_PROP, REP_STRUCT_NAME
	REP_TAG_NAME, REP_TAG_VALUE, RESPACE_MAP, ROT_MAP, ROUND_TIME, RSTRMID, SHIFT_MAP
	SMART_FTP, SOCK_COPY, SOCK_FILES, SOCK_LIST, SOCK_MAP, SOCK_RPC, SOCK_RUN, SOCK_SSW
	SOHO_XY, SPLIT_STRUCT, STRIP_STRUCT, STR_CHUNK, SUB_MAP, SUMER_CALIB, SWISS_CHEESE
	TIFF2GIF, TRIM_TAGS, URL_GET, WHERE_OFF_LIMB, WHERE_TIMES, XCRON, Y2KFIX, byte2str
	low_res_1d, low_res_2d, map2index, strip_crt, uncompress
 Examples    : 

 Inputs      : INPUT = input syntax string
               
 Opt. Inputs : None
               
 Outputs     : None

 Opt. Outputs: None
               
 Keywords    : None

 CALLS: ***
	DATATYPE [1], DATATYPE [2], DATATYPE [3], GET_CALLER, TRIM
 Common      : None
               
 Restrictions: None
               
 Side effects: None
               
 History     : Version 1,  4-Sep-1997, Zarro (SAC/GSFC)

 Contact     : dzarro@solar.stanford.edu


pr_tim2week [1] $SSW/gen/idl/genutil/pr_tim2week.pro
[Previous] [Next]
 NAME:
   pr_tim2week
 PURPOSE:
   Print Yohkoh week ID for specified time
 CALLING SEQUENCE:
   pr_tim2week, index(0)
   pr_tim2week			; Current week ID
   pr_tim2week, /range		; Print start and stop dates
 OPTIONAL INPUTS:
   intime	= Time in any Yohkoh format
 OPTIONAL INPUT KEYWORDS:
   range	= If set, print the time range
 OPTIONAL OUTPUTS:
   t1, t2	= Time range of specified week(s)
 PROCEDURE:
   Calls anytim2weekid
   Short weeks (first and last week of the year) are flagged with a "*".
 CALLS: ***
	anytim2ints [1], anytim2ints [2], anytim2weekid [1], anytim2weekid [2]
	fmt_tim [1], fmt_tim [2]
   Note:  If the time of the data occurs near 00:00 UT on Sunday, then
          the Yohkoh data might be included in the previous week.
 MODIFICATION HISTORY:
   22-jan-94, J. R. Lemen, Written


pr_week2tim [1] $SSW/gen/idl/genutil/pr_week2tim.pro
[Previous] [Next]
 NAME:
   pr_week2tim
 PURPOSE:
   Print time range for specified Yohkoh week ID 
 CALLING SEQUENCE:
   pr_week2tim, '94_04a'	; Time range of week 4 of 1994
   pr_week2tim, 4		; Week 4 of current year
   pr_week2tim, 4, year=93	; Week 4 of 1993
   pr_week2tim, '94_04a', t1, t2 ; Return start and stop days
   pr_week2tim			; Range of the current week
 INPUT:
   week_id	= Yohkoh Week ID (string) - may be a vector
 OPTIONAL OUTPUTS:
   t1, t2	= Time range of specified week(s)
 CALLS: ***
	weekid2ex [1], weekid2ex [2], weekid2ex [3]
 CALLED BY:
	MK_ORB_WEEK, goes3sec_copy, mk_gev [1], mk_gev [2], mk_week_file [1]
	mk_week_file [2], pr_visible, selsis_week, sxt_plan
 PROCEDURE:
   Calls weekid2ex
   Short weeks (first and last week of the year) are flagged with a "*".
 MODIFICATION HISTORY:
   22-jan-94, J. R. Lemen, Written


prcols [1] $SSW/gen/idl/util/prcol.pro
[Previous] [Next]
   Name: prcols

   Purpose: print up to 10 array parameters in aligned columns w/optional header

   Input Parameters:
      up to 10 arrays - number of elements must match

   Keyword Paramters:
      right/left/center - specify alignment/justification (see strjustify)
      box - if set, draw box the whole thing (see strjustify)
      header - optional header string to align with data - comma or blank delimited string will
               (number of fields should match array sizes)
      noprint - switch - if set, dont print to terminal (output via OUTARR keyword)
      coldelim=coldelim - if string, delimiter to insert between columns 
                          if number, number of blanks to insert between cols (def=2 blanks)
      outarr - the aligned text array

   Method: call strjustify, execute

 CALLS: ***
	MORE [1], MORE [2], PRCOL, STR2ARR [1], STR2ARR [2], data_chk [1], data_chk [2]
	strjustify
   History:
      11-sep-1995 (SLF) - provide terminal front end to strjustify


PRECESS $SSW/gen/idl_libs/astron/astro/precess.pro
[Previous] [Next]
 NAME:
      PRECESS
 PURPOSE:
      Precess coordinates from EQUINOX1 to EQUINOX2.  
 EXPLANATION:
      For interactive display, one can use the procedure ASTRO which calls 
      PRECESS or use the /PRINT keyword.   The default (RA,DEC) system is 
      FK5 based on epoch J2000.0 but FK4 based on B1950.0 is available via 
      the /FK4 keyword.

      Use BPRECESS and JPRECESS to convert between FK4 and FK5 systems
 CALLING SEQUENCE:
      PRECESS, ra, dec, [ equinox1, equinox2, /PRINT, /FK4, /RADIAN ]

 INPUT - OUTPUT:
      RA - Input right ascension (scalar or vector) in DEGREES, unless the 
              /RADIAN keyword is set
      DEC - Input declination in DEGREES (scalar or vector), unless the 
              /RADIAN keyword is set
              
      The input RA and DEC are modified by PRECESS to give the 
      values after precession.

 OPTIONAL INPUTS:
      EQUINOX1 - Original equinox of coordinates, numeric scalar.  If 
               omitted, then PRECESS will query for EQUINOX1 and EQUINOX2.
      EQUINOX2 - Equinox of precessed coordinates.

 OPTIONAL INPUT KEYWORDS:
      /PRINT - If this keyword is set and non-zero, then the precessed
               coordinates are displayed at the terminal.    Cannot be used
               with the /RADIAN keyword
      /FK4   - If this keyword is set and non-zero, the FK4 (B1950.0) system
               will be used otherwise FK5 (J2000.0) will be used instead.
      /RADIAN - If this keyword is set and non-zero, then the input and 
               output RA and DEC vectors are in radians rather than degrees

 CALLS: ***
	ADSTRING, PREMAT
 CALLED BY:
	ASTRO, ATV, EQ2HOR, GLACTC, HOR2EQ, HPRECESS, PRECESS_CD, PRECESS_XYZ, UPTIME, XYXY
 RESTRICTIONS:
       Accuracy of precession decreases for declination values near 90 
       degrees.  PRECESS should not be used more than 2.5 centuries from
       2000 on the FK5 system (1950.0 on the FK4 system).

 EXAMPLES:
       (1) The Pole Star has J2000.0 coordinates (2h, 31m, 46.3s, 
               89d 15' 50.6"); compute its coordinates at J1985.0

       IDL> precess, ten(2,31,46.3)*15, ten(89,15,50.6), 2000, 1985, /PRINT

               ====> 2h 16m 22.73s, 89d 11' 47.3"

       (2) Precess the B1950 coordinates of Eps Ind (RA = 21h 59m,33.053s,
       DEC = (-56d, 59', 33.053") to equinox B1975.

       IDL> ra = ten(21, 59, 33.053)*15
       IDL> dec = ten(-56, 59, 33.053)
       IDL> precess, ra, dec ,1950, 1975, /fk4

 PROCEDURE:
       Algorithm from Computational Spherical Astronomy by Taff (1983), 
       p. 24. (FK4). FK5 constants from "Astronomical Almanac Explanatory
       Supplement 1992, page 104 Table 3.211.1.

 PROCEDURE CALLED:
       Function PREMAT - computes precession matrix 

 REVISION HISTORY
       Written, Wayne Landsman, STI Corporation  August 1986
       Correct negative output RA values   February 1989
       Added /PRINT keyword      W. Landsman   November, 1991
       Provided FK5 (J2000.0)  I. Freedman   January 1994
       Precession Matrix computation now in PREMAT   W. Landsman June 1994
       Added /RADIAN keyword                         W. Landsman June 1997
       Converted to IDL V5.0   W. Landsman   September 1997
       Correct negative output RA values when /RADIAN used    March 1999 
       Work for arrays, not just vectors  W. Landsman    September 2003 


PRECESS_CD $SSW/gen/idl_libs/astron/astro/precess_cd.pro
[Previous] [Next]
 NAME:
       PRECESS_CD

 PURPOSE:
       Precess the CD (coordinate description) matrix from a FITS header 
 EXPLANATION:
       The CD matrix is precessed from EPOCH1 to EPOCH2.  Called by HPRECESS

 CALLING SEQUENCE:
       PRECESS_CD, cd, epoch1, epoch2, crval_old, crval_new, [/FK4]  

 INPUTS/OUTPUT:
       CD - 2 x 2 CD (coordinate description) matrix in any units
               (degrees or radians).  CD will altered on output to contain 
               precessed values in the same units.    On output CD will always
               be double precision no matter how input.

 INPUTS:
       EPOCH1 - Original equinox of coordinates, scalar (e.g. 1950.0).  
       EPOCH2 - Equinox of precessed coordinates, scalar (e.g. 2000.0)
       CRVAL_OLD - 2 element vector containing RA and DEC in DEGREES
               of the reference pixel in the original equinox
       CRVAL_NEW - 2 elements vector giving CRVAL in the new equinox 

 INPUT KEYWORD:
       /FK4 - If this keyword is set, then the precession constants are taken
             in the FK4 reference frame.   The default is the FK5 frame.

 CALLS: ***
	PRECESS
 CALLED BY:
	HPRECESS
 RESTRICTIONS:
       PRECESS_CD should not be used more than 2.5 centuries from the
       year 1900.      

 PROCEDURE:
       Adapted from the STSDAS program FMATPREC.  Precession changes the
       location of the north pole, and thus changes the rotation of
       an image from north up.  This is reflected in the precession of the
       CD matrix.   This is usually a very small change. 

 PROCEDURE CALLS:
       PRECESS

 REVISION HISTORY:
       Written, Wayne Landsman, ST Systems  February 1988
       Fixed sign error in computation of SINRA     March 1992
       Added /FK4 keyword                           Feb 1994
       Converted to IDL V5.0   W. Landsman   September 1997


PRECESS_XYZ $SSW/gen/idl_libs/astron/astro/precess_xyz.pro
[Previous] [Next]
 NAME:
	PRECESS_XYZ

 PURPOSE:
	Precess equatorial geocentric rectangular coordinates. 

 CALLING SEQUENCE:
	precess_xyz, x, y, z, equinox1, equinox2

 INPUT/OUTPUT:
	x,y,z: scalars or vectors giving heliocentric rectangular coordinates
              THESE ARE CHANGED UPON RETURNING.
 INPUT:
	EQUINOX1: equinox of input coordinates, numeric scalar
       EQUINOX2: equinox of output coordinates, numeric scalar

 OUTPUT:
	x,y,z are changed upon return

 NOTES:
   The equatorial geocentric rectangular coords are converted
      to RA and Dec, precessed in the normal way, then changed
      back to x, y and z using unit vectors.

 CALLS: ***
	PRECESS
 CALLED BY:
	XYZ
EXAMPLE:
	Precess 1950 equinox coords x, y and z to 2000.
	IDL> precess_xyz,x,y,z, 1950, 2000

HISTORY:
	Written by P. Plait/ACC March 24 1999 
	   (unit vectors provided by D. Lindler)
       Use /Radian call to PRECESS     W. Landsman     November 2000
       Use two parameter call to ATAN   W. Landsman    June 2001


PREMAT $SSW/gen/idl_libs/astron/astro/premat.pro
[Previous] [Next]
 NAME:
       PREMAT
 PURPOSE:
       Return the precession matrix needed to go from EQUINOX1 to EQUINOX2.  
 EXPLANTION:
       This matrix is used by the procedures PRECESS and BARYVEL to precess 
       astronomical coordinates

 CALLING SEQUENCE:
       matrix = PREMAT( equinox1, equinox2, [ /FK4 ] )

 INPUTS:
       EQUINOX1 - Original equinox of coordinates, numeric scalar.  
       EQUINOX2 - Equinox of precessed coordinates.

 OUTPUT:
      matrix - double precision 3 x 3 precession matrix, used to precess
               equatorial rectangular coordinates

 OPTIONAL INPUT KEYWORDS:
       /FK4   - If this keyword is set, the FK4 (B1950.0) system precession
               angles are used to compute the precession matrix.   The 
               default is to use FK5 (J2000.0) precession angles

 CALLED BY:
	BARYVEL, PRECESS
 EXAMPLES:
       Return the precession matrix from 1950.0 to 1975.0 in the FK4 system

       IDL> matrix = PREMAT( 1950.0, 1975.0, /FK4)

 PROCEDURE:
       FK4 constants from "Computational Spherical Astronomy" by Taff (1983), 
       p. 24. (FK4). FK5 constants from "Astronomical Almanac Explanatory
       Supplement 1992, page 104 Table 3.211.1.

 REVISION HISTORY
       Written, Wayne Landsman, HSTX Corporation, June 1994
       Converted to IDL V5.0   W. Landsman   September 1997


PRESTORE $SSW/gen/idl/display/prestore.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : PRESTORE
               
 Purpose     : Restore Plot Region data (!P,!X,!Y,!D, and data X/Y size)
               
 Explanation : Prestore is used to restore information about plot regions
		previously saved with PSTORE().
		The !P/!X/!Y/!D system variables are set to the values
		they had at the moment of the call to PSTORE().

		The Plot Region is identified by the plot region ID that
		was returned by PSTORE(), or found by PFIND()

 Use         : PRESTORE,P_REG [,DATAX, DATAY, SCRNX, SCRNY, JX, JY]
    
 Inputs      : P_REG : The plot region ID.

 Opt. Inputs : None.
               
 Outputs     : DATAX/Y : The size of the data in the plot region, as reported
			to PSTORE().

		SCRNX/Y : The size of the display region on the screen (device units)
		
		JX/JY   : !P.CLIP(0) and !P.CLIP(1)
               
 Opt. Outputs: None.
               
 Keywords    : PLOT_NUMBER: Set to a named variable to return the plot number
			that was sent to PSTORE().

 Calls       : ***
	SETWINDOW [1], SETWINDOW [2], TRIM
 CALLED BY:
	CW_PLOTZ [1], CW_PZOOM [1], DSPWAV, GDSPSPEC, NDSPSPEC, PQLPROFILE, PQLZOOM, TLB_PLACE
	XCROP_CUBE, XSPECT, cw_plotz [2], cw_pzoom [2]
 Common      : WSTORE
               
 Restrictions: None.
               
 Side effects: None.
               
 Category    : Utility, Graphics
               
 Prev. Hist. : None.

 Written     : Stein Vidar Hagfors Haugan, May 1994
               
 Modified    : 

 Version     : 1, May 1994


PRIME $SSW/gen/idl_libs/astron/jhuapl/prime.pro
[Previous] [Next]
 NAME:
     PRIME
 PURPOSE:
     Return an array with the specified number of prime numbers.
 EXPLANATATION:
     This procedure is similar to PRIMES in the standard IDL distribution,
     but stores results in a common block, and so is much faster 

 CALLING SEQUENCE:
       p = prime(n)
 INPUTS:
       n = desired number of primes, scalar positive integer
 OUTPUTS:
       p = resulting array of primes, vector of positive integers
 CALLED BY:
	FACTOR
 COMMON BLOCKS:
       prime_com
 NOTES:
       Note: Primes that have been found in previous calls are
         remembered and are not regenerated.
 MODIFICATION HISTORY:
       R. Sterner  17 Oct, 1985.
       R. Sterner,  5 Feb, 1993 --- fixed a bug that missed a few primes.
       Converted to IDL V5          March 1999

 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.


PRINT_CFIT $SSW/gen/idl/fitting/print_cfit.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : PRINT_CFIT
               
 Purpose     : Print some contents of a Component Fit structure
               
 Explanation : This routine prints the contents of a component fit structure,
               either in the form of a list of components' parameters and
               their values, or in the form of a series of IDL statements
               necessary to build up the structure inside a program.
               
 Use         : PRINT_CFIT,CFIT
    
 Inputs      : CFIT : Component Fit structure
               
 Opt. Inputs : None.
               
 Outputs     : To screen
               
 Opt. Outputs: None.
               
 Keywords    : INITIAL : Set this to use the initial values instead of
                         current values.

               PROGRAM : Set this keyword to produce output in the form of
                         IDL statements building a similar CFIT structure.

 Calls       : ***
	PRINT_CFIT_COMPTEXT, TRIM
 Common      : None.
               
 Restrictions: None.
               
 Side effects: None.
               
 Category    : Analysis
               
 Prev. Hist. : None.

 Written     : S.V.H.Haugan, UiO, 21 January 1997
               
 Modified    : Version 2, SVHH, 5 February 1997
                       Made values & trans_b parameters DOUBLES before
                       trim()'ing them, to have more significant figures.
                       
 Version     : 2, 5 February 1997


PRINT_CONTENT $SSW/gen/idl/http/print_content.pro
[Previous] [Next]
 Project     : HESSI

 Name        : PRINT_CONTENT

 Purpose     : print HTML content header

 Category    : HTML

 Syntax      : IDL> print_content,type

 Inputs      : LUN = logical unit number to print to [def = STDIO]

 Opt.Inputs  : TYPE = content type (e.g. text/html [def] or image/gif, etc)

 Outputs     : FILE or STDIO

 Keywords    : None

 CALLS: ***
	IS_BLANK, is_number [1], is_number [2]
 CALLED BY:
	db_gbo, ihy_db
 History     : 20-May-2003,  D.M. Zarro (EER/GSFC)

 Contact     : DZARRO@SOLAR.STANFORD.EDU


PRINT_GEV $SSW/gen/idl/solar/print_gev.pro
[Previous] [Next]
 Project     : SOHO - CDS

 Name        : PRINT_GEV

 Purpose     : Wrapper around GET_GEV

 Category    : planning

 Explanation : Get GOES Event listing

 Syntax      : IDL>print_gev,tstart,tend

 Inputs      : TSTART = start time 

 Opt. Inputs : TEND = end time

 Outputs     : GOES event listing in HTML table format

 Opt. Outputs: None

 Keywords    : ERR = error messages
               PREVIOUS = previous settings
               FILE = previous settings are in a file
               NO_SELECT = disable selections
               OUTPUT = output file for listing

 CALLS: ***
	BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], DATATYPE [1], DATATYPE [2]
	DATATYPE [3], ESPAWN, EXIST, GET_GEV, NUM2STR, RD_ASCII [1], RD_ASCII [2], STR2ARR [1]
	STR2ARR [2], TEST_DIR, TRIM2, break_file [4], curdir [1], curdir [2], gt_day [1]
	gt_day [2], gt_time [1], gt_time [2], is_number [1], is_number [2], where_arr [1]
	where_arr [2]
 History     : Version 1,  20-June-1999,  D.M. Zarro.  Written

 Contact     : DZARRO@SOLAR.STANFORD.EDU


PRINT_HTML $SSW/gen/idl/http/print_html.pro
[Previous] [Next]
 Project     : HESSI

 Name        : PRINT_HTML

 Purpose     : print string in basic HTML format

 Category    : HTML

 Syntax      : IDL> print_html,message

 Inputs      : MESSAGE = any string

 Outputs     : FILE or STDIO

 Keywords    : FILE = optional output file

 CALLS: ***
	CLOSE_LUN, EXIST, IS_STRING, is_number [1], is_number [2]
 CALLED BY:
	db_gbo, ihy_db
 History     : 11-Aug-1999,  D.M. Zarro.  Written

 Contact     : DZARRO@SOLAR.STANFORD.EDU


PRINT_NAR $SSW/gen/idl/solar/print_nar.pro
[Previous] [Next]
 Project     : SOHO - CDS

 Name        : PRINT_NAR

 Purpose     : Wrapper around GET_NAR

 Category    : planning

 Explanation : Print NOAA AR listing

 Syntax      : IDL>print_nar,tstart,tend

 Inputs      : TSTART = start time 

 Opt. Inputs : TEND = end time

 Outputs     : NOAA listing in HTML table format

 Opt. Outputs: None

 Keywords    : ERR = error messages
               PREVIOUS = previous settings string
               NO_SELECT = set to inhibit selections
               FILE = previous settings are in a file
               OUTPUT = output file for listing

 CALLS: ***
	BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], DATATYPE [1], DATATYPE [2]
	DATATYPE [3], ESPAWN, EXIST, GET_NAR, NUM2STR, RD_ASCII [1], RD_ASCII [2], STR2ARR [1]
	STR2ARR [2], TEST_DIR, TRIM2, break_file [4], curdir [1], curdir [2], gt_day [1]
	gt_day [2], is_number [1], is_number [2], where_arr [1], where_arr [2]
 History     : Version 1,  20-June-1999,  D.M. Zarro.  Written

 Contact     : DZARRO@SOLAR.STANFORD.EDU


PRINT_STR $SSW/gen/idl/string/print_str.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : PRINT_STR
               
 Purpose     : Divide and print a string.  Optionally write ascii file.
               
 Explanation : Divides a string into an array (using supplied delimiter)
               and prints one element per line.  Most obvious use is to 
               print !path. If input is already a string vector then just
               print the elements one per line.
               
 Use         : IDL> print_str, string [, [start,stop], delim=delim, 
                                         hard=hard, quiet=quiet
                                         file=file, keep=keep]
    
 Inputs      : string - the string to be split and printed
               
 Opt. Inputs : [start,stop] - array giving start and stop items to list
               
 Outputs     : Results are printed to screen and/or written to file
               
 Opt. Outputs: None
               
 Keywords    : DELIM  - a substring to delimit the string items, default is ':'
               HARD   - produce a hard copy.
               QUIET  - no output to screen.
               FILE   - specify output file, if null on input then name of
                       file created is returned in this - must use /keep if
                       this is null on entry. 
               KEEP   - do not delete disk file.
               NUMBER - give an index number on the listing

 Calls       : ***
	Bell, CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], DATATYPE [1], DATATYPE [2]
	DATATYPE [3], DELETE_FILE [1], DELETE_FILE [2], FILEPATH, LAST_ITEM, STR2ARR [1]
	STR2ARR [2], concat_dir [4]
 CALLED BY:
	ANYTIM2CAL, CAT_DURATION, CAT_FITS, CDS_AR_OBS, CDS_SATURATE, CDS_WAVE_CAT
	CDS_WAVE_FILES, CHIANTI_NE, CHIANTI_TE, GT_WLIMITS, LIST_FITS, LIST_TM, PATH_DIR
	SHOW_CDHS, SHOW_FITS_HDR, SHOW_SLIT6, SHOW_SYNOPTIC, STUDY_BRIEF, TFTD
	WHAT_CDHS_STUDY, WHAT_USES
 Common      : None
               
 Restrictions: None
               
 Side effects: None
               
 Category    : Util, string
               
 Prev. Hist. : None

 Written     : C D Pike, RAL, 20-July-94
               
 Modified    : Add print delay as fudge.  CDP, 9-Dec-94
               Handle vector input.  CDP, 23-Dec-94

               Added hardcopy keyword.  CDP, 20-Feb-95
               Added QUIET, FILE and KEEP keywords.  CDP, 9-Jun-95
               Added NUMBER keyword.  CDP, 29-Jun-95
               Added switch to landscape printing if needed.  CDP, 19-Jul-95
               Added message if output KEEPed.  CDP, 27-Jul-95
               Added [start,stop] parameter.    CDP, 26-Feb-96

 Version     : Version 8, 26-Feb-96


PRINT_STRUCT $SSW/gen/idl_libs/astron/structure/print_struct.pro
[Previous] [Next]
 NAME:
       PRINT_STRUCT

 PURPOSE:
       Print the tag values of an array of structures in nice column format.
 EXPLANATION:
       The tag names are displayed in a header line.

 CALLING SEQUENCE:
       print_struct, structure, Tags_to_print [ , title, string_matrix 
                FILE=, LUN_OUT=, TNUMS= , TRANGE= , FRANGE=, WHICH=
                FORM_FLOAT =, MAX_ELEMENTS
 INPUTS:
       structure = array of structured variables

       Tags_to_print = string array specifying the names of tags to print.
                       Default is to print all tags which are not arrays.
 OPTIONAL INPUT KEYWORDS:
       FILE = string, optional file name to which output will then be written.
       LUN_OUT = Logical unit number for output to an open file,
               default is to print to standard output.
       TNUMS = tag numbers to print (alternative to specifying tag names).
       TRANGE = [beg,end] tag number range to print.
       FRANGE = same as TRANGE.
       WHICH = optional array of subscripts to select
               which structure elements to print.
       FORM_FLOAT = string array of three elements specifying
               floating point format, ex: FORM=['f','9','2'] means "(F9.2)",
               (default float format is G12.4).
       MAX_ELEMENTS = positive integer, print only tags that have less than
                       this number of elements (default is no screening).
       /NO_TITLE - If set, then the header line of tag names is not printed
       /STRINGS : instead of printing, return the array of strings in
               fourth argument of procedure: string_matrix.
 OUTPUTS:
       title = optional string, list of tags printed/processed.
       string_matrix = optional output of string matrix of tag values,
                       instead of printing to terminal or file, if /STRINGS.
 CALLS: ***
	N_STRUCT, UNIQ [1], UNIQ [2], UNIQ [3]
 CALLED BY:
	VSO_GET
 PROCEDURE:
       Check the types and lengths of fields to decide formats,
       then loop and form text string from requested fields, then print.
 HISTORY:
       Written: Frank Varosi NASA/GSFC 1991.
       F.V.1993, fixed up the print formats.
       F.V.1994, added more keyword options.
       F.V.1997, added WHICH and MAX_ELEM keyword options.
       WBL 1997, Use UNIQ() rather than UNIQUE function
       Remove call to N_STRUCT()   W. Landsman  March 2004
       Avoid overflow with more than 10000 elements  W. Landsamn Nov 2005


PRINTMSG $SSW/gen/idl/help/printmsg.pro
[Previous] [Next]
 Name:

      PRINTMSG

 Purpose:

      Print an error/warning/informational message

 Category:

      Error handling

 Calling sequence:

      PRINTMSG, msg , [ /WARNING , /INFORMATIONAL ] 

 Input:

      msg : error/warning/informational message

 Keyword parameters:

      WARNING = set message prefix to '%W> '
      INFORMATIONAL = set message prefix to '%I> '
      NONAME = suppresses name of routine issuing the message
      NOPREFIX = suppresses prefix

 Outputs:

      Printout

 Common blocks:

      None

 Calls: ***
	STR_SEP
 Side effects:

      Same as MESSAGE

 Modification history:

      V. Andretta,    1/Nov/1999 - Written.
      V. Andretta,   18/Nov/1999 - Added NONAME and NOPREFIX keywords

 Contact:

      andretta@na.astro.it


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

 Name        :	PRIV_ZDBASE()

 Purpose     :	Checks if current database has write access.

 Explanation :	This routine checks to see if one has write access into the CDS
		Definition, Daily, Catalog, Calibration and/or Sealed
		databases.

 Use         :	Result = PRIV_ZDBASE(/keywords)

		IF PRIV_ZDBASE(/keywords)

 Inputs      :	None.  However, at least one of the keywords /DEFINITION,
		/DAILY, /CATALOG, /CPT, /CALIBRATION or /SEALED must be passed
		to the routine.

 Opt. Inputs :	None.

 Outputs     :	The result of the function is 1 if the user has privilege to
		write into the requested databases, or 0 otherwise.

 Opt. Outputs: None.

 Keywords    : DEFINITION = If set, then check to see if the user has
			     privilege to write into the study/raster
			     definition databases.

		DAILY	   = If set, then check to see if the user has
			     privilege to write into the daily plan databases.

		CATALOG	   = If set, then check to see if the user has
			     privilege to write into the catalog databases.

		CPT	   = If set, then check to see if the user has
			     privilege to write into the databases used by CPT.

		CALIBRATION= If set, then check to see if the user has
			     privilege to write into the calibration databases.
			     Normally, write access to these databases is
			     restricted.

		SEALED	   = If set, then check to see if the user has
			     privilege to write into the "sealed" databases.
			     Normally, write access to these databases is
			     restricted.

		See CDS software note #29 for a description of the above
		database categories.  At least one of the above keywords must
		be set.  If more than one is set, then the user must have
		privilege to write into all the requested databases for a 1 to
		be returned.

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

				ERRMSG = ''
				Result = PRIV_ZDBASE( ERRMSG=ERRMSG, ... )
				IF ERRMSG NE '' THEN ...

		QUIET	   = If set, then any error messages are not printed to
			     the screen.  Using the ERRMSG keyword above
			     automatically implies /QUIET.

 Calls       : ***
	FIND_WITH_DEF [1], FIND_WITH_DEF [2], FIND_WITH_DEF [3], TEST_OPEN
 CALLED BY:
	ADD_CDS_POINT, ADD_EFFICIENCY, ADD_EFF_AREA, ADD_MIRSHIFT, ADD_TILTCAL
	ADD_WAVECAL, ADD_WAVE_EFF, FIX_MAIN_TIMES, FIX_OBS_SEQ, FLUSH_CATALOG
	FREEZE_RAS_DUR, IMPORT_PLAN, IMPORT_STUDY, MK_RASTER, MK_STUDY, PRED_PROG_NUM
	PURGE_CDHSSTATE, XCAT
 Common      :	None.

 Restrictions:	None.

 Side effects:	The software works by testing against three files,
		study.dbf for the Definition databases, sci_plan.dbf for the
		Daily databases, main.dbf for the Catalog databases,
		comm_prep.dbf for the CPT databases, nis_wave.dbf for the
		Calibration databases, and cdhsstate.dbf for the Sealed
		databases.  The assumption is made that if one can open those
		files for write, then one has write privilege for that entire
		category of databases.

 Category    :	Planning, Database.

 Prev. Hist. :	Based on WR_DBASE by Dominic Zarro (ARC), 1 May 1995

 Written     :	Version 1, William Thompson, GSFC, 17 May 1995
		Version 2, William Thompson, GSFC, 16 October 1995
			Added keyword /CATALOG
		Version 3, William Thompson, GSFC, 18 October 1995
			Added keyword /CPT
		Version 4, William Thompson, GSFC, 11 January 1996
			Check cdhsstate instead of obsolete state database.
		Version 5, William Thompson, GSFC, 31 January 1996
			Fixed typo introduced in version 3.
		Version 6, William Thompson, GSFC, 7 August 1996
			Don't call getenv--let find_with_def handle it.
		Version 7, William Thompson, GSFC, 16 September 1996
			Added keyword CALIBRATION

 Version     :	Version 7, 16 September 1996


PROB_KS $SSW/gen/idl_libs/astron/math/prob_ks.pro
[Previous] [Next]
 NAME:
       PROB_KS
 PURPOSE:
       Return the significance of the Kolmogoroff-Smirnov statistic
 EXPLANATION:
       Returns the significance level of an observed value of the 
       Kolmogorov-Smirnov statistic D for an effective number of data points
       N_eff.   Called by KSONE and KSTWO

 CALLING SEQUENCE:
       prob_ks, D, N_eff, probks

 INPUT PARAMATERS:
       D -  Kolmogorov statistic, floating scalar, always non-negative
       N_eff - Effective number of data points, scalar.   For a 2 sided test 
               this is given by (N1*N2)/(N1+N2) where N1 and N2 are the number 
               of points in each data set.

 OUTPUT PARAMETERS:
       probks - floating scalar between 0 and 1 giving the significance level of
               the K-S statistic.   Small values of PROB suggest that the 
               distribution being tested are not the same

 REVISION HISTORY:
       Written     W. Landsman                August, 1992
       Corrected typo (termbv for termbf)    H. Ebeling/W.Landsman  March 1996
       Probably did not affect numeric result, but iteration went longer
       than necessary
       Converted to IDL V5.0   W. Landsman   September 1997
 CALLED BY
	KSONE, KSTWO


PROB_KUIPER $SSW/gen/idl_libs/astron/math/prob_kuiper.pro
[Previous] [Next]
 NAME:
       PROB_KUIPER
 PURPOSE:
       Return the significance of the Kuiper statistic
 EXPLANATION:
       Returns the significance level of an observed value of the
       Kuiper statistic D for an effective number of data points
       N_eff.   Called by KUIPERONE

 CALLING SEQUENCE:
       prob_kuiper, D, N_eff, probks

 INPUT PARAMATERS:
       D -  Kuiper statistic, floating scalar, always non-negative
       N_eff - Effective number of data points, scalar.   For a 2 sided test
               this is given by (N1*N2)/(N1+N2) where N1 and N2 are the number
               of points in each data set.

 OUTPUT PARAMETERS:
       probks - floating scalar between 0 and 1 giving the significance level of
               the Kuiper statistic.   Small values of PROB suggest that the
               distribution being tested are not the same

 REVISION HISTORY:
       Written     W. Landsman                August, 1992
       Corrected typo (termbv for termbf)    H. Ebeling/W.Landsman  March 1996
       Probably did not affect numeric result, but iteration went longer
       than necessary
       Converted to IDL V5.0   W. Landsman   September 1997
       Adapted from PROB_KS    J. Ballet     July 2003
 CALLED BY
	KUIPERONE, KUIPERTWO


PRODUCT [1] $SSW/gen/idl/util/product.pro
[Previous] [Next]
 NAME:
       PRODUCT()
 PURPOSE:
       Calculate the product of all the elements of an array
 EXPLANATION:
       This routine serves as an equivalent to the intrinsic PRODUCT() function
       introduced in V5.6, except that the CUMULATIVE keyword is not available.

       PRODUCT() is the multiplicative equivalent of TOTAL().   
 CALLING SEQUENCE:
       Result = PRODUCT(ARRAY, [/NaN] )
 INPUT PARAMETERS:
       ARRAY   = Array of elements to multiply together.  For instance, ARRAY
                 could contain the dimensions of another array--then
                 PRODUCT(ARRAY) would be the total number of elements of that
                 other array.
 OUTPUT:
       The result of the function is the total product of all the elements of
       ARRAY.   If the input is double precision or 64bit integer, then the 
       result will be the same; otherwise the result will be floating point.
 OPTIONAL OUTPUT KEYWORD:
       /NAN - If set, then PRODUCT() will check for the presence of IEEE
               floating point NaN values in the input array.
 RESTRICTIONS:
       ARRAY must be a numerical type.

 PROCEDURE:
      Vector multiplication in groups of powers of two make this operation
      faster than a simple FOR loop.  The number of actual multiplications is 
      still N_ELEMENTS(ARRAY).  Double precision should be used for the highest
      accuracy when multiplying many numbers.
 MODIFICATION HISTORY:
       William Thompson, Feb. 1992.
       Converted to IDL V5.0   W. Landsman   September 1997
       Use vector algorithm from C. Markwardt's CMPRODUCT W. Landsman Nov. 2001   
       Added /NAN keyword, documentation about V5.6 emulation W.L Nov. 2002       


PRODUCT [2] $SSW/gen/idl_libs/astron/misc/product.pro
[Previous] [Next]
 NAME:
       PRODUCT()
 PURPOSE:
       Calculate the product of all the elements of an array
 EXPLANATION:
       This routine serves as an equivalent to the intrinsic PRODUCT() function
       introduced in V5.6, except that the CUMULATIVE keyword is not available.

       PRODUCT() is the multiplicative equivalent of TOTAL().   
 CALLING SEQUENCE:
       Result = PRODUCT(ARRAY, [/NaN] )
 INPUT PARAMETERS:
       ARRAY   = Array of elements to multiply together.  For instance, ARRAY
                 could contain the dimensions of another array--then
                 PRODUCT(ARRAY) would be the total number of elements of that
                 other array.
 OUTPUT:
       The result of the function is the total product of all the elements of
       ARRAY.   If the input is double precision or 64bit integer, then the 
       result will be the same; otherwise the result will be floating point.
 OPTIONAL OUTPUT KEYWORD:
       /NAN - If set, then PRODUCT() will check for the presence of IEEE
               floating point NaN values in the input array.
 RESTRICTIONS:
       ARRAY must be a numerical type.

 PROCEDURE:
      Vector multiplication in groups of powers of two make this operation
      faster than a simple FOR loop.  The number of actual multiplications is 
      still N_ELEMENTS(ARRAY).  Double precision should be used for the highest
      accuracy when multiplying many numbers.
 MODIFICATION HISTORY:
       William Thompson, Feb. 1992.
       Converted to IDL V5.0   W. Landsman   September 1997
       Use vector algorithm from C. Markwardt's CMPRODUCT W. Landsman Nov. 2001   
       Added /NAN keyword, documentation about V5.6 emulation W.L Nov. 2002       


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

 Name        : 
	PROF()
 Purpose     : 
	Returns profiles from arrays along the path XVAL, YVAL.
 Explanation : 
	After the arrays XVAL and YVAL are converted, the routine INTERP2 is 
	called to do the interpolation.
 Use         : 
	P = PROF( ARRAY, XVAL, YVAL )
 Inputs      : 
	ARRAY	  = Image to take profile from.
	XVAL,YVAL = The X,Y coordinates of points defining the path.
 Opt. Inputs : 
	None.
 Outputs     : 
	Function value	= Values of ARRAY along profile.
	XVAL,YVAL	= The X,Y coordinates of the resulting path.  The
			  original points are converted to a set with points
			  set one pixel apart along the path.
 Opt. Outputs: 
	None.
 Keywords    : 
	MISSING  = Value flagging missing pixels.
 Calls       : ***
	GET_IM_KEYWORD, INTERP2
 CALLED BY:
	TVPROF
 Common      : 
	None.
 Restrictions: 
	ARRAY must be two-dimensional.

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

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

 Side effects: 
	The arrays XVAL and YVAL are changed.
 Category    : 
	Utilities, Image_display.
 Prev. Hist. : 
	W.T.T., Oct. 1987.
	W.T.T., Jan. 1991.  Changed FLAG to keyword BADPIXEL.
	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     : 
	Version 1, 12 May 1993.


PROFIL $SSW/gen/idl/image/profil.pro
[Previous] [Next]
 NAME:
	PROFIL

 PURPOSE:
	Extract a profile from an image.
	Remplace PROFILE

 CATEGORY:
	Image processing.

 CALLING SEQUENCE:
	Result = PROFIL(Image, XX, YY)

 INPUTS:
	Image:	The data array representing the image.  This array can be
		of any type except complex.

 KEYWORD PARAMETERS:
      XSTART:	The starting X location of the lower-left corner of Image.
		If this keyword is not specified, 0 is assumed.

      YSTART:	The starting Y location of the lower-left corner of Image.
		If this keyword is not specified, 0 is assumed.

     NONMARK:	Set this keyword to inhibit marking the image with the 
		profile line.

 OUTPUTS:
	PROFIL returns a floating-point vector containing the values of
	the image along the profile line marked by the user.

 OPTIONAL OUTPUTS:
	XX:	After picking the end points, XX contains the X coordinates
		of the points along the selected profile.

	YY:	After picking the end points, YY contains the Y coordinates
		of the points along the selected profile.

 CALLED BY:
	NRH2_PROJECTION, NRH_BIASREG, NRH_IMAGE
 COMMON BLOCKS:
	None.

 SIDE EFFECTS:
	Cursor on image display is enabled.

 RESTRICTIONS:
	None.

 PROCEDURE:
	Allow the operator to mark two points on the
	image display with the joystick and draw the line.  
	Extract and return the points along the line.  Optionally
	return the X and Y values of each extracted point.

 EXAMPLE:
	Display an image, select a profile and plot that profile in a new
	window.  Create and display an image by entering:

		A = BYTSCL(DIST(256))
		TV, A

	Extract a profile from the image.  Enter the following command and
	mark two points on the image with the mouse:

		R = PROFIL(A)

	Create a new plotting window and plot the profile by entering:

		WINDOW, /FREE
		PLOT, R

	An interactive version of this routine is available with the User
	Library procedure PROFILES.

 MODIFICATION HISTORY:
		Modification of PROFILE.PRO 
	J Bonmartin 23/01/98 compute on floating value
			     draw the line selected.
                  


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

 PURPOSE:
	Interactively draw row or column profiles of an image in a separate
	window.

 CATEGORY:
	Image analysis.

 CALLING SEQUENCE:
	PROFILES, Image [, SX = sx, SY = sy]

 INPUTS:
	Image:	The variable that represents the image displayed in current 
		window.  This data need not be scaled into bytes.
		The profile graphs are made from this array.

 KEYWORD PARAMETERS:
	SX:	Starting X position of the image in the window.  If this 
		keyword is omitted, 0 is assumed.

	SY:	Starting Y position of the image in the window.  If this
		keyword is omitted, 0 is assumed.

	WSIZE:	The size of the PROFILES window as a fraction or multiple 
		of 640 by 512.

	ORDER:	Set this keyword param to 1 for images written top down or
		0 for bottom up.  Default is the current value of !ORDER.

	x0:	Absolute X coordinate of the lower left corner of the
		image being displayed.  If the image was extracted from some 
		original image, x0 can be passed and the pixel location
		will also display the absolute pixel coordinates.
	y0:	Absolute Y coordinate (see x0)
	factor: The rescale factor used on the original image.  For example,
		if a 1024x1024 image was rebinned to 512x512 before display,
		then FACTOR would be 2, and the absolute original pixel 
		location will be displayed
	xfactor:If only the X dimension was rescaled, then use "xfactor".
		(see "factor" for more details)
	yfactor:Same as "xfactor".
 OUTPUTS:
	No explicit outputs.

 CALLED BY:
	CW_SCANSOURCE, MK_RASTER, NRH_IMAGE, STEPPER [3], STEPPER [4], hsi_buildprofile
	hsi_buildprofile, hsi_profilebuild, hsi_profilebuild, xdisp_fits
	xdisp_trace [1], xdisp_trace2, xdisp_trace3
 COMMON BLOCKS:
	None.

 SIDE EFFECTS:
	A new window is created and used for the profiles.  When done,
	the new window is deleted.

 RESTRICTIONS:
	None.

 PROCEDURE:
	A new window is created and the mouse location in the original
	window is used to plot profiles in the new window.  Pressing the
	left mouse button toggles between row and column profiles.
	The right mouse button exits.

 EXAMPLE:
	Create and display an image and use the PROFILES routine on it.
	Create and display the image by entering:

		A = BYTSCL(DIST(256))
		TV, A

	Run the PROFILES routine by entering:

		PROFILES, A

	The PROFILES window should appear.  Move the cursor over the original
	image to see the profile at the cursor position.  Press the left mouse
	button to toggle between row and column profiles.  Press the right
	mouse button (with the cursor over the original image) to exit the
	routine.

 MODIFICATION HISTORY:
	DMS, Nov, 1988.
	30-Oct-96 (MDM) - Added printing the data value at the cross hair
			- Added x0, y0, xfactor, yfactor options


PROFILES2 $SSW/gen/idl/genutil/profiles2.pro
[Previous] [Next]
 NAME:
	PROFILES2

 PURPOSE:
	Interactively draw row or column profiles of an image in a separate
	window.  Based on RSI's profiles.pro which works only in simple cases.

	This version works for:
	1.  Draw widget as well as simple graphics window
	2.  Scaled pixel size ((i.e. one unit on x or y axis does not correspond to one data pixel)
	3.  Zoomed in images with partial pixels on the edges
	4.  Drawing profiles of any angle through image
	5.  Showing profiles of the average over row or columns
	6.  Spectrogram profiles where x axis is ut, and y axis may be log

 CATEGORY:
	Image analysis.

 CALLING SEQUENCE:
	PROFILES, Image [, window_id=window_id, $
	xaxis=xaxis, yaxis=yaxis, utbase=utbase, angled=angled, averaged=averaged ]

 INPUTS:
	Image:	2D array that contains the image displayed in current
		window.  This data need not be scaled into bytes.
		The profile graphs are made from this array.  Even if displayed image
		is zoomed in, this variable shoudl contain full array.

 KEYWORD PARAMETERS:
	window_id:  Window id or draw widget id of window containing image to profile.
		 if not passed, defaults to !d.window.  If passed, and is a draw widget id, then
		instead of using cursor, an event handler is used (on unix systems using cursor
		in a draw window causes some weird behavior)
	xaxis - edges of x axis bins of full image (non-zoomed) in data coordinates
	yaxis - edges of y axis bins of full image (non-zoomed) in data coordinates
	utbase - if x axis is time (for spectrograms), base time that xaxis values are relative to
	angled - if set, profiles are taken at angles through image
	averaged - if set, average of rows or columns (zoomed in parts) are profiled. Note - can't
		use averaged with angled.
	wsize - The size of the PROFILES window as a fraction or multiple
		of 640 by 512 (default is .75)
	exactlabel - if set, then x, y values in label in profile are exact, not center of bin

 OUTPUTS:
	No explicit outputs.

 CALLS: ***
	AVERAGE, CHECKVAR [1], CRANGE, EXIST, FIND_EDGE_INTERCEPT, LAST_ITEM, MINMAX [1]
	MINMAX [2], PROFILES2_EVENT, PROFILES_FOCUS_WIN, TRIM, UTPLOT [1], UTPLOT [2]
	UTPLOT [3], UTPLOT [4], UTPLOT [5], UTPLOT [6], XALIVE, anytim [1], anytim [2]
	anytim [3], anytim [4], anytim [5], checkvar [2], find_pixel_intersects
	get_edge_products
 CALLED BY:
	plotman
 COMMON BLOCKS:
	None.

 SIDE EFFECTS:
	A new window is created and used for the profiles.  When done,
	the new window is deleted.

 RESTRICTIONS:
	None.

 PROCEDURE:
	A new window is created and the mouse location in the original
	window is used to plot profiles in the new window.  Pressing the
	left mouse button toggles between row and column profiles.
	The right mouse button exits.  If doing angled profiles, then
	pressing the left mouse button defines a new starting point for
	the line.

 EXAMPLE:

	If image or spectrogram is shown in a plotman window:
		plotman_obj -> profiles

	Simple example with simple window:
	Create and display the image by entering:

		A = BYTSCL(DIST(256))
		plot_image, A

	Run the PROFILES routine by entering:

		PROFILES2, A

	The PROFILES window should appear.  Move the cursor over the original
	image to see the profile at the cursor position.  Press the left mouse
	button to toggle between row and column profiles.  Press the right
	mouse button (with the cursor over the original image) to exit the
	routine.

   Can also use with a draw widget.

 MODIFICATION HISTORY:
	DMS, Nov, 1988.
   Profiles2 is based on RSI's Profile.  Extensively rewritten in July 2000 by
	Kim Tolbert to handle additional cases mentioned above.  However the calling
	arguments were needlessly complicated.  Major rewrite again in March 2005 to
	simplify arguments and enable averaging and spectrogram profiles.

	30-Oct-96 (MDM) - Added printing the data value at the cross hair
			- Added x0, y0, xfactor, yfactor options
	19-Jul-2000 - Kim Tolbert, extensively rewritten to be more general.  Added lots
		of keywords to handle cases where zoomed in image doesn't show whole data
		pixels, data pixels are scaled, and input window is a draw widget.
	17-Aug-2000 - Kim, added check for if user closes profiles window directly instead of
		clicking right mouse button.
   13-Jan-2001 - Kim, added exactlabel keyword (and changed to default to printing
			x,y position at center of pixel instead of exactly where cursor is.
		Made crosshairs a little smaller
		Added 1/2 pixel to xdata_fix,ydata_fix and vecx,vecy so that we'll plot and label points
			at the centers of pixels instead of leading edge.
		Set position of profile window at 10,10 (which will be different for Win and X, but OK).
	18-Mar-2002 - Kim, added angled option
	21-Mar-2005 - Kim, added averaged option, added ability to profile from spectrograms.  This
		required handling non-equal bins, so this was a major rewrite, and in the process,
		I realized that everything was much simpler if I just pass in the x and y axis values,
		which simplified the calling arguments significantly (previously was passing details
		about where origin was, where plotted origin was, etc.).  If anyone was using the old
		version, I apologize, but this is much simpler and more versatile.
	22-Apr-2005 - Kim.  changed average keyword to averaged so won't conflict with function
	25-Apr-2005 - Kim.  Wasn't taking care of reversed y axis.  Fixed.
	22-Jun-2005 - Kim.  Use double when converting xy position to data coords in case x is time.
		Also, if x is time, print time in label.
		Also, move label down to y=0. (from .02) so it's not in the way of 'distance...' label
	25-May-2006 - Kim.  Added another check for wopen(new_w) in case user closed window directly.


PROGMETER $SSW/gen/idl/widgets/progmeter.pro
[Previous] [Next]
 NAME:
     PROGMETER
 PURPOSE:
     A widget that displays a progress meter with a color bar
     that grows horizontally to indicate what percentage of a task has
     been completed.  The percentage is also written as text.  The
     window title can be set, and an optional cancel button with
     settable text may be shown.
 CATEGORY:
     OVRO SPAN UTILITY
 CALLING SEQUENCE:
     id     = progmeter(/INIT,[GROUP=group][,LABEL=label]$
                         [,BUTTONTEXT=buttontext])
     status = progmeter(id,value)
     status = progmeter(id,/DESTROY)
 INPUTS:
     id	the widget ID returned by a previous, initializing
                  call to PROGMETER (that used the /INIT switch).
                  This input is ignored if INIT keyword is set.
     value	the new value to set the widget to, ranging from
                  0 to 1 (0=0% complete, 1=100% complete).
                  This input is ignored if INIT keyword is set.
 OPTIONAL (KEYWORD) INPUT PARAMETERS:
     init      a keyword switch that governs which of two calling
                  sequences is being used.  If set, a new widget is
                  created.  If not set, an existing widget is to be
                  updated.
     destroy	a keyword switch that destroys the widget created by
                  a previous call to PROGMETER (that used the /INIT switch)
     group     the top base id of the calling program, so that the widget
                  will be destroyed if the calling program exits.
                  This input is ignored if INIT keyword is not set.
     label     an optional title for the progress meter window.  If
                  omitted, the title "Percent Complete" is used.
                  This input is ignored if INIT keyword is not set.
     buttontext
               an optional text for a button, such as a cancel button
                  to interrupt the process whose progress is being shown.
                  If omitted, no button is present.  If set and the user
                  clicks on the button an event is generated.  To detect
                  the event, call WIDGET_EVENT as discussed below.
                  This input is ignored if INIT keyword is not set.
     colorbar  an optional color for bar other than white
 ROUTINES CALLED:
 OUTPUTS:
     id	the widget id of the compound widget (only when INIT
                  keyword is set).
     status	the status of the cancel button (only when INIT keyword
                  is not set).  If the cancel button has been pressed,
                  status='Cancel' and if not an empty string ('') is returned.
                  If an error in calling sequence occurs (ID or VALUE
                  is not supplied) then status='Cancel' also.  NB: If
                  the widget is initialize without a button, status
                  will always be an empty string ('')
 COMMENTS:
     To use the routine, call it with the /INIT switch to create the
     widget, then call it repeatedly without the /INIT switch to update
     it.  When done with the widget, it should be destroyed.  Here is
     an example:

          id = progmeter(/INIT,label='Progress Meter',button='Abort')
          val = 0
          for i = 0, n do begin
             <Do something useful here>
             val = i/(1.0*n)      ; Fraction of loop completed
             if (progmeter(id,val) eq 'Cancel') then goto,escape
          endfor
          escape: status = progmeter(id,/DESTROY)

 CALLS: ***
	IS_STRING, MK_DFONT, OS_FAMILY, PROGMETER_GETVALUE, PROGMETER_SETVALUE, XACK, XALIVE
	XKILL, XREALIZE, XSHOW
 CALLED BY:
	ANALYZE [1], APCALCHEK, APPLY_CAL_ALL, BASFIT, CHECK_DIST, CHKARG, CONCAT_OVSA_FILE
	CREATE_INDEX, CTRCALCHEK, GCALCHEK, IDX_ENCODE, INSERT_REC, PCALCHEK, PLOT_GCPARM
	PNTCHEK, RDWRT_BUFF, ROT_SUBIMAGE, SOLAID, SPLIT_OVSA_FILE, SURVANAL, TOP20, TPANALYZE
	UPDATE_CAMPAIGN, W_HISTOGRAM, pcal, psk_correlate
 SIDE EFFECTS:
 RESTRICTIONS:
     The progress meter widget must be explicitly destroyed.
 MODIFICATION HISTORY:
     Written 28-Feb-1997 by Dale E. Gary


PROGRESS $SSW/gen/idl/util/progress.pro
[Previous] [Next]
NAME:
     PROGRESS
PURPOSE:
     Prints a progress summary in percent done and time remaining as
     a process runs.  Call this routine multiple times from the
     running process while updating the percent done parameter.
CATEGORY:
CALLING SEQUENCE:
     progress,percent
INPUTS:
     percent = percent finished (in range 0 to 100, unless minval and
               maxval are set)
OPTIONAL INPUT PARAMETERS:
KEYWORD PARAMETERS
     /reset = this must be set for the first call to set up variables.
     /last = the process is done and this is the last call.  Optional
             for the last call.  Makes sure the printout goes all the
             way to 100%, does a final carriage return, and resets
             some variables.
     label = string to print at the front of the progress line.  Only
             used on the first call when /reset is set.
     bigstep = percentage multiple to print the percent done as a
               number (def = 25).  Only used on the first call when
               /reset is set.  Integer.
     smallstep = percentage multiple to print a dot (def = 5).  Only
                 used on the first call when /reset is set.  Integer.
     minval = percent value at process start (default = 0.0).  Only
                 used on the first call when /reset is set.  Integer.
     maxval = percent value at process end (default = 100.0).  Only
                 used on the first call when /reset is set.  Integer.
     /noeta = Do not print the estimated time to completion.  This
              feature depends on your terminal accepting 8b as a
              backspace character. If this does not work, the
              formatting will be messed up.  So, if your formatting
              is messed up, set this keyword to turn the feature off.
     frequency = If set, update the estimated time to completion
                 if at least 'frequency' seconds have passed since
                 the last update.  The time is always printed when a
                 dot or number is printed, as well. If set to 2, for
                 example, update approximately every two seconds, etc. 
                 If set to 0, update on every call to progress.
                 The default (not set) is to update the time only
                 when a dot or number is printed. 
OUTPUTS:
 CALLED BY:
	TRACE_ALIGN_CUBE
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
     Assumes that nothing else is printed between calls.  If it is,
     the formatting will be messed up.  If you change the size of the
     terminal during the process, the formatting may also be messed
     up if it might have gone over the length of a line.  The
     counting is done with integers, so you can't count, for example,
     from 0. to 1. with dots printed at intervals of 0.1, regardless
     of how you set minval and maxval.
PROCEDURE:
     Call the routine multiple times as progress is made.  It will
     print numbers and dots to indicate the progress, e.g.
     Label:  0 .... 25 .... 50 .... 75 .... 100  | Time=00:00:00
     Also prints an estimated time to completion, HH:MM:SS
EXAMPLE:
     progress,0.0,/reset,label='Progress (%)'
     for i=0,n-1 do begin
        ; your processing goes here
        progress,100.*float(i+1.0)/n
     endfor
     progress,100.,/last
     Progress (%):  0 .... 25 .... 50 .... 75 .... 100  | Time=00:00:00

     Or, you can use the minval and maxval keywords to change the
     range of the counting:

     progress,0.,/reset,label='test',bigstep=128,smallstep=32,maxval=512
     for i=0,511 do begin
        wait,0.1
        progress,i+1
     endfor
     progress,512.,/last
     test:  0 ... 128 ... 256 ... 384 ... 512  | Time=00:00:51
MODIFICATION HISTORY:
     T. Metcalf 2005-Jan-06
     2005-Jan-10 Added frequency keyword.
     2005-Jan-12 Move time to end of final string so that it does not
                 move.
     2005-Jan-13 If /last is set, the time printed is the total elapsed
                 time.
     2005-Jan-19 Added minval and maxval keywords.
     2005-Feb-01 Check for rpercent eq 0 in eta calculation.
     2005-Feb-11 Remove strcompress around user label.


PROGRESSBAR__DEFINE $SSW/gen/idl/widgets/progressbar__define.pro
[Previous] [Next]
 NAME:
       PROGRESSBAR__DEFINE

 PURPOSE:

       Creates a simple progress bar for indicating the progess of a looping
       operation in IDL.

 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:

       Utilities

 CALLING SEQUENCE:

       progressBar = Obj_New("PROGRESSBAR")

 ARGUMENTS:

       None.

 KEYWORDS:

       COLOR:         The name of the color for the progress bar. By default: "red".

       Possible color names are those defined by FSC_COLOR:

                Almond   Antique White      Aquamarine           Beige          Bisque           Black
                  Blue     Blue Violet           Brown       Burlywood        Charcoal      Chartreuse
             Chocolate           Coral        Cornsilk            Cyan  Dark Goldenrod       Dark Gray
            Dark Green      Dark Khaki     Dark Orchid     Dark Salmon       Deep Pink     Dodger Blue
             Firebrick    Forest Green            Gold       Goldenrod            Gray           Green
          Green Yellow        Honeydew        Hot Pink      Indian Red           Ivory           Khaki
              Lavender      Lawn Green     Light Coral      Light Cyan      Light Gray    Light Salmon
          Light Yellow      Lime Green           Linen         Magenta          Maroon     Medium Gray
         Medium Orchid        Moccasin            Navy           Olive      Olive Drab          Orange
            Orange Red          Orchid  Pale Goldenrod      Pale Green          Papaya            Peru
                  Pink            Plum     Powder Blue          Purple             Red            Rose
            Rosy Brown      Royal Blue    Saddle Brown          Salmon     Sandy Brown       Sea Green
              Seashell          Sienna        Sky Blue      Slate Gray            Snow    Spring Green
            Steel Blue             Tan         Thistle          Tomato       Turquoise          Violet
            Violet Red           Wheat           White          Yellow

       FAST_LOOP:     Set this keyword if what you are doing in the loop doesn't involve
                      any color operations and you want the progress bar to update as fast
                      as possible. With this keyword set, the program will eliminate extra
                      calls to FSC_COLOR, which can be slow if you are calling it, say,
                      10,000 times!

       GROUP_LEADER:  The group leader for the progress bar.

       NOCANCEL:      Set this keyword to eliminate the CANCEL button from the progres bar.

       PERCENT:       The initial percent on the progress bar. Used only if the START keyword is
                      also set.

       START:         Set this keyword if you wish to call the START method immediately upon initialization.

       TEXT:          The textual message that goes above the progress bar. By default:
                      "Operation in progress..."

       TITLE:         The title of the progress bar window. By default: "Progress Bar".

       XSIZE:         The X size of the progress bar itself. By default, 150 pixels.

       YSIZE:         The Y size of the progress bar itself. By default, 10 pixels.

       XLOC:          X location of progress bar. -1/0/1 = Left/Center/Right (def=0)

       YLOC:          Y location of progress bar. -1/0/1 = Top/Center/Bottom (def=0)

 PROCEDURE:

       The user is responsible for starting, updating, checking for CANCEL events, and
       destroying the progress indicator. The sequence of commands might look
       like this:

          progressBar = Obj_New("PROGRESSBAR")
          progressBar -> Start
          FOR j=0,9 DO BEGIN
             IF progressBar -> CheckCancel() THEN BEGIN
                ok = Dialog_Message('The user cancelled operation.')
                RETURN
             ENDIF
             Wait, 0.5  ; Would probably be doing something ELSE here!
             progressBar -> Update, (j+1)*10
          ENDFOR
          progressBar -> Destroy

       See the example program at the end of this file for a working example of code.

 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 progress bar widgets as well as the object.

          progressBar -> Destroy

       GETPROPERTY: Gets certain properties of the object.

          progressBar -> GetProperty, Color=currentColor

       SETPROPERTY: Allows the user to set certain properties of the object.

          progressBar -> SetProperty, Color='green'

       START: Puts the progress bar on the display and enables it to receive events.

          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. Can optional specify TEXT that is displayed above the progress
          bar.

          progressBar -> Update, 50
          progressBar -> Update, 50, Text='Operation 50% completed...'

 EXAMPLE:

       See the example program at the bottom of this file.

 CALLS: ***
	FSC_COLOR [1], FSC_COLOR [2], PROGRESSBAR::CHECKBUTTON
	PROGRESSBAR::CHECKCANCEL, PROGRESSBAR::CLEANUP, PROGRESSBAR::DESTROY
	PROGRESSBAR::GETPROPERTY, PROGRESSBAR::INIT, PROGRESSBAR::SETPROPERTY
	PROGRESSBAR::START, PROGRESSBAR::UPDATE, PROGRESSBAR_CLEANUP
	PROGRESSBAR_ERROR_MESSAGE, PROGRESSBAR_EVENT, STR_SEP, strsplit
 RESTRICTIONS:

       Note that the progress bar cannot be run as a MODAL widget program and
       still capture CANCEL button events. Thus, the user *may* be able to generate events
       in the calling program while this progress bar is in operation.

 DEPENDENCIES:

       This program requires FSC_COLOR from the Coyote Library:

          http://www.dfanning.com/programs/fsc_color.pro

 MODIFICATION HISTORY:

       Written by:  David W. Fanning, 19 September 2002.
       Added TEXT keyword to Update method. 12 Nov 2002. DWF.
       Added FAST_LOOP keyword. 19 Dec 2002. DWF.
       Fixed a problem in where I was checking for CANCEL button event. 2 April 2003. DWF.
       Removed the XMANAGER call in the START method, since it wasn't needed. 7 October 2003. DWF.
       General maintenance updates. Added START keyword to INIT method to allow immediate
          starting upon initialization. Added better error handling and checking. 10 October 2003. DWF.
       Added ACCEPT button and CheckButton method. Modified Example program to demonstrate new
          functionality. 1 December 2003. DWF.
       Don't use TLB_FRAME_ATTR=11 in widget_base call - If there's a problem, can't ever delete
          this widget.  Also added multi_line label option (up to 3 lines of text above color bar).
          Also before updating, bring progressbar widget to foreground. 21-Jun-2004, Kim Tolbert
       Added xloc, yloc keywords for positioning progress bar.  8-Feb-2005, Kim Tolbert
       Reset the color used in update to original color after updating prog bar. 10-feb-2005, Kim Tolbert


prstr [1] $SSW/gen/idl/string/prstr.pro
[Previous] [Next]
   Name: prstr

   Pupose: print input string array as using format='(a)' to force one 
	    entry per line (other types use idl standard print defaults)

   Input Parameters:
      strarr - array to print (will be converted to string)
      lun    - (optional - in/out) open unit for file 

   Keyword Parameters:
      file  - file name for output (default is via scratch.pro)
	       (if not defined, it is output from scratch)
      print - if set, print out the text 
      hc    - if set, print out the text (hc=hardcopy=synonym for print)
      file  - string file name for write (default is via scratch.pro)
      compress - if set, compress and remove nulls (useful for FITS header)
      nomore - if set, inhibit 'more-like' behavior (print everything)
      landscape - keyword passed to sprint (via scratch)
      quiet - if set, dont print error messages (file not openable...)
      
   Calling Sequence:
      prstr,strarry [,/nomore]		; print string array to terminal
      prstr,strarry,/print		; scratch file->lpr, delete scratch
      prstr,strarry,lun		; print strarray to scratch file
					; (open file if lun is undefined)
      prstr,strarry,lun,file=fname	; user supplies file 
      prstr,strarry,lun,/print		; same, close, print, delete
      prstr,strarry,lun,/landscape     ; same, in landscape
      prstr,strarry,lun,/print,/nodel  ; dont delete scrat

 CALLS: ***
	MORE [1], MORE [2], scratch [1], scratch [2]
 CALLED BY:
	FIRST_LIGHT [1], FIRST_LIGHT [2], GE_WINDOW [1], GOES__DEFINE
	HESSI BINNED EVENTLIST CLASS DEFINITION
	HESSI CALIBRATED EVENTLIST CLASS DEFINITION [1]
	HESSI CALIBRATED EVENTLIST CLASS DEFINITION [2]
	HESSI EVENTLIST CLASS DEFINITION, HESSI IMAGE FILE CLASS DEFINITION [1]
	HESSI IMAGE STRATEGY CLASS DEFINITION
	HESSI MONITOR RATE  CLASS DEFINITION, HESSI PACKET FILE ABSTRACT CLASS
	HESSI_DATA, HESSI_SHUTTERS, HSI_CHK_DUPLICATE, HSI_DIAGNOSTICS, HSI_SCORE_BPROJ
	HSI_SPECTROGRAMACCBIN [5], HSI_SPECTROGRAMCHAN_OVERLAP_FIX
	HSI_SPECTROGRAM_DECIM_CORRECT, HSI_SPECTROGRAM_DECIM_TABLE
	HSI_SPECTRUM__DEFINE, HXRBS_OCC, LIGHTCURVE CLASS DEFINITION, MAKE_GOES_RESP
	MAP2JPEG, MDI_SUMMARY, RHESSI IMAGE SINGLE CLASS DEFINITION, RdTap [1]
	RdTap [2], RdTap [3], SPECTROGRAM CLASS DEFINITION, SPECTRUM CLASS DEFINITION
	SPEX_DRM__DEFINE, SPEX_FITALG_GEN__DEFINE, SPEX_FIT__DEFINE, SPEX_GEN__DEFINE
	SPEX__DEFINE, STRATEGY HOLDER TOOLS ABSTRACT CLASS, add_pro [1], add_pro [2]
	auto_toban, bcs_velres, cfl_summary [1], cfl_summary [2], check_dumps [1]
	check_oldprocess [1], check_oldprocess [2], check_oldprocess [3]
	check_oldprocess [4], check_process [1], check_process [2], check_ql_after_lz
	chk_flares [1], chk_flares [2], chk_pointing, cp_fns [1], cp_fns [2], ctraj2orbit
	daily_forecast [2], dbase2disk, delete_week [1], delete_week [2], disk_hog [1]
	disk_hog [2], disk_monitor [1], disk_monitor [2], disp_therm_rs232, do_ads
	do_demo [1], do_demo [2], do_disp_month, doc_library2 [1], doc_library2 [2]
	doc_summ [1], doc_summ [2], dont_use_this [1], dont_use_this [2], dpc_summary
	dps_proc_mem_dump, eit_file2path, eit_fulldiskdb, file_purge [1], file_purge [2]
	fit_comp__define, fitshead2struct, flares2disk, fort2hxi [1], fort2hxi [2]
	ftp_copy_new, ftp_defprompt, genx_newver [1], genx_newver [2], get1hk_info [1]
	get1hk_info [2], get_ar, get_hk_info [1], get_hk_info [2], get_infox, get_selsis
	goes_plot [1], goes_plot [2], goes_plot [3], goes_plot [4], goes_plot [5]
	goesplot, help_prefix, help_windows, hessi_setup_info, hessi_var
	hsi_image__getaxis [2], hsi_image__plot [2], hsi_image_raw__define
	hsi_params_write_pro, hsi_plot_flux, hsi_select_flare
	hsi_spectrogramACCBIN [2], hsi_spectrogram__define [1]
	hsi_spectrogram__define [2], hsi_spectrogram__define [3]
	hsi_spectrogram__get_obs [1], hsi_spectrogram__livetime [1]
	hsi_write_txt_flare_list, html_linklist, image2movie, iperr_sea, is_bestnode [1]
	is_bestnode [2], jitter_gif_xyimg, killold [1], killold [2], laststat [1]
	laststat [2], make_ssw_mirror, merc_lwa, merc_pix, mk_bad_pix_map_load
	mk_gsn_obs_s1, mk_hst_summary, mk_imgsum_html, mk_lasteit_movie, mk_limb_pixmap
	mk_mdi_iap, mk_mo_list, mk_mo_log, mk_sfc [1], mk_sfc [2], mk_soup_hcat, mk_spd
	mk_ydbtape [1], mk_ydbtape [2], mktap_prep, mo_patch, mobad_summ
	month_sfd_fits [1], month_sfd_fits [2], mreadfits_fixup, multi_hda2hxi
	mxf_decomp_data, mxf_dset_map, mxf_read_data, mxfdset_map, mxfread, newsfd
	nob_img_copy, nobeyama_update, nts_copy [1], nts_copy [2], op_term_score
	op_terminator [1], op_terminator [2], ospex_params_write_pro, page_fmt, plotman
	pr_fdss_grndtrk, pr_fdss_orbevt, pr_fdss_viewpd, pr_logenv, pr_logwindows
	pr_maxmin_hk, pr_mdihk_trans [1], pr_mdihk_trans [2], pr_path [1], pr_path [2]
	pr_pnt_hist, pr_seq_frame_info, pr_sfc, pr_sxt_term, pr_sxtobs, pr_therm_rs232
	pr_tr_header, pr_uniq_hk, pr_visible, quality_filter, quick_hkplot [1]
	quick_hkplot [2], rd_bsc, rd_raw_station_plan, rd_sxa, rd_sxc, rd_sxl, rd_sxtgoes
	read_mdi, ref_term [2], reg_check, save_idl_routines, search [1], search [2]
	search_obs, sft2sfc, show_contacts, special_movie, spex_bkint__define
	ssw_check_contrib, ssw_env, ssw_getapplet, ssw_packages, ssw_path, ssw_upgrade [1]
	ssw_upgrade [2], ssw_upgrade_backup, sswdb_upgrade, sswloc, sw2tree [1]
	sw2tree [2], sxl_analysis, sxt2file, sxt_plan, sxt_prep [1], sxt_prep [2]
	sxt_prep [3], sxt_uvf_info [1], sxt_uvf_info [3], sxt_where, table2struct
	telem_sum, term_times, tim2dbase, tim2pass, tim2tfss, timeline, timeline2html
	topsdb [1], topsdb [2], tr_head_info, tr_list_frames, tr_mech_summary_img month
	tr_mk_seq_alph, tr_rd_index, tr_summary_head, tr_tab_head, trace_rd_jpeg
	track_proc [1], track_proc [2], web_seq, where_pattern [1], where_pattern [2]
	wmenu_sel [1], wmenu_sel [2], wrt_fits_bin_exten [2], xcheckip, xdisp_fits
	xdisp_sci5k, xdisp_trace [1], xdisp_trace2, xdisp_trace3, xhkplot, xrd_trace
	xread_hist, xset_chain [1], xset_chain [2], ydb_install [1], ydb_install [2]
	yo_file_check [1], yo_file_check [2], ys_file_check [1], ys_file_check [2]
   History: 
      slf, circa June 1992
      slf, 18-jan-1993 - added file and hc keywords
      slf,  5-mar-1993 - use scratch.pro for temp files
      slf,  2-jun-1993 - add close keyword
      mdm,  3-Jun-1993 - Closed the file when LUN is not used in the call
      slf, 29-jul-1993 - added compress keyword and function
      slf, 12-aug-1993 - added 'more' logic to terminal print, input chk
			  added nomore keyord
      slf, 18-apr-1994 - call more.pro for tty output
      slf, 20-feb-1996 - update for SSW use (ssw_nomore for batch jobs)
      slf,  7-oct-1997 - add LANDSCAPE switch 


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

 Name        : 
	PS
 Purpose     : 
	Sets graphics device to PostScript file.
 Explanation : 
	This procedure sets the system variables needed to write PostScript
	printer plot files.  The default configuration is landscape mode.
	Alternate modes are (TeX-compatible) encapsulated mode, portrait mode
	using all of the paper, and color mode (either landscape or portrait)
	which is compatible with the color printer.

	SETPLOT is called to save and set the system variables.  If a new file
	is to be opened, then DEVICE is called to set the plot window size and
	orientation, and to open the file.

	If the plot file is already open, then calling PS without any
	parameters or keywords allows the user to write into the already opened
	file, in the same mode as before.

 Use         : 
	PS  [, FILENAME ]

	PS				;Open PostScript plot file
	   ... plotting commands ...	;Create plot
	PSPLOT				;Close & plot file, reset to prev. dev.
	   or
	PSCLOSE				;Close w/o printing,  "    "   "    "

 Inputs      : 
	None required unless /ENCAPSULATED switch set.  See FILENAME below.
 Opt. Inputs : 
	FILENAME - Name of postscript file to be opened.  If not passed, and no
		   filename was previously passed, "idl.ps" is assumed.  If the
		   /ENCAPSULATED switch is passed, then a filename must be
		   passed.
 Outputs     : 
	A message is printed to the screen.
 Opt. Outputs: 
	None.
 Keywords    : 
	The following keywords are listed in the order of precedence.

	ENCAPSULATED = If set, then the plot is done in encapsulated landscape
		       mode.  This is compatible with TeX/LaTeX.
	TEX	     = A synonym for ENCAPSULATED.
	PORTRAIT     = If set, then the plot is done in portrait mode, using
		       all of the paper.
	LANDSCAPE    = If set, then the plot is done in landscape mode, using
		       all of the paper.  This is the default mode.

	In addition, the following keyword can be used with any of the others.

	COLOR	     = If set, then a color plot is made.
	COPY	     = If set, (together with /COLOR) then the current color
		       table is copied to the PostScript device.  Also, unless
		       INTERPOLATE is also set, 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.
	INTERPOLATE  = If set, (together with /COLOR and /COPY) then the
		       current color table is interpolated to the PostScript
		       device.
	RESTRICTED   = Older color PostScript printers had trouble printing to
		       the edge of the paper.  Using the /RESTRICTED keyword
		       sets up the paper size parameters to avoid this problem.

 Calls       : ***
	FORM_FILENAME [1], FORM_FILENAME [2], SETPLOT [1], SETPLOT [2]
 CALLED BY:
	AN_NIMCP, AN_NIMCP_1_2, AN_NIMCP_AVG, CHIANTI_NE, CHIANTI_TE, DENSITY_RATIOS, DSPEXP
	DSPWAV, DSP_AUX, DSP_WAV, EIS_IMAGE_TOOL_EVENT [1], EIS_IMAGE_TOOL_EVENT [2]
	EVAL_SHERB, GDSPSPEC, GHOST_BUSTER, GISPLOT, GOFNT, IMAGE_TOOL_EVENT, MK_CDS_PLAN
	MK_SOHO, NDSPSPEC, PLOT_HSI, PQLPROFILE, TEMPERATURE_RATIOS, TP_DISPLAY_DEW
	TP_DRAW_RASDUR, TP_DRAW_VWIN, TVPRINT, VIEW_PHA, WIN_DUMP, XCDS_SNAPSHOT, ch_ss
	hsi_sas_plot_scpointing, spectro_plot, tvmulti
 Common      : 
	PS_FILE which contains PS_FILENAME, the name of the plotting file,
	LAST_DEVICE, which is the name of the previous graphics device, and
	various parameters used to keep track of which configuration is being
	used.

	Also calls SETPLOT, which uses common block PLOTFILE.

 Restrictions: 
	Only the routines PSPLOT and PSCLOSE can be used to close the
	PostScript file.  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 the filename, or one of the configuration keywords (ENCAPSULATED,
	COLOR, PORTRAIT, or LANDSCAPE) are passed, then DEVICE is called to
	open a new file.  Any previously opened PostScript file would be
	closed.

	If a new file has to be opened, and if none of the configuration
	keywords are passed, then the default configuration (LANDSCAPE) is
	used.  This is true even if the last PostScript file was in a different
	configuration.

	If not the first time this routine is called, then system variables
	that affect plotting are reset to previous values.  If it is the first 
	time the routine is called, !FANCY is set to 1.

	In UNIX, if a new file is opened with the same name as an existing
	file, then the old file is lost.

 Category    : 
	Utilities, Devices.
 Prev. Hist. : 
	W.T.T., Nov. 1989.
	W.T.T., Aug. 1990, added LAST_DEVICE to common block.
	W.T.T., Feb. 1991, added keywords LANDSCAPE, PORTRAIT, TEX, COLOR.
	W.T.T., June 1992, fixed bug where CUR_CONFIG was not stored.
	W.T.T., Nov. 1992, added !P.POSITION to common block.
 Written     : 
	William Thompson, GSFC, November 1989.
 Modified    : 
	Version 1, William Thompson, GSFC, 27 April 1993.
		Incorporated into CDS library.
	Version 2, William Thompson, GSFC, 11 November 1993.
		Added ENCAPSULATED keyword.  Relegated TEX to a synonym.
	Version 3, William Thompson, GSFC, 14 September 1994
		Added COPY keyword.
	Version 4, William Thompson, GSFC, 21 June 1995
		Added INTERPOLATE keyword.
	Version 5, William Thompson, GSFC, 29 February 1996
		Added keyword RESTRICTED.  Changed default thickness to 2.

		Prior to version 5, this routine always restricted the size of
		the output so as to be compatible with the older color
		printers.  However, it was felt that with the advent of newer
		color printers, the full range of the printer should be used.

	Version 6, William Thompson, GSFC, 28 January 1997
		Fixed problem when CONFIGS is not defined.
	Version 7, William Thompson, GSFC, 21 November 2002
		Make .eps the default extension for encapsulated files.
 Version     : 
	Version 7, 21 November 2002


PS_FORM [1] $SSW/gen/idl/display/ps_form.pro
[Previous] [Next]
 NAME:
   PS_FORM

 PURPOSE:

   This function displays a form the user can interactively manipulate
   to configure the PostScript device driver (PS) setup. The function returns
   a structure of keywords that can be sent directly to the DEVICE command
   via its _EXTRA keyword

 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

 MAJOR TOPICS:

   Device Drivers, Hardcopy Output, PostScript Output

 CALLED BY:
	XPS_SETUP
 PROCEDURE:

   This is a pop-up form widget. It is a modal or blocking widget.
   Keywords appropriate for the PostScript (PS) DEVICE command are returned.
   The yellow box in the upper right hand corner of the form represents the
   PostScript page. The green box represents the "window" on the PostScript
   page where the graphics will be drawn.

   Use your LEFT mouse button to move the plot "window" around the page.
   Use your RIGHT mouse button to draw your own plot window on the page.

   The CREATE FILE and ACCEPT buttons are meant to indicate slightly
   different operations, although this is sometimes confusing. My idea
   is that PS_FORM is a *configuration* dialog, something the user displays
   if he or she wants to change the way the PostScript device is configured.
   Thus, in many of my widget programs if the user clicks a "Write PostScript File"
   button, I just go ahead and write a PostScript file without displaying the
   form. (I can do this because I always keep a copy of the current device
   configuration in my info structure.) To get to the form, the user must
   select a "Configure PostScript Device" button.

   At that time, the user might select the ACCEPT button to just change
   the PostScript device configurations. Or the user can select the
   CREATE FILE button, which both accepts the configuration *and* creates
   a PostScript file. If you find the CREATE FILE button confusing, you
   can just edit it out of the form and use the ACCEPT button for the
   same purpose.

 HELP:

   formInfo = PS_FORM(/Help)

 USAGE:

  The calling procedure for this function in a widget program will look something
  like this:

     info.ps_config = PS_FORM(/Initialize)
     ...
     formInfo = PS_FORM(Cancel=canceled, Create=create, $
                        Defaults=info.ps_config, Parent=event.top)

     IF NOT canceled THEN BEGIN
        IF create THEN BEGIN
           thisDevice = !D.Name
           Set_Plot, "PS"
           Device, _Extra=formInfo

           Enter Your Graphics Commands Here!

           Device, /Close
           Set_Plot, thisDevice
        ENDIF
        info.ps_config = formInfo
     ENDIF

 OPTIONAL INPUT PARAMETERS:

    XOFFSET -- Optional xoffset of the top-level base of PS_Form. Default is
    to try to center the form on the display.

    YOFFSET -- Optional yoffset of the top-level base of PS_Form. Default is
    to try to center the form on the display.

 INPUT KEYWORD PARAMETERS:

    BITS_PER_PIXEL -- The initial configuration of the bits per pixel button.

    BLOCKING -- Set this keyword to make this a blocking widget under IDL 5.0.
    (All widget programs block under IDL 4.0.)

    COLOR -- The initial configuration of the color switch.

    DEFAULTS -- A stucture variable of the same type and structure as the
    RETURN VALUE of PS_FORM. It will set initial conditions. This makes
    it possible to start PS_FORM up again with the same values it had the
    last time it was called. For example:

       mysetup = PS_FORM()
       newsetup = PS_FORM(Defaults=mysetup)

 CALLS: ***
	DOC_LIBRARY, EXIST, FILEPATH, PICKFILE, PS_FORM_DRAWBOX, PS_FORM_DRAW_EVENTS
	PS_FORM_EVENT, PS_FORM_MOVEBOX, PS_FORM_NULL_EVENTS, PS_FORM_NUMEVENTS
	PS_FORM_PLOTBOX_COORDS, PS_FORM_SELECT_FILE, PS_FORM_SET_LOCAL_DEFAULTS
	PS_FORM_SET_PERSONAL_LOCAL_DEFAULTS, PS_FORM_SET_SYSTEM_DEFAULTS
	PS_FORM_WHAT_BUTTON_PRESSED, PS_FORM_WHAT_BUTTON_RELEASED
	PS_FORM_WHAT_BUTTON_TYPE, RSTRPOS, XMANAGER
    NOTE: Using the DEFAULTS keyword will nullify any of the other
    DEVICE-type keywords listed above (e.g., XSIZE, ENCAPSULATED, etc.)

    ENCAPSULATED -- The initial configuration of the encapsulated switch.

    FILENAME -- The initial filename to be used on the form.

    HELP -- Prints a helpful message in the output log.

    INCHES -- The initial configuration of the inches/cm switch.

    INITIALIZE -- If this keyword is set, the program immediately returns the
    "localdefaults" structure. This gives you the means to configue the
    PostScript device without displaying the form to the user. I use this
    to write a PostScript file directly and also to initialize my info
    structure field that contains the current PostScript form setup. Passing
    the setup structure into PS_FORM via the DEFAULTS keyword gives my PS_FORM
    a program "memory".

        info.ps_setup = PS_FORM(/Initialize)

    LANDSCAPE -- The initial configuration of the landscape/portrait switch.

    LOCALDEFAULTS -- A structure like the DEFAULTS structure. Used if the
    "Local Defaults" button is pressed in the form. This gives you the
    opportunity to have a "local" as well as "system" default setup.
    If this keyword is not used, the procedure PS_Form_Set_Personal_Local_Defaults
    is called. Use this procedure (see below) to define your own local
    defaults.

    XOFFSET -- The initial XOffSet of the PostScript window.

    YOFFSET -- The initial YOffSet of the PostScript window.

    XSIZE -- The initial XSize of the PostScript window.

    YSIZE -- The initial YSize of the PostScript window.

 OUTPUT KEYWORD PARAMETERS

    CANCEL -- This is an OUTPUT keyword. It is used to check if the user
    selected the "Cancel" button on the form. Check this variable rather
    than the return value of the function, since the return value is designed
    to be sent directly to the DEVICE procedure. The varible is set to 1 if
    the user selected the "Cancel" button. Otherwise, it is set to 0.

    CREATE -- This output keyword can be used to determine if the user
    selected the 'Create File' button rather than the 'Accept' button.
    The value is 1 if selected, and 0 otherwise.

 RETURN VALUE:

     formInfo = { PS_FORM_INFO, $
                  xsize:0.0, $        ; The x size of the plot
                  xoff:0.0, $         ; The x offset of the plot
                  ysize:0.0, $        ; The y size of the plot
                  yoff:0.0 $          ; The y offset of the plot
                  filename:'', $      ; The name of the output file
                  inches:0 $          ; Inches or centimeters?
                  color:0, $          ; Color on or off?
                  bits_per_pixel:0, $ ; How many bits per image pixel?
                  encapsulated:0,$    ; Encapsulated or regular PostScript?
                  landscape:0 }       ; Landscape or portrait mode?

 MAJOR FUNCTIONS and PROCEDURES:

   None. Designed to work originally in conjunction with XWindow,
   a resizable graphics window.

 MODIFICATION HISTORY:

   Written by: David Fanning, RSI, March 1995.
   Given to attendees of IDL training courses.

   Modified to work when grapics device set to PostScript: 6 May 95.
   Modified to configure initial conditions via keywords: 13 October 95.
   Modified to load personal local defaults if LocalDefaults keyword not
      used: 3 Nov 95.
   Found and fixed bits_per_pixel error in Local Defaults setting
     procedure: 3 Nov 95.
   Modified to produce initial plot box with the same aspect ratio as
      the current graphics window. (XSIZE or YSIZE keywords overrule this
      behavior.) 22 Apr 96.
   Fixed annoying behavior of going to default-sized plot box when selecting
      the Landscape or Portrait option. Now keeps current plot box size.
      22 Apr 96.
   Made the size and offset text widgets a little bigger and changed the
      size and offset formatting from F4.2 to F5.2 to accomodate larger plot
      box sizes. 29 Apr 96.
   Fixed a bug in the filename text widget that caused a crash when a CR
      was hit. 3 Sept 96.
   Added the Initialize keyword to immediately return the "localdefaults"
      structure. 27 Oct 96.
   Fixed another problem with the BITS_PER_PIXEL keyword. 27 Oct 96.
   Made the return value a named structure of the name PS_FORM_INFO.
      3 Nov 96.
   Discovered and fixed a problem whereby YOFFSET was set incorrectly if
      LOCALDEFAULTS was used instead of DEFAULTS keyword. 3 Nov 96.
   Fixed bug in how Portrait mode was set using YSIZE and XSIZE keywords.
      25 Nov 96.
   Fixed a bug in how YOFFSET was calculated when in Landscape mode. 27 Nov 96.
   Fixed a memory leak with the local defaults pointer. 25 Jan 97.
   Added the CREATE keyword and modified the appearance of the form. 22 Apr 97.
   Modifed subroutine names to avoid confusion. 22 Apr 97.
   Fixed a bug I introduced when I added the CREATE keyword. 23 Apr 97.
   Modified the program for IDL 5. 30 May 97, DWF.
   Fixed Inches to CM exclusive button problem. 30 May 97, DWF.
   Fixed a problem when the widget is killed with the mouse. 30 May 97. DWF
   Added a Select Filename button. 12 Oct 97.
   Modified program layout slightly. 12 Oct 97.
   Added valid directory/file error checking for the filename. 12 Oct 97. DWF
   Added further support for IDL 5 modal functionality. 20 Oct 97. DWF


PS_LONG [1] $SSW/gen/idl/system/ps_long.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : PS_LONG
               
 Purpose     : To stretch plotting area when device is PostScript printer.
               
 Explanation : Resets plotting area using device command.  If the environment
               variable US_FUNNY_PAPER is defined then the size is adjusted
               from A4 to US size.
               
 Use         : IDL> ps_long
    
 Inputs      : None
               
 Opt. Inputs : None
               
 Outputs     : None
               
 Opt. Outputs: None
               
 Keywords    : None

 Calls       : None
 CALLED BY:
	ANAL_STIMS, BCS_24HR_PLOT [1], BCS_24HR_PLOT [3], BCS_MULTI [1], BCS_MULTI [2]
	LCBDA, PLOT_WINDOWS, lcbsd, lcobs, plot_bcs_free, plotbft [1]
 Common      : None
               
 Restrictions: None
               
 Side effects: None
               
 Category    : Util,  plotting
               
 Prev. Hist. : From Yohkoh routine by R D Bentley.

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

 Version     : Version 1, 21-Apr-94


PS_RESET [1] $SSW/gen/idl/system/ps_reset.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : PS_RESET
               
 Purpose     : Resets PostScript plotting area to Portrait, normal size.
               
 Explanation : The antidote to PS_LONG.
               
 Use         : IDL> ps_reset
    
 Inputs      : None
               
 Opt. Inputs : None
               
 Outputs     : None
               
 Opt. Outputs: None
               
 Keywords    : None

 Calls       : None
 CALLED BY:
	ANAL_STIMS, BCS_24HR_PLOT [1], BCS_24HR_PLOT [3], BCS_MULTI [1], BCS_MULTI [2]
	LCBDA, lcbsd, plot_bcs_free, plotbft [1]
 Common      : None
               
 Restrictions: None
               
 Side effects: Returns PostScript device to Portrait mode also.
               
 Category    : Util, device
               
 Prev. Hist. : Yohkoh routine by R D Bentley.

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

 Version     : Version 1, 21-Apr-94


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

 Name        : 
	PSCLOSE
 Purpose     : 
	Close a PostScript plot file, reset graphics device.
 Explanation : 
	The currently opened PostScript plot file is closed, and the graphics
	device is reset to what was used previously.
 Use         : 
	PSCLOSE

	PS				;Open PostScript plot file
	   ... plotting commands ...	;Create plot
	PSPLOT				;Close & plot file, reset to prev. dev.
	   or
	PSCLOSE				;Close w/o printing,  "    "   "    "

 Inputs      : 
	None.
 Opt. Inputs : 
	None.
 Outputs     : 
	A message is printed to the screen.
 Opt. Outputs: 
	None.
 Keywords    : 
	None.
 Calls       : ***
	SETPLOT [1], SETPLOT [2], TRIM
 CALLED BY:
	DENSITY_RATIOS, DSPEXP, DSPWAV, DSP_AUX, DSP_WAV, EIS_IMAGE_TOOL_EVENT [1]
	EIS_IMAGE_TOOL_EVENT [2], GDSPSPEC, GOFNT, IMAGE_TOOL_EVENT, MK_CDS_PLAN, MK_SOHO
	NIS_PIX_ANALYSE, PLOT_HSI, PQLPROFILE, TEMPERATURE_RATIOS, TVPRINT, WIN_DUMP
	XCDS_SNAPSHOT, ch_ss, hsi_sas_plot_scpointing, spectro_plot, tvmulti
 Common      : 
	PS_FILE which contains PS_FILENAME, the name of the plotting file,
	LAST_DEVICE, which is the name of the previous graphics device, and
	various parameters used to keep track of which configuration is being
	used.
 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: 
	The previous plotting device is reset.
 Category    : 
	Utilities, Devices.
 Prev. Hist. : 
	William Thompson, August 1990.
	W.T.T., Feb. 1991, modified to reflect change in common block PS_FILE.
 Written     : 
	William Thompson, GSFC, August 1990.
 Modified    : 
	Version 1, William Thompson, GSFC, 27 April 1993.
		Incorporated into CDS library.
	Version 2, William Thompson, GSFC, 2 January 1994.
		Added save into common plot of current configuration.
	Version 3, William Thompson, GSFC, 28 January 1997
		Fixed problem when CUR_CONFIG is not defined.
 Version     : 
	Version 3, 28 January 1997


PSF_GAUSSIAN [1] $SSW/gen/idl_libs/astron/image/psf_gaussian.pro
[Previous] [Next]
 NAME:
       PSF_GAUSSIAN

 PURPOSE:
       Create a 1-d, 2-d, or 3-d Gaussian with specified FWHM, center 
 EXPLANATION:
       Return a point spread function having Gaussian profiles,
       as either a 1D vector, a 2D image, or 3D volumetric-data.

 CALLING SEQUENCE:
       psf = psf_Gaussian( NPIXEL=, FWHM= , CENTROID = 
                     [ /DOUBLE, /NORMALIZE, ST_DEV=,  NDIMEN= ] ) 
 or:
       psf = psf_Gaussian( parameters, NPIXEL = ,NDIMEN = )

 REQUIRED INPUT KEYWORD:
       NPIXEL = number pixels for each dimension, specify as an array,
               or just one number to make all sizes equal.

 OPTIONAL KEYWORDS:
       CENTROID = floating scalar or vector giving position of  PSF center.    
               default is exact center of requested vector/image/volume.
               The number of elements in CENTROID should equal the number of
               dimensions.    **The definition of Centroid was changed in
               March 2002, and now an integer defines the center of a pixel.**

       /DOUBLE  = If set, then the output array is computed in double precision
               the default is to return a floating point array.

       FWHM = the desired Full-Width Half-Max (pixels) in each dimension,
               specify as an array, or single number to make all the same.

       NDIMEN = integer dimension of result: either 1 (vector), 2 (image), or 
                3 (volume), default = 2 (an image result).

       /NORMALIZE causes resulting PSF to be normalized so Total( psf ) = 1.

       ST_DEV = optional way to specify width by standard deviation param.
                Ignored if FWHM is specified.

       XY_CORREL = scalar between 0 and 1 specifying correlation coefficient
               Use this keyword, for example, to specify an elliptical 
               Gaussian oriented at an angle to the X,Y axis.   Only valid
               for 2-dimensional case.


 INPUTS (optional):

       parameters = an NDIMEN by 3 array giving for each dimension:
                       [ maxval, center, st_dev ],  overrides other keywords.

 CALLS: ***
	GAUSSIAN
 CALLED BY:
	FILTER_IMAGE, hsi_polar_clean
 EXAMPLE:
       (1) Create a 31 x 31 array containing a normalized centered Gaussian 
       with an X FWHM = 4.3 and a Y FWHM = 3.6

       IDL> array = PSF_GAUSSIAN( Npixel=31, FWHM=[4.3,3.6], /NORMAL )

       (2) Create a 50 pixel 1-d Gaussian vector with a maximum of 12, 
          centered at  pixel 23 with a sigma of 19.2

       IDL> psf = psf_gaussian([12,23,19.2],npixel=50)
 EXTERNAL CALLS:
       function Gaussian()
 NOTES:
       To improve speed, floating underflow exceptions are suppressed (using 
       the MASK=32  keyword of CHECK_MATH() rather than being flagged.

 HISTORY:
       Written, Frank Varosi NASA/GSFC 1991.
       Converted to IDL V5.0   W. Landsman   September 1997
       Suppress underflow messages, add DOUBLE keyword. **Modified centroid
       definition so integer position is pixel center** W. Landsman March 2002
       Allow use of the ST_DEV (not STDEV) keyword W. Landsman Nov. 2002


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

 Name        : 
	PSPLOT
 Purpose     : 
	Prints PostScript plots and resets to the previous device.
 Explanation : 
	Send a PostScript plot file generated by IDL to the PostScript laser
	printer.  The default queue is defined by the logical name/environment
	variable PSLASER.

	If PSPLOT is being used to close the PostScript file as well as print
	it, and the queue name is not passed explicitly, then it will
	automatically select a color printer (PSCOLOR) if the file was opened
	by the PS procedure with /COLOR set, and a regular PostScript printer
	(PSLASER) otherwise.  However, if the file was previously closed with
	PSCLOSE or PSPLOT, then either the /COLOR or QUEUE keyword will need to
	be used to direct a color PostScript file to the appropriate printer.

 Use         : 
	PSPLOT  [, FILE  [, VERSION ] ]  [, /DELETE ]

	PS				;Open PostScript plot file
	   ... plotting commands ...	;Create plot
	PSPLOT				;Close & plot file, reset to prev. dev.
	   or
	PSCLOSE				;Close w/o printing,  "    "   "    "

 Inputs      : 
	None required.
 Opt. Inputs : 
	The default filename is either taken from the last call to the PS
	routine, or is "idl.ps".

	A filename other than the default can be passed in one of three ways:

		Explicitly:		e.g. PSPLOT,'graph.ps'
		By number (VMS)		e.g. PSPLOT,3   for "idl.ps;3"
		All versions (VMS)	e.g. PSPLOT,'*' for "idl.ps;*"
		All ".ps" files (UNIX)	e.g. PSPLOT,'*' for "*.ps"

	In VMS, it's also possible to supply the filename and version numbers
	separately, e.g.

		PSPLOT, 'idl.ps', 3

	To print the file "idl.ps;3".  This is mainly to provide compatibility
	with the older SDAC version of PSPLOT.

 Outputs     : 
	A message is printed to the screen.
 Opt. Outputs: 
	None.
 Keywords    : 
	DELETE	= If set, then file is deleted after printing.
	QUEUE	= Name of printer queue to be used in printing the file.  If
		  not passed, then the environment variable PSLASER (or
		  PSCOLOR) is checked for the name of the print queue.

		  In Windows, the queue name can either be the name of a port
		  (e.g. "LPT1:") or the name of a shared printer queue with the
		  format "\\computer\shared_printer".

	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.
	COMMAND	= (Unix only.)  Command to be used to send the plot file to the
		  printer.  If not passed, then the environment variable
		  PRINTCOM is checked.  If neither of these is set, then the
		  standard command "lpr" is used.
	QUALIFIER = Print command qualifier(s), e.g. "/FORM=DEFAULT" (VMS) or
		    "-h" (Unix).
	FILENAME = Another mechanism to pass the filename, added mainly to
		   provide compatibility with the older SDAC version of PSPLOT.
		   When the FILENAME is passed in this way, then the normal
		   input parameter is ignored (unless it's a version number).
 Calls       : 
	SETPLOT [1], SETPLOT [2]
 CALLED BY:
	ACRIM, ACRIM_EV, ACRIM_OUT, AN_NIMCP, AN_NIMCP_1_2, AN_NIMCP_AVG, CHIANTI_NE
	CHIANTI_TE, CPCOMPOSITE, CPCURSOR, CPDIFF, CPDISPLAY, CPGET_R_T, CPMOVIE, CPMOVIE_DO
	CPMOVIE_EV, CPONE, CPONE_EV, CPSUNCEN, CPSUNCEN_EV, CPTV, CPTVCOPY, CPZOOM, CPZOOMIT
	CPZOOM_EV, DSPEXP, DSPWAV, DSP_AUX, DSP_WAV, EIS_IMAGE_TOOL_EVENT [1]
	EIS_IMAGE_TOOL_EVENT [2], EIT_SUB_PRINT, GDSPSPEC, GE_WINDOW [1], GHOST_BUSTER
	GISPLOT, HXISHARD, IMAGE_TOOL_EVENT, LZPLOT, MK_SOHO, NDSPSPEC, PLOTMAP, PLOT_ANGC [1]
	PLOT_ANGC [2], PLOT_GD, PQLPROFILE, RATIO_PLOTTER [1], ROUTINE_NAME [1]
	SPEX_COMMONS [2], SPEX_COMMONS [4], SPEX_PROC [1], SPEX_PROC [2], TEK_PRINT [1]
	TEK_PRINT [2], TP_DISPLAY_DEW, TP_DRAW_RASDUR, TP_DRAW_VWIN, TVPRINT, VIEW_PHA
	WIN_DUMP, XCDS_SNAPSHOT, ZOOMPRNT, ch_ss, get_slider, out_spectra_4_designer, plotgt
	plotman_create_files_event, ratio_plotter [2], set_field, temcal
 Common      : 
	PS_FILE which contains PS_FILENAME, the name of the plotting file,
	LAST_DEVICE, which is the name of the previous graphics device, and
	various parameters used to keep track of which configuration is being
	used.
 Restrictions: 
	The requested plot file must exist.

	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 plot file is queued on the printer.  Also, any files "idl.ps" that
	may be open will be closed.  The previous plotting device is reset.
 Category    : 
	Utilities, Devices.
 Prev. Hist. : 
	William Thompson, November 1989.
	W.T.T., added check for LAST_DEVICE, August 1990.
	W.T.T., changed DELETE to keyword, February, 1991.
	W.T.T., Feb. 1991, modified to reflect change in common block PS_FILE.
	W.T.T., May 1991, extended environment variable PSLASER to UNIX.
	W.T.T., Jun 1992, added check for PSCOLOR.
	W.T.T., Jul 1992, added check for PS_FILENAME in common block.
	W.T.T., Sep 1992, added COLOR keyword.
 Written     : 
	William Thompson, GSFC, November 1989.
 Modified    : 
	Version 1, William Thompson, GSFC, 27 April 1993.
		Incorporated into CDS library.
	Version 2, William Thompson, GSFC, 2 January 1994.
		Added save into common plot of current configuration.
       Version 2.1, S.V. Haugan, ItA/UiO
		Added support for alternative UNIX print commands via $PRINTCOM
	Version 3, William Thompson, GSFC, 8 June 1994
		Added keyword COMMAND
	Version 4, William Thompson, GSFC, 24 July 1996
		Added optional parameter VERSION, and keywords QUALIFIER and
		FILENAME, to be consistent with the older SDAC version of
		PSPLOT.
	Version 5, William Thompson, GSFC, 25 July 1996
		Fixed bug with checking of QUEUE parameter.
	Mod. by RCJ 01/10/96. Fixed problem with 'cur_config' and 'filename'
		when psplot called from vms machine.
	Version 7, William Thompson, GSFC, 13 January 1997
		Further corrected problem with FILENAME keyword when version
		number also passed.
	Version 8, Zarro, 3 July 1997
		Further corrected another problem with FILENAME keyword when version
		number also passed, and checked for blank queue
	Version 9, 19-Aug-1998, William Thompson, GSFC
		Added support for Microsoft Windows
 Version     : 
	Version 9


PSTORE $SSW/gen/idl/display/pstore.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : PSTORE()
               
 Purpose     : Store Plot Region data (!P,!X,!Y,!D, and data X/Y size)
               
 Explanation : Pstore is used to store information about plot regions
		where data is displayed (plotted or TV'ed). 
		The !P/!X/!Y/!D system variables should be set by
		the caller by e.g. plotting with x/yrange set
		to the correct values, with x/ystyle=1.

		More than one plot region per window can be used,
		just supply a unique NUMBER for each plot. If the
		plot is redisplayed later, an identical call to
		PSTORE will store the information on the same plot
		region ID number as the previous one.

		For TV'ed data, note that the correct ranges for the
		axes are [coordinate of leftmost pixel - 1/2 *stepsize,
			  coordinate of rightmost ""   + 1/2 *stepsize]
		For plotted data (i.e., plot,x,y), xrange should
		not be expanded in this way (the first and last data
		points will fall _on_ the border of the plot region).
 
               Equidistant scales are assumed. 

 Use         : plot_region_no = PSTORE(NUMBER,XSIZE,YSIZE)
    
 Inputs      : NUMBER : A user-assigned number identifying the
			plot region(s) within this window.

		X/YSIZE: The size of the displayed data. For 1D data,
			use XSIZE=number of points, and YSIZE=1.
               
 Opt. Inputs : None.
               
 Outputs     : Return value: A Plot Region ID, referring to
			the stored plot region.
               
 Opt. Outputs: None.
               
 Keywords    : CLEAN : Set to remove any earlier plot region definitions
			for this window.

		INIT : Restarts the common block.

 Calls       : None.
 CALLED BY:
	CW_PLOTZ [1], CW_PZOOM [1], DSPEXP, DSPWAV, GDSPSPEC, NDSPSPEC, PQLPROFILE, PQLZOOM
	PTEST, TKI_DISPLAY_DET, XSPECT, cw_plotz [2], cw_pzoom [2]
 Common      : WSTORE
               
 Restrictions: None.
               
 Side effects: None.
               
 Category    : Utility, Graphics
               
 Prev. Hist. : None.

 Written     : Stein Vidar Hagfors Haugan, May 1994
               
 Modified    : Version 2, SVHH, 7 May 1996
                          Using D.window == -1 as a "free" indicator.
                          Adding 100 entries at a time when expanding
                          storage, a large gain in speed.
               Version 3, SVHH, 30 May 1996
                          Using -2 instead of -1 as "free" indicator, since
                          all PS windows have !D.window = -1 !!

 Version     : 3, 30 May 1996


ptim $SSW/gen/idl/time/ptim.pro
[Previous] [Next]
 Name: ptim
 Purpose: Print times in ascii format for up to 10 input arguments

 Calling Sequence:  ptim, t1, t2, ...

 Input arguments:
	t1, t2 - up to 10 input times (each can be scalar or array) in any anytim format
   any keyword accepted by anytim

 Method:  anytim is called for each argument passed in.  If no anytim keywords are passed in
   then /vms is used.

 CALLS: ***
	ADD_TAG [1], ADD_TAG [2], DATATYPE [1], DATATYPE [2], DATATYPE [3], DOC_LIBRARY
	EXIST, anytim [1], anytim [2], anytim [3], anytim [4], anytim [5]
 CALLED BY:
	DATETIME OBJECT, HESSI IMAGE RAW CLASS DEFINITION [1]
	HESSI PACKET FILE ABSTRACT CLASS, HSI_IMAGE_TEST [2], accum_counts [1]
	accum_counts [2], hsi_clock_drift_redo, hsi_clock_drift_soc, hsi_flare_list2ar
	hsi_image_raw__define, hsi_mult_qspec, hsi_ok_intv [1], hsi_ok_intv [2]
	hsi_one_qlook_image, hsi_xy_test [1], hsi_xy_test [2]
 Examples:  ptim,t1         ptim,t1,t2,/ecs,/date

 Written: Kim Tolbert 06-Aug-2002
 Modifications:


PTR_ALLOC $SSW/gen/idl/objects/ptr_alloc.pro
[Previous] [Next]
 Project     : HESSI

 Name        : PTR_ALLOC

 Purpose     : to allocate a heap variable to a null pointer

 Category    : Pointers

 Explanation : A pointer is useless without heap memory being
               allocated to it when initialized.
               This procedure attempts to rectify this.

 Syntax      : IDL> ptr_alloc,pointer

 Inputs      : POINTER = Pointer variable

 Outputs     : POINTER = Pointer variable with allocated memory

 CALLED BY:
	FTP__DEFINE, READER__DEFINE, SET_POINTER, SYNOP_DB__DEFINE
 History     : 17-Nov-1999,  D.M. Zarro (SM&A/GSFC) -  Written
               17-May-2000, Zarro (EIT/GSFC) - added check for undefined
               input

 Contact     : DZARRO@SOLAR.STANFORD.EDU


PTR_CHK $SSW/gen/idl/objects/ptr_chk.pro
[Previous] [Next]
 Project     : HESSI

 Name        : PTR_CHK

 Purpose     : check if a variable is of type POINTER (regardless of
               whether it's an array or scalar or allocated or not)

 Category    : Pointers

 Syntax      : IDL> s=ptr_chk(pointer)

 Inputs      : POINTER = Variable to check

 Outputs     : 1/0 if it is or isn't

 CALLED BY:
	HSI_GSMOOTH, hsi_ui_img
 History     : Sep-2004, Richard Schwartz

 Contact     : richard.schwartz@gsfc.nasa.gov


PTR_CLONE $SSW/gen/idl/objects/ptr_clone.pro
[Previous] [Next]
 Project     : HESSI

 Name        : PTR_CLONE

 Purpose     : Clone a pointer by saving it to an IDL save file
               and then restoring it into a new pointer

 Category    : utility pointers

 Syntax      : IDL> clone=ptr_clone(pointer)

 Inputs      : pointer = pointer to clone (array or scalar)

 Outputs     : CLONE = cloned pointer

 CALLS: ***
	CLONE_VAR, EXIST
 CALLED BY:
	CLONE__DEFINE, PTR_COPY
 History     : Written 29 Nov 2002, D. Zarro (EER/GSFC)

 Contact     : dzarro@solar.stanford.edu


PTR_COPY $SSW/gen/idl/objects/ptr_copy.pro
[Previous] [Next]
 Project     : HESSI

 Name        : PTR_COPY

 Purpose     : Copy a pointer variable into new pointer variable

 Category    : utility objects pointers

 Syntax      : IDL> ptr_copy,ptr,copy

 Inputs      : PTR = pointer to copy (array or scalar)

 Outputs     : COPY = copied pointer

 CALLS: ***
	PR_SYNTAX, PTR_CLONE
 History     : Written 18 May 2004, D. Zarro (L-3Com/GSFC)

 Contact     : dzarro@solar.stanford.edu


PTR_EMPTY $SSW/gen/idl/objects/ptr_empty.pro
[Previous] [Next]
 Project     : HESSI

 Name        : PTR_EMPTY

 Purpose     : Empty a pointer of its data, but don't deallocate its memory

 Category    : Pointers

 Syntax      : IDL> ptr_empty,pointer

 Inputs      : POINTER = Pointer variable (scalar or array)

 Outputs     : POINTER minus its data

 CALLS: ***
	DELVARX [1], DELVARX [2], DELVARX [3], DELVARX [4], delvarx [5]
 CALLED BY:
	FREE_VAR, GOES__DEFINE
 History     : 22-Apr-2004, Zarro (L-3Com/GSFC) 

 Contact     : DZARRO@SOLAR.STANFORD.EDU


PTR_EXIST $SSW/gen/idl/objects/ptr_exist.pro
[Previous] [Next]
 Project     : HESSI

 Name        : PTR_EXIST

 Purpose     : check if a pointer is valid and has data in it

 Category    : Pointers

 Syntax      : IDL> s=ptr_exist(pointer)

 Inputs      : POINTER = Pointer variable
               INDEX = index of pointer to check (if array)

 Outputs     : 1/0 if it has or hasn't                     

 CALLED BY:
	ESPAWN, FIFO__DEFINE, GOES__DEFINE, HESSI IMAGE STRATEGY CLASS DEFINITION
	LINKEDLIST, LINKED_LIST, MAP__DEFINE, hsi_image__getaxis [2], hsi_image_fitsread
	hsi_imagefile_2_plotman, hsi_show_flags [2], plotman, read_ftp
	spex_hessi_image__define
 History     : 29-Aug-2000, Zarro (EIT/GSFC) 

 Contact     : DZARRO@SOLAR.STANFORD.EDU


PULSE_SPREAD $SSW/gen/idl/spectra/pulse_spread.pro
[Previous] [Next]
 Project: 
	SDAC
                   
 NAME: 
	PULSE_SPREAD

 PURPOSE:
	This procedure generates a matrix of gaussian pulse-shapes which can
	then multiply a matrix of energy-losses to form a full pulse-height
	matrix.

 CATEGORY:
	MATH, CALIBRATION, INSTRUMENT, DETECTORS, RESPONSE, SPECTROSCOPY

 CALLING SEQUENCE:
	PULSE_SPREAD, INPUT, PSM, INMATRIX, OUTMATRIX
 CALLED BY:
	GE_WINDOW [1], GRS_XRAY_RESP, NEAR_PC_RESP [1], NEAR_PC_RESP [2]
	NEAR_PIN_RESP [1], NEAR_PIN_RESP [2], RESP_CALC response calculation
 EXAMPLES:
	pulse_spread, input_psm, pulse_shape, eloss_mat.eloss_mat, drm

 CALLS: ***
	CHKARG, DATATYPE [1], DATATYPE [2], DATATYPE [3], F_DIV, INTERPOL, MORE [1], MORE [2]
	edge_products, where_arr [1], where_arr [2]
 INPUTS:
       INPUT- An anonymous structure with these tags:
		EIN- 2 x Ninput energy array with low and high energy edges, nominally keV
		but any consistent units for EIN, EOUT, and FUNC_PAR are acceptable
		EOUT- 2 X Noutput energy array with low and high energy edges, units of EIN
		FUNC- A string with the name of the function of Full Width at Half Maximum
		vs energy, i.e. FWHM = call_function( FUNC, avg(EIN,0), FUNC_PAR)
		FUNC_PAR- A vector of parameters used to control FUNC

 OPTIONAL INPUTS:
	INMATRIX- To complete the expression OUTMATRIX = PSM # INMATRIX, Ninput X Nflux

 OUTPUTS:
       PSM - resultant PULSE-SPREAD-MATRIX

 OPTIONAL OUTPUTS:
	OUMATRIX- Pulse-spread broadened product of INMATRIX, Noutput x Nflux

 KEYWORDS:
	none
 COMMON BLOCKS:
	none

 SIDE EFFECTS:
	none

 RESTRICTIONS:
	none

 PROCEDURE:
	The GAUSSINT function is used to construct the point-spread function.  GAUSSINT is
	the integral over the normally used GAUSSIAN function and is the correct function
	where the Gaussian is a valid approximation only when the output channels are
	narrow wrt the resolution.  Also, if INMATRIX is given, an efficient matrix
	multiplication is performed on large matrices, multiplying only over the
	non-zero elements of INMATRIX, useful when INMATRIX is mainly the photoefficiency
	without a Compton tail.

 MODIFICATION HISTORY:
	Version 1, RAS, 19-NOVEMBER-1996
	Version 2, RAS, 20-NOVEMBER-1996, multiply submatrix of all non-zero elements
	Version 3, RAS, 15-May-1997, fixed problem which occurred when input bins were larger than
	a resolution element.  Now, instead of integrating gaussian response over output
	bin evaluated at centroid of input bin, then input bins are subdivided into
	at least 4 resolution elements when evaluating the integral.
	Version 4, richard.schwartz@gsfc.nasa.gov, 7-sep-1997, more documentation


PURPOSE $SSW/gen/idl/help/purpose.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : PURPOSE
               
 Purpose     : List procedure/function names and purposes.
               
 Explanation : Creates a list of all .PRO files and then searches them for
               the standard CDS header and extracts the Name and Purpose 
               fields.  The resultant one-line documentation is printed to
               the screen or to the file "purpose.doc".
               
 Use         : IDL> purpose [,file_spec, /hard, /path, list=list]
               IDL> purpose, path='userlib
    
 Inputs      : None
               
 Opt. Inputs : file_spec   -  specification of the files to be searched.
                              If omitted, the current directory is used.
               
 Outputs     : The information can be printed to the screen or to the default
               output file "purpose.doc" (or both).
               
 Opt. Outputs: None
               
 Keywords    : hard    -  specifies that output is to be stored in file
                          purpose.doc
               path    -  if present (/path or path=1) use current IDL path 
                          (!path) as the search path but select only the cds
                          /idl directories, otherwise use any directory whose
                          name contains the string specified by path.

               quiet   -  if specified, do not print to screen.

               list    -  if present, the list of one-liners is returned
                          in a string array.

 Calls       : ***
	BREAK_FILE [1], BREAK_FILE [2], BREAK_FILE [3], DATATYPE [1], DATATYPE [2]
	DATATYPE [3], FILE_EXIST [2], REMCHAR [1], REMCHAR [2], REMCHAR [3], STR2ARR [1]
	STR2ARR [2], break_file [4], file_exist [1], file_exist [3]
 CALLED BY:
	CHECK_CONFLICT, FILL_TFTD
 Restrictions: When the /path option is requested, only directories containing
               the letters "cds" will be used.  The VMS option is also very
               fragile in using the path directories and is likely not
               to work if the path contains symbols and libraries etc.
               
 Side effects: None
               
 Category    : Utilities, Documentation, Manual
               
 Prev. Hist. : None

 Written     : C D Pike,  RAL,  23-Jun-1993
               
 Modified    : To include output variable LIST and keyword QUIET.
                                                        CDP, 12-Nov-93
               To detect uppercase NAME and PURPOSE for compatibility with
               IDL userlib routines.   CDP, 5-May-94
            
               Include more flexible path specification, CDP, 13-May-94

               Make search for Name and Purpose more robust, CDP, 25-May-94
               Back to only read 10 lines from ;+.  CDP, 17-Jun-94
               Improve handling of no files/directory present when path
               specified.  CDP, 21-Jun-94
               
               Changed /path to mean include all /idl directories.
                           CDP, 26-Jul-96

 Version     : Version 8, 26-Jul-96


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

 Name        : 
	PUT
 Purpose     : 
	Places one of several images on the image display screen.
 Explanation : 
	Uses SETIMAGE, SCALE_TV and EXPAND_TV to place an image on the TV
	display screen.  The image is placed at position IX out of NX from the
	left and position IY out of NY from the top.

	Will plot true color images if the device has enough colors and if
	ARRAY is a 3D Array with the third dimension color (red, green, blue).
	(See also the TRUE keyword.)

 Use         : 
	PUT, ARRAY, II, NN
	PUT, ARRAY, IX, NX, IY, NY
	PUT, ARRAY, X1, X2, Y1, Y2, /NORMAL

 CALLED BY:
	CDS_SNAPSHOT, EIT_DISPLAY, EIT_POSTAGE, MOVIE_MAKER, XCOR_CDS, tvmulti
	Examples: Display the third in a series of five images, and let the
	computer decide how to arrange the images.  All of the images should be
	of the same size.

		PUT, image, 3, 5

	In this example, the computer will decide to put the images into one of
	the following configurations, depending on the size of the screen, and
	the size of the images.

		1       1 2     1 2 3     1 2 3 4     1 2 3 4 5
		2       3 4     4 5       5
		3       5
		4
		5

	Display an image as the third of five from the left, and the second of
	three from the top.

		PUT, image, 3, 5, 2, 3

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

		PUT, image, 0.05, 0.95, 0.2, 1, /NORMAL

 Inputs      : 
	ARRAY	 = Two dimensional image array to be displayed, or 3 images in 
		   an array [Nx,Ny,3] to be displayed as a true color image.
		   (See also the TRUE keyword.)

	Also, either the parameters II, NN or the parameters IX, NX, IY, NY
	must be passed.

 Opt. Inputs : 

	II, NN	 = Relative position within a series of NN images.  The program
		   chooses how to arrange the images along the X and Y axes
		   depending on the size of the image and the size of the
		   window.

		or

	IX, NX	= Relative position along X axis, expressed as position IX
		  out of a possible NX, from left to right.
	IY, NY	= Relative position along Y axis, from top to bottom.

		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.

 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.
	NOSQUARE = If passed, then pixels are not forced to be square.
	SMOOTH	 = If passed, then interpolation used in expanding array.
	NOBOX	 = If passed, then box is not drawn, and no space is reserved
		   for a border around the image.
	NOSCALE  = If passed, 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.  Returned as the value of the image scale.  May
		   not be compatible with /NOSQUARE.
	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.
	COLOR	 = Color used for drawing the box around the image.
	MAX	 = The maximum value of ARRAY to be considered in scaling the
		   image, as used by BYTSCL.  The default is the maximum value
		   of ARRAY.
	MIN	 = The minimum value of ARRAY to be considered in scaling the
		   image, as used by BYTSCL.  The default is the minimum value
		   of ARRAY.
	TOP	 = The maximum value of the scaled image array, as used by
		   BYTSCL.  The default is !D.N_COLORS-1.
	BOTTOM	 = The minimum value of the scaled image array, as used by
		   BYTSCL.  The default is 0.
	VELOCITY = If set, then the image is scaled using FORM_VEL as a
		   velocity image.  Can be used in conjunction with COMBINED
		   keyword.  Ignored if NOSCALE is set.
	COMBINED = Signals that the image is to be displayed in one of two
		   combined color tables.  Can be used by itself, or in
		   conjunction with the VELOCITY or LOWER keywords.
	LOWER	 = If set, then the image is placed in the lower part of the
		   color table, rather than the upper.  Used in conjunction
		   with COMBINED keyword.
	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	 = If set, then immediately activate the data coordinates for
		   the displayed image.
	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

			PUT, 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.
	GEOMETRY = Returns the geometry used to display the image.  Of most use
		   when called with the "PUT, ARRAY, II, NN" calling sequence.
		   The returned value of GEOMETRY is an array containing the
		   calculated parameters IX,NX,IY,NY.
	FRAME	 = A four-element vector which contains the corners of the area
		   in which all of the images will appear, in normalized
		   coordinates.  The first two numbers are the minimum and
		   maximum X coordinates, and the second two numbers are the Y
		   coordinates.  For example, if one wants to reserve the lower
		   20% of the window for a label, then one can set FRAME to

			PUT, IMAGE, II, NN, FRAME=[0, 1, 0.2, 1]

		   The FRAME keyword is only used when PUT is called with three
		   parameters as above, and is ignored in the five parameter
		   call.  However, the same behavior can be obtained in the
		   five parameter mode by using fractional values, e.g.

			PUT, IMAGE, 1, 3, 2, 2.5

	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.
       BSCALED  = Returns the bytescaled image passed to the TV command.

 Calls       : ***
	EXPAND_TV, GET_IM_KEYWORD, SCALE_TV, SETIMAGE, TRIM, TVSELECT, TVUNSELECT
 Common      : 
	None.
 Restrictions: 
	ARRAY must be two-dimensional.  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.

	If the II, NN option is used, then II must be between 1 and NN.  This
	option really only works if all the images to be displayed are the same
	size.

	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: 
	SETIMAGE is set to the portion of the window the image is displayed in.

	Messages about the size and position of the displayed image are printed
	to the terminal screen.  This can be turned off by setting !QUIET to 1.

 Category    : 
	Utilities, Image_display.
 Prev. Hist. : 
	W.T.T., Oct. 1987.
	W.T.T., Jan. 1991, added BADPIXEL keyword.
	W.T.T., Feb. 1991, modified to use SETIMAGE.
	W.T.T., Feb. 1991, added SIZE keyword.
	W.T.T., Mar. 1991, this used to be PLACE_TV, and PUT was somewhat
			   different.
	W.T.T., Mar. 1991, added NOEXACT keyword.
	W.T.T., Nov. 1991, added MAX, MIN, and TOP keywords.
	W.T.T., Nov. 1991, added INTENSITY, VELOCITY and COMBINED keywords.
	W.T.T., Jan. 1992, changed SETIMAGE behavior, and added RETAIN keyword.
	W.T.T., Feb. 1992, added LOWER keyword.
	W.T.T., Feb. 1992, returned SETIMAGE behavior to the way it was before.
	William Thompson, August 1992, renamed BADPIXEL to MISSING.
	William Thompson, September 1992, use COMBINED keyword in place of
					  INTENSITY.
	William Thompson, Oct. 1992, changed strategy used when II,NN are
				     passed instead of IX,NX,IY,NY.
	William Thompson, November 1992, added /NORMAL keyword.
 Written     : 
	William Thompson, October 1987.
 Modified    : 
	Version 1, William Thompson, GSFC, 12 May 1993.
		Incorporated into CDS library.
	Version 2, William Thompson, GSFC, 24 June 1993.
		Fixed problem with /NORMAL keyword.
	Version 3, William Thompson, GSFC, 2 September 1993.
		Added ORIGIN, SCALE and DATA keywords.
	Version 4, William Thompson, GSFC, 25 July 1996
		Added keywords SCALE and ADJUST
	Version 5, William Thompson, GSFC, 25 July 1997
		Added keyword FRAME
	Version 6, William Thompson, GSFC, 22-Oct-1997
		Take /ADJUST into account when arranging images.
	Version 7, William Thompson, GSFC, 13 November 2001
		Added capability for true-color images.
       Version 8, William Thompson, GSFC, 12 October 2004
               Extend true-color to PostScript
       Version 9, William Thompson, GSFC, 3-Jan-2006
               Added keyword BOTTOM
       Version 10, William Thompson, GSFC, 26-Sep-2006
               Added keyword BSCALED
 Version     : 
	Version 10, 26-Sep-2006


PUTAST $SSW/gen/idl_libs/astron/astrom/putast.pro
[Previous] [Next]
 NAME:
    PUTAST
 PURPOSE:
    Put WCS astrometry parameters into a given FITS header.

 CALLING SEQUENCE:
     putast, hdr              ;Prompt for all values
               or
     putast, hdr, astr, [EQUINOX =, CD_TYPE =, ALT= , NAXIS=]
               or
     putast, hdr, cd,[ crpix, crval, ctype], [ EQUINOX =, CD_TYPE =, ALT= ]    

 INPUTS:
     HDR -  FITS header, string array.   HDR will be updated to contain
             the supplied astrometry.
     ASTR - IDL structure containing values of the astrometry parameters
            CDELT, CRPIX, CRVAL, CTYPE, LONGPOLE, and PV2
            See EXTAST.PRO for more info about the structure definition
                            or
     CD   - 2 x 2 array containing the astrometry parameters CD1_1 CD1_2
                                                             CD2_1 CD2_2
              in units of DEGREES/PIXEL
     CRPIX - 2 element vector giving X and Y coord of reference pixel
              BE SURE THE COORDINATES IN CRPIX ARE GIVEN IN FITS STANDARD
              (e.g. first pixel in image is [1,1] ) AND NOT IDL STANDARD
              (first pixel in image is [0,0]
     CRVAL - 2 element vector giving R.A. and DEC of reference pixel 
               in degrees
     CTYPE - 2 element string vector giving projection types for the two axes.
             For example, to specify a tangent projection one should set
             ctype = ['RA---TAN','DEC--TAN'] 

 OUTPUTS:
      HDR - FITS header now contains the updated astrometry parameters
               A brief HISTORY record is also added.

 OPTIONAL KEYWORD INPUTS:
       ALT -  single character 'A' through 'Z' or ' ' specifying an alternate 
              astrometry system to write in the FITS header.    The default is
              to write primary astrometry or ALT = ' '.   If /ALT is set, 
              then this is equivalent to ALT = 'A'.   See Section 3.3 of 
              Greisen & Calabretta (2002, A&A, 395, 1061) for information about
              alternate astrometry keywords.


       CD_TYPE - Integer scalar, either 0, 1 or 2 specifying how the CD matrix
                is to be written into the header
               (0) write PCn_m values along with CDELT values
               (1) convert to rotation and write as a CROTA2 value (+ CDELT)
               (2) as CDn_m values (IRAF standard) 

            All three forms are valid representations according to Greisen &
            Calabretta (2002, A&A, 395, 1061), also available at 
            http://www.aoc.nrao.edu/~egreisen/ )although form (0) is preferred.
            Form (1) is the former AIPS standard and is now  deprecated and
            cannot be used if any skew is present.
            If CD_TYPE is not supplied, PUTAST will try to determine the 
            type of astrometry already in the header.   If there is no 
            astrometry in the header then the default is CD_TYPE = 2.

      EQUINOX - numeric scalar giving the year of equinox  of the reference 
                coordinates.   Default (if EQUINOX keyword is not already
                present in header) is 2000.

      NAXIS - By default, PUTAST does not update the NAXIS keywords in the
            FITS header.    If NAXIS is set, and an astrometry structure is
            supplied then the NAXIS1 and NAXIS2 keywords in the FITS header 
            will be updated with the .NAXIS structure tags values.     If an 
            astrometry structure is not supplied, then one can set NAXIS to a 
            two element vector to update the NAXIS1, NAXIS2 keywords. 
 NOTES:
       The recommended use of this procedure is to supply an astrometry
       structure.     The PC matrix form (CD_TYPE = 0) can only be used 
       if an asrometry structure is supplied.   

       PUTAST does not delete astrometry parameters already present in the 
       header, unless they are explicity overwritten.    
 PROMPTS:
       If only a header is supplied, the user will be prompted for a plate 
       scale, the X and Y coordinates of a reference pixel, the RA and
       DEC of the reference pixel, the equinox of the RA and Dec and a 
       rotation angle.

 PROCEDURES USED:
       GETOPT(), GET_COORDS, GET_EQUINOX, SXADDPAR, SXPAR(), TAG_EXIST(), 
       ZPARCHECK
 REVISION HISTORY:
       Written by W. Landsman 9-3-87
       Major rewrite, use new astrometry structure   March, 1994
       Use both CD and CDELT to get plate scale for CD_TYPE=1   September 1995
       Use lower case for FITS keyword Comments  W.L.    March 1997
       Fixed for CD_TYPE=1 and CDELT = [1.0,1.0]   W.L   September 1997
       Default value of CD_TYPE is now 2, Use GET_COORDS to read coordinates
       to correct -0 problem           W.L.  September 1997
       Update CROTA1 if it already exists  W.L. October 1997
       Convert rotation to degrees for CD_TYPE = 1  W. L.   June 1998
       Convert to IDL V5.0    W.L. June 1998
       Accept CD_TYPE = 0 keyword input   W.L   October 1998
       Remove reference to obsolete !ERR  W.L.  February 2000
       No longer support CD001001 format, write default tangent CTYPE value
       consistent conversion between CROTA and CD matrix W.L. October 2000
       Use GET_EQUINOX to get equinox value  W.L.  January 2001
       Update CTYPE keyword if previous value is 'LINEAR'  W.L. July 2001
       Use SIZE(/TNAME) instead of DATATYPE()  W.L.   November 2001
       Allow direct specification of CTYPE W.L.        June 2002
       Don't assume celestial coordinates W. Landsman  April 2003
       Make default CD_TYPE = 2  W. Landsman   September 2003
       Add projection parameters, e.g. PV2_1, PV2_2 if present in the 
       input structure   W. Landsman    May 2004
       Correct interactive computation of image center W. Landsman Feb. 2005
       Don't use CROTA (CD_TYPE=1) if a skew exists W. Landsman  May 2005
       Added NAXIS keyword  W. Landsman   January 2007
 CALLS:
 CALLED BY
	HASTROM, HEULER, HPRECESS, STARAST


PVOIGT $SSW/gen/idl/fitting/pvoigt.pro
[Previous] [Next]
 Project     : YOHKOH-BCS
    
 Name        : PVOIGT

 Purpose     : Compute voigt function with partial derivatives

 Explanation : Calculates the Voigt function after  Humlicek (1982) 
               JQSRT 27,437. Derivatives are from Humlicek (1979) 
               JQSRT 21, 309. This method is fast and VERY accurate.

 Category    : fitting

 Syntax      : pvoigt,a,v,h,f

 Inputs      : a = damping parameter
               v = frequency vector

 Outputs     : h=H(a,v)
               f=2F(a,v)

               dH(a,v)/dv = 2.0(af-vh) 
               dH(a,v)/da = 2.0(ah+vf-.56418958)

               d2 H(a,v)/d2v = 4[(v^2-a^2)h - 2avf - h/2 + a*0.56418958]


               d(2F)/dv = -2.0(ah+vf-.5641896) (Cauchy-Riemann equation)

               d2 (2F(a,v))/d2v = -4[(a^2-v^2)f - 2avh + f/2 +v*0.56418958]

               where .5641896 is 1/sqrt(pi)

 Opt Outputs : None

 Keywords    : None

 CALLED BY:
	COMP_VOIGT, MVOIGT, XCFIT
 Restrictions: None

 Side effects: None

 History     : Version 1,  17-July-1993,  D M Zarro.  Written
               Modified from T.R Metcalf (IAH)

 Contact     : DZARRO@SOLAR.STANFORD.EDU


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

   Purpose: emulate unix 'pwd' command

 CALLED BY
	EIS_FITS_SCRIPT [1], EIS_FITS_SCRIPT [3], MK_MONTHLY_MIN