Extended IDL Help

This page was created by IDL lasco_mk_html_help.pro on Wed Aug 17 12:22:39 2005.


List of Routines


Routine Descriptions

AAAREADME

[List of Routines] (See ./cme/AAAREADME.pro)

There are several "main" programs that may be useful to calculate the
mass or electron density (columnar) in CMEs.  The mass of a CME is
computed from the excess brightness after having subtracted off the
pre-event brightness.  The technique is to recognize that a single
electron at a certain point in the atmosphere will scatter a known
amount of the solar disk intensity.  Then by knowing the observed
intensity, and by assuming that all of the mass is in a single
volume element, we can compute the number of electrons. Then
assuming charge neutrality, the mass can be computed.

The various procedures that can be used to compute electron density
or mass are:

C3_CME:
	A function to calibrate C3 images and calculate the mass of a CME
	given the base and cme image.

C3_CME_FRONT:
	A function to calibrate C3 images and to calculate the mass of the
	CME front.

C3_MASSIMG:
	A function to calibrate C3 images and calculates the mass of a CME.
	The output is a file that is a mass (or electron density image).

CME_MASSIMG2TOTAL:
	This function allows you to specify the area of features for which
	to calculate the mass of a CME from mass images.

rah 3/26/99


ABBRV_FILPOL

[List of Routines] (See ./util/abbrv_filpol.pro)

 NAME:
	ABBRV_FILPOL

 PURPOSE:
	This function returns an abbreviated code for the filter
	and polarizer/sector wheels.

 CATEGORY:
	UTIL

 CALLING SEQUENCE:
	Result = ABBRV_FILPOL(Filter)

 INPUTS:
	Filter = String giving the filter or polarizer/sector value

 OPTIONAL INPUTS:
	None

 OUTPUTS:
	The function result is a string containing the code for the filter
	wheel or the polarizer wheel.  Each wheel posisiton is a two
	character string.

 PROCEDURE:
	The wheel position is decoded and converted to a 2 character string.

 EXAMPLE:

 MODIFICATION HISTORY:
	Written, RA Howard, NRL, 7 October 1996
	15 Oct 96	RAH	Added removing whitespace from filter
				Corrected filter/polarizer/sector cases

       @(#)abbrv_filpol.pro	1.3 10/15/96     LASCO IDL LIBRARY


ADD_LASCO_LOGO

[List of Routines] (See ./util/add_lasco_logo.pro)

 NAME:
	ADD_LASCO_LOGO

 PURPOSE:
	This function inserts the LASCO logo into the corner of an image

 CATEGORY:
	LASCO_SYNOPTIC

 CALLING SEQUENCE:
	Result = ADD_LASCO_LOGO(Img)

 INPUTS:
	Img:	Input image

 KEYWORDS:
	LEFT	When set, puts logo on lower left corner

 OUTPUTS:
	Result:	Output image with same type and dimenstion as input
	
 COMMON:
	ADD_LASCO_LOGO_COMMON, w_logo
	Temporary storage for the logo
	
 PROCEDURE:
	Checks to see if the logo array has been read in, and restores it
	if not.  Then inserts the logo into the lower, right hand corner.

 MODIFICATION HISTORY:
 	Written by:	Scott Paswaters, NRL, Dec 1997
	99/07/14  N Rich	Add LEFT keyword

	@(#)add_lasco_logo.pro	1.3 07/14/99 LASCO IDL LIBRARY


ADD_MISSING_BLOCKS

[List of Routines] (See ./inout/add_missing_blocks.pro)

 NAME:
	ADD_MISSING_BLOCKS

 PURPOSE:
	Masks blocks in the input image which are identified in the MISSLIST
	keyword.

 CATEGORY:
	LASCO Level 1 post-processing

 CALLING SEQUENCE:

	Result = add_missing_blocks(image, header)

 INPUTS:
	image	LASCO image with filled-in missing blocks (if any)
	header	LASCO header structure

 KEYWORD PARAMETERS:

 OUTPUTS:
	image with missing blocks masked

 COMMON BLOCKS:

 SIDE EFFECTS:

 RESTRICTIONS:

 PROCEDURE:
	Obtain coordinates of missing blocks from MISSLIST keyword; create
	a mask of the blocks; warp the mask; multiply image by the mask

 MODIFICATION HISTORY:
 	Written by:	Nathan Rich,  8/29/02.

	@(#)add_missing_blocks.pro	1.1 10/01/02 LASCO IDL LIBRARY


ADJUST_DATE_OBS

[List of Routines] (See ./data_anal/adjust_date_obs.pro)

 NAME:
       ADJUST_DATE_OBS

 PURPOSE:
       This function returns a structure of two string elements containing the
       adjusted date-obs and time-obs for a given C1, C2, or C3 image header.
       c2_time_offsets.dat file is used to get the time offset using first 
       value extend, interpolation, or last value extend. It then calculates
       the corrected date-obs and time-obs and returns them.

 CATEGORY:
       LASCO DATA_ANAL

 CALLING SEQUENCE:
       adj = adjust_date_obs(hdr) 

 INPUTS:
       hdr: A C1, C2, or C3 image header

 OPTIONAL INPUTS:
       verbose: print diagnostic messages.
                adj = adjust_date_obs(hdr,/verbose)

 OUTPUTS:
      A two element structure of DATE and TIME containing the adjusted
      DATE_OBS and TIME_OBS.

 Example:
     hdr.DATE_OBS = '1998/01/01'
     hdr.TIME_OBS = '00:10:11.181'

     adj = adjust_date_obs(hdr)

     adj.DATE =     '1998/01/01'
     adj.TIME =     '00:13:06.590'
     

 MODIFICATION HISTORY:
       Written by:     Ed Esfandiari, Feb 1999
	 7/24/00, nbr - Add SCCS version, reduce_history commmon block
	11. 6.01, nbr - Use OPENR instead of OPENU
	11.30.01, nbr - Change fnm for windows SSW compatibility
	 7. 5.02, nbr - Fix SCCS version syntax

	@(#)adjust_date_obs.pro	1.7, 07/05/02 - NRL LASCO IDL LIBRARY


ADJUST_HDR_TCR

[List of Routines] (See ./data_anal/adjust_hdr_tcr.pro)

 Name:
    ADJUST_HDR_TCR
 Purpose:
    To return an IDL structure containing corrected date-obs, sun-center, and roll-angle
    for a input level 0.5 image header. These can then be used to adjust the level-1 image
     headers in the level-1 processing.

 Input Parameters:
    HDR              - A C1, C2, C3, or C4 (EIT) header. For C1 and C4, only the returned
                       date-obs is valid (roll is set to zero and center is not changed).
 Output:
    None

 RETURN VALUE:       - This function returns an IDL structure containing the following tags:
                         DATE: adjusted date-obs (string)
                         TIME: adjusted time-obs (string)
                         ERR : delta-erros from the time_correction routine (string)
                         XPOS: adjusted x-center (float) 
                         YPOS: adjusted y-center (float) 
                         ROLL: roll angle (float) degrees

 Keywords:
    VERBOSE           - If set, print out information from various steps of the processing.

 Calling Sequence:
    adj = ADJUST_HDR_TCR(hdr,/verbose)

 History:
 2003 March 11 - Ed Esfandiari (first version).
 2003 March 11, nbr - Add version info to header; change path derivation of data files
 2004 April 1 , nbr - Adjust HISTORY kewyords for header
 2004 July 17, nbr - good thru March 31, 2004
 2004 Oct 4, nbr - good thru Aug 15, 2004
 2004 Nov 24, AEE - read in last day from a .sav file instead of hard coded date.
 2005 Jan 25, AEE - changed linterp call linear_interp.

ersion= '@(#)adjust_hdr_tcr.pro	1.6, 11/24/04 using: ' ; LASCO IDL Library (NRL)


AIR2VAC

[List of Routines] (See ./convert/w_air2vac.pro)

 NAME:  
	air2vac

 PURPOSE:
	Convert air wavelength to vacuum wavelength

 CALLING SEQUENCE:
	air2vac

 INPUTS:
	wa - air wavelength (Angstroms)

 OPTIONAL INPUTS:
	none

 KEYWORD PARAMETERS:
	none

 OUTPUTS:
	The value returned is the vacuum wavelength (in Angstroms)
	corresponding to the input air wavelength.

 OPTIONAL OUTPUTS
	none
	
 COMMON BLOCKS:
	None

 SIDE EFFECTS:
	None

 RESTRICTIONS:
	Results are valid only between 2960 and 13000 Angstroms

 PROCEDURE:
	This procedure is the same algorithm used by Kurucz, et. al.
	"Solar Flux Atlas From 296 to 1300 nm", National Solar
	Observatory Atlas No. 1, June 1984.

 MODIFICATION HISTORY:
	Adapted from a FORTRAN program provided by R. Kurucz via
	private communication. Adapted by Paul Reiser July 22, 1997.


ALIGN1.PRO

[List of Routines] (See ./las-c2/align1.pro)

 NAME:
	ALIGN1.PRO
 PURPOSE:
	Takes two images of EO frange, corrects it from the dark and
       sums both, loading the result into X_display 
 CATEGORY:
	??
 CALLING SEQUENCE:
	 ALIGN1, nom_image1,nom_image2,nom_dark,imas,itest
 INPUTS:
	nom_image1                  one of frange images
       nom_image2                  frange image in oposite side
       nom_dark                    dark image name
	itest                       'V' or 'H' horizontal or vert alignement
 KEYWORD PARAMETERS:               
                                   None
 OUTPUTS:
	imas                        resulting composite image
 COMMON BLOCKS:
	None.
 SIDE EFFECTS:
	None
 RESTRICTIONS:

 PROCEDURE:
	Straightforward.
 MODIFICATION HISTORY:
	Written by A.LL  v.1.0       LAS  08/25/93           


ALIGN1[1]

[List of Routines] (See ./las-c2/align1.pro)

 NAME:                        dvpt_fra.pro
 PURPOSE:                     make a polar development of OE fringe or
                              of OI blocked fringe
 CATEGORY:                    Processing high level
 CALLING SEQUENCE:            dvpt_fra,ima_in,Xc,Yc,R,delta_R,ima_out
 INPUTS:                      ima_in                          reference's image
 OPTIONAL INPUT PARAMETERS:   Xc,Yc                           fringe's center
                              R                               internal radius
                              delta_R                         width of fringe
 KEYWORD PARAMETERS:          None
 OUTPUTS:                     ima_out                         result frame
 OPTIONAL OUTPUT PARAMETERS:  None
 COMMON BLOCKS:               None
 SIDE EFFECTS:                None
 RESTRICTIONS:                Applications limited to 512*512 frames
 PROCEDURE:
 MODIFICATION HISTORY:   defined by M.B 09/24/93
                         modified by M.B 02/17/94 : LAS

 SCCS variables for IDL use

 @(#)dvpt_fra.pro  1.0 09//93 :LAS


ALIGN1[2]

[List of Routines] (See ./las-c2/align1.pro)

 NAME:                        gener_mask.pro
 PURPOSE:                     make a circular mask for photometry's studies
 CATEGORY:                    Processing high level
 CALLING SEQUENCE:            gener_mask,ima_name,npix,Xc,Yc,R,intval,extval
 INPUTS:                      ima_name                         Name of mask
                              npix                             dimension
 OPTIONAL INPUT PARAMETERS:   Xc,Yc                            circle's coords
                              R                                radius of mask
                              intval                           value inside
                              extval                           value outside
 KEYWORD PARAMETERS:          None
 OUTPUTS:                     ima_name                         mask's frame
 OPTIONAL OUTPUT PARAMETERS:  None
 COMMON BLOCKS:               None
 SIDE EFFECTS:                None
 RESTRICTIONS:                None
 PROCEDURE:
 MODIFICATION HISTORY:   defined by M.B 09/10/93
                         modified by M.B 02/17/94 : LAS

 SCCS variables for IDL use

 @(#)gener_mask.pro  1.0 09/10/93 :LAS


ALIGN1[2]

[List of Routines] (See ./las-c2/align1.pro)

 NAME:                        ipolarfra.pro
 PURPOSE:                     make the inverse of polar transformation 
                              for OE developped fringe or for OI blocked 
                              developped fringe
 CATEGORY:                    Processing high level
 CALLING SEQUENCE:            ipolarfra,ima_in,Xc,Yc,R,delta_R,ima_out
 INPUTS:                      ima_in                          reference's image
 OPTIONAL INPUT PARAMETERS:   Xc,Yc                           fringe's center
                              R                               internal radius
                              delta_R                         width of fringe
 KEYWORD PARAMETERS:          None
 OUTPUTS:                     ima_out                         result frame
 OPTIONAL OUTPUT PARAMETERS:  None
 COMMON BLOCKS:               None
 SIDE EFFECTS:                None
 RESTRICTIONS:                Applications limited to 512*512 frames
 PROCEDURE:
 MODIFICATION HISTORY:    defined by M.B 02/17/94 : LAS

 SCCS variables for IDL use

 @(#)ipolarfra.pro  1.0 02/17/94 : LAS


ALIGN1[3]

[List of Routines] (See ./las-c2/align1.pro)

 NAME:                        diafrai.pro
 PURPOSE:                     apply a circular mask for photometry's studies
                              to a selected frame 
                              (define a circular ROI or apply a diaphragm)
 CATEGORY:                    Processing high level
 CALLING SEQUENCE:            diafrai,ima_name,Xc,Yc,R,intval,extval
 INPUTS:                      ima_name                         Name of image
 OPTIONAL INPUT PARAMETERS:   Xc,Yc                            circle's coords
                              R                                radius of mask
                              intval      value inside to be multiplied
                              extval      value outside to be multiplied
 KEYWORD PARAMETERS:          None
 OUTPUTS:                     ima_name                        image with mask
 OPTIONAL OUTPUT PARAMETERS:  None
 COMMON BLOCKS:               None
 SIDE EFFECTS:                None
 RESTRICTIONS:                None
 PROCEDURE:
 MODIFICATION HISTORY:   defined by M.B 02/17/94 : LAS

 SCCS variables for IDL use

 @(#)diafrai.pro  1.0 02/17/94 :LAS


ALL_NONOP_TEMPS

[List of Routines] (See ./packets/all_nonop_temps.pro)

 NAME:
	ALL_NONOP_TEMPS

 PURPOSE:
	Reads in the SVM HK files, saved by DACS, and plots the non-
	operational (S/C monitored) temperatures for LASCO, UVCS, MDI, CELIAS

 CATEGORY:
	PACKETS

 CALLING SEQUENCE:
	ALL_NONOP_TEMPS,Td

 INPUTS:
	Td:	Date string in form YYMMDD

 KEYWORD PARAMETERS:
	LASCO:	If present then the LASCO temperatures will be plotted

	UVCS:	If present then the UVCS temperatures will be plotted

	MDI:	If present then the MDI temperatures will be plotted

	CELIAS:	If present then the CELIAS temperatures will be plotted

	ALL:	If present then all 4 instrument temperatures will be plotted

	PRINT:	If present then the plot is sent to the printer

 MODIFICATION HISTORY:
 	Written by:	RAH, NRL, Dec 1994


	@(#)all_nonop_temps.pro	1.2 03/08/97 LASCO IDL LIBRARY


ANALYZE_IMG

[List of Routines] (See ./sumbuff/analyze_img.pro)

 NAME:
	ANALYZE_IMG

 PURPOSE:
	This procedure reads the headers of raw *.img files and looks
       for summing buffer usage and header only files.  It will match the
       headers and summing buffer files and write the fixed headers to
       a specified directory

 CATEGORY:
	Reduction

 CALLING SEQUENCE:

       ANALYZE_IMG, Root_dir,Outdir,Udates,Error_flag

 
 INPUTS:
	Root_dir: Directory to search for input *.img files
       Outdir:   Directory to put output *.img files

 KEYWORD PARAMETERS:
       NOWRITE  - Analyze only
 OUTPUTS:
      Udates:       String array with Unique dates
      Error_flag:   Integer array with value for each datei
                    0 = OK  1 = possible error 2 = serious error

 RESTRICTIONS:

 PROCEDURE:
      Read all the *.img files and analyze them to find the files from the
      summing buffers and headers for summing buffer files.  Match the
       first header with the first file etc. for each summing buffer.
       This works so long as the directory contains complete sets of 
       headers and files.  The procedure also checks that the OS_NUM
       aka CAMPAIGN_ID is the same header and file for each set.  Normal
       files (e.g. not from a summing buffer) should be ignored.
 EXAMPLE:
       ANALYZE_IMG,'/ql/raw','/ql/fixed',error_flag

 MODIFICATION HISTORY:
 	Written by:	Dennis Wang - 27 Jun 2000
       14 Jul 2000 DW - Changed OS_num ranges, Read 200 bytes for header
       08 Aug 2000 DW - Reduced error level of OS_NUM mismatch to possible 
                        error rather than serious error
       17 Oct 2000 DW - Added NOWRITE keyword and multiple date warning
       17 Oct 2000 DW - Added day by day analysis 
	17 Dec 2001 NR - Moved 'CD, old_dir' out of FOR loop to end

	@(#)analyze_img.pro	1.6, 12/17/01 - NRL LASCO IDL LIBRARY


ASPECT

[List of Routines] (See ./dfanning/aspect.pro)

 NAME:
  ASPECT

 PURPOSE:

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

 AUTHOR:

   FANNING SOFTWARE CONSULTING
   David Fanning, Ph.D.
   1645 Sheely Drive
   Fort Collins, CO 80526 USA
   Phone: 970-221-0438
   E-mail: davidf@dfanning.com
   Coyote's Guide to IDL Programming: http://www.dfanning.com/

 CATEGORY:

  Graphics

 CALLING SEQUENCE:

  position = ASPECT(aspectRatio)

 INPUTS:

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

 KEYWORD PARAMETERS:

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

  WINDOWASPECT: The aspect ratio of the target window. If not provided,
     the value is obtained from the current graphics window.

 OUTPUTS:

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

 EXAMPLE:

  To create a plot with an aspect ratio of 1:2 and a margin of
  0.10 around the edge of the output window, do this:

     plotPosition = ASPECT(0.5, Margin=0.10)
     PLOT, Findgen(11), POSITION=plotPosition

  Notice this can be done in a single IDL command, like this:

     PLOT, Findgen(11), POSITION=ASPECT(0.5, Margin=0.10)

 MODIFICATION HISTORY:

  Written by: David Fanning, November 1996.
       Added better error checking, 18 Feb 1997, DWF.
       Added WindowAspect keyword. 10 Feb 2000. DWF


AWIN

[List of Routines] (See ./util/awin.pro)

 NAME:
	AWIN

 PURPOSE:
	This procedure opens a window of the same size as the input array

 CATEGORY:
	UTIL

 CALLING SEQUENCE:
	AWIN, Arr

 INPUTS:
	Arr:	A two dimensional array of any type

 OUTPUTS:
	None

 SIDE EFFECTS:
	A blank window is displayed.

 EXAMPLE:
	Open a window of the same size as an arbitrary image array

		AWIN, image

 MODIFICATION HISTORY:
 	Written by:	SE Paswaters, NRL, June 1996

	@(#)awin.pro	1.2 05/14/97 LASCO IDL LIBRARY


B32TOINT

[List of Routines] (See ./reduce/mb2str/b32toint.pro)

 PROJET
     SOHO-LASCO

 NAME:
  B32TOINT

 PURPOSE:
  Convert a base 32 number to integer

 CATEGORY:
  Mathematics

 CALLING SEQUENCE:
   
 DESCRIPTION:

 INPUTS:

 INPUT KEYWORD:

 OUTPUTS:

 PROCEDURE:
  
 CALLED ROUTINES:

 HISTORY:
	V1 A.Thernisien 10/07/2001
 CVSLOG:
  $Log: b32toint.pro,v $
  Revision 1.2  2002/07/11 07:24:12  arnaud
  Insertion of the Log in each header



BK

[List of Routines] (See ./data_anal/bk.pro)

 NAME:
	BK

 PURPOSE:
	This function returns a K-coronal image from the total B image by
	subtracting off the F-coronal model.

 CATEGORY:
	DATA_ANAL

 CALLING SEQUENCE:
	Result = BK(Img,Hdr)

 INPUTS:
	Img:	Array containing an image of total brightness.  It is the output
    		from level 1 processing (for polarizer=clear)
	Hdr:	FITS image header

 OUTPUTS:
	This routine returns an image of the K-brightness.

 MODIFICATION HISTORY:
 	Written by:	R.A. Howard, NRL, 6 Nov 1996

	@(#)bk.pro	1.1 10/04/96 LASCO IDL LIBRARY


BROWSE_DISP

[List of Routines] (See ./util/browse_disp.pro)

 NAME:
	BROWSE_DISP

 PURPOSE:
	This procedure displays an image of an input string of hex values.

 CATEGORY:
	UTIL

 CALLING SEQUENCE:
	BROWSE_DISP, Img_str

 INPUTS:
	Img_str:	A string array of image intensities

 OPTIONAL INPUTS:
	Img_name:	The name of the image

 OUTPUTS:
	None

 PROCEDURE:
	This pro displays an image. It requires an input string of hex values
	that is, normally, result of a sybase query for a browse image. Note
	that a browse image is stored in sybase and retured by a query as a
	string of hex values. To display it, we must change it to its original
	byte array format, save it to a file, and use "read_jpeg" and "tvscl"
	to display it. It also accepts a second (optional) input string that
	will be displayed, as is, in the lower left corner of the display. It
	can be used to display such information as name, date, etc., about the 
	image.

 MODIFICATION HISTORY:
 	Written by:	Ed Esfandiari  Feb 1996

	@(#)browse_disp.pro	1.1 10/05/96 LASCO IDL LIBRARY


BSV2ARCSEC

[List of Routines] (See ./packets/bsv2arcsec.pro)

 NAME:
	BSV2ARCSEC

 PURPOSE:
	This procedure generates a file giving the conversion of the 
	boresighter and PES from volts to arc seconds.

 CATEGORY:
	LASCO PACKETS

 CALLING SEQUENCE:
	BSV2ARCSEC

 INPUTS:
	None

 OUTPUTS:
	This procedure generates a file,  in the current directory, containing
	the conversion of the BS and PES for each DN to voltages and to arc 
	seconds.  It also generates 4 plots on the screen of the BS-X, BS-Y,
	PES-X and the PES-Y.

 MODIFICATION HISTORY:
 	Written by:	RA Howard, NRL, 16 Mar 1996


	@(#)bsv2arcsec.pro	1.2 09/22/96 LASCO IDL LIBRARY


BUILD_C3_BACK.PRO

[List of Routines] (See ./reduce/las_c3/build_c3_back.pro)

 PROJET:
     SOHO-LASCO

 NAME:
     build_c3_back.pro

 PURPOSE
    build a edge image (i.e. a planar image) varying in y for C3 background correction

 INPUT
    c3mask           mask of useful pixels of c3 images

 KEYWORD INPUT: 
    ROI=roi          defines a specific area of CCD ( define it in
                     the same unit than c3mask pixel coordinates)
                     [x1,y1,x2,y2]
    XY={0,1}         To build two edges (in X and Y)

 OUTPUT:
    c3back_y         planar image varying in y (slope = 1 per pixel)
    c3back_x         planar image varying in x (slope = 1 per pixel)
 RESTRICTIONS
    initial image must be square


BUILD_FRAOE

[List of Routines] (See ./las-c2/align1.pro)

ro build_fraoe, image1, image2, image3, image4, oefringe
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 NAME:
	BUILD_FRAOE
 PURPOSE:
	Takes four images of EO fringe, corrects them from the dark and
       builds composit frame, loading the result into X_display.

 CATEGORY:
	calibration, manipulation
 CALLING SEQUENCE:
	 BUILD_FRAOE, image1, image2, image3, image4, oefringe
 INPUTS:
	image1                      first arc of fringe (up)
       image2                      second & opposite arc of fringe (down)
       image3                      third arc of fringe (left)
       image4                      fourth & opposite arc of fringe (right)

 KEYWORD PARAMETERS:               
                                   None
 OUTPUTS:
	oefringe                    resulting composit image
 COMMON BLOCKS:
	None
 SIDE EFFECTS:
	None
 RESTRICTIONS:
       None
 PROCEDURE:
	Straightforward.
 MODIFICATION HISTORY:
	Written by M.B  v.1.0       LAS  03/03/94           


BUILD_LASCO_HELP

[List of Routines] (See ./util/build_lasco_help.pro)

 Project     : SOHO - LASCO/EIT
                   
 Name        : BUILD_LASCO_HELP
               
 Purpose     : Create html help files for all LASCO IDL library routines.
               
 Use         : BUILD_LASCO_HELP
    
 Inputs      : None.
               
 Outputs     : None.
               
 Keywords    : None.

 Restrictions: Must have write permission to $NRL_LIB/lasco directories.
               
 Side effects: Creates files in the subdirectories of $NRL_LIB/lasco of the form:
  		help_subdir.html.  Ex. help_data_anal.html
               
 Category    : Help.
               
 Prev. Hist. : None.

 Written     : Scott Paswaters, NRL, Mar. 1996.
               
 Modified    : RAH, NRL, 3/31/99.  Added inout and expfac directories

 Version     : 

 @(#)build_lasco_help.pro	1.5 03/31/99 :LASCO IDL LIBRARY


C2_CALFACTOR

[List of Routines] (See ./reduce/c2_calfactor.pro)

NAME:
	C2_CALFACTOR

PURPOSE:
	This function returns the calibration factor for a given C2 image

CATEGORY:
	REDUCE

CALLING SEQUENCE:
	result = C2_CALFACTOR(Header)

INPUT:	
	Header:	image header, either fits or lasco structure

 Keywords:
	NOSUM	If set, do not correct for summing

OUTPUT:
	Image calibration factor in (B/Bsun)/(DN/pixel-second)

PROCEDURE:

	Same as C3_CALFACTOR.pro
	the output is automatically scaled for pixel summing

 MODIFICATION HISTORY:
	Written Clarence Korendyke, NRL
       Added C2/C3 Orange ratio as c2c3match - DW 07/09/99

	NBR Nov  7 2001 - Change Version to use SCCS version; change header HISTORY
	NBR Mar 11 2003 - Add /NOSUM

 SCCS variables for IDL and Header use
 
er= '@(#)c2_calfactor.pro	1.5, 03/14/03' ;NRL LASCO IDL LIBRARY



C2_CALIBRATE

[List of Routines] (See ./reduce/c2_calibrate.pro)

 NAME:
	C2_CALIBRATE

 PURPOSE:
	This function calibrates a C2 image to mean solar brightness units

 CATEGORY:
	REDUCE

 CALLING SEQUENCE:
	Result = C2_CALIBRATE(Img,Header)

 INPUTS:
	Img:	A 2-D image array in units of DN
	Header:	An image header (FITS or LASCO header structure)

 OUTPUTS:
	The calibrated image is returned.  The units are mean solar 
	brightness. The header is also modified.

 KEYWORDS:
	NEW	Force read of calib arrays
	NO_UPDATE	Do not use log files and force read of calib arrays
	NO_CALFAC	Do not apply calibration factor (set = 1d)

 COMMON BLOCKS:
	C2_CAL_IMG, DBMS

 RESTRICTIONS:
	Only handles clear polarizer except for H-alpha
	Must have LASCO IDL Library
	Must have environment $LASCO_DATA defined

 PROCEDURE:
	The routine reads in the vignetting and a mask array from the
	$LASCO_DATA/calib directory.  To obtain the calibration
	factors, it calls the C2_CALFACTOR procedure.

 MODIFICATION HISTORY:
 	Written by: Ed Esfandiari  April 08, 1999	
       V1  aee  Apr 08, 99 First version (based on c3_calibrate). 
       V2  dw   Sep 18, 99 Added no_calfac keyword (apply summing and vignetting only)
       V3  aee  Apr 25, 00 Removed !Version.os eq 'OSF' statement. It is not needed since
                           C2 vignetting is a .fts file which is machine independent.
	nbr Nov  7 2001 - Add-ons for reduce_level_1: add HISTORY comments in header; use 
			$LASCO_DATA; use SCCS version
	nbr Jun 25 2002 - Update get_cal_name argument
	nbr Mar 10 2003 - Add functionality for non-PB summed images
	nbr May 14 2003 - Remove errant stop
	nbr Aug 20 2003 - Name vig file explicitly


 Variables for SCCS and FITS header 

er= '@(#)c2_calibrate.pro	1.10, 09/08/03' ;NRL LASCO IDL LIBRARY

      


C2_DISTORTION

[List of Routines] (See ./data_anal/c2_distortion.pro)

 NAME:
       C2_DISTORTION

 PURPOSE:
       This function returns distance in arcseconds, given distance
       in pixels.

 CATEGORY:
       DATA_ANAL

 CALLING SEQUENCE:
       RESULT = C2_DISTORTION(data)

 INPUTS:
       Data:        distances in pixels

 OUTPUT:
       Result:      distances in arcseconds

 OPTIONAL OUTPUTS:

       None

 PROCEDURE:
       Given the distance between the sun center and a point (x, y)
       on the CCD, in pixels, this function returns the distance to
       (x, y) in arcseconds.  This function is returns a position
       accurate to within less than one pixel, for all possible
       distances.  However, this function does not work as well for
       points in the same quadrant as the post supporting the
       occulter.

 MODIFICATION HISTORY:
       Written by:     D.A. Biesecker, 24 Nov 1998
                       Ed Esfandiari   24 Nov 1998 - used DISTORTION_COEFFS to
                                                     get the coefficients.


C2_VIG1

[List of Routines] (See ./polariz/c2_vig1.pro)

vignetting function for C2
 INPUT: suncen_x, suncenter_y
 OUTPUT: vignetting array (floating point array)  

 Created: Dennis Wang

 @(#)c2_vig1.pro	1.2 02/12/99 NRL LASCO IDL LIBRARY


C2_WARP

[List of Routines] (See ./data_anal/c2_warp.pro)

 NAME:
       C2_WARP 

 PURPOSE:
       This function distorts a C2 image and returns it. 

 CALLING SEQUENCE:
       Result = C2_WARP(Image,Header) 

 INPUTS:
       Image :   C2 image to be distorted
       Header:   C2 image header 


 OUTPUTS:
       The distorted image is returned. Control points at every 32 pixels
       are used for distortion.

 COMMON BLOCKS:
       NONE

 MODIFICATION HISTORY:
               Written  Ed Esfandiari, NRL
   Version 1   aee 19 Nov 1998    Initial release (based on C3_WARP)
               aee 24 Nov 1998    changed get_sun_center call to occltr_cntr.
               dw  10 Dec 1998    Corrected handling of summed images
		NBR 24 Aug 2000	   Switch x/y and x0/y0 around in call to WARP_TRI;
				   Add reduce_history COMMON block

 KNOWN BUGS:

 1. Subfield images are not handled correctly - dw

ersion= '@(#)c2_warp.pro	1.4 08/24/00' ; LASCO IDL LIBRARY 


C3_CALFACTOR[1]

[List of Routines] (See ./reduce/c3_calfactor.pro)

NAME:
	C3_CALFACTOR

PURPOSE:
	This function returns the calibration factor for a given C3 image

CATEGORY:
	REDUCE

CALLING SEQUENCE:
	result = C3_CALFACTOR(Header)

INPUT:	
	Header:	image header, either fits or lasco structure

Keywords:
	NOSUM	If set, do not correct for summing

OUTPUT:
	Image calibration factor in (B/Bsun)/(DN/pixel-second)

PROCEDURE:

  The document describes the C3 calibration factor derived from the laboratory
  images taken in April 1994.
  The calibration factor is in 10^-10 (B/Bsun)/(DN/pixel-second).
  The units of the image to be multiplied need to be DN/pixel-second.
  The calibration factor is then scaled appropriately for pixel summation.

  Additional work will be required to remove a number of other factors.
  The calibration factor numbers need the port amplifier
  effect removed; color effects removed (IR filter affected greatly) and a
  number of other corrections.  The photometric effect of pixel summation will
  have to be examined.

  preliminary calibration factors for C3 (3/17/96):

  filter	polarizer	calibration factor
  			        (10^-10B/Bsun)/(DN/pixel-second)

  clear	clear		0.00503			
  blue		clear		0.1033
  orange	clear		0.0286
  deep red	clear		0.01937
  infrared	clear		0.1055  
  clear 	Halpha		1.541

  These were evaluated with the flat field response set to 1.0 at 20Rsun
  altitude.  Areas of the field inside and outside 20Rsun will be somewhat
  effected by the flat field calibration (+/- 10-15%).

	the output is automatically scaled for pixel summing

 MODIFICATION HISTORY:
	Written Clarence Korendyke, NRL
	V1	3/15/96	CMK	raw calibration factors computed with tabulated exposure durations
	V2	3/17/96	CMK	calibration factor corrected for exp cmd and exp duration and exp2
	V3	6/13/98	RAH	modified to allow polarizer coeffs to be different for each filter
				updated coeffs for latest values, obtained from calibration window
				ratios with door closed
	7/19/00 NBR	Change Version to use SCCS version; change header HISTORY
	1/19/01 NBR	Change clear-clear factor to match above comments
	3/11/03 NBR	Add /NOSUM
       6/8/05  RAH     Add time variable calibration coefficient
       6/22/05 Karl B  Small bug fix.

 SCCS variables for IDL use
 
er= '@(#)c3_calfactor.pro	1.13 06/22/05' ;LASCO IDL LIBRARY



C3_CALFACTOR[2]

[List of Routines] (See ./reduce/c3_calfactor_var.pro)

NAME:
	C3_CALFACTOR

PURPOSE:
	This function returns the calibration factor for a given C3 image

CATEGORY:
	REDUCE

CALLING SEQUENCE:
	result = C3_CALFACTOR(Header)

INPUT:	
	Header:	image header, either fits or lasco structure

Keywords:
	NOSUM	If set, do not correct for summing

OUTPUT:
	Image calibration factor in (B/Bsun)/(DN/pixel-second)

PROCEDURE:

  The document describes the C3 calibration factor derived from the laboratory
  images taken in April 1994.
  The calibration factor is in 10^-10 (B/Bsun)/(DN/pixel-second).
  The units of the image to be multiplied need to be DN/pixel-second.
  The calibration factor is then scaled appropriately for pixel summation.

  Additional work will be required to remove a number of other factors.
  The calibration factor numbers need the port amplifier
  effect removed; color effects removed (IR filter affected greatly) and a
  number of other corrections.  The photometric effect of pixel summation will
  have to be examined.

  preliminary calibration factors for C3 (3/17/96):

  filter	polarizer	calibration factor
  			        (10^-10B/Bsun)/(DN/pixel-second)

  clear	clear		0.00503			
  blue		clear		0.1033
  orange	clear		0.0286
  deep red	clear		0.01937
  infrared	clear		0.1055  
  clear 	Halpha		1.541

  These were evaluated with the flat field response set to 1.0 at 20Rsun
  altitude.  Areas of the field inside and outside 20Rsun will be somewhat
  effected by the flat field calibration (+/- 10-15%).

	the output is automatically scaled for pixel summing

 MODIFICATION HISTORY:
	Written Clarence Korendyke, NRL
	V1	3/15/96	CMK	raw calibration factors computed with tabulated exposure durations
	V2	3/17/96	CMK	calibration factor corrected for exp cmd and exp duration and exp2
	V3	6/13/98	RAH	modified to allow polarizer coeffs to be different for each filter
				updated coeffs for latest values, obtained from calibration window
				ratios with door closed
	7/19/00 NBR	Change Version to use SCCS version; change header HISTORY
	1/19/01 NBR	Change clear-clear factor to match above comments
	3/11/03 NBR	Add /NOSUM
       6/8/05  RAH     Add time variable calibration coefficient

 SCCS variables for IDL use
 
er= '@(#)c3_calfactor.pro	1.12 06/08/05' ;LASCO IDL LIBRARY



C3_CALIBRATE

[List of Routines] (See ./reduce/c3_calibrate.pro)

 NAME:
	C3_CALIBRATE

 PURPOSE:
	This function calibrates a C3 image to mean solar brightness units

 CATEGORY:
	REDUCE

 CALLING SEQUENCE:
	Result = C3_CALIBRATE(Img,Header)

 INPUTS:
	Img:	A 2-D image array in units of DN
	Header:	An image header (FITS or LASCO header structure)

 OUTPUTS:
	The calibrated image is returned.  The units are mean solar 
	brightness. The header is also modified.

 KEYWORDS:
	NO_VIG	Do not apply vignetting correction or pylon mask (set = 1.)
	NO_MASK Do not apply pylon/occulter mask to vig correction
	FUZZY	Interpolate gaps with fuzzy logic procedure
	NEW	Force read of calib arrays
	NO_UPDATE	Do not use log files and force read of calib arrays
	NO_CALFAC	Do not apply calibration factor (set = 1d)

 COMMON BLOCKS:
	C3_CAL_IMG, DBMS

 RESTRICTIONS:
	Only handles clear polarizer except for H-alpha

 PROCEDURE:
	The routine reads in the vignetting and a mask array from the
	$LASCO_DATA/calib directory.  To obtain the calibration
	factors, it calls the C3_CALFACTOR procedure.

 MODIFICATION HISTORY:
 	Written by:	RA Howard, 4/96
       V1  rah Apr 04 96 First version.
       V2  aee Sep 30 97 Added exposure factor and header updates.
       V3  rah Oct 31 97 Call to READ_EXP_FACTOR changed to GET_EXP_FACTOR
       V4  rah Nov 07 97 reference to FILEORIG changed to use DATE_OBS
       V5  dw  Sep 10 98 Added more polariz id flags beside PB
       V6  dab Nov 25 98 Added SWAP_ENDIAN for OSF operating systems
       V7  dw  Feb 10 99 Changed from IMG_SUM_2x2 to rebin for summed images
       V8  av  Mar 17 99 Added SL ramp correction
       V9  dw  Mar 28 99 changed SL ramp correction to ramp_fn(0)
       V9a rh  Apr  9 99 changed ramp to ramp_full in common
       V10 aee Apr 09 99 Added no_update keyword (used in image_profiles).
       V11 dw  Apr 09 99 Added no_calfac keyword (apply summing and vignetting only)
	nbr Jul 12 2000 - Change version init, header update
	nbr Jul 27 2000 - Apply ramp before vignetting correction 
	nbr Aug  4 2000 - CD to calib directory instead of using full path; 
			edit HISTORY in header
	nbr Aug  7 2000 - Change call to GET_EXP_FACTOR
	nbr Oct  2 2000 - Add FUZZY, NO_VIG keywords
	nbr Oct 25 2000 - Use READFITS to read vig and mask arrays
	nbr Jan 18 2000 - Change vig to vig_full in common block
	nbr Jan 24 2001 - Add bkg, mask_blocks to common block
	nbr Nov  6 2001 - Subtract ramp AFTER vignetting correction and add better 
			documentation; different order; do not apply
			mask to ramp
       av  Nov 20 2001 - Input image is now returned unchanged.
	nbr Jun 25 2002 - Update get_cal_name argument
	nbr Jul  5 2002 - Change bkg used for fuzzy_image
	nbr Mar 10 2003 - Add functionality for sub-fields and non-PB summed images;
			  define mask even if NO_MASK is set; only one vig and one mask
	nbr Apr 10 2003 - Change bkg and order of operations around fuzzy_image
	nbr Aug 20 2003 - Name vig and mask files explicitly
	nbr Sep  8 2003 - Comment changes, use A.Thernisien vignetting
	nbr Nov  5 2003 - Use inverted A.Thernisien vignetting        
	nbr Nov  6 2003 - Use expanded A.Thernisien vignetting       
	nbr Nov  7 2003 - Fix mask application 
	nbr Jan  2 2004 - Update mask
       nbr Apr  2 2004 - Remove comment about fuzzy_image; new mask
	nbr Apr  8 2004 - New mask
   K.Battams 6/22/2005 - Another new A.Thernisien vignetting function...
                         This time there are two for pre- and post- interruption.
   K.Battams 7/28/2005 - New vig function (previous function shifted half-pixel left)
                       - New C3 cl mask (very slightly larger)

 Variables for SCCS and FITS header 

er= '@(#)c3_calibrate.pro	1.51, 08/01/05' ; NRL LASCO IDL LIBRARY

      


C3_CME

[List of Routines] (See ./cme/c3_cme.pro)

 NAME:
	C3_CME

 PURPOSE:
	This function calibrates C2 & C3 images and calculates the mass of a CME

 CATEGORY:
	CME

 CALLING SEQUENCE:
	Result = C3_CME,Bn,Fn

 INPUTS:
	Bn:	String containing the filename of the base image
	Fn:	String containing the filename of the CME image

 KEYWORD PARAMETERS:
	MINSCL:	Set this keyword with the value to use for the minimum value
		in scaling the image. The default value is to use -1.e-11 msb

	MAXSCL:	Set this keyword with the value to use for the maximum value
		in scaling the image. The default value is to use +1.e-11 msb

	SAVE:	Set this keyword with the filename to save the mass information to

 OUTPUTS:
	This function returns the mass calculated for the ROI selected

 RESTRICTIONS:
	Only works for C3

 EXTERNAL CALLS:
	DEFROI, C2_CALIBRATE, C3_CALIBRATE, LASCO_READFITS, CALC_CME_MASS

 PROCEDURE:
	The files for the base and CME images are read in and calibrated.
	The images are then adjusted to have the same area and summing.
	The images are differenced, displayed and then DEFROI is called
	to get the desired region of interest.  CALC_CME_MASS is called to 
	compute the CME mass.

 EXAMPLE:
	To find the mass of a CME, where the base image is '320004.fts' and
	the CME image is in '320005.fts', and saving the mass information in 'mass.lst':

		Mass = C3_CME ('320004.fts','320005.fts',save='mass.lst')

 MODIFICATION HISTORY:
 	Written by:	RA Howard, NRL, 5/19/97
	MOdified:	RAH 3/14/98, changed rebin of b to calb

	@(#)c3_cme.pro	1.3 10/03/99 LASCO IDL LIBRARY


C3_CME_FRONT

[List of Routines] (See ./cme/c3_cme_front.pro)

 NAME:
	C3_CME_FRONT

 PURPOSE:
	This function calibrates C3 images and calculates the mass of a CME

 CATEGORY:
	CME

 CALLING SEQUENCE:
	Result = C3_CME_FRONT,Bn,Fn

 INPUTS:
	Bn:	String containing the filename of the base image
	Fn:	String containing the filename of the CME image

 KEYWORD PARAMETERS:
	MINSCL:	Set this keyword with the value to use for the minimum value
		in scaling the image. The default value is to use -1.e-11 msb

	MAXSCL:	Set this keyword with the value to use for the maximum value
		in scaling the image. The default value is to use +1.e-11 msb

	SAVE:	Set this keyword with the filename to save the mass information to
	NEW:	Set this keyword if the base image is new
	SECTOR:	Set this keyword if the ROI is a sector, centered on the sun
	RADII:	Set this keyword with a 2-element array of the inner and
		outer radii (in solar radii) for the sector ROI
	ANGLES:	Set this keyword with a 2-element array of the left and right
		hand boundaries (viewed from sun-center) for the sector ROI

 OUTPUTS:
	This function returns the mass calculated for the ROI selected

 RESTRICTIONS:
	Only works for C3

 EXTERNAL CALLS:
	DEFROI, C3_CALIBRATE, LASCO_READFITS, CALC_CME_MASS, ROI_SECTOR
	AWIN, AVERAGE

 PROCEDURE:
	The files for the base and CME images are read in and calibrated.
	The images are then adjusted to have the same area and summing.
	The images are differenced, displayed and then DEFROI is called
	to get the desired region of interest.  CALC_CME_MASS is called to 
	compute the CME mass.

 EXAMPLE:
	To find the mass of a CME, where the base image is '320004.fts' and
	the CME image is in '320005.fts', and saving the mass information in 'mass.lst':

		Mass = C3_CME_FRONT ('320004.fts','320005.fts',save='mass.lst')

 MODIFICATION HISTORY:
 	Written by:	RA Howard, NRL, 5/19/97

	@(#)c3_cme_front.pro	1.2 10/03/99 LASCO IDL LIBRARY


C3_DISTORTION

[List of Routines] (See ./data_anal/c3_distortion.pro)

 NAME:
       C3_DISTORTION

 PURPOSE:
       This function returns distance in arcseconds, given distance
       in pixels.

 CATEGORY:
       DATA_ANAL

 CALLING SEQUENCE:
       RESULT = C3_DISTORTION(data)

 INPUTS:
       Data:        distances in pixels

 OUTPUT:
       Result:      distances in arcseconds

 OPTIONAL OUTPUTS:

       None

 PROCEDURE:
       Given the distance between the sun center and a point (x, y)
       on the CCD, in pixels, this function returns the distance to
       (x, y) in arcseconds.  This function is returns a position
       accurate to within less than one pixel, for all possible
       distances.  However, this function does not work as well for
       points in the same quadrant as the post supporting the
       occulter.

 MODIFICATION HISTORY:
       Written by:     D.A. Biesecker, 29 September 1996
	10/5/98 by N B Rich	use coefficients from A. Llebaria
       11/24/98 Ed Esfandiari  used DISTORTION_COEFFS to get the coefficients.

 @(#)c3_distortion.pro	1.2 05/14/97 :NRL Solar Physics


C3_MASSIMG

[List of Routines] (See ./cme/c3_massimg.pro)

 NAME:
	C3_MASSIMG

 PURPOSE:
	This function calibrates C3 images and calculates the mass of a CME

 CATEGORY:
	CME

 CALLING SEQUENCE:
	Result = C3_MASSIMG(Bn,Fn)

 INPUTS:
	Bn:	String containing the filename of the base image
	Fn:	String containing the filename of the CME image

 KEYWORD PARAMETERS:
	SAVE:	If set, appends the total mass into a file.  If the 
		keyword is a string, then the filename is the string
		otherwise the user is prompted for the file name.
	ONLY_NE:If set, then compute electron density rather than mass
	NEW:	If set, then process the base image, even if it has been done

 OUTPUTS:
	This function returns an image of the calculated mass

 RESTRICTIONS:
	Only works for C3

 EXTERNAL CALLS:
	C3_CALIBRATE, LASCO_READFITS, CALC_CME_MASS

 PROCEDURE:
	The files for the base and CME images are read in and calibrated.
	The images are then adjusted to have the same area and summing.
	The images are differenced. CALC_CME_MASS is called to 
	compute the CME mass.

 EXAMPLE:
	To find the mass of a CME, where the base image is '320004.fts' and
	the CME image is in '320005.fts', and saving the total mass information
	in 'mass.lst':

		Massimg = C3_MASSIMG ('320004.fts','320005.fts',save='mass.lst')

 MODIFICATION HISTORY:
 	Written by:	RA Howard, NRL, 6/9/97
			RAH 5/23/98, Make work and make similar to c3_cme_front

	@(#)c3_massimg.pro	1.4 10/03/99 LASCO IDL LIBRARY


C3_WARP

[List of Routines] (See ./data_anal/c3_warp.pro)

 NAME:
       C3_WARP 

 PURPOSE:
       This function distorts a C3 image and returns it. 

 CALLING SEQUENCE:
       Result = C3_WARP(Image,Header) 

 INPUTS:
       Image :   C3 image to be distorted
       Header:   C3 image header 


 OUTPUTS:
       The distorted image is returned. Control points at every 32 pixels
       are used for distortion.

 COMMON BLOCKS:
       reduce_history

 SIDE EFFECTS:
	changes cmnver (procedure and version info) in reduce_history common block

 MODIFICATION HISTORY:
               Written  Ed Esfandiari, NRL
   Version 1   aee 28 Oct 1997    Initial release
               aee 24 Nov 1998    changed get_sun_center call to occltr_cntr.
               dw  10 Dec 1998    Corrected handling of summed images
		NBR 24 Aug 2000	   Switch x/y and x0/y0 around in call to WARP_TRI;
				   Add reduce_history COMMON block
		NBR,  6 Nov 2001 - Simplify header handling
		NBR, 14 Mar 2003 - Add subfield functionality

 KNOWN BUGS:

ersion= '03/14/03 @(#)c3_warp.pro	1.7' ; NRL LASCO IDL LIBRARY 


CALC_CME_MASS

[List of Routines] (See ./cme/calc_cme_mass.pro)

 NAME:
	CALC_CME_MASS

 PURPOSE:
	Computes the CME mass in an image given a box defining the area

 CATEGORY:
	CME 

 CALLING SEQUENCE:
	Result = CALC_CME_MASS (Img, Hdr, Box)

 INPUTS:
	Img:	The 2-D difference image containing the CME.  The units are
		in mean solar brightness units
	Hdr:	The lasco header structure of the image
	Box:	An array containing the coordinates of the region of interest

 KEYWORD PARAMETERS:
	FNAME:	If present, this string defines the name of a file
		to store the mass value in.  The information will be appended
		to an existing file or will create a new file.  The default
		is not to save the information.
	CONT:	If set this parameter indicates that a continuing CME sequence
		is being computed and various parameters will be not be 
		computed. The default is to compute the parameters.
	POS:	If present, this allows the angle from the plane of the sky to
		be specified.  The default is to set the angle to 20 degrees.
	ROI:	If present, then box contains the ROI indices rather than coordinates
	ALL:	If present, then the entire image is processed
	ONLY_NE:If present, electron density is returned, rather than mass
	MAXVAL:	If present, the maximum value in the region is computed
	MEDVAL:	If present, the median value in the region is computed
	PB:	If present, the input image is a pB image

 OUTPUTS:
	This function returns the mass contained within the ROI box in
	grams.

 COMMON BLOCKS:
	CME_MASS,Dist,Angle,B,Conv
		Dist = Distance of pixel in solar radii from sun center
		Angle = Angle of pixel in degrees from solar north
		B = brightness array of one electron
		Conv = Conversion factor from MSB to grams

		This common block is used to store a previous computation
		of the distance matrix to save time.

 SIDE EFFECTS:
	None

 RESTRICTIONS:
	The coordinates of the sun center must be in the header.

 PROCEDURE:
	An array in which the elements are the distance of that pixel from
	sun center is computed.  Then ELTHEORY is called to compute the
	brightness and polarization properties of a single electron.

 MODIFICATION HISTORY:
 	Written by:	R.A. Howard, NRL, 18 September 1996
	RAH 22 Mar 1997, Added Keyword POS and corrected mass/e
	RAH 16 May 1997, Changed header from FITS to header structure
	RAH 19 Sep 1997, Added Keyword ONLY_NE, added function of date
	RAH 18 Apr 1999, Put Ne to mass conversion into separate routine
	RAH 28 Sep 1999, Put POS (Plane of sky) angle to 0 instead of 20
	RAH 03 Oct 1999, Added capability for pB image


 @(#)calc_cme_mass.pro	1.9 10/03/99 :NRL Solar Physics


CALC_DARK_BIAS

[List of Routines] (See ./reduce/calc_dark_bias.pro)

 NAME:
	CALC_DARK_BIAS

 PURPOSE:
	This procedure calculates minimum, mean, average and std dev of dark images

 CATEGORY:
	LASCO REDUCE

 CALLING SEQUENCE:
	CALC_DARK_BIAS,Files

 INPUTS:
	Files:	If optional parameter, h, not present: String array of the file names to process
		If optional parameter, h, is present: image data array

 OPTIONAL INPUTS:
	H:	Lasco header structure corresponding to image data in Files
	
 OUTPUTS:
	Write information to file in $NRL_LIB/lasco/data/bias

 PROCEDURE:
	Cacluates the average, standeard deviation, minimum (non-zero) value and the median
	value.  Also gets the current value for the offset bias.  Then appends the information
	to the file dark_bias_cX.dat, where X is the telescope number.

 EXAMPLE:
	For only one parameter, the input parameter is a list of files

		f = wlister()
		CALC_DARK_BIAS,f

	For two parameters, pass the image and the header:
		a = LASCO_READFITS(f,h)
		CALC_DARK_BIAS,a,h

 MODIFICATION HISTORY:
 	Written by:	RA Howard, 6/12/98

	@(#)calc_dark_bias.pro	1.1 04/09/99 LASCO IDL LIBRARY


CALIB5[10]

[List of Routines] (See ./las-c2/calib5.pro)

 NAME:                         WRITE_IMA
 PURPOSE:                      write image and header to disk file
 CATEGORY:                     BASIC_INTERFACE
 CALLING SEQUENCE:             WRITE_IMAGE,ima_name,image,hdr
 INPUTS:                       ima_name = string of header filename
                               image    = array containing the image
                               hdr      = header to write to disk
 OPTIONAL INPUT PARAMETERS:    None
 KEYWORD PARAMETERS:           None
 OUTPUTS:                      Writes to disk
 OPTIONAL OUTPUT PARAMETERS:   None
 COMMON BLOCKS:                None
 SIDE EFFECTS:                 Creates a new disk file
 RESTRICTIONS:                 Assumes file extensions of .img and .hdr
 PROCEDURE:
 MODIFICATION HISTORY:         RAH 7/2/90
                               M.BOUT 93/11/16  runs for the new structures
                               arrays and headers and saves them in two files

 NOTE: the procedure VISU_IMA is convenient for the displaying of the saved
 files. It's not the case of VISU_CAL.

 @(#)write_ima.pro     1.2 4/10/93 :NRL Solar Physics

common ccd_header,header,nt,tags       ; Modif. A.LL. 93/05/28


CALIB5[11]

[List of Routines] (See ./las-c2/calib5.pro)

 NAME:                         write_hdr.pro
 PURPOSE:                      write image header to disk file
 CATEGORY:                     General tools low level routine
 CALLING SEQUENCE:             write_hdr,ima_name,hdr
 INPUTS:                       ima_name = string of header filename
                               hdr = header to write to disk
 OPTIONAL INPUT PARAMETERS:    None
 KEYWORD PARAMETERS:           None
 OUTPUTS:                      Writes to disk
 OPTIONAL OUTPUT PARAMETERS:   None
 COMMON BLOCKS:                None
 SIDE EFFECTS:                 Creates a new disk file
 RESTRICTIONS:                 Assumes a file extension of .hdr
 PROCEDURE:
 MODIFICATION HISTORY:         RAH 10/1/89
                               RAH 8/20/91 to use = as keyword delimiter
 SCCS variables for IDL use

 @(#)write_header.pro  1.2 4/10/93 :NRL Solar Physics


CALIB5[12]

[List of Routines] (See ./las-c2/calib5.pro)

 NAME:                 show_hdr.pro
 PURPOSE:              visualize keywords in Calibration headers
 CATEGORY:             General tools high level routine
 CALLING SEQUENCE:     show_hdr    or    show_hdr,/FULL
 INPUTS:               None
 OPTIONAL INPUT PARAMETERS:   None
 KEYWORD PARAMETERS:   /FULL
 OUTPUTS:              A list of ima_header
 OPTIONAL OUTPUT PARAMETERS:
 COMMON BLOCKS:        None
 SIDE EFFECTS:
 RESTRICTIONS:
 PROCEDURE:
 MODIFICATION HISTORY:
                               All 4/25/93 for VMS files in general
 SCCS variables for IDL use

 @(#)show_hdr.pro        1.3 4/25/93 :LAS


CALIB5[13]

[List of Routines] (See ./las-c2/calib5.pro)

 NAME:                 show_ima_hdr.pro
 PURPOSE:              visualize keywords from file headers
 CATEGORY:             General tools high level routine
 CALLING SEQUENCE:     show_ima_hdr, hdr_name 
                       show_ima_hdr, hdr_name,/FULL
 INPUTS:               hdr_name                Name of header file
 OPTIONAL INPUT PARAMETERS:   None
 KEYWORD PARAMETERS:   /FULL
 OUTPUTS:              A list of ima_header
 OPTIONAL OUTPUT PARAMETERS:
 COMMON BLOCKS:        None
 SIDE EFFECTS:
 RESTRICTIONS:
 PROCEDURE:
 MODIFICATION HISTORY:
                               All 4/25/93 for VMS files in general

		     corrected by M.B according to the new features of headers
		     11/03/93
 SCCS variables for IDL use

 @(#)show_ima_hdr.pro        1.3 4/25/93 :LAS


CALIB5[14]

[List of Routines] (See ./las-c2/calib5.pro)

 NAME:                 set_cal_hdr.pro
 PURPOSE:              set some keywords in Calibration headers
 CATEGORY:             General tools low level routine
 CALLING SEQUENCE:     set_ima_hdr,ima_header,refpix_x,refpix_y
 INPUTS:               ima_header = structure
                       refpix_x = float, (position of reference 0.,0.)
                       refpix_y = float, (position of reference 0.,0.)
 OPTIONAL INPUT PARAMETERS:    None
 KEYWORD PARAMETERS:   None
 OUTPUTS:              ima_header
 OPTIONAL OUTPUT PARAMETERS:
 COMMON BLOCKS:        None
 SIDE EFFECTS:
 RESTRICTIONS:
 PROCEDURE:
 MODIFICATION HISTORY:
                               All 4/25/93 for VMS files in general
 SCCS variables for IDL use

 @(#)set_ima_header.pro        1.3 4/10/93 :NRL Solar Physics


CALIB5[15]

[List of Routines] (See ./las-c2/calib5.pro)

 NAME:                 copy_ima_hdr.pro
 PURPOSE:              procedure to copy a heder structure in other
                       header structure
 CATEGORY:             CCD
 CALLING SEQUENCE:     copy_ima_hdr,header_in,header_out
 INPUTS:               header_in = header input,
                       header_out = new header structure
 OPTIONAL INPUT PARAMETERS:    None
 KEYWORD PARAMETERS:   None
 OUTPUTS:              header_out = filled new header
 OPTIONAL OUTPUT PARAMETERS:
 SIDE EFFECTS:
 RESTRICTIONS: corresponding tags must be of same element type
 PROCEDURE:
 MODIFICATION HISTORY:         All 4/25/93 for VMS files from Fusion
 SCCS variables for IDL use

 @(#)copy_ima_hdr.pro  1.3 4/10/93 :NRL Solar Physics


CALIB5[16]

[List of Routines] (See ./las-c2/calib5.pro)

 NAME:                  w512.pro
 PURPOSE:               create a 512*512 window
 CATEGORY:              General tools high level routine   
 CALLING SEQUENCE:      extract_ima2, iin, hin, x1, x2, y1, y2, iout, hout  
 INPUTS:                n          Window number
 OPTIONAL INPUT PARAMETERS:  None
 KEYWORD PARAMETERS:    None
 OUTPUTS:               A image Window in the screen
 OPTIONAL OUTPUT PARAMETERS: None
 COMMON BLOCKS:         None
 SIDE EFFECTS:
 RESTRICTIONS:
 PROCEDURE:
 MODIFICATION HISTORY:   defined by ALL 6/24/93

 SCCS variables for IDL use

 @(#)extract_ima2.pro  1.0 25/6/93 :LAS


CALIB5[17]

[List of Routines] (See ./las-c2/calib5.pro)

 NAME:                      LOAD_IMA.PRO
 PURPOSE:                   Visualize a image array yet in memory
 CATEGORY:                  General tools high level routine   
 CALLING SEQUENCE:          ima, lcut, hcut, kx, ky  
 INPUTS:                    ima                  image array
                            lcut,hcut            low and hight cut
                            kx, ky               zoom parameters
 OPTIONAL INPUT PARAMETERS: None
 KEYWORD PARAMETERS:        None
 OUTPUTS:                   image on screen
 OPTIONAL OUTPUT PARAMETERS:   None
 COMMON BLOCKS:             None
 SIDE EFFECTS:
 RESTRICTIONS:
 PROCEDURE:
 MODIFICATION HISTORY:      defined by ALL 6/24/93

 SCCS variables for IDL use

 @(#)load_ima.pro  1.0 25/6/93 :LAS


CALIB5[18]

[List of Routines] (See ./las-c2/calib5.pro)

 NAME:                       VISU_IMA.PRO
 PURPOSE:                   Put in virtual memory an image array & visualize it
 CATEGORY:                   Visualization high level routine   
 CALLING SEQUENCE:           VISU_IMA, ima_name, hima, ima, kx, ky, lcut, hcut
 INPUTS:                     ima_name                        image_name
                             hima,ima                        IDL assoc names
                             kx, ky                          zoom parameters
			      lcut, hcut		      cuts values
 OPTIONAL INPUT PARAMETERS:  None
 KEYWORD PARAMETERS:         None
 OUTPUTS:                    Image on screen 
 OPTIONAL OUTPUT PARAMETERS: None
 COMMON BLOCKS:              None
 SIDE EFFECTS:               None
 RESTRICTIONS:
 PROCEDURE:
 MODIFICATION HISTORY:       defined by ALL 6/24/93

			      modified by M.B 11/04/93
 SCCS variables for IDL use

 @(#)visu_ima.pro  1.0 25/6/93 :LAS


CALIB5[19]

[List of Routines] (See ./las-c2/calib5.pro)

 NAME:                       LOAD_CAL.PRO
 PURPOSE:                    Visualizes a array image of calibration 
                             (in memory yet)
 CATEGORY:                   Preprocessing high level routine   
 CALLING SEQUENCE:           iout = LOAD_CAL ( ima, lcut, hcut, itest, 
                                              nx_out, ny_out )
 INPUTS:                     ima          image array
                             lcut,hcut    low an hight cuts
                             itest        operating mode for big images
                                          itest eq 1 not rebin
                                          itest ne 1 rebin by 2 if 1124 pix 
                                                     images                          ; OPTIONAL INPUT PARAMETERS:  None
 KEYWORD PARAMETERS:         None
 OUTPUTS:                    Image on screen
                             iout
                             nx_out
                             ny_out
 OPTIONAL OUTPUT PARAMETERS: None
 COMMON BLOCKS:              None
 SIDE EFFECTS:               None
 RESTRICTIONS:               None
 PROCEDURE:
 MODIFICATION HISTORY:   defined by ALL 6/24/93

 SCCS variables for IDL use

 @(#)load_cal.pro  1.0 25/6/93 :LAS


CALIB5[1]

[List of Routines] (See ./las-c2/calib5.pro)

   CALIB5.PRO

        Upper level routines
        Stat
   Pro EXTRACT_IMA2, iin, hin, x1, x2, y1, y2, iout, hout
                                                   ; extracts a subimage
   Pro STAT_2D_FRM, ima, kx, ky, imb, imc          ;Gives local stats over all
                                                   ;image
   Pro STAT_IMA, ima, x1,y1,x2,y2,z                ;gives stas in a ROI
   Function MIN_2D_FRM, ima, kx,ky
   Function STATIMA, ima,  x1,y1,x2,y2             ;

        Visu

   Pro W512, n                                     ;Creates a 512*512 display
   Pro VISU_IMA, ima_name, hima, ima, kx, ky, lcut, hcut  ;Visualizes an image
   Function LOAD_IMA, ima, lcut, hcut, kx, ky      ;Visualizes a loaded ima;

        Calib. processing

   Pro VISU_CAL,ima_name, iout, hout               ;Gets a CAL ima, rectifies
                                                    and visu. it
   Pro VISU_CAL_CLEAN, ima_name, backg, iout, hout ;Gets a CAL ima, rectifies
                                                    subtracts and visu. it
   Pro READ_CAL,ima_name, itest, iout, hout        ;Gets a CAL ima. rectified
   Pro CLEAN_CAL, ima, hima, itest, iout, hout     ;rectifies a CAL image
   Function LOAD_CAL(ima,hima,lcut,hcut,itest,hout) ;rectifies a CAL image and
                                                     visu. it
   Pro SET_CAL_HDR, hdr, refpix_x, refpix_y        ;Sets cal parameters

        Catalogs of images

   Pro DARK_CATA                                    ; (CATA)
   Pro SHOW_CATALOG                                 ; (CATA)
   Pro CHOOSE_DARK, dark_new_name, drk, hdrk        ; (CATA)
   Pro PRO_CAL, ima_name, drk, hdrk, ima, hima      ;process a CAL with
                                                    catalogued darks (CATA) 
   Pro GET_DRK_NAME, ima_name, ass_name             ; (CATA)

   Pro SET_CATALOG, template, db_ima, nima, ima_name
   Pro FIND_IMA, hdr, ima_db, ima_name
   Pro IMA_LIST, template, ima_db, nfiles
   Function DEFINE_CATALOG( nfiles )

        Basic I/O

   Pro WRITE_IMA, ima_name, ima, hdr               ;Stores an image and a hdr
   Pro SHOW_HDR, ima_hdr, FULL = I                 ;Shows some hdr parameters
   Pro COPY_IMA_HDR, hdr_in, hdr_out               ;Copies a header
   Function READ_IMA( ima_name, hdr, ichoice )     ;opens an image from stor.

        Low level routines

   Function GETTOK(st,char)
   Function DATE_CAL( date, hour )
   Pro DATE_NUM_TEXT,year,month,day,hour
   Function DEFINE_IMA_HDR( dummy )
   Function DEFINE_CAL_HDR( dummy )
   Function DEFINE_BSC_HDR( dummy )
   Function DEFINE_C1_HDR( dummy )
   Function DEFINE_CCD_HDR( dummy )
   Function READ_IMA_HDR( ima_name, hdr, itest )
   Function READ_IMA_FRAME( ima_name, bitpix, nx, ny )
   Pro WRITE_HDR,ima_name, hdr
   Pro CHECK_IMGDIR, dummy
   Pro CHECK_FILENAME, filename, path, extension

   A.LL.


CALIB5[20]

[List of Routines] (See ./las-c2/calib5.pro)

 NAME: visu_cal_clean.pro
 PURPOSE: Gets a calib. image from disk, subtracts dark, and visualizes it
 CATEGORY: Calibration high level routine   
 CALLING SEQUENCE: VISU_CAL_CLEAN, ima_name, backg, ima, hdr   
 INPUTS: ima_name                         image name of calibration
         backg                            background image array
 OPTIONAL INPUT PARAMETERS:               None
 KEYWORD PARAMETERS:                      None
 OUTPUTS:                                 Image on screen 
         ima                              image array 
         hdr                              header of image array
 OPTIONAL OUTPUT PARAMETERS:              None
 COMMON BLOCKS:                           None
 SIDE EFFECTS: hdr array is defined as DEFINE_IMA_HDR
 RESTRICTIONS: 
 PROCEDURE:
 MODIFICATION HISTORY:   defined by ALL 6/24/93

 SCCS variables for IDL use

 @(#)visu_cal_clean.pro  1.0 25/6/93 :LAS


CALIB5[21]

[List of Routines] (See ./las-c2/calib5.pro)

 NAME: read_cal.pro
 PURPOSE: Gets a calibration image from disk and visualizes it 
 CATEGORY: Calibrations high level routine   
 CALLING SEQUENCE: READ_CAL, ima_name, itest, ima, hdr  
 INPUTS: ima_name                         image name of calibration
         itest                            =0 rebin si nx = 1124
                                          =1 no rebin pour nx = 1124  
 OPTIONAL INPUT PARAMETERS:               None
 KEYWORD PARAMETERS:                      None
 OUTPUTS:                                 Image on screen 
         ima                              image array 
         hdr                              header of image array
 OPTIONAL OUTPUT PARAMETERS:              None
 COMMON BLOCKS:                           None
 SIDE EFFECTS: hdr array is defined as DEFINE_IMA_HDR
 RESTRICTIONS:
 PROCEDURE:
 MODIFICATION HISTORY:   defined by ALL 6/24/93

 SCCS variables for IDL use

 @(#)read_cal.pro  1.0 25/6/93 :LAS


CALIB5[22]

[List of Routines] (See ./las-c2/calib5.pro)

 NAME: visu_cal.pro
 PURPOSE: Gets a calibration image from disk and visualizes it 
 CATEGORY: Calibrations high level routine   
 CALLING SEQUENCE: VISU_CAL, ima_name, ima, hdr  
 INPUTS: ima_name                         image name of calibration
 OPTIONAL INPUT PARAMETERS:               None
 KEYWORD PARAMETERS:                      None
 OUTPUTS:                                 Image on screen 
         ima                              image array 
         hdr                              header of image array
 OPTIONAL OUTPUT PARAMETERS:              None
 COMMON BLOCKS:                           None
 SIDE EFFECTS: hdr array is defined as DEFINE_IMA_HDR
 RESTRICTIONS:
 PROCEDURE:
 MODIFICATION HISTORY:   defined by ALL 6/24/93

 SCCS variables for IDL use

 @(#)visu_cal.pro  1.0 25/6/93 :LAS


CALIB5[23]

[List of Routines] (See ./las-c2/calib5.pro)

 NAME: CLEAN_CAL.PRO
 PURPOSE: Resizes and rotates a calibration image array
 CATEGORY: Calibrations high level routine   
 CALLING SEQUENCE: CLEAN_CAL, ima, hima, itest, iout, hout   
 INPUTS: ima                              image array of calibration
         hima                             header
         itest                            operating mode for big images
                                          itest eq 1 not rebin
                                          itest ne 1 rebin by 2 if 1124 pix 
                                                     images
 OPTIONAL INPUT PARAMETERS:               None
 KEYWORD PARAMETERS:                      None
 OUTPUTS:iout                             image array 
         hout                             header of image array
 OPTIONAL OUTPUT PARAMETERS:              None
 COMMON BLOCKS:                           None
 SIDE EFFECTS: hdr array is defined as DEFINE_IMA_HDR
 RESTRICTIONS:
 PROCEDURE:
 MODIFICATION HISTORY:   defined by ALL 6/24/93

 SCCS variables for IDL use

 @(#)clean_cal.pro  1.0 25/6/93 :LAS


CALIB5[24]

[List of Routines] (See ./las-c2/calib5.pro)

 NAME: stat_2d_frm.pro
 PURPOSE: Build a image of means and a image of sd (standard deviations) 
 CATEGORY: General tools high level routines, Statistics.
 CALLING SEQUENCE: stat_2d_frm, ima,kx,ky,imb,imc
 INPUTS: ima                              image array
         kx                               step_size in x
         ky                               step_size in y
 OPTIONAL INPUT PARAMETERS:               None
 KEYWORD PARAMETERS:                      None
 OUTPUTS:imb                              image array of means
         imc                              image array of sd. deviations
 OPTIONAL OUTPUT PARAMETERS:              None
 COMMON BLOCKS:                           None
 SIDE EFFECTS:
 RESTRICTIONS:
 PROCEDURE:
 MODIFICATION HISTORY:   defined by ALL 6/24/93

 SCCS variables for IDL use

 @(#)stat_2d_frm.pro  1.0 25/6/93 :LAS


CALIB5[25]

[List of Routines] (See ./las-c2/calib5.pro)

 NAME: stat_ima.pro
 PURPOSE: local statistics in a image array (in memory)
 CATEGORY: General tools high level routine   
 CALLING SEQUENCE: stat_ima, ima, x1, x2, y1, y2, z  
 INPUTS: ima                              image array
         x1,x2                            x interval of rectangle
         y1,y2                            y interval of rectangle
 OPTIONAL INPUT PARAMETERS:               None
 KEYWORD PARAMETERS:                      None
 OUTPUTS:z                                array of values
                                          z(0) = ntot
                                          z(1) = sum
                                          z(2) = moy
                                          z(3) = std
 OPTIONAL OUTPUT PARAMETERS:              None
 COMMON BLOCKS:                           None
 SIDE EFFECTS:
 RESTRICTIONS:
 PROCEDURE:
 MODIFICATION HISTORY:   defined by ALL 6/24/93

 SCCS variables for IDL use

 @(#)stat_ima.pro  1.0 25/6/93 :LAS


CALIB5[26]

[List of Routines] (See ./las-c2/calib5.pro)

 NAME: MIN_2D_FRM.PRO
 PURPOSE: make an image of local minima
 CATEGORY: General tools high level routine
 CALLING SEQUENCE: ima_out = min_2d_frm( ima_in, kx, ky)
 INPUTS: ima_in                           image array
         kx                               step_size in x
         ky                               step_size in y
 OPTIONAL INPUT PARAMETERS:               None
 KEYWORD PARAMETERS:                      None
 OUTPUTS:ima_out                          mapping of local minima
 OPTIONAL OUTPUT PARAMETERS:              None
 COMMON BLOCKS:                           None
 SIDE EFFECTS:                            None
 RESTRICTIONS:                            None
 PROCEDURE:
 MODIFICATION HISTORY:   defined by M.B and A.LL 26/10/93

 SCCS variables for IDL use

 @(#)min_2d_frm.pro  1.0 26/10/93 :LAS


CALIB5[27]

[List of Routines] (See ./las-c2/calib5.pro)

 NAME: statima.pro
 PURPOSE: extract a image from another
 CATEGORY: General tools high level routine   
 CALLING SEQUENCE: extract_ima2, iin, hin, x1, x2, y1, y2, iout, hout  
 INPUTS: iin                              image array
         hin                              header of image array
         x1,x2                            x interval of rectangle
         y1,y2                            y interval of rectangle
 OPTIONAL INPUT PARAMETERS:               None
 KEYWORD PARAMETERS:                      None
 OUTPUTS:iout                             extracted image array
         hout                             header for extracted image
 OPTIONAL OUTPUT PARAMETERS:              None
 COMMON BLOCKS:                           None
 SIDE EFFECTS: opens a catalog of darks
 RESTRICTIONS:
 PROCEDURE:
 MODIFICATION HISTORY:   defined by ALL 6/24/93

 SCCS variables for IDL use

 @(#)extract_ima2.pro  1.0 25/6/93 :LAS


CALIB5[28]

[List of Routines] (See ./las-c2/calib5.pro)

 NAME: extract_ima2.pro
 PURPOSE: extract a image from another
 CATEGORY: General tools high level routine   
 CALLING SEQUENCE: extract_ima2, iin, hin, x1, x2, y1, y2, iout, hout  
 INPUTS: iin                              image array
         hin                              header of image array
         x1,x2                            x interval of rectangle
         y1,y2                            y interval of rectangle
 OPTIONAL INPUT PARAMETERS:               None
 KEYWORD PARAMETERS:                      None
 OUTPUTS:iout                             extracted image array
         hout                             header for extracted image
 OPTIONAL OUTPUT PARAMETERS:              None
 COMMON BLOCKS:                           None
 SIDE EFFECTS: opens a catalog of darks
 RESTRICTIONS:
 PROCEDURE:
 MODIFICATION HISTORY:   defined by ALL 6/24/93

			  corrected by M.B 11/03/93 for header's filling

 SCCS variables for IDL use

 @(#)extract_ima2.pro  1.0 25/6/93 :LAS


CALIB5[29]

[List of Routines] (See ./las-c2/calib5.pro)

 NAME:DEFINE_CATALOG.pro
 PURPOSE Sets a array of structures for a image catalog
 CATEGORY: Preprocessing low level
 CALLING SEQUENCE: db = DEFINE_CATALOG(nfiles)
 INPUTS:  nfiles                          Nombre max of files in catalog
 OPTIONAL INPUT PARAMETERS:               None
 KEYWORD PARAMETERS:                      None
 OUTPUTS:                                 a array structure for catalog
 OPTIONAL OUTPUT PARAMETERS:              None
 COMMON BLOCKS:                           None
 SIDE EFFECTS:                            None
 RESTRICTIONS:
 PROCEDURE:
 MODIFICATION HISTORY:   defined by ALL 6/24/93

 SCCS variables for IDL use

 @(#)DEFINE_CATALOG.pro  1.0 25/6/93 :LAS


CALIB5[2]

[List of Routines] (See ./las-c2/calib5.pro)

 NAME: DATE_NUM_TEXT.PRO
 PURPOSE: Gives a set of date strings, ex: 12, 09, 1994 (for the 12 Sep 1994)
 A.LL. 


CALIB5[2]

[List of Routines] (See ./las-c2/calib5.pro)

 NAME:                         define_ima_hdr
 PURPOSE:                      defines a image header structure
 CATEGORY:                     BASIC_INTERFACES
 CALLING SEQUENCE:             hdr = define_ima_hdr(0)
 INPUTS:                       None
 OPTIONAL INPUT PARAMETERS:    None
 KEYWORD PARAMETERS:           None
 OUTPUTS:                      structure array containing initialized an header
 OPTIONAL OUTPUT PARAMETERS:
 COMMON BLOCKS:                None
 SIDE EFFECTS:
 RESTRICTIONS:
 PROCEDURE:
 MODIFICATION HISTORY:         RAH 10/1/89
                               RAH 8/20/91  Added AES BSBD camera keywords
                               ALL 04/27/93 takes only standard KEYWORDS

 SCCS variables for IDL use

 @(#)define_ima_hdr.pro        1.1 7/6/92 :NRL Solar Physics

;;common ccd_header,header,nt,tags


CALIB5[30]

[List of Routines] (See ./las-c2/calib5.pro)

 NAME: IMA_LIST.pro
 PURPOSE: list the catalog of images (corresp to a template) 
 CATEGORY: Preprocessing low level routine   
 CALLING SEQUENCE: DARK_LIST, template, ima_db, nfiles 
 INPUTS: template                         Template to define the list of images
 OPTIONAL INPUT PARAMETERS:               None
 KEYWORD PARAMETERS:                      None
 OUTPUTS:ima_db                           image catalog
         nfiles                           Number of images in catalog
 OPTIONAL OUTPUT PARAMETERS:              None
 COMMON BLOCKS:                           None
 SIDE EFFECTS: opens a catalog of darks
 RESTRICTIONS:
 PROCEDURE:
 MODIFICATION HISTORY:   defined by ALL 6/24/93

 SCCS variables for IDL use

 @(#)ima_list.pro  1.0 25/6/93 :LAS


CALIB5[31]

[List of Routines] (See ./las-c2/calib5.pro)

 NAME: find_ima.pro
 PURPOSE: From the image header finds the asociate dark in dark catalog
 CATEGORY: Preprocessing low level   
 CALLING SEQUENCE: find_ima, hdr, ima_db, ima_name
 INPUTS: hdr                              image header
         ima_db                           image catalog
 OPTIONAL INPUT PARAMETERS:               None
 KEYWORD PARAMETERS:                      None
 OUTPUTS:ima_name                         name of associated image in catalog
 OPTIONAL OUTPUT PARAMETERS:              None
 COMMON BLOCKS:                           None
 SIDE EFFECTS:                            None
 RESTRICTIONS:
 PROCEDURE:
 MODIFICATION HISTORY:   defined by ALL 6/24/93

			  corrected by M.B 11/03/93 for darks without shutter

 SCCS variables for IDL use

 @(#)find_ima.pro  1.0 25/6/93 :LAS


CALIB5[32]

[List of Routines] (See ./las-c2/calib5.pro)

 NAME:                        SET_CATALOG.PRO
 PURPOSE:                     Set a catalog of images in memory 
 CATEGORY:                    Preprocessing  high level routine  
 CALLING SEQUENCE:            SET_CATALOG
 INPUTS:                      template       Template For image names
                              db_dark        Liste of images
                              ndarks         Number of images in catalog
                              drk_name       Associate dark name
 OPTIONAL INPUT PARAMETERS:   None
 KEYWORD PARAMETERS:          None
 OUTPUTS:                     catalog list in the screen
 OPTIONAL OUTPUT PARAMETERS:  None
 COMMON BLOCKS:               None
 SIDE EFFECTS:                opens a catalog of darks if it don't exists
 RESTRICTIONS:
 PROCEDURE:
 MODIFICATION HISTORY:   defined by ALL 6/24/93

 SCCS variables for IDL use

 @(#)set_catalog.pro  1.0 25/6/93 :LAS


CALIB5[33]

[List of Routines] (See ./las-c2/calib5.pro)

 NAME:                           show_catalog.pro
 PURPOSE:                        list the catalog in memory 
 CATEGORY:                       Preprocessing    
 CALLING SEQUENCE:               SHOW_CATALOG
 INPUTS:                         None
 OPTIONAL INPUT PARAMETERS:      None
 KEYWORD PARAMETERS:             None
 OUTPUTS:                        catalog list in the screen
 OPTIONAL OUTPUT PARAMETERS:     None
 COMMON BLOCKS:                  CATA, db_dark, ndarks, drk_name
 SIDE EFFECTS:                   opens a catalog of darks if this dont exists
 RESTRICTIONS:
 PROCEDURE:
 MODIFICATION HISTORY:           defined by ALL 6/24/93

 SCCS variables for IDL use

 @(#)show_catalog.pro  1.0 25/6/93 :LAS


CALIB5[34]

[List of Routines] (See ./las-c2/calib5.pro)

 NAME:                            list_ima_param.pro
 PURPOSE:                         list the catalog in memory 
 CATEGORY:                        Preprocessing    
 CALLING SEQUENCE:                CHOOSE_DARK, drk_new_name, drk, hdrk
 INPUTS:                          template     Template of files names to list
 OPTIONAL INPUT PARAMETERS:       None
 KEYWORD PARAMETERS:              None
 OUTPUTS:                         catalog lis in the screen
 OPTIONAL OUTPUT PARAMETERS:      None
 COMMON BLOCKS:                   None
 SIDE EFFECTS:                    None
 RESTRICTIONS:
 PROCEDURE:
 MODIFICATION HISTORY:            defined by ALL 6/24/93

 SCCS variables for IDL use

 @(#)list_ima_param.pro  1.0 25/6/93 :LAS 


CALIB5[35]

[List of Routines] (See ./las-c2/calib5.pro)

 NAME:                           choose_dark.pro
 PURPOSE:                        defines a dark frame as the active dark 
 CATEGORY:                       Preprocessing    
 CALLING SEQUENCE:               CHOOSE_DARK, drk_new_name, drk, hdrk
 INPUTS                          drk_new_name    Name of dark array
 OPTIONAL INPUT PARAMETERS:      None
 KEYWORD PARAMETERS:             None
 OUTPUTS:                        drk             array of data
                                 hdrh            header of data array
 OPTIONAL OUTPUT PARAMETERS:     None
 COMMON BLOCKS:                  CATA, db_dark, ndarks, drk_name
 SIDE EFFECTS:                   fullfills the dark catalog common
                                 if it don't exists
 RESTRICTIONS:
 PROCEDURE:
 MODIFICATION HISTORY:           defined by ALL 6/24/93

 SCCS variables for IDL use

 @(#)choose_dark.pro  1.0 25/6/93 :LAS


CALIB5[36]

[List of Routines] (See ./las-c2/calib5.pro)

 NAME:                        get_drk_name.pro
 PURPOSE:                     founds de associate dark frame for 
                              a image and gets their name
 CATEGORY:                    Preprocessing high level    
 CALLING SEQUENCE:            get_drk_name, ima_name, drk_name
 INPUTS:                      ima_name                         Name of image
 OPTIONAL INPUT PARAMETERS:   None
 KEYWORD PARAMETERS:          None
 OUTPUTS: ass_name            Name of associate dark frame
 OPTIONAL OUTPUT PARAMETERS:  None
 COMMON BLOCKS:               CATA, db_dark, ndarks, drk_name
 SIDE EFFECTS:                1) defines de found dark as the active dark
                              2) fullfills the dark catalog common if it 
                                 don't exists
 RESTRICTIONS:
 PROCEDURE:
 MODIFICATION HISTORY:   defined by ALL 6/24/93

 SCCS variables for IDL use

 @(#)get_drk_name.pro  1.0 25/6/93 :LAS


CALIB5[37]

[List of Routines] (See ./las-c2/calib5.pro)

 NAME:                        DARK_CATA.pro
 PURPOSE:                     Set a catalog of darks in memory 
 CATEGORY:                    Preprocessing  high level routine  
 CALLING SEQUENCE:            SET_CATALOG
 INPUTS:                      None
 OPTIONAL INPUT PARAMETERS:   None
 KEYWORD PARAMETERS:          None
 OUTPUTS:                     catalog list in the screen
                              Modifies CATA common
 OPTIONAL OUTPUT PARAMETERS:  None
 COMMON BLOCKS:               CATA, db_dark, ndarks, drk_name
 SIDE EFFECTS:
 RESTRICTIONS:
 PROCEDURE:
 MODIFICATION HISTORY:   defined by ALL 6/24/93

 SCCS variables for IDL use

 @(#)set_catalog.pro  1.0 25/6/93 :LAS
 


CALIB5[38]

[List of Routines] (See ./las-c2/calib5.pro)

 NAME:                        pro_cal.pro
 PURPOSE:                     get in memory an image and 
                              substracts the right dark 
 CATEGORY:                    Preprocessing high level routine   
 CALLING SEQUENCE:            PRO_CAL, ima_name, drk, hdrk, iout, hout
 INPUTS:                      ima_name       Name of image to process
 OPTIONAL INPUT PARAMETERS:   None
 KEYWORD PARAMETERS:          None
 OUTPUTS:                     drk            Associate dark array
                              hdrk           Associate header of dark
                              iout           Corrected image array
                              hout           Header for corrected image array
 OPTIONAL OUTPUT PARAMETERS:  None
 COMMON BLOCKS:               CATA, db_dark, ndarks, drk_name
 SIDE EFFECTS:                opens a catalog of darks if this doesn't exist
                              and associates a dark to frame
 RESTRICTIONS:
 PROCEDURE:
 MODIFICATION HISTORY:        defined by ALL 6/24/93
			       rewritted and corrected by M.B 11/04/93

 SCCS variables for IDL use

 @(#)pro_cal.pro  1.0 25/6/93 :LAS


CALIB5[3]

[List of Routines] (See ./las-c2/calib5.pro)

 NAME:                    define_C1_Hdr
 PURPOSE:                 defines the C1 (PF) header structure
 CATEGORY:                General tools Low level routine 
 CALLING SEQUENCE:        h=define_C1_hdr (0)
 INPUTS:                  None
 OPTIONAL INPUT PARAMETERS:    None
 KEYWORD PARAMETERS:      None
 OUTPUTS:                 h    struct. array containing initialized an header
 OPTIONAL OUTPUT PARAMETERS:
 COMMON BLOCKS:           none
 SIDE EFFECTS:
 RESTRICTIONS:
 PROCEDURE:
 MODIFICATION HISTORY:   define_ccd_hdr RAH 10/1/89
 RAH 8/20/91             define_ccd_hdr Added AES BSBD camera keywords
 ALL 6/24/93  Remove common, changes to define_C1_hdr

 SCCS variables for IDL use

 @(#)define_c1_hdr.pro  1.1 7/6/92 :NRL Solar Physics


CALIB5[4]

[List of Routines] (See ./las-c2/calib5.pro)

 NAME:                  define_cal_hdr
 PURPOSE:               defines header structure for cal. images of C2 and C3
 CATEGORY:              General tools low level routines
 CALLING SEQUENCE:      h=define_cal_hdr (0)
 INPUTS:                None
 OPTIONAL INPUT PARAMETERS:    None
 KEYWORD PARAMETERS:    None
 OUTPUTS:               h struct. array containing initialized an header
 OPTIONAL OUTPUT PARAMETERS:
 COMMON BLOCKS:         none
 SIDE EFFECTS:
 RESTRICTIONS:
 PROCEDURE:
 MODIFICATION HISTORY:   define_ccd_hdr RAH 10/1/89
 RAH 8/20/91             define_ccd_hdr Added AES BSBD camera keywords
 ALL 6/24/93  Remove common, changes to define_cal_hdr

 SCCS variables for IDL use

 @(#)define_ccd_hdr.pro  1.1 7/6/92 :NRL Solar Physics


CALIB5[5]

[List of Routines] (See ./las-c2/calib5.pro)

 NAME:                   define_BSC_Hdr
 PURPOSE:                defines the basic header structure for lasco images
 CATEGORY:               General tools low level routine
 CALLING SEQUENCE:       h=define_bsc_hdr (0)
 INPUTS:                 None
 OPTIONAL INPUT PARAMETERS:    None
 KEYWORD PARAMETERS:     None
 OUTPUTS:                struct. array containing initialized an header
 OPTIONAL OUTPUT PARAMETERS:
 COMMON BLOCKS:          none
 SIDE EFFECTS:
 RESTRICTIONS:
 PROCEDURE:
 MODIFICATION HISTORY:   RAH 10/1/89
 RAH 8/20/91  Added AES BSBD camera keywords
 ALL 6/24/93  Remove common, adapts for a basic set of KEYWORDS

 SCCS variables for IDL use

 @(#)define_bsc_hdr.pro  1.1 7/6/92 :NRL Solar Physics


CALIB5[6]

[List of Routines] (See ./las-c2/calib5.pro)

 NAME:                         define_CCD_Hdr
 PURPOSE:                      defines the CCD header structure
 CATEGORY:                     CCD low level routine
 CALLING SEQUENCE:             h=define_CCD_hdr (0)
 INPUTS:                       None
 OPTIONAL INPUT PARAMETERS:    None
 KEYWORD PARAMETERS:           None
 OUTPUTS:                      struct. array containing initialized an header
 OPTIONAL OUTPUT PARAMETERS:
 COMMON BLOCKS:                ccd_header,header,nt,tags
                               header = the header structure
                               nt = number of elements in the header
                               tags = string array of names of header items
 SIDE EFFECTS:
 RESTRICTIONS:
 PROCEDURE:
 MODIFICATION HISTORY:         RAH 10/1/89
                               RAH 8/20/91  Added AES BSBD camera keywords

 SCCS variables for IDL use

 @(#)define_ccd_hdr.pro        1.1 7/6/92 :NRL Solar Physics


CALIB5[7]

[List of Routines] (See ./las-c2/calib5.pro)

 NAME:                 read_ima_hdr
 PURPOSE:              function procedure to read header from disk file, f
                       and store in a standard header structure type
 CATEGORY:             BASIC_INTERFACES
 CALLING SEQUENCE:     read_ima_hdr,ima_name,ima_header
 INPUTS:               ima_name = string containing the header filename
                       ima_header = structure
                       verbose = 1, print all absent variables
                       verbose = 0, print only a resumee
 OPTIONAL INPUT PARAMETERS:    None
 KEYWORD PARAMETERS:   None
 OUTPUTS:              ima_header = header structure from disk
 OPTIONAL OUTPUT PARAMETERS:
 COMMON BLOCKS:        None
 SIDE EFFECTS:
 RESTRICTIONS:
 PROCEDURE:
 MODIFICATION HISTORY:         RAH 10/1/89, ACG 11/21/89, rah 1/9/91
                               rah 3/15/91 to account for unrecognized keyword
                               rah 8/20/91 to trim leading and trailing blanks
                               DW  8/27/91 change delimiter to '='
                               DW  2/26/93 put TEMP_FNG in TEMP as well
                               All 4/25/93 for VMS image files in general
                                           Common supression
 SCCS variables for IDL use

 @(#)read_ima_header.pro       1.3 4/10/93 :NRL Solar Physics


CALIB5[8]

[List of Routines] (See ./las-c2/calib5.pro)

 NAME:                         READ_IMA_FRAME
 PURPOSE:                      reads a image frame from disk
 CATEGORY:                     BASIC_INTERFACE
 CALLING SEQUENCE:             a = read_ima_frame(name,bitpix,nx,ny)
 INPUTS:                       name = string of the name of the file to read
                               bitpix = nb of bits/pixel
                               nx =  nb de pixels en x
                               ny =  nb de pixels en y
 OPTIONAL INPUT PARAMETERS:    None
 KEYWORD PARAMETERS:           None
 OUTPUTS:                      a = array containing the image
 OPTIONAL OUTPUT PARAMETERS:   None
 COMMON BLOCKS:                None
 SIDE EFFECTS:
 RESTRICTIONS:
 PROCEDURE:
 MODIFICATION HISTORY:         RAH 7/2/90
                               rah 3/21/90 to account for non-integer input fil
                               es
                               rah 3/33/90 to check for datamax & datamin
                               ALL 5/12/93
 SCCS variables for IDL use

 @(#)read_ima_frame.pro        1.3 4/10/93 :NRL Solar Physics


CALIB5[9]

[List of Routines] (See ./las-c2/calib5.pro)

 NAME:                         read_ima
 PURPOSE:                      reads a image and their header
 CATEGORY:                     BASIC_INTERFACES
 CALLING SEQUENCE:             ima = read_ima(ima_name, hdrima, ichoice)
 INPUTS:                       ima_name  Name of image
                               hdrima    Header structure
                               ichoice   Type of header
                                         0 = IMA, 1 = BSC, 2=CAL, 3=C1
                                         4 = CCD. else external header
 OPTIONAL INPUT PARAMETERS:    None
 KEYWORD PARAMETERS:           None
 OUTPUTS:                      ima       Image frame
                               hdrima    Filled header structure
 OPTIONAL OUTPUT PARAMETERS:
 COMMON BLOCKS:                None
 SIDE EFFECTS:
 RESTRICTIONS:
 PROCEDURE:
 MODIFICATION HISTORY:         RAH 10/1/89
                               RAH 8/20/91  Added AES BSBD camera keywords
                               ALL 04/27/93 takes only standard KEYWORDS

 SCCS variables for IDL use

 @(#)read_ima.pro      1.1 7/6/92 :NRL Solar Physics


CALIB_C3_SQIMA.PRO

[List of Routines] (See ./reduce/las_c3/calib_c3_sqima.pro)

 PROJET:
     SOHO-LASCO

 NAME:
     calib_c3_sqima.pro

 PURPOSE:
    Prepare a clean C3 image (image must be square)

 USE:
    calib_c3_sqima,imain,bias,exptime,imacorr,irebin,izero,nzero,c3msk,coef,jpix,prfle_xy,bkgd, $
                   IPIXN=ipixn, JPIXN=jpixn, IPOS=ipos, THRESH=thresh, vig_c3=vig_c3

 INPUT:
    imain          image get from a readfits(name,hdr) for instance
    bias           bias value
    exptime        time exposure
    irebin         rebin level          :  1 1024x1024; 2 512x512; 3 256x256
    leb_rebin      rebin level from LEB

 KEYWORD INPUT:
    THRESH=thresh  treshold to add (default = 0.)
    VIG_C3=vig_c3  vignetting correction array

 OUTPUT:
    imacorr        corrected image (background gradient and photometry)
    izero          list of zero values (from not transmited blocks)
    nzero          number of zero values
    c3msk          mask of values for C3

 KEYWORD OUTPUT:
    IPIXN=ipixn    for verification of get_c3_bkgd (debug purposes)
    JPIXN=jpixn    for verification of get_c3_bkgd
    IPOS=ipos      for verification of get_c3_bkgd

 RESTRICTIONS:
    works only with square images

 MODIFICATIONS:
	nbr, 11/30/00 - Compute vig_c3 separately before multiplying


CARRDATE[1]

[List of Routines] (See ./synoptic/carrdate.pro)

 NAME:
	CARRDATE

 PURPOSE:
	This function converts a carrington number and longitude into a 
       CDS date structure.

 CATEGORY:
	LASCO Synoptic

 CALLING SEQUENCE:
	Result = CARRDATE ( Cr, Clong)

 INPUTS:
	Cr:	Carrington Rotation Number
	Clong:	Carrington Longitude

 OPTIONAL INPUTS:
	None

 KEYWORDS:
	EL:	This keyword specifies that the date should be returned as an 
		East Limb Date
	WL:	This keyword specifies that the date should be returned as a 
		West Limb Date
	CMP:	This keyword specifies that the date should be returned as a 
		central meridian Date.  This is the default.

 OUTPUTS:
	Result:	The function result is the date as a CDS date structure
	
 COMMON BLOCKS:
	carr_long:	Contains the start date of the carrington rotations 
			from the almanac.  Generated by READ_CARR_LONG

 MODIFICATION HISTORY:
 	Written by:	RA Howard, NRL, 3/18/96
       10/17/96        RAH, Added check for cday being defined
			   , Changed output to CDS structure

	@(#)carrdate.pro	1.3 10/17/96 LASCO IDL LIBRARY


CARRDATE[2]

[List of Routines] (See ./synoptic/carrdate2.pro)

 NAME:
	CARRDATE

 PURPOSE:
	This function converts a carrington number and longitude into a 
       date.

 CATEGORY:
	LASCO Synoptic

 CALLING SEQUENCE:
	Result = CARRDATE ( Cr )

 INPUTS:
	Cr:	Carrington Rotation Number

 OPTIONAL INPUTS:
	None

 KEYWORDS:
	EL:	This keyword specifies that the date should be returned as an 
		East Limb Date
	WL:	This keyword specifies that the date should be returned as a 
		West Limb Date
	CMP:	This keyword specifies that the date should be returned as a 
		central meridian Date.  This is the default.
	Clong:	Carrington Longitude

 OUTPUTS:
	Result:	The function result is returned as a fractional modified
		Julian date.
	
 COMMON BLOCKS:
	carr_long:	Contains the start date of the carrington rotations 
			from the almanac.  Generated by READ_CARR_LONG

 MODIFICATION HISTORY:
 	Written by:	RA Howard, NRL, 3/18/96

	11/20/96 by N. RIch	added read_carr_long call if cday=0; changed 
				cday(n-1) to cday(n) and cday(n) to cday(n+1); 
				made dte variable same as day; initialized clong
				to 360 if not set and change clong to keyword;
				changed +/- in computing el and wl day
	12/30/96 by N. Rich	changed output to CDS structure

	@(#)carrdate.pro	1.1 10/05/96 LASCO IDL LIBRARY


CARRLONG

[List of Routines] (See ./synoptic/carrlong.pro)

 NAME:
	CARRLONG

 PURPOSE:
	This procedure computes the carrington number and longitude given the 
	date.

 CATEGORY:
	LASCO Synoptic

 CALLING SEQUENCE:
	CARRLONG, Date, Cr, Clong

 INPUTS:
	Date:	The date in CDS date/time structure

 OPTIONAL INPUTS:
	None
	
 KEYWORD PARAMETERS:
	EL:	Set this keyword to obtain information for East Limb date

	WL:	Set this keyword to obtain information for West Limb date

	CMP:	Set this keyword to obtain information for central meridian    
		This is the default.

 OUTPUTS:
	Cr:	The carrington rotation number corresponding to the input date
	Clong:	The carrington longitude corresponding to the input date

 COMMON BLOCKS:
	carr_long:	Contains the start date of the carrington rotations from
			the almanac.  Generated by READ_CARR_LONG

 EXAMPLE:
	CARRLONG, date, cnum, clong, /EL

 MODIFICATION HISTORY:
 	Written by:	RA Howard, NRL, 3/18/96
	10/17/95		RAH, Converted dates to CDS time structure
	13/10/00	nbr, Changed "tai LT cday" to "tai LE cday"

	@(#)carrlong.pro	1.4 11/05/01 LASCO IDL LIBRARY


CARRMAPDISP

[List of Routines] (See ./synoptic/carrmapdisp.pro)

ro carrmapdisp, limb, r, RANGE=range, VERTICAL=vertical, CMAPDIR=cmapdir

 Purpose:	Display carrington maps in a scrollable format

 (NOTE: previous carrmapdisp.pro renamed carrmapdisp0.pro)

 Optional Inputs:
	limb	STRING	'w', 'e' or search parameter
	r	FLOAT	height of desired map
 
 KEYWORDS:
	RANGE = [cn0, cn1]	INTARR	range of carrington numbers to display
	/VERTICAL	If set, display maps stacked, not side-by-side
	CMAP='/path/of/fits/files'	defaults to location at NRL

 Written 980917 by Nathan Rich, Interferometrics/NRL
  030821, nbr - add RANGE, vertical display options, rename from slide_carrmap.pro
  030829, nbr - fix bug in list=findfile()

 @(#)carrmapdisp.pro	1.2 09/02/03 - LASCO NRL IDL Library


CARRMAPMAKER2

[List of Routines] (See ./synoptic/carrmapmaker2.pro)

Procedure:	CARRMAPMAKER2

PURPOSE: 
     Returns carrington maps at multiple radii for a passed 
     carrington number at radii read from user in this routine. 
     Program only works for maps beginning after 
     January,6 1996.

INPUTS:
     	cn	INT:	carrington number
	cam	STRING:	camera, i.e. 'c2'
	num_r	INT:	number of radii to make maps for
	rad	FLTARR(num_r):		radii for maps
	cmap	FLTARR(mapsize,ht,num_r):	passed empty
	pol	STRING:	'p','u' or ''; indicates polarizer value
	limb	INTARR:	0 or 1 tells which limb for carrdate procedure
	level	STRING:	'ql' for quick-look, 'r' for doing ratio
	disp	INT:	1 to display images
	wlimb	STRING:	'wl' or 'el'
	hdr	STRUCT: dummy header sent back to carrmap3 for fits header

KEYWORDS:
	FULL360		If set, go all the way around, not just 180 deg.
	MAP_SIZE	IF set, then use it's value for horizontal size

	This routine can ask the user for each radius. 

 OUTPUTS:	rad = fltarr(num_r)	:	radii of maps
		cmap = fltarr([360 or 720],ht,num_r):	carrington maps, one per radius
		

ROUTINES CALLED:
    qdb.pro
    carrdate2.pro
    resize2.pro
    getc2c3norm2.pro

 AUTHOR:	Nathan Rich, NRL, Nov. 1996
		Julia Kraemer, NRL, June 7, 1996

 MODIFIED:
 961129 by N. RIch	each image subtends one pixel; checks for other
 			values of val0 if 0 when k=0
 961203 by N. RIch	if more than one pixel between images, use 
 			congrid to fill space
 961206 by N. Rich	Create log file; rotate images from 960521;
 			Check median = 85 (for 1024x576 images)
 961209 by N. Rich	change CONGRID statement; moved carrmap_x
 			increment statement to after validity check
 961210 by N. Rich	print time0 and time1; if mapdelta GT 10, don't
			do congrid
 961211 by N. Rich	skip bad files
 961213 by N. Rich	add level variable; if mapdelta GT 20, don't do
 			congrid; check for forward time
 961217 by N. Rich	add disp variable for displaying image
 970102 by N. Rich	make time units consistent
 970103 by N. Rich	rotate images for Nov. 21,22
 970103 by N. Rich	add white strip to top of gaps

 970108 by J. Kraemer	add east limb option
 970123 by N. Rich	changed to val0(r)=median(strip(115:135))
 970213 by N. Rich	changed check for Out of Order
 970226 by N. Rich	do normalization for whole image rather than
 			each strip
 970311 by N. Rich	make map display scale vary with camera
 970402 by N. RIch	add empty space to final columns if no images
 970414 by N. Rich	accept c1 images for Clarence
 9705   by N. Rich	use c1 images generally
 970714 by N. Rich	change criteria for data gaps
 970715 by N. Rich	fix final gap coverer
 970722 by N. Rich	check each strip against previous and reject
			image if it is too different
 970730 by N. Rich	sort s by date_obs
 970801 by N. Rich	skip image if mapdelta LE 0
 970807 by N. Rich	scan strip ends; move imdisplay part around
 970827 by N. Rich	change scale; modify name of log files
 970915 by N. Rich	add get_im common block, compute ff_ratio; change
			cx,cy for c1
 971021 by N. Rich	compute rconv for each image separately for c2 and c3
 971103 by N. Rich	prompt for mapsize
 971107 by N. Rich	move log print line; prompt for median skip; don't  
			check image median
 971110 by N. Rich	add skiplast variable
 971114 by N. Rich	use strip files if available
 971216 by N. Rich	make automatic (auto-enter radii, mapsize)
 971217 by N. Rich	if error in readfits, enter in log
 980212 by N. Rich	added variable boxes for normalization
 980312 by N. Rich	cancel box normalization; auto choose mapsize
 980313 by N. Rich	do not multiply image by constant (of about 0.12)
 980413 by N. Rich	use m = median(im(*,y21:y12))
 980514 by N. Rich	change upper limit of strip median, ends
 980610 by N. Rich	extend warpit COMMON block for fits header
 980612 by N. Rich	pass rad (radii) already full
 980629 by N. Rich	use reduce_std_size instead of resize2
 981216 by N. Rich	Use ht variable instead of 181 for mapheight
 990114 by N. Rich	Add FULL360 keyword
 Feb 2000 by N. RIch	Remove source from query; change GET_BKG init.; 
			Base level on LZ keyword, levelstr; Replace strip with
			strp to avoid IDL conflict
 Apr 2000, NBR, Add half a column's time to t_start; always use first image (k=0)
 May 2000, NBR, Use mk_img instead of getc123; don't use avg_strip_ends
 Aug 2000, NBR, Add MAP_SIZE keyword and take it out of common block; compare strip,stripends
 2001.11.05, NBR - Add SCCS version tag
 2002.03.14, NBR - Add skipwait, medianhist, variable sunc from mk_img, roll in mk_img
 2002.09.03, nbr - Expand logging, add l1 to COMMON get_im

     09/08/03 @(#)carrmapmaker2.pro	1.6 - IDL NRL LASCO Library


CAT_PHASER

[List of Routines] (See ./util/cat_phaser.pro)

 NAME:
	CAT_PHASER

 PURPOSE:
	This procedure displays 64x64 fits images on phaser for cataloging

 CATEGORY:
	UTIL

 CALLING SEQUENCE:
	CAT_PHASER, Fname

 INPUTS:
	Fname:	root name of the fits images to search for
		eg:  fname = 'c1' will search for all files whose
			file names begin with c1: c1*.fts

 OUTPUTS:
	An IDL plot file is generated.

 PROCEDURE:
	A 512 x 512 plotting area is established, and a series of 64 x 64 
	images are displayed.

 EXAMPLE:
	To display the series of 

 MODIFICATION HISTORY:
 	Written by:	RA Howard, NRL, 12 Jan 1996

	@(#)cat_phaser.pro	1.1 10/05/96 LASCO IDL LIBRARY


CC0

[List of Routines] (See ./exposure/cc0.pro)

 CC0 - cross correlation at zero offset of 2 images.


CDF_CAT_FILE

[List of Routines] (See ./astrometry/ephemeris/cdf_cat_file.pro)

NAME:
	cdf_cat_file
PURPOSE:
	Print information about a CDF to an ASCII file.
CALLING SEQUENCE:
	cdf_cat_file,cdfname,file
INPUTS:
	cdfname: name of CDf to be opened.
	file: name of ASCII file to be created (defaults to
	cdf_info.dat).
HISTORY:
	Adapted from routine cdf_cat in IDL distribution.
	Simon Plunkett, 29 March 1996.


CDS2JD

[List of Routines] (See ./util/cds2jd.pro)

 Project     : SOHO - CDS     
                   
 Name        : CDS2JD()
               
 Purpose     : Converts any CDS time format to full Julian day.
               
 Explanation : Converts any CDS time format to the equivalent Julian
               day value.  Returns result in a structure with the
               tags int (long) and frac (double).
               
 Use         : IDL>  jd = cds2jd(any_format)
    
 Inputs      : any_format - date/time in any of the acceptable CDS 
                            time formats -- for acceptable formats see file 
                            aaareadme.txt.
               
 Opt. Inputs : None
               
 Outputs     : Function returns JD in a structure {int:0L,frac:0.0d0}.
               
 Opt. Outputs: None
               
 Keywords    : ERRMSG  =  If defined and passed, then any error messages will
                          be returned to the user in this parameter rather 
                          than being printed to the screen.  If no errors are
                          encountered, then a null string is returned.  In 
                          order to use this feature, the string ERRMSG must 
                          be defined first, e.g.,

                             ERRMSG = ''
                             JD = CDS2JD ( DT, ERRMSG=ERRMSG, ...)
                             IF ERRMSG NE '' THEN ...

 Calls       : ANYTIM2UTC, INT2UTC, JULDAY

 Common      : None
               
 Restrictions: None
               
 Side effects: None
               
 Category    : Util, time
               
 Prev. Hist. : None

 Written     : C D Pike, RAL, 16-May-94
               
 Modified    :	Version 1, C D Pike, RAL, 16-May-94
		Version 2, William Thompson, GSFC, 14 November 1994
			Changed .DAY to .MJD
		Version 3, Donald G. Luttermoser, GSFC/ARC, 20 December 1994
			Added the keyword ERRMSG.  Included ON_ERROR flag.
		Version 4, Donald G. Luttermoser, GSFC/ARC, 30 January 1995
			Added ERRMSG keyword to internally called procedured.
			Made error handling routine more robust.
		Version 5, Donald G. Luttermoser, GSFC/ARC, 13 February 1995
			Allowed for input to be either scalar or vector.

 Version     :	Version 5, 13 Februaryy 1995


CDS_GEN_HELP

[List of Routines] (See ./util/cds_gen_help.pro)

 NAME:
	CDS_GEN_HELP

 PURPOSE:
	This procedure goes through all the LASCO IDL directories and
       generates a help file in HTML format of the form help_.html

 CATEGORY:
	
	Utility

 CALLING SEQUENCE:

	CDS_GEN_HELP

 INPUTS:
       NONE
	
 KEYWORD PARAMETERS:
       NONE

 OUTPUTS:
       HTML Help Files in each directory are generated

 EXAMPLE:

	CDS_GEN_HELP

 MODIFICATION HISTORY:
 	Written by:	Dennis Wang
       Created: 2 Feb 2001

	%W% %H% LASCO IDL LIBRARY


CENTERTLB

[List of Routines] (See ./dfanning/centertlb.pro)

 NAME:
       CENTERTLB

 PURPOSE:

       This is a utility routine to position a widget program
       on the display at an arbitrary location. By default the
       widget is centered on the display.

 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:

       CenterTLB, tlb, [x, y, /NOCENTER]

 REQUIRED INPUTS:

       tlb: The top-level base identifier of the widget program.

 OPTIONAL INPUTS:

       x:  Set this equal to a normalized position for the center
       of the widget as measured from the left-hand side of the screen.
       The default value is 0.5 (the center)  Setting this equal to 1.0
       places the widget at the far right-hand side of the screen.

       y:  Set this equal to a normalized position for the center
       of the widget as measured from the bottom of the screen.
       The default value is 0.5 (the center) Setting this equal to 1.0
       places the widget at the top of the screen.

 KEYWORDS:

      NOCENTER:  By default, the center of the widget is positioned at the
      location specified by the x and y parameters.  If NOCENTER is set
      to a non-zero value, then the upper left corner of the widget
      is postioned at the specifed location.

 PROCEDURE:

       The program should be called after all the widgets have
       been created, but just before the widget hierarchy is realized.
       It uses the top-level base geometry along with the display size
       to calculate offsets for the top-level base that will center the
       top-level base on the display.

 COMMENT:
       Regardless of the values set for x, y and NOCENTER, the widget
       is not permitted to run off the display.

 MODIFICATION HISTORY:

       Written by:  Dick Jackson, 12 Dec 98.
       Modified to use device-independent Get_Screen_Size
            function. 31 Jan 2000. DWF.
       Added x, y, NOCENTER and run-off protection. 26 Jan 2001. BT.

###########################################################################

 LICENSE

 This software is OSI Certified Open Source Software.
 OSI Certified is a certification mark of the Open Source Initiative.

 Copyright © 1998-2000 Fanning Software Consulting

 This software is provided "as-is", without any express or
 implied warranty. In no event will the authors be held liable
 for any damages arising from the use of this software.

 Permission is granted to anyone to use this software for any
 purpose, including commercial applications, and to alter it and
 redistribute it freely, subject to the following restrictions:

 1. The origin of this software must not be misrepresented; you must
    not claim you wrote the original software. If you use this software
    in a product, an acknowledgment in the product documentation
    would be appreciated, but is not required.

 2. Altered source versions must be plainly marked as such, and must
    not be misrepresented as being the original software.

 3. This notice may not be removed or altered from any source distribution.

 For more information on Open Source Software, visit the Open Source
 web site: http://www.opensource.org.

###########################################################################


CHANDLE

[List of Routines] (See ./display/chandle.pro)

 Project     : SOHO - LASCO

 Name        : CHANDLE

 Purpose     : 

 Category    : DISPLAY

 Explanation : 

 Syntax      : 

 Examples    : 

 Inputs      : None

 Opt. Inputs : None

 Outputs     : None

 Opt. Outputs: None

 Keywords    : None

 Common      : 

 Restrictions:                                  

 Side effects: Not known

 History     : Version 1, 02-Sep-1995, B Podlipnik. Written

 Contact     : BP, borut@lasco1.mpae.gwdg.de


CHECK_EXP_FACTOR_DUPS

[List of Routines] (See ./expfac/check_exp_factor_dups.pro)

 NAME:
	CHECK_EXP_FACTOR_DUPS

 PURPOSE:
	This procedure reads the exposure factor file for a given date
	and then writes it back out, eliminating any duplicate entries.

 CATEGORY:
	EXPFAC

 CALLING SEQUENCE:
	CHECK_EXP_FACTOR_DUPS,Tel,YYMMDD

 INPUTS:
	Tel:		String indicating the telescope, 'c1','c2','c3'
	Date:		Date for which the exposure factors are wanted
			can be in either YYMMDD, MJD, or CDS time structure

 COMMON BLOCKS:
	EXP_FACTOR_ARRAY:	The exposure facotor information for a given 
			date.

 PROCEDURE:
	READ_EXP_FACTOR is called to readin the exposure factor file for
	the specified date.  Then WRITE_EXP_FACTOR is called to write
	it back out.  Note that READ_EXP_FACTOR eliminates duplicates.

 MODIFICATION HISTORY:
 	Written by:	RA Howard, NRL, 22 Feb 1998

 @(#)check_exp_factor_dups.pro	1.1 02/22/98 :LASCO IDL LIBRARY


CHECK_FILENAME[1]

[List of Routines] (See ./las-c2/calib5.pro)

 NAME:
                        check_filename
 PURPOSE:
                        Removes the extension and path from the filename
                        if present

 CALLING SEQUENCE:
                        check_filename,filename
                        check_filename,filename,path,extension

 INPUTS:
                        filename = string to be checked (may be a string array)

 OUTPUTS:
                        filename will be returned without extension and path

 OPTIONAL OUTPUTS:
                        path      = path name
                        extension = extension not including decimal point

 MODIFICATION HISTORY:
                        RAH 10/1/89
                        rah 3/28/91 added array input for filename
                        ALL 5/15/93 adapted to VMS
 SCCS variables for IDL use

 @(#)check_filename.pro        1.1 7/6/92 :NRL Solar Physics


CHECK_FILENAME[2]

[List of Routines] (See ./util/check_filename.pro)

 NAME:
                        check_filename
 PURPOSE:
                        Removes the extension and path from the filename if present

 CALLING SEQUENCE:
                        check_filename,filename
                        check_filename,filename,path,extension

 INPUTS:
                        filename = string to be checked (may be a string array)

 OUTPUTS:
                        filename will be returned without extension and path

 OPTIONAL OUTPUTS:
                        path      = path name 
                        extension = extension not including decimal point

 MODIFICATION HISTORY:
                        RAH 10/1/89
                        rah 3/28/91 added array input for filename
 SCCS variables for IDL use
 
 @(#)check_filename.pro	1.1 7/6/92 :NRL Solar Physics


CHECK_IMGDIR[1]

[List of Routines] (See ./las-c2/calib5.pro)

 NAME:
                               check_imgdir
 PURPOSE:
                               checks !imgdir for a / on the end
 CALLING SEQUENCE:
                               check_imgdir

 INPUTS:                       None
 OPTIONAL INPUT PARAMETERS:    None
 KEYWORD PARAMETERS:           None

 PROCEDURE:
                               if !imgdir does not end with / then puts one on

 MODIFICATION HISTORY:         RAH 3/26/91
                               ALL 5/15/93   adapted to VAX VMS
 SCCS variables for IDL use

 @(#)check_imgdir.pro  1.1 7/6/92 :NRL Solar Physics


CHECK_IMGDIR[2]

[List of Routines] (See ./util/check_imgdir.pro)

 NAME:
                               check_imgdir	
 PURPOSE:
                               checks !imgdir for a / on the end	
 CALLING SEQUENCE:
                               check_imgdir

 INPUTS:			None
 OPTIONAL INPUT PARAMETERS:	None
 KEYWORD PARAMETERS:		None

 PROCEDURE:
                               if !imgdir does not end with / then puts one on

 MODIFICATION HISTORY:		RAH 3/26/91
 SCCS variables for IDL use
 
 @(#)check_imgdir.pro	1.1 7/6/92 :NRL Solar Physics


CHECK_MONEXP_DUPS

[List of Routines] (See ./expfac/check_monexp_dups.pro)

 NAME:
	CHECK_MONEXP_DUPS

 PURPOSE:
	Check for duplicate entries in MONEXP data

 CATEGORY:
	LASCO EXPFAC

 CALLING SEQUENCE:
	CHECK_MONEXP_DUPS,Tel,Datea

 INPUTS:
	Datea:	String giving the starting date, '980401'

 OPTIONAL INPUTS:
	Dateb:	String giving the ending date, '980401'.  If not present, then
		the ending date is the starting date.
	
 COMMON BLOCKS:
	MONEXP_DATA

 PROCEDURE:
	The MONEXP data file for the specified dates and all telescope are checked
	for duplicate entries by checking to see if two entries have the same 
	time of exposure.  If there are any duplicates then the file is rewritten
	using the latest MONEXP entry in the data file.

 EXAMPLE:
	To check a single date:
		CHECK_MONEXP_DUPS,'c3','980201'
	To check a range of dates:
		CHECK_MONEXP_DUPS,'c3','980201','980204'

 MODIFICATION HISTORY:
 	Written by:	RA Howard, NRL, 6 June, 1998

	@(#)check_monexp_dups.pro	1.1 06/08/98 LASCO IDL LIBRARY


CHECK_OBESUMERROR

[List of Routines] (See ./reduce/check_obesumerror.pro)

 NAME:
	CHECK_OBESUMERROR

 PURPOSE:
	Checks for OBE error when doing LEB summing

 CATEGORY:
	Reduce

 CALLING SEQUENCE:
	CHECK_OBESUMERROR,A,Hdr

 INPUTS:
	A:	Image to be checked
	Hdr:	FITS Header 

 KEYWORD PARAMETERS:
	FIXIT:	If present, fixes the LEBXSUM and LEBYSUM keywords

 PROCEDURE:
	An error was discovered in OBE beginning 6 March 1997.
	It started after sending a command to sum difference in EIT images.
 	The result was that the LEB summing parameter in the header was not
  	being set to the proper value.  It always read 1, even though the
  	summing was performed.

 MODIFICATION HISTORY:
	RA Howard, NRL, 24 March 97

	@(#)check_obesumerror.pro	1.1 05/14/97 LASCO IDL LIBRARY


CHECK_PRO_NAMES

[List of Routines] (See ./util/check_pro_names.pro)

 NAME:
	CHECK_PRO_NAMES

 PURPOSE:
	This procedure checks for duplicate procedure names in $NRL_LIB

 CATEGORY:
	LASCO UTIL

 CALLING SEQUENCE:
	CHECK_PRO_NAMES

 INPUTS:
	None
	
 KEYWORD PARAMETERS:
	LASCO:	Set this keyword to only print duplicates if they also occur
		underneath the lasco directory.

 OUTPUTS:
	This procedure writes the results to a file 'duplicate_pros.txt' in
	the users home directory.

 PROCEDURE:
	All files with pro in their name are found using the find commadn
	Then only files ending in .pro and which are not in teh SCCS directory
	are saved.  Duplicate file names are then located using the where 
	function.

 MODIFICATION HISTORY:
 	Written by:	RA Howard, NRL, 7 March 1997

	@(#)check_pro_names.pro	1.1 09/26/97 LASCO IDL LIBRARY


CHK_H4S

[List of Routines] (See ./display/chk_h4s.pro)

 Project     : SOHO - LASCO

 Name        : 

 Purpose     : 

 Category    : 

 Explanation : 

 Syntax      : 

 Examples    : 

 Inputs      : None

 Opt. Inputs : None

 Outputs     : None

 Opt. Outputs: None

 Keywords    : None

 Common      : 

 Restrictions:                                  

 Side effects: Not known

 History     : Version 1, 02-Sep-1995, B Podlipnik. Written

 Contact     : BP, borut@lasco1.mpae.gwdg.de


CINDEX

[List of Routines] (See ./dfanning/cindex.pro)

 NAME:
       CIndex

 PURPOSE:
       This is a program for viewing the current colors in the
       colortable with their index numbers overlayed on each color.
       On 24-bit systems you must click the cursor in the graphics window
       to see the colors in the current color table.

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

 CATEGORY: Graphics

 CALLING SEQUENCE:  CIndex

 INPUTS:   None.

 Optional Inputs:   None

 OUTPUTS:  None

 OPTIONAL OUTPUTS:  None

 KEYWORD Parameters:   None

 COMMON BLOCKS:  None

 SIDE EFFECTS:   None

 RESTRICTIONS:   Reqires XCOLORS and TVIMAGE from the Coyote Library:

                     http://www.dfanning.com/programs/xcolors.pro
                     http://www.dfanning.com/programs/xtvimage.pro

 PROCEDURE:

  Draws a 31x25 set of small rectangles in 256 different colors.
  Writes the color index number on top of each rectangle.

 MODIFICATION HISTORY:  Written by David Fanning, May 1995

  Widgetized and made it work in 24-bit color. Colors are
     updated by clicking in window. 22 Oct 98. DWF
  Replace POLYFILL with TV command to avoid underflow error in
     Z-buffer. 8 March 99. DWF
  Fixed a problem with 24-bit devices with color decomposition ON. 15 Feb 2000. DWF.
	2/5/04, nbr - 	Change procedure calls for pros renamed for SSW 
			compatability


CMAP2GIF

[List of Routines] (See ./synoptic/cmap2gif.pro)

unction cmap2gif, ftsfile, maxd,mind, ROOT=root, CONTROL=control

 Converts a FITS carrington map into a byte array with scaled image and labeled axes.
 See front end called make_cmap_gifs.pro.

 INPUTS
  ftsfile	STR  The name of the carrington map FITS file.

 OPTIONAL INPUTS:
  maxd, mind	FLOAT	Scale min and max

 KEYWORDS
  CONTROL	If set, interactively choose max/min for bytscl
  ROOT		Returns root portion of FITS filename to named variable

 MODIFIED
   9. 7.01, nbr - Change automax for 195A
  03.05.15, nbr - Fix sf for c2/c3

 05/15/03 @(#)cmap2gif.pro	1.2 : IDL LASCO NRL Library


CME_MASS

[List of Routines] (See ./cme/cme_mass.pro)

 NAME:
	CME_MASS

 PURPOSE:
	This function calculates the mass of a CME from calibrated images

 CATEGORY:
	CME

 CALLING SEQUENCE:
	Result = CME_MASS(Bn,Fn)

 INPUTS:
	Bn:	String containing the filename of the base image
	Fn:	String containing the filename of the CME image

 KEYWORD PARAMETERS:
	MINSCL:	Set this keyword with the value to use for the minimum value
		in scaling the image. The default value is to use -1.e-11 msb

	MAXSCL:	Set this keyword with the value to use for the maximum value
		in scaling the image. The default value is to use +1.e-11 msb

	SAVE:	Set this keyword with the filename to save the mass information to

 OUTPUTS:
	This function returns the mass calculated for the ROI selected

 RESTRICTIONS:
	Only works for C3

 EXTERNAL CALLS:
	DEFROI, C3_CALIBRATE, LASCO_READFITS, CALC_CME_MASS

 PROCEDURE:
	The files for the base and CME images are read in and calibrated.
	The images are then adjusted to have the same area and summing.
	The images are differenced, displayed and then DEFROI is called
	to get the desired region of interest.  CALC_CME_MASS is called to 
	compute the CME mass.

 EXAMPLE:
	To find the mass of a CME, where the base image is '320004.fts' and
	the CME image is in '320005.fts', and saving the mass information in 'mass.lst':

		Mass = C3_CME ('320004.fts','320005.fts',save='mass.lst')

 MODIFICATION HISTORY:
 	Written by:	RA Howard, NRL, 5/19/97
	MOdified:	RAH 3/14/98, changed rebin of b to calb

	%W% %H% LASCO IDL LIBRARY


CME_MASSIMG2TOTAL

[List of Routines] (See ./cme/cme_massimg2total.pro)

 NAME:
	CME_MASSIMG2TOTAL

 PURPOSE:
	This function calculates the mass of a CME from mass images.

 CATEGORY:
	CME

 CALLING SEQUENCE:
	Result = CME_MASSIMG2TOTAL(Fn)

 INPUTS:
	Fn:	String containing the filename of the CME mass image

 KEYWORD PARAMETERS:
	MINSCL:	Set this keyword with the value to use for the minimum value
		in scaling the image. The default value is to use -1.e-11 msb

	MAXSCL:	Set this keyword with the value to use for the maximum value
		in scaling the image. The default value is to use +1.e-11 msb

	SAVE:	Set this keyword with the filename to save the mass information to
	SECTOR:	Set this keyword if the ROI is a sector, centered on the sun
		The default is to draw the boundary of the CME using the cursor
	RADII:	Set this keyword with a 2-element array of the inner and
		outer radii (in solar radii) for the sector ROI
	ANGLES:	Set this keyword with a 2-element array of the left and right
		hand boundaries (viewed from sun-center) for the sector ROI

 OUTPUTS:
	This function returns the mass calculated for the ROI selected

 RESTRICTIONS:
	Only tested on C3, but should work for any telescope

 EXTERNAL CALLS:
	DEFROI, LASCO_READFITS, ROI_SECTOR, AWIN, AVERAGE, XLOADCT, RDPIX

 PROCEDURE:
	The files for the CME mass image is read in.  The image is displayed and XLOADCT
	is called to permit the contrast to be adjusted.  Then RDPIX is called to permit
	individual pixel values to be displayed.
	If neither SECTOR, RADII, nor ANGLES are set, then the ROI is selected using the
	cursor to draw the boundary by using DEFROI.
	If only SECTOR is set then the ROI is an annular sector whose vertex is the sun 
	center and the radii and angles of the sector are determined interactively.  If
	RADII is set then the radial values are set to the input and similarly if ANGLES
	is set.
	
 EXAMPLE:
	To find the mass of a CME, where the base image is '320004.fts' and
	the CME image is in '320005.fts', and saving the mass information in 'mass.lst':

		Mass = CME_MASSIMG2TOTAL ('320004.fts','320005.fts',save='mass.lst')

	To use an annular sector, with boundaries defined interactively:

		Mass = CME_MASSIMG2TOTAL ('320004.fts','320005.fts',save='mass.lst',/SECTOR)

	To use an annular sector, with angular boundaries pre-set :

		Mass = CME_MASSIMG2TOTAL ('320004.fts','320005.fts',save='mass.lst',/SECTOR,ANGLES=[250,280])

	or, since the SECTOR keyword is not necessary:

		Mass = CME_MASSIMG2TOTAL ('320004.fts','320005.fts',save='mass.lst',ANGLES=[250,280])

 MODIFICATION HISTORY:
 	Written by:	RA Howard, NRL, 5/19/97
	Modified:	RAH, NRL, 3/14/98, comments added

	@(#)cme_massimg2total.pro	1.2 10/03/99 LASCO IDL LIBRARY


CNVRT2REF

[List of Routines] (See ./convert/cnvrt2ref.pro)

 NAME:
	CNVRT2REF

 PURPOSE:
	This procedure converts coordinate system to the standard coordinate 
	system using the FITS keyword notation

 CATEGORY:
	DATA_ANAL
	Widgets.

 CALLING SEQUENCE:
	CNVRT2REF, Hdr, Level

 INPUTS:
	Hdr:	FITS header
	Level:	String indicating level to define coordinate system:
			'0.5', '1', '2'

 OUTPUTS:
	None

 SIDE EFFECTS:
	Keywords are added to the FITS header:
		CRPIX, CRVAL, CROTA, CDELT, CTYPE, CUNIT

 MODIFICATION HISTORY:
       RA Howard, NRL, 14 April 1996
	Vers 1   14 Apr 1996, Initial Release

	@(#)cnvrt2ref.pro	1.1 03/06/97 LASCO IDL LIBRARY


CNVRT_ABC[1]

[List of Routines] (See ./packets/cnvrt_ab.pro)

 NAME:
	CNVRT_ABC

 PURPOSE:
	This function converts the LEB activity buffer codes to a string.

 CATEGORY:
	LASCO PACKETS

 CALLING SEQUENCE:
	Result = CNVRT_ABC (Abc)

 INPUTS:
	Abc:	An integer giving the code value

 OPTIONAL INPUTS:
	None

 KEYWORD PARAMETERS:
	None

 OUTPUTS:
	This function returns a string giving the conversion of the activity 
       buffer code value.

 OPTIONAL OUTPUTS:
	None

 COMMON BLOCKS:
       abc_common:  Used to determine if the conversions have been read in
		     and to hold the conversion table for subsequent calls.

 SIDE EFFECTS:
	None

 RESTRICTIONS:
	None

 PROCEDURE:
	This routine reads in the conversion file (abc.inc) the first time
	it is called.  It then searches the activity buffer codes for a
	match of the input code.

 EXAMPLE:

 MODIFICATION HISTORY:
       1/13/94  SEP  Changed to read buffer numbers and messages


	@(#)cnvrt_ab.pro	1.1 01/27/98 LASCO IDL LIBRARY


CNVRT_ABC[2]

[List of Routines] (See ./packets/cnvrt_abc.pro)

 NAME:
	CNVRT_ABC

 PURPOSE:
	This function converts the LEB activity buffer codes to a string.

 CATEGORY:
	LASCO PACKETS

 CALLING SEQUENCE:
	Result = CNVRT_ABC (Abc)

 INPUTS:
	Abc:	An integer giving the code value

 OPTIONAL INPUTS:
	None

 KEYWORD PARAMETERS:
	None

 OUTPUTS:
	This function returns a string giving the conversion of the activity 
       buffer code value.

 OPTIONAL OUTPUTS:
	None

 COMMON BLOCKS:
       abc_common:  Used to determine if the conversions have been read in
		     and to hold the conversion table for subsequent calls.

 SIDE EFFECTS:
	None

 RESTRICTIONS:
	None

 PROCEDURE:
	This routine reads in the conversion file (abc.inc) the first time
	it is called.  It then searches the activity buffer codes for a
	match of the input code.

 EXAMPLE:

 MODIFICATION HISTORY:
       1/13/94  SEP  Changed to read buffer numbers and messages
       7/26/01  DW   Modified abc.inc and changed to handle numbers properly


	@(#)cnvrt_abc.pro	1.3 11/05/01 LASCO IDL LIBRARY


CNVRT_CMD_CODE

[List of Routines] (See ./packets/cnvrt_cmd_code.pro)

 NAME:
	CNVRT_CMD_CODE

 PURPOSE:
	This function converts LEB command codes to a string.

 CATEGORY:
	LASCO PACKETS

 CALLING SEQUENCE:
	Result = CNVRT_CMD_CODE (Cmd)

 INPUTS:
	Cmd:	An integer giving the command code to be converted

 OPTIONAL INPUTS:
	None
	
 KEYWORD PARAMETERS:
	None

 OUTPUTS:
	This function returns a string containing the conversion of the 
	command.

 OPTIONAL OUTPUTS:
	None

 COMMON BLOCKS:
	None

 SIDE EFFECTS:
	None

 RESTRICTIONS:
	None

 PROCEDURE:

 EXAMPLE:

 MODIFICATION HISTORY:
 	Written by:	RA Howard

	@(#)cnvrt_cmd_code.pro	1.1 01/27/98 LASCO IDL LIBRARY


CNVRT_CMD_DEST

[List of Routines] (See ./packets/cnvrt_cmd_dest.pro)

 NAME:
	CNVRT_CMD_DEST

 PURPOSE:
	This function converts LEB command destination address codes to a 
	string.

 CATEGORY:
	LASCO PACKETS

 CALLING SEQUENCE:
	Result = CNVRT_CMD_DEST (Da)

 INPUTS:
	Da:	An integer giving the command destination address code to be 
		converted

 OPTIONAL INPUTS:
	None
	
 KEYWORD PARAMETERS:
	None

 OUTPUTS:
	This function returns a string containing the conversion of the 
	destination address code.

 OPTIONAL OUTPUTS:
	None

 COMMON BLOCKS:
	None

 SIDE EFFECTS:
	None

 RESTRICTIONS:
	None

 PROCEDURE:
	defines from lcf.h

 EXAMPLE:

 MODIFICATION HISTORY:
 	Written by:	RA Howard

	@(#)cnvrt_cmd_dest.pro	1.1 01/27/98 LASCO IDL LIBRARY


CNVRT_CMD_ERR

[List of Routines] (See ./packets/cnvrt_cmd_err.pro)

 NAME:
	CNVRT_CMD_ERR

 PURPOSE:
	This function converts LEB command error codes to a string.

 CATEGORY:
	LASCO PACKETS

 CALLING SEQUENCE:
	Result = CNVRT_CMD_ERR (Err)

 INPUTS:
	Err:	An integer giving the command error code to be converted

 OPTIONAL INPUTS:
	None
	
 KEYWORD PARAMETERS:
	None

 OUTPUTS:
	This function returns a string containing the conversion of the 
	command error code.

 OPTIONAL OUTPUTS:
	None

 COMMON BLOCKS:
	None

 SIDE EFFECTS:
	None

 RESTRICTIONS:
	None

 PROCEDURE:
	defines from lcf.h, the msbyte is used

 EXAMPLE:

 MODIFICATION HISTORY:
 	Written by:	RA Howard

	@(#)cnvrt_cmd_err.pro	1.1 01/27/98 LASCO IDL LIBRARY


CNVRT_CURRENT

[List of Routines] (See ./packets/cnvrt_current.pro)

 NAME:
	CNVRT_CURRENT

 PURPOSE:
	This function converts DN to amps for various current monitors.

 CATEGORY:
	PACKETS

 CALLING SEQUENCE:
	Result = CNVRT_CURRENT (Dn_in, Curr_type)

 INPUTS:
	Dn_in:	The raw DN value to be converted
	Curr_type:	A parameter indicating the monitor type
			0 = QI2P1B3, LASCO/VIRGO/GOLF
			1 = QI3P1B3, EIT/SUMER/CELIAS
			2 = QIL3, EIT
			3 = QIL4, LASCO

 OUTPUTS:
	This function returns the converted current in amps.

 PROCEDURE:
	Uses calibration curves to perform the conversion

 EXAMPLE:
	To conver the LASCO spacecraft current monitor which has a DN value
	of 128:

		A = CNVRT_CURRENT (128,3)

 MODIFICATION HISTORY:
 	Written by:	R.A. Howard, 1994


	@(#)cnvrt_current.pro	1.1 01/27/98 LASCO IDL LIBRARY


CNVRT_FILTER

[List of Routines] (See ./convert/cnvrt_filter.pro)

 NAME:				CNVRT_FILTER

 PURPOSE:			Interprets the LASCO/EIT filter number into a 
				text string (or the reverse: str to int)

 CATEGORY:			REDUCTION

 CALLING SEQUENCE:		Result = CNVRT_FILTER( Tel, Filt)

 INPUTS:			Tel   = Telescope number (0..3)
				Filt  = Filter number (0..4) or string ('Orange')

 OUTPUTS:			Result = Text string containing the description
					or integer index of filter (if filt is type string)

 MODIFICATION HISTORY:		Written RA Howard, NRL
				Version 1   RAH  15 Nov 1995
				Version 2   RAH  04 Apr 1996   Changed EIT
                               Version 3   AEE  09 Jul 1996   Allowed array inputs.
                               Version 4   SEP  30 Aug 1996   Modified to allow reverse conversion
								Note: does not work with tel array inputs

	@(#)cnvrt_filter.pro	1.1 04 Apr 1996 LASCO IDL LIBRARY


CNVRT_IP

[List of Routines] (See ./convert/cnvrt_ip.pro)

 NAME:				CNVRT_IP

 PURPOSE:			Convert image processing steps into one 
                               character per step codes.

 CATEGORY:			REDUCTION

 CALLING SEQUENCE:		Result = CNVRT_IP(Hdr)

 INPUTS:			Hdr:    Header Structure

 OPTIONAL INPUTS:		None
	
 KEYWORD PARAMETERS:		None

 OUTPUTS:			Result:  String containing the IP characters

 OPTIONAL OUTPUTS:		None

 COMMON BLOCKS:		None

 SIDE EFFECTS:			None

 RESTRICTIONS:			None

 PROCEDURE:			

 EXAMPLE:

 MODIFICATION HISTORY:		Written, RA Howard, NRL
    VERSION 1   rah   30 Nov 1995
    VERSION 2   sep   31 May 1996  Modified to read data from cnvrt_ip.dat
    VERSION 3   rah   14 Jun 1996  Modified ip_arr structure names

	@(#)cnvrt_ip.pro	1.2 03/06/97 LASCO IDL LIBRARY


CNVRT_LP

[List of Routines] (See ./convert/cnvrt_lp.pro)

 NAME:				CNVRT_LP

 PURPOSE:			Interprets the LEB Programs (LP) number 
				into a string

 CATEGORY:			REDUCTION

 CALLING SEQUENCE:		Result = CNVRT_LP ( Lpnum)

 INPUTS:			Lpnum  = LP number (0..23)
					-or- string containing the description

 OUTPUTS:			Result = string containing the description
					-or- lpnum (0..23)

 MODIFICATION HISTORY:		Written  RA Howard, NRL, 15 Nov 1995
				Version 1   RAH, 15 Nov 1995  Initial Release
				Version 2   NBR,  2 Nov 1998  allow string input for number output
							jake	030811	added AltMech = 25


       @(#)cnvrt_lp.pro	1.1 03/06/97 LASCO IDL LIBRARY


CNVRT_POLAR

[List of Routines] (See ./convert/cnvrt_polar.pro)

 NAME:				CNVRT_POLAR

 PURPOSE:			Interprets the LASCO/EIT polarizer wheel
				number into a text string

 CATEGORY:			REDUCTION

 CALLING SEQUENCE:		Result = CNVRT_POLAR ( Tel, Polar)

 INPUTS:			Tel   = Telescope number (0..3)
				Polar  = Polarizer wheel number (0..4)

 OUTPUTS:			Result = string containing the description

 MODIFICATION HISTORY:		Written   RA Howard, NRL, 15 Nov 1995
				Version 1	RAH 15 Nov 1995 Initial Release
				Version 2	RAH 02 Dec 1996 Changed EIT
                               Version 3       AEE 09 Jul 1996 Allowed array
                                                               inputs.

 @(#)cnvrt_polar.pro	1.4 07/23/97 :NRL Solar Physics



CNVRT_PORT

[List of Routines] (See ./convert/cnvrt_port.pro)

 NAME:				CNVRT_PORT

 PURPOSE:			Interprets the readout port number into
				a text string

 CATEGORY:			REDUCTION

 CALLING SEQUENCE:		Result = CNVRT_PORT (Port)

 INPUTS:			Port  =  Read port number (0..3)

 OUTPUTS:			Result = string containing the description

 MODIFICATION HISTORY:		Written		RA Howard, NRL
				Version 1	RAH, 15 Nov 1995 Initial Release

       @(#)cnvrt_port.pro	1.1 03/06/97 LASCO IDL LIBRARY


CNVRT_RO_COORDS

[List of Routines] (See ./convert/cnvrt_ro_coords.pro)

 NAME:
       CNVRT_RO_COORDS

 PURPOSE:
       This procedure converts readout coordinates, P1 and P2, to new 
       values depending upon the readout port.

       The LASCO/EIT CCDs may be read out from any of the four ports.
       However, the P1 and P2 coordinates are specified according to
       the readout port.  This routine converts the P1 and P2 into 
       values that would have been used had the readout been from port A.

 CATEGORY:
       REDUCTION

 CALLING SEQUENCE:
       CNVRT_RO_COORDS, P1in, P2in, Port, P1out, P2out

 INPUTS:
       P1in	A two word array giving the column and row numbers of the
               P1 point.
       P2in	A two word array giving the column and row numbers of the
               P2 point.
       Port	A string of indicaing the readout port, 'A',..'D' 

 OUTPUTS:
       P1out	A two word array giving the rectified column and row 
               numbers of the P1 coordinate.
       P2out	A two word array giving the rectified column and row 
               numbers of the P2 coordinate.

 RESTRICTIONS:
       The coordinates are only truly valid if the image area is not
       over or underscanned, that is the image area is from the CCD
       parallel register.

 MODIFICATION HISTORY:
       Written		RAHoward  NRL 6 November 1995
	Version		1

       @(#)cnvrt_ro_coords.pro	1.1 03/06/97 LASCO IDL LIBRARY


CNVRT_TEMPS

[List of Routines] (See ./packets/cnvrt_temps.pro)

 NAME:
	CNVRT_TEMPS

 PURPOSE:
	This function converts the raw telemetry value associated with a 
	temperature monitor into degrees centigrade.

 CATEGORY:
	PACKETS

 CALLING SEQUENCE:
	Result = CNVRT_TEMPS (Dn_in, Temp_type)

 INPUTS:
	Dn_in:	The raw telemetry value to be converted in DN (Integer)
	Temp_type:	An integer parameter indicating the type of 
			temperature monitor to be converted.
			0 = camera cold finger
			1 = camera on-chip to V
			2 = zone thermistors (ice)
			3 = COB thermistors (tce)
			4 = s/c thermistors type 3
			5 = s/c thermistors type 4
			6 = s/c thermistors type 2
			7 = s/c thermistors type 5

 OUTPUTS:
	This function returns the converted temperature value as a floating
	point number in units of degrees centigrade.

 PROCEDURE:
	The appropriate calibration curve is applied to the telemetry monitor.

 EXAMPLE:
	To obtain the temperature of a zone thermistor:

		T = CNVRT_TEMPS (128,2)

 MODIFICATION HISTORY:
 	Written by:	R.A. Howard, NRL, 1994

       Jan 23, 1998    Ed Esfandiari - changed FOR loops counters to long.
       Jan 27, 1998    Ed Esfandiari - Modified code to perform array 
                                       operations for better efficiency.


 @(#)cnvrt_temps.pro	1.3 01/27/98 :LASCO IDL LIBRARY


COCO_J2000

[List of Routines] (See ./astrometry/ephemeris/coco_j2000.pro)

 NAME:
	COCO_J2000
 PROJECT:
       SOHO-LASCO.
 PURPOSE:
	Transform between celestial and ecliptic coordinates for
	equinox J2000.

 CALLING SEQUENCE:
	COCO_J2000, AI, BI, AO, BO, [ SELECT ] 

 INPUTS:
	AI - Input Longitude in DEGREES, scalar or vector.  If only two 
		parameters are supplied, then  AI and BI will be modified to 
		contain the output longitude and latitude.
	BI - Input Latitude in DEGREES

 OPTIONAL INPUT:
	SELECT - Integer (1-2) specifying type of coordinate transformation.  

	SELECT     From          To
	1       Equatorial    Ecliptic
	2       Ecliptic      Equatorial

	If omitted, program will prompt for the value of SELECT

 OUTPUTS:
	AO - Output Longitude in DEGREES
	BO - Output Latitude in DEGREES

 HISTORY:
       Adapted from IDL Astronomy Library routine EULER by
       W. Landsman. Corrected to use obliquity of the ecliptic for
       J2000. Simon Plunkett, February 1996.


COLOR24

[List of Routines] (See ./dfanning/color24.pro)

 NAME:
       COLOR24

 PURPOSE:

       The purpose of this function is to convert a RGB color triple
       into the equivalent 24-bit long integer. The 24-bit integer
       can be decomposed into the appropriate color by interpreting
       the lowest 8 bits as red, the middle 8 bits as green, and the
       highest 8 bits as blue.

 AUTHOR:

       FANNING SOFTWARE CONSULTING
       David Fanning, Ph.D.
       1645 Sheely Drive
       Fort Collins, CO 80526 USA
       Phone: 970-221-0438
       E-mail: davidf@dfanning.com
       Coyote's Guide to IDL Programming: http://www.dfanning.com/

 CATEGORY:

       Graphics, Color Specification.

 CALLING SEQUENCE:

       color = COLOR24(rgb_triple)

 INPUTS:

       RGB_TRIPLE: A three-element column or row array representing
       a color triple. Or an N-by-three element array of color triples.
       The values of the elements must be between 0 and 255.

 KEYWORD PARAMETERS:
       None.

 COMMON BLOCKS:
       None.

 SIDE EFFECTS:
       None.

 RESTRICTIONS:
       None.

 EXAMPLE:

       To convert the color triple for the color YELLOW,
       (255, 255, 0), to the hexadecimal value '00FFFF'x
       or the decimal number 65535, type:

       color = COLOR24([255, 255, 0])

       This routine was written to be used with device-independent
       color programs like GETCOLOR.

 MODIFICATION HISTORY:

       Written by:  David Fanning, 3 February 96.
       Completely revised the algorithm to accept color arrays. 19 October 2000. DWF.


COLORBAR

[List of Routines] (See ./dfanning/fcolorbar.pro)

 NAME:
   COLORBAR

 PURPOSE:
       The purpose of this routine is to add a color bar to the current
       graphics window.

 AUTHOR:

   FANNING SOFTWARE CONSULTING
   David Fanning, Ph.D.
   1645 Sheely Drive
   Fort Collins, CO 80526 USA
   Phone: 970-221-0438
   E-mail: davidf@dfanning.com
   Coyote's Guide to IDL Programming: http://www.dfanning.com/

 CATEGORY:
       Graphics, Widgets.

 CALLING SEQUENCE:
       COLORBAR

 INPUTS:
       None.

 KEYWORD PARAMETERS:

       BOTTOM:   The lowest color index of the colors to be loaded in
                 the bar.

       CHARSIZE: The character size of the color bar annotations. Default is 1.0.

       COLOR:    The color index of the bar outline and characters. Default
                 is !P.Color..

       DIVISIONS: The number of divisions to divide the bar into. There will
                 be (divisions + 1) annotations. The default is 6.

       FONT:     Sets the font of the annotation. Hershey: -1, Hardware:0, True-Type: 1.

       FORMAT:   The format of the bar annotations. Default is '(I5)'.

       INVERTCOLORS: Setting this keyword inverts the colors in the color bar.

       MAXRANGE: The maximum data value for the bar annotation. Default is
                 NCOLORS.

       MINRANGE: The minimum data value for the bar annotation. Default is 0.

       MINOR:    The number of minor tick divisions. Default is 2.

       NCOLORS:  This is the number of colors in the color bar.

       POSITION: A four-element array of normalized coordinates in the same
                 form as the POSITION keyword on a plot. Default is
                 [0.88, 0.15, 0.95, 0.95] for a vertical bar and
                 [0.15, 0.88, 0.95, 0.95] for a horizontal bar.
;
       RANGE:    A two-element vector of the form [min, max]. Provides an
                 alternative way of setting the MINRANGE and MAXRANGE keywords.

       RIGHT:    This puts the labels on the right-hand side of a vertical
                 color bar. It applies only to vertical color bars.

       TITLE:    This is title for the color bar. The default is to have
                 no title.

       TOP:      This puts the labels on top of the bar rather than under it.
                 The keyword only applies if a horizontal color bar is rendered.

       VERTICAL: Setting this keyword give a vertical color bar. The default
                 is a horizontal color bar.

 COMMON BLOCKS:
       None.

 SIDE EFFECTS:
       Color bar is drawn in the current graphics window.

 RESTRICTIONS:
       The number of colors available on the display device (not the
       PostScript device) is used unless the NCOLORS keyword is used.

 EXAMPLE:
       To display a horizontal color bar above a contour plot, type:

       LOADCT, 5, NCOLORS=100
       CONTOUR, DIST(31,41), POSITION=[0.15, 0.15, 0.95, 0.75], $
          C_COLORS=INDGEN(25)*4, NLEVELS=25
       COLORBAR, NCOLORS=100, POSITION=[0.15, 0.85, 0.95, 0.90]

 MODIFICATION HISTORY:
       Written by: David Fanning, 10 JUNE 96.
       10/27/96: Added the ability to send output to PostScript. DWF
       11/4/96: Substantially rewritten to go to screen or PostScript
           file without having to know much about the PostScript device
           or even what the current graphics device is. DWF
       1/27/97: Added the RIGHT and TOP keywords. Also modified the
            way the TITLE keyword works. DWF
       7/15/97: Fixed a problem some machines have with plots that have
            no valid data range in them. DWF
       12/5/98: Fixed a problem in how the colorbar image is created that
            seemed to tickle a bug in some versions of IDL. DWF.
       1/12/99: Fixed a problem caused by RSI fixing a bug in IDL 5.2. Sigh... DWF.
       3/30/99: Modified a few of the defaults. DWF.
       3/30/99: Used NORMAL rather than DEVICE coords for positioning bar. DWF.
       3/30/99: Added the RANGE keyword. DWF.
       3/30/99: Added FONT keyword. DWF
       5/6/99: Many modifications to defaults. DWF.
       5/6/99: Removed PSCOLOR keyword. DWF.
       5/6/99: Improved error handling on position coordinates. DWF.
       5/6/99. Added MINOR keyword. DWF.
       5/6/99: Set Device, Decomposed=0 if necessary. DWF.
       2/9/99: Fixed a problem caused by setting BOTTOM keyword, but not NCOLORS. DWF.
       8/17/99. Fixed a problem with ambiguous MIN and MINOR keywords. DWF
       8/25/99. I think I *finally* got the BOTTOM/NCOLORS thing sorted out. :-( DWF.
       10/10/99. Modified the program so that current plot and map coordinates are
            saved and restored after the colorbar is drawn. DWF.
       3/18/00. Moved a block of code to prevent a problem with color decomposition. DWF.
       4/28/00. Made !P.Font default value for FONT keyword. DWF.
       9/26/00. Made the code more general for scalable pixel devices. DWF.
       1/16/01. Added INVERTCOLORS keyword. DWF.
	2/5/04, nbr - Rename for SSW compatability


COMBINE_IMG

[List of Routines] (See ./inout/combine_img.pro)

 Project     : SOHO - LASCO/EIT

 Name        : COMBINE_IMG

 Purpose     : Insert frames from one FITS image into another to create combined image.

 Explanation : This procedure combines images from different telescopes by inserting
		frames from img1 inside img2.  The imgf1 frame is then CONGRID'd to the pixel size
		of imgf2 (the outer field) and inserted into the imgf2 frame.
		If imgf1 or imgf2 are not names of FITS files, headers must be input using the H1 
		and H2 keywords, or you will be prompted for coordinates of center and arcsec/pixel
		of each image.

 Use         : result = COMBINE_IMG( imgf1, imgf2, CUTOFF=cutoff, /PROMPT)

      Example: IDL> result = COMBINE_IMG( 'c2.fts', 'c3.fts', CUTOFF=5.5)

 Inputs      : img1 : Filename of FITS file for inner field.
               img2 : Filename of FITS file for outer field.

 Outputs     : None.

 Keywords    : /PROMPT	: Set this keyword to be prompted for centers and scale factors.
		      	  Otherwise they are read from FITS files.
               CUTOFF=cutoff : Set this keyword to the boundary desired between the inner and
				outer fields (Units of Rsun).  Defaults are:
				IF EIT is inner image : cutoff is 1.3
				IF C1  is inner image : cutoff is 2.2
				IF C2  is inner image : cutoff is 5.5
		/SPLIT_COLORS: Set this keyword to split color table in
		              output img between those in the input images.
               /INNER :  Setting this keyword will CONGRID the outer field image (img2) to the 
                        pixel size of the inner field image (img1). It uses the portion of the
                        original image that corresponds to the new
                        field of view for speed.
               FOV    : Set this keyword to the desired size (in pixels)
               	  of the final image. FOV can either 1- or 2-element array.
		FACTOR :  Number to multiply the inner image by. Default is 1.02
		DR:	  amount of radius to interpolate between images. Default is no interpolation.
			  Suggested value for C2-C3: 0.5
		/PROCESS:  Use MK_IMG to get images
		H1, H2:	  Headers for imgf1,imgf2 if not FITS filenames
		/NO_BYTSCL:Do not output result scaled to 256 values
		ZOOM:	  Magnify inner image by this amount relative to outer. Default is 1.
		/POLEMATCH:  Match intensity at poles
		/AUTOFACTOR: Better than POLEMATCH.
		CEN2:	  Structure, center of image 2
		/SQRT_SCL: apply SQRT function to img1
		ADDFAC:	  Factor to add to img1. Default is 0.
		/TEST:	  Stop before exitting to allow interactive changing of parameters.
		/EXTRAP	 Extrapolate EIT image to 2 R


 Category    : Image Processing/Display.

 Prev. Hist. : Modified from COMBINE_MVI.PRO by Scott Paswaters.

 Written     : Nathan Rich, NRL, 1/12/99. 

 Modified    : .
	Jun 1999  NBR	Make output integer arrays.
	Aug 1999  NBR	Add EXTRAP_EIT
	Sep 1999  NBR 	Interactively set color tables of input images
	Jan 2000  NBR  	Add EXTRAP keyword making EXTRAP_EIT optional
	 4mar01, nbr - Allow input to be two filenames for each (for fixgaps=2)

 Version     :

 11/02/01 @(#)combine_img.pro	1.1 :NRL Solar Physics


COMBINE_MVI

[List of Routines] (See ./movie/combine_mvi.pro)

 Project     : SOHO - LASCO/EIT

 Name        : COMBINE_MVI

 Purpose     : Insert frames from one mvi into another to create combined movie.

 Explanation : This procedure combines movies from different telescopes by inserting
		frames from mvi1 inside mvi2.  The cadence is determined by mvi1 (the
		inner field).  The nearest frame in time from mvi2 is found for each
		frame of mvi1.  The mvi1 frame is then CONGRID'd to the pixel size
		of mvi2 (the outer field) and inserted into the mvi2 frame.
               WRUNMOVIE is then called for animation.

 Use         : COMBINE_MVI, mvi1, mvi2, CUTOFF=cutoff, /PROMPT

      Example: IDL> COMBINE_MVI, 'c2.mvi', 'c3.mvi', CUTOFF=5.5

 Inputs      : mvi1 : Filename of mvi file for inner field.
               mvi2 : Filename of mvi file for outer field.

 Outputs     : None.

 Keywords    : /PROMPT	: Set this keyword to be prompted for centers and scale factors.
		      	  Otherwise they are read from .mvi files.
               CUTOFF=cutoff : Set this keyword to the boundary desired between the inner and
				outer fields (Units of Rsun).  Defaults are:
				IF EIT is inner image : cutoff is 1.3
				IF C1  is inner image : cutoff is 2.2
				IF C2  is inner image : cutoff is 5.5
		SPLIT_COLORS: Set this keyword to split color table in
		              output mvi between those in the input mvis.
               INNER : Setting this keyword will CONGRID the outer field image (mvi2) to the 
                       pixel size of the inner field image (mv1). It uses the portion of the
                       original image that corresponds to the new
                       field of view for speed.
               FOV    : Set this keyword to the desired size (in pixels)
               of the final movie. If the final dimensions are larger than 1024^2, the program
               prompts for values. (Default = size of mvi2 < 1024). FOV can either 1- or 
               2-element array.
		HDROUT : Save the movie with outer image header values; default is to use inner image
		NOLABEL: Do not add time stamp 
		LESS: 	If set, outer frame is always after inner frame; otherwise outer frame 
			is closest in time
		MATCH:	Match frames 1-to-1 to smallest array

 Calls       : WRUNMOVIE

 Category    : Image Processing/Display.

 Prev. Hist. : None.

 Written     : Scott Paswaters, NRL, Apr 1997.

 Modified    : SEP 03 Apr 97 - Released.
		SPP 10 Oct 97 - Added SPLIT_COLORS keyword and code to
                               allow splitting of color table.
               AV  16 Dec 97 - Added INNER & FOV keywords, shift_calc
                               proc (for clarity).
               SEP 17 Dec 97 - Modified to always include all frames from both movies.
		NBR    Dec 99 - Add HDROUT keyword
		NBR    Aug 00 - Fix label; add NOLABEL keyword; always make outer frame 
				after inner frame
		NBR  9 Mar 01 - Add LESS keyword
		NBR 16 Mar 01 - Add MATCH keyword

 Version     :

 11/30/01 @(#)combine_mvi.pro	1.15 :NRL Solar Physics


COMB_FULL_EQ

[List of Routines] (See ./synoptic/comb_full_eq.pro)

 TITLE:
	COMB_FULL_EQ
 PURPOSE:
	This procedure combines the monthly equatorial region image
	and the monthly full field image into a single monthly model.

 CATEGORY:
	DATA_ANAL

 CALLING SEQUENCE:
	COMB_FULL_EQ,Tel,Td

 INPUTS:
	Tel:	String denoting the telescope: 'c1','c2','c3','c4'
                                               or 'eit'
	Td:	String denoting the date, in one of the following
		formats:	YYYY/MM/DD
				YYY-MM-DD
				YYMMDD

 KEYWORDS:
	FILTER:	If present this string specifies the filter to be used.
		The defaults are the following:
			C1 = 'FeXIV'
			C2 = 'Orange'
			C3 = 'Clear'
			C4 = 'Clear'
	POLAR:	If present this string specifies the polarizer (or sector)
               to be used.  The defaults are the following:
			C1 = 'Clear'
			C2 = 'Clear'
			C3 = 'Clear'
			C4 = '304'


 OUTPUTS:
	None.  The routine will store the minimum image in a file
		named tmdddddd.fts, where t is the telescope number,
		m is the letter 'm', and dddddd is the 6 digit date
		in the format YYMMDD.

 PROCEDURE:
	The routine looks for file names of the form, tmxxxYYMMDDfilpol.fts
	where t      = '1','2','3','4' for the telescope
             m      = 'm' for monthly
             xxx    = 'equ' or 'ful' for equatorial or full images
             YYMMDD = The year, month, day
             fil    = the filter code:
                             C1:  'fv', 'fx', 'na', 'ca', 'cl'
                             C2:  'or', 'rd', 'bl', 'ha'
                             C3:  'cl', 'or', 'rd', 'bl', 'dr'
                         C4/EIT:  'cl', 'a1', 'al4'
             pol    = the polarizer/sector code:
                             C1:  'cl', 'p0', 'pm', 'pp', 'ha'
                             C2:  'cl', 'p0', 'pm', 'pp'
                             C3:  'cl', 'p0', 'pm', 'pp', 'ha'
                         C4/EIT:  '304', '284', '195','171'

 WRITTEN:
	RA Howard, NRL, 9/27/96

     @(#)comb_full_eq.pro	1.1 10/21/96    LASCO IDL LIBRARY


COMPUTE_MONEXP_FACTORS

[List of Routines] (See ./expfac/compute_monexp_factors.pro)

 
 NAME:
	COMPUTE_MONEXP_FACTORS

 PURPOSE:
	This procedure computes the exposure time correction factors

 CATEGORY:
	DATA_ANAL

 CALLING SEQUENCE:

	COMPUTE_MONEXP_FACTORS,Tel,Dtea,Dteb

 INPUTS:
	Tel:	String giving the telesope name, eg. 'c1'
	Dtea:	String giving the starting date, eg, '960601'
	Dteb:	String giving the ending date, eg, '960607'

 KEYWORD PARAMETERS:
	PS:	If set, create a postscript file
	NOSAVE:	If set, don't save the output factors
	PR:	If set, print out debug information
	POL:	If set, defines the polarizer position to use
       FIL:	IF set, defines the filter position to use

 OUTPUTS:
	None

 SIDE EFFECTS:
	Generates plot files
	Writes the exposure correction factors to a file

 RESTRICTIONS:
	Only computes correction factors for the primary filter and 
	clear polarizer positions

 PROCEDURE:
	This procedure computes exposure time correction factors by comparing
	the median intensities in various regions.  A region is a group of
	32x32 superpixels.  The ratio of a given image to a reference image
	is computed.  The median of the median ratios of all the superpixels 
	in a region is computed.  The time history of the region medians is
	used to detrend (each region separately) the normal coronal variation
	from the exposure time fluctuations.  Then the average of all the 
	detrended region ratios is computed to form the overall correction 
	factor for each image.

	The detrending fits the 11 images before and after the time of the 
	desired image to a 2nd degree polynomial.  No correction is made for 
	irregular timings.

	The offset bias is divided by the on-chip summing to account for th
	improper handling of the summing during the generation of the 
	MONEXP data.  There, since the bias wasn't really known, the summed
	pixel intensity was just divided by the number of summed pixels.  This
	division should have been done afer the bias was subtracted.  The
	computation was correct for LEB summing.

 CALLED PROCEDURES
	COMPUTE_MONEXP_POLY
	COMPUTE_MONEXP_RATIO
	OFFSET_BIAS
	WRITE_EXP_FACTOR
	READ_MONEXP_DATA
	GET_MONEXP_DATA
	STR_UNIQUE

 MODIFICATION HISTORY:
         Written, RA Howard and JS Morrill, Aug 1997
	26 Feb 1998	RAH Make the calculations double precision

	@(#)compute_monexp_factors.pro	1.11 06/04/98 LASCO IDL LIBRARY


COMPUTE_MONEXP_POLY

[List of Routines] (See ./expfac/compute_monexp_poly.pro)


 NAME:
	COMPUTE_MONEXP_POLY

 PURPOSE:
	This procedure fits a polynomial to the input monexp ratios to 
	obtain a set of exposure time correction factors

 CATEGORY:
	DATA_ANAL

 CALLING SEQUENCE:

	Result=COMPUTE_MONEXP_POLY(Dte,Ratio)

 INPUTS:
	Dte:	Array of CDS date structure
	Ratio:	Array of image ratios 

 OUTPUTS:
	The function result is the exposure factor for each image

 RESTRICTIONS:
        NONE

 PROCEDURE:
	This procedure computes the exposure time correction factors.  It first 
	performs an 11 pointed median filter to the image ratios of a given region.
	Then it fits a 2nd degree polynomial to the 9 points on either side of the
	image time desired.  TAI time is used as the independent variable in the 
	polynomial curve fit.  No correction for any irregular spacing in the image
	times is made.

	The exposure time correction factor is the observed ratio divided by the 
	detrended, desired ratio.  Thus it should be multipled by the exposure time
	to obtain the corrected exposure time.

	Plots are made of the fitted and observed factors.

 MODIFICATION HISTORY:
	Written, RA Howard and JS Morrill, Aug 1997
	1/6/2001   RAH   FOR loop changed from nw to nt, to include all points

	@(#)compute_monexp_poly.pro	1.8 01/06/01 LASCO IDL LIBRARY


COMPUTE_MONEXP_RATIO

[List of Routines] (See ./expfac/compute_monexp_ratio.pro)


 NAME:
	COMPUTE_MONEXP_RATIO

 PURPOSE:
	This procedure computes the region ratios

 CATEGORY:
	DATA_ANAL

 CALLING SEQUENCE:

	Result=COMPUTE_MONEXP_RATIO(Medimg,Medref)

 INPUTS:
	Tel:	String denoting the telescope
	Medimg:	Median image (32x32)
	Medref:	Median reference image (32x32)

 OUTPUTS:
	The function result is the ratio in each of the regions.  The last
	element of the array is the average of all regions.

 RESTRICTIONS:
	NONE

 PROCEDURE:
	Compute the ratios to the reference image for each region.  Correct
	for zero pixels in the reference image.

	After computing the ratios, throw out those superpixels for which the 
	difference between the median and the observed ratio is greater
	than 0.005.  (This is an empirical number.)  Compute the overall 
	average, median and standard deviation of the remaining superpixels.

	For each region compute the median of the ratios for nonzero pixels.  
	If less than half of the superpixels have a ratio greater than zero, then 
	set the median of the ratios to be 0.  This will flag the region
	to be bad when computing the overall average.

 MODIFICATION HISTORY:
         Written, RA Howard, JS Morrill, Aug 1997

 @(#)compute_monexp_ratio.pro	1.11 02/26/98 :LASCO IDL LIBRARY



COMPUTE_STD_VALS

[List of Routines] (See ./expfac/compute_std_vals.pro)

 NAME:
	COMPUTE_STD_VALS

 PURPOSE:
	This function computes the standard values over regions and other
	statistical information for monitoring the exposure value.

 CATEGORY:
	DATA_ANAL

 CALLING SEQUENCE:
	COMPUTE_STD_VALS,Img,Ihdr,Avgv,Sdev,Medn,Minv,Maxv,Nzero,Mode

 INPUTS:
	Img:	The 2D image as read in by READFITS
	Ihdr:	The image header in the LASCO structure

 OPTIONAL INPUTS:
	None

 KEYWORD PARAMETERS:
	None

 OUTPUTS:
	Nleb:	Number of pixels being added together in the LEB
	Nccd:	Number of pixels being added together on the CCD
	Avgv:	Average intensity (1025 point floating array)
	Sdev:	Standard deviation of the average (1025 point floating array)
	Medn:	Median value (1025 point integer array)
	Minv:	Minimum value (1025 point integer array)
	Maxv:	Maximum value (1025 point integer array)
	Nzero:	Number of zero values (1025 point integer array)
	Mode:	Mode value (1025 point array)

 PROCEDURE:
	The image is expanded into a full 1024 x 1024 array to account for
	sub images.  Also leb summing and on-chip summing are accounted for.
	The image is not normalized by the exposure time and the bias is not
	subtracted off.  The average value, standard deviation, median 
	value, minimum (non-zero) value, maximum value and the number of
	zero pixels in each block are computed.  An array is generated of 
	the six quantities for the entire array and then the 1024 32x32 
	pixel blocks.  Each quantity then has an array size of 1025 values.
	If the image is a subimage then the blocks outside of the subimage
	would have zero values for the number of zeros.

 EXAMPLE:
	To compute the exposure monitoring information:

		COMPUTE_STD_SUMS,img,hdr,avg,sd,med,minv,maxv,nz

 MODIFICATION HISTORY:
 	Written by:	R.A. Howard, NRL, 10/3/96
	Modified:	RAH, NRL, 2/20/96  All blocks
	Modified:	J. S. Morrill, NRL, 4/8-10/96: Added Mode and exp times
	Modified:	RAH, NRL, 9/23/97  Check for odd image readout size
	Modified:	RAH, NRL, 5/24/98  Check for underscan pixels
 
 SCCS variables for IDL use
 
 @(#)compute_std_vals.pro	1.11 05/24/98 :NRL Solar Physics

 


CORRSUBIMAGE

[List of Routines] (See ./expfac/corrsubimage.pro)

 NAME:
	CORRSUBIMAGE

 PURPOSE:
	This function determines the exposure time correction factor of a subimage

 CATEGORY:
	LASCO EXPFAC

 CALLING SEQUENCE:
	Result = CORRSUBIMAGE (Hdr)

 INPUTS:
	Hdr:	Image header in LASCO structure format

 OUTPUTS:
	This function returns the exposure time correction factor.

 RESTRICTIONS:

 PROCEDURE:
	EXPMON data for images earlier and later in time to the input image 
	are tested to see if they have blocks that overlap the input image.
	The images closest in time to the input image are used.

	To use this routine an image header containing the following
	structure components must be provided:
	 readport,detector,mid_date,mid_time,lebxsum,lebysum

	The MONEXP data must have been read in for the desired dates

 MODIFICATION HISTORY:
 	Written by:	RA Howard, NRL, 01 Oct 1999

	@(#)corrsubimage.pro	1.1 11/02/01 LASCO IDL LIBRARY


CORR_ALLSUBS

[List of Routines] (See ./expfac/corr_allsubs.pro)

 
 NAME:
	CORR_ALLSUBS

 PURPOSE:
	This procedure computes the exposure time correction factors for
	all subimages

 CATEGORY:
	DATA_ANAL

 CALLING SEQUENCE:

	CORR_ALLSUBS,Tel,Dtea,Dteb

 INPUTS:
	Tel:	String giving the telesope name, eg. 'c1'
	Dtea:	String giving the starting date, eg, '960601'
	Dteb:	String giving the ending date, eg, '960607'

 KEYWORD PARAMETERS:
	POL:	If set, defines the polarizer position to use
       FIL:	IF set, defines the filter position to use

 OUTPUTS:
	None

 SIDE EFFECTS:
	Writes the exposure correction factors to a file

 PROCEDURE:

 MODIFICATION HISTORY:
         Written, RA Howard Oct 1999

 @(#)corr_allsubs.pro	1.1 11/02/01 :LASCO IDL LIBRARY



CORR_EDGES.PRO

[List of Routines] (See ./reduce/las_c3/corr_edges.pro)

 PROJET:
    SOHO - LASCO
 NAME:
    corr_edges.pro
 PURPOSE:
    Correct edges of lasco frames
 CATEGORY:
    Instrumental correction tools, medium level routines,
 CALLING SEQUENCE:
    corr_edges, ima, iop, ideep [,/X] [,/Y]
 INPUTS:
         ima                    image array
         iop                    side to correct
                                iop=0 nothing
                                iop=1 upper side
                                   =2 lower sise
                                   =3 both
         ideep                  nb of contiguity lines to
                                   correct
 OPTIONAL INPUT PARAMETERS:
         None
 KEYWORD PARAMETERS:
         X                      border columns correction
         Y                      border lines correction
 OUTPUTS:
         ima                             corrected image array
 OPTIONAL OUTPUT PARAMETERS:
         None
 COMMON BLOCKS:
         None
 SIDE EFFECTS:
         inmput is modified
 RESTRICTIONS:
 PROCEDURE:
 MODIFICATION HISTORY:
         Written by ALL 05/14/96

 SCCS variables for IDL use

 @(#)corr_edges.pro  1.0 25/01/95 :LAS


COSMICS

[List of Routines] (See ./display/cosmics.pro)

 NAME:
			cosmics


 PURPOSE:
        bilder fuer tomographie von fehlstellen befreien


 CATEGORY:



 CALLING SEQUENCE:


 
 INPUTS:



 OPTIONAL INPUTS:


	
 KEYWORD PARAMETERS:



 OUTPUTS:



 OPTIONAL OUTPUTS:



 COMMON BLOCKS:



 SIDE EFFECTS:



 RESTRICTIONS:



 PROCEDURE:



 EXAMPLE:



 MODIFICATION HISTORY:


COYOTE_FIELD

[List of Routines] (See ./dfanning/coyote_field.pro)

 NAME:
   COYOTE_FIELD

 PURPOSE:

   The purpose of this compound widget is to provide an alternative
   to the CW_FIELD widget offered in the IDL distribution. What has
   always annoyed me about CW_FIELD is that the text widgets do not
   look editable to the users on Windows platforms. This program
   corrects that deficiency and adds some features that I think
   would be helpful. For example, you can now assign an event handler
   to the compound widget.

 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:

   General programming.

 CALLING SEQUENCE:

   fieldID = COYOTE_Field(parent, Title='X Size: ", Value=256, /IntegerValue)

 INPUT PARAMETERS:

   parent -- The parent widget ID of the compound widget. Required.

 INPUT KEYWORDS:

   Column -- Set this keyword to have the Label Widget above the Text Widget.
   CR_Only -- Set this keyword if you only want Carriage Return events. If
              this keyword is not set, all events are returned. No events
              are returned unless the EVENT_PRO or EVENT_FUNC keywords are used.
   DoubleValue -- Set this keyword if you want DOUBLE values returned.
   Decimal -- Set this keyword to the number of digits to the right of the decimal
              point in FLOATVALUE and DOUBLEVALUE numbers.
   Digits -- Set this keyword to the number of digits permitted in INTERGERVALUE and LONGVALUE numbers.
   Event_Func -- Set this keyword to the name of an Event Function. If this
                 keyword is undefined and the Event_Pro keyword is undefined,
                 all compound widget events are handled internally and not
                 passed on to the parent widget.
   Event_Pro -- Set this keyword to the name of an Event Procedure. If this
                keyword is undefined and the Event_Func keyword is undefined,
                all compound widget events are handled internally and not
                passed on to the parent widget.
   FieldFont -- The font name for the text in the Text Widget.
   FloatValue -- Set this keyword for FLOAT values.
   Frame -- Set this keyword to put a frame around the compound widget.
   IntegerValue -- Set this keyword for INTEGER values.
   LabelFont -- The font name for the text in the Label Widget.
   LabelSize -- The X screen size of the Label Widget.
   LongValue -- Set this keyword for LONG values.
   Row=row -- Set this keyword to have the Label beside the Text Widget. (The default.)
   Scr_XSize -- The X screen size of the compound widget.
   Scr_YSize -- The Y screen size of the compound widget.
   StringValue -- Set this keyword for STRING values. (The default.)
   Title -- The text to go on the Label Widget.
   UValue -- A user value for any purpose.
   Value -- The "value" of the compound widget.
   XSize -- The X size of the Text Widget.

 COMMON BLOCKS:

   None.

 RESTRICTIONS:

   None.

 EVENT STRUCTURE:

   All events are handled internally unless either the Event_Pro or Event_Func
   keywords are used to assign an event handler to the compound widget. By
   default all events generated by the text widget are passed to the assigned
   event handler. If you wish to receive only Carriage Return events, set the
   CR_Only keyword.

   event = { COYOTE_FIELD, $      ; The name of the event structure.
             ID: 0L, $            ; The ID of the compound widget's top-level base.
             TOP: 0L, $           ; The widget ID of the top-level base of the hierarchy.
             HANDLER: 0L, $       ; The event handler ID. Filled out by IDL.
             Value: Ptr_New(), $  ; A pointer to the widget value.
             Type:""              ; A string indicating the type of data in the VALUE field.
           }                      ; Values are "INT", "LONG", "FLOAT", "DOUBLE", or "STRING".

 EXAMPLE:

   An example program is provided at the end of the COYOTE_FIELD code. To run it,
   type these commands:

      IDL> .Compile COYOTE_Field
      IDL> Example

 MODIFICATION HISTORY:

   Written by: David Fanning, 17 NOV 1999.
   Added check to make float and double values finite. 18 NOV 1999. DWF.
   Fixed a bug when selecting and deleting all numerical text. 19 NOV 1999. DWF.
   Added DECIMAL and DIGITS keywords. 2 Jan 2000. DWF.
   Added the POSITIVE keyword. 12 Jan 2000. DWF.
   Fixed a few minor bugs with delete and digits. 12 Jan 2000. DWF.
   Made GET_VALUE function return pointer to data, instead of data. 12 Jan 2000. DWF.
   Fixed a small typo: "aveDecimal" to "haveDecimal". 10 March 2000. DWF.
   Fixed a small problem with the Example program. 7 Oct 2000. DWF.


CROSSCORR

[List of Routines] (See ./las-c2/crosscorr.pro)

 NAME:                        crosscorr.pro
 PURPOSE:                     determination of  the function of crossing-
                              correlation between two frames and the off-
                              centering between these two frames.
 CATEGORY:                    Processing high level
 CALLING SEQUENCE:            crosscorr,ima1_in,ima2_in,x1,x2,y1,y2,ima_out,res
 INPUTS:                      ima1_in                  name of 1st frame
                              ima2_in                  name of 2nd frame
                              x1,x2,y1,y2              selected area
 OPTIONAL INPUT PARAMETERS:   None
 KEYWORD PARAMETERS:          None
 OUTPUTS:                     ima_out              cross-correlation frame
                              res                  maxima's area reinterpolated
 OPTIONAL OUTPUT PARAMETERS:  None
 COMMON BLOCKS:               None
 SIDE EFFECTS:                None
 RESTRICTIONS:                The cubic interpolation is maded by Rinter.pro 
                              who has to be compiled before applications.
                              This program runs well with even frames
                              (dimensions paires en X et en Y)
 PROCEDURE:
 MODIFICATION HISTORY:   defined by M.B 01/14/94

 SCCS variables for IDL use

 @(#)crosscorr.pro  1.0 01/17/94 :LAS


CROSSCORRBIS

[List of Routines] (See ./las-c2/crosscorrbis.pro)

 NAME:                        crosscorrbis.pro
 PURPOSE:                     determination of  the function of crossing-
                              correlation between two frames and the off-
                              centering between these two frames.
 CATEGORY:                    Processing high level
 CALLING SEQUENCE:        crosscorrbis,ima1_in,ima2_in,x1,x2,y1,y2,ima_out,res
 INPUTS:                      ima1_in                  name of 1st frame
                              ima2_in                  name of 2nd frame
                              x1,x2,y1,y2              selected area
 OPTIONAL INPUT PARAMETERS:   None
 KEYWORD PARAMETERS:          None
 OUTPUTS:                     ima_out              cross-correlation frame
                              res                  maxima's area reinterpolated
 OPTIONAL OUTPUT PARAMETERS:  None
 COMMON BLOCKS:               None
 SIDE EFFECTS:                None
 RESTRICTIONS:                The sinc interpolation is maded by resample.pro
                              included in utilities.pro who has to be compiled
                              before applications.
                              This program runs well for even frames 
                              (dimensions paires en X et en Y)
 PROCEDURE:
 MODIFICATION HISTORY:   defined by M.B 01/20/94

 SCCS variables for IDL use

 @(#)crosscorrbis.pro  1.0 01/20/94 :LAS


CR_REM_ARRAY

[List of Routines] (See ./data_anal/cr_rem_array.pro)

Project	: SOHO-LASCO/EIT

Name		: cr_rem_array

Purpose	: Remove cosmic rays from LASCO/EIT images

Explanation	: This procedure removes cosmic rays from an array 
		  previously defined in the idl session by first
		  using statistical techniques to identify regions
		  containing cosmic rays (or stars) and then replaces
		  the pixel values in that region with new values 
		  determined by taking the average of column and row
		  fits across the region based on neighboring points.
		  Statistical noise based upon the quality of the
		  fit to the neighboring data is added to the fit
		  to give realistic local variation for aesthetic
		  purposes.

 Syntax	: result=cr_rem_array(image,telescope,
				BASE_IMAGE=base_image,
				BLOCK=block,
				GROUP_SIZE=groupsize,
				N_SIGMA=n_sigma,
				CX=cx,CY=cy,
				RMIN=rmin,RMAX=rmax,
				RFILE=rfile,
				USE_ROI=use_roi,
				ORDER=order)

 Inputs	: image : The array name of a previously read-in image
		  telescope  :	An integer denoting the telescope used for the
				image. C1=1, C2=2, C3=3, EIT=4

 Keywords	: BASE_IMAGE : 	Image to subtract from the input image array if
			       	differencing is desired
		  BLOCK      : 	Size in pixels of the larger neighborhoods used
			     	to determine the statistical characteristics
				which determine which smaller neighborhoods have
				possible cosmic rays. Default is 32.
		  GROUP_SIZE :	Size in pixels of the smaller neighborhoods
				which are examined for cosmic rays. 
				Default is 8.
		  N_SIGMA    :	Statistical requirement used to determine
				candidate smaller neighborhoods withing a larger
				neighborhood. The maximum value of a given
				smaller neighborhood must deviate 
				from the median value of the means of the 
				smaller	neighborhoods comprising a larger
				neighborhood in order to be considered a 
				candidate.
		  ORDER	     :	The order of the polynomial fit to use to model
				the data in the smaller neighborhoods being 
				corrected. Default is 2. Errors may occur for
				values higher than 3. For smaller neighborhoods
				abutting the occulter or abutting telemetry
				dropout regions, a linear fit is used.

 ***	The program is designed to handle the occulter and vignetted outer edge
	of the circular FOV of the instruments. The high intensity gradients
	at these edges leads to poor cosmic ray correction when candidate 
	pixel groups are identified there. The following keywords should be
	included when using this feature.
		  CX,CY      : 	Coordinates of the center of the occulter in
				the image. Only required if the occulter region
				is to be ignored in the removal process. This
				is done in processing LASCO images to avoid 
				problems arising from having large regions
 				with values drastically different
				from neighboring valid data. In EIT images it is
				done to avoid processing disk data because some
				bright features on the disk are
				indistinguishable from cosmic rays using these
				statistical methods.
		  RMIN,RMAX  :	The minimum and maximum radial values to
				consider for the processing. The minimum value
				should be slightly larger than the radius of 
				the occulter in the image. The maximum should
				be slightly smaller than the radius of the
				unvignetted field of view. IF RMIN is defined
				but RMAX is not, the entire field of view
				outside RMIN will be corrected.
		  RFILE      :  The name of a file containing the radial
				distance of each pixel in the image from
				the center coordinates CX, CY. If the file
				does not exist, it will be generated. If the
				file exists, but the size of the image or the 
				center coordinates have changed, the file is
				regenerated. 
		  USE_ROI     : Sometimes one might want to exclude a region from
				cosmic ray removal processing, such as when a bright
			 	star or a comet appears in the field of view. To
				do this, set this keyword and then use the mouse
				buttons to set the ROI (=region of interest). The left
				mouse button draws line segments, the middle button
				removes them if necessary, and the right button 
				closes the region. See the description of DEFROI
				in the IDL manual.

 Calls		: generate_r_matrix

 Restrictions	:

 Side effects	:

 Category	: Image processing

 Prev. Hist.	: None

 Written	: Norm Moulton, NRL, Sept. 1996

 Modified	:

 Version	:


CR_REM_FILE

[List of Routines] (See ./data_anal/cr_rem_file.pro)

Project	: SOHO-LASCO/EIT

Name		: cr_rem_file

Purpose	: Remove cosmic rays from LASCO/EIT images

Explanation	: This procedure removes cosmic rays from a named FITS
		  file by first using statistical techniques to identify 
		  regions containing cosmic rays (or stars) and then replaces
		  the pixel values in that region with new values 
		  determined by taking the average of column and row
		  fits across the region based on neighboring points.
		  Statistical noise based upon the quality of the
		  fit to the neighboring data is added to the fit
		  to give realistic local variation for aesthetic
		  purposes.

 Syntax	: result=cr_rem_file(image_file,telescope,
				BASE_IMAGE=base_image_file,
				BLOCK=block,
				GROUP_SIZE=groupsize,
				N_SIGMA=n_sigma,
				CX=cx,CY=cy,
				RMIN=rmin,RMAX=rmax,
				RFILE=rfile,
				USE_ROI=use_roi,
				ORDER=order)

 Inputs	: image_file : The file name of an image (FITS)
		  telescope  :	An integer denoting the telescope used for the
				image. C1=1, C2=2, C3=3, EIT=4

 Keywords	: BASE_IMAGE : 	Filename of image to subtract from the input 
				image array if differencing is desired.
		  BLOCK      : 	Size in pixels of the larger neighborhoods used
			     	to determine the statistical characteristics
				which determine which smaller neighborhoods have
				possible cosmic rays. Default is 32.
		  GROUP_SIZE :	Size in pixels of the smaller neighborhoods
				which are examined for cosmic rays. 
				Default is 8.
		  N_SIGMA    :	Statistical requirement used to determine
				candidate smaller neighborhoods withing a larger
				neighborhood. The maximum value of a given
				smaller neighborhood must deviate 
				from the median value of the means of the 
				smaller	neighborhoods comprising a larger
				neighborhood in order to be considered a 
				candidate.
		  ORDER	     :	The order of the polynomial fit to use to model
				the data in the smaller neighborhoods being 
				corrected. Default is 2. Errors may occur for
				values higher than 3. For smaller neighborhoods
				abutting the occulter or abutting telemetry
				dropout regions, a linear fit is used.

 ***	The program is designed to handle the occulter and vignetted outer edge
	of the circular FOV of the instruments. The high intensity gradients
	at these edges leads to poor cosmic ray correction when candidate 
	pixel groups are identified there. The following keywords should be
	included when using this feature.
		  CX,CY      : 	Coordinates of the center of the occulter in
				the image. Only required if the occulter region
				is to be ignored in the removal process. This
				is done in processing LASCO images to avoid 
				problems arising from having large regions
 				with values drastically different
				from neighboring valid data. In EIT images it is
				done to avoid processing disk data because some
				bright features on the disk are
				indistinguishable from cosmic rays using these
				statistical methods.
		  RMIN,RMAX  :	The minimum and maximum radial values to
				consider for the processing. The minimum value
				should be slightly larger than the radius of 
				the occulter in the image. The maximum should
				be slightly smaller than the radius of the
				unvignetted field of view. IF RMIN is defined
				but RMAX is not, the entire field of view
				outside RMIN will be corrected.
		  RFILE      :  The name of a file containing the radial
				distance of each pixel in the image from
				the center coordinates CX, CY. If the file
				does not exist, it will be generated. If the
				file exists, but the size of the image or the 
				center coordinates have changed, the file is
				regenerated. 
		  USE_ROI     : Sometimes one might want to exclude a region from
				cosmic ray removal processing, such as when a bright
			 	star or a comet appears in the field of view. To
				do this, set this keyword and then use the mouse
				buttons to set the ROI (=region of interest). The left
				mouse button draws line segments, the middle button
				removes them if necessary, and the right button 
				closes the region. See the description of DEFROI
				in the IDL manual.

 Calls		: generate_r_matrix

 Restrictions	:

 Side effects	:

 Category	: Image processing

 Prev. Hist.	: None

 Written	: Norm Moulton, NRL, Sept. 1996

 Modified	:

 Version	:


CUT_IMG

[List of Routines] (See ./display/cut_img.pro)

 NAME:
	CUT_IMG  

 PURPOSE:
	To cut an image at a certain value of its histogram.
	This can be useful when a few 'hot' pixels (as they
	might occur during flatfielding) might damage the 
	dynamical range of an image.
	First the histogram of the image is calculated. 
	Then, the value is determinated for which a certain
	fraction (default: 99%) lies below this level. All
	values higher than this level are set to the pixel
	value determined by this level.

 CATEGORY:
	LASCO

 CALLING SEQUENCE:
	CUT_IMG,image

 INPUTS:
	image:	a two dimensional (image-)array.

 OPTIONAL INPUTS:
	None

 KEYWORD PARAMETERS:
	LEVEL:	gives a user specified level at which the
		histogram should be cut. If not specified,
	        the default value is 0.99
       UPPER, LOWER: If either is set, the upper cutting
               or lower cutting is performed at levels
               LEVEL and (1-LEVEL)
       VERBOSE: If set, additional information is given

 OUTPUTS:
	The image, limited in the dynamical range to the 
	(LEVEL) lower part.

 OPTIONAL OUTPUTS:
	None

 EXAMPLE:
	newimage=CUT_MAX(image,LEVEL=.99,/LOW,/UP)
	The upper 1% of the image will be set to the value
	of the former 99% level, the lower 1% to the value
	of 1%;

 COMMON BLOCKS:
	None

 SIDE EFFECTS:
	None

 RESTRICTIONS:
	None

 MODIFICATION HISTORY: V1.0 Alexander Epple 30-Jun-1994 : MPAe
       LOWER and UPPER Keywords: AE 25-MAR-1997 MPAe


CUT_MAX

[List of Routines] (See ./display/cut_max.pro)

 NAME:
	CUT_MAX	  

 PURPOSE:
	To cut an image at a certain value of its histogram.
	This can be useful when a few 'hot' pixels (as they
	might occur during flatfielding) might damage the 
	dynamical range of an image.
	First the histogram of the image is calculated. 
	Then, the value is determinated for which a certain
	fraction (default: 99%) lies below this level. All
	values higher than this level are set to the pixel
	value determined by this level.

 CATEGORY:
	PICO

 CALLING SEQUENCE:
	CUT_MAX,image

 INPUTS:
	image:	a two dimensional (image-)array.

 OPTIONAL INPUTS:
	None

 KEYWORD PARAMETERS:
	LEVEL:	gives a user specified level at which the
		histogram should be cut. If not specified,
	        the default value is 0.99
       UPPER, LOWER: If either is set, the upper cutting
               or lower cutting is performed at levels
               LEVEL and (1-LEVEL)
       VERBOSE: If set, additional information is given

 OUTPUTS:
	The image, limited in the dynamical range to the 
	(LEVEL) lower part.

 OPTIONAL OUTPUTS:
	None

 EXAMPLE:
	newimage=CUT_MAX(image,LEVEL=.99,/LOW,/UP)
	The upper 1% of the image will be set to the value
	of the former 99% level, the lower 1% to the value
	of 1%;

 COMMON BLOCKS:
	None

 SIDE EFFECTS:
	None

 RESTRICTIONS:
	None

 MODIFICATION HISTORY: V1.0 Alexander Epple 30-Jun-1994 : MPAe
       LOWER and UPPER Keywords: AE 25-MAR-1997 MPAe


CW_ARRSEL

[List of Routines] (See ./util/cw_arrsel.pro)

 TITLE:
	CW_ARRSEL

 PURPOSE:
	This function takes a vector and allows the user to add new values
	and reject values already there.

 INPUT PARAMETERS:
	X: Initial value of group of buttons

 OPTIONAL INPUT PARAMETERS:
	SELECTED: A vector of values that should start checked.  This
		parameter takes precedence over 'status'.  If X is not specified but
		selected is, then the initial buttons to be shown will be read from
		selected instead of x

	STATUS: A vector of binary values the same size as x.  All buttons with
		a nonzero corresponding element of status will be shown as checked.
		The 'selected' keyword takes precedence over status.

	TITLE: A string which will be the title of the widget.  Default is
		'Array Selection'

	PROMPT: A string which will prompt the user to enter a new value.
		Default is 'New Value:'

 OUTPUTS:
	The values selected by the user are returned as a vector.

 SIDE EFFECTS:
	None

 RESTRICTIONS:
	This widget is MODAL.  No other widget applications will be responsive
	while this widget is in use.

 PROCEDURE:
	CW_ARRSEL is primarily an extension of the CW_BGROUP included
	with IDL which allows buttons to be added dynamically.  It does
	this by saving necessary values internally and then destroying and
	rebuilding its widget interface  as necessary.

 EXAMPLES:
	To change the coefficients sent to a curvefit routine according to the 
	user's demands, starting with a default of [3,7,9]

		coeffs=CW_ARRSEL([3,7,9])
		result=curvefit(x,y,weights,coeffs, function_name='f')
 
 WRITTEN:
	11 August, 2000			Andrew Hayes, NRL

 @(#)cw_arrsel.pro	1.1 08/21/00 :LASCO IDL LIBRARY


CW_ZOOM1 (MODIFIED VERSION OF CW_ZOOM).

[List of Routines] (See ./cme/cw_zoom1.pro)

 NAME:
	CW_ZOOM1 (modified version of CW_ZOOM).

 PURPOSE:
	This compound widget displays two images: an original image
	in one window and a portion of the original image in another.
	The user may select the center of the zoom region, the zoom scale,
	the interpolation style, and the method of indicating the zoom center.

 CATEGORY:
	Compound widgets.

 CALLING SEQUENCE:
	Widget = CW_ZOOM1(Parent)

 INPUTS:
       Parent:	 The ID of the parent widget.

 KEYWORD PARAMETERS:
	FRAME:	 If set, a frame will be drawn around the widget. The
		 default is FRAME=0 (no frame).
	MAX:	 The maximum zoom scale, which must be greater than
		 or equal to 1. The default = 20.
	MIN:	 The minimum zoom scale, which must be greater than
		 or equal to 1. The default = 1.
	RETAIN:	 Controls the setting for backing store for both windows.
		 If backing store is provided, a window which was obscured
		 will be redrawn when it becomes exposed. Set RETAIN=0 for
		 no backing store. Set RETAIN=1 to "request backing store
		 from server" (this is the default). Set RETAIN=2 for IDL
		 to provide backing store.
	SAMPLE:	 Set to zero for bilinear interpolation, or to a non-zero
		 value for nearest neighbor interpolation. Bilinear
		 interpolation gives higher quality results, but requires
		 more time. The default is SAMPLE=0 (bilinear interpolation).
	SCALE:	 The initial integer scale factor to use for the zoomed image.
		 The default is SCALE=4. The scale must be greater than or
		 equal to 1.
	TRACK:	 Set to zero if the zoom window should be updated only when
		 the mouse button is pressed. Set to a non-zero value if the
		 zoom window should be updated continuously as the cursor
		 is moved across the original image. Note: On slow systems,
		 /TRACK performance can be inadequate. The default is TRACK=0.
	UVALUE:	 The user value for the widget.
	XSIZE:	 The width of the window (in pixels) for the original image.
		 The default is 500.
	YSIZE:	 The height of the window (in pixels) for the original image.
		 The default is 500.
	X_SCROLL_SIZE: The width of the visible part of the original image.
		       This may be smaller than the actual width controlled
		       by the XSIZE keyword. The default is 0, for no
		       scroll bar.
	Y_SCROLL_SIZE: The height of the visible part of the original image.
		       This may be smaller than the actual height controlled
		       by the YSIZE keyword. The default is 0, for no
		       scroll bar.
	X_ZSIZE: The width of the window for the zoomed image.
		 The default is 250.
	Y_ZSIZE: The height of the window for the zoomed image.
		 The default is 250.

 OUTPUTS:
       The ID of the created widget is returned.

 SIDE EFFECTS:
	When the "Report Zoom to Parent" button is pressed, this widget
	will generate an event structure containing several data fields.
		x_zsize, y_zsize:	size of the zoomed image
		x0, y0:			lower left corner in original image
		x1, y1:			upper right corner in original image
	This event is a report to the parent that allows retrieval of the
	zoomed image using WIDGET_CONTROL. 

       Ed Esfandiari August 1998:
       Removed "Report Zoom to Parent" button by commenting it out.

 PROCEDURE:
	WIDGET_CONTROL, id, SET_VALUE=value can be used to change the
		original, unzoomed image displayed by the widget.
		The value may not be set until the widget has been
		realized.

	WIDGET_CONTROL, id, GET_VALUE=var can be used to obtain the current
		zoomed image displayed by the widget.

 MODIFICATION HISTORY:
	June 30, 1992, ACY
       7 April 1993, AB, Removed state caching.
	13 June, 1994, ACY, Save window and set to zoom prior to erase
			    Add byte conversion in set_value
	23 November, 1994, ACY, add code to handle cases in which the
			set_value image is larger or smaller than the
			original image.  Also remove scaling on display
			operation (only scale the image when it is set.)

       06 August 1998, Ed Esfandiari, removed "Report Zoom to Parent" button
                       and added "Show Zoomed Area" button which draws a box
                       on the region of the original image corresponding to
                       the zoomed image. This box will be dragged if the
                       "Track Cursor" is set. Also the coordinates of the
                       lower-left and upper-right corners of the box are
                       displayed. If "Show Zoomed Area" is not set, only
                       the cursor location is displayed. Finally, I changed
                       the name of this program to cw_zoom1.pro.


DAILY_MOVIE

[List of Routines] (See ./movie/daily_movie.pro)

 NAME:
	DAILY_MOVIE

 PURPOSE:
	This procedure supplies a set of standard parameters for the MKMOVIE 
	procedure to easily make a movie for all of the images in a given date

 CATEGORY:
	LASCO DATA ANALYSIS

 CALLING SEQUENCE:
	DAILY_MOVIE, Tel, Dte

 INPUTS:
	Tel:	A string denoting the telescope: 'C1', 'C2', 'C3', 'EIT'
	Dte:	A string giving the date:  '960331'

 OPTIONAL INPUTS:
	Ndy:	The number of days to use in forming the movie.  The default
		is 1 day.

 KEYWORD PARAMETERS:
	DIFF:	If this keyword is set difference images will be generated
	UNSHARP:	If this keyword is set unsharp mask images will be 
		generated, in which the size of the box is set to the value.

 SIDE EFFECTS:
	If a list file in the image directory doesn't exist, one will be
	written in the user's home directory.

 PROCEDURE:
	Performs validity checks on dte and tel inputs.
	Determines if a filename of '*list*' exists in the image directory.

 EXAMPLE:
	To see a movie in difference images for telescope C3 for 1 Apr 96:

		DAILY_IMAGE,'C3','960401',/diff

	To see a movie in unsharp masked images for telescope C3 for 1 Apr 96:

		DAILY_IMAGE,'C3','960401',unsharp=15

 MODIFICATION HISTORY:
 	Written by:	RA Howard, 21 Apr 1996


	@(#)daily_movie.pro	1.3 09/12/97 LASCO IDL LIBRARY


DATE_CAL

[List of Routines] (See ./las-c2/calib5.pro)

 NAME:
	DATE_CAL
 PURPOSE:
	Procedure to perform conversion of dates to decimal form

	format: string (ascii text) encoded as
		DD MON YEAR for date
               HH:MM:SS.SS for hour
		(eg.  14 JUL 1987 15:25:44.23)

 CALLING SEQUENCE
	jt = DATE_CAL( DATE, HOUR )

 INPUTS:
	DATE - input date in one of the three possible formats
 OUTPUTS:
	The converted date is returned as the function value.
 HISTORY:
	version 1  D. Lindler  July, 1987
       adapted for IDL version 2  J. Isensee  May, 1990
       adapted from DATE_CONV to lasco use A.LL. 
       990126 Ed Esfandiari   Fixed for Y2K problem.


DB_INSERT

[List of Routines] (See ./database/db_insert.pro)

 NAME:				db_insert
 PURPOSE:			writes SQL statements to insert a record 
                               into a dbms table
 CATEGORY:			DBMS
 CALLING SEQUENCE:		db_insert,a
 INPUTS:			a = a dbms table structure where the first
                                   element of the structure is the data base 
				    name, the second element is the table name
                                   and other structure elements are the 
                                   column names of the table.
       
 OPTIONAL INPUT PARAMETERS:	None
 KEYWORD PARAMETERS:		None
 OUTPUTS:			None
 OPTIONAL OUTPUT PARAMETERS:   None
 COMMON BLOCKS:		dbms,ludb
				ludb = unit number of the file to write to
 SIDE EFFECTS:
 RESTRICTIONS:
 PROCEDURE:
 MODIFICATION HISTORY:		RAHoward NRL 10/27/95
      V2   RAH   02/05/96   Corrected handling of first/last elements of array
      V3   RAH   02/06/96   Corrections for sybase debugging
           AEE   02/08/96   use writetext for browse_img
	    NBR   03/11/99   Handle NULL value

 SCCS variables for IDL use
 
 @(#)%w%h	NRL Solar Physics


DCT

[List of Routines] (See ./reduce/fuzzy/dct.pro)

 NAME:
	DCT

 PURPOSE:
	Computes the D.C.T. or the Inverse D.C.T.

 PROCEDURE:
	Computes the D.C.T. (Discrete Cosine Transform) or the I.D.C.T.
	(Inverse D.C.T.) of a 1D or 2D array
	The D.C.T. values here are deduced from the F.F.T. values

 CATEGORY:
	Transformation

 CALLING SEQUENCE:
	c = dct(x [, direction] )

 INPUTS:
	array		a 1D or 2D array

 Optional INPUTS:
	direction	Direction of the transform :
			By convention a negative direction means a forward
			transform, and positive means a inverse transform; 
			By default, the forward transform is performed

 KEYWORD PARAMETERS:
	INVERSE		perform the inverse transform, reguardless of the value
			of the direction parameters

 OUTPUTS:
	the DCT spectrum, with the same dimentions as the input array x

 REFERENCE:
	DIGITAL IMAGE PROCESSING ALGORITHM
	Ioannis Pitas
	Prentice Hall, (c) 1993
	(p107-108 for 1D DFT to DCT transform)
	(p111,113 for 2D DFT to DCT transform)

	See also the IDL documentation about the FFT function

 MODIFICATION HISTORY:
	Written by J. More, November 1996


DCURSOR.PRO

[List of Routines] (See ./las-c2/dcursor.pro)

 NAME:
       DCURSOR.PRO
 PURPOSE:
       put the pixels coordinates & the pixels values selected with the
       cursor in a table that can be readed.
 CATEGORY:
       array manipulation
 CALLING SEQUENCE:
       DCURSOR, ima, tab_name, n_points
 INPUTS:
       ima                         image array (in memory)
       tab_name                    name of table that receives the values
       n_points                    number of points in the table
 KEYWORD PARAMETERS:
                                   None
 OUTPUTS:
       values writted in the table
 COMMON BLOCKS:
       None.
 SIDE EFFECTS:
       None
 RESTRICTIONS:

 PROCEDURE:
       Straightforward.
 MODIFICATION HISTORY:
       Written by M.B  v.1.0       : LAS  01/27/94


DDISTIM2ECS

[List of Routines] (See ./reduce/ddistim2ecs.pro)

 NAME:				DDISTIM2ECS

 PURPOSE:			Convert date and times generated by DDIS into 
				ECS format

 CATEGORY:			REDUCTION

 CALLING SEQUENCE:		Result = DDISTIM2ECS (In)

 INPUTS:			In = date and time string in the format 
						YYMMDD_HHMMSS
					or      YYYYMMDD_HHMMSS

 OUTPUTS:			Result = a string in the ECS format:
					YY/MM/DD HH:MM:SS or YYYY/MM/DD HH:MM:SS


 RESTRICTIONS:			Only works on single strings

 PROCEDURE:			Straightforward string parsing

 MODIFICATION HISTORY:         Written    RA Howard  NRL   15 November 1995

 VERSION:			1	Initial Release

       @(#)ddistim2ecs.pro	1.1 04 Apr 1996 LASCO IDL LIBRARY


DECODE_SC_DACS

[List of Routines] (See ./reduce/decode_sc_dacs.pro)

 NAME:				DECODE_ALL_SCIENCE

 PURPOSE:			Main program to decode all science TM files
				from DACS, ECS, or Level-0 into raw DDIS files

 CATEGORY:			REDUCTION

 CALLING SEQUENCE:		DECODE_ALL_SCIENCE, Date

 INPUTS:			None

 OPTIONAL INPUTS:		Date = Date to be processed, YYMMDD
				       If date is not present, then all
				       science files in $LEB_IMG will be 
				       processed.
	
 KEYWORD PARAMETERS:		None

 OUTPUTS:			None

 OPTIONAL OUTPUTS:		None

 COMMON BLOCKS:		decode_science

 SIDE EFFECTS:

 RESTRICTIONS:

 PROCEDURE:

 EXAMPLE:

 MODIFICATION HISTORY:		Written  RA Howard, NRL
    Version 1   RAH, 21 Dec 1995,    Initial Release

       @(#)decode_sc_dacs.pro	1.1 04 Apr 1996 LASCO IDL LIBRARY


DEF2C_FILL

[List of Routines] (See ./database/def2c_fill.pro)

 Project     : SOHO - LASCO/EIT
                   
 Name        : DEF2C_FILL
               
 Purpose     : To convert DB table definition ASCII format to C routine.
               
 Explanation : This routine reads in an ASCII Database table definition file
		and generates a C routine which produces SQL to do inserts.
               
 Use         : IDL> DEF2C_FILL, input_file_name
    
 Inputs      : input_file_name		;file containing DB table definitions
					;TABLE_NAME, TABLE_DESC, TABLE_DEFN
               
 Outputs     : None.
               
 Calls       : STR_SEP2, STR2ARR, ARR2STR, BREAK_FILE, SPEC_DIR

 Common      : None.
               
 Restrictions: Must have write permission for the current directory.
               
 Side effects: Creates two files in the current directory named:
		input_file_name_fill.c
		(the extension is dropped from the input file name)
               
 Category    : Database Administration
               
 Prev. Hist. : None.

 Written     : Dennis Wang, NRL, November 1995.
               
 Modified    : 

 Version     : 


DEF2C_FORMAT

[List of Routines] (See ./database/def2c_format.pro)

 Project     : SOHO - LASCO/EIT
                   
 Name        : DEF2C_FORMAT
               
 Purpose     : To convert DB table definition ASCII format to C format routine.
               
 Explanation : This routine reads in an ASCII Database table definition file
		and creates a C routine that returns format strings
		for the tables 
               
 Use         : IDL> DEF2C_FORMAT, input_file_name
    
 Inputs      : input_file_name		;file containing DB table definitions
					;TABLE_NAME, TABLE_DESC, TABLE_DEFN, etc...
               
 Outputs     : None.
               
 Calls       : STR_SEP2, STR2ARR, ARR2STR, BREAK_FILE, SPEC_DIR

 Common      : None.
               
 Restrictions: Must have write permission for the current directory.
               
 Side effects: Creates a file in the current directory named:
		input_file_name_format.c
               
 Category    : Database Administration
               
 Prev. Hist. : None.

 Written     : Dennis Wang, NRL, November 2 1995.
               
 Modified    : 

 Version     : 


DEF2C_INSERT

[List of Routines] (See ./database/def2c_insert.pro)

 Project     : SOHO - LASCO/EIT
                   
 Name        : DEF2C_INSERT
               
 Purpose     : To convert DB table definition ASCII format to C routine.
               
 Explanation : This routine reads in an ASCII Database table definition file
		and generates a C routine which produces SQL to do inserts.
               
 Use         : IDL> DEF2C_INSERT, input_file_name
    
 Inputs      : input_file_name		;file containing DB table definitions
					;TABLE_NAME, TABLE_DESC, TABLE_DEFN, etc...
               
 Outputs     : None.
               
 Calls       : STR_SEP2, STR2ARR, ARR2STR, BREAK_FILE, SPEC_DIR

 Common      : None.
               
 Restrictions: Must have write permission for the current directory.
               
 Side effects: Creates two files in the current directory named:
		input_file_name__ins.c
		(the extension is dropped from the input file name)
               
 Category    : Database Administration
               
 Prev. Hist. : None.

 Written     : Dennis Wang, NRL, November 1995.
               
 Modified    : 

 Version     : 


DEF2STRUCT

[List of Routines] (See ./database/def2struct.pro)

 Project     : SOHO - LASCO/EIT
                   
 Name        : DEF2STRUCT
               
 Purpose     : To convert DB table definition ASCII format to C and IDL include files.
               
 Explanation : This routine reads in an ASCII Database table definition file
		and creates two output files.  One containing C structure
		defintions for the tables and the other containing IDL structure
		definitions.
               
 Use         : IDL> DEF2STRUCT, input_file_name, database_name
    
 Inputs      : input_file_name		;file containing DB table definitions
					;TABLE_NAME, TABLE_DESC, TABLE_DEFN, etc...
               database_name		;specify the database name that the tables are in
					;this becomes the first element of each struct
               
 Outputs     : None.
               
 Calls       : STR_SEP2, STR2ARR, ARR2STR, BREAK_FILE, SPEC_DIR

 Common      : None.
               
 Restrictions: Must have write permission for the current directory.
               
 Side effects: Creates two files in the current directory named:
		input_file_name_struct.inc	;IDL include file
		input_file_name_struct.h	;C include file
		(the extension is dropped from the input file name)
               
 Category    : Database Administration
               
 Prev. Hist. : None.

 Written     : Scott Paswaters, NRL, October 1995.
               
 Modified    : 

 Version     : 


DEF_LASCO_HDR

[List of Routines] (See ./inout/def_lasco_hdr.pro)

 NAME:				DEF_LASCO_HDR
 PURPOSE:			Define a Header Structure for a Level 0.5 or Level 1 LASCO Image
 CATEGORY:			CCD
 CALLING SEQUENCE:		hdr=DEF_LASCO_HDR(empty_variable)
 INPUTS:			None
 OPTIONAL INPUT PARAMETERS:	None
 KEYWORD PARAMETERS:		None

 OUTPUTS:		a structure array containing an initialized header
  lasco_hdr_tags	Returns strarr of tags in structure

 OPTIONAL OUTPUT PARAMETERS:
 COMMON BLOCKS (deleted):	LASCO_HEADER_COMMON,header,nt,tags
				header = the header structure
				nt = number of elements in the header
				tags = string array of names of header items
 SIDE EFFECTS:
 RESTRICTIONS:			DATE_OBS does not conform to SSW 
 PROCEDURE:
 MODIFICATION HISTORY:		SEP 1/07/95  Adapted from define_ccd_hdr.pro
                               SEP 1/20/95  If a FITS header is passed in the LASCO
				   header structure is filled with its contents.
                               SEP 3/17/95  Added CAMP_ID
	NBR  8/08/00	Update for current Level 0.5 and Level 1 LASCO hdr structure
	NBR  9/17/02	Add keywords for level 1; remove common block; change EXP_CMD to EXPCMD

 @(#)def_lasco_hdr.pro	1.3 10/02/02 :NRL Solar Physics


DELETE_EXPFAC

[List of Routines] (See ./expfac/delete_expfac.pro)

 NAME:
	DELETE_EXPFAC

 PURPOSE:
	This procedure deletes the exposure factor files between two dates.

 CATEGORY:
	LASCO Exposure Factor

 CALLING SEQUENCE:
	DELETE_EXPFAC,Tel,Dtea,Dteb

 INPUTS:
	Tel:	The telescope: 'c1','c2,'c3','c4'
	Dtea:	The starting date, can be either a string yymmdd, or
		the modified julian date, or the CDS time structure
	Dteb:	The ending date, can be either a string yymmdd, or
		the modified julian date, or the CDS time structure

 SIDE EFFECTS:
	The files in $NRL_LIB/lasco/expfac/data/YYMM/tel+.... are deleted.

 MODIFICATION HISTORY:
 	Written by:	RA Howard, NRL, 2/1/98

	@(#)delete_expfac.pro	1.2 02/04/98 LASCO IDL LIBRARY


DIFBKGND

[List of Routines] (See ./synoptic/difbkgnd.pro)

 NAME:
	DIFBKGND

 PURPOSE:
	Difference the appropriate background image

 CATEGORY:
	DATA_ANAL

 CALLING SEQUENCE:
	Result = DIFBKGND(Img,Hdr)

 INPUTS:
	Img = Input Image array.  It is assumed that the array is full image,
	      (either 1024x1024 or 512x512) so that if the original image was 
	      a subimage, it must be put into the proper place in a full image 
	      array.
	Hdr = FITS header

 KEYWORDS:
	MINVAL:  If set, the minimum value for the byte scaling is set to
                this value.  The default is the minimum value in the image.
       MAXVAL:  If set, the maximum value for the byte scaling is set to
                this value.  The default is the maximum value in the image.
       LOGSCL:  If set, a logarithmic scaling is applied.  The default is
                linear scaling.
	ALTMIN:  If set, the minimum value for the byte scaling when the
                background image is NOT found is set to this value.  The
                default is the minimum value in the image.
	ALTMAX:  If set, the maximum value for the byte scaling when the
                background image is NOT found is set to this value.  The
                default is the maximum value in the image.
       ALTLOG:  If set, a logarithmic scaling is applied when the background
                image is NOT found.  The default is linear scaling.
       RATIO:   If set the input image is divided by the model.  Zeroes in
                the model or input are set to 1.  The default is to perform
                a subtraction.
       NO_SCALE:If set the output image is not byte scaled.  The default is 
                to byte scale the image.

 OUTPUTS:
	The function returns a byte scaled difference image.

 PROCEDURE:
	The input header is examined to extract the telescope, filter and 
	polarizer/sector.  The directory pointed to by the environment 
	variable $MONTHLY_IMAGES is searched for all monthly images that
	exist for that combination.  If only one monthly image is found it
	is used.  Otherwise the monthly image whose Mid-Date is closest to
	the date of the input image is used.

	No background subtraction is performed if the input image is a dark,
	cal lamp, and continuous mode.  In these cases the image is byte 
	scaled using histogram equalization.  If the image is not 1024x1024.  
	or 512x512 then no background subtraction is used, but the image is 
	scaled according to the input keywords.

 MODIFICATION HISTORY:
	Written, RA Howard, NRL, 16 October 1996

	24 Oct 96, RAH,  Added ratio
	25 Oct 96, RAH,  Added save of last background in common
	16 Jul 97, RAH,  Modified call to OFFSET_BIAS to pass header
	26 Feb 98, RAH,  Modified method for determining whether a background image was found
	29 Sep 99, NBR,  Remove CURRENT keyword from GETBKGIMG call

       @(#)difbkgnd.pro	1.6 09/29/99     LASCO IDL LIBRARY


DIFF

[List of Routines] (See ./util/diff.pro)

 FUNCTION DIFF

 Returns values in arr1 that are not in arr2; if none, then returns -1.

 INPUTS:
 arr1, arr2	Arrays to compare, can be any size or type (???)

 OUTPUTS:
 flag		Zero if no values are returned (-1), else is 1

 Written by N. Rich, NRL/Interferometrics, about 2000

 Modified:
  01.11.06, nbr - Rewrite so it works one way only.

	11/08/01 @(#)diff.pro	1.2 - NRL LASCO IDL Library


DIFF2TIME

[List of Routines] (See ./reduce/diff2time.pro)

 NAME:				DIFF2TIME

 PURPOSE:			Compares two times 

 CATEGORY:			REDUCTION			

 CALLING SEQUENCE:		Result = DIFF2TIME (Time1, Time2)

 INPUTS:			Time1 = First time as CDS time structure
				Time2 = Second time as CDS time structure

 OUTPUTS:			Result = Result of comparison:
					-1 if Time1 > Time2
					 0 if Time1 = Time2
					+1 if Time1 < Time2

 MODIFICATION HISTORY:

       @(#)diff2time.pro	1.1 04 Apr 1996 LASCO IDL LIBRARY


DIRPATH

[List of Routines] (See ./util/dirpath.pro)

 NAME:
	dirpath

 PURPOSE:
	Converts input into a directory with a delimiter on the end.
	Takes OS differences into account.

 CATEGORY:
	System File Utility

 CALLING SEQUENCE:
 
	Result = DIRPATH(Rootdir, Subdirs)

 INPUTS:
	Rootdir:	The first portion of the directory structure

 OPTIONAL INPUTS:
	Subdirs	STRARR	List of subdirectories to add to rootdir 
	
 KEYWORD PARAMETERS:
	None

 OUTPUTS:
	Returns directory with correct delimiters.

 PROCEDURE:
	Uses !DELIMITER if defined, else uses GET_DELIM()

 EXAMPLE:
	dir = DIRPATH(getenv('NRL_LIB'),['idl','expfac']) returns
	DIR	STRING = '/net/cronus/opt/local/idl_nrl_lib/idl/expfac/'
	for OS Solaris (UNIX)

 MODIFICATION HISTORY:
 	Written by:	N. Rich, 01/12/17, NRL

	@(#)dirpath.pro	1.1, 12/17/01 LASCO IDL LIBRARY


DISPLAY_JPG

[List of Routines] (See ./util/display_jpg.pro)

PRO display_jpg, lzorql, day, tscope


   PURPOSE:
	DISPLAY_JPG is called by the VIEW_JPG2 procedure to display
	.jpg images from a certain day and telescope, from cplex1
	or cplex2 on corona. It is also designed to print these
	images.

   CALLING SEQUENCE:
	
	display_jpg, lzorql, day, tscope

   INPUTS:
	lzorql, day, tscope: all string variables


   OUTPUT:
	Draw widget on screen; postcript file '~/printjpg.ps'


   Written by Nathan Rich, July 1996

   MODIFIED:	NR	 1 Aug 1996	rename findfile directories
		NR	 5 Aug		added -o nobanner to print
		nbr, 5 Nov 2001 - Add SCCS tags

	11/05/01 @(#)display_jpg.pro	1.3 - NRL LASCO IDL Library


DIST2SUN

[List of Routines] (See ./data_anal/dist2sun.pro)

 NAME:
	DIST2SUN

 PURPOSE:
	This function computes the distance from SOHO to the sun in km

 CATEGORY:
	DATA_ANAL

 CALLING SEQUENCE:
	Result = DIST2SUN(Date)

 INPUTS:
	Date:	The date in any CDS time format

 OUTPUTS:
	This function returns the distance from SOHO to the sun in km.
	The type is double precision.

 PROCEDURE:
	The orbit ephemeris files are read for the desired date.
	The solar vector is returned and the distance is computed.

	If an error is found getting the orbit file, the result will be zero

 EXAMPLE:
	dist = DIST2SUN('1995-dec-21')

 MODIFICATION HISTORY:
 	Written by:	R.A. Howard, 25 Jan 2001

	@(#)dist2sun.pro	1.1 01/25/01 LASCO IDL LIBRARY


DISTARR

[List of Routines] (See ./util/distarr.pro)

 NAME:
	DISTARR

 PURPOSE:
	This function generates an array whose elements are the Euclidean
	distance from a given point.

 CATEGORY:
	LASCO UTIL

 CALLING SEQUENCE:
	Resut = DISTARR([xsize[,ysize[,xcen[,ycen[,dxs[,dys]]]]]])

 OPTIONAL INPUTS:
	Xsize:	The size of the array along the abscissa.  Default is 1024
	YSIZE:	The size of the array along the ordinate.  Default is equal to xsize
	XCEN:	The position of the center.  Default is half of xsize
	YCEN:	The position of the center.  Default is half of ysize

 KEYWORDS:
	MEM:	Setting this keyword sacrifices some speed for lower memory consumption 
	during routine.  Has no effect on output or side effects, nor does it have any effect if
	either xcen or ycen are float or double.

 OUTPUTS:
	Result:	The euclidean distance from (Xcen, Ycen)

OPTIONAL OUTPUTS:
	Dxs:	The distance from (Xcen,0)
	Dys:	The distance from (0,Ycen)

 PROCEDURE:
  Generates a 2D matrix whose elements are the RMS distance from sun center
  in pixels.  Also returns two matrices whose elements are the signed
  distances in either x or y from sun center

 EXAMPLE:
 To generate a 1024x1024 matrix whose values are the Euclidean distance from (512,512)
	result = distarr()

 To generate a 1024-element by 512-element matrix whose values are the Euclidean
 distance from (X,Y)
	result = distarr(512,1024,X,Y)

 MODIFICATION HISTORY:
 	Written by:	Andrew Hayes, NRL Dec, 1998
	Modified by:	Andrew Hayes, NRL Aug, 2000	Rewritten for greater speed if parameters
		are integers, changed inputs to optional input parameters, now chooses calculation
		method and output type intelligently depending on the type[s] of the input 
		parameters instead of forcing double.


	%W% %H% LASCO IDL LIBRARY


DISTORTION_COEFFS

[List of Routines] (See ./convert/distortion_coeffs.pro)

 NAME:			        DISTORTION_COEFFS	

 PURPOSE:			Returns a 3-element array of distortion 
                               coefficients (mm) for the requested telescope

 CATEGORY:			REDUCTION

 CALLING SEQUENCE:		Result = DISTORTION_COEFFS (Telescope)

 INPUTS:			Telescope = Number of the telescope that the
					    distortion coefficients are desired
                                           Either (C1..C4/EIT) or (0..3)

 OPTIONAL INPUTS:		None
	
 KEYWORD PARAMETERS:		None

 OUTPUTS:			Result = A 3-element array of distortion 
					 coefficients in millimeters (mm). 
                                        Returns zeros if telescope not defined.

 OPTIONAL OUTPUTS:		None

 COMMON BLOCKS:		None

 MODIFICATION HISTORY:		Written,  AEE, NRL
   Version 1  aee  24 Nov 1998
	nbr  21 Jul 2000 - Put version info in common block


ersion= '@(#)distortion_coeffs.pro	1.3 08/07/00' ; LASCO IDL LIBRARY 


DMEMORY

[List of Routines] (See ./display/dmemory.pro)

 Project     : SOHO - LASCO

 Name        : DMEMORY 

 Purpose     : 

 Category    : 

 Explanation : 

 Syntax      : 

 Examples    : 

 Inputs      : None

 Opt. Inputs : None

 Outputs     : None

 Opt. Outputs: None

 Keywords    : None

 Common      : 

 Restrictions:                                  

 Side effects: Not known

 History     : Version 1, 02-Sep-1995, B Podlipnik. Written

 Contact     : BP, borut@lasco1.mpae.gwdg.de


DMOVIE[1]

[List of Routines] (See ./display/c1_iod.pro)

 NAME:
	DMOVIE

 PURPOSE:
	This procedure will generate a list of images for selected day, create
       image reduce header catalog, sort images on date and time, write a list
       of images on ../work/$USER/list with name of the last processed day:
	960704.lst and write processed images on ../work/$USER/fits.

 CATEGORY:
	LASCO DATA ANALYSIS

 CALLING SEQUENCE:
	DMOVIE

 INPUTS:

 KEYWORD PARAMETERS:
	INST:   A string for instrument: 'C1' is default.
       DAY:    A string array: day = ['960703','960704']
       FILTER: A string for the filter: filter = 'Fe XIV'
       TSPAN:  A float number, time span in sec. between C1 off and on
               line image (default 700 sec).
       LAYOUT: IF this keyword is set, no layout will be processed.
       NO_PROCESS: If this keyword is set, images will not be processed,
                   only a list file will be written on disk.       
 
 SIDE EFFECTS:
	A list file in the $WORK/$USER/list directory will be written.

 PROCEDURE:
      

 EXAMPLE:

		DMOVIE,day='960704'
               DMOVIE,day=['960703','960704'],inst='C1',filter='Fe XIV'

 MODIFICATION HISTORY:
 	Written by:	B Podlipnik, 04 Jul 1996


	@(#)c1_iod.pro	1.1 11/02/01 LASCO IDL LIBRARY


DMOVIE[2]

[List of Routines] (See ./display/dmovie.pro)

 NAME:
	DMOVIE

 PURPOSE:
	This procedure will generate a list of images for selected day, create
       image reduce header catalog, sort images on date and time, write a list
       of images on ../work/$USER/list with name of the last processed day:
	960704.lst and write processed images on ../work/$USER/fits.

 CATEGORY:
	LASCO DATA ANALYSIS

 CALLING SEQUENCE:
	DMOVIE

 INPUTS:

 KEYWORD PARAMETERS:
	INST:   A string for instrument: 'C1' is default.
       DAY:    A string array: day = ['960703','960704']
       FILTER: A string for the filter: filter = 'Fe XIV'
       TSPAN:  A float number, time span in sec. between C1 off and on
               line image (default 700 sec).
       LAYOUT: IF this keyword is set, no layout will be processed.
       NO_PROCESS: If this keyword is set, images will not be processed,
                   only a list file will be written on disk.       
 
 SIDE EFFECTS:
	A list file in the $WORK/$USER/list directory will be written.

 PROCEDURE:
      

 EXAMPLE:

		DMOVIE,day='960704'
               DMOVIE,day=['960703','960704'],inst='C1',filter='Fe XIV'

 MODIFICATION HISTORY:
 	Written by:	B Podlipnik, 04 Jul 1996


	@(#)dmovie.pro	1.1 11/02/01 LASCO IDL LIBRARY


DO_POLARIZ

[List of Routines] (See ./polariz/do_polariz.pro)

 NAME:			do_polariz

 PURPOSE:		Reduce Polarization Sequences for C1, C2 & C3

 CATEGORY:
 CALLING SEQUENCE:	do_polariz
 INPUTS:		NONE
		

 OPTIONAL INPUTS:	Batch Mode requires INDEXLIST, SAVEPATH, CAMERA keywords
                       and one or more of: SAVE_POLARIZ, SAVE_PERCENT, SAVE_MU,
                       SAVE,US,SAVE_UNPOLARIZ, SAVE_TOTAL, SAVE_JY, SAVE_JZ
                       SAVE_ALL

                       INDEXLIST = list of img_hdr.txt files including pathnames
                       SAVEPATH = location to put saved output files
                       CAMERA = camera number (C1 = 1, C2 = 2, C3 = 3)

                       DIFF - input difference images (C1)
		        C1TRIPLE - input 3 wavelength C1 images
			FIXC3ZERO - Define C3 +00 filter image to be 3.0*j0 - (j+60 + j-60)
                                   instead of using +00 image (must be used after 10/14/98)
                       PTF - point filter output files
			AUTO - for days with multiple PW sequences try to match
                              them automatically (BATCH mode only)
                       ROI = Region of Interest in pixels for computing Ave
                       SEQNO = sequence number of the day e.g to process the
                               2nd sequence of the day set seqno=2
                       DATATYPE = 5 for quicklook 
                                  1 for level 0 
                                  2 for level 1
 OUTPUTS:
 OPTIONAL OUTPUT PARAMETERS:
 COMMON BLOCKS:        POLARIZ_DATA, POLARIZ_DISPLAY
 SIDE EFFECTS:
 RESTRICTIONS:
 PROCEDURE:
	 Example: Normal Interactive File Selection
	  do_polariz
	 Example: Batch Mode - File Selection by input file list
	  do_polariz,INDEXLIST='it.lst',SAVEPATH='/mypath',CAMERA=1,/SAVE_ALL
	 Example: Difference Image Analysis
	  do_polariz,/DIFF
	 Example: C3 Fix
	  do_polariz,/FIXC3ZERO

 MODIFICATION HISTORY:
	WRITTEN BY:	Dennis Wang, Interferometrics/NRL, 1996
       14 Jul 97       - Added SAVE_PERCENT
       27 Oct 97       - Added PTF - point filter keyword to batch
			  and interactive mode
			- changed output FITS headers
			- changed output filenames and type codes
			- changed output for brightness to DN instead of DN/sec
       10 Nov 97       - C2 & C3 vignetting Functions added to 'Recalc' Button
                       - Point Filter added to 'Recalc' Button
                       - saved Files now have LASCO FITS Headers 
                       - Added AUTO keyword - batch mode sequence matching
	27 Oct 98	- Added FixC3ZERO keyword and supporting code
       07 Jun 00       - Added SEQNO and DATATYPE Keywords
       15 Aug 2000     - Fixed CAMERA Keyword

	@(#)do_polariz.pro	1.7 03/05/01 LASCO IDL LIBRARY


DRAWCIRCLE

[List of Routines] (See ./las-c2/drawcircle.pro)

ro drawcircle, ima_in, x_cntr, y_cntr, radius, ptyp, psiz, color
; Draw a circle of given radius and given center on a frame
; Created by M.B on 31/01/94 : LAS  v1.0
; Modified by M.B on 17/02/94 : LAS
; inputs :
;         ima_in           image that receives the picture
;         x_cntr, y_cntr   center coordinates of the drawn circle
;         radius           radius of the drawn circle
;         ptyp             selected drawn points (0 --> 9)
;         psiz             heigth of the drawn points (scale*1.)
;         color            color of the drawn points (0(black) --> 255(white))
; outputs :
;         on the selected window, the picture appears


DTSELECT

[List of Routines] (See ./astrometry/ephemeris/dtselect.pro)

NAME:
	DTSELECT

PURPOSE:
	Widget tool for date/time selection.

CATEGORY:
	Widgets.

CALLING SEQUENCE:
	dtselect, curtime

INPUTS:
	None.

OUTPUTS:
	curtime: Time selection as defined by user.

MODIFICATION HISTORY:
	Written by:	Simon Plunkett, May 1995.


DYNIMG

[List of Routines] (See ./display/dynimg.pro)


	aij are four images taken using the M1 dynamic imaging technique
	this procedure inserts the four images aij into the appropriate
	array positions in a 2x larger array.
	the four images are 
		a0  original position
		a1  shifted 1/2 pixel to the right
		a2  shifted 1/2 pixel to the right and 1/2 down
		a3  shifted 1/2 pixel down

		         [ 0  1  0  1 ...
		         [ 3  2  3  2 ...
		result = [ 0  1  0  1 ...
		         [ 3  2  3  2 ...
                        [ .  .  .  .

	ra howard  10 mar 93


 SCCS variables for IDL use
 
 @(#)dynimg.pro	1.2 4/8/93 :NRL Solar Physics


EDITFRAME

[List of Routines] (See ./movie/editframe.pro)

 Project	: SOHO -LASCO/EIT

 Name		: EDITFRAME

 Purpose	: This tool allows the user to edit a particular image "on the
		  fly," while the WRUNMOVIE3 procedure is running.

 Use		: EDITFRAME, in, out, [moviev]

 Arguments	: in - The input, or original image
		  out - The output, or final image
		  moviev - a structure generated by the WRUNMOVIE3 program,
			containing information about the movie.  If moviev
			is not provided, then certain features of the program,
			such as referencing images by "Current frame", will
			not be supported.

 Calls		: LASCO_READFITS

 Comments	:

 Side effects	: None

 Category	: Image Processing

 Written	: Scott Hawley, NRL Jul 15, 1996

 Version	:

 See Also	: WRUNMOVIE3.PRO


EIT_DAILY

[List of Routines] (See ./nrleit/display/eit_daily.pro)

 Project     : SOHO - LASCO/EIT
                   
 Name        : EIT_DAILY
               
 Purpose     : Get a list of EIT images on a selected date and then create 
               a postscript file of a wavelength sequence of 4.
               
 Explanation : creates a database query to get a list of files for a single day and
               then brings up a list widget to select the desired files and they
               will then be scaled and output to a postscript file
               
 Use         : EIT_DAILY


    
 Inputs      : none:  program will ask a date to be typed in

 Keywords    :  bw is set to create a black and white output
               
 Outputs     : None:  program creates a postscript file
               
 Calls       : EIT_DAILY

 Restrictions: Uses data in NRL archive
               
 Side effects: Creates postscript file in current working directory
               
 Category    : Image Display.
               
 Written     : Ken Dere  September 1996.
               
 Modified    : Ken Dere, Dec. 1996 to include black and white output

 Version     : 


EIT_TIME_CORRECTION

[List of Routines] (See ./data_anal/eit_time_correction.pro)

 Name:
    EIT_TIME_CORRECTION

 Purpose:
    To interpolate or extrapolate the most recent OBE - LOBT time difference
	from the values in TIME_DIFFERENCE_DB.

 Input Parameters:
    None

 Output:
    None

 Keywords:
    CORRECTION_STRING	-	Used to return an ASCII string with the
				time difference.
    INTERP             -       Turn on interpolation

 Calling Sequence:
    dt = EIT_TIME_CORRECTION(obe_time, CORRECTION_STRING = CORRECTION_STRING)
 
 Restrictions:
    If large jumps in the difference occur between realtime contacts, this
	routine could return inaccurate values.

 History:
    1997 April 17 -	D.M. fecit.
    1997 August 27 -	Added CORRECTION_STRING keyword		D.M. fecit.
    1999 Feb 7   - Added binary search and indexing to speed finding
                   the right record, created unix version for Solaris -  DW
    1999 Feb 8   - Added INTERP keyword - IMPORTANT due to time offset jumps
                   during out of contact periods, interpolation can produce
		    totally bogus answers - DW

 @(#)eit_time_correction.pro	1.2 02/09/99 NRL IDL LIBRARY


ELTHEORY

[List of Routines] (See ./data_anal/eltheory.pro)

 NAME:
	ELTHEORY

 PURPOSE:
	This procedure computes various properties of the Thomson scattered
	light by an electron in the solar corona.

 CATEGORY:
	CME

 CALLING SEQUENCE:
	ELTHEORY, Rin, T, R, B, Bt, Br, Pol

 INPUTS:
	Rin:	Impact Distance (in solar radii)
	T:	Angle from plane of sky (in degrees)

 OUTPUTS:
	R:	Distance of electron from sun center (in solar radii)
	B:	Total Brightness for one electron at R,T
	Bt:	Tangential Brightness for one electron at R,T
	Br:	Radial Brightness for one electron at R,T
	Pol:	Polarization for one electron at R,T

 KEYWORDS:
	LIMB:	The limb darkening coefficient. If not set then use
		0.63 (550 nm).
	CENTER:	If set, then the output is returned as the central solar
		disk brightness.  THe default is mean solar brightness.

 COMMON BLOCKS:
	None

 SIDE EFFECTS:
	None

 RESTRICTIONS:
	None

 PROCEDURE:
	This procedure uses the Thomson electron scattering equations 
	to compute the total brightness, the radial and tangential 
	components and the polarization associated with one electron.
	Limb darkening of 0.63 is included.
	The results are returned in units of mean solar brightness.
	

 MODIFICATION HISTORY:
	Created IDL version 16 May 1996, RA Howard, NRL
	RAH 11/25/98	Added common block for VDH coefficients
	RAH 09/01/99	Added keyword for limb darkening
	RAH 10/02/99	Changed output to be mean solar brightness
	RAH 10/27/99	Added keyword for central/mean solar brightness

	@(#)eltheory.pro	1.5 10/27/99 LASCO IDL LIBRARY


EMIEIT

[List of Routines] (See ./packets/emieit.pro)


	@(#)emieit.pro	1.1 09/22/96 LASCO IDL LIBRARY


EMILOOK

[List of Routines] (See ./packets/emilook.pro)


	@(#)emilook.pro	1.1 09/22/96 LASCO IDL LIBRARY


EMIVIEW

[List of Routines] (See ./packets/emiview.pro)


	@(#)emiview.pro	1.1 09/22/96 LASCO IDL LIBRARY


EPHEMERIS[1]

[List of Routines] (See ./display/ephemeris.pro)

 NAME:  
	EPHEMERIS	

 PURPOSE:
	To do basic calculation of solar ephemeris. The Date
	for which the calculations should be performed can be
	entered by an input variable or they will be prompted
	by the program. The ephemeris are displayed on the screen
	if none of the various output keywords is specified, else 
	the output of the procedure is given by keywords (see there).

 CATEGORY:
	PICO

 CALLING SEQUENCE:
	EPHEMERIS

 INPUTS:
	None	

 OPTIONAL INPUTS:
	date:   The date (in UT) for which the ephemeris are to
		be calculated. date is a string matching to
		the IDL time format; it has the same form
		as the result of SYSTIME(). See there for 
		the correct format.

 KEYWORD PARAMETERS:
		There are quite a lot of Keywords to specify
		with which you can retrieve the calculated
		values. If no output keyword is specified, 
		the result of the calculations will be displayed 
		in the Log Window.

	INPUT KEYWORDS:
	===============
	YEAR:   gives the year (four digits requested, f.ex. 
		1994 instead of 94)

	MONTH:  gives the month (1 for JAN, 12 for DEC etc.)

	DAY:    gives the day.

	HOUR:	gives the hour in UT (from 0 to 23)

	MINUTE: gives the respective minute

	NOW:    If specified, the calculations are done for
		the systemtime given by SYSTIME().	
	HEADER: Date and time are taken out of an image header
	MODIFY_HEADER: If set, no output is given on the screen
		but the header on input is modified in a way
		that all the calculated results are written
		in. A header must be given.

	OUTPUT KEYWORDS:
	================
	AZ_SUN: The Azimut of the sun, measured from the
		south about the west. Azimut and height are
		calculated for Pic Du Midi.

	B0:     The latitude of the solar disk center

	DEL_SUN: The declination of the sun in degrees

	HANGLE: The hourangle of the sun.

	H_SUN:  The height above the horizon. Height and 
		Azimut are calculated for Pic Du Midi.

	INCLINATION: Returns the inclination of the solar 
		rotational axis.

	JULDAT: Named variable which returns the Julian day 
		for that instant exact to 1/4 of a day. Up to
		now it is not known how to perform a better
		precision.

	L0:     The longitude of the solar disk center

	LONGSUN: Returns the longitude of the sun in the 
		ecliptical plane.

	NORTHANGLE: The angle between the solar rotational
		axis and the direction to the zenith.

	OBLIQUITY: Returns the obliquity of the ecliptic 
		(angle between ecliptical plane and equator)

	RA_SUN: The right ascension of the sun (in degrees)

	SIDERIAL_TIME: The siderial time for the date

	SOLDIST: A named variable returning the distance of
		the earth to the sun in Astronomical units.

 OUTPUTS:
	The output of the results is mainly performed by named 
	keywords. However, if no keywords are specified, the
	output is sent to the Log window.

 OPTIONAL OUTPUTS:
	None

 EXAMPLE:
	To get the basic ephemeris data about the sun for this
	instant enter at the prompt

	EPHEMERIS,SYSTIME()

	however, if you need the B0 and L0 values for 
	any further treatment, call Ephemeris by

	EPHEMERIS, date, B0=clatitude, L0=clongitude
	
 COMMON BLOCKS:
	None

 SIDE EFFECTS:
	Unknown

 RESTRICTIONS:
	None

 PROCEDURE:
	This procedure has been transposed from a FORTRAN
	routine written by Jean Michel Niot, spring 1994.
	The numerical formulae are taken from Astronomical 
	Algorithms, Jean Meeus.
	
 MODIFICATION HISTORY:
	written by Jean Michel Niot, spring 1994
	adapted to IDL by Alexander Epple, 26-OCT-1994, Pic Du Midi


EPHEMERIS[2]

[List of Routines] (See ./display/ephemerix.pro)

 NAME:  
	EPHEMERIS	

 PURPOSE:
	To do basic calculation of solar ephemeris. The Date
	for which the calculations should be performed can be
	entered by an input variable or they will be prompted
	by the program. The ephemeris are displayed on the screen
	if none of the various output keywords is specified, else 
	the output of the procedure is given by keywords (see there).

 CATEGORY:
	PICO

 CALLING SEQUENCE:
	EPHEMERIS

 INPUTS:
	None	

 OPTIONAL INPUTS:
	date:   The date (in UT) for which the ephemeris are to
		be calculated. date is a string matching to
		the IDL time format; it has the same form
		as the result of SYSTIME(). See there for 
		the correct format.

 KEYWORD PARAMETERS:
		There are quite a lot of Keywords to specify
		with which you can retrieve the calculated
		values. If no output keyword is specified, 
		the result of the calculations will be displayed 
		in the Log Window.

	INPUT KEYWORDS:
	===============
	YEAR:   gives the year (four digits requested, f.ex. 
		1994 instead of 94)

	MONTH:  gives the month (1 for JAN, 12 for DEC etc.)

	DAY:    gives the day.

	HOUR:	gives the hour in UT (from 0 to 23)

	MINUTE: gives the respective minute

	NOW:    If specified, the calculations are done for
		the systemtime given by SYSTIME().	
	HEADER: Date and time are taken out of an image header
	MODIFY_HEADER: If set, no output is given on the screen
		but the header on input is modified in a way
		that all the calculated results are written
		in. A header must be given.

	OUTPUT KEYWORDS:
	================
	AZ_SUN: The Azimut of the sun, measured from the
		south about the west. Azimut and height are
		calculated for Pic Du Midi.

	B0:     The latitude of the solar disk center

	DEL_SUN: The declination of the sun in degrees

	HANGLE: The hourangle of the sun.

	H_SUN:  The height above the horizon. Height and 
		Azimut are calculated for Pic Du Midi.

	INCLINATION: Returns the inclination of the solar 
		rotational axis.

	JULDAT: Named variable which returns the Julian day 
		for that instant exact to 1/4 of a day. Up to
		now it is not known how to perform a better
		precision.

	L0:     The longitude of the solar disk center

	LONGSUN: Returns the longitude of the sun in the 
		ecliptical plane.

	NORTHANGLE: The angle between the solar rotational
		axis and the direction to the zenith.

	OBLIQUITY: Returns the obliquity of the ecliptic 
		(angle between ecliptical plane and equator)

	RA_SUN: The right ascension of the sun (in degrees)

	SIDERIAL_TIME: The siderial time for the date

	SOLDIST: A named variable returning the distance of
		the earth to the sun in Astronomical units.

 OUTPUTS:
	The output of the results is mainly performed by named 
	keywords. However, if no keywords are specified, the
	output is sent to the Log window.

 OPTIONAL OUTPUTS:
	None

 EXAMPLE:
	To get the basic ephemeris data about the sun for this
	instant enter at the prompt

	EPHEMERIS,SYSTIME()

	however, if you need the B0 and L0 values for 
	any further treatment, call Ephemeris by

	EPHEMERIS, date, B0=clatitude, L0=clongitude
	
 COMMON BLOCKS:
	None

 SIDE EFFECTS:
	Unknown

 RESTRICTIONS:
	None

 PROCEDURE:
	This procedure has been transposed from a FORTRAN
	routine written by Jean Michel Niot, spring 1994.
	The numerical formulae are taken from Astronomical 
	Algorithms, Jean Meeus.
	
 MODIFICATION HISTORY:
	written by Jean Michel Niot, spring 1994
	adapted to IDL by Alexander Epple, 26-OCT-1994, Pic Du Midi


ERROR_MESSAGE

[List of Routines] (See ./dfanning/error_message.pro)

 NAME:
    ERROR_MESSAGE

 PURPOSE:

    The purpose of this function  is to have a device-independent
    error messaging function. The error message is reported
    to the user by using DIALOG_MESSAGE if widgets are
    supported and MESSAGE otherwise.

 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:

    Utility.

 CALLING SEQUENCE:

    ok = Error_Message(the_Error_Message)

 INPUTS:

    the_Error_Message: This is a string argument containing the error
       message you want reported. If undefined, this variable is set
       to the string in the !Error_State.Msg system variable.

 KEYWORDS:

    NONAME: If this keyword is set the name of the calling routine
       is not printed along with the message.

    TRACEBACK: Setting this keyword results in an error traceback
       being printed to standard output with the PRINT command.

    In addition, any keyword appropriate for the MESSAGE or DIALOG_MESSAGE
    routines can also be used.

 OUTPUTS:

    Currently the only output from the function is the string "OK".

 RESTRICTIONS:

    The "Warning" Dialog_Message dialog is used by default. Use keywords
    /ERROR or /INFORMATION to select other dialog behaviors.

 EXAMPLE:

    To handle an undefined variable error:

    IF N_Elements(variable) EQ 0 THEN $
       ok = Error_Message('Variable is undefined', /Traceback)

 MODIFICATION HISTORY:

    Written by: David Fanning, 27 April 1999.
    Added the calling routine's name in the message and NoName keyword. 31 Jan 2000. DWF.
    Added _Extra keyword. 10 February 2000. DWF.
    Forgot to add _Extra everywhere. Fixed for MAIN errors. 8 AUG 2000. DWF.
    Adding call routine's name to Traceback Report. 8 AUG 2000. DWF.
    Switched default value for Dialog_Message to "Error" from "Warning". 7 OCT 2000. DWF.


EXP_CORR

[List of Routines] (See ./expfac/exp_corr.pro)

 NAME:
	EXP_CORR

 PURPOSE:
	This procedure modifies the header to give the correct exposure time and 
	adds comments to give the old time and the correction factor.

 CATEGORY:
	LASCO EXPFAC

 CALLING SEQUENCE:
	EXP_CORR,Hdr

 INPUTS:
	Hdr:	LASCO image header

 OUTPUTS:
	The image header is modified

 RESTRICTIONS:
	The LASCO image structure is required.

 PROCEDURE:

 MODIFICATION HISTORY:
 	Written by:	RA Howard, NRL, 2/6/98

	@(#)exp_corr.pro	1.1 04/17/98 LASCO IDL LIBRARY


EXP_FIT

[List of Routines] (See ./packets/exp_fit.pro)


	@(#)exp_fit.pro	1.1 09/22/96 LASCO IDL LIBRARY


EXP_FIT_PROG

[List of Routines] (See ./packets/exp_fit_prog.pro)


	@(#)exp_fit_prog.pro	1.1 09/22/96 LASCO IDL LIBRARY


EXSUNC

[List of Routines] (See ./display/exsunc.pro)

 Project     : SOHO - LASCO

 Name        : EXSUNC 

 Purpose     : Extract sun's x,y and radius from image header

 Category    : 

 Explanation : 

 Syntax      : 

 Examples    : 

 Inputs      : None

 Opt. Inputs : None

 Outputs     : None

 Opt. Outputs: None

 Keywords    : None

 Common      : 

 Restrictions:                                  

 Side effects: Not known

 History     : Version 1, 03-Oct-1995, B Podlipnik. Written

 Contact     : BP, borut@lasco1.mpae.gwdg.de


FCORPOL_KL

[List of Routines] (See ./data_anal/fcorpol_kl.pro)

 NAME:
	FCORPOL_KL

 PURPOSE:
	This function returns the Koutchmy-Lamy model of the F-coronal polarization

 CATEGORY:
	LASCO DATA_ANAL

 CALLING SEQUENCE:
	Result = FCORPOL_KL(Rho)

 INPUTS:
	Rho:	Distance from sun center in solar radii

 OUTPUTS:
	This function returns the degree of polarization (0,1) in the F-corona.

 RESTRICTIONS:
	Valid for distances to 115 solar radii.

 PROCEDURE:

 MODIFICATION HISTORY:
 	Written by:	Andrew Hayes, NRL, 12/98

	@(#)fcorpol_kl.pro	1.1 10/08/00 LASCO IDL LIBRARY


FCOR_KL

[List of Routines] (See ./data_anal/fcor_kl.pro)

 NAME:
	FCOR_KL

 PURPOSE:
	This function returns the F-coronal brightness model of Koutchmy-Lamy

 CATEGORY:
	LASCO DATA_ANAL

 CALLING SEQUENCE:
	Result = FCOR_KL(Rho,Etas)

 INPUTS:
	Rho:	The distance in solar radii
	Etas:

 OUTPUTS:
	This function returns the F-coronal brightness for each point in mean
	solar brightness units.

 RESTRICTIONS:
	None

 PROCEDURE:

 MODIFICATION HISTORY:
 	Written by:	Andrew Hayes, NRL, 12/98
	Modified by:	Andrew Hayes, NRL, 16 AUG 2000 returns 0 for rho eq 0 instead of crashing

	%W% %H% LASCO IDL LIBRARY


FILTER_PRODUCT

[List of Routines] (See ./data_anal/filter_product.pro)

 NAME:
	FILTER_PRODUCT

 PURPOSE:
	This procedure computes the product of two filter curves

 CATEGORY:
	NRL DATA_ANALYSIS

 CALLING SEQUENCE:
	FILTER_PRODUCT,WL_a,TR_a,WL_b,TR_b,WL,Q

 INPUTS:
	WL_a:	1D array of the wavelengths for curve A
	TR_a:	1D array of the transmitances for curve A
	WL_b:	1D array of the wavelengths for curve B
	TR_b:	1D array of the transmitances for curve B

 OUTPUTS:
	WL:	1D array of the wavelenths for the product
	Q:	1D array of the transmittance product

 RESTRICTIONS:

 PROCEDURE:
	The wavelength interval that is common to both curves is
	determined by finding the greater of the two minimum
	wavelengths and the less of the two maximum wavelengths.

	Then a common set of wavelengths (# pts = 100) is generated,
	and the two filter curves interpolated at these wavelengths.

	The product of the two curves is then computed.

	You can describe the foobar superfloatation method being used here.
	You might not need this section for your routine.

 EXAMPLE:
	One curve is described by two arrays for the wavelength and 
	transmittances in wave1, trans1.  The other curve is described
	in wave2 and trans2.  Put the ouput into wl and result:

		FILTER_PRODUCT,wave1,trans1,wave2,trans2,wl,result

	result is the product of trans1 and trans2.  The corresponding
	wavelengths are in wl.

 MODIFICATION HISTORY:
 	Written by:	RAHoward, NRL	10/6/00

 @(#)filter_product.pro	1.1 10/08/00 :LASCO IDL LIBRARY


FILTGAUSS

[List of Routines] (See ./las-c2/filtgauss.pro)

 NAME:                        filtgauss.pro
 PURPOSE:                     gaussian filtering applications
 CATEGORY:                    Processing high level
 CALLING SEQUENCE:            filtgauss,ima_in,width,ima_out
 INPUTS:                      ima_in                   name of frame
                              width                    width '1/e' of gaussian
 OPTIONAL INPUT PARAMETERS:   None
 KEYWORD PARAMETERS:          None
 OUTPUTS:                     ima_out                  resulting frame
 OPTIONAL OUTPUT PARAMETERS:  None
 COMMON BLOCKS:               None
 SIDE EFFECTS:                None
 RESTRICTIONS:                Applications limited to 512*512 frames
 PROCEDURE:
 MODIFICATION HISTORY:   defined by M.B 01/07/94

 SCCS variables for IDL use

 @(#)filtgauss.pro  1.0 01/07/94 :LAS


FIND_CHORD_CTR

[List of Routines] (See ./data_anal/find_chord_ctr.pro)

 NAME:
	FIND_CHORD_CTR

 PURPOSE:
	Find the center of the occulting disk by the method of chords

 CATEGORY:
	LASCO Analysis

 CALLING SEQUENCE:
	FIND_CHORD_CTR, Img, Xcen, Ycen

 INPUT PARAMETERS:
	Img:	The 2-D image

 KEYWORDS:
	INTEN:	Threshold intensity (Default = 1000)
	INTERP:	Flag to perform interpolation (Should be set)
	PYLON:	Flag to avoid pylon (should be used for C2/C3)
	HDR:	Use header to determine starting center

 OUTPUT PARAMETERS:
	Xcen:	The value of the center in X
	Ycen:	The value of the center in Y

 OPTIONAL OUTPUT PARAMETERS: 	None

 COMMON BLOCKS:
	Used for debug

 SIDE EFFECTS:
	Draws chords and computed center on current window

 RESTRICTIONS:

 PROCEDURE:
	Finds the occulter boundary by finding the row and column 
	numbers where the image exceeds a threshold intensity.

	Uses the center of the image as the initial center of the occulter

	If the keyword, Inten, is not present, the default is 1000

	For each row, the column numbers for the left and right boundaries 
	of the chord are computed.  If the optional input parameter, Interp, 
	is present then linear interpolation is used to find a fractional 
	column number.  Otherwise the pixel number of the first pixel 
	exceeding the threshold is used.  The column center is then the 
	midpoint of the chord.  The process is stopped when two boundaries, 
	separated by at least 50 pixels, cannot be found. Then the average 
	of all rows is computed to find the average column number.

	The process is repeated for each column to find the average row number.

 MODIFICATION HISTORY:		Written RA Howard, NRL, 20 December 1995
	V1	RAH	Initial Release
	V2	RAH	16 Feb 96, Added rejection of outliers to average
	V3	RAH	18 Mar 96, Corrected 1 pixel error in right/top edge 
	nbr, 1/30/01 - Fix PYLON keyword; change Debug output; plots on open window

	%W% %H% LASCO IDL LIBRARY


FIND_CLOSEST

[List of Routines] (See ./util/find_closest.pro)

 NAME:
	FIND_CLOSEST

 PURPOSE:
	This function finds the subscript of an array that is closest to
	a given number.

 CATEGORY:
	LASCO UTIL

 CALLING SEQUENCE:
	Result = FIND_CLOSEST (Num, Arr)

 INPUTS:
	Num:	Number for which the array will be searched
	Arr:	An array of points in (preferably) ascending order

 KEYWORD PARAMETERS:
	LESS:	Returns the closest subscript for arr that is less than or 
		equal to num Otherwise the subscript of the point closest 
		to num is returned.  Notice that the value of arr might be 
		greater than num.

 OUTPUTS:
	This function returns the subscript of an array closest to the given
	number.

 RESTRICTIONS:
	The input array should be in ascending order. But not necessary.

 MODIFICATION HISTORY:
 	Written by:	Scott Passwaters, NRL, Feb, 1997
	24 Sep 1998, N Rich	changed /LESS keyword to include equal-to
	31 Jan 2000, N Rich	Allow for MOSTLY (except for isolated stray elements) sorted arr, but must still be ascending order
	12 Apr 2005, N.Rich	Return -1 in one case.     

	%W% %H% LASCO IDL LIBRARY


FIND_CLOSEST_ARR

[List of Routines] (See ./util/find_closest_arr.pro)

 NAME:
	FIND_CLOSEST_ARR

 PURPOSE:
	This routine matches up elements of two arrays, returning the subscripts 
	of the array that are closest to the elements from the other array.

 CATEGORY:
	LASCO UTIL

 CALLING SEQUENCE:
	FIND_CLOSEST_ARR, arr1, arr2, ind1, ind2 [, /LESS]

 INPUTS:
	arr1:	The first array of numbers
	arr2:	The second array of numbers (doesn't have to have same elements as first)

 OUTPUTS:
	ind1:	index into arr1 that corresponds to arr2
	ind2:	index into arr1 that corresponds to arr2

 KEYWORD PARAMETERS:
	LESS:	Returns the closest subscript for arr2 that is less than arr1
		Otherwise the subscript of arr2 that is closest to arr1 is
		returned.  Notice that the value of arr2 might be greater than 
		arr1 if /LESS is not used.
	MATCH:	Returns 1-to-1 matches for arrays

 RESTRICTIONS:
	The input arrays should be in ascending order.

 MODIFICATION HISTORY:
 	Written by:	Scott Paswaters, NRL, Dec, 1997
	3/7/01, nbr	Fix LESS keyword
	3/16/01,nbr	Add MATCH keyword; use UNIQ

       11/05/01 @(#)find_closest_arr.pro	1.2 LASCO IDL LIBRARY


FIND_MISS_BLOCKS

[List of Routines] (See ./reduce/mb2str/find_miss_blocks.pro)

 PROJET:
	SOHO - LASCO

 NAME:
	FIND_MISS_BLOCKS

 PURPOSE:
	Finds all the missing blocks on an image. Generate the map of the non usefull blocks and the missing blocks.

	Call this routine before using a chain of correction, otherwise the location of all missing blocks would be lost after the 1st correction

 CATEGORY:
  missing blocks

 CALLING SEQUENCE:
	find_miss_blocks,ima,hdr,missblock,imafuzz,hdrfuzz,/fuzzyima

 ADMITTED INPUT TYPE OF IMAGES:
	all

 INPUTS:
	ima : the image to make the map
	hdr : fits header of the image

 OUTPUTS:

	missblock : output structure for fits table
		FILENAME : filename of the image
		NBMISS : number of missing blocks
		NBNUSEF : number of non usefull blocks
		MBMAP : map of the missing blocks
			1: block OK
			0: non transmitted usefull block
			-1: non usefull block
		MBMAPALL : map of all the non transmited blocks (lost plus non useful)
			1: block OK
			0: non transmitted useful or non usefull block
			note that if a block is set to -1 in MBMAP and also set to 1 in MBMAPALL it means that, even so, this block was transmitted

 OPTIONAL OUTPUTS:
	imafuzz : image with the corrected blocks
	hdrfuzz : header of the corrected image: the HISTORY specify that the image was corrected by fuzzy_image procedure

 KEYWORD INPUT:
	fuzzyima : compute the missing block interpolation by fuzzy_image procedure
       hdrstru : header structure given by getl05hdrstru
       full : resample output maps to 32*32 
       strmap : string map for the DB 

 CALLED ROUTINES:
	SXPAR.GETTOK.GET_TMASK.FUZZY_IMAGE.GET_MISS_BLOCKS.GET_TMASK_F.WHERE2D.HCIE_ZONE.READ_ZONE.GRAD_ZONE.REVERSE.SPLINE.TRI_SURF.WRITE_ZONE.FUZZY_BLOCK.READ_BLOCK.DCT.NUM_TO_FUZZY.INTER_FUZZY.FUZZY_TO_NUM.WRITE_BLOCK.SXADDPAR.

 MODIFICATION HISTORY:
	V1.0 Writen by A.Thernisien on 23/12/99 from get_miss_blocks.pro by J.MORE, September 1996
	V2.0 by A.T. 18/01/2000
       V2.1 by AT 18/09/2001 add of STRMAP and FULL keywords
 CVSLOG:
  $Log: find_miss_blocks.pro,v $
  Revision 1.2  2002/07/11 07:24:17  arnaud
  Insertion of the Log in each header



FIND_MODE

[List of Routines] (See ./exposure/find_mode.pro)

 FIND_MODE
	Make an estimate of the mode of a dataset.

 Usage:
	mode=find_mode(data[, plotit=plotit])

 Return value:
	mode	float	An estimate of the mode of the dataset.

 Argument:
	data	(float)	input	The data whose mode is needed.

 Keyword:
	plotit	??	input	If set then make a plot of the data &
				the fit.

 Method:
	2-step process:
	1) - Find the maximum of a coarse histogram of the data (100
            bins) other than the "zero" point (this is to deal with
            missing blocks)
       2) - make a finer histogram around the value from step 1 and
            fit a gaussian to it. The peak of the gaussian is then
            the mode returned.

 Restrictions:
	Conceptually this was developed to fix up the exposures on
	LASCO ratio images where the mode should ideally be 1 and
	where the histogram of the image is sharply peaked. It does
	however appear to work OK for "raw" images.

 History:
	Original: 7/1/96; SJT


FITSHDR2STRUCT

[List of Routines] (See ./display/fitshdr2struct.pro)

 Project     : SOHO - LASCO
                   
 Name        : FITSHDR2STRUCT
               
 Purpose     : Read a LASCO FITS file to obtain an image and header array.
               
 Explanation : This routine calls the IDL Astronomy Library routine READFITS
		to read the LASCO FITS file.  It then fills in a LASCO header
		structure with the header information.
               
 Use         : IDL> lasco_hdr = FITSHDR2STRUCT(fits_hdr)
    
 Inputs      : fits_hdr	FITS header, STRARR
               
 Outputs     : lasco_hdr   	LASCO header structure.
               
 Calls       : FXPAR, GETTOK

 Category    : Data_Handling, I_O
               
 Prev. Hist. : None.

 Written     : Borut Podlipnik, MPAe, Mar. 1996.
               
 Modified    : 03/07/96  lasco_fitshdr2struct written by S. Passwaters
		10/21/98 nbr	fix mysterious problem with blank keywords

 Version     : Version 0.2, 21 Oct 1998  


FITS_HDR_LIST

[List of Routines] (See ./inout/fits_hdr_list.pro)

 NAME:
	FITS_HDR_LIST

 PURPOSE:
	This routine prints a list of all of the timing parameters returned in 
	the header.

 CATEGORY:
	DATA_ANAL

 CALLING SEQUENCE:
	FITS_HDR_LIST,Fnames

 INPUTS:
	Fnames:	String array containing the file names to be printed.

 OUTPUTS:
	This procedure generates a listing of the FITS headers.

 RESTRICTIONS:
	Looks in the directory pointed to by the environment variable:
	$IMAGES

 PROCEDURE:

 MODIFICATION HISTORY:
 	Written by:	R.A. Howard, 17 Feb 1996

	@(#)fits_hdr_list.pro	1.1 10/04/96 LASCO IDL LIBRARY


FIX2IMGS

[List of Routines] (See ./data_anal/fix2imgs.pro)

 NAME:
	FIX2IMGS

 PURPOSE:
	Construct a single image from 2 identical images which might have missing lines 

 CATEGORY:
	DATA_ANAL

 CALLING SEQUENCE:
	FIX2IMGS, A,Ha,B,Hb,CC,Hc

 INPUTS:
	A:	Image #1
	Ha:	Image #1 Header
	B:	Image #2
	Hb:	Image #2 Header

 OUTPUTS:
	CC:	Output image
	Hc:	Output image header

 RESTRICTIONS:
	The two input images must be identical except for missing lines.
	They should be created by reading out the same image to TM using
	the debug readout mode. 

 PROCEDURE:
	The debug readout mode on LASCO does not block the image.  Therefore
	missing pixels will cause the rest of the image to be shifted.  This
	is difficult to analyze.  This procedure calls FIX_CONTROL to
	correct the two images individually and then searches line by line in
	the two images to find matches.  If a match is not found, it searches
	ahead to find the next match and adds the missing lines to the
	the output image.  A match is defined to be two consecutive 
	lines with identical values.

 EXAMPLE:
	a = LASCO_READFITS(name1,ha)
	b = LASCO_READFITS(name2,hb)
	FIX2IMGS,a,ha,b,hb,c,hc

 MODIFICATION HISTORY:
 	Written by:	R.A. Howard, NRL, Mar 29, 1999

	@(#)fix2imgs.pro	1.1 03/31/99 LASCO IDL LIBRARY


FIXWRAP

[List of Routines] (See ./util/fixwrap.pro)

 NAME:
       FIXWRAP


 PURPOSE:
       This function removes the overflow values of an image


 CATEGORY:
  


 CALLING SEQUENCE:
       out = FIXWRAP(in)

 
 INPUTS:
       in = image with overflows


 OPTIONAL INPUTS:
      NONE

	
 KEYWORD PARAMETERS:
      NONE


 OUTPUTS:
      out = a long image with overflows removed


 OPTIONAL OUTPUTS:
      NONE

 COMMON BLOCKS:
      NONE

 SIDE EFFECTS:
      The output image is LONG type

 RESTRICTIONS:
      NONE

 PROCEDURE:


 EXAMPLE:
      in = LASCO_READFITS(file, h)
      out = FIXWRAP(in)

 MODIFICATION HISTORY:
      Written by:         A. Vourlidas, NRL, 9/30/97


FIX_CONTRO

[List of Routines] (See ./data_anal/fix_contro.pro)

 NAME:
	FIX_CONTRO

 PURPOSE:
	Fixes the continuous readout images that are transmitted in debug mode

 CATEGORY:
	DATA_ANAL

 CALLING SEQUENCE:
	Result = FIX_CONTRO (A,Ha)

 INPUTS:
	A:	Image array
	Ha:	Image Header

 OUTPUTS:
	This function returns an image which has only good rows

 RESTRICTIONS:
	The input image should be created by reading out to TM using the 
	debug readout mode. It must have underscan and overscan pixels.

 PROCEDURE:
	The underscan and overscan pixels are assumed to be those that
	have intensities that are no more than 20 DN above the offset
	bias.  

	The input array is reformed into a singly dimensioned array.
	The indices of all of the pixels less than 20 DN are found.
	Then the complete lines are found by finding those indices that
	are separated by 1026 points, which is the length of the imaging
	array (1024) plus 2.  Then the beginning of the underscan is
	set as that point -18 pixels and the end of the line is set
	from the naxis1 variable in the header.

 EXAMPLE:
	a = LASCO_READFITS(name,ha)
	Result = FIX_CONTRO(a,ha)

 MODIFICATION HISTORY:
 	Written by:	R.A. Howard, NRL, Mar 29, 1999

	@(#)fix_contro.pro	1.1 03/31/99 LASCO IDL LIBRARY


FIX_DUP_PCKT

[List of Routines] (See ./packets/fix_dup_pckt.pro)

 NAME:
	FIX_DUP_PCKT

 PURPOSE:
	This function routine puts the housekeeping packets in time order
	and removes duplicate packets.

 CATEGORY:
	LASCO PACKETS

 CALLING SEQUENCE:
	Result = FIX_DUP_PCKT (Hk)

 INPUTS:
	HK:	A 2D byte array containing the housekeeping packets 

 OUTPUTS:
	Result:	The cleaned up housekeeping packets.

 RESTRICTIONS:
	There should be only one packet type in the array.  That is, the
	LASCO housekeeping packets should be broken down into the three
	separate packet types.

 PROCEDURE:
	The time structure is computed and for each day, the packets are 
	first ordered by time within the day.  Then, any packets that have
	the same time as the previous packet is deleted.  As each day is 
	processed the packets are concatenated to the end of the previous 
	days.

 MODIFICATION HISTORY:
 	Written by:	R.A. Howard, NRL, 22 Mar 1996

 @(#)fix_dup_pckt.pro	1.2 01/23/98 :LASCO IDL LIBRARY


FIX_HT_SCALE

[List of Routines] (See ./convert/fix_ht_scale.pro)

 NAME:
	FIX_HT_SCALE

 PURPOSE:
	This procedure is used to fix the scaling of the HT files

 CATEGORY:
	MOVIE

 CALLING SEQUENCE:
	FIX_HT_SCALE,Fname

 INPUTS:
	Fname:	String containing the filename to be fixed

 OUTPUTS:
	This routine renames the filename to Fname.old and copies the 
	information to a new file, correcting the scaling factors.

 COMMON BLOCKS:
	None

 RESTRICTIONS:
	The file should not have any blank lines.

 PROCEDURE:

 MODIFICATION HISTORY:
 	Written by:	RAH, 9 May 97

 @(#)fix_ht_scale.pro	1.1 05/14/97 :NRL Solar Physics


FIX_OBESUMERROR

[List of Routines] (See ./reduce/fix_obesumerror.pro)

 NAME:
	FIX_OBESUMERROR

 PURPOSE:
	Fix an OBE error encountered when doing LEB summing

 CATEGORY:
	REDUCE

 CALLING SEQUENCE:
	FIX_OBESUMERRROR

 OPTIONAL INPUTS:
	Date:	If present processes the date specified.  Otherwise processes dates
		6 March 1997 -20 March 1997
	
 KEYWORD PARAMETERS:
	QL:	If present goes to the quick-look Directory, the default is QL
	LZ:	If present goes to the Level-0 Directory
	FIXIT:	If specified then writes the FITS file out, with LEBXSUM and LEBYSUM corrected.

 PROCEDURE:
	An error was discovered in OBE beginning 6 March 1997 through xx March.
	It started after sending a command to sum difference in EIT images.  
	The result was that the LEB summing parameter in the header was not 
	being set to the proper value.  It always read 1, even though the 
	summing was performed.

	This routine goes out to the date directory specified and reads in all of the FITS
	files one by one and then calls CHECK_OBESUMERROR to see if the error has
	occurred.  

 EXAMPLE:
	To see if the files on 970307 have the problem, use the following command:
		FIX_OBESUMERROR,'970307',/QL
	To correct the file
		FIX_OBESUMERROR,'970307',/QL,/FIXIT
	To correct all the files between 6 Mar and 20 Mar
		FIX_OBESUMERROR,/QL,/FIXIT

 MODIFICATION HISTORY:
	RA Howard, NRL, 23 March 97

	@(#)fix_obesumerror.pro	1.1 05/14/97 LASCO IDL LIBRARY


FIX_TIME_JUMP

[List of Routines] (See ./reduce/fix_time_jumps.pro)

 NAME:
	FIX_TIME_JUMP

 PURPOSE:
	This procedure reads a file from CDROM and puts the packets in
	order of the packets. If there is a gap, attempts to fill in 
	with QL packets using GET_MISSING_PCKTS.

 CATEGORY:
	LASCO PACKETS

 CALLING SEQUENCE:
	FIX_TIME_JUMPS,fname

 INPUTS:
	Fname:	Name of file with packets in it

 OUTPUTS:
       Outname:  Returns the temporary output file name

 SIDE EFFECTS:
	A file with same name as fname and at least as large is generated in $TMOUT

 PROCEDURE:
	The input files must reside in the current working directory.
	It then finds missing or out of order packets in science stream by 
	looking at the packet counter, which should increment by one.

 MODIFICATION HISTORY:
 	Written by:	R.A. Howard, NRL, 3 Aug 1996
	N. Rich 1/31/97	added tm_files variable
	RAH     2/04/97	Corrected high rate packet sizes
	N. Rich 3/29/97 added outdir variable
	N. Rich 1/2000	Implement GET_MISSING_PCKTS
	N. Rich 2/2000	Add ctrmin2 check
	N. Rich 4/2000	Fix case where badpckts are in middle; Use packet counter for gap
			if backwards clock-reset detected
		4/21/00  Print packet length of gaps and result (LZ 000207 ff.)
	n. rich 6/19/00  Change how it recognizes packet out of order, and previous packet
			 out of order
	n. rich 6/20/00  Start logging out-of-order packets
	jake 01/01/01	Up'd limit of numexp to 500000 to help 03240101.d01
	n.rich, 03.10.09 - Allow path in input filename

	@(#)fix_time_jumps.pro	1.8 10/10/03  LASCO IDL LIBRARY


FPARMODIFY

[List of Routines] (See ./display/fparmodify.pro)

 Project     : SOHO - LASCO

 Name        : 

 Purpose     : 

 Category    : 

 Explanation : 

 Syntax      : 

 Examples    : 

 Inputs      : None

 Opt. Inputs : None

 Outputs     : None

 Opt. Outputs: None

 Keywords    : None

 Common      : 

 Restrictions:                                  

 Side effects: Not known

 History     : Version 1, 22-Mar-1996, B Podlipnik. Written

 Contact     : BP, borut@lasco1.mpae.gwdg.de


FPC1_2IMG

[List of Routines] (See ./data_anal/fpc1_2img.pro)

 NAME:  
	fpc1_2img

 PURPOSE:
	To calculate LASCO C1 emission line signal. (Note: the output is in
	the same units as the input images. No photometric correction is
	made.)

 CALLING SEQUENCE:
	ee = fpc1_2img(ref1,img,cref1,cref2,cimg)	

 INPUTS:
	ref1	first open-door off-line image
	img	open door on-line image
	cref1	first closed-door off-line image 
	cref2	second closed-door off-line image
	cimg	closed door on-line image
	dz      for the comp1 model, this is a "repair" to f that is a function
                 of position. Default value is zero.

 OPTIONAL INPUTS:
       none

 KEYWORD PARAMETERS
	z    this is an array of the form [xmin,ymin,xmax,ymax] which specifies
            the two corners of a particular rectangle in the images. It will be
            assumed that this region contains zero median emission line signal,
            and if any is detected it will be assumed that this is due to an
            exposure error in the on-line image (img). Accordingly, the on-line image
            will be multiplied by a constant such that the median emission
            signal over this region will be exactly zero. If this keyword is
            omitted, all images will be assumed to be correct, and no exposure
            correction will be made.

       model - A number of models are available. The default model is 'comp1' 
	     'subtract' - a simple subtraction of the offline (ref1) from the online (img)
	     'standard' - assumes no white light background  
            'comp1'    - estimates the white light background with the three-gaussian model

 OUTPUTS:
	Returns an image consisting of only that part of the signal due to
	the emission line irradiance. Note that this signal will not be proportional
       to the irradiance, but needs to be further corrected by the instrument
       response in order to obtain photometrically correct results.

 OPTIONAL OUTPUTS:
	none

 METHOD

 COMMON BLOCKS:
	None

 SIDE EFFECTS:
	None

 RESTRICTIONS:
	All five input images must be of the same size and at the same location
	on the CCD. Images ref1 and cref1 form an open and closed door image
	pair and must have the same command wavelength. The same is true
	of the img and cimg image pair. Image ref1 must be off line.
	All images must be corrected for offset bias and exposure.

 MODIFICATION HISTORY:
	V 1.00 - Oct 06/98 written by Paul Reiser
	V 1.10 - Jul 15/00 included zeroing box
 
 CONTACT:	Paul Reiser	reiser@susim.nrl.navy.mil
		Dennis Socker	socker@lambda.nrl.navy.mil


FPC1_3IMG

[List of Routines] (See ./data_anal/fpc1_3img.pro)

 NAME:  
	fpc1_3img

 PURPOSE:
	To calculate LASCO C1 emission line signal. (Note: the output is in
	the same units as the input images. No photometric correction is
	made.)

 CALLING SEQUENCE:
	ee = fpc1_3img(ref1,ref2,img,cref1,cref2,cimg)	

 INPUTS:
	ref1	first open-door off-line image
	ref2	second open-door off-line image
	img	open door on-line image
	cref1	first closed-door off-line image 
	cref2	second closed-door off-line image
	cimg	closed door on-line image

 OPTIONAL INPUTS:
       none

 KEYWORD PARAMETERS
	z    this is an array of the form [xmin,ymin,xmax,ymax] which specifies
            the two corners of a particular rectangle in the images. It will be
            assumed that this region contains no average emission line signal,
            and if any is detected it will be assumed that this is due to an
            exposure error in the on-line image (img). Accordingly, the on-line image
            will be multiplied by a constant such that the average emission
            signal over this region will be exactly zero. If this keyword is
            omitted, all images will be assumed to be correct, and no exposure
            correction will be made.

 OUTPUTS:
	Returns an image consisting of only that part of the signal due to
	the emission line irradiance. Note that this signal will not be proportional
       to the irradiance, but needs to be further corrected by the instrument
       response in order to obtain photometrically correct results.

 OPTIONAL OUTPUTS:
	none

 METHOD

 COMMON BLOCKS:
	None

 SIDE EFFECTS:
	None

 RESTRICTIONS:
	All six input images must be of the same size and at the same location
	on the CCD. Images ref1 and cref1 form an open and closed door image
	pair and must have the same command wavelength. The same is true
	of the ref2 and cref2 image pair, and the img and cimg image pair. 
	All images must be corrected for offset bias and exposure.

 MODIFICATION HISTORY:
	V 1.00 - written by Paul Reiser February 23, 1998 (2/23/98)

 CONTACT:	Paul Reiser	reiser@susim.nrl.navy.mil
		Dennis Socker	socker@lambda.nrl.navy.mil


FPC1_PHOT

[List of Routines] (See ./data_anal/fpc1_phot.pro)

 NAME:  
	fpc1_phot	

 PURPOSE:
	To convert a lasco signal image (DN/pixel/sec) to intensity (erg/sec/cm^2/sr/A)

 CALLING SEQUENCE:
	int = fpc1_phot(s,ix,iy,leb,[dataset])

 INPUTS:
	s - the signal image
	ix,iy - the coordinates of the lower left of the signal image in CCD (1024x1024) coordinates
	leb - binning (1 or 2, usually)

 OPTIONAL INPUTS:
	dataset - the closed door dataset used for calibration (e.g. dataset = '980306')

 KEYWORD PARAMETERS: none

 OUTPUTS:
	Returns the intensity image corresponding to the input signal image. Units 
	of intensity are erg/sec/cm^2/sr/A

 OPTIONAL OUTPUTS: none

 METHOD
	The signal image is multiplied by the calibration image after the calibration image
	is suitable rebinned and cropped.

 COMMON BLOCKS:
	None

 SIDE EFFECTS:
	None

 RESTRICTIONS: none

 MODIFICATION HISTORY:
	V 1.00 - written by Paul Reiser Nov 01, 1999 (11/01/99) 

 CONTACT:	Paul Reiser	reiser@susim.nrl.navy.mil
		Dennis Socker	socker@lambda.nrl.navy.mil

 REFERENCES
	http://lasco-www.nrl.navy.mil/~reiser/C1phot.html


FPC1_WCW

[List of Routines] (See ./data_anal/fpc1_wcw.pro)

 NAME:  
	fpc1_wcw	

 PURPOSE:
	To determine the C1 instrument function central wavelength
	as a function of pixel position (x,y), command wavelength
	(wc) and FP order (m).

 CALLING SEQUENCE:
	WCW(x,y,wc,[m],[\air])

 INPUTS:
	x  - x position(s) (pixels on a 1024x1024 image)
	y  - y position(s) (pixels on a 1024x1024 image)
	wc - command wavelength(s) (Angstroms)

 OPTIONAL INPUTS:
	m  - FP order(s). If zero or unspecified, a nominal order
	     is assumed.

 KEYWORD PARAMETERS:
	AIR	if this keyword is set, the returned wavelength is
		for air, otherwise it is for vacuum. (Note: the
		NSO[1] solar spectrum is given in air wavelengths)

 OUTPUTS:
	Returns the C1 instrument function central wavelength
	in Angstroms. The table below shows the region of 
	applicability for each blocking filter The first column
	is the blocker ID and the second column is the nominal 
	wavelength of the feature which was measured to determine
	the wavelength scale. The next two columns are the 
	minimum and maximum wavelength of the region over which
	the wavelength correction is valid. The last column is
	the std. deviation of the absolute error in wavelength
	when using this method. This error holds only at the
	nominal wavelength. It increases with distance from
	the nominal wavelength to double its value at
	the boundaries of the region of validity. The relative
	error in wavelength from scan to scan is on the
	order of 0.02 A. All wavelengths in the table below are
	in Angstroms.

	Blocker	  Nom.     Min.    Max.   Error	
	  ID	  wav.     wav.    wav.

	FeXIV	  5302.27  5300    5318   0.03
	CaXV	  5693.09  5690    5710   0.07
	NaI	  5891.59  5885    5907   0.08
	FeX	  6373.12  6372    6390   0.05
	H Alpha	  6564.63  6562    6583   0.04

 OPTIONAL OUTPUTS:
	If the order was not specified on input, the nominal order
	used will be returned in the m parameter.

 METHOD
	The central wavelength calibration was determined by comparing
	in-flight FP scans of the photospheric Fraunhofer spectrum
	with the NSO[1] solar spectrum. 

	The FP instrument function was also determined using
	in-flight measurements. The optimum instrument function was
	found to be a Voigt profile.

	A paraboloid of revolution was fitted to the 
	measured variation of wavelength with position in the image.

	The above steps were carried out for each of the five
	blocking filters.

 COMMON BLOCKS:
	None

 SIDE EFFECTS:
	None

 RESTRICTIONS:
	In order to increase speed, x, y, and wc may be arrays. There
	are four acceptable situations: 
       1. x,y, and wc are all scalar
       2. x and y are arrays of the same type, and wc is a scalar
       3. x and y are scalars and wc is an array
       4. x,y and wc are arrays of the same type

       A further restriction is that wc must lie inside a blocker
       passband as described above in the output section.

 MODIFICATION HISTORY:
	V 1.00 - written by Paul Reiser September 26, 1997 (9/26/97)
       V 1.10 - PR 1/8/98  Allow arrays for pixel positions

 CONTACT:	Paul Reiser	reiser@susim.nrl.navy.mil
		Dennis Socker	socker@lambda.nrl.navy.mil

 REFERENCES
	1. "Solar Flux Atlas From 296 to 1300 nm", National Solar
	Observatory Atlas No. 1, June 1984.


FPC1_WWC

[List of Routines] (See ./data_anal/fpc1_wwc.pro)

 NAME:  
	FPC1_WWC

 PURPOSE:
	Given a true wavelength (w) and a pixel position on
	a LASCO C1 image (x,y) and an order (m), the function
	will return the command wavelength for the FP in order
	that the true wavelength be transmitted by the FP
	at that position.

 CATEGORY:
	???

 CALLING SEQUENCE:
	fpc1_wwc,x,y,w,[m],[AIR=air]

 INPUTS:
	x - x position (pixels)
	y - y position (pixels)
	w - true wavelength (Angstroms)

 OPTIONAL INPUTS:
	m  - the FP order. If none is specified, a nominal order
	     is assumed.

 KEYWORD PARAMETERS:
	AIR	if this keyword is set, the input wavelength is
		taken as an air wavelength, otherwise it is for
		vacuum.

 OUTPUTS:
	The value returned is the command wavelength for the image
	such that the FP transmits the given true wavelength at the
	given position and order. If the order was not specified on
	input, the nominal order used will be returned in the m
	parameter. The table below shows the region of applicability
	for each blocking filter The first column 
	is the blocker ID and the second column is the nominal 
	wavelength of the feature which was measured to determine
	the wavelength scale. The next two columns are the 
	minimum and maximum wavelength of the region over which
	the wavelength correction is valid. The last column is
	the std. deviation of the absolute error in wavelength
	when using this method. This error holds only at the
	nominal wavelength. It increases with distance from
	the nominal wavelength to double its value at
	the boundaries of the region of validity. The relative
	error in wavelength from scan to scan is on the
	order of 0.02 A. All wavelengths in the table below are
	in Angstroms.

	Blocker	  Nom.     Min.    Max.   Error	
	  ID	  wav.     wav.    wav.

	FeXIV	  5302.27  5300    5318   0.03
	CaXV	  5693.09  5690    5710   0.07
	NaI	  5891.59  5885    5907   0.08
	FeX	  6373.12  6372    6390   0.05
	H Alpha	  6564.63  6562    6583   0.04

 OPTIONAL OUTPUTS
	If the order was not specified on input, the nominal
	order used will be returned in the m parameter.
	
 COMMON BLOCKS:
	None

 SIDE EFFECTS:
	None

 RESTRICTIONS:
	This procedure may not converge unless the input order
	is close to the nominal order.

 MODIFICATION HISTORY:
	Version 1.00 written by Paul Reiser July 22, 1997.
       Version 1.10 PR 1/8/98 allows array x and y


FP_IWCW

[List of Routines] (See ./data_anal/fpc1_iwcw.pro)

 NAME:  
	fp_iwcw

 PURPOSE:
	Determine C1 instrument function central wavelength map array
	for a monochromatic image.

 CATEGORY:
	image reduction routines

 CALLING SEQUENCE:
	w = fp_iwcw(im,h,[x],[y],[xps],[yps],[/air])

 INPUTS:
	im - primary or secondary c1 monochromatic image array

		A primary monochromatic image array is herein defined as an
		IDL LASCO/C1 image array whose pixel dimensions, position
		and extent in the field of view match those of the original
		telemetered and rectified image array. It may be a subfield
		of the c1 CCD. 

		A secondary monochromatic image array is herein defined as
		an IDL LASCO/C1 image array whowse pixel dimensions and/or
		extent in the field of view do not match those of the
		original telemetered and rectified image array. 

	h - header associated with an original telemetered c1 monochromatic
	    image array (im) 

 OPTIONAL INPUTS: (??? no, these are outputs ???)

	(x,y) - the position of the lower left corner of the array (im)
	        in the telemetered image array. (Of the 4 corners of
		the image rectangle, x and y are the minimum values
		of the horizontal and vertical coordinates respectively) 

	(xps,yps) - x and y dimension pixel count multiplier of the input
		image array 
		im with respect to the telemetered array

 KEYWORD PARAMETERS:

	AIR	if this keyword is set, air wavelength in angstroms is
		returned, otherwise vacuum wavelength in angstroms is
		returned. 

 OUTPUTS:

	Returns an array (wim) with the same dimensions as arry im
	containing the calibrated instrument function central wavelengths
	(in Angstroms) corresponding to each pixel of the associated C1 
	monochromatic image array im.

 OPTIONAL OUTPUTS
	none
	
 COMMON BLOCKS:
	None

 SIDE EFFECTS:
	None

 RESTRICTIONS:
	None 

 PROCEDURE:

 MODIFICATION HISTORY:
	1997 Aug 12 Written by Paul Reiser 


FRACTILE

[List of Routines] (See ./exposure/fractile.pro)

 FRACTILE
	Return the requested fractile of the input data.

 Usage:
	fr = fractile(x, frac)

 Return:
	fr		The requested fractile.

 Arguments:
	x	most	input	The array whose fractile(s) are to be
				returned 
	frac	float	input	The fractile(s) to return.

 Restrictions:
	The input data must be a SORTable array (i.e. not complex,
	string or structure).

 Example:
	To find the interquartile range of a data set, try:
	q = fractile(data, [.25,.75])
	iqr = q(1)-q(0)
	
 History:
	Original: 26/9/95; SJT


FSC_COLOR

[List of Routines] (See ./dfanning/fsc_color.pro)

 NAME:
       FSC_COLOR

 PURPOSE:

       The purpose of this function is to obtain drawing colors
       by name and in a device-decomposition independent way. The
       color names and values may be read in as a file, or 88
       color names and values are supplied from the program. These
       were obtained from the file rgb.txt, found on most X-Window
       distributions. Representative colors were chose from across
       the color spectrum. To see a list of colors available, type:
       Print, FSC_Color(/Names).

 AUTHOR:

       FANNING SOFTWARE CONSULTING:
       David Fanning, Ph.D.
       1645 Sheely Drive
       Fort Collins, CO 80526 USA
       Phone: 970-221-0438
       E-mail: davidf@dfanning.com
       Coyote's Guide to IDL Programming: http://www.dfanning.com

 CATEGORY:

       Graphics, Color Specification.

 CALLING SEQUENCE:

       color = FSC_COLOR(theColor, theColorIndex)

 NORMAL CALLING SEQUENCE FOR DEVICE-INDEPENDENT COLOR:

       axisColor = FSC_COLOR("Green", !D.Table_Size-2)
       backColor = FSC_COLOR("Charcoal", !D.Table_Size-3)
       dataColor = FSC_COLOR("Yellow", !D.Table_Size-4)
       Plot, Findgen(11), Color=axisColor, Background=backColor, /NoData
       OPlot, Findgen(11), Color=dataColor

 OPTIONAL INPUT PARAMETERS:

       TheColor: A string with the "name" of the color. To see a list
           of the color names available set the NAMES keyword.

           Valid names depend on the colors loaded in the program, but
           typically include such these colors as these:

              Black       Pink
              Magenta     Aqua
              Cyan        SkyBlue
              Yellow      Beige
              Green       Charcoal
              Red         Gray
              Blue        Orchid
              Navy        White

           The color WHITE is used if this parameter is absent. To see a list
           of the color names available in the program, type this:

              Print, FSC_COLOR(/Names)

       TheColorIndex: The color table index where the specified color is loaded.
           The color table index parameter should always be used if you wish to
           obtain a color value in a color-decomposition-independent way in your
           code. See the NORMAL CALLING SEQUENCE for details.

 RETURN VALUE:

       The value that is returned by FSC_COLOR depends upon the keywords
       used to call it and on the version of IDL you are using. In general,
       the return value will be either a color index number where the specified
       color is loaded by the program, or a 24-bit color value that can be
       decomposed into the specified color on true-color systems.

       If you are running IDL 5.2 or higher, the program will determine which
       return value to use, based on the color decomposition state at the time
       the program is called. If you are running a version of IDL before IDL 5.2,
       then the program will return the color index number. This behavior can
       be overruled in all versions of IDL by setting the DECOMPOSED keyword.
       If this keyword is 0, the program always returns a color index number. If
       the keyword is 1, the program always returns a 24-bit color value.

       If the TRIPLE keyword is set, the program always returns the color triple,
       no matter what the current decomposition state or the value of the DECOMPOSED
       keyword.

       If the ALLCOLORS keyword is used, then instead of a single value, modified
       as described above, then all the color values are returned in an array. In
       other words, the return value will be either an NCOLORS-element vector of color
       table index numbers, an NCOLORS-element vector of 24-bit color values, or
       an NCOLORS-by-3 array of color triples.

       If the NAMES keyword is set, the program returns a vector of
       color names known to the program.

 INPUT KEYWORD PARAMETERS:

       ALLCOLORS: Set this keyword to return indices, or 24-bit values, or color
              triples, for all the known colors, instead of for a single color.

       DECOMPOSED: Set this keyword to 0 or 1 to force the return value to be
              a color table index or a 24-bit color value, respectively.

       FILENAME: The string name of an ASCII file that can be opened to read in
              color values and color names. There should be one color per row
              in the file. Please be sure there are no blank lines in the file.
              The format of each row should be:

                  redValue  greenValue  blueValue  colorName

              Color values should be between 0 and 255. Any kind of white-space
              separation (blank characters, commas, or tabs) are allowed. The color
              name should be a string, but it should NOT be in quotes. A typical
              entry into the file would look like this:

                  255   255   0   Yellow

       NAMES: If this keyword is set, the return value of the function is
              a ncolors-element string array containing the names of the colors.
              These names would be appropriate, for example, in building
              a list widget with the names of the colors. If the NAMES
              keyword is set, the COLOR and INDEX parameters are ignored.

                 listID = Widget_List(baseID, Value=GetColor(/Names), YSize=16)

       SELECTCOLOR: Set this keyword if you would like to select the color name with
              the PICKCOLORNAME program. Selecting this keyword automaticallys sets
              the INDEX positional parameter. If this keyword is used, any keywords
              appropriate for PICKCOLORNAME can also be used. If this keyword is used,
              the first positional parameter can be either a color name or the color
              table index number. The program will figure out what you want.

       TRIPLE: Setting this keyword will force the return value of the function to
              *always* be a color triple, regardless of color decomposition state or
              visual depth of the machine.

       In addition, any keyword parameter appropriate for PICKCOLORNAME can be used.
       These include BOTTOM, COLUMNS, GROUP_LEADER, INDEX, and TITLE.

 OUTPUT KEYWORD PARAMETERS:

       CANCEL: This keyword is always set to 0, unless that SELECTCOLOR keyword is used.
              Then it will correspond to the value of the CANCEL output keyword in PICKCOLORNAME.

       COLORSTRUCTURE: This output keyword (if set to a named variable) will return a
              structure in which the fields will be the known color names (without spaces)
              and the values of the fields will be either color table index numbers or
              24-bit color values.

       NCOLORS: The number of colors recognized by the program. It will be 88 by default.

 COMMON BLOCKS:
       None.

 SIDE EFFECTS:
       None.

 ADDITIONAL PROGRAMS REQUIRED:

   PICKCOLORNAME: This file can be found in the Coyote Library:

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

 EXAMPLE:

       To get drawing colors in a device-decomposed independent way:

           axisColor = FSC_COLOR("Green", !D.Table_Size-2)
           backColor = FSC_COLOR('Charcoal", !D.Table_Size-3)
           dataColor = FSC_COLOR('Yellow", !D.Table_Size-4)
           Plot, Findgen(11), Color=axisColor, Background=backColor, /NoData
           OPlot, Findgen(11), Color=dataColor

       To set the viewport color in object graphics:

           theView = Obj_New('IDLgrView', Color=FSC_Color('Charcoal', /Triple))

       To change the viewport color later:

           theView->SetProperty, Color=FSC_Color('Antique White', /Triple)

 MODIFICATION HISTORY:
       Written by: David Fanning, 19 October 2000. Based on previous
          GetColor program.


FSC_DROPLIST

[List of Routines] (See ./dfanning/fsc_droplist.pro)

 NAME:
   FSC_DROPLIST

 PURPOSE:

   The purpose of this compound widget is to provide an alternative
   to the DROPLIST widget offered in the IDL distribution. What has
   always annoyed me about a droplist is that you can't get the current
   "value" of a droplist easily. This compound widget makes this and
   other tasks much easier.

 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:

   General programming.

 CALLING SEQUENCE:

   droplistObj = FSC_Droplist(parent, Title='Animals: ", Value=['Dog'. 'Cat', 'Coyote'], Index=2)

   The return value of the FSC_Droplist (droplistObj in this example) is
   an object reference. Interaction with the droplist will occur through
   object methods.

 INPUT PARAMETERS:

   parent -- The parent widget ID of the compound widget. Required.

 INPUT KEYWORDS:

 Any keyword that is appropriate for the Widget_Droplist function can be used.
 In addition, these keywords are explicitly defined.

   EVENT_FUNC -- Set this keyword to the name of an Event Handler Function.
   EVENT_PRO -- Set this keyword to the name of an Event Handler Procedure.
   FORMAT -- A format specifier for the "format" of the values in the droplist.
   INDEX -- The index number of the current selection.
   SPACES -- A two-element array that indicates the number of blank spaces to be added
             to the the beginning and end of the formatted values. If a single number
             is provided, this number of blank spaces is added to both the beginning
             and the end of the value.
   TITLE -- The title of the droplist widget.
   UNAME -- The user name of the droplist widget. (Only available in IDL 5.2 and higher.)
   UVALUE -- The normal "user value" of the droplist.
   VALUE -- An array of the droplist "selections". May be any data type.

 COMMON BLOCKS:

   None.

 DEPENDENCIES:

   Requires ERROR_MESSAGE from the Coyote Library..

 EVENT STRUCTURE:

   An event is returned each time the droplist value is changed. The event structure
   is defined like this:

   event = { FSC_DROPLIST_EVENT, $ ; The name of the event structure.
             ID: 0L, $             ; The ID of the compound widget's top-level base.
             TOP: 0L, $            ; The widget ID of the top-level base of the hierarchy.
             HANDLER: 0L, $        ; The event handler ID. Filled out by IDL.
             INDEX: 0L, $          ; The index number of the current selection.
             SELECTION:Ptr_New() $ ; A pointer to the current selection "value".
             SELF:Obj_New() }      ; The object reference of the compound widget.

 PUBLIC OBJECT METHODS:

   GetID -- A function with no arguments that returns the widget identifier
      of the droplist widget.

      droplistID = droplistObj->GetID()

   GetIndex -- A function with no arguments that returns the index
      number of the current droplist selection.

      currentIndex = droplistObj->GetIndex()

   GetSelection -- A function with no arguments that returns the current
      droplist selection.

      currentSelection = droplistObj->GetSelection()

   GetUValue -- A function with no arguments that returns the "user value"
      of the compound widget i.e., the value set with the UVALUE keyword).

      myUValue = droplistObj->GetUValue()

   GetValues -- A function with no arguments that returns the "values" or
      "selections" for the droplist.

      possibleSelections = droplistObj->GetValues()

   Resize -- A procedure that sets the X screen size of the droplist. It is
      defined like this:

      PRO Resize, newSize, ParentSize=parentSize

      The "newSize" keyword is the new X screen size. If this argument is
      missing, the screen X size of the compound widget's parent is used.
      The parentSize keyword is an output keyword that returns the X screen
      size of the compound widget's parent.

      droplistObj->Resize, 400

      Note that not all devices (e.g., X Windows devices) support droplist resizing.

   SetIndex -- A procedure that sets the current droplist selection based on
      the given index. This is equivalent to Widget_Control, droplistID, Set_Droplist_Select=newIndex

      droplistObj->SetIndex, newIndex

   SetSelection -- Whereas a regular droplist widget can only be set by index
      number, this compound widget can also be set by a "selection". The new selection
      can be any data type and corresponds to one of the "values" of the droplist.

      droplistObj->SetSelection, newSelection


 EXAMPLE:

   An example program is provided at the end of the FSC_DROPLIST code. To run it,
   type these commands:

      IDL> .Compile FSC_DROPLIST
      IDL> Example

 MODIFICATION HISTORY:

   Written by: David Fanning, 17 Jan 2000. DWF.
   Added FORMAT and SPACES keywords 28 April 2000. DWF.
   Fixed a small problem with event processing when the EVENT_FUNC keyword
      was used. 29 Dec 2000. DWF.
   Attached the UNAME value to the TLB of the compound widget instead
      of to the droplist widget itself. 11 Jan 2001. DWF.


FSC_FIELD

[List of Routines] (See ./dfanning/fsc_field.pro)

 NAME:
   FSC_FIELD

 PURPOSE:

   The purpose of this compound widget is to provide an alternative
   to the CW_FIELD widget offered in the IDL distribution. One weakness
   of the CW_FIELD compound widget is that the text widgets do not
   look editable to the users on Windows platforms. This program
   corrects that deficiency and adds some features that I think
   will be helpful. For example, you can now assign an event handler
   to the compound widget, ask for positive numbers only, and limit
   the number of digits in a number, or the number of digits to the
   right of a decimal point. The program is written as a widget object,
   which allows the user to call object methods directly, affording
   even more flexibility in use. This program replaces the earlier
   programs FSC_INPUTFIELD and COYOTE_FIELD.

   The program consists of a label widget next to a one-line text widget.
   The "value" of the compound widget is shown in the text widget. If the
   value is a number, it will not be possible (generally) to type
   alphanumeric values in the text widget. String values behave like
   strings in any one-line text widget.

 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:

   General programming.

 TYPICAL CALLING SEQUENCE:

   fieldID = FSC_FIELD(parent, Title="X Size:", Value=256, Object=fieldObject, Digits=3)

 INPUT PARAMETERS:

   parent -- The parent widget ID of the compound widget. Required.

 INPUT KEYWORDS:

   COLUMN        Set this keyword to have the Label widget above the Text widget.
                 The default is to have the Label widget in a row with the Text widget.

   CR_ONLY       Set this keyword if you only want Carriage Return events returned to
                 your event handler. If this keyword is not set, all events are returned.
                 Setting this keyword has no effect unless either the EVENT_PRO or
                 EVENT_FUNC keyword is used.

   DECIMAL       Set this keyword to the number of digits to the right of the decimal
                 point in floating point or double precision numbers. Ignored for STRING values.

   DIGITS        Set this keyword to the number of digits permitted in integer numbers.

   EVENT_FUNC    Set this keyword to the name of an event handler function. If this
                 keyword is undefined and the Event_Pro keyword is undefined,
                 all compound widget events are handled internally and not
                 passed on to the parent widget.

   EVENT_PRO     Set this keyword to the name of an event handler procedure. If this
                 keyword is undefined and the Event_Func keyword is undefined,
                 all compound widget events are handled internally and not
                 passed on to the parent widget.

   FIELDFONT     The font name for the text in the text widget.

   FRAME         Set this keyword to put a frame around the compound widget.

   LABEL_LEFT    Set this keyword to align the text on the label to the left.

   LABEL_RIGHT   Set this keyword to align the text on the label to the right.

   LABELFONT     The font name for the text in the label widget.

   LABELSIZE     The X screen size of the label widget.

   NAME          A string containing the name of the object. The default is ''.

   NOEDIT        Set this keyword to allow no user editing of the input text widget.

   NONSENSITIVE  Set this keyword to make the input text widget non-sensitive.

   POSITIVE      Set this keyword if you want only positive numbers allowed.

   SCR_XSIZE     The X screen size of the compound widget.

   SCR_YSIZE     The Y screen size of the compound widget.

   TITLE         The string text placed on the label widget.

   UNDEFINED     Set this keyword to the value to use for "undefined" values. If
                 not set, then !Value.F_NAN is used for numerical fields and a
                 NULL string is used for string fields. This applies to values
                 obtained with the GET_VALUE method or the GET_VALUE function.

   UVALUE        A user value for any purpose.

   VALUE         The "value" of the compound widget. Any type of integer, floating, or string
                 variable is allowed. The data "type" is determined automatically from the
                 value supplied with this keyword. Be sure you set the type appropriately for
                 your intended use of the value.

   XSIZE         The X size of the text widget in the usual character units.

 OUTPUT KEYWORDS:

   OBJECT        Set this keyword to a named variable to receive the compound widget's
                 object reference. This is required if you wish to call methods on the object.
                 Note that the object reference is also available in the event structure
                 generated by the widget object. Note that the object reference will be
                 necessary if you want to get or set values in the compound widget.

 COMMON BLOCKS:

   None.

 RESTRICTIONS:

   None.

 EVENT STRUCTURE:

   All events are handled internally unless either the Event_Pro or Event_Func
   keywords are used to assign an event handler to the compound widget. By
   default all events generated by the text widget are passed to the assigned
   event handler. If you wish to receive only Carriage Return events, set the
   CR_Only keyword.

   event = { FSC_FIELD_EVENT, $   ; The name of the event structure.
             ID: 0L, $            ; The ID of the compound widget's top-level base.
             TOP: 0L, $           ; The widget ID of the top-level base of the hierarchy.
             HANDLER: 0L, $       ; The event handler ID. Filled out by IDL.
             OBJECT: Obj_New(), $ ; The "self" object reference. Provided so you can call methods.
             VALUE: Ptr_New(), $  ; A pointer to the widget value.
             TYPE:""              ; A string indicating the type of data in the VALUE field.
           }

   Note that if the field is "empty", the VALUE will be a pointer
   to an undefined variable. You should check this value before you
   use it. You code will look something like this:

     IF N_Elements(*event.value) EQ 0 THEN $
         Print, 'Current Value UNDEFINED.' ELSE $
         Print, 'Current Value: ', *event.value

 GETTING and SETTING VALUES:

   Almost all the properties of the widget can be obtained or set via
   the object's GetProperty and SetProperty methods (described below).
   Traditional compound widgets have the ability to get and set the "value"
   of the compound widget identifier (e.g., fieldID in the calling
   sequence above). Unfortunately, it is impossible to retreive a variable
   in this way when the variable is undefined. In practical terms, this
   means that the undefined variable must be set to *something*. You can
   determine what that something is with the UNDEFINED keyword, or I will set
   it to !VALUES.F_NAN for numerical fields and to the null string for string
   fields. In any case, you will have to check for undefined variables before
   you try to do something with the value. For a numerical field, the code
   might look something like this:

      fieldID = FSC_FIELD(parent, Title="X Size:", Value=256, Object=fieldObject, Digits=3)
      currentValue = fieldObject->Get_Value()
      IF Finite(currentValue) EQ 0 THEN Print, 'Value is Undefined' ELSE Print, currentValue

   Additional examples are provided in the numerical example fields in Example Program below.

   Setting the value of the compound widget is the same as calling the Set_Value
   method on the object reference. In other words, these two statements are equivalent.

        fieldObject->Set_Value, 45.4
        Widget_Control, fieldID, Set_Value=45.4

   The data type of the value is determined from the value itself. Be sure you set it appropriately.

 OBJECT PROCEDURE METHODS:

   GetProperty -- This method allows various properties of the widget to be
       returned via output keywords. The keywords that are available are:

       CR_Only -- A flag, if set, means only report carriage return events.
       DataType -- The data type of the field variable.
       Decimal -- Set this keyword to the number of digits to the right of the decimal
              point in FLOATVALUE and DOUBLEVALUE numbers.
       Digits -- Set this keyword to the number of digits permitted in INTERGERVALUE and LONGVALUE numbers.
       Event_Func -- The name of the event handler function.
       Event_Pro -- The name of the event handler function.
       Name -- A scalar string name of the object.
       NoEdit -- A 1 means the widget is non-editable.
       NonSensitive -- Set this keyword to make the widget non-sensitive.
       Positive -- Indicates if the Positive number flag is set (1) or not (0).
       UValue -- The user value assigned to the compound widget.
       Value -- The "value" of the compound widget.

   MoveTab -- This method moves the focus to the widget identified in the "next" field,
        which must be set with the SetTabNext method. No parameters. Called automatically
        when a TAB character is typed in the text widget.

   Resize -- This method allows you to resize the compound widget's text field.
        The value parameter is an X screen size for the entire widget. The text
        widget is sized by using the value obtained from this value minus the
        X screen size of the label widget.

          objectRef->Resize, screen_xsize_value

   Set_Value -- This method allows you to set the "value" of the field. It takes
       one positional parameter, which is the value.

          objectRef->Set_Value, 5


   SetEdit -- This procedure turns editing on (value of 1) or off (value of 0).

   SetProperty -- This method allows various properties of the widget to be
       set via input keywords. The keywords that are available are:

       CR_Only -- Set this keyword if you only want Carriage Return events.
       Decimal -- Set this keyword to the number of digits to the right of the decimal
              point in FLOATVALUE and DOUBLEVALUE numbers.
       Digits -- Set this keyword to the number of digits permitted in INTERGERVALUE and LONGVALUE numbers.
       Event_Func -- Set this keyword to the name of an Event Function.
       Event_Pro -- Set this keyword to the name of an Event Procedure.
       LabelSize --  The X screen size of the Label Widget.
       Name -- A scalar string name of the object. (default = '')
       NoEdit -- Set this keyword to make the widget non-editable.
       NonSensitive -- Set this keyword to make the widget non-sensitive.
       Positive -- Set this keyword to indicate only positive numbers are allowed.
       Scr_XSize -- The X screen size of the text widget.
       Scr_YSize -- The Y screen size of the text widget.
       Title -- The text to go on the Label Widget.
       UValue -- A user value for any purpose.
       Value -- The "value" of the compound widget.
       XSize -- The X size of the Text Widget.

   SetSensitive -- This procedure turns text widget sensitivity on (value of 1) or off (value of 0).

 OBJECT FUNCTION METHODS:

      Get_Value -- Returns the "value" of the field. No parameters. Will be undefined
          if a "number" field is blank. Should be checked before using:

          IF N_Elements(objectRef->Get_Value()) NE 0 THEN Print, Value is: ', objectRef->Get_Value()

      GetID -- Returns the widget identifier of the compound widget's top-level base.
         (The first child of the parent widget.) No parameters.

      GetLabelSize -- Returns the X screen size of the label widget. No parameters.

      GetTextID -- Returns the widget identifier of the compound widget's text widget.
         No parameters.

      GetTextSize -- Returns the X screen size of the text widget. No parameters.

 PRIVATE OBJECT METHODS:

   Although there is really no such thing as a "private" method in IDL's
   object implementation, some methods are used internally and not meant to
   be acessed publicly. Here are a few of those methods. I list them because
   it may be these private methods are ones you wish to override in subclassed
   objects.

      MoveTab -- This method moves the cursor to end of the text in the widget identified
        by the nexttab field. (This will be set with the SetTabNext method.)

      Text_Events -- The main event handler method for the compound widget. All
        text widget events are processed here.

      ReturnValue -- This function method accepts a string input value and converts
        it to the type of data requested by the user.

      Validate -- This function method examines all text input and removes unwanted
        characters, depending upon the requested data type for the field. It makes it
        impossible, for example, to type alphanumeric characters in an INTEGER field.

 EXAMPLE:

   An example program is provided at the end of the FSC_FIELD code. To run it,
   type these commands:

      IDL> .Compile FSC_Field
      IDL> Example

 MODIFICATION HISTORY:

   Written by: David Fanning, 18 October 2000. Based heavily on an earlier
      FSC_INPUTFIELD program and new ideas about the best way to write
      widget objects.
   Added LABEL_LEFT, LABEL_RIGHT, and UNDEFINED keywords. 29 Dec 2000. DWF.
   Modified the way the value is returned in the GET_VALUE method and the
      GET_VALUE function. Modified Example program to demonstrate. 30 Dec 2000. DWF.
   Added NOEDIT and NONSENSITIVE keywords, with corresponding SETEDIT and SETSENNSITIVE
      methods. 19 Jan 2001. DWF.
   Added GetTextSize and GetLabelSize methods for obtaining the X screen
      size of the text and label widgets, respectively. 30 Jan 2001. DWF.


FSC_FILESELECT

[List of Routines] (See ./dfanning/fsc_fileselect.pro)

 NAME:
   FSC_FILESELECT

 PURPOSE:

   The purpose of this compound widget is to provide a means
   by which the user can type or select a file name. The
   program is written as an "object widget", meaning that
   the guts of the program is an object of class FSC_FILESELECT.
   This is meant to be an example of the obvious advantages of
   writing compound widget programs as objects.

 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:

   General programming.

 CALLING SEQUENCE:

   filenameID = FSC_FileSelect(parent)

 INPUT PARAMETERS:

   parent -- The parent widget ID of the compound widget. Required.

 INPUT KEYWORDS:

   Event_Pro -- The event handler procedure for this compound widget.By default: "".
   Event_Func -- The event handler function for this compound widget. By default: "".

      If neither EVENT_PRO or EVENT_FUNC is defined, program events are handled internally by the compound widget.

   DirectoryName -- The initial name of the directory. By defaut: current directory.
   Filename -- The initial file name in the filename text widget.
   Filter -- The file filter. By default: "*".
   Frame -- Set this keyword for a frame around the compound widget.
   LabelFont -- The font for the label widget. By default: "".
   LabelName -- The text on the label widgt. By default: "Filename: ".
   LabelSize -- The X screen size of the label widget. By default: 0.
   MustExist -- A flag that indicates selected files must exist. By default: 0.
   NoMaxSize -- A flag to prohibit automatic text widget sizing. By default: 0.

     If this keyword is not set, the compound widget will automatically resize itself to
     the largest widget in its parent base widget. It will do this by changing the size of
     the text widgets holding the file and directory names.

   Read -- Set this keyword to have file selection for reading a file. By default: 1.
   SelectDirectory -- The default directory for file selection. In other words, this is the
     default directory for DIALOG_PICKFILE, which is accessed via the BROWSE buttons.
   SelectFont -- The font for the "Browse" button. By default: "".
   SelectTitle -- The title bar text on the file selection dialog. By default: "Select a File...".
   TextFont -- The font for the filename text widget. By default: "".
   UValue -- User value for any purpose.
   Write -- Set this keyword to open a file for writing. By default: 0.
   XSize -- The X size of the text widget holding the filename. By default: StrLen(filename) * 1.5 > 40.

 OUTPUT KEYWORDS:

   ObjectRef -- Assign this keyword to an output variable that will hold the internal object reference.
                With the object reference you can call object methods to easily change many properties of
                the compound widget.

 COMMON BLOCKS:

   None.

 RESTRICTIONS:

   Probably doesn't work correctly on VMS systems :-( If you can help, please
   contact me. I don't have a VMS system to test on.

 EVENT STRUCTURE:

   All events are handled internally unless either the Event_Pro or Event_Func
   keywords are used to assign an event handler to the compound widget. All events
   generated by the text widgets are passed to the assigned event handler.

   event = { CW_FILESELECT, $     ; The name of the event structure.
             ID: 0L, $            ; The ID of the compound widget's top-level base.
             TOP: 0L, $           ; The widget ID of the top-level base of the hierarchy.
             HANDLER: 0L, $       ; The event handler ID. Filled out by IDL.
             Basename: "", $      ; The base filename without directory specifiers.
             Filename: "", $      ; The fully qualified filename.
             Filter: ::, $        ; The currently active file filter.
             Directory: "", $     ; The name of the current file directory.
           }

 EXAMPLE:

   An example program is provided at the end of the FSC_FILESELECT code. To run it,
   type these commands:

      IDL> .Compile fsc_fileselect
      IDL> Example

   Or, if you want to obtain the object reference, type this:

      IDL> Example, theObject

   Now you can call the object's methods. For example:

      IDL theObject->SetProperty, XSize=150

 GETTING and SETTING VALUES:

   So as not to disrupt the accepted paradigm in using compound widgets, you
   can use the return value of the FSC_FILESELECT function with WIDGET_CONTROL to
   get and set the "value" of the widget.

       Widget_Control, filenameID, Set_Value='C:\RSI\IDL52\DATA\cyclone.dat'

   The program will automatically separate the file name portion of the value
   from the directory portion and put things in the correct text widgets.

   Similarly, you can get the "value" of the widget:

       Widget_Control, filenameID, Set_Value=theValue
       Print, theValue

           C:\RSI\IDL52\DATA\cyclone.dat

   The return value is the fully qualified file path to the file.

 USING OBJECT METHODS to CHANGE PROGRAM PROPERTIES:

   If you obtain the object reference, you have a great deal more control
   over the properties of the compound widget. You obtain the object reference
   by calling the function like this:

      filenameID = FSC_FILESELECT(parent, ObjectRef=theObject)

 OBJECT PROCEDURE METHODS:

   GetProperty -- This method allows various properties of the widget to be
       returned via output keywords. The keywords that are available are:

      DirectoryName -- The current directory.
      Event_Func -- The name of the event handler function for this compound widget.
      Event_Pro -- The name of the event handler procedure for this compound widget.
      Filename -- The current base filename.
      Filter -- The current file filter.
      LabelName -- The text on the label widget.
      LabelSize -- The X screen size of the label widget.
      MustExist -- A flag that indicates selected files must exist to be selected.
      Parent -- The parent widget of the compound widget.
      Read=read -- The file selection for reading flag.
      SelectTitle -- The title bar text on the file selection dialog.
      TLB -- The top-level base of the compound widget.
      UValue -- The user value of the compound widget.
      Write -- The file selection for writing flag.
      XSize -- The X size of the text widget holding the filename.

   LabelSize -- This method makes sure that the directory name and file name labels
      are the same size. Normally, this procedure is called internally. No parameters.

   MatchSize -- This method resizes the compound widget so that it is as long as the
      the longest widget in the parent base widget. This is done automatically upon
      realization unless the NOMAXSIZE keyword is set. The method aids in writing
      resizeable widget programs.

   SetProperty -- This method allows various properties of the widget to be
       set via input keywords. The keywords that are available are:

      DirectoryName -- The current directory.
      Event_Func -- The name of the event handler function for this compound widget.
      Event_Pro -- The name of the event handler procedure for this compound widget.
      Filename -- The current base filename.
      Filter -- The current file filter.
      LabelName -- The text on the label widget.
      LabelSize -- The X screen size of the label widget.
      MustExist -- A flag that indicates selected files must exist to be selected.
      Read -- The file selection for reading flag.
      SelectTitle -- The title bar text on the file selection dialog.
      UValue -- The user value of the compound widget.
      Write -- The file selection for writing flag.
      XSize -- The X size of the text widget holding the filename.

 OBJECT FUNCTION METHODS:

      GetFileName -- Returns the fully qualified filename. No parameters.

      GetTLB -- Returns the top-level base ID of the compound widget. No Parameters.

      Inspect_DirectoryName -- Inspects the directory name for correctness. Requires one positional parameter.

        directoryName -- The name of the directory from the directory text widget.
        textSelection -- The current text selection position.

        At the moment all this does is remove any blank characters from either
        end of the directory name and makes sure the last character of the directory
        name does not end in a subdirectory specifier (except for VMS).

     Inspect_Filename -- Inspects the file name for correctness. Requires one positional parameter.

        filename -- The name of the file from the filename text widget.
        textSelection -- The current text selection position.

        At the moment all this does is remove any blank characters from either
        end of the file name

 MODIFICATION HISTORY:

   Written by: David Fanning, 21 NOV 1999.
   Fixed bug in File Name selection button. 18 MAR 2000. DWF.
   Fixed an error in which directory the Browse buttons should start
       searching. 29 SEP 2000. DWF.
   Previously returned events only for typing in text widgets. Now
       Browse button events are also returned. 29 SEP 2000. DWF.
   Fixed a bug in setting the file filter. 29 SEP 2000. DWF.
   Modified the way the directory name is specified. 18 JAN 2001. DWF.


FSC_INPUTFIELD

[List of Routines] (See ./dfanning/fsc_inputfield.pro)

 NAME:
   FSC_INPUTFIELD

 PURPOSE:

   The purpose of this compound widget is to provide an alternative
   to the CW_FIELD widget offered in the IDL distribution. What has
   always bothered me about CW_FIELD is that the text widgets do not
   look editable to the users on Windows platforms. This program
   corrects that deficiency and adds some features that I think
   would be helpful. For example, you can now assign an event handler
   to the compound widget. The program is written entirely as an object.
   A companion program, COYOTE_FIELD, has much the same functionality,
   but is written as a traditional compound widget. The point of writing
   the same program in two different ways is to give you the opportunity
   to compare and contrast the two methods. I personally think there
   is no substitute for the power of object programs. :-)

 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:

   General programming.

 CALLING SEQUENCE:

   objectRef = FSC_INPUTFIELD(parent, Title='X Size: ", Value=256, /IntegerValue)

 INPUT PARAMETERS:

   parent -- The parent widget ID of the compound widget. Required.

 INPUT KEYWORDS:

   Column -- Set this keyword to have the Label Widget above the Text Widget.
   CR_Only -- Set this keyword if you only want Carriage Return events. If
              this keyword is not set, all events are returned. No events
              are returned unless the EVENT_PRO or EVENT_FUNC keywords are used.
   Decimal -- Set this keyword to the number of digits to the right of the decimal
              point in FLOATVALUE and DOUBLEVALUE numbers.
   Digits -- Set this keyword to the number of digits permitted in INTERGERVALUE and LONGVALUE numbers.
   DoubleValue -- Set this keyword if you want DOUBLE values returned.
   Event_Func -- Set this keyword to the name of an Event Function. If this
                 keyword is undefined and the Event_Pro keyword is undefined,
                 all compound widget events are handled internally and not
                 passed on to the parent widget.
   Event_Pro -- Set this keyword to the name of an Event Procedure. If this
                keyword is undefined and the Event_Func keyword is undefined,
                all compound widget events are handled internally and not
                passed on to the parent widget.
   FieldFont -- The font name for the text in the Text Widget.
   FloatValue -- Set this keyword for FLOAT values.
   Frame -- Set this keyword to put a frame around the compound widget.
   IntegerValue -- Set this keyword for INTEGER values.
   LabelFont -- The font name for the text in the Label Widget.
   LabelSize -- The X screen size of the Label Widget.
   LongValue -- Set this keyword for LONG values.
   Name -- A scalar string name of the object. (default = '')
   Positive -- Set this keyword if you want only positive numbers allowed.
   Row=row -- Set this keyword to have the Label beside the Text Widget. (The default.)
   Scr_XSize -- The X screen size of the compound widget.
   Scr_YSize -- The Y screen size of the compound widget.
   StringValue -- Set this keyword for STRING values. (The default.)
   Title -- The text to go on the Label Widget.
   UValue -- A user value for any purpose.
   Value -- The "value" of the compound widget.
   XSize -- The X size of the Text Widget.

 COMMON BLOCKS:

   None.

 RESTRICTIONS:

   None.

 EVENT STRUCTURE:

   All events are handled internally unless either the Event_Pro or Event_Func
   keywords are used to assign an event handler to the compound widget. By
   default all events generated by the text widget are passed to the assigned
   event handler. If you wish to receive only Carriage Return events, set the
   CR_Only keyword.

   event = { FSC_FIELD, $         ; The name of the event structure.
             ID: 0L, $            ; The ID of the compound widget's top-level base.
             TOP: 0L, $           ; The widget ID of the top-level base of the hierarchy.
             HANDLER: 0L, $       ; The event handler ID. Filled out by IDL.
             ObjRef: Obj_New(), $ ; The "self" object reference. Provided so you can call methods.
             Value: Ptr_New(), $  ; A pointer to the widget value.
             Type:""              ; A string indicating the type of data in the VALUE field.
           }                      ; Values are "INT", "LONG", "FLOAT", "DOUBLE", or "STRING".

 GETTING and SETTING VALUES:

   Almost all the properties of the widget can be obtained or set via
   the object's GetProperty and SetProperty methods (described below).
   But since traditional compound widgets have the ability to get and
   set the value of the compound widget, this capability is implemented
   as special methods.

   To get the value of the field, do this: value = objectRef->Get_Value()
   To set the value of the field, so this: objectRef->Set_Value, value, /IntegerValue

   The proper keyword should be used to set the data type of the value. If a keyword
   is not used, the data type is determined from the value itself.

 OBJECT PROCEDURE METHODS:

   GetProperty -- This method allows various properties of the widget to be
       returned via output keywords. The keywords that are available are:

       CR_Only -- A flag, if set, means only report carriage return events.
       DataType -- The data type of the field variable.
       Decimal -- Set this keyword to the number of digits to the right of the decimal
              point in FLOATVALUE and DOUBLEVALUE numbers.
       Digits -- Set this keyword to the number of digits permitted in INTERGERVALUE and LONGVALUE numbers.
       Event_Func -- The name of the event handler function.
       Event_Pro -- The name of the event handler function.
       Positive -- Indicates if the Positive number flag is set (1) or not (0).
       UValue -- The user value assigned to the compound widget.
       Value -- The "value" of the compound widget.
     Name -- A scalar string name of the object.

   MoveTab -- This method moves the focus to the widget identified in the "next" field,
        which must be set with the SetTabNext method. No parameters. Called automatically
        when a TAB character is typed in the text widget.

   Resize -- This method allows you to resize the compound widget's text field.
        The value parameter is an X screen size for the entire widget. The text
        widget is sized by using the value obtained from this value minus the
        X screen size of the label widget.

          objectRef->Resize, screen_xsize_value

   Set_Value -- This method allows you to set the "value" of the field. It takes
       one positional parameter, which is the value.

          objectRef->Set_Value, 5

       Keywords available are these to set the type of the data. If keywords
       are not used, the data type is determined from the value.

       DoubleValue -- Set this keyword if you want DOUBLE values returned.
       FloatValue -- Set this keyword for FLOAT values.
       IntegerValue --  Set this keyword for INTEGER values.
       LongValue -- Set this keyword for LONG values.
       StringValue -- Set this keyword for STRING values. (The default.)

   SetProperty -- This method allows various properties of the widget to be
       set via input keywords. The keywords that are available are:

       CR_Only -- Set this keyword if you only want Carriage Return events.
       Decimal -- Set this keyword to the number of digits to the right of the decimal
              point in FLOATVALUE and DOUBLEVALUE numbers.
       Digits -- Set this keyword to the number of digits permitted in INTERGERVALUE and LONGVALUE numbers.
       DoubleValue -- Set this keyword if you want DOUBLE values returned.
       Event_Func -- Set this keyword to the name of an Event Function.
       Event_Pro -- Set this keyword to the name of an Event Procedure.
       FloatValue -- Set this keyword for FLOAT values.
       IntegerValue --  Set this keyword for INTEGER values.
       LabelSize --  The X screen size of the Label Widget.
       LongValue -- Set this keyword for LONG values.
       Name -- A scalar string name of the object. (default = '')
       Positive -- Set this keyword to indicate only positive numbers are allowed.
       Scr_XSize -- The X screen size of the text widget.
       Scr_YSize -- The Y screen size of the text widget.
       StringValue -- Set this keyword for STRING values. (The default.)
       Title -- The text to go on the Label Widget.
       UValue -- A user value for any purpose.
       Value -- The "value" of the compound widget.
       XSize -- The X size of the Text Widget.

 OBJECT FUNCTIONS METHODS:

      Get_Value -- Returns the "value" of the field. No parameters. Will be undefined
          if a "number" field is blank. Should be checked before using:

          IF N_Elements(objectRef->Get_Value()) NE 0 THEN Print, Value is: ', objectRef->Get_Value()

      GetID -- Returns the widget identifier of the compound widget's top-level base.
         (The first child of the parent widget.) No parameters.

      GetLabelSize -- Returns the X screen size of the label widget. No parameters.

      GetTextID -- Returns the widget identifier of the compound widget's text widget.
         No parameters.

      GetTextSize -- Returns the X screen size of the text widget. No parameters.

 PRIVATE OBJECT METHODS:

   Although there is really no such thing as a "private" method in IDL's
   object implementation, some methods are used internally and not meant to
   be acessed publicly. Here are a few of those methods. I list them because
   it may be these private methods are ones you wish to override in subclassed
   objects.

      MoveTab -- This method moves the cursor to end of the text in the widget identified
        by the nexttab field. (This will be set with the SetTabNext method.)

      Text_Events -- The main event handler method for the compound widget. All
        text widget events are processed here.

      ReturnValue -- This function method accepts a string input value and converts
        it to the type of data requested by the user.

      Validate -- This function method examines all text input and removes unwanted
        characters, depending upon the requested data type for the field. It makes it
        impossible, for example, to type alphanumeric characters in an INTEGER field.

 EXAMPLE:

   An example program is provided at the end of the FSC_INPUTFIELD code. To run it,
   type these commands:

      IDL> .Compile FSC_InputField
      IDL> Example

 MODIFICATION HISTORY:

   Written by: David Fanning, 23 NOV 1999.
   Added DECIMAL and DIGITS keywords, 2 Jan 2000, DWF.
   Changed the calling sequence to that of a function rather than an object
      creation call. This is more familiar to users of compound widgets. 4 Jan 00. DWF.
   Added GetID and Resize methods. 7 Jan 00. DWF.
   Added the Positive keyword and functionality. 12 Jan 00. DWF
   Modified (slightly) the behavior on deleting characters. 12 Jan 00. DWF.
   If a number field is blank, the Get_Value method will now return an undefined variable.
      Be sure you check this value before you use it for something! 17 Jan 00. DWF.
   Fixed a small typo: "aveDecimal" to "haveDecimal". 10 March 2000. DWF.
   Added the ability to tab between FSC_INPUTFIELD widgets with the SetTabNext,
      MoveTab, and GetTextID methods. 31 July 2000. DWF.
   Added NAME field property, a scalar string name for the object 2 AUG 2000 BT
   Added ObjRef field to the FSC_FIELD event structure and added field selection
      for the TAB events added 31 July. 7 AUG 2000. DWF
   Added GetTextSize and GetLabelSize methods for obtaining the X screen
      size of the text and label widgets, respectively. 30 Jan 2001. DWF.


FSC_PLOTWINDOW

[List of Routines] (See ./dfanning/fsc_plotwindow.pro)

 NAME:
   FSC_PLOTWINDOW

 PURPOSE:

   The purpose of this compound widget is to create a resizeable
   "plot window" inside a larger "page window". I'm not sure it
   has any value except as a utility routine for the PostScript
   configuration object FSC_PSCONFIG__DEFINE, but it's a neat
   program anyway. :-)

 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:

   Utility routine for FSC_PSCONFIG__DEFINE.

 MODIFICATIONS:

   Written by David Fanning, 31 January 2000.
   Fixed a small bug that prevented it working on Macintosh computers. 26 Sept 2000. DWF.


FSC_PSCONFIG__DEFINE

[List of Routines] (See ./dfanning/fsc_psconfig__define.pro)

 NAME:
   FSC_PSCONFIG__DEFINE

 PURPOSE:

   The purpose of this program is to implement an object that
   can keep track of--and allow the user to change--the current
   configuration of the PostScript device.

 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:

   General programming.

 DOCUMENTATION:

   Complete documentation for the FSC_PSCONFIG object, including
   keyword and method descriptions, and example programs using the object
   can be found on the Coyote's Guide to IDL Programming web page:

     http://www.dfanning.com/programs/docs/fsc_psconfig.html

   Or, if you would prefer, you can download a self-contained PDF file:

     http://www.dfanning.com/programs/docs/fsc_psconfig.pdf

 KEYWORDS:

   Any keyword accepted by the FSC_PSCONFIG object can be used with
   this program. Here are a few of the most popular keywords.

   Bits_per_Pixel - The number of image bits saved for each image pixel: 2, 4, or 8. The default is 8.
   Color - Set this keyword to select Color PostScript output. Turned on by default.
   DefaultSetup - Set this keyword to the "name" of a default style. Current styles (you can easily
     create and add your own to the source code) are the following:

       "System (Portrait)" - The normal "default" system set-up. Also, "System".
       "System (Landcape)" - The normal "default" landscape system set-up.
       "Centered (Portrait)" - The window centered on the page. Also, "Center" or "Centered".
       "Centered (Landscape)" - The window centered on the landscape page. Also, "Landscape".
       "Square (Portrait)" - A square plot, centered on the page.
       "Square (Landscape)" - A square plot, centered on the landscape page.
       "Figure (Small)" - A small encapsulated figure size, centered on page. Also, "Encapsulated" or "Encapsulate".
       "Figure (Large)" - A larger encapsulated figure size, centered on page. Also, "Figure".
       "Color (Portrait)" - A "centered" plot, with color turned on. Also, "Color".
       "Color (Landscape)" - A "centered" landscape plot, with color turned on.

   Directory - Set this keyword to the name of the starting directory. The current directory is used by default.
   Encapsulate - Set this keyword to select Encapsulated PostScript output. Turned off by default.
   European - Set this keyword to indicate "european" mode (i.e., A4 page and centimeter units). Turned off by default.
   Filename - Set thie keyword to the name of the PostScript file. The default is "idl.ps".
   Inches - Set this keyword to indicate sizes and offsets are in inches as opposed to centimeters. Set by European keyword by default.
   Landscape - Set this keyword to select Landscape page output. Portrait page output is the default.
   PageType - Set this keyword to the "type" of page. Possible values are:
       "Letter" - 8.5 by 11 inches. (Default, unless the European keyword is set.)
       "Legal" - 8.5 by 14 inches.
       "Ledger" - 11 by 17 inches.
       "A4" - 21.0 by 29.7 centimeters. (Default, if the European keyword is set.)
   XOffset - Set this keyword to the X Offset. Uses "System (Portrait)" defaults. (Note: offset calculated from lower-left corner of page.)
   XSize - Set this keyword to the X size of the PostScript "window". Uses "System (Portrait)" defaults.
   YOffset - Set this keyword to the Y Offset. Uses "System (Portrait)" defaults. (Note: offset calculated from lower-left corner of page.)
   YSize - Set this keyword to the Y size of the PostScript "window". Uses "System (Portrait)" defaults.

   In addition, the following keywords can be used:

   CANCEL -- An output keyword that will be set to 1 if the user
   chooses the Cancel button on the form. It will be 0 otherwise.

   FONTINFO -- Set this keyword is you wish to have font information
   appear on the form. The default is to not include font information.

   FONTTYPE -- Set this keyword to a named variable that will indicate
   the user's preference for font type. Values will be -1 (Hershey fonts),
   0 (hardware fonts), and 1 (true-type fonts). This keyword will always
   return -1 unless the FONTINFO keyword has also been set.

   GROUP_LEADER -- Set this keyword to a widget identifier of the widget
   you wish to be a group leader for this program.

 EXAMPLE:

   A simple sequence of using the object would look something like this:

     psObject = Obj_New("FSC_PSCONFIG")
     psObject->GUI
     psKeywords = psObject->GetKeywords()
     thisDevice = !D.Name
     Set_Plot, 'PS'
     Device, _Extra=psKeywords
     TVImage, image
     Device, /Close_File
     Set_Plot, thisDevice
     Obj_Destroy, psObject

  Note that the object can also be called from the PS_CONFIG interface:

     psKeywords = PSConfig()

 OTHER PROGRAMS NEEDED:

   The following programs are required to run this one:

     fsc_droplist.pro
     fsc_fileselect.pro
     fsc_field.pro
     fsc_plotwindow

 MODIFICATIONS:

   Written by David Fanning, 31 January 2000.
   Added capability to call GUI methods when the current graphics device
      doesn't support windows. Device is restored when the GUI exits. 11 May 2000. DWF.
   Changed the default value for the Color keyword to 1. 16 May 2000. DWF.
   Fixed a bug where filename changed when switching Setups. 8 AUG 2000. DWF.
   Fixed a bug when saving setup in Landscape mode. 8 AUG 2000. DWF.
   Added the ability to Get and Set the object's name via the SetProperty
      and a very abbreviated GetProperty method. Also added a GetName method. 26 SEP 2000. DWF.
   Fixed a problem in which the proper configuration was not restored if in Landscape mode. 20 Nov 2000. DWF.
   Made a number of modifications at the request of Martin Schultz. 4 Dec 2000. DWF.
   Fixed a bug when setting file  and directory names with the SetProperty method. 18 Dec 2000. DWF.
   Fixed a small problem in initializing the page size properly. 3 Jan 2001. DWF.
   Corrected a problem that resulted from a change to FSC_DROPLIST. 6 Jan 2001. DWF.
   Added the ability to restore the font type instead of always reverting to !P.Font. 7 Jan 2001. DWF.
   Increased the length of the file/directory name fields. 7 Jan 2001. DWF.
   Fixed another problem with Landscape mode interacting with A4 paper size. 7 Jan 2001. DWF.


FSC_SURFACE

[List of Routines] (See ./dfanning/fsc_surface.pro)

 NAME:
       FSC_SURFACE

 PURPOSE:

       The purpose of this program is to demonstrate how to
       create a rotating surface using object graphics.

 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:

       Widgets, Object Graphics.

 CALLING SEQUENCE:

       FSC_SURFACE, data, x, y

 REQUIRED INPUTS:

       None. Fake data will be used if no data is supplied in call.

 OPTIONAL INPUTS

       data: A 2D array of surface data.

       x: A vector of X data values.

       y: A vector of Y data values.

 OPTIONAL KEYWORD PARAMETERS:

       COLORTABLE: Set this keyword to a number between 0 and 40 to select one
       of the pre-selected IDL color tables for elevation shading.

       ELEVATION_SHADING: Set this keyword to put elevation shading into effect.

       EXACT: Set this keyword to a one-, two-,or three-element array to set exact axis
       scaling for the X, Y, and Z axes, respectively. If Exact is a one-element array,
       all three axes are set to the same value. For example, to set the X axis to
       exact scaling and the Y and Z axes to normal scaling, type:

           IDL> FSC_Surface, Exact=[1,0,0]

       _EXTRA: This keyword collects otherwise undefined keywords that are
        passed to the IDLgrSURFACE initialization routine.

       GROUP_LEADER: The group leader for this program. When the group leader
       is destroyed, this program will be destroyed.

       LANDSCAPE: Set this keyword if you are printing in landscape mode. The
       default is Portrait mode. The Landscape keyword on the PRINTER object
       is set, but not all printers will honor this keyword setting. If yours
       does not, set Landscape mode in the Printer Setup dialog.

       SHADED: Set this keyword to set up a shaded surface plot rather than a wire
       mesh surface, which is the default.

       TITLE:  A string used as the title of the plot.

       XTITLE: A string used as the X title of the plot.

       YTITLE: A string used as the Y title of the plot.

       ZTITLE: A string used as the Z title of the plot.


 COMMON BLOCKS:

       None.

 SIDE EFFECTS:

       None.

 DEPENDENCIES:

       This program requires the following additional files from the Coyote Library:

          error_message.pro
          fsc_droplist.pro
          getcolor.pro
          loaddata.pro
          pickcolor.pro
          xcolors.pro

 EXAMPLE:

       To use this program with your data, type:

        IDL> FSC_Surface, data

 MODIFICATION HISTORY:

       Written by David Fanning, 8 June 97.
       Made axis scaling more robust. 17 Sept 97. DWF.
       Minor modifications to incorporate better understanding
          of how objects work. 4 Oct 97. DWF.
       Fixed error cleaning up all of my created objects. 12 Feb 98. DWF.
       Changed IDLgrContainer to IDL_Container to fix 5.1 problems. 20 May 98. DWF.
       Fixed mis-spelling of HELVETICA14. 29 June 98. DWF.
       Added the EXACT keyword to the X and Y axes to force axis ranging. 27 July 98. DWF
       Added the ability to select rendering "drag" quality for faster operation. 22 Aug 98. DWF.
       Added ability to get non-exact axis scaling. 12 May 99. DWF.
       Improved documentation and readability of code. 12 May 99. DWF.
       Added VECTOR and LANDSCAPE keywords and improved printing capability. 16 Feb 2000. DWF.
       Added different lights and a Light Controller option. 28 April 2000. DWF.
       Added elevation shading. 8 May 2000. DWF.
       Removed VECTOR keyword. Replaced with VECTOR/BITMAP/COLOR Print buttons. 8 May 2000. DWF.
       Added HIDDEN_LINE keyword. 8 May 2000. DWF.
       Added EXACT keyword extensions and changed name from XSURFACE to FSC_SURFACE. 11 May 2000. DWF.
       Made change to Light Control code to accomodate FSC_DROPLIST changes. 6 Jan 2001. DWF.
       Removed unused color table vector code from a LONG time ago. 17 Jan 2001. DWF.


FSC_WINDOW

[List of Routines] (See ./dfanning/fsc_window.pro)

 NAME:
       FSC_WINDOW

 PURPOSE:

       This routine implements a "smart" resizeable graphics window.
       It is used as a wrapper for built-in IDL graphics procedures
       such as SURFACE, CONTOUR, PLOT, SHADE_SURF, etc. In additon,
       it can be used to display any user-written graphics procedure
       so long as that procedure follows three simple rules: (1) It
       does not open it's own graphics windows, (2) It is defined with
       no more than three positional arguments (an unlimited number
       of keyword arguments are allowed), and (3) It uses no device-
       specific commands, such as "WSet", "Device, Decomposed=1", etc.

       Keyword arguments permit the window to have its own portion
       of a color table and to be able to change the colors loaded in
       that portion of the color table. Colors are updated
       automatically on both 8-bit and 24-bit color displays. In
       addition, the window colors will "protect" themselves. I mean
       by this that the window will re-load its own colors into the
       color table when the window gains keyboard focus. This
       prevents other applications from changing the colors used to
       display data in this window. (This is an issue mainly in
       IDL 5 applications where widget applications can run
       concurrently with commands from the IDL command line.)

       Keyword arguments also permit the window to create output
       files of its contents. These files can be color and
       gray-scale PostScript, and color BMP, GIF, JPEG, PICT, PNG,
       TIFF, or JPEG files. Output can also be sent directly to
       the default printer.

 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:

       Widgets, Graphics.

 CALLING SEQUENCE:

       FSC_WINDOW, command, P1, P2, P3

 REQUIRED INPUTS:

       COMMAND: The graphics procedure command to be executed. This parameter
       must be a STRING and the the command must be a procedure. Examples
       are 'SURFACE', 'CONTOUR', 'PLOT', etc.

 OPTIONAL INPUTS:

       P1: The first positional parameter appropriate for the graphics
           command.

       P2: The second positional parameter appropriate for the graphics
           command.

       P3: The third positional parameter appropriate for the graphics
           command.

 INPUT KEYWORD PARAMETERS:

       WBACKGROUND: The background color index for the window. Setting this color
           along with the WERASEIT keyword causes the window to be erased with
           this color. Set to !P.Background by default.

       WERASEIT: Setting this keyword "erases" the contents of the current
       graphics window before re-executing the graphics command. For example,
       this keyword might need to be set if the graphics "command" is TVSCL.
       The default is to NOT erase the display before reissuing the graphics
       command.

       _EXTRA: This keyword forms an anonymous structure of any unrecognized
       keywords passed to the program. The keywords must be appropriate
       for the graphics command being executed.

       GROUP_LEADER: The group leader for this program. When the group leader
       is destroyed, this program will be destroyed.

       WTITLE: This is the window title. It is the string "COMMAND Window (1)"
       by default, where COMMAND is the input parameter. And the number
       (1 in this case) is the window index number of the draw widget.

       WXPOS: This is the initial X offset of the window. Default is to
       position the window in the approximate middle of the display.

       WYPOS: This is the initial Y offset of the window. Default is to
       position the window in the approximate middle of the display.

       WPOSTSCRIPT: Set this keyword to 1 to include a PostScript File button under
       the Save As button. This keyword is set automatically on 24-bit display
       devices. To turn the button OFF on 24-bit devices, set the keyword value to 0.
       There is no guaranteed way to create perfect PostScript output when the program
       is run on 8-bit displays. This will depend entirely on how the "graphics command"
       is written. Hence the button is turned off automatically on 8-bit devices.

       WPRINT: Set this keyword to 1 to include a Print button under the File button.
       This keyword is set automatically on 24-bit display devices. To turn the
       button OFF on 24-bit devices, set the keyword value to 0. There is no
       guaranteed way to print output correctly when the program is run on
       8-bit displays. This will depend entirely on how the "graphics command"
       is written. Hence the button is turned off automatically on 8-bit devices.

       WXSIZE: This is the initial X size of the window. Default is 400
       pixels.

       WYSIZE: This is the initial Y size of the window. Default is 400
       pixels.

       WCOLORS: Using this keyword adds a "Colors..." button to the
       "File" menu. Set this keyword to the number of colors available
       in the window and the starting index of the first color. For example,
       to allow the window access to 100 colors, starting at color index 50
       (i.e., color indices 50 to 149), use WColors=[100, 50]. If you use the
       keyword syntax "/WColors", all the colors available will be used, not just
       one color. If the keyword is set to a scalar value greater than 1, the
       starting color index is set to 0. The default value for this keyword
       is [(!D.Table_Size, 0].

 COMMON BLOCKS:

       None.

 RESTRICTIONS:

       This program requires additional programs from the Fanning
       Software Consulting library:

       CENTERTLB.PRO
       ERROR_MESSAGE.PRO
       FSC_PSCONFIG__DEFINE.PRO
       FSC_DROPLIST.PRO
       FSC_FILESELECT.PRO
       FSC_INPUTFIELD.PRO
       FSC_PLOTWINDOW.PRO
       PSCONFIG.PRO
       PSWINDOW.PRO
       fTVREAD.PRO
       XCOLORS.PRO

       If the "command" program requires keywords that are also keywords
       to FSC_WINDOW, then you must use the keyword twice on the command line.

 EXAMPLE:

       If the program is called with no parameters whatsoever, it will load
       example data.

       IDL> FSC_WINDOW

 MODIFICATION HISTORY:

       Written by: David Fanning, Sept 2000. Based on previous XWINDOW program.
       Whoops! Left out the line to resize draw widgets on UNIX machines. Fixed. 12 Oct 2000, DWF.
       Removed support for GIF files for IDL 5.4. 18 Jan 2001. DWF.
	2/5/04, nbr - 	Change procedure calls for pros renamed for SSW 
			compatability


FUZZY_BLOCK

[List of Routines] (See ./reduce/fuzzy/fuzzy_block.pro)

 PROJET:
	SOHO - LASCO

 NAME:
	FUZZY_BLOCK

 PURPOSE:
	Retrieves high-frequency information of a lost block using fuzzy logic

 PROCEDURE:
	Retrieves high-frequency information of a lost block using fuzzy logic
	reasoning on blocks specta
	
 CATEGORY:
	Missing Blocks, Interpolation

 CALLING SEQUENCE:
	block =	fuzzy_block (image, i, j)

 INPUTS:
	image		the image containing the block to correct
	i, j		the location (column, row) of this block

 KEYWORD INPUT:
	rebindex : rebin index (see fuzzy_image.pro)

 OUTPUTS:
	The corrected block (array of pixels) is returned

 SUB-ROUTINES:
	fuzzy_block.pro  contains the following sub-routines :

	_ num_to_fuzzy		convert a number to a fuzzy interval
	_ fuzzy_to_num		convert a fuzzy interval to a number
	_ inter_fuzzy		intersection of 2 fuzzy intervals
	_ FUZZY_BLOCK		perform a spectrum correction of a block
	  (=main routine)	using fuzzy logic reasoning

 REFERENCE:
	( see fuzzy_image.pro )

 MODIFICATION HISTORY:
	Written by J. MORE, October 1996
	Add of rebindex keyword on 28/01/2000 by A.Thernisien


FUZZY_IMAGE

[List of Routines] (See ./reduce/fuzzy/fuzzy_image.pro)


unction fuzzy_image,ima,HDR=hdr,VERBOSE=verbose, TOO_MANY=too_many, ALL=all

 PROJECT:
	SOHO - LASCO

 NAME:
	FUZZY_IMAGE

 PURPOSE:
	Corrects missing blocks on a image with a fuzzy logic method
	
 CATEGORY:
	Missing Blocks, Enhancement

 CALLING SEQUENCE:
	image =	fuzzy_image (ima,HDR=hdr)

 INPUTS:
	ima : the image containing blocks to correct

 OUTPUTS:
	The corrected image

 KEYWORDS:
	hdr : FITS header of the image. WARNING: If the image header is not passed, fuzzy_image concider that 
		the image is from C2 and 1024 * 1024: the procedure failed if it's not the case.
	verbose : print running informations
 	TOO_MANY: Flag for reduce_level_1.pro to mask missing blocks
	ALL:	Replace all missing blocks, regardless of number or mask

 SUBROUTINES:
	fuzzy_image.pro getl05hdrparam.pro sxpar.pro getok.pro get_tmask.pro get_miss_blocks.pro where2d.pro 
	hcie_zone.pro read_zone.pro grad_zone.pro tri_surf.pro reverse.pro write_zone.pro fuzzy_block.pro 
	read_block.pro dct.pro num_to_fuzzy.pro inter_fuzzy.pro fuzzy_to_num.pro write_block.pro

 REFERENCE:
		-> This method is based upon the following :
	Information Loss Recovery for Block-Based Image Coding Techniques
	- A Fuzzy Logic Approach
	Xiaobing Lee, Ya-Qin Zhang, Alberto Leon-Garcia
	IEEE TRANSACTIONS ON IMAGE PROCESSING, VOL.4, NO.3, MARCH 1995

 MODIFICATION HISTORY:
	V1.0 Written by J. MORE, October 1996
	Modif by A.T. 13/01/2000 and 18/01/2000: 
	- add of the HDR keyword the take account of the size and the detector. 
	- small modif to avoid crash when a missing block is near a non transmitted block
	1/23/01, nbr : Compute new blocks if number of good blocks in a zone greater than number of bad; 
		remove if statement for doing fuzzy_block; add TOO_MANY keyword
	12/4/01, nbr : Move function statement to top
	12/31/01, nbr :	Add ALL keyword
	 1/ 9/03, nbr : Add logfile; don't create window 2; change way n_in_zone is computed
	 3/20/03, nbr : Re-enable TOO_MANY and make threshold 16
	 4/ 9/03, nbr : add COMMON dbms, logging; add edge exclusion logic
	 4/11/03, nbr : set too_many equal to number missing; do not continue if gt 100 missing in a zone
       05.07.25, nbr - Update/fix too_many implementation for subfield cases

ersion = '@(#)fuzzy_image.pro	1.7, 07/25/05' ; LASCO IDL Library


FUZZY_TO_NUM

[List of Routines] (See ./reduce/fuzzy/fuzzy_to_num.pro)

 NAME:
	FUZZY_TO_NUM

 PURPOSE:
	Converts a fuzzy number to a number

 PROCEDURE:
	Converts a fuzzy number (or array of fuzzy numbers) to a number (or an
	array of numbers)

 CALLING SEQUENCE:
	a = fuzzy_to_num (afuzzy)

 INPUTS:
	afuzzy		a fuzzy number (scalar or array)

 OUTPUTS:
	The number (or array) best representing the fuzzy number (or array)


GAMMASCAL[1]

[List of Routines] (See ./display/gammasca.pro)

 NAME:  
	GAMMASCAL

 PURPOSE:
	To modify images in order to account
       for a certain gamma-factor WITHOUT
       changing the IDL color table.

 CATEGORY:
	PICO

 CALLING SEQUENCE:
	result=GAMMASCAL(image,gamma)

 INPUTS:
	image:  The image to be scaled
       gamma:  The gamma exponent to be used

 OPTIONAL INPUTS:
	None

 KEYWORD PARAMETERS:
	VERBOSE: Gives time indications about 
               needed time...

 OUTPUTS:
	result: The scaled image

 OPTIONAL OUTPUTS:
	None

 EXAMPLE:
	TVSCL,GAMMASCAL(image,.3)

       The image will be displayed using a gamma
       exponent of 0.3 without changing the IDL
       color table
	
 COMMON BLOCKS:
	None

 SIDE EFFECTS:
	Unknown

 RESTRICTIONS:
	None

 PROCEDURE:
	A lookup table is created and then each 
       pixel value is replaced by the new one.
       By efficient programming the procedure
       could perhaps be speeded up slightly.

 MODIFICATION HISTORY:
	V1.0 Alexander Epple 14-FEB-1996 MPAe Lindau


GAMMASCAL[2]

[List of Routines] (See ./display/gammascal.pro)

 NAME:  
	GAMMASCAL

 PURPOSE:
	To modify images in order to account
       for a certain gamma-factor WITHOUT
       changing the IDL color table.

 CATEGORY:
	PICO

 CALLING SEQUENCE:
	result=GAMMASCAL(image,gamma)

 INPUTS:
	image:  The image to be scaled
       gamma:  The gamma exponent to be used

 OPTIONAL INPUTS:
	None

 KEYWORD PARAMETERS:
	VERBOSE: Gives time indications about 
               needed time...

 OUTPUTS:
	result: The scaled image

 OPTIONAL OUTPUTS:
	None

 EXAMPLE:
	TVSCL,GAMMASCAL(image,.3)

       The image will be displayed using a gamma
       exponent of 0.3 without changing the IDL
       color table
	
 COMMON BLOCKS:
	None

 SIDE EFFECTS:
	Unknown

 RESTRICTIONS:
	None

 PROCEDURE:
	A lookup table is created and then each 
       pixel value is replaced by the new one.
       By efficient programming the procedure
       could perhaps be speeded up slightly.

 MODIFICATION HISTORY:
	V1.0 Alexander Epple 14-FEB-1996 MPAe Lindau


GAUSSFIT

[List of Routines] (See ./exposure/las_fit_gauss.pro)

 NAME:
	GAUSSFIT

 PURPOSE:
 	Fit the equation y=f(x) where:

 		F(x) = A0*EXP(-z^2/2) + A3
 			and
		z=(x-A1)/A2

	A0 = height of exp, A1 = center of exp, A2 = sigma (the width).
	A3 = constant term
 	The parameters A0, A1, A2, A3 are estimated and then CURVEFIT is 
	called.

 CATEGORY:
	?? - fitting

 CALLING SEQUENCE:
	Result = GAUSSFIT(X, Y [, A])

 INPUTS:
	X:	The independent variable.  X must be a vector.
	Y:	The dependent variable.  Y must have the same number of points
		as X.

 OUTPUTS:
	The fitted function is returned.

 OPTIONAL OUTPUT PARAMETERS:
	A:	The coefficients of the fit.  A is a six-element vector as 
		described under PURPOSE.

 COMMON BLOCKS:
	None.

 SIDE EFFECTS:
	None.

 RESTRICTIONS:
	The peak or minimum of the Gaussian must be the largest
	or smallest point in the Y vector.

 PROCEDURE:
	If the (MAX-AVG) of Y is larger than (AVG-MIN) then it is assumed
	that the line is an emission line, otherwise it is assumed there
	is an absorbtion line.  The estimated center is the MAX or MIN
	element.  The height is (MAX-AVG) or (AVG-MIN) respectively.
	The width is found by searching out from the extrema until
	a point is found less than the 1/e value.

 MODIFICATION HISTORY:
	DMS, RSI, Dec, 1983.


GCURSOR

[List of Routines] (See ./las-c2/gcursor.pro)

RO GCURSOR,TABLE_NAME,N_POINTS
	created by M.BOUT, LAS, 931118
       the graphic cursor becomes enable and a group of points taken on the 
       plot are printed & writed into a given table.


GENERIC_MOVIE

[List of Routines] (See ./movie/generic_movie.pro)

 Project     : SOHO - LASCO/EIT
                   
 Name        : GENERIC_MOVIE
               
 Purpose     : Load various data formats into pixmaps and call WRUNMOVIE for animation.
               
 Explanation : This procedure is a generic interface to converting data
		(image files or data cubes) into the LASCO MVI format.
		The user can then save the movie in MVI format and use
		routines such as wrunmovie.pro, combine_mvi.pro, mvi2mpg.pro, 
		put_mvi.pro etc. for MVI manipulation.
               
 Use         : GENERIC_MOVIE, data[, bmin, bmax], /SXT, /MK3, /TRUECOLOR

 Inputs      : data : can be:
		       - 3 dimensional byte array (nx,ny,len)
		       - name of file containing names of images
		       - strarr of names of images
		    	(images can be of type: .fits, .gif, .pict, .tiff)

 Optional Inputs: bmin, bmax : Minimum and maximum DN for BYTSCL.
               
 Outputs     : None.
               
 Keywords    : 
	/SXT	: Data is YOHKOH/SXT FITS files.
	/MK3    : Data is Mauna-Loa Mark3 Coronagraph rpb files.
       /PICT   : Data are PICT files
	PAN=.5  : Resize to half
	LABEL	Set equal to array of labels to put in lower left corner of frames
	/RDIFF	: Do running difference movie
	TRUECOLOR	; Set if images are true color

 Calls       : WRUNMOVIE

 Side effects: Creates multiple pixmaps.
               
 Category    : Image Display/Animation.
               
 See Also    : WMKMOVIE.PRO is a widget front-end to making LASCO/EIT movies.
               
 Prev. Hist. : None.

 Written     : Scott Paswaters, NRL, 1996.
               
 Modified    : SEP 16 Dec 97 - Added /SXT keyword
                             - Added /MK3 keyword
               SEP 06 Jan 98 - Added .pict, .tiff support
               DW  21 Jan 99 - Y2K Fix for Yohkoh date
		NBR  9 Apr 99 - Added .jpg support
		NBR 14 May 99 - Add PICT keyword
		NBR 15 Sep 99 - Add PAN keyword
		NBR  7 Jun 01 - Add PNG support
		NBR  3 Jan 02 - Add LABEL keyword
		NBR  1 May 02 - Add RDIFF keyword
		NBR  3 Sep 02 - Add capability for floating point FITS
		RAH 16 SEP 04 - Flag for true color
               NBR 17 Mar 05 - Refine criteria for doing REBIN
               NBR 11 Apr 05 - Use /last keyword for break_file

 Version     : 

 SCCS variables for IDL use
 
 @(#)generic_movie.pro	1.15 04/11/05 :LASCO IDL LIBRARY


GETBKGIMG

[List of Routines] (See ./data_anal/getbkgimg.pro)

 Project     : SOHO - LASCO/EIT
                   
 Name        : GETBKGIMG
               
 Purpose     : Get background image for given telescope
               
 Explanation : This routine returns a model image (stray light and/or
		f-corona) for a given telescope, date, image size.
               
 Use         : bkgimg = GETBKGIMG(hdr, model_hdr)
    
 Inputs      : None.
               
 Opt. Inputs : ops	Start time of display in TAI.
               
 Outputs     : None.
               
 Opt. Outputs: None.
               
 Keywords    : use /FFV to return full field of view model (1024x1024 image)
		use /ALL to return yearly minimum otherwise closest monthly minimum images
		are interpolated for given date
		use /ANY_YEAR to return monthly minimum over multiple years.
	ROLLED	Look in $MONTHLY_IMAGES/rolled

 Calls       : 

 Common      : SOHO_DATA	Contains start and end times of SOHO roll periods.
               
 Restrictions: None.
               
 Side effects: None.
               
 Category    : Data analysis
               
 Prev. Hist. : None.

 Written     : Scott Paswaters, NRL
               
 Modified    : 06 Oct 1997 SEP - Added year independent option /ANY_YEAR
		28 Jul 1998 NBR - added time to tai computation; comment out
				STRPUT lines in interpolation section
		23 Sep 1998 NBR - finish repair to year difference problem in interpolation
		29 Sep 1998 NBR - for /FFV, rebin result to size of input image
		 5 Oct 1998 NBR - add call for level_1 images
		13 Nov 1998 NBR - Fix year difference repair
		25 Mar 1999 NBR - Do not interpolate if DATE_OBSs are equal
		 6 Apr 1999 NBR - Use congrid to resize if necessary
		 9 Apr 1999 NBR - Set year2 = year1 for ANY_YEAR
		   Dec 1999 NBR - Fix Y2K glitch for finding ind
		   Jan 2000 NBR - Tinker with resize of imgm; ReFix y2k bug for finding ind
		   Feb 2000 NBR - Rebin both imgm and imgm2 before interpolating
	Jun 2000 NBR - Add ROLL keyword for rolled images
	3/23/01, NBR - Check if bkgimg should be rolled in this procedure, making ROLL keyword 
			unnecessary
	3/30/01, NBR - Redo year problem for any-year
	11/20/01, NBR - Use ROLL_TIMES.pro and change ROLL to ROLLED to be consistent with other pros
	12/17/01, NBR - Fix ANY_YEAR end-of-year problem
	 3/ 8/02, NBR - Fix computation of factor for interpolation
	 7/10/02, NBR - Implement new method of finding images (not offset by 14 days) (except for 
			ANY_YEAR)
	030721	jake	added "OR hdr.CROTA1 EQ 180." to ROLLED check
	 9/03/03, NBR - change hdr.CROTA1 check
	03.10.10, nbr - Do ANY_YEAR if time since last available CURRENT monthly image is GT 15 days
	04.02.18, nbr - use doy to determine endofyear and begofyear
	04.03.02, nbr - Change behavior when model is >15 days old
	04.04.09, nbr - Level-1 bkg is ANY_YEAR only

 	@(#)getbkgimg.pro	1.23, 04/09/04 - NRL LASCO IDL Library
            
 (SCCS variables for IDL use)


GETCOLOR

[List of Routines] (See ./dfanning/getcolor.pro)

 NAME:
       GETCOLOR

 PURPOSE:
       The original purpose of this function was to enable the
       user to specify one of the 16 colors supported by the
       McIDAS color map by name. Over time, however, the function
       has become a general purpose function for handling and
       supporting drawing colors in a device-independent way.
       In particular, I have been looking for ways to write color
       handling code that will work transparently on both 8-bit and
       24-bit machines. On 24-bit machines, the code should work the
       same where color decomposition is turned on or off. The program
       now supports 88 colors.

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

 CATEGORY:
       Graphics, Color Specification.

 CALLING SEQUENCE:
       result = GETCOLOR(color, index)

 OPTIONAL INPUT PARAMETERS:
       COLOR: A string with the "name" of the color. Valid names are:
           black
           magenta
           cyan
           yellow
           green
           red
           blue
           navy
           pink
           aqua
           orchid
           sky
           beige
           charcoal
           gray
           white

           The color YELLOW is returned if the color name can't be resolved.
           Case is unimportant.

           If the function is called with just this single input parameter,
           the return value is either a 1-by-3 array containing the RGB values of
           that particular color, or a 24-bit integer that can be "decomposed" into
           that particular color, depending upon the state of the TRUE keyword and
           upon whether color decomposition is turned on or off. The state of color
           decomposition can ONLY be determined if the program is being run in
           IDL 5.2 or higher.

       INDEX: The color table index where the specified color should be loaded.
           If this parameter is passed, then the return value of the function is the
           index number and not the color triple. (If color decomposition is turned
           on AND the user specifies an index parameter, the color is loaded in the
           color table at the proper index, but a 24-bit value is returned to the
           user in IDL 5.2 and higher. This assumes the INDEXED keyword is NOT set.)

       If no positional parameter is present, then the return value is either a 16-by-3
       byte array containing the RGB values of all 16 colors or it is a 16-element
       long integer array containing color values that can be decomposed into colors.
       The 16-by-3 array is appropriate for loading color tables with the TVLCT command:

           Device, Decomposed=0
           colors = GetColor()
           TVLCT, colors, 100


 INPUT KEYWORD PARAMETERS:

       NAMES: If this keyword is set, the return value of the function is
              a 88-element string array containing the names of the colors.
              These names would be appropriate, for example, in building
              a list widget with the names of the colors. If the NAMES
              keyword is set, the COLOR and INDEX parameters are ignored.

                 listID = Widget_List(baseID, Value=GetColor(/Names), YSize=16)

       INDEXED:  If this keyword is set, the return value is always an index
              into the color table. In the absence of a color table INDEX
              parameter, the color is loaded at !P.COLOR < (!D.Table_Size-1).

       LOAD:  If this keyword is set, all 88 colors are automatically loaded
              starting at the color index specified by the START keyword.
              Note that setting this keyword means that the return value of the
              function will be a structure, with each field of the structure
              corresponding to a color name. The value of each field will be
              an index number (set by the START keyword) corresponding to the
              associated color, or a 24-bit long integer value that creates the
              color on a true-color device. What you have as the field values is
              determined by the TRUE keyword or whether color decomposition is on
              or off in the absense of the TRUE keyword. It will either be a 1-by-3
              byte array or a long integer value.

       START: The starting color index number if the LOAD keyword is set. This keyword
              value is ignored unless the LOAD keyword is also set. The keyword is also
              ignored if the TRUE keyword is set or if color decomposition in on in
              IDL 5.2 and higher. The default value for the START keyword is
              !D.TABLE_SIZE - 89.

       TRUE:  If this keyword is set, the specified color triple is returned
              as a 24-bit integer equivalent. The lowest 8 bits correspond to
              the red value; the middle 8 bits to the green value; and the
              highest 8 bits correspond to the blue value. In IDL 5.2 and higher,
              if color decomposition is turned on, it is as though this keyword
              were set.

 COMMON BLOCKS:
       None.

 SIDE EFFECTS:
       None.

 RESTRICTIONS:
       The TRUE keyword causes the START keyword to be ignored.
       The NAMES keyword causes the COLOR, INDEX, START, and TRUE parameters to be ignored.
       The COLOR parameter is ignored if the LOAD keyword is used.
       On systems where it is possible to tell the state of color decomposition
       (i.e., IDL 5.2 and higher), a 24-bit value (or values) is automatically
       returned if color decomposition is ON.

 EXAMPLE:
       To load a yellow color in color index 100 and plot in yellow, type:

          yellow = GETCOLOR('yellow', 100)
          PLOT, data, COLOR=yellow

       or,

          PLOT, data, COLOR=GETCOLOR('yellow', 100)

       To do the same thing on a 24-bit color system with decomposed color on, type:

          PLOT, data, COLOR=GETCOLOR('yellow', /TRUE)

       or in IDL 5.2 and higher,

          DEVICE, Decomposed=1
          PLOT, data, COLOR=GETCOLOR('yellow')

       To load all 88 colors into the current color table, starting at
       color index 100, type:

          TVLCT, GETCOLOR(), 100

       To add the color names to a list widget:

           listID = Widget_List(baseID, Value=GetColor(/Names), YSize=16)

       To load all 88 colors and have the color indices returned in a structure:

           DEVICE, Decomposed=0
           colors = GetColor(/Load, Start=1)
           HELP, colors, /Structure
           PLOT, data, COLOR=colors.yellow

       To get the direct color values as 24-bit integers in color structure fields:

           DEVICE, Decomposed=1
           colors = GetColor(/Load)
           PLOT, data, COLOR=colors.yellow

       Note that the START keyword value is ignored if on a 24-bit device,
       so it is possible to write completely device-independent code by
       writing code like this:

           colors = GetColor(/Load)
           PLOT, data, Color=colors.yellow

 MODIFICATION HISTORY:
       Written by: David Fanning, 10 February 96.
       Fixed a bug in which N_ELEMENTS was spelled wrong. 7 Dec 96. DWF
       Added the McIDAS colors to the program. 24 Feb 99. DWF
       Added the INDEX parameter to the program 8 Mar 99. DWF
       Added the NAMES keyword at insistence of Martin Schultz. 10 Mar 99. DWF
       Reorderd the colors so black is first and white is last. 7 June 99. DWF
       Added automatic recognition of DECOMPOSED=1 state. 7 June 99. DWF
       Added LOAD AND START keywords. 7 June 99. DWF.
       Replaced GOLD with CHARCOAL color. 28 Oct 99. DWF.
       Added INDEXED keyword to force indexed color mode. 28 Oct 99. DWF.
       Fixed problem of "aqua" and "pink" being mixed up. 18 Mar 00. DWF.
       Changed ON_ERROR from 1 to 2, and improved error handling. 2 Aug 00. DWF.
       Increased the known colors from 16 to 88. 19 October 2000. DWF.


GETCPUTIME

[List of Routines] (See ./packets/getcputime.pro)

     pckt = array of packets from TLM stream generated by DACS organized
            with time as the second dimension
     firstday is the kday number of the first day in time
     time is a floating array of the number of hours since firstday

     cpu time is year, doy, hour, min, sec 
         word:    1,    2 ,   3 ,  4 ,  5

    modified for pckt in either bytes or words, 3 Mar 1996 RAH
    22 Mar 1996  RAH, if byte packets, then assume read in with /no_hdr option
    
 @(#)getcputime.pro	1.1 01/23/98 :LASCO IDL LIBRARY


GETENV_SLASH

[List of Routines] (See ./util/getenv_slash.pro)

 NAME:
	GETENV_SLASH

 PURPOSE:
	Calls GETENV to return the environment variable, and then checks to 
	see if a slash is at the end of the string and appends one if there 
	isn't.

 CATEGORY:
	REDUCE

 CALLING SEQUENCE:
	Result = GETENV_SLASH (Envvar)

 INPUTS:
	Envvar = String of the environment variable

 OUTPUTS:
	Result = Environment variable with a slash

 PROCEDURE:
	If the environment variable is defined, a slash is appended to the 
	string returned by GETENV.

 EXAMPLE:
	s = GETENV_SLASH ('LEB_IMG')
	If $LEB_IMG is defined to be /net/lasco6/data/packets
	then the result would be:    /net/lasco6/data/packets/

 MODIFICATION HISTORY:
	Written    RA Howard, NRL, 1 Nov 1995
	Version 1  RAH, Initial Release
	Version 2  RAH, Use system variable !delimiter
	 8.16.01, NBR - Check existence of !delimiter using datatype
	12.17.01, NBR - Use get_delim.pro instead of '/'

       12/17/01, @(#)getenv_slash.pro	1.4 : NRL LASCO IDL LIBRARY


GETFPHKN

[List of Routines] (See ./packets/getfphkn.pro)

     hk = array of all monitors from HK TLM stream generated by DACS
     pcktnum is a number from 1 to 3 indicating one of the three HK packet
             types

 When         Who  What
 Dec 09 1998  aee  Added dacs and ecs keywords. Default is dacs.


 @(#)getfphkn.pro	1.1 01/23/98 :LASCO IDL LIBRARY


GETHKHR

[List of Routines] (See ./packets/gethkhr.pro)

     hk = array of all monitors from HK TLM stream generated by DACS
     hr is a number from 0 to 23 indicating the starting hour to be returned
     nhr is a number indicating the number of hours to be included

 @(#)gethkhr.pro	1.1 01/23/98 :LASCO IDL LIBRARY


GETHKN

[List of Routines] (See ./packets/gethkn.pro)


     hk = array of all monitors from HK TLM stream generated by DACS
     pcktnum is a number from 1 to 3 indicating one of the three HK packet
             types

 @(#)gethkn.pro	1.1 01/23/98 :LASCO IDL LIBRARY


GETIDLPID

[List of Routines] (See ./reduce/getidlpid.pro)

 Project     : SOHO - LASCO/EIT

 Name        : GETIDLPID

 Purpose     : Returns IDL Process ID

 Use         : IDL>    result = GETIDLPID()

 Inputs      :

 Optional Inputs:

 Outputs     :

 Keywords    :

 Comments    :

 Side effects:

 Category    :

 Written     : Jake Wendt, NRL, April 10, 2002

 Version     :


   07/10/03 @(#)getidlpid.pro	1.4


GETIMAGE

[List of Routines] (See ./dfanning/fgetimage.pro)

 NAME:
       GETIMAGE

 PURPOSE:
       The purpose of this function is to allow the user to open either
       regular or XDR binary image files of two or three dimensions.

 CATEGORY:
       Widgets, File I/O.

 CALLING SEQUENCE:
       image = GETIMAGE(filename)

 OPTIONAL INPUTS:
       filename: The name of the file to open for reading.

 OPTIONAL KEYWORD PARAMETERS:

       CANCEL: An output variable that can be set to a named variable.
       The value of the return variable will be 1 if the user clicked
       the "Cancel" button or if there was a problem reading the file.

       CATCH: Set this keyword to 0 if you wish to turn error catching OFF.

       DIRECTORY: The name of the directory the file is located in. By
       default the program looks in the "coyote" directory under the
       main IDL directory, if one exists. Otherwise, it defaults to the
       current directory.

       FRAMES: The 3rd dimension of a 3D data set. Defaults to 0.

       HEADER: The size of any header information in the file in BYTES.
       Default is 0.

       PARENT: The group leader for this widget program. The PARENT is
       required if GETIMAGE is called from another widget program in order
       to make this program a MODAL widget program.

       XDR: Set this keyword if the binary file is of XDR type.

       XOFFSET: This is the X offset of the program on the display. The
       program will be placed approximately in the middle of the display
       by default.

       XSIZE: The size of the 1st dimension of the data.

       YOFFSET: This is the Y offset of the program on the display. The
       program will be placed approximately in the middle of the display
       by default.

       YSIZE: The size of the 2nd dimension of the data.

 COMMON BLOCKS:
       None.

 SIDE EFFECTS:
       A "CANCEL" operation is indicated by a 0 return value.
       Any error in reading the file results in a 0 return value.

 RESTRICTIONS:
       None.

 EXAMPLE:
       To load the image "galaxy.dat" in the $IDL/examples/data
       directory, type:

       image = GETIMAGE('galaxy.dat', DIRECTORY=!DIR + '/examples/data', $
          XSIZE=256, YSIZE=256, Cancel=cancelled, Parent=event.top)
       IF NOT cancelled THEN TV, image

 MODIFICATION HISTORY:
       Written by: David Fanning, 3 February 96.
       Fixed bug that prevented reading INTEGER data. 19 Dec 96.
       Modifed program for IDL 5 MODAL operation. 19 Oct 97.
       Added CANCEL keyword. 27 Oct 97. DWF.
       Fixed CANCLE keyword spelling. Sigh... 29 JUN 98. DWF.
       Added COYOTE_FIELD, improved appearance. 19 NOV 99. DWF.
       Updated with latest version of COYOTE_FIELD. 18 FEB 2000. DWF.
       Added CATCH keyword so the program will break when I want
       it to. :-) 18 MAR 2000. DWF.
       Added GROUP_LEADER keyword, which is synonymous with PARENT. 31 MAR 2000. DWF.
       Updated obsolete PICKFILE call to DIALOG_PICKFILE. 17 JAN 2001. DWF.
	2/5/04, nbr - Rename for SSW compatability


GETL05HDRPARAM

[List of Routines] (See ./reduce/fuzzy/getl05hdrparam.pro)

 PROJET
	SOHO-LASCO

 NAME:
	getl05hdrparam

 PURPOSE:
	Extracts from fits header parameters of the image

 CATEGORY
	Fits Management

 CALLING SEQUENCE:
	getl05hdrparam,hdr,hdrfieldstruct

 INPUTS:
	hdr : header of a C2 or C3 image
     
 KEYWORD INPUT:
	offsetbias : set to compute the electronical offset bias

 OPTIONAL INPUTS PARAMETERS:
     none

 OUTPUTS:
	structure containing image parameters
		filename : FILENAME
		bitpix : BITPIX
		detector : DETECTOR
		sx : NAXIS1
		sy : NAXIS2
		fystart : R1ROW-1
		fxstart : R1COL-20
		fyend : P2ROW-1
		fxend : P2COL-20
		nrebinx : (fxend-fxstart+1)/sx
		nrebiny : (fyend-fystart+1)/sy
		bias : bias give by offset_bias
		lebxsum : LEBXSUM
		lebysum : LEBYSUM
		sumcolx : SUMCOL (1,2,4: 1 instead of 0 in the header)
		sumrowy : SUMROW (1,2,4: 1 instead of 0 in the header)
		rebindex : = nrebinx if nrebinx==nrebiny else =-1

 OPTIONAL OUTPUT PARAMETERS:
     none


 CALLED ROUTINES:
	t_param.pre_offset_bias

 HISTORY:
		V1.0 coded by A.Thernisien on 17/01/2000 based upon ima05dim.pro from A.LL


GETLOBT

[List of Routines] (See ./packets/getlobt.pro)


  returns the LASCO LOBT from HK packet 1
  The order of the raw bytes is byte flipped from the sun order

 @(#)getlobt.pro	1.1 01/23/98 :LASCO IDL LIBRARY


GETTOK

[List of Routines] (See ./las-c2/calib5.pro)

 NAME:
	GETTOK                                    
 PURPOSE:
	Function to retrieve the first part of the string
	until the character char is encountered.

 CALLING SEQUENCE:
	token = gettok( st, char )

 INPUT:
	char - character separating tokens, scalar string

 INPUT-OUTPUT:
	st - (scalar) string to get token from (on output token is removed)

 OUTPUT:
	token - scalar string value is returned 

 EXAMPLE:
	If ST is 'abc=999' then gettok(ST,'=') would return
	'abc' and ST would be left as '999' 

 HISTORY
	version 1  by D. Lindler APR,86
	Remove leading blanks    W. Landsman (from JKF)    Aug. 1991


GET_ATT_FITS

[List of Routines] (See ./astrometry/ephemeris/get_att_fits.pro)

 Project     :	SOHO - CDS

 Name        :	GET_SC_ATT()

 Purpose     :	Get the SOHO spacecraft attitude.

 Category    :	Class3, Orbit

 Explanation :	Read the definitive attitude file to get the spacecraft
		pointing and roll information.  If no definitive file is found,
		then the nominal values are returned as "Predictive".

 Syntax      :	Result = GET_SC_ATT( DATE  [, TYPE ] )

 Examples    :	

 Inputs      :	DATE	= The date/time value to get the attitude information
			  for.  Can be in any CDS time format.

 Opt. Inputs :	None.

 Outputs     :	The result of the function is a structure containing the
		spacecraft attitude information.  It contains the following
		tags:

			SC_AVG_PITCH_ECLIP
			SC_AVG_ROLL_ECLIP
			SC_AVG_YAW_ECLIP
			SC_AVG_PITCH
			SC_AVG_ROLL
			SC_AVG_YAW
			GCI_AVG_PITCH
			GCI_AVG_ROLL
			GCI_AVG_YAW
			GSE_AVG_PITCH
			GSE_AVG_ROLL
			GSE_AVG_YAW
			GSM_AVG_PITCH
			GSM_AVG_ROLL
			GSM_AVG_YAW
			SC_STD_DEV_PITCH
			SC_STD_DEV_ROLL
			SC_STD_DEV_YAW
			SC_MIN_PITCH
			SC_MIN_ROLL
			SC_MIN_YAW
			SC_MAX_PITCH
			SC_MAX_ROLL
			SC_MAX_YAW

		All parameters are in radians.

 Opt. Outputs:	TYPE	= Returns whether predictive or definitive data was
			  used to calculate the result.  Returned as either
			  "Definitive" or "Predictive".

 Keywords    :	RETAIN	= If set, then the FITS attitude file will be left
			  open.  This speeds up subsequent reads.

		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 = GET_SC_ATT( ERRMSG=ERRMSG, ... )
				IF ERRMSG NE '' THEN ...

 Calls       :	CONCAT_DIR, FXBOPEN, FXBREAD

 Common      :	Private common block GET_SC_ATT is used to keep track of the
		attitude file opened when the RETAIN keyword is used.

 Restrictions:	The attitude entries for the time closest to that requested is
		used to calculate the parameters.  Since the attitude data
		is calculated every 10 minutes, this should be correct within
		+/-5 minutes.  No attempt is made to interpolate to closer
		accuracy than that.

 Side effects:	Any data with too much variation (max-min) in the attitude data
		are rejected.  The limits are one arcminute in pitch and yaw,
		and one degree in roll.

 Prev. Hist. :	None.

 History     :	Version 1, 3-Jan-1997, RA Howard, NRL  Adapted from
			Version 7 of GET_SC_ATT, written by W.Thompson
			Removed /DIR from calls to concat_dir
			Changed call to OS_VERSION() to use system variable !version

 Contact     :	WTHOMPSON


GET_BAD_CMDS

[List of Routines] (See ./packets/get_bad_cmds.pro)

 NAME:
	GET_BAD_CMDS

 PURPOSE:
	This procedure extracts the bad commands from the housekeeping stream
	and puts them into a sequence:
		word 
		0	obt byte 1
		1	obt byte 2
		2	obt byte 3
		3	obt byte 4
		4	obt byte 5
		5	obt byte 6
		6	good / bad flag (0=good, 1=bad ground TC, 2=bad TCE comm)
		7	command counter
		8	command code
		9	command destination code
		10	command sequence number
		11	command error code

 CATEGORY:
	PACKETS

 CALLING SEQUENCE:
	Result = GET_BAD_CMDS (Hk)

 INPUTS:
	Hk:	A 2D byte array containing all three LASCO housekeepking 
		packets, as returned by READALLHK.

 OUTPUTS:
	This function returns a 2D array (12,*) containing the bad commands.
	Each row of the array contains the parameters above.

 PROCEDURE:
	The houskeeping packets are searched for the TM points that describe
	the bad commands, and then decoded into their component values.

 MODIFICATION HISTORY:
 	Written by:	R.A. Howard, NRL, 1995


	@(#)get_bad_cmds.pro	1.1 01/23/98 LASCO IDL LIBRARY


GET_C3_BKGD.PRO

[List of Routines] (See ./reduce/las_c3/get_c3_bkgd.pro)

 PROJET:
     SOHO-LASCO

 NAME:
     get_c3_bkgd.pro

 PURPOSE:
     get fit coefficients of the strayligh edge on C3

 CATEGORY
     Pipeline, level1, straylight

 CALLING SEQUENCE:
     get_c3_bkgd, imain, xc, yc, profle, jpix, coef, ierr

 INPUTS:
     imain         file with a full image name (includes the path) per line
     xc            x coord. of occultor center
     yc            y coord. of occultor center

 OUTPUTS:
     profle        values of pylone profile
     jpix          abscisses of pylone profile
     coef          regression coefficients
     ierr          -1 for not square images of 1024x1024 or 512x512 or 256x256 pixels  

 RESTRICTIONS:
     Procedure appliable only to square images of 1024x1024 or 512x512 or 256x256 pixels

 KEYWORD OUPUTS:
     IPIXN
     JPIXN
     IPOS

 PROCEDURE:

 HISTORY:


GET_CACHE

[List of Routines] (See ./inout/get_cache.pro)

 Project     : SOHO - LASCO
                   
 Name        : GET_CACHE
               
 Purpose     : Implements caching of files in /tmp/idlpidxx. This speeds up processes which read 
		many files from the jukebox by cutting down on CD mounts.
               
 Use         : IDL> filename = GET_CACHE(j, list_of_filenames, pid)
    
 Inputs      : j	INT	A subscript of flist
		flist	STRARR	A list of filenames
               
 Outputs     : filename	STR	filename in /tmp corresponding to flist[j]
		idlpid		STR	output of getidlpid.pro
		optid		STR	Optional additional identifier if more than one list
					is being used.
                             
 Keywords    :  /ALL		Retrieve all files in list

 Explanation : Checks to see if file i in flist is in /tmp. If not, copies flist[j:j+25] 
		(or end of flist) to /tmp, and returns '/tmp/filename.fts' as the filename, 
		which then is used as input to readfits or whatever.
               
 Calls       : BREAK_FILE, SPAWN

 Category    : Data_Handling, I_O
               
 Prev. Hist. : None.

 Written     : Nathan Rich, NRL/Interferometrics, 2002/01/07.
               
 Modified    : 
	02.05.23, nbr - Use IDLPID to create subdir in /tmp; add IDL_SESSION common block
	02.05.31, nbr - Add optid


	10/02/02, @(#)get_cache.pro	1.4 LASCO IDL LIBRARY


GET_CAL_DARK

[List of Routines] (See ./reduce/get_cal_dark.pro)

 NAME:
	GET_CAL_DARK

 PURPOSE:
	This function obtains the dark field calibration structure
	applicable to the current date and telescope configuration

 CATEGORY:
	REDUCTION

 CALLING SEQUENCE:
	GET_CAL_DARK, Tel_num, Date, Obs_mode, Dark

 INPUTS:
	Tel_num 	The telescope number [0=C1,.., 3=EIT]
	Date 		The date of the image (format = DATE-OBS)
	Obs_mode 	The telescope configuration (DBMS parameter)

 OUTPUTS:
	Dark		The dark image calibration data structure
       Function result Gives the status of the search: 
	   		0 if the calibration file could not be found.
			1 if successful 

 COMMON BLOCKS
       DBMS, ludb,lulog

 SIDE EFFECTS
       An entry is written into a log file if the unit number exists

 MODIFICATION HISTORY:
     Written	RA Howard, NRL, 4 October 1995

       @(#)get_cal_dark.pro	1.1 04 Apr 1996 LASCO IDL LIBRARY


GET_CAL_PHOTOM

[List of Routines] (See ./reduce/get_cal_photom.pro)

 NAME:
	GET_CAL_PHOTOM

 PURPOSE:
	This function obtains the photometric calibration data structure
	applicable to the current date and telescope configuration

 CATEGORY:
	REDUCTION

 CALLING SEQUENCE:
	GET_CAL_PHOTOM, Tel_num, Date, Obs_mode, Photo

 INPUTS:
	Tel_num 	The telescope number [0=C1,.., 3=EIT]
	Date		The date of the image (format = DATE-OBS)
	Obs_mode 	The telescope configuration

 OUTPUTS:
	Photo		The photometric calibration data structure
	Function Result	Gives the status of the search
			0 if calibration file not found
			1 if file found

 COMMON BLOCKS:
	DBMS, ludb, lulog

 SIDE EFFECTS:
	An entry in the processing log is produced if lulog is defined

 PROCEDURE:
	GET_CAL_STRUCT is called to find the appropriate calibration file,
       which is an IDL save set. Then the data is restored and an entry
	is made in the processing log.

 MODIFICATION HISTORY:
	Written		RA Howard, NRL, 4 October 1995

       @(#)get_cal_photom.pro	1.1 04 Apr 1996 LASCO IDL LIBRARY


GET_CAL_STRAY

[List of Routines] (See ./reduce/get_cal_stray.pro)

 NAME:
	GET_CAL_STRAY

 PURPOSE:
	This function obtains the stray light data structure applicable to 
	the current date and telescope configuration

 CATEGORY:
	REDUCTION

 CALLING SEQUENCE:
	GET_CAL_STRAY, Tel_num, Date, Obs_mode

 INPUTS:
	Tel_num 	Telescope number [0=C1,.., 3=EIT]
	Date 		Date of the image (format = DATE-OBS)
	Dbs_mode 	Telescope configuration

 OUTPUTS:
	Stray 		Stray Light calibration structure
	Function Result The status of the query is returned as the 
			function result: 0 if cal file was not found
			and 1 if it was found.

 COMMON BLOCKS:
	DBMS, ludb, lulog

 SIDE EFFECTS:
	An entry is written to the log file if lulog in the common block is
	defined.

 PROCEDURE:
	GET_CAL_STRUCTURE is called to obtain the name of the appropriate
	calibration file.  Then the file (an IDL save set) is restored.

 MODIFICATION HISTORY:
     Written	RA Howard, NRL, 4 October 1995

       @(#)get_cal_stray.pro	1.1 04 Apr 1996 LASCO IDL LIBRARY


GET_CAL_STRUCT

[List of Routines] (See ./reduce/get_cal_struct.pro)

 NAME:
	GET_CAL_STRUCT

 PURPOSE:
	This function is a general purpose function procedure to first 
	read the date cal file, find the applicable calibration file, and 
	then return the calibration structure

 CATEGORY:
	REDUCTION

 CALLING SEQUENCE:
	GET_CAL_STRUCT, Type, Tel_num, Date, Obs_mode, Filename

 INPUTS:
	Type       	String containing type of calibration file
	Tel_num    	Telescope number (0..3)
	Date       	Date and Time of image to be calibrated (format=UTC/ECS)
	Obs_mode   	Observing Mode number

 OUTPUTS:
	Filename	Filename of calibration file
	Function Result	the status of the query
               	0 = Valid
               	1 = Invalid

 COMMON BLOCKS:
	DBMS, ludb, lulog

 PROCEDURE:
	The file whose file name is built from the calibration type
	is opened and read.  The file names are 
		photo_date_config.txt
		stray_date_config.txt
		dark_date_config.txt
		vig_date_config.txt
	These files have records in the following format:

	telescope_number, date_start,date_end, configuration, filename
	where:
		Telescope_number is the number from 0 to 3 for C1 to EIT
		Date_start is the starting valid date and time 
		End_start is the ending valid date and time 
		Filename is the name of the calibration file

 MODIFICATION HISTORY:
     Written		RA Howard, NRL, 4 October 1995

       @(#)get_cal_struct.pro	1.1 04 Apr 1996 LASCO IDL LIBRARY


GET_CAL_VIGNET

[List of Routines] (See ./reduce/get_cal_vignet.pro)

 NAME: 			GET_CAL_VIGNET

 PURPOSE:			Obtains the appropriate vignetting calibration
				file for the date and observing mode

 CATEGORY: 			REDUCTION

 CALLING SEQUENCE: 		Result = GET_CAL_VIGNET
					    (Tel_num,Date,Obs_mode,Vig)

 INPUTS:			Tel_num = Telescope Number (0..3)
				Date = Date of observation (format = UTC/ECS)
				Obs_mode = Telescope configuration

 OUTPUTS:			Vig = Vignetting calibration structure
				Result = status of operation 
					1=success
					0=failure

 COMMON BLOCKS:		DBMS

 SIDE EFFECTS:			A log entries are written to unit LULOG

 PROCEDURE:			The routine get_cal_struct is called to find
				the file name for the appropriate date and 
				configuration, and then the cal structure is 
				restored.

 MODIFICATION HISTORY: 	WRITTEN	     RA Howard, NRL, 4 October 1995
				Version 1    RAH  Initial Release

       @(#)get_cal_vignet.pro	1.1 04 Apr 1996 LASCO IDL LIBRARY


GET_CMDS

[List of Routines] (See ./packets/get_cmds.pro)

	extracts the commands from the housekeeping stream
	into a sequence:
	hk is an array containing all of the housekeeping packets

	word 
	0	obt byte 1
	1	obt byte 2
	2	obt byte 3
	3	obt byte 4
	4	obt byte 5
	5	obt byte 6
	6	good / bad flag (0=good, 1=bad)
	7	command counter
	8	command code
	9	command destination code
	10	command sequence number
	11	command error code

   modified for hk in bytes or words   20 mar 1996, RAH

 @(#)get_cmds.pro	1.1 01/23/98 :LASCO IDL LIBRARY


GET_CME_SUMMARY

[List of Routines] (See ./cme/get_cme_summary.pro)

 NAME:
	GET_CME_SUMMARY

 PURPOSE:
	This function defines the cme_summary data structure

 CATEGORY:
	CME

 CALLING SEQUENCE:
	GET_CME_SUMMARY

 OUTPUTS:
	This function returns an empty CME structure.

 COMMON BLOCKS:
	com_xplot_ht

 SIDE EFFECTS:
	Initiates the XMANAGER if it is not already running.

 RESTRICTIONS:

 MODIFICATION HISTORY:
 	Written by:	RA Howard, NRL 12 May 1997

 @(#)get_cme_summary.pro	1.1 05/14/97 :NRL Solar Physics


GET_CROTA

[List of Routines] (See ./reduce/get_crota.pro)

 Project     : SOHO - LASCO/EIT

 Name        : GET_CROTA

 Purpose     : Returns Nominal Roll Attitude of SOHO ( degrees )

 Use         : IDL>    result = GET_CROTA( DATE )

 Inputs      : DATE in format 2003/07/21 23:30:05.469

 Optional Inputs:

 Outputs     : Roll Attitude

 Keywords    :

 Comments    :
			# Nominal roll attitude of SOHO (degrees)
			#
			1995-12-02 03:08:00   0.00
			2003-07-08 13:00:00 180.00
	
		IDL[hercules]>print, GET_CROTA('2003-07-08 12:59:59')
		      0.00000
		IDL[hercules]>print, GET_CROTA('2003-07-08 13:00:00')
		      180.000

 Side effects:

 Category    :

 Written     : Jake Wendt, NRL, July 10, 2003

 Version     :	030722	jake	changed location of nominal_roll_attitude.dat
				030804, nbr - Add ANCIL_DATA, check only uncommented lines of file 


   08/04/03 @(#)get_crota.pro	1.7


GET_DAILY_LIST

[List of Routines] (See ./inout/get_daily_list.pro)

unction get_daily_list, cam, dte, QL=ql, FILTER=filter

 Purpose: Returns list of files for given tel fitting standard parameters

 Input: 
  dte:	'970502'
  cam:	'c2' or 'c3' or 'eit_195' or 'eit_284' or 'eit_171' or 'eit_304'

 KEYWORDS:
  QL:		Use quicklook and save in $MVIS/daily/; 
		otherwise use LZ and save in $MVIS/daily/yyyy_mm/
  FILTER:	Set = to unusual filter: so far, 'orange'

 Written by N. Rich, NRL, 2002/11/20
 @(#)get_daily_list.pro	1.1 11/22/02 : NRL LASCO Library


GET_DATA

[List of Routines] (See ./display/get_data.pro)

 Project     : SOHO - LASCO

 Name        : 

 Purpose     : 

 Category    : 

 Explanation : 

 Syntax      : 

 Examples    : 

 Inputs      : None

 Opt. Inputs : None

 Outputs     : None

 Opt. Outputs: None

 Keywords    : None

 Common      : 

 Restrictions:                                  

 Side effects: Not known

 History     : Version 1, 06-May-1996, B Podlipnik. Written

 Contact     : BP, borut@lasco1.mpae.gwdg.de


GET_DB_STRUCT

[List of Routines] (See ./database/get_db_struct.pro)

 Project     : SOHO - LASCO/EIT
                   
 Name        : GET_DB_STRUCT
               
 Purpose     : To retrieve a structure appropriate for a given database and table.
               
 Explanation : This routine searches through all structures of database table 
		definitions and returns the one matching the input parameters.
               
 Use         : IDL> s = GET_DB_STRUCT('db_name', 'table_name')
               ex. IDL> img_hdr = GET_DB_STRUCT('lasco', 'img_leb_hdr')
    
 Inputs      : db_name		;** Name of Sybase database containing table.
               tab_name	;** Name of DB table you wish to get the struct of.
               
 Outputs     : A structure containing tags of the appropriate type for all fields
		in the table or -1 if none found.
               
 Calls       : INIT_DB_STRUCT, DATATYPE

 Common      : COMMON DB_STRUCT_COMMON, all_db_struct 	;* Defined in INIT_DB_STRUCT
               
 Restrictions: None.
               
 Side effects: None.
               
 Category    : Database Administration
               
 Prev. Hist. : None.

 Written     : Scott Paswaters, NRL, November 1995.
               
 Modified    : 

 Version     : 


GET_EXP_FACTOR

[List of Routines] (See ./expfac/get_exp_factor.pro)

 NAME:
	GET_EXP_FACTOR

 PURPOSE:
	This function returns the exposure factor and bias for the 
	given image.

 CATEGORY:
	EXPFAC

 CALLING SEQUENCE:
	Result = GET_EXP_FACTOR (Hdr,Exp_factor,Exp_bias)

 INPUTS:
	Header:	Image header for which the factor and bias are wanted.

 OUTPUTS:
	Result:		0 for success, 
			-1 for file not found,
			-2 for time not found.
	Exp_factor:	The exposure correction factor. It should be 
			multiplied with the exposure time to get the 
			correct time.
	Exp_bias:	The offset bias that should be subtracted from the
			image.

 OPTIONAL OUTPUTS:
	Nreg:		Number of regions that particpated in the calculation.
	Exp_sig:	The standard deviation in the fit.

 KEYWORDS:
	FITS_HDR	STRARR = a FITS header, returned modified if set

 COMMON BLOCKS:
	EXP_FACTOR_ARRAY:	The exposure facotor information for a given 
			date.

 PROCEDURE:
	The date in the image header is tested to see if the exposure factor
	data in the common block are for that date.  If not, the data are 
	then read in to the common block using READ_EXP_FACTOR.  The data
	are searched for the time of the exposure.  If no time matches
	the exposure, then the factor is set to 1 and the standard bias from
	OFFSET_BIAS is used.

 MODIFICATION HISTORY:
 	Written by:	RA Howard, NRL, 21 September 1997
	6 Oct 1997	RAH, Split away from READ_EXP_FACTOR
	20 Feb 1998	RAH, Added the fits names to common
	19 Jul 2000	NBR - Allow FITS header input, and add HISTORY to FITS header
	 1 Aug 2000	NBR - Add FITS_HDR keyword
	 7 Aug 2000	NBR - Remove FITS_HDR keyword
	17 Sep 2002	NBR - Only use OFFSET_BIAS.pro if no expfactor; add filedate
			to common block and FITS header
	19 Sep 2002	NBR - Properly account for no expfac file found (2nd time through)
	 9 Jan 2003	NBR - Use fn instead of filenamenopath in header

 EXAMPLE:
	To obtain the exposure factor and bias information and then 
	convert the image counts to DN/sec:
		success = GET_EXP_FACTOR(hdr,expfac,bias)
		IF (success NE 0)  THEN BEGIN
			PRINT,'Exposure factor not found for image ',hdr.filename 
			PRINT,'Exposure factor is assumed to be 1.0'
               ENDIF
		img = (img-bias)/(hdr.exptime*expfac)
		
er= '@(#)get_exp_factor.pro	1.13 03/14/03' ;LASCO IDL LIBRARY


GET_IMG_CENTER

[List of Routines] (See ./data_anal/get_img_center.pro)

 NAME:
       GET_IMG_CENTER

 PURPOSE:
       This function returns the center of the image relative to the
	sun center in arc seconds.

 CATEGORY:
       LASCO_ANALYSIS

 CALLING SEQUENCE:
       Result = GET_IMG_CENTER (Hdr)

 INPUTS:
       Hdr:    A LASCO header structure for the image that the center is desired

 OPTIONAL INPUTS:
	Pixel:	If set the values are returned in pixels rather than arc seconds

 OUTPUTS:
       This function returns the image center as a two element array
       in which the first element is the azimuthal distance from sun
	center in arc seconds and the second element is the elevation
	distance from sun center.

 RESTRICTIONS:
       Returns the center for the readout port "C"

 PROCEDURE:
       Returns values that have been determined by other means and put
       into a table here.

 MODIFICATION HISTORY:LASCO_FITSHDR2STRUCT(hdr)
       Written by:     R.A. Howard, NRL, 11 Feb 1997
       Updated:

	@(#)get_img_center.pro	1.2 07/11/97 LASCO IDL LIBRARY


GET_LIST

[List of Routines] (See ./display/get_list.pro)

 NAME:
	GET_LIST

 PURPOSE:
	This procedure will return a list of images for selected day(s) from
       LASCO/EIT image tree (QL_IMG or LZ_IMG), create reduce image header
       catalog, query images on selected keywords and sort images on time.

 CATEGORY:
	LASCO DATA ANALYSIS

 CALLING SEQUENCE:
	GET_LIST

 INPUTS:

 KEYWORD PARAMETERS:
	INST:    A string for instrument: 'C1' is default.
       DAY:     A string array: day = ['960703','960704']
       ROWS:    An integer value for # of rows
       COLS:    An integer value for # of cols
       FILTER:  A string for the filter: filter = 'Fe XIV'
       POLAR:   A string for the polarizer
       WAVE:    A float array for the wavelength: wave = [5309.2] 
       QL_IMG:  Location of QuickLook images
       LZ_IMG:  Location of LZ images

 SIDE EFFECTS:
	

 PROCEDURE:
      

 EXAMPLE:

          list = GET_LIST(day='960704')
          list = GET_LIST(day=['960703','960704'],inst='C1',filter='Fe XIV',/wave)

 MODIFICATION HISTORY:
 	Written by:	B Podlipnik, 13 March 1997


	@(#)get_list.pro	1.1 11/02/01 LASCO IDL LIBRARY


GET_MISSING_PCKTS

[List of Routines] (See ./reduce/get_missing_pckts.pro)

 NAME:
	GET_MISSING_PCKTS

 PURPOSE:
	Searches index of REL/QKL files between times tai0 and tai1 (exclusive).
	If there are any packets in this interval, return them in
	'result'. Otherwise return 0.

 CATEGORY:
	LASCO PACKETS

 INPUTS:
	tai0	LONG	Tai time (seconds) of last packet before gap
	tai1	LONG	Tai time of first packet after gap
 
 Keywords:
	USE_CTR		If set, use packet counter instead of time to fill gap
			(necessary when LOBT clock is reset backwards). Set equal to
			[lastctr,ctr] (counter before and after gap)

 OUTPUTS:
       Result:  BYTARR(packet length, number of packets)

 SIDE EFFECTS:


 PROCEDURE:


 MODIFICATION HISTORY:
 	Written by:	N.B. Rich, Jan. 2000
	NBRich	Apr 2000 - Account for case where files(ind0-1) includes files(ind0);
			   Add USE_CTR keyword
	jake			-	changed /net/gorgon/gg3/ql/ to GETENV('QL_IMG')
	03.10.08, nbr - Changed input index.txt name/location

	10/08/03 @(#)get_missing_pckts.pro	1.5 LASCO IDL LIBRARY


GET_MISS_BLOCKS

[List of Routines] (See ./reduce/fuzzy/get_miss_blocks.pro)

 PROJET:
	SOHO - LASCO

 NAME:
	GET_MISS_BLOCKS

 PURPOSE:
	Finds all the missing blocks on an image

 PROCEDURE:
	Finds all the missing blocks on an image, and designs the corresponding
	"missing zones"; returns a map of the missing blocks where each
	missing block is then given the number of the missing zone it belongs
	A missing zone is defined as the smallest rectangle that surrounds a
	cluster of missing blocks (likely to be neighbor missing blocks) but
	has no missing blocks on its border (its outermost rows and columns)

	Call this routine before using a chain of correction, otherwise the
	location of all missing blocks would be lost after the 1st correction

 CATEGORY:
	Detection, Missing Blocks

 CALLING SEQUENCE:
	get_miss_blocks, image, map_miss_blocks
                        [ , list_miss_blocks, n_miss_blocks ]

 INPUTS:
	image			the image to make the map of

 OUTPUTS:
	map_miss_blocks		the map of the missing blocks, a 32x32 array
				Assume there are nz missing zones, then each
				element (i,j) on the map represents the state
				of the block at column i and row j :
				_ (-1) means it's a correct block
				_ A integer z (from 0 to nz-1) means this is a
				  missing block belonging to the "z"th zone
 OPTIONAL OUTPUT:
	list_miss_blocks	the total list of missing blocks, a 2 columns
				array, where each row (i,j) represents the
				location of a missing block
	n_miss_blocks		the total number of missing blocks

 KEYWORD INPUT:
	detector : C2 or C3 to get the non transmitted block mask (default:C2)
	rebindex : 0: 1024 * 1024, 1: 512 * 512, 2:256 * 256
	ALL:	Do not get block mask

 EXAMPLE:
	Given a image "image1" with missing blocks, get its map:
		get_miss_blocks, image1, map_b

	Print the list and the number of missing blocks :
		print, where2d(map_b ge 0, n_b)  &  print, n_b

	Get the number of missing zones, then for each missing zone print the
	blocks it contains :
		n_z = max(map_b)+1
		for z=0, n_z - 1 $
			print, where2d(map_b eq z)
	
 MODIFICATION HISTORY:
	Written by J.MORE, September 1996
	Modif 13/01/2000 A.T. add of detector and rebindex keyword
	1/24/01, nbr - extend zone to two blocks in each direction instead of one
	12/31/01, nbr - Add ALL keyword
	 4/10/03, nbr - Modify map_miss_blocks criteria


GET_MONEXP_DATA

[List of Routines] (See ./expfac/get_monexp_data.pro)

 NAME:
	GET_MONEXP_DATA

 PURPOSE:
	This function returns the monitor data of datatype = type 
	from the common block.

 CATEGORY:
	LASCO data analysis

 CALLING SEQUENCE:
	Result = GET_MONEXP_DATA(Type)

 INPUTS:
	Type:	The data type to be returned

 OUTPUTS:
	This function returns an array of the image statistics generated
	for the exposure time evaluation for the datatype specified as
	the input parameter.

 COMMON BLOCKS:
	MONEXP_DATA:  Contains the monexp data

 RESTRICTIONS:

 PROCEDURE:

 MODIFICATION HISTORY:
 	Written by:	RA Howard, 2 June 1997

	@(#)get_monexp_data.pro	1.6 11/20/97 LASCO IDL LIBRARY


GET_NEW_FILE_NUMBER

[List of Routines] (See ./reduce/get_new_file_number.pro)

 NAME:				GET_NEW_FILE_NUMBER

 PURPOSE:			Finds the last file number for the given
				telescope and source and increments it.

 CATEGORY:			REDUCTION

 CALLING SEQUENCE:		Result = GET_NEW_FILE_NUMBER(Tel, Source)

 INPUTS:			Tel  =  Telescope number (0..3)
				Source = 0 for GSFC R/T
					 1 for NRL R/T
					 2 for NRL Playback
					 7 for test

 OUTPUTS:			Result = Number to be used for file name 

 COMMON BLOCKS:		DBMS

 PROCEDURE:			An entry is recorded in the processing log
				when the file number is found.

 MODIFICATION HISTORY:		Written	RA Howard, NRL
				Version 1	Initial Release 31 Oct 1995
				Version 2  17 Jan 96 Added testing source
				Version 3  11 Feb 97 SEP Changed num to type LONG
				29 Aug 2000, nbr - Use $LAST_IMG instead of $IMAGES
				11 Oct 2000, nbr - Use $IMAGES if source=0

       @(#)get_new_file_number.pro	1.3 01/12/01 ; NRL LASCO IDL LIBRARY


GET_ORBIT_CDF

[List of Routines] (See ./astrometry/ephemeris/get_orbit_cdf.pro)

 Project     :	SOHO - LASCO

 Name        :	GET_ORBIT_CDF()

 Purpose     :	Get the SOHO orbit information.

 Category    :	Class3, Orbit

 Explanation :	Reads orbit information from either the definitive or
		predictive orbit file, whichever it can find first.

 Syntax      :	Result = GET_ORBIT_CDF( DATE  [, TYPE ] )

 Examples    :	

 Inputs      :	DATE	= The date/time value to get the orbit information for.
			  Can be in any SOHO/CDS time format.

 Opt. Inputs :	None.

 Outputs     :	The result of the function is a structure containing the
		spacecraft orbit information.  It contains the following tags.


		If unable to find this information, zeroes are returned
		instead.

 Opt. Outputs:	TYPE	= Returns whether predictive or definitive data was
			  used to calculate the result.  Returned as either
			  "Definitive" or "Predictive".  If the routine fails
			  to return an answer, then the null string is
			  returned.

 Keywords    :	RETAIN	= If set, then the orbit cdf file will be left open.
			  This speeds up subsequent reads.

		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 = GET_ORBIT( ERRMSG=ERRMSG, ... )
				IF ERRMSG NE '' THEN ...

 Calls       :	CONCAT_DIR, Various cdf handling routines.

 Common      :	Private common block GET_ORBIT_CDF is used to keep
 		track of the orbit file opened when the RETAIN keyword
 		is used. 

 Side effects:	None.

 Prev. Hist. :	Adapted from William Thompson's GET_ORBIT to read CDF
 		files rather than FITS.

 History     :	Written by Simon Plunkett, 27 March 1996.
		RAH, NRL, 18 Feb 97, mods to account for changes in CDF variables
		DW, NRL, 26 Aug 98, mod for change in predictive CDF filenames
		NBR, NRL, 29 Oct 01 - Rename soho_orbit structure definition to be 
				compatible with SSW


	@(#)get_orbit_cdf.pro	1.3 10/29/01 LASCO IDL LIBRARY


GET_ORBIT_CDF2

[List of Routines] (See ./astrometry/ephemeris/get_orbit_cdf2.pro)

 Project     :	SOHO - LASCO

 Name        :	GET_ORBIT_CDF2()

 Purpose     :	Get the SOHO orbit information.

 Category    :	Class3, Orbit

 Explanation :	Reads orbit information from either the definitive or
		predictive orbit file, whichever it can find first.

 Syntax      :	Result = GET_ORBIT_CDF2( DATE  [, TYPE ] )

 Examples    :	

 Inputs      :	DATE	= The date/time value to get the orbit information for.
			  Can be in any SOHO/CDS time format.

 Opt. Inputs :	None.

 Outputs     :	The result of the function is a structure containing the
		spacecraft orbit information.  It contains the following tags:

	GCI_POS:	Geocentric Inertial X,Y,Z (KM)
	GCI_VEL:	        "                 (KM/S)
	GSE_POS:	Geocentric Solar Ecliptic X,Y,Z (KM)
	GSE_VEL:	        "                       (KM/S)
	GSM_POS:	Geocentric Solar Magnetospheric X,Y,Z (KM)
	GSM_VEL:	        "                             (KM/S)
	SUN_VECTOR:	GCI Sun Vector X,Y,Z (KM)
	HEC_POS:	Heliocentric Ecliptic X,Y,Z (KM)
	HEC_VEL:	        "                   (KM/S)
	CRN:		CARRINGTON ROTATION from EARTH
	LONG_EARTH:	HELIOGRAPHIC LONG. EARTH (radians)
	LAT_EARTH:	HELIOGRAPHIC LAT. EARTH (radians)
	LONG_SPACE:	HELIOGRAPHIC LONG. SOHO (radians)
	LAT_SPACE:	HELIOGRAPHIC LAT. SOHO (radians)

  For more info see http://sohowww.nascom.nasa.gov/data/ancillary/index.html

		If unable to find this information, zeroes are returned
		instead.

 Opt. Outputs:	TYPE	= Returns whether predictive or definitive data was
			  used to calculate the result.  Returned as either
			  "Definitive" or "Predictive".  If the routine fails
			  to return an answer, then the null string is
			  returned.

 Keywords    :	RETAIN	= If set, then the orbit cdf file will be left open.
			  This speeds up subsequent reads.

		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 = GET_ORBIT( ERRMSG=ERRMSG, ... )
				IF ERRMSG NE '' THEN ...

 Calls       :	CONCAT_DIR, Various cdf handling routines.

 Common      :	Private common block GET_ORBIT_CDF is used to keep
 		track of the orbit file opened when the RETAIN keyword
 		is used. 

 Side effects:	None.

 Prev. Hist. :	Adapted from William Thompson's GET_ORBIT to read CDF
 		files rather than FITS.

 History     :	Written by Simon Plunkett, 27 March 1996.
		Adapted to read new CDF files (CRN_EARTH and CRN_SPACE
		tags replaced by single CRN tag). SPP, 7 August 1996.
		Mods to deal with: 1) differing file names on CDs and
		in GSFC archive and 2) to take account of changes in
		CRN definition in CDF files. 14 March 1997 (SPP).
	16 Nov 2000, nbr - Fix problems with using the RETAIN keyword
		and epoch array
	29 Oct 2001, nbr - Rename soho_orbit structure to make compatible
		with SSW

  10/29/01 @(#)get_orbit_cdf2.pro	1.4   LASCO NRL IDL LIBRARY


GET_ORBIT_FITS

[List of Routines] (See ./astrometry/ephemeris/get_orbit_fits.pro)

 Project     :	SOHO - CDS

 Name        :	GET_ORBIT_FITS()

 Purpose     :	Get the SOHO orbit information.

 Category    :	Class3, Orbit

 Explanation :	Reads orbit information from either the definitive or
		predictive orbit file, whichever it can find first.

 Syntax      :	Result = GET_ORBIT_FITS( DATE  [, TYPE ] )

 Examples    :	

 Inputs      :	DATE	= The date/time value to get the orbit information for.
			  Can be in any CDS time format.

 Opt. Inputs :	None.

 Outputs     :	The result of the function is a structure containing the
		spacecraft orbit information.  It contains the following tags.


		If unable to find this information, zeroes are returned
		instead.

 Opt. Outputs:	TYPE	= Returns whether predictive or definitive data was
			  used to calculate the result.  Returned as either
			  "Definitive" or "Predictive".  If the routine fails
			  to return an answer, then the null string is
			  returned.

 Keywords    :	RETAIN	= If set, then the orbit FITS file will be left open.
			  This speeds up subsequent reads.

		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 = GET_ORBIT_FITS( ERRMSG=ERRMSG, ... )
				IF ERRMSG NE '' THEN ...

		OLD	= If set, then files are read in from the subdirectory
			  "old_samples".  This is used to test the software
			  until real data files are available.

 Calls       :	CONCAT_DIR, FXBOPEN, FXBREAD

 Common      :	Private common block GET_ORBIT is used to keep track of the
		orbit file opened when the RETAIN keyword is used.

 Restrictions:	The orbit entries for the time closest to that requested is
		used to calculate the orbit parameters.  Since the orbit data
		is calculated every 10 minutes, this should be correct within
		+/-5 minutes.  No attempt is made to interpolate to closer
		accuracy than that.

 Side effects:	None.

 Prev. Hist. :	None.

 History     :	Version 1, 04-Dec-1995, William Thompson, GSFC
		Adapted from Bill Thompson's GET_ORBIT.
		Removed /DIR keyword from calls to CONCAT_DIR,
		7 August 1996 (SPP).
		Changed structure definition to SOHO_ORBIT_FITS to
		avoid clashes with structures from CDF files, 14 March
		1997 (SPP).

	011101, nbr - Add SCCS date /version stamp

 Contact     :	WTHOMPSON

 11/01/01 @(#)get_orbit_fits.pro	1.3	; LASCO NRL IDL Library


GET_PACKET_FNAMES

[List of Routines] (See ./packets/get_packet_fnames.pro)

 NAME:
	GET_PACKET_FNAMES

 PURPOSE:
	This function returns all of the packet file names for the specified date(s).

 CATEGORY:
	LASCO PACKETS

 CALLING SEQUENCE:
	Result = GET_PACKET_FNAMES ( Date )

 INPUTS:
	Date:	A string or array of strings specifying the date in the format YYMMDD

 OUTPUTS:
	This function returns a string array of file names for the specified dates.

 COMMON BLOCKS:
	None

 RESTRICTIONS:
	If the environment variable, TMPCKTS, is not defined then the current 
	working directory must be the directory where the files are located.

 PROCEDURE:
	The file names have a basic root structure for a given date and then have
	the hour at the end.  For example the SVM HK 1 packets for 1998/03/06 would 
	have the structure:
		SVMHK1980306_00  for hour 0
		SVMHK1980306_01  for hour 1
		SVMHK1980306_02  for hour 2
	and so on.
	This routine simply searches for all of the files of type SVMHK1980306*


 EXAMPLE:
		hk = GET_PACKET_FNAMES ('SVMHK1960306')

 MODIFICATION HISTORY:
 	Written by:	R.A. Howard, 1998
	Sep, 1998	Extracted from the versionof READALLSV1

 @(#)get_packet_fnames.pro	1.1 09/24/98 :LASCO IDL LIBRARY



GET_ROLL_OR_XY

[List of Routines] (See ./data_anal/get_roll_or_xy.pro)

 NAME:
       GET_ROLL_OR_XY

 PURPOSE:
       This function returns the roll angle  of solar north in radians 
       or the sun center position as a 2 element array
       {sun_center,xcen:xcen,ycen:ycen} (pixels).

       It uses C2 and C3 center and roll files created by star routines
       after adjusting header times using EIT/LASCO time-offsets. It should
       only be used with ql or lz level_05 data. For other telescopes, the
       roll, and center are set to but if a roll is requested and it is zero, 
       the SOHO roll is returned instead - as was the case in old version of
       get_roll_or_xy.

 CATEGORY:
       LASCO_ANALYSIS

 CALLING SEQUENCE:
       Result = GET_ROLL_OR_XY (Hdr, Roll_xy)

 INPUTS:
       Hdr:      A LASCO header structure
       Roll_xy: 'ROLL' :  return the roll angle
                'CENTER': return the sun center

 OUTPUTS:
       Roll angle in radians OR sun center {xcen,ycen} in pixels.

 OPTIONAL KEYWORD INPUTS:
       MEDIAN:  Not used - kept for compatability with previous version.
       STAR:    Not used - kept for compatability with previous version.
       AVG:     Not used - kept for compatability with previous version.
       SILENT:  Stop printing of warning and informational messages
       DEGREES: Return roll angle in degrees not radians

 OPTIONAL IO:
       source: On output, returns 
               'Data generated from SunDec files using EIT/LASCO adjusted time-offsets.'

 History:
 2005 January 05 - Ed Esfandiari  First version - based on adjust_hdr_tcr.
 2005 January 05 - Ed Esfandiari  Changed call to linterp to linear_interp.
 2005 April 12   - Karl Battams - Fixed problem with incompatible date formats


GET_SEC_PIXEL

[List of Routines] (See ./data_anal/get_sec_pixel.pro)

 NAME:
	GET_SEC_PIXEL

 PURPOSE:
	This function returns plate scale in arc seconds per pixel.

 CATEGORY:
	LASCO_ANALYSIS

 CALLING SEQUENCE:
	Result = GET_SEC_PIXEL (Hdr)

 INPUTS:
	Hdr:	A LASCO header structure

 OPTIONAL INPUTS:
       FULL=FULL:      If the image has been placed in a square field. Ex:
                   Result = GET_SEC_PIXEL (Hdr, FULL=1024)
                   Result = SEC_PIXEL (Hdr, FULL=512)

 OUTPUTS:
	arc seconds per pixel


 PROCEDURE:
	Returns values that have been determined by other means and put
	into a table here.

 MODIFICATION HISTORY:
 	Written by:	S.E. Paswaters, 30 August 1996
       Updated:
                       96/10/04  SEP  Changed FULL to allow different sizes.
			98/08/28  RAH  Mods for MLO/MK3
	99/08/05  NBR	Fixed FULL keyword to compute floating point factor
	00/01/14  DAB	Mods for MLO/MK4
	01/02/12  NBR	Mods for MK4 and elimination of sec_pix as array

	11/08/01 @(#)get_sec_pixel.pro	1.11 : LASCO IDL LIBRARY


GET_SOHO_EPHEM

[List of Routines] (See ./astrometry/ephemeris/get_soho_ephem.pro)

 Returns SOHO solar ephemeris info in SUNEPHEM structure:

   LONG            STRUCT    -> COORDINATE Array[1]
   LAT             STRUCT    -> COORDINATE Array[1]
   ORIENT          STRUCT    -> ORIENT Array[1]
   L0              DOUBLE           3.5500000
   B0              DOUBLE          -5.7100000
   ROTATION        LONG              1934
   CRSTART         DOUBLE           2450892.5
   DIAMETER        STRUCT    -> SUNDIAMETER Array[1]

 and planetary ephemeris info for 5 planets in PLANETEPHEM structures:

   NAME            STRING    'Mars'
   LONG            STRUCT    -> COORDINATE Array[1]
   LAT             STRUCT    -> COORDINATE Array[1]
   PHASE           DOUBLE           4.8000000
   ILLUM           DOUBLE          0.99823315
   DIAMETER        STRUCT    -> PLANDIAMETER Array[1]

 Uses predictive orbital CDF files from SOHO.

 INPUTS:
 t	STRING	date_obs+' '+time_obs

 OUTPUTS:
 sunephem	SUNEPHEM structure
 planephem	PLANETEPHEM structure (array of 5)

 By Nathan Rich/NRL/Interferometrics, Nov 2000
	011219, NR - Use (new) sohoephem.pro

 %H%, %W%	; LASCO NRL IDL Library


GET_SOLAR_RADIUS

[List of Routines] (See ./data_anal/get_solar_radius.pro)

 NAME:
       GET_SOLAR_RADIUS

 PURPOSE:
       This function returns the radius of the sun in arc seconds.

 CATEGORY:
       LASCO_ANALYSIS

 CALLING SEQUENCE:
       Result = GET_SOLAR_RADIUS (Hdr)

 INPUTS:
       Hdr:    A LASCO header structure

 KEYWORDS:
	PIXEL	Output result in pixels
	DISTANCE	Set equal to variable which will contain distance 
			to sun in km

 OUTPUTS:
       solar radius in arc seconds


 PROCEDURE:
	Determines the solar radius from the position of SOHO as
	defined in the *.cdf format files.

 MODIFICATION HISTORY:
       Written by:     D.A. Biesecker, 12 September 1996
	General routine taken from POINTING3.PRO written by S.P. Plunkett
       Modified 30 Sept. 1996 by DAB: return default values of the solar
        radius if calls to read the SOHO orbit files fail.
	RA Howard 5/20/97	Added keyword PIXEL to return solar radius in pixels
	NB Rich 8/25/98		Use detector instead of telescop to allow MVIHDR
	NB Rich 12/16/98	Use get_orbit_cdf2 instead of get_orbit_cdf
	NB Rich 11/13/01	Use solar_ephem instead of sohoephem if linux is OS
	NB Rich 07/15/03	Ditto for darwin (MaxOSX)
	NB Rich 04.03.29	Fix /pixel for linux case


	03/29/04 @(#)get_solar_radius.pro	1.12 - LASCO IDL LIBRARY


GET_SOLAR_ROLL

[List of Routines] (See ./data_anal/get_solar_roll.pro)

 NAME:
       GET_SOLAR_ROLL

 PURPOSE:
       This function returns the roll angle of solar north in radians.
       1. If /STAR keword is set, it returns the roll angle computed from
          the stars from the daily time files.
       2. If /MEDIAN keyword is set, it returns the running median
          roll angle from the daily time files.
       3. If /AVG keyword is set (or if no /STAR, /MEDIAN, or /AVG
          keyword is set), it returns the median average roll angle from 
          an average file.
       4. IF /STAR or /MEDIAN keyword is used but the daily time files
          do not contian the needed information, the average files will
          be used instead.

 CATEGORY:
       LASCO_ANALYSIS

 CALLING SEQUENCE:
       Result = GET_SOLAR_ROLL (Hdr)

 INPUTS:
       Hdr:    A LASCO header structure

 OPTIONAL KEYWORD INPUTS:
       MEDIAN: Return the running median roll angle from the daily time files.
                   Result = GET_SOLAR_ROLL (Hdr, /MEDIAN)
       STAR:   Return the roll angle computed from the stars from the daily
               time files.
                   Result = GET_SOLAR_ROLL (Hdr, /STAR)
       AVG:    Return the average roll angle for a period to which the image
               belongs from an average file. This is used as default if no
               MEDIAN, STAR, or AVG keyword is used.
                   Result = GET_SOLAR_ROLL (Hdr, /AVG) or
                   Result = GET_SOLAR_ROLL (Hdr)

 OUTPUTS:
       roll angle in radians

 CALLED PROGRAMS:
       GET_ROLL_OR_XY

 PROCEDURE:
	Determines the solar north roll angle from the time files or the
       average files.

 MODIFICATION HISTORY:
       Written by:     
       Updated:        98/10/06  AEE  Changed to use the c?_rollxy_yymmdd.dat
                                      files instead of returning 0.0 (it still
                                      returns zero if the file is not found
                                      or if found it does not contain info for
                                      the image) by calling get_roll_or_xy pro.
                       98/10/28  AEE  Added AVG keyword and made it default.
                       98/12/11  AEE  now returns the source used (STAR,MEDIAN,
                                      AVG,NONE) as a parameter. 

	@(#)get_solar_roll.pro	1.1 05/14/97 LASCO IDL LIBRARY


GET_SUN_CENTER[1]

[List of Routines] (See ./data_anal/get_sun_center.pro)

 NAME:
	GET_SUN_CENTER

 PURPOSE:
       This function returns a 2 element array of the column and row 
       numbers as the sun center.
       1. If /STAR keword is set, it returns the center computed from
          the stars from the daily time files.
       2. If /MEDIAN keyword is set, it returns the running median
          center from the daily time files.
       3. If /AVG keyword is set (or if no /STAR, /MEDIAN, or /AVG
          keyword is set), it returns the median average center from  
          an average file.
       4. IF /STAR or /MEDIAN keyword is used but the daily time files
          do not contian the needed information, the average files will
          be used instead. 
       5. If no time or average file contains the required sun center (get_
          roll_or_xy returns {0.0,0.0}), then the center of the occulting 
          disk is used instead. 
       The number, in time files, average files, and occulting disk starts
       at 0. The definition in the FITS header starts from 1.

 CATEGORY:
	LASCO_ANALYSIS

 CALLING SEQUENCE:
	Result = GET_SUN_CENTER (Hdr)

 INPUTS:
	Hdr:  A LASCO header structure for the image that the center is desired

 OPTIONAL INPUTS:
       MEDIAN: Return the running median sun center from the daily time files.
                   Result = GET_SUN_CENTER (Hdr, /MEDIAN)
       STAR:   Return the sun center computed from the stars from the daily
               time files.
                   Result = GET_SUN_CENTER (Hdr, /STAR)
       AVG:    Return the average sun center for a period to which the image 
               belongs from an average file. This is used as default if no 
               MEDIAN, STAR, or AVG keyword is used.
                   Result = GET_SUN_CENTER (Hdr, /AVG) or
                   Result = GET_SUN_CENTER (Hdr) 
	FULL=FULL:  If the image has been placed in a square field. Ex:
	       	    Result = GET_SUN_CENTER (Hdr, FULL=1024)
	       	    Result = GET_SUN_CENTER (Hdr, FULL=512)
       RAW:	If set, no corrections are applied 
       DOCHECK:	If set, corrected header is read in
       NOCHECK:	If set, input header is used

 OUTPUTS:
	This function returns the sun center as a two element array in which 
       the first element is the column center and the second element is the
       row center.

 OPTIONAL IO:
       source: On output, returns one of the following sources used to
               get the sun center: STAR, AVG, MEDIAN, OCC.


 CALLED PROGRAMS:
       GET_ROLL_OR_XY

 RESTRICTIONS:
	Returns the center for the readout port "C"

 PROCEDURE:
	Returns values that have been determined by other means and put
	into a table here.

 MODIFICATION HISTORY:
 	Written by:	S.E. Paswaters, 30 August 1996
 	Updated:
 	        	96/10/04  SEP  Changed FULL to allow different sizes.

     			97/01/08  SHH  Added correction for cropped images.
     			97/02/11  RAH  Added keyword to return raw center
     			97/12/16  SEP  updated check for EIT date_obs
     			98/08/24  RAH  added capability to handle MLO/MK3 images
     			98/08/26  DW   fixed problem 
                       98/10/06  AEE  Added code to use time files for getting
                                      the sun center, first. A returned center
                                      of {0.0,0.0} from get_roll_or_xy means 
                                      center info for the image was not in a
                                      time file and, so, occ_cen_arr is used,
                                      as before.
                       98/10/26  AEE  Added AVG keyword and made it default.
                                      It still uses occ_cen_arr if zero is 
                                      returned by get_roll_or_xy.
                       98/11/05  AEE  Corrected nocheck and added docheck
     			98/11/12  RAH  Changed MLO/MK3 cam to be MK3
                       98/11/13  AEE  Corrected docheck. Assign all of complete
                                      hdr to shdr.
                       98/12/01  AEE  changed call to read_occ_dat to
                                      occltr_cntr.
                       98/12/11  AEE  now returns the source used for sun
                                      center (STAR,MEDIAN,AVG,OCC) as an
                                      optional parameter.
	99/05/14  NBR	Change name of sun_cen stucture for MK3
	99/06/22  NBR	Make factor floating point for /FULL
	00/01/14  DAB	Added MK4 telescope
	01/01/08  NBR	Do not correct for subfield if keyword FULL is set
	04.04.01, nbr - add COMMON reduce_history

ersion= '@(#)get_sun_center.pro	1.26, 04/05/04' ; LASCO IDL LIBRARY




GET_SUN_CENTER[2]

[List of Routines] (See ./display/getsuncen.pro)

 NAME:
	GET_SUN_CENTER

 PURPOSE:
	This function returns the center of the occulting disk as a 2 
       element array of the column and row numbers.  The number starts
	at 0.  The definition in the FITS header is starting from 1.

 CATEGORY:
	LASCO_ANALYSIS

 CALLING SEQUENCE:
	Result = GET_SUN_CENTER (Hdr)

 INPUTS:
	Hdr:	A LASCO header structure for the image that the center is desired

 OPTIONAL INPUTS:
	FULL=FULL:	If the image has been placed in a square field. Ex:
	       	    Result = GET_SUN_CENTER (Hdr, FULL=1024)
	       	    Result = GET_SUN_CENTER (Hdr, FULL=512)
       RAW:	If set, no corrections are applied 

 OUTPUTS:
	This function returns the occulter center as a two element array
	in which the first element is the column center and the second
	element is the row center.

 RESTRICTIONS:
	Returns the center for the readout port "C"

 PROCEDURE:
	Returns values that have been determined by other means and put
	into a table here.

 MODIFICATION HISTORY:
 	Written by:	S.E. Paswaters, 30 August 1996
 	Updated:
 	        	96/10/04  SEP  Changed FULL to allow different sizes.

     			97/01/08  SHH  Added correction for cropped images.
     			97/02/11  RAH  Added keyword to return raw center

	@(#)getsuncen.pro	1.1 11/02/01 LASCO IDL LIBRARY


GET_SUN_CENTER[2]

[List of Routines] (See ./display/get_sun_cen.pro)

 NAME:
	GET_SUN_CENTER

 PURPOSE:
	This function returns the center of the occulting disk as a 2 
       element array of the column and row numbers.  The number starts
	at 0.  The definition in the FITS header is starting from 1.

 CATEGORY:
	LASCO_ANALYSIS

 CALLING SEQUENCE:
	Result = GET_SUN_CENTER (Hdr)

 INPUTS:
	Hdr:	A LASCO header structure for the image that the center is desired

 OPTIONAL INPUTS:
	FULL=FULL:	If the image has been placed in a square field. Ex:
	       	    Result = GET_SUN_CENTER (Hdr, FULL=1024)
	       	    Result = GET_SUN_CENTER (Hdr, FULL=512)
       RAW:	If set, no corrections are applied 

 OUTPUTS:
	This function returns the occulter center as a two element array
	in which the first element is the column center and the second
	element is the row center.

 RESTRICTIONS:
	Returns the center for the readout port "C"

 PROCEDURE:
	Returns values that have been determined by other means and put
	into a table here.

 MODIFICATION HISTORY:
 	Written by:	S.E. Paswaters, 30 August 1996
 	Updated:
 	        	96/10/04  SEP  Changed FULL to allow different sizes.

     			97/01/08  SHH  Added correction for cropped images.
     			97/02/11  RAH  Added keyword to return raw center

	@(#)get_sun_cen.pro	1.1 11/02/01 LASCO IDL LIBRARY


GET_TCE_COMM_ERRS

[List of Routines] (See ./packets/get_tce_comm_errs.pro)

	hk is an array containing all of the housekeeping packets

       Extracts TCE communication errors as reported in the HK stream
       into a sequence. These errors are in words 45-54 of packet #3.

       Note: since there is no sequence # associated with these errors
         there may actually be more errors than reported.  For example
         only the last 5 errors are reported.  So if there were more
         than 5 errors in between pckt 3 acquisitions we would only see
         the last 5.  Or if all 5 reported errors are the same, when
         we get a 6th of the same, we wouldn't be able to tell.

  OUTPUT:
	word 
	0	obt byte 1
	1	obt byte 2
	2	obt byte 3
	3	obt byte 4
	4	obt byte 5
	5	obt byte 6
	6	good / bad flag (0=good, 1=bad soho 2 = bad tce)
	7	command counter
	8	command code
	9	command destination code
	10	detected by
	11	command error code

   there are five slots for putting bad commands into
   if more than five bad commands are received with the same id
   then they cannot be distinguished from the first five.

   all 5 locations are cleared when good TC count rolls over 255

 @(#)get_tce_comm_errs.pro	1.1 01/23/98 :LASCO IDL LIBRARY


GET_TEL_CONFIG

[List of Routines] (See ./reduce/get_tel_config.pro)

 NAME:				GET_TEL_CONFIG

 PURPOSE:			Computes the telescope configuration number,
				given the telescope, the telescope mechanism 
				configuration, and the camera configuration in 
				the header

 CATEGORY:			REDUCTION

 CALLING SEQUENCE:		Result = GET_TEL_CONFIG(Tel_num,Fits_hdr)

 INPUTS:			Tel_num = Telescope number (0..3)
				Fits_hdr = String containing the FITS header

 OUTPUTS:			Result = Configuration number

 MODIFICATION HISTORY: 	WRITTEN RA Howard NRL 
				Version 1   RAH 20 Oct 1995  Initial Release
     				Version 2   RAH 6 Nov 1995  compute number 
						rather than use DBMS

       @(#)get_tel_config.pro	1.1 04 Apr 1996 LASCO IDL LIBRARY


GET_TMASK

[List of Routines] (See ./reduce/fuzzy/get_tmask.pro)

 PROJET
     SOHO - LASCO
 NAME:
     get_tmask
 PURPOSE:
     Classify blocks of image level 0.5
 CATEGORY:
	Masking, Missing Blocks
 CALLING SEQUENCE
     get_tmask,camera,rebin_index,imsk
 INPUTS
     camera       string 'C1','C2','C3'     
     rebin_index  0=1024x1024, 1=512x512, 2,256x256
 KEYWORD INPUTS:
     none
 OUTPUTS:

     imsk       intarray of 32x32, multivalued image mask of 
                -2 non useful blocks (NUB) on the corner
                -1 non useful blocks (NUB) on center
                1    useful blocks 
                2    fringe blocs
                3    NS center fringe blocs
                4    EW center fringe blocs
                note: 0 is reserved for non transmitted useful blocks
 PROCEDURE:


 HISTORY:
    written by A.LL. May 1996


GET_TM_IMG

[List of Routines] (See ./packets/get_tm_img.pro)


	searches sciences packets for the next occurrence of an image

	sc = 2D array containing the science packets
		the array should contain only data packets when the OBE
		is running.  ie no packets when the instrument is off,
		and 'ffff'xl are being transmitted.
	pktno = packet number to start the search
		on exit, it will contain the packet number of the header
	hdr = image header returned
	img = image returned
	npckt = number of packets in image
	the function return is =0 if no image is found
			       =1 if an image is found

 @(#)get_tm_img.pro	1.1 01/23/98 :LASCO IDL LIBRARY


GET_TM_MONITOR

[List of Routines] (See ./packets/get_tm_monitor.pro)

 NAME:
	GET_TM_MONITOR

 PURPOSE:
	This function returns an array of TM values, associated with a
	specified lasco monitor.

 CATEGORY:
	PACKETS

 CALLING SEQUENCE:
	Result = GET_TM_MONITOR (Hk,Name)

 INPUTS:
	Hk:	A 2D byte array containing all three LASCO HK TM packets
	Name:	A string containing the name of the monitor point

 KEYWORD PARAMETERS:
	CONVERT:	If set the raw TM values will be converted to 
			engineering units.

 OUTPUTS:
	This function returns a 1D array containing the TM values.

 COMMON BLOCKS:
	TM_MON_DB	Contains the TM Monitor data base
		mon_name	Monitor Name
		mon_offset	Monitor Packet offset #1
		mon_mask1	Monitor Mask #1
		mon_offset2	Monitor Packet offset #2
		mon_mask2	Monitor Mask #2
		mon_title	Monitor Title
		mon_packet	Monitor Packet Name

 SIDE EFFECTS:
	If the monitor DB has not been defined, the data base is read from disk

 PROCEDURE:
	This routine is not operational yet. 

 EXAMPLE:

 MODIFICATION HISTORY:
 	Written by:	R.A. Howard, NRL, 1995


	@(#)get_tm_monitor.pro	1.1 01/23/98 LASCO IDL LIBRARY


GHANDLE

[List of Routines] (See ./display/ghandle.pro)

 Project     : SOHO - LASCO

 Name        : 

 Purpose     : 

 Category    : 

 Explanation : 

 Syntax      : 

 Examples    : 

 Inputs      : None

 Opt. Inputs : None

 Outputs     : None

 Opt. Outputs: None

 Keywords    : None

 Common      : 

 Restrictions:                                  

 Side effects: Not known

 History     : Version 1, 02-Sep-1995, B Podlipnik. Written

 Contact     : BP, borut@lasco1.mpae.gwdg.de


GIF2JPG24

[List of Routines] (See ./movie/gif2jpg24.pro)

 NAME:
	GIF2JPG24

 PURPOSE:
	Change GIF format to 24 bit color JPEG

 CATEGORY:
	Image Processing

 CALLING SEQUENCE:

	GIF2JPG24, Gif_image,R,G,B,Jpg_image, JSIZE=[naxis1,naxis2]

 
 INPUTS:
        Gif_image 
        R           red color table
        G           green color table
        B           blue color table

 OPTIONAL INPUTS:
	
 KEYWORD PARAMETERS:
	JSIZE	ARRAY(2)	[horiz,vert] size of output image

 OUTPUTS:
        Jpg_image   byte array (JSIZE(0),JSIZE(1),3) in 24 bit color with color info in 3rd dim

 OPTIONAL OUTPUTS:

 COMMON BLOCKS:

 SIDE EFFECTS:

 RESTRICTIONS:

 PROCEDURE:

 EXAMPLE:
 	To change a GIF to a 1024x1024 JPEG

	GIF2JPG24, Gif_image,R,G,B,Jpg_image,JSIZE=[1024,1024]

 MODIFICATION HISTORY:
 	Written by:	Dennis Wang, 18 Mar 1999
	99/07/12  N. Rich	Make jsize_x & _y optional keyword JSIZE
	01/09/13  N. Rich	Add messages

	@(#)gif2jpg24.pro	1.3 09/13/01 LASCO IDL LIBRARY


GIFDIR2JPG24

[List of Routines] (See ./movie/gifdir2jpg24.pro)

 NAME:
	GIFDIR2JPG24

 PURPOSE:
 	Converts all the GIFS in gif_dir to 24 bit JPEGs in another directory 

 CATEGORY:
	Image Processing.

 CALLING SEQUENCE:

		GIFDIR2JPG24,Gif_dir,Jpg_dir,Jsize_x,Jsize_y

 INPUTS:
 	 	Gif_dir
         	Jpg_dir
		Jsize_x		horz size for JPEGS
		Jsize_y         vert size for JPEGS

 OPTIONAL INPUTS:
	
 KEYWORD PARAMETERS:

 OUTPUTS:
	Output directory contains a 24 bit color JPEG for each GIF in the input directory

 OPTIONAL OUTPUTS:

 COMMON BLOCKS:

 SIDE EFFECTS:

 RESTRICTIONS:

 PROCEDURE:

 EXAMPLE:

		GIFDIR2JPG24,'./gifs','./jpg24',1024,1024

 MODIFICATION HISTORY:
 	Written by:	Dennis Wang, 18 Mar 1999

	@(#)gifdir2jpg24.pro	1.1 03/19/99 LASCO IDL LIBRARY


GIFS2DIFS

[List of Routines] (See ./movie/gifs2difs.pro)

 Project     : SOHO - LASCO/EIT

 Name        : GIFS2DIFS

 Purpose     : Make Diff Gifs from GIFS

 Use         : IDL> GIFS2DIFS, absoluteinputdir, absoluteoutputdir

 Inputs      : inputdir

 Optional Inputs: None

 Outputs     : GIF, JPG, MPG files

 Keywords    :

 Comments    :	Assumes name of gifs to be YYYYMMDD_HHMM_CAMERA.gif

 Side effects:

 Category    : Image Display.  Animation.

 Written     : Jake Wendt, NRL, February 2002

 Version     : 020508 Jake minor changes
				030715	jake	added PNG capability

 %H% %W% :LASCO IDL LIBRARY


GIFS2MPEG

[List of Routines] (See ./movie/gifs2mpeg.pro)

 Project     : SOHO - LASCO/EIT

 Name        : GIFS2MPEG

 Purpose     : Make MPEG or Animated Gifs from Gifs

 Use         : GIFS2MPEG, mpegFileName, gif_match, gifdir, WHIRLGIF=WHIRLGIF, $
		SCALE=scale, REFERENCE=reference, $
		MPEG_DIR=mpeg_dir

 Inputs      : mpegFileName - Name of output file
               gif_match - string (wildcards allowed) used to find input GIF file
               gifdir - directory to search for input GIF files (string)

 Optional Inputs:

 Outputs     :

 Keywords    :  WHIRLGIF - Make Animated GIF using WHIRLGIF
                SCALE -
		 REFERENCE - 
                MPEG_DIR - Name of directory to put MPEG file; default is gifdir
		NFRAMES - set named variable to number of frames used (output)


 Comments    :

 Side effects:

 Category    : Image Display.  Animation.

 Modified:
	990316  NBR	Change whirlgif options to loop indefinitely
	990521 NBr	Change paramfile INPUT
	020204	Jake	Added /SH to all SPAWN
	020225, nbr - Change how files are selected and INPUT_DIR in idl2mpeg.params
       030408 DW	Comments added
	030617, nbr - Make it unnecessary to have write permission in gifdir
	030709, nbr - Fix problem from previous mod
	030715	jake	added PNG keyword
	031010, nbr - Add NFRAMES keyword

 Version     :

 @(#)gifs2mpeg.pro	1.8 10/10/03 :LASCO IDL LIBRARY


GRAD

[List of Routines] (See ./reduce/fuzzy/hcie_zone.pro)

 NAME:
       GRAD

 PURPOSE:
       Designs a "gradient map", i.e. a image made with parallel lines, all of
       them perpendicular to a given gradient direction

 CALLING SEQUENCE:
       g = grad (xsize, ysize, theta)

 INPUTS:
       xsize, ysize    the size of the map image
       theta           the angle of the gradient vector (versus the (Ox) axis)
                       expressed in radians; the parallel lines are thus
                       along the direction theta+pi/2

 OUTPUTS:
       the (xsize) x (ysize) array where the value of each point is equal to
       the distance beetween the line perpendicular to the gradient that pass
       through this point and the origin.
       The origin (just as for the dist function) is located at 1 of the 4
       corner of the image,  depending on the value of theta :
       _ for theta in [0, pi/2],      the origin = (0, 0)
       - for theta in [pi/2, pi],     the origin = (xsize-1, 0)
       _ for theta in [pi, 3.pi/2],   the origin = (xsize-1, ysize-1)
       - for theta in [3.pi/2, 2.pi], the origin = (0, ysize-1)


GRAD_ZONE

[List of Routines] (See ./reduce/fuzzy/grad_zone.pro)

 NAME:
	GRAD_ZONE

 PURPOSE:
	Returns the main gradient orientation of a zone containing MB

 CATEGORY:
	Missing Blocks

 CALLING SEQUENCE:
	angle = grad_zone (image, list_miss_blocks)

 INPUTS:
	image			the image containing missing blocks
	list_miss_blocks	the missing blocks defining the zone

 KEYWORD INPUT:
	rebindex : rebin index (see fuzzy_image.pro)

 OUTPUTS:
	The angle of the gradient vector

 MODIFICATION HISTORY:
	Written by J. More, November 1996
	Add of rebindex keyword on 28/01/2000 by A.Thernisien


H4S

[List of Routines] (See ./display/h4s.pro)

 Project     : SOHO - LASCO

 Name        : 

 Purpose     : 

 Category    : 

 Explanation : 

 Syntax      : 

 Examples    : 

 Inputs      : None

 Opt. Inputs : None

 Outputs     : None

 Opt. Outputs: None

 Keywords    : None

 Common      : 

 Restrictions:                                  

 Side effects: Not known

 History     : Version 1, 02-Sep-1995, B Podlipnik. Written

 Contact     : BP, borut@lasco1.mpae.gwdg.de


HCIE_ZONE[1]

[List of Routines] (See ./reduce/fuzzy/hcie_zone.pro)

       hcie_zone.pro  contains the following sub-routines :

       _ grad                  designs a image made with parallel lines, all
				of them perpendicular to a given direction
       _ multi_interp		perform a multiple 1D interpolation of an image
				along a set of parallel lines
       _ multi_smooth		perform a multiple 1D smoothing of an image
				along a set of parallel lines
       _ HCIE_ZONE             performs a H.C.I.E. (Hierarchical Compass
         (=main routine)       Interpolation/Extrapolation), i.e. a low-pass
                               recovery, on a set of missing block (defining
				a missing zone)


HCIE_ZONE[2]

[List of Routines] (See ./reduce/fuzzy/hcie_zone.pro)

 PROJET:
       SOHO - LASCO

 NAME:
	HCIE_ZONE

 PURPOSE:
       Performs the Hierarchical Compass Interpolation / Extrapolation
       (H.C.I.E.), which is a low-frequency recovery of a lost block

 CATEGORY:
	Missing Blocks

 CALLING SEQUENCE:
       zone = hcie_zone (image, list_miss_blocks)

 INPUTS:
       image           	the image containing the block to correct
       list_miss_blocks	the locations of the missing blocks defining
				the zone
 KEYWORD INPUT:
	rebindex : rebin index (see fuzzy_image.pro)

 OUTPUTS:
       The corrected zone (array of pixels) is returned

 REFERENCE:
       ( see fuzzy_image.pro )

 MODIFICATION HISTORY:
	from the wonderful Dr. M.BOUT (c) 1996
       Written by J. MORE, November 1996
	Add of rebindex keyword on 28/01/2000 by A.Thernisien
	Modif line 219 on 11/02/2000 by A.T. to avoid crash when there are not enough sample for interpolation


HEADFITSL

[List of Routines] (See ./display/headfitsl.pro)

 Project     :	SOHO - CDS

 Name        :	HEADFITS()

 Purpose     :	Read a FITS file header record      

 Category    :

 Explanation :	Reads a FITS file header record.

 Syntax      :	Result = headfits( filename ,[ EXTEN = ])

 Example     :	Read the FITS header of a file 'test.fits' into a
		string variable, h

			IDL>  h = headfits( 'test.fits')

 Inputs      :	FILENAME = String containing the name of the FITS file to be
			   read.

 Opt. Inputs :	None.

 Outputs     :	Result of function = FITS header, string array

 Opt. Outputs:	None.

 Keywords    :	EXTEN  = integer scalar, specifying which FITS extension to
			 read.  For example, to read the header of the first
			 extension set EXTEN = 1.  Default is to read the
			 primary FITS header (EXTEN = 0).

 Common      :	None.

 Restrictions:	None.

 Side effects:	None.

 History     :	
	adapted by Frank Varosi from READFITS by Jim Wofford, January, 24 1989
	Keyword EXTEN added, K.Venkatakrishna, May 1992
	Make sure first 8 characters are 'SIMPLE'  W. Landsman October 1993

       GSFC, 24 January 1989, Frank Varosi, Written

       Modified Version 1, Liyun Wang, GSFC/ARC, September 19, 1994
			Incorporated into CDS library
		Version 2, William Thompson, GSFC/ARC, 9 January 1995
			Incorporated following change:

	Check PCOUNT and GCOUNT   W. Landsman    December 1994

 Contact     :


HIST_XY

[List of Routines] (See ./display/hist_xy.pro)

 Project     : SOHO - LASCO

 Name        : 

 Purpose     : 

 Category    : 

 Explanation : 

 Syntax      : 

 Examples    : 

 Inputs      : None

 Opt. Inputs : None

 Outputs     : None

 Opt. Outputs: None

 Keywords    : None

 Common      : 

 Restrictions:                                  

 Side effects: Not known

 History     : Version 1, 02-Sep-1995, B Podlipnik. Written

 Contact     : BP, borut@lasco1.mpae.gwdg.de


HT_HEADER

[List of Routines] (See ./movie/ht_header.pro)

 NAME:
	HT_HEADER

 PURPOSE:
	This procedure writes out the header information for a height-time
	file.  It is used by the movie program and is not intended to be
	used in a standalone fashion.

 CATEGORY:
	MOVIE

 CALLING SEQUENCE:
	HT_HEADER,Moviev

 INPUTS:
	Moviev:	Structure containing the movie header information

 SIDE EFFECTS:
	Creates a height-time file and prints out the preamble

 MODIFICATION HISTORY:
 	Written by:	Scott Hawley, NRL summer student, July 1996

	@(#)ht_header.pro	1.1 09/12/97 LASCO IDL LIBRARY


IMAGE_PLOT

[List of Routines] (See ./data_anal/image_plot.pro)

Name:
       IMAGE_PLOT

Purpose:
    generates standard plots for image analysis

Usage:
       IMAGE_PLOT,A,Hdr

Inputs:
       A   = image
       Hdr = FITS header


IMCALC

[List of Routines] (See ./display/imcalc.pro)

 Project     : SOHO - LASCO

 Name        : 

 Purpose     : 

 Category    : 

 Explanation : 

 Syntax      : 

 Examples    : 

 Inputs      : None

 Opt. Inputs : None

 Outputs     : None

 Opt. Outputs: None

 Keywords    : None

 Common      : 

 Restrictions:                                  

 Side effects: Not known

 History     : Version 1, 02-Sep-1995, B Podlipnik. Written

 Contact     : BP, borut@lasco1.mpae.gwdg.de


IMG2DNPERSEC

[List of Routines] (See ./util/img2dnpersec.pro)

 NAME:
	IMG2DNPERSEC

 PURPOSE:
	Convert an image in raw counts (DN) to DN/sec

 CATEGORY:
	DATA_ANAL

 CALLING SEQUENCE:
	Result = IMG2DNPERSEC(Img,Header)

 INPUTS:
	Img = Input Image array.
	Header = Image header

 OUTPUTS:
	The function returns an image converted to DN/second.  The type will be 
	double precision.

 PROCEDURE:
	The corrected exposure time is determined. Bias is subtracted. 
	If image is binned, the correct factor is applied. Then divide by exposre time.
		output = (binning correction(input - bias))/exposure
	Note that EXP_CORR will return the old exposure time and the current offset 
	bias, if the correction factor is not found.

	Calls:
		EXP_CORR
		REDUCE_STD_SIZE

 MODIFICATION HISTORY:
	Written, RA Howard, NRL, 25 November 1997
	Modified:
		20 Feb 98	RAH	Added exposure factor correction
	21 Nov 01, NBR - Add binning correction with REDUCE_STD_SIZE

       @(#)img2dnpersec.pro	1.3 11/30/01     LASCO IDL LIBRARY


IMG_ADD

[List of Routines] (See ./data_anal/img_add.pro)

 NAME: 
                       IMG_ADD 
 
 PURPOSE: 
                       This function routine performs a weighted sum 
                       of two images, in which the weights are the 
                       same.  This would be used as a check of the 
                       procedure, since it is easier to just add  
                       the two arrays together. 
 
 CATEGORY: 
                       ANALYSIS 
 
 CALLING SEQUENCE: 
                       Result = IMG_ADD (Img1,Img2) 
 
 INPUTS: 
                       Img1:   Array containing image #1 
                       Img2:   Array containing image #2  
 
 OPTIONAL INPUTS: 
        
 KEYWORD PARAMETERS: 
 
 OUTPUTS: 
                       Result: The sum of the two input images if 
                                       the operation is successful or -1 
                                       if it is not. 
 
 OPTIONAL OUTPUTS: 
 
 COMMON BLOCKS: 
                       None 
 
 SIDE EFFECTS: 
                       None 
 
 RESTRICTIONS: 
                       The size of both arrays must be the same or  
                       the routine will exit and set result to be  
                       -1. 
 
 PROCEDURE: 
                       The two weighting functions are set to unity. 
                       Then the routine, IMG_WT_SUM, is called. 
 
 EXAMPLE: 
 
 MODIFICATION HISTORY: 
       Written by:     RA Howard, NRL, 27 November 1995 
 
	@(#)img_add.pro	1.1 10/04/96 LASCO IDL LIBRARY


IMG_COMP_DIST

[List of Routines] (See ./data_anal/img_comp_dist.pro)

 NAME: 
                       IMG_COMP_DIST 
 
 PURPOSE: 
                       This function routine creates a composite  
                       image from two images based on two radial  
                       distances.   For radii less than R1, the  
                       values from image #1 are used.  For radii  
                       greater than R2, the values from image  #2  
                       are used.  For radii between R1 and R2, the  
                       values fade linearly from image #1 to #2. 
 
 CATEGORY: 
                       ANALYSIS 
 
 CALLING SEQUENCE: 
                       Result = IMG_COMP_DIST (Img1,Img2,Sun,R1,R2) 
 
 INPUTS: 
                       Img1:   Array containing image #1 
                       Img2:   Array containing image #2 
                       Sun:            A four element array containing the  
                                       solar coordinates: 
                                       Column of the center of the sun 
                                       Row of the center of the sun 
                                       Roll angle to solar north 
                                       Plate scale in arc secs per pixel 
                       R1:             Radius specifying the outer  
                                       boundary of only Img1  
                       R2:             Radius specifying the inner 
                                       boundary of only Img2 
 
 OPTIONAL INPUTS: 
                       None 
        
 KEYWORD PARAMETERS: 
                       None 
 
 OUTPUTS: 
                       Result: The composite of the two input  
                                       images if the operation is  
                                       successful or -1 if it is not. 
 
 OPTIONAL OUTPUTS: 
                       None 
 
 COMMON BLOCKS: 
                       None 
 
 SIDE EFFECTS: 
                       None 
 
 RESTRICTIONS: 
                       The plate scale and sun center must be the 
                       same for the two images prior to entering the  
                       routine. 
                       The size of both arrays must be the same or  
                       the routine will exit and set result to be  
                       -1. 
 
 PROCEDURE: 
                       The procedure, SUNDIST, is called to compute  
                       the distance matrix from sun center. 
                       The two weighting functions are computed. 
                       Then the routine, IMG_WT_SUM, is called. 
 
 EXAMPLE: 
 
 MODIFICATION HISTORY: 
       Written by:     RA Howard, NRL, 27 November 1995 
 
	@(#)img_comp_dist.pro	1.1 10/04/96 LASCO IDL LIBRARY


IMG_COMP_INT

[List of Routines] (See ./data_anal/img_comp_int.pro)

 NAME: 
                       IMG_COMP_INT 
 
 PURPOSE: 
                       This function routine creates a composite  
                       image from two images, based on intensity  
                       values.  For intensities less than Int1, 
                       the values from image #1 are used.  For  
                       intensities greater than Int2, the values  
                       from image #2 are used.  For intensities  
                       between Int1 and Int2, the values from both 
                       images are added together. 
 
 CATEGORY: 
                       ANALYSIS 
 
 CALLING SEQUENCE: 
                       Result = IMG_COMP_INT (Img1,Img2,Int1,Int2) 
 
 INPUTS: 
                       Img1:   Array containing image #1 
                       Img2:   Array containing image #2 
                       Int1:   Intensity specifying the upper  
                                       limit for using only Img1  
                       Int2:   Intensity specifying the lower 
                                       limit for using only Img2 
 
 OPTIONAL INPUTS: 
                       None 
        
 KEYWORD PARAMETERS: 
                       None 
 
 OUTPUTS: 
                       Result: The composite of the two input  
                                       images if the operation is  
                                       successful or -1 if it is not. 
 
 OPTIONAL OUTPUTS: 
                       None 
 
 COMMON BLOCKS: 
                       None 
 
 SIDE EFFECTS: 
                       None 
 
 RESTRICTIONS: 
                       The plate scale and sun center must be the 
                       same for the two images prior to entering the  
                       routine. 
                       The size of both arrays must be the same or  
                       the routine will exit and set result to be  
                       -1. 
 
 PROCEDURE: 
                       The two weighting functions are computed 
                       to form the composite image based on the 
                       intensity values of the two images. 
                       Range           Value 
                       0-Int1          3*Img1+1*Img1 
                       Int1-Int2               3*Img1+3*Img2 
                       Int2-Max                1*Img1+3*Img2 
                       Then the routine, IMG_WT_SUM, is called. 
 
 EXAMPLE: 
 
 MODIFICATION HISTORY: 
       Written by:     RA Howard, NRL, 27 November 1995 
 
	@(#)img_comp_int.pro	1.1 10/04/96 LASCO IDL LIBRARY


IMG_DIF_MIN

[List of Routines] (See ./util/img_dif_min.pro)

 NAME:
	IMG_DIF_MIN

 PURPOSE:
	This function returns the non-zero minimum of the two images. 

 CATEGORY:
	UTILITY

 CALLING SEQUENCE:
	Result = IMG_DIF_MIN (Imga,Imgb)

 INPUTS:
	Imga:	First image
	Imgb:	Second image

 OPTIONAL INPUTS:
	None

 KEYWORD PARAMETERS:
	None

 OUTPUTS:
	None.

 SIDE EFFECTS:
	Writes a fits file to $MONTHLY_IMAGES.

 RESTRICTIONS:
	Images must be the same size and non-negative.

 PROCEDURE:
	The images are checked to be the same size.  Zero values are
	checked for.

 EXAMPLE:
	To create the minimum image between image A and B:

		c = IMG_DIF_MIN(a,b)

 MODIFICATION HISTORY:
 	Written by:	R.A. Howard, NRL, 6/8/00


 @(#)img_dif_min.pro	1.1 06/10/00 :LASCO IDL LIBRARY


IMG_SUM_2X2

[List of Routines] (See ./data_anal/img_sum_2x2.pro)

 NAME:
	IMG_SUM_2X2

 PURPOSE:
	This function does a rebinning into an array that is 1/2 the size of
	the original image in each axis, by summing 2x2 pixels.  This increases
	signal to noise.  

 CATEGORY:
	LASCO ANALYSIS

 CALLING SEQUENCE:
	Result = IMG_SUM_2X2 ( Img )

 INPUTS:
	Img:	Input image, can be any type other than string

 OPTIONAL INPUTS:
	None
	
 OUTPUTS:
	This function returns an image which is the result of the 2x2 pixel summing.

 RESTRICTIONS:
	Forces the input array to have an even number of rows and columns.

 PROCEDURE:
	Generates the indices of the 2x2 pixels and forms the summing explicitly from
	these indices.

 MODIFICATION HISTORY:
 	Written by:	RA Howard, 12 March 1996.

	@(#)img_sum_2x2.pro	1.1 10/04/96 LASCO IDL LIBRARY


IMG_WT_SUM

[List of Routines] (See ./data_anal/img_wt_sum.pro)

 NAME: 
                       IMG_WT_SUM 
 
 PURPOSE: 
                       This function routine performs a weighted sum 
                       of two images. 
 
 CATEGORY: 
                       ANALYSIS 
 
 CALLING SEQUENCE: 
                       Result = IMG_WT_SUM (Img1,Wt1,Img2,Wt2) 
 
 INPUTS: 
                       Img1:   Array containing image #1 
                       Wt1:            Array containing the weights for 
                                       image #1 
                       Img2:   Array containing image #2  
                       Wt2:            Array containing the weights for 
                                       image #2 
 
 OPTIONAL INPUTS: 
        
 KEYWORD PARAMETERS: 
 
 OUTPUTS: 
                       Result: The sum of the two input images if 
                                       the operation is successful or -1 
                                       if it is not. 
 
 OPTIONAL OUTPUTS: 
 
 COMMON BLOCKS: 
                       None 
 
 SIDE EFFECTS: 
                       None 
 
 RESTRICTIONS: 
                       The size of all of the arrays must be the 
                       same or the routine will exit and set result 
                       to be -1. 
 
 PROCEDURE: 
                       The size of the arrays is verified to be the  
                       same. 
                       The weights are set to zero where the image  
                       values are zero. 
                       The normalizing factor is computed and set to  
                       1 where the factor is 0. 
                       Then the routine forms the weighted sum. 
  
 EXAMPLE: 
 
 MODIFICATION HISTORY: 
       Written by:     RA Howard, NRL, 27 November 1995 
 
	@(#)img_wt_sum.pro	1.1 10/04/96 LASCO IDL LIBRARY


INIT_DB_STRUCT

[List of Routines] (See ./database/init_db_struct.pro)

 Project     : SOHO - LASCO/EIT
                   
 Name        : INIT_DB_STRUCT
               
 Purpose     : To initialize DB table structures from include files.
               
 Explanation : This routine initializes DB table structures from all include
		files and creates a master structure containing them all.
               
 Use         : IDL> INIT_DB_STRUCT
    
 Inputs      : None.
               
 Outputs     : None.
               
 Calls       : GETHELP

 Common      : COMMON DB_STRUCT_COMMON, all_db_struct
               
 Restrictions: None.
               
 Side effects: None.
               
 Category    : Database Administration
               
 Prev. Hist. : None.

 Written     : Scott Paswaters, NRL, November 1995.
               
 Modified    : 13 Jun 1996 SEP Moved include files to ./include subdirectory

 Version     : 1.01


INSTF

[List of Routines] (See ./data_anal/fpc1_insf.pro)

 NAME:  
	instf

 PURPOSE:
	Return the C1 instrument function Voigt parameters.

 CATEGORY:
	image reduction routines

 CALLING SEQUENCE:
	fpc1_insf,w,fl,fg

 INPUTS:
	w -	wavelength in Angstroms at which the instrument function
		parameters are desired.

 OPTIONAL INPUTS:

	NONE

 KEYWORD PARAMETERS:

	NONE

 OUTPUTS:

	Returns two arrays - fl and fg. The instrument function is
	a Voigt profile which is a convolution of a Gaussian and
	a Lorentzian profile. fg is the full width at half maximum
	of the Gaussian profile G(w):

		G(w) = exp(-w^2/(2*s^2))/(s*sqrt(2*!pi) 

	where s is the variance and fg = 2*s*sqrt(2*alog(2))

	fl is the full width at half maximum of the Lorentzian
	profile L(w):

		L(w) = (fl/(2*!pi))/(w^2+(fl/2)^2)

	The values of both fl and fg are returned in Angstroms

 OPTIONAL OUTPUTS
	NONE
	
 COMMON BLOCKS:
	NONE

 SIDE EFFECTS:
	NONE

 RESTRICTIONS:
	NONE 

 PROCEDURE:

 MODIFICATION HISTORY:
	1997 Oct 20 Written by Paul Reiser 


INTER_FUZZY

[List of Routines] (See ./reduce/fuzzy/inter_fuzzy.pro)

 NAME:
	INTER_FUZZY

 PURPOSE:
	Compute the intersection of 2 fuzzy numbers

 PROCEDURE:
	Compute the intersection of 2 fuzzy numbers (this for each element in
	the case of fuzzy number arrays)

 CALLING SEQUENCE:
	cfuzzy = inter_fuzzy (afuzzy, bfuzzy)

 INPUTS:
	afuzzy, bfuzzy		2 fuzzy numbers (or fuzzy number arrays)

 OUTPUTS:
	a fuzzy number (structure {low, high}) or array of fuzzy numbers


INTTOB32

[List of Routines] (See ./reduce/mb2str/inttob32.pro)

 PROJET
     SOHO-LASCO

 NAME:
  INTTOB32

 PURPOSE:
  Convert a integer to a base 32 number

 CATEGORY:
  Mathematics

 CALLING SEQUENCE:
   
 DESCRIPTION:

 INPUTS:

 INPUT KEYWORD:

 OUTPUTS:

 PROCEDURE:
  
 CALLED ROUTINES:

 HISTORY:
	V1 A.Thernisien 10/07/2001
 CVSLOG:
  $Log: inttob32.pro,v $
  Revision 1.2  2002/07/11 07:24:12  arnaud
  Insertion of the Log in each header



KDATE

[List of Routines] (See ./util/kdate.pro)

 NAME:
	KDATE

 PURPOSE:
	This procedure converts a k index (modified julian date) into the
	day, month and year

 CATEGORY:
	UTIL

 CALLING SEQUENCE:
	KDATE,K,Id,Im,Iy

 INPUTS:
	K:	The k-index (modified julian date)

 OUTPUTS:
	Id:	The date of month
	Im:	The number of the month (1..12)
	Iy:	The year

 MODIFICATION HISTORY:
 	Written by:	RA Howard, 1975

	@(#)kdate.pro	1.2 10/17/96 LASCO IDL LIBRARY


KDAY

[List of Routines] (See ./util/kday.pro)

 NAME:
	KDAY

 PURPOSE:
	This procedure converts a calendar date to the corresponding serial
	day number.  

 CATEGORY:
	UTIL

 CALLING SEQUENCE:
	KDAY,Id,Im,Iy,K

 INPUTS:
	Id:	The day of month (1..31)
	Im:	The number of month (1..12)
	Iy:	The year, either as a two or four digit number

 OUTPUTS:
	K:	The serial day number.  To obtain the Julian Day number (valid 
		at noon), add 2415079

 MODIFICATION HISTORY:
 	Written by:	RA Howard, NRL, 1975.

	@(#)kday.pro	1.3 05/09/98 LASCO IDL LIBRARY


LASCO_FITSHDR2STRUCT

[List of Routines] (See ./inout/lasco_fitshdr2struct.pro)

 Project     : SOHO - LASCO
                   
 Name        : LASCO_FITSHDR2STRUCT
               
 Purpose     : Read a LASCO FITS file to obtain an image and header array.
               
 Explanation : This routine calls the IDL Astronomy Library routine READFITS
		to read the LASCO FITS file.  It then fills in a LASCO header
		structure with the header information.
               
 Use         : IDL> lasco_hdr = LASCO_FITSHDR2STRUCT(fits_hdr)
    
 Inputs      : fits_hdr	FITS header, STRARR
               
 Outputs     : lasco_hdr   	LASCO header structure.
               
 Calls       : FXPAR, GETTOK

 Category    : Data_Handling, I_O
               
 Prev. Hist. : None.

 Written     : Scott Paswaters, NRL, Feb. 1996.
               
 Modified    : 02/22/96  S. Paswaters 	Modified for DATE-OBS,TIME-OBS change
					to FITS header.
               08/30/96  S. Paswaters 	Perform STRTRIM(val,2) on type STR tags
					  ex: changes 'C1    ' to 'C1'
               10/23/96  S. Paswaters 	added default structure to work with differing fits hdrs
               11/10/97  S. Paswaters 	include multiple comment or history fields
	11/30/01, N. Rich - Add Windows SSW compatibility for GSV
	 8/28/02, N. Rich - Use SSW recommendation for DATE_OBS (includes time) for Level 1 images
	 9/19/02, N. Rich - Change test for Level 1
	 4/14/03, N. Rich - Reverse SSW DATE_OBS change (because getbkgimg crashed)


 Version     : 


 10/02/02, 04/14/03 @(#)lasco_fitshdr2struct.pro	1.11 :LASCO IDL LIBRARY


LASCO_GEN_HELP

[List of Routines] (See ./util/lasco_gen_help.pro)

 NAME:
	LASCO_GEN_HELP

 PURPOSE:
	This procedure goes through all the LASCO IDL directories and
       generates a help file in HTML format of the form help_.html

 CATEGORY:
	
	Utility

 CALLING SEQUENCE:

	LASCO_GEN_HELP

 INPUTS:
       NONE
	
 KEYWORD PARAMETERS:
       NONE

 OUTPUTS:
       HTML Help Files in each directory are generated

 EXAMPLE:

	LASCO_GEN_HELP

 MODIFICATION HISTORY:
 	Written by:	Dennis Wang
       Created: 28 Jan 2001

	@(#)lasco_gen_help.pro	1.1 01/29/01 LASCO IDL LIBRARY


LASCO_IMAGE

[List of Routines] (See ./inout/lasco_image.pro)

 Project     : SOHO - LASCO
                   
 Name        : LASCO_IMAGE
               
 Purpose     : Read a LASCO FITS file to obtain an image and header array.
               
 Explanation : This routine calls the IDL Astronomy Library routine READFITS
		to read the LASCO FITS file.  It then fills in a LASCO header
		structure with the header information.
               
 Use         : IDL> image = LASCO_IMAGE('filename' [,header])
    
 Inputs      : filename	Name of the LASCO FITS file.
               
 Outputs     : image		The image array.
               
 Opt. Outputs: header		The image header can be returned either as a
				LASCO header structure or a STRARR (FITS header).
               
 Keywords    : FITS_HDR	The header is normally returned as a LASCO header
				structure.  Set this keyword to return the header
				as a STRARR (FITS header).

 Calls       : READFITS, DEF_LASCO_HDR

 Category    : Data_Handling, I_O
               
 Prev. Hist. : None.

 Written     : Scott Paswaters, NRL, January 1995.
               
 Modified    : 

 Version     : Version 0.1, January 18, 1994

	@(#)lasco_image.pro	1.1 10/04/96 LASCO IDL LIBRARY


LASCO_READFITS

[List of Routines] (See ./inout/lasco_readfits.pro)

 Project     : SOHO - LASCO
                   
 Name        : LASCO_READFITS
               
 Purpose     : Read a LASCO FITS file to obtain an image and header array.
               
 Explanation : This routine calls the IDL Astronomy Library routine READFITS
		to read the LASCO FITS file.  It then fills in a LASCO header
		structure with the header information.
               
 Use         : IDL> image = LASCO_READFITS('filename' [,header])
    
 Inputs      : filename	Name of the LASCO FITS file.
               
 Outputs     : image		The image array.
               
 Opt. Outputs: header		The image header can be returned either as a
				LASCO header structure or a STRARR (FITS header).
               
 Keywords    : FITS_HDR	The header is normally returned as a LASCO header
				structure.  Set this keyword to return the header
				as a STRARR (FITS header).

               NO_IMG  	Set this keyword if you only want the header returned.

               REFCOORD  	Set this keyword to define CRPIX if needed.
               SILENT  	Set this keyword to turn off printing of remarks
		CACHE		Set equal to list of fits files; if set, then will copy 
				at most 25 files to /tmp and uses these copies 

 Calls       : READFITS, HEADFITS

 Category    : Data_Handling, I_O
               
 Prev. Hist. : None.

 Written     : Scott Paswaters, NRL, Feb. 1996.
               
 Modified    : 

 Version     : 
		1996/09/27  SEP 	Added REFCOORD
		RAH, 5/23/97, added error handling for call to READFITS
		RAH, 8/28/98, added handling of MLO/MK3 images
		NBR, 12/1999, retry READFITS if it fails
		NBR, 01/2000, Repeat READFITS max 5 times or until it succeeds
		NBR, 02/2000, Add 2nd catch function and GOTO function for null image; 
				IF incr GT 5, return -1
		NBR, 05/2000, Also repeat for null hdr
		RAH, 7/28/00, added handling of MLO/MK4 images
		NBR, 09/06/00, Check for .gz FITS if unable to find file
	NBR, 12/04/00, Fix error condition
		DW,  12/04/00, Add SILENT Keyword
		NBR, 01/17/01, Add help statements
	NBR, 02/12/01, Convert all headers to structure, regardless if LASCO or MK 
	NBR, 11/30/01 - Replace TRIM with STRTRIM
	NBR, 01/03/02 - Add CACHE keyword
	NBR, 01/07/02 - Edit SILENT usage


	01/10/02, @(#)lasco_readfits.pro	1.13 LASCO IDL LIBRARY


LASCO_READFITS_MK4

[List of Routines] (See ./inout/lasco_readfits_mk4.pro)

 Project     : SOHO - LASCO
                   
 Name        : LASCO_READFITS
               
 Purpose     : Read a LASCO FITS file to obtain an image and header array.
               
 Explanation : This routine calls the IDL Astronomy Library routine READFITS
		to read the LASCO FITS file.  It then fills in a LASCO header
		structure with the header information.
               
 Use         : IDL> image = LASCO_READFITS('filename' [,header])
    
 Inputs      : filename	Name of the LASCO FITS file.
               
 Outputs     : image		The image array.
               
 Opt. Outputs: header		The image header can be returned either as a
				LASCO header structure or a STRARR (FITS header).
               
 Keywords    : FITS_HDR	The header is normally returned as a LASCO header
				structure.  Set this keyword to return the header
				as a STRARR (FITS header).

               NO_IMG  	Set this keyword if you only want the header returned.

               REFCOORD  	Set this keyword to define CRPIX if needed.

 Calls       : READFITS, HEADFITS

 Category    : Data_Handling, I_O
               
 Prev. Hist. : None.

 Written     : Scott Paswaters, NRL, Feb. 1996.
               
 Modified    : 

 Version     : Version 0.1, Feb. 12, 1996
		1996/09/27  SEP 	Added REFCOORD
		RAH, 5/23/97, added error handling for call to READFITS
		RAH, 8/28/98, added handling of MLO/MK3 images
		NBR, 12/1999, retry READFITS if it fails
		NBR, 01/2000, Repeat READFITS max 5 times or until it succeeds
		NBR, 02/2000, Add 2nd catch function and GOTO function for null image; 
				IF incr GT 5, return -1
		NBR, 05/2000, Also repeat for null hdr

	11/02/01 @(#)lasco_readfits_mk4.pro	1.1 LASCO IDL LIBRARY
		RAH, 7/28/00, added handling of MLO/MK4 images


LASER8EW[1]

[List of Routines] (See ./synoptic/laser8ew.pro)

 NAME:		CONGRID
 PURPOSE:	Simulate the action of the VAX/VMS CONGRID/CONGRIDI function.
		Shrink or expand the size of an image.
 CATEGORY:	Image processing.
 CALLING SEQUENCE:
	Result = CONGRID(Image, Xs, Ys [, Interp = Interp])
 INPUTS:
	Image = 2D array to resample.
	Xs = desired number of columns for result.
	Ys = number of rows for result.
 KEYWORD PARAMETERS:
	Interp = keyword which if set causes bilinear interpolation to be
		used.  Otherwise nearest neighbor method is used.
 OUTPUTS:
	Result = Image of same type as input, of size (Xs, Ys).
 COMMON BLOCKS:
	None.
 SIDE EFFECTS:
	None.
 RESTRICTIONS:
	Doesn't completely emulate the VAX/VMS CONGRID.  The case 
	of a rectangular grid is not implemented.  This can be done 
	using multiple calls to POLY_2D.
 PROCEDURE:
	Simple call POLY_2D with the warping coefficients.
 MODIFICATION HISTORY:
	DMS, Sept. 1988.


LASER8EW[2]

[List of Routines] (See ./synoptic/laser8ew.pro)

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

                                   LASER8ew.PRO

   LASER8 for printing east limb and west limb carrington maps in landscape mode

          designed to be significantly more modular than its predecessors
           and hopefully more comprehensible to the peruser (and myself).



                                  Eric T Swanson
                                     8/27/91

 PROCEDURES CALLED:
	makebasecarr.pro

 MODIFIED:
	Dec. 1996 by N. Rich	make output in landscape mode
	Jan. 1996 by J. Kraemer add difference and limb option
	Jan. 1996 by N. Rich	add east/west limb feature; do actual differencing;
		display begin and end dates; display max and min (modified common
		block PM1)
	Feb. 14 96 by N. Rich	touch up ew maps
	Feb. 26 96 by N. Rich	remove factor by which basecarr is multiplied
	Mar. 13 97 by N. Rich	add B0 angle
	Mar. 14 97 by N. Rich	add top sub-title; newmax=newmax-1 for row=1
	Mar. 18 97 by N. Rich	change B0 angle display
	Mar. 28 97 by N. Rich	use pb0r.pro to compute B0 angle
	May 15 97 by N. Rich	variable mapsize from filename
	May 21 97 by N. Rich	add my name to output
	Nov  3 97 by N. Rich	use ratio instead of difference
	Apr  7 98 by N. Rich	add today's date to output
	Jun 26 98 by N. Rich	read fits files
	Mar 2000 By N. Rich	Add kind to common PM1; edit PRINTMENU
	Oct 2000 By N. Rich	Use BYTSCL for scaling images
	Nov 2001 by N. RIch	Add SCCS tags
	27Mar02 by N. RIch	Change default Top2 title
	 1Apr02 by N. Rich	Auto exit after save


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

	%H% %W% - NRL LASCO IDL Library


LASER8ONE

[List of Routines] (See ./synoptic/laser8one.pro)

 NAME:		CONGRID
 PURPOSE:	Simulate the action of the VAX/VMS CONGRID/CONGRIDI function.
		Shrink or expand the size of an image.
 CATEGORY:	Image processing.
 CALLING SEQUENCE:
	Result = CONGRID(Image, Xs, Ys [, Interp = Interp])
 INPUTS:
	Image = 2D array to resample.
	Xs = desired number of columns for result.
	Ys = number of rows for result.
 KEYWORD PARAMETERS:
	Interp = keyword which if set causes bilinear interpolation to be
		used.  Otherwise nearest neighbor method is used.
 OUTPUTS:
	Result = Image of same type as input, of size (Xs, Ys).
 COMMON BLOCKS:
	None.
 SIDE EFFECTS:
	None.
 RESTRICTIONS:
	Doesn't completely emulate the VAX/VMS CONGRID.  The case 
	of a rectangular grid is not implemented.  This can be done 
	using multiple calls to POLY_2D.
 PROCEDURE:
	Simple call POLY_2D with the warping coefficients.
 MODIFICATION HISTORY:
	DMS, Sept. 1988.


LASER8[1]

[List of Routines] (See ./util/laser8.pro)

NAME:
	LASER8

PURPOSE:
	This procedure generates a "nice" layout for printing images
	using an interactive menu system.

CATEGORY:
	UTIL

CALLING SEQUENCE:
	LASER8

INPUTS:
	None

OUTPUTS:
	None, File written to disk

AUTHOR:
	Eric T. Swanson, NRL Summer Student, Aug, 1991

	@(#)laser8.pro	1.2 05/14/97 LASCO IDL LIBRARY

+
NAME:
	LASER8

PURPOSE:
	This procedure generates a "nice" layout for printing images
	using an interactive menu system.

CATEGORY:
	UTIL

CALLING SEQUENCE:
	LASER8

INPUTS:
	None

OUTPUTS:
	None, File written to disk

AUTHOR:
	Eric T. Swanson, NRL Summer Student, Aug, 1991

	@(#)laser8.pro	1.2 05/14/97 LASCO IDL LIBRARY


LASER8[2]

[List of Routines] (See ./util/laser8.pro)

 NAME:		CONGRID
 PURPOSE:	Simulate the action of the VAX/VMS CONGRID/CONGRIDI function.
		Shrink or expand the size of an image.
 CATEGORY:	Image processing.
 CALLING SEQUENCE:
	Result = CONGRID(Image, Xs, Ys [, Interp = Interp])
 INPUTS:
	Image = 2D array to resample.
	Xs = desired number of columns for result.
	Ys = number of rows for result.
 KEYWORD PARAMETERS:
	Interp = keyword which if set causes bilinear interpolation to be
		used.  Otherwise nearest neighbor method is used.
 OUTPUTS:
	Result = Image of same type as input, of size (Xs, Ys).
 COMMON BLOCKS:
	None.
 SIDE EFFECTS:
	None.
 RESTRICTIONS:
	Doesn't completely emulate the VAX/VMS CONGRID.  The case 
	of a rectangular grid is not implemented.  This can be done 
	using multiple calls to POLY_2D.
 PROCEDURE:
	Simple call POLY_2D with the warping coefficients.
 MODIFICATION HISTORY:
	DMS, Sept. 1988.


LAS_AUTO_EXP

[List of Routines] (See ./exposure/las_auto_exp.pro)

 LAS_AUTO_EXP
	Do a "bootstrap" exposure correction to the currently selected
	images.

 Usage:
	las_auto_exp

 Arguments & Keywords: None

 Method:
	This routine make use of the 64x64 block in the centre of the
	occulting disk which is now normally transmitted. It is
	assumed that this retains a constant brightness. It is further
	assumed that the exposures are correct on average.

 Restrictions:
 	It is assumed that the images have been corrected for offset
 	bias and nominal exposure and that this is a fine adjustment.

 History:
	Original: 1/10/96; SJT


LAS_EXP_NORM

[List of Routines] (See ./exposure/las_exp_norm.pro)

 LAS_EXP_NORM
	Normalize images based on the integrated image intensities
	
 Usage:
	las_exp_norm, calib[, /store, /use_in_mem]

 Arguments:
	calib	input	string	The name of the file with the
				calibration image; at present this
				must be a full path.

 Keywords:
	store	??	input	If set, then add the calibration image
				to the set of loaded images -- useful
                               if you want to form differences
                               from the calibration image.
	all	??	input	If set, then normalize ALL images, by
				default only the currently selected
				images are normalized.
	use_in_mem ?	input	If set, then use the specified image
				from the currently loaded images.

 Restrictions:
	The STORE key is ignored if USE_IN_MEM is specified.

 Side Effect:
	Changes the values of the images.

 History:
	Original: Mar 96; SJT


LAYOUT

[List of Routines] (See ./display/layout.pro)

 Project     : SOHO - LASCO/EIT

 Name	      : LAYOUT

 Purpose     : draw a layout to the image

 Category    : DISPLAY

 Explanation : 

 Syntax      : layout,image,name,head,hindex

 Examples    :

 Inputs      : 

 Opt. Inputs : 

 Outputs     : 

 Opt. Outputs:

 Keywords    : 

 Common      : wload.com

 Restrictions: 

 Side effects: 

 MODIFICATION HISTORY:
 	Written by:	Borut Podlipnik, 15-jan-1993, MPAe 
        

 Contact     : BP, borut@lasco1.mpae.gwdg.de


LD_INST_DEF

[List of Routines] (See ./display/ld_inst_def.pro)

 Project     : SOHO - LASCO

 Name        : 

 Purpose     : 

 Category    : 

 Explanation : 

 Syntax      : 

 Examples    : 

 Inputs      : None

 Opt. Inputs : None

 Outputs     : None

 Opt. Outputs: None

 Keywords    : None

 Common      : 

 Restrictions:                                  

 Side effects: Not known

 History     : Version 1, 02-Sep-1995, B Podlipnik. Written

 Contact     : BP, borut@lasco1.mpae.gwdg.de


LEG_DISP

[List of Routines] (See ./util/leg_disp.pro)

 NAME:
	LEG_DISP

 PURPOSE:
	This procedure computes the leg actuator motions required for the
	pointing of LASCO.  

 CATEGORY:
	UTIL

 CALLING SEQUENCE:
	LEG_DISP,Theta,Phi

 INPUTS:
	Theta:	Desired motion in pitch (in arc sec)
	Phi:	Desired motion in yaw (in arc sec)

 OUTPUTS:
	The number of steps is printed on the display.

 RESTRICTIONS:
	Assumes starting at center positions

 EXAMPLE:
	To obtain the number of steps to move the two legs 4 arc min in pitch
	and 2 arc min in yaw:

		LEG_DISP,240.,120.

 MODIFICATION HISTORY:
 	Written by:	S.Plunkett, DSR, 1994

	@(#)leg_disp.pro	1.1 10/05/96 LASCO IDL LIBRARY


LIMB_DARK

[List of Routines] (See ./data_anal/limb_dark.pro)

 NAME:
	LIMB_DARK

 PURPOSE:
	This function returns the limb darkening coefficient given the wavelength

 CATEGORY:
	DATA ANALYSIS

 CALLING SEQUENCE:
	Result = LIMB_DARK (Lambda)

 INPUTS:
	Lambda:	Wavelength in nanometers

 KEYWORDS
	MEANFLUX	If present, the limb darkening is the ratio of the mean flux
			to the intensity at the center of the disk.  The default is
			the ratio of the intensity at the limb to the intensity at
			the center.
	ALLEN		If present the values from Allen "Astrophysical Quantities"
			are returned rather than from Pierce and Allen.

 OUTPUTS:
	This function returns the limb darkening for the input wavelength(s).

 RESTRICTIONS:
	The range of wavelengths can be between 305 nm and 995 nm.  If any
	input values are outside of this range, the program will exit without
	computing anything and will return a value of -1.

 PROCEDURE:
	The limb darkening values derived from Table 2 of Pierce and Allen,
	"The Solar Spectrum Between 0.3 and 10 micron", pp169-192, in "The
	Solar Output and its Variation" O.R. White, ed, Colorado University
	Press, Boulder, 1977.

	Column 6 of Table 2 gives a limb darkening function as the ratio of the
	average solar flux to the intensity at disk center.  We want the ratio
   	of the intensity at the limb to the intensity at the center of the disk
   	Allen, "Astrophysical Quantities" p170 relates the limb darkening
   	coefficient, u, to the ratio of the total flux to the intensity at
   	disk center as approximately:

		u = 3*[F/I((0)]-2

   	where, F/I(0) is the mean to center ratio given in Pierce and Allen.

	Calls the IDL routine INTERPOL to perform the interpolations.

 EXAMPLE:
	To obtain the limb darkening at 730 nm (7300 Angstrom):

		u = LIMB_DARK(730.)

 MODIFICATION HISTORY:
 	Written by:	R.A. Howard, NRL, September, 1999

 @(#)limb_dark.pro	1.3 08/10/05 :LASCO IDL LIBRARY


LIST_HDR_SUM

[List of Routines] (See ./util/list_hdr_sum.pro)

 NAME:
	LIST_HDR_SUM

 PURPOSE:
	Output information from headers for easy comparison

 CATEGORY:
	Analysis

 CALLING SEQUENCE:
	list_hdr_sum, filelist [,keywords]

 INPUTS:
	filelist    List of FITS files

 OPTIONAL INPUTS:
	keywords	STRARR of keywords to list in addition to default
	(default is filename, date/time-obs, naxis1,2)
	
 KEYWORD PARAMETERS:
	None

 OUTPUTS:
	Img_hdr.txt-style text file in current directory

 OPTIONAL OUTPUTS:
	None

 MODIFICATION HISTORY:
	Written, N Rich, 04.04.05


 SCCS variables for IDL use
 
 @(#)list_hdr_sum.pro	1.1 05/03/04 :LASCO IDL LIBRARY


LOADDATA

[List of Routines] (See ./dfanning/loaddata.pro)

 NAME:
       LOADDATA

 PURPOSE:
       The purpose of this function is to read a selection of standard
       data sets that are found in the normal IDL distribution in the
       subdirectory $IDL_DIR/examples/data. At least 17 data sets are
       available in all categories of data. The user selects one of the
       possible data sets with the mouse.

 CATEGORY:
       File I/O.

 CALLING SEQUENCE:

       If calling from the IDL command line:

          data = LoadData()

       If calling from within a widget program:

          data = LoadData(Cancel=cancelled, Group_Leader=event.top)

       If you know which data set you want, you can load it directly:

          data = LoadData(7)

 OPTIONAL INPUTS:
       selection : The number of the data selection. Values start at 1,
           and go up to the number of data sets available (currently 17).

 KEYWORD PARAMETERS:
       CANCEL : An output keyword that is 1 of the use clicked the CANCEL
           button and 0 otherwise.

              data = Loaddata(Cancel=cancelled)
              IF cancelled THEN RETURN

        GROUP_LEADER: The group leader of the widget. This keyword
           is required if you wish LOADDATA to be a modal widget program.
           (Which you *always* do when calling it from a widget program.)

        IMAGES: Set this keyword if you only want to select 2D image
           data sets. Note that the selection number does *not* change
           just because fewer data sets are available in the selection
           widget.

 COMMON BLOCKS:
       None.

 SIDE EFFECTS:
       None.

 RESTRICTIONS:
       None.

 EXAMPLE:
       To load the world elevation data set:

       image = LoadData(7)

 MODIFICATION HISTORY:
       Written by:  David Fanning, 5 March 1999.
       Added some additonal random data capability. 29 April 99. DWF
       Added IMAGES keyword. 31 March 2000. DWF.


LOAD_MESSAGE

[List of Routines] (See ./display/load_message.pro)

 Project     : SOHO - LASCO

 Name        : 

 Purpose     : 

 Category    : 

 Explanation : 

 Syntax      : 

 Examples    : 

 Inputs      : None

 Opt. Inputs : None

 Outputs     : None

 Opt. Outputs: None

 Keywords    : None

 Common      : 

 Restrictions:                                  

 Side effects: Not known

 History     : Version 1, 02-Sep-1995, B Podlipnik. Written

 Contact     : BP, borut@lasco1.mpae.gwdg.de


LOBT2TAI

[List of Routines] (See ./packets/lobt2tai.pro)

 NAME:
	LOBT2TAI

 PURPOSE:
	This function converts an LOBT array into TAI

 CATEGORY:
	PACKETS

 CALLING SEQUENCE:

	Result = LOBT2TAI(Lobt)

 INPUTS:
	Lobt:	A 2 word array containing the local on-board time

 OUTPUTS:
	This function returns the TAI (Temps Atomic Internationale) time
	associated with the LOBT input.

 PROCEDURE:
	Calls OBT2TAI

 MODIFICATION HISTORY:
 	Written by:	S.E. Paswaters, 1995

	@(#)lobt2tai.pro	1.1 09/22/96 LASCO IDL LIBRARY


LUX_DIFF

[List of Routines] (See ./las-c2/lux_diff.pro)

 NAME:                        lux_diff.pro
 PURPOSE:                     make an image of the scattering function
 CATEGORY:                    Processing high level
 CALLING SEQUENCE:            lux_diff,ima_name,Xc,Yc,OPTION,A,B
 INPUTS:                      ima_name                       Name of result
 OPTIONAL INPUT PARAMETERS:   Xc,Yc                          center's coords
                              OPTION                         function's chars
 KEYWORD PARAMETERS:          None
 OUTPUTS:                     ima_name                       scattering funct
 OPTIONAL OUTPUT PARAMETERS:  None
 COMMON BLOCKS:               None
 SIDE EFFECTS:                None
 RESTRICTIONS:                Applications limited to 512*512 frames
 PROCEDURE:
 MODIFICATION HISTORY:   defined by M.B 10/11/93

 SCCS variables for IDL use

 @(#)lux_diff.pro  1.0 10/11/93 :LAS


LZ_DISK_INIT3

[List of Routines] (See ./inout/lz_disk_init3.pro)

 NAME:
	LZ_DISK_INIT3

 PURPOSE:
	This procedure does some level-0 disk initial tasks:
    	copy definitive attitude files from cd to $NRL_LIB/lasco/data/attitude
    	copy definitive orbit files from cd to $NRL_LIB/lasco/data/orbit
    	read data files and get start dates

 CATEGORY:
	UTIL

 CALLING SEQUENCE:
	LZ_DISK_INIT3

 INPUTS:
	None

 OUTPUTS:
	None

 SIDE EFFECTS:
	Creates various disk files

 RESTRICTIONS:
	None

 MODIFICATION HISTORY:
 	Written by:	RAHoward, NRL, May 1996
	961216 by N. Rich	commented out miss_pckts, start_dates lines
	970423 by N. Rich	prompt for multiple disks for each release
       970618 by N. Rich	avoid long list of chmod: WARNING messages by
				changing cp and chmod commands for or and at
	970627 by N. Rich	Include print statements for copied files
	990416 by N. Rich	Print multiple volume numbers
	991216 by N. Rich	Change hkdir to solardata
	000803 by Jake		Added /SH to spawn commands
	000808 the Jake		Changed lzcds to .lzcds
	001011 the Jake		Copying d01 files to $TMFILES Directory now.
	011030 the Jake		Changed name to lz_disk_init3 for clarification
	020314	Jake            attitude and orbit files not available in download
				ISTP is no longer supplying CDs
				lines copying this data have been REM'd
	021009 Jake		trying to fix carriage return kept at the end of volno
	030729	Jake	added NOCOPY keyword to not copy data files
	03.10.08, nbr	screwed up sccs, so started archive over
	03.10.09, nbr 	Use CD numbers instead of "volume" numbers


 10/10/03 @(#)lz_disk_init3.pro	1.10 : LASCO IDL LIBRARY


LZ_DISK_INIT[1]

[List of Routines] (See ./inout/lz_disk_init.pro)

 NAME:
	LZ_DISK_INIT

 PURPOSE:
	This procedure does some level-0 disk initial tasks:
    	copy definitive attitude files from cd to $NRL_LIB/lasco/data/attitude
    	copy definitive orbit files from cd to $NRL_LIB/lasco/data/orbit
    	read data files and get start dates

 CATEGORY:
	UTIL

 CALLING SEQUENCE:
	LZ_DISK_INIT

 INPUTS:
	None

 OUTPUTS:
	None

 SIDE EFFECTS:
	Creates various disk files

 RESTRICTIONS:
	None

 MODIFICATION HISTORY:
 	Written by:	RAHoward, NRL, May 1996


	@(#)lz_disk_init.pro	1.2 05/14/97 LASCO IDL LIBRARY


LZ_DISK_INIT[2]

[List of Routines] (See ./inout/lz_disk_init2.pro)

 NAME:
	LZ_DISK_INIT

 PURPOSE:
	This procedure does some level-0 disk initial tasks:
    	copy definitive attitude files from cd to $NRL_LIB/lasco/data/attitude
    	copy definitive orbit files from cd to $NRL_LIB/lasco/data/orbit
    	read data files and get start dates

 CATEGORY:
	UTIL

 CALLING SEQUENCE:
	LZ_DISK_INIT

 INPUTS:
	None

 OUTPUTS:
	None

 SIDE EFFECTS:
	Creates various disk files

 RESTRICTIONS:
	None

 MODIFICATION HISTORY:
 	Written by:	RAHoward, NRL, May 1996
	961216 by N. Rich	commented out miss_pckts, start_dates lines
	970423 by N. Rich	prompt for multiple disks for each release
       970618 by N. Rich	avoid long list of chmod: WARNING messages by
				changing cp and chmod commands for or and at
	970627 by N. Rich	Include print statements for copied files
	990416 by N. Rich	Print multiple volume numbers
	991216 by N. Rich	Change hkdir to solardata

	@(#)lz_disk_init.pro	1.2 11/27/96 LASCO IDL LIBRARY


LZ_GETLASCODIR

[List of Routines] (See ./inout/lz_getlascodir.pro)

NAME: LZ_GETLASCODIR

PURPOSE:
       Tells user which directory contains a given days worth of level zero
	LASCO data for a particular camera.

CALLING SEQUENCE:
	dir=lz_getlascodir(1,6,1996,'C1')
     or
	dir=lz_getlascodir(1,6,96,'c1')

INPUTS:
	month:	an integer betwen 1 (January) and 12 (December)
	day:	day of the month
	year:	either the last two digits of the year (e.g. 96) or all 4 digits
	camera:	a two-character string describing which camera is desired.
		Acceptable choices for camera are: "c1","c2","c3", or "c4"
		camera is case-insensitive

KEYWORDS: 
	SILENT: Supress output of all error messages except lower-level IDL
		and system messages. 

OUTPUTS:
      A string specifiying the directory in which desired images can be found.

AUTHOR: Scott Hawley, NRL, June 27, 1996

MODIFIED: SHH 7/12/96  Generates directory names for cplex2
	9/23/96 by N. Rich	modified printed output
	961007 by N. Rich	fixed findfile call
	970827 by N. Rich	use LZ_IMG for directory
       990126 Ed Esfandiari    Fixed code for Y2K problem.
 
 SCCS variables for IDL use
 
 @(#)lz_getlascodir.pro	1.7 08/27/97 :NRL Solar Physics


LZ_START_DATE3

[List of Routines] (See ./inout/lz_start_date3.pro)

 NAME:
	LZ_START_DATE3

 PURPOSE:
   	Lists the level-0 cdrom start dates

 CATEGORY:
	UTIL

 CALLING SEQUENCE:
	LZ_START_DATE3,Volno

 INPUTS:
	Volno:	The CD_ROM volume number

 OPTIONAL INPUTS:
	None

 KEYWORD PARAMETERS:
	None

 OUTPUTS:
	None

 OPTIONAL OUTPUTS:
	None

 COMMON BLOCKS:
	None

 SIDE EFFECTS:
	Writes a file of the start dates

 RESTRICTIONS:
	None

 PROCEDURE:

 EXAMPLE:

 MODIFICATION HISTORY:
 	Written by:	RA Howard, 15 Mar 1996
	N. Rich, 10/21/96, prompts for multiple disks for each release;
			   prints info for each volume of 1 release on the
			   same page
	000803 Jake		Added /SH to spawn commands
	000808 the Jake		Changed lzcds to .lzcds
	020318	Jake		Changed to grep for CD-NUMBER now that making disks here
				modified strtrim line
	03.10.09, nbr - Use volno input; create new file each time


 @(#)lz_start_date3.pro	1.1 10/10/03 : LASCO IDL LIBRARY


LZ_START_DATE[1]

[List of Routines] (See ./inout/lz_start_date.pro)

 NAME:
	LZ_START_DATE

 PURPOSE:
   	Lists the level-0 cdrom start dates

 CATEGORY:
	UTIL

 CALLING SEQUENCE:
	LZ_START_DATE,Volno

 INPUTS:
	Volno:	The CD_ROM volume number

 OPTIONAL INPUTS:
	None
	
 KEYWORD PARAMETERS:
	None

 OUTPUTS:
	None

 OPTIONAL OUTPUTS:
	None

 COMMON BLOCKS:
	None

 SIDE EFFECTS:
	Writes a file of the start dates

 RESTRICTIONS:
	None

 PROCEDURE:

 EXAMPLE:

 MODIFICATION HISTORY:
 	Written by:	RA Howard, 15 Mar 1996


	@(#)lz_start_date.pro	1.3 05/14/97 LASCO IDL LIBRARY


LZ_START_DATE[2]

[List of Routines] (See ./inout/lz_start_date2.pro)

 NAME:
	LZ_START_DATE

 PURPOSE:
   	Lists the level-0 cdrom start dates

 CATEGORY:
	UTIL

 CALLING SEQUENCE:
	LZ_START_DATE,Volno

 INPUTS:
	Volno:	The CD_ROM volume number

 OPTIONAL INPUTS:
	None
	
 KEYWORD PARAMETERS:
	None

 OUTPUTS:
	None

 OPTIONAL OUTPUTS:
	None

 COMMON BLOCKS:
	None

 SIDE EFFECTS:
	Writes a file of the start dates

 RESTRICTIONS:
	None

 PROCEDURE:

 EXAMPLE:

 MODIFICATION HISTORY:
 	Written by:	RA Howard, 15 Mar 1996
	N. Rich, 10/21/96, prompts for multiple disks for each release;
			   prints info for each volume of 1 release on the
			   same page


	@(#)lz_start_date.pro	1.1 10/05/96 LASCO IDL LIBRARY


M1ANGLE

[List of Routines] (See ./util/m1angle.pro)

 NAME:
	M1ANGLE

 PURPOSE:
	Compute the angular offset of the M1 mirror from LVDT values.

 CATEGORY:
	LASCO-UTIL

 CALLING SEQUENCE:
	Result = M1ANGLE (LVDT)

 INPUTS:
	LVDT:	A three element array giving the values of the LVDT
		for the P1, P2 and P3 piezo electric stacks.
		The LVDT values are obtained by running the LP to
		for the M1 measurement unit.

 OPTIONAL INPUTS:
	None
	
 KEYWORD PARAMETERS:
	None

 OUTPUTS:
	This function returns a 2 element array giving the pointing angles
	in the X and Y directions.  The values returned are in units of
	arc seconds in the M1 coordinate system.

 OPTIONAL OUTPUTS:
	None

 COMMON BLOCKS:
	None

 SIDE EFFECTS:
	None

 RESTRICTIONS:
	None

 PROCEDURE:
	The equations provided by Kaiser-Trede have been implemented.

 EXAMPLE:
	To find the offset associated with the LVDT values (547, 603, 767):

	Result = M1ANGLE ([547,603,767])

 MODIFICATION HISTORY:
 	Written by:	RA Howard, 1993

	@(#)m1angle.pro	1.1 10/05/96 LASCO IDL LIBRARY


M1COEFF

[List of Routines] (See ./util/m1coeff.pro)

 NAME:
	M1COEFF

 PURPOSE:
	This routine returns coefficients needed for computing the M1 pointing.
	It is used by other routines.

 CATEGORY:
	UTIL

 CALLING SEQUENCE:
	M1COEFF,B,C,F,K7,K8,K9

 INPUTS:
	None

 OUTPUTS:
	B,C,F,K7,K8,K9:	The coefficients for the M1 mirror pointing

 MODIFICATION HISTORY:
 	Written by:	RA Howard, NRL, 1994

	@(#)m1coeff.pro	1.1 10/05/96 LASCO IDL LIBRARY


M1DACS

[List of Routines] (See ./util/m1dacs.pro)

 NAME:
	M1DACS

 PURPOSE:
	This function returns a 3 word array of the P1, P2 and P3 DAC values
	to command the M1 mirror to a given offset.

 CATEGORY:
	LASCO-UTIL

 CALLING SEQUENCE:
	Result = M1DACS ( Alphax, Alphay)

 INPUTS:
	Alphax:	The pointing angle in the x direction in the M1 coordinate 
		system.  The value is in arc seconds.
	Alphay:	The pointing angle in the y direction in the M1 coordinate 
		system.  The value is in arc seconds.

 OPTIONAL INPUTS:
	None
	
 KEYWORD PARAMETERS:
	None

 OUTPUTS:
	This function returns a three word array containing the values
	of the P1, P2 and P3 DACS necessary to move to the input offset
	angles.

 OPTIONAL OUTPUTS:
	None

 COMMON BLOCKS:
	None

 SIDE EFFECTS:
	None

 RESTRICTIONS:
	None

 PROCEDURE:
	The equations provided by Kaiser-Trede have been implemented.
	The input values are relative to the "active zero" point.

 EXAMPLE:
	To move to a point that is located at (+10.2, -5.7) arc seconds

	     Result = M1DACS (10.2,-5.7)

 MODIFICATION HISTORY:
 	Written by:	RA Howard, 1993
	Version 2	RAH 26 May 1996	Deleted the various models.

	@(#)m1dacs.pro	1.1 10/05/96 LASCO IDL LIBRARY


M1DYNIMG

[List of Routines] (See ./util/m1dynimg.pro)

 NAME:
	M1DYNIMG

 PURPOSE:
	Returns a 4 word array of the constants for dynamic imaging.

 CATEGORY:
	LASCO-UTIL

 CALLING SEQUENCE:
	Result = M1DYNIMG (Alhpax, Alphay)

 INPUTS:
	Alphax:	The angle (in arc sec) to move the M1 in the X direction.
	Alphay:	The angle (in arc sec) to move the M1 in the Y direction.

 OPTIONAL INPUTS:
	None
	
 KEYWORD PARAMETERS:
	None

 OUTPUTS:
	This function returns a 4 word array containing the constants
	A, B, C and D that are used by the LEB to compute the DAC values
	in the dynamic imaging LP.

 OPTIONAL OUTPUTS:
	None

 COMMON BLOCKS:
	None

 SIDE EFFECTS:
	None

 RESTRICTIONS:
	None

 PROCEDURE:
	The equations provided by Kaiser-Trede have been implemented.

 EXAMPLE:
	Normally, dynamic imaging will move the M1 by 0.5 pixel steps
	To find the coefficients to move in 0.5 pixel steps:

	Result = M1DYNIMG ( 0.5*5.6, 0.5*5.6 )

 MODIFICATION HISTORY:
 	Written by:	RA Howard, NRL, 1993

	@(#)m1dynimg.pro	1.1 10/05/96 LASCO IDL LIBRARY


M1REVERSE

[List of Routines] (See ./util/m1reverse.pro)

 NAME:
	M1REVERSE

 PURPOSE:
	This function reverses the bits of the m1 lvdt reading.

 CATEGORY:
	UTIL

 CALLING SEQUENCE:
	M1REVERSE,Dd

 INPUTS:
	Dd:	Then DN value from the M1 LVDT

 OUTPUTS:
	This function returns the value of the M1 LVDT reading after bit
	reversal.

 MODIFICATION HISTORY:
 	Written by:	RA Howard, NRL, 1994

	@(#)m1reverse.pro	1.1 10/05/96 LASCO IDL LIBRARY


M1TEES

[List of Routines] (See ./util/m1tees.pro)

   alphax and alphay are the pointing angles in arc seconds 

   returns a 3 word array of the P1, P2 and P3 DAC values

	@(#)m1tees.pro	1.1 10/05/96 LASCO IDL LIBRARY


M1WOBBLE

[List of Routines] (See ./util/m1wobble.pro)

   computes the m1 wobble parameters, A, B, C, D

	@(#)m1wobble.pro	1.1 10/05/96 LASCO IDL LIBRARY


MAKE_ALL_DAYS

[List of Routines] (See ./synoptic/make_all_days.pro)

 NAME:
	MAKE_ALL_DAYS

 PURPOSE:
	This procedure is an easy interface to the MK_DAILY_MED procedure

 CATEGORY:
	LASCO SYNOPTIC

 CALLING SEQUENCE:
	MAKE_ALL_DAYS,Tel,Stdte,Endte

 INPUTS:
	Tel:	Telescope to be processed, (string), eg. 'C1','C2','C3'
	Stdte:	The starting date specified as a string: YYMMDD, eg. 960601
	Endte:	The ending date specified as a string: YYMMDD, eg, 960630

 OUTPUTS:
	This function generates images in $MONTHLY_IMAGES of the daily
	medians for the specfied telescope, and for each day specfied by the
	starting and ending dates.

 KEYWORDS:
	QL:	If set then use quick look date, else use level 0 data
	FILTER:	String denoting the filter position.  The default depends on 
		the telescope:
			C1:  FeXIV
			C2:  Orange
			C3:  Clear
			C4:  Clear
	POLAR:	String denoting the polarizer position.  The default depends on
		the telescope:
			C1:  Clear
			C2:  Clear
			C3:  Clear
			C4:  304A
	WLU:	String denoting the upper FP wavelength of an interval. 
	ANYSIZE:	Accept images with any dimensions GT 256
	NOREBIN:	Do not rebin images to 512x512
	ROLLED:		Save result in 'daily/rolled' directory; set equal to roll angle (CROTA)
	VERBOSE:	Print information on rows during loop

 RESTRICTIONS:
	
	
 PROCEDURE:
	A loop is generated between the start and end dates, in which the
	routine MK_DAILY_MED is called for each day.

 EXAMPLE:
	To make all the daily median images for the month of June, 1996 for
	C3:

		MAKE_ALL_DAYS,'c3','960601','960630'

 MODIFICATION HISTORY:
 	Written by:	RA Howard, 20 October, 1996
	9/20/99   NBR	Had to add QL to mk_daily_med call
	12/1999	  NBR	Make y2k compliant; add MK_DAILY_MED keywords
	07/2000   NBR   Add ROLLED keyword
	5/2/2002, NBR	Add keyword descriptions

	07/14/03 @(#)make_all_days.pro	1.5 LASCO IDL LIBRARY


MAKE_ALL_MINDAYS

[List of Routines] (See ./synoptic/make_all_mindays.pro)

 NAME:
	MAKE_ALL_MINDAYS

 PURPOSE:
	This procedure is an easy interface to the MK_DAILY_MIN procedure

 CATEGORY:
	LASCO SYNOPTIC

 CALLING SEQUENCE:
	MAKE_ALL_MINDAYS,Tel,Stdte,Endte

 INPUTS:
	Tel:	Telescope to be processed, (string), eg. 'C1','C2','C3'
	Stdte:	The starting date specified as a string: YYMMDD, eg. 960601
	Endte:	The ending date specified as a string: YYMMDD, eg, 960630

 OUTPUTS:
	This function generates images in $MONTHLY_IMAGES of the daily
	minimums for the specfied telescope, and for each day specfied by the
	starting and ending dates.

 RESTRICTIONS:
	These routines only generate the default filter and polarizer images.
	
 PROCEDURE:
	A loop is generated between the start and end dates, in which the
	routine MK_DAILY_MIN is called for each day.

 EXAMPLE:
	To make all the daily median images for the month of June, 1996 for
	C3:

		MAKE_ALL_MINDAYS,'c3','960601','960630'

 MODIFICATION HISTORY:
 	Written by:	RA Howard, 20 October, 1996
	9/20/99   NBR	Had to add QL to mk_daily_med call
	12/1999	  NBR	Make y2k compliant

	11/05/01 @(#)make_all_mindays.pro	1.1 LASCO IDL LIBRARY


MAKE_ALL_MONEXP

[List of Routines] (See ./synoptic/make_all_monexp.pro)

 NAME:
	MAKE_ALL_MONEXP

 PURPOSE:
	This procedure is an easy interface to the MONITOR_EXP procedure

 CATEGORY:
	LASCO SYNOPTIC

 CALLING SEQUENCE:
	MAKE_ALL_MONEXP,Stdte,Endte

 INPUTS:
	Stdte:	The starting date specified as a string: YYMMDD, eg. 960601
	Endte:	The ending date specified as a string: YYMMDD, eg, 960630
	Lz:	0 for QL, 1 for LZ

 OUTPUTS:
	This function generates images in $MON_EXP of the statistics for each
	image for each day specfied by the starting and ending dates for all
	three LASCO telescopes.

 PROCEDURE:
	A loop is generated between the start and end dates, in which the
	routine MONITOR_EXP is called for each day.

 EXAMPLE:
	To compute all of the image statistics for the month of June, 1996:

		MAKE_ALL_MONEXP,'960601','960630'

 MODIFICATION HISTORY:
 	Written by:	RA Howard, 22 May 1997

	@(#)make_all_monexp.pro	1.1 09/26/97 LASCO IDL LIBRARY


MAKE_ALL_MONTHS

[List of Routines] (See ./synoptic/make_all_months.pro)

 NAME:
	MAKE_ALL_MONTHS

 PURPOSE:
	This procedure is an easy interface to the MK_MONTHLY_MIN procedure

 CATEGORY:
	LASCO SYNOPTIC

 CALLING SEQUENCE:
	MAKE_ALL_MONTHS,Tel,Stdte,Endte

 INPUTS:
	Tel:	Telescope to be processed, (string), eg. 'C1','C2','C3'
	Stdte:	The starting date specified as a string: YYMMDD, eg. 960601
	Endte:	The ending date specified as a string: YYMMDD, eg, 960630

 OUTPUTS:
	"Monthly" minimum FITS files in $MONTHLY_IMAGES; filenames have dates 
	corresponding to 3m_clcl_xx'*'.fts
	Logs written in $MONTHLY_IMAGES/logs

 KEYWORDS:
	ALL_YEARS: Use daily images from multiple years.
	FWPW: String representing filter/polarizer combination; if not
		   set, defaults to 'clcl' for C3 and 'orcl' for C2
	INTERVAL: Number of days between minimum images; default is 7
	NDAYS: Number of days used to compute the min; default is 27
	MANUAL: Override automatic determination of days to use and filename
	TEST:	Write output in $MONTHLY_IMAGES/testdir
	DOREBIN:	Make output half size (2x2 binned)

 RESTRICTIONS:
	
	
 PROCEDURE:
	IF MANUAL is not set, this procedure calls mk_monthly_min.pro for dates 
	corresponding to the included list of dates in between the starting and 
	ending dates. Gaps of more that 2 days are not spanned. IF MANUAL is set, 
	all days in the input interval (inclusive) which exist will be used to 
	compute the minimum image, and it will be named according to the midpoint 
	of the interval of days used.

 EXAMPLE:
	To make all the monthly minimum images for the month of June, 1996 for
	C3:

		MAKE_ALL_MONTHS,'c3','960601','960630'

 MODIFICATION HISTORY:
 	Written by:	RA Howard, 20 October, 1996
 	Mofified:	
		06 Oct 1997 SEP - Added ALL_YEARS flag
		1999/02/11  NBR - Added keywords FILT_POLR, DAYS_BETWN, DAYS_COMPT
		1999/12     NBR - Make y2k compliant
		   Jan 2000 NBR - Add NOREBIN keyword
		   Jun 2000 NBR - Add ROLL keyword
	25Feb02, NBR - Use 3m_clcl_xx'*'.fts for dates used.
	10Jul02, NBR - Add TEST keyword
	17Jul02, NBR - Change NOREBIN to DOREBIN
	28Jan04, NBR - default nbetween = 7

      %W% %H%   LASCO IDL LIBRARY


MAKE_AVG_DAILY_ROLL

[List of Routines] (See ./data_anal/make_avg_daily_roll.pro)

ro make_avg_daily_roll, rollsi, timesi, rollso, timeso, C3=c3, C2=c2, NYEARS=nyears

 Writes file with a median value for roll for each day in input file

 INPUTS
  rollsi	FLTARR	array of roll values
  timesi	UTC Structure ARR	utc date,time of each roll value

 KEYWORDS (1 is required)
  /C2	write c2 file
  /C3	write c3 file

  NYEARS = number of years included in inputs (default 1)

 %H, %W - IDL NRL LASCO Library


MAKE_BROWSE

[List of Routines] (See ./reduce/make_browse.pro)

 NAME:
		MAKE_BROWSE

 PURPOSE:
		Generates a "browse" image from the input image

 CATEGORY:
		REDUCTION

 CALLING SEQUENCE:
		Result = MAKE_BROWSE (Image, File_name)

 INPUTS:
		Image = Input 2D image
		File_name = String containing the File name 

 KEYWORD PARAMETERS:
		Maxpix = Maximum number of columns or rows of browse image. 
                        If maxpix of browse image is not defined then set to 
                        256
		Noblob = Controls the output
		Nokeep = Delete the JPEG file
		Qual   = starting quality indicator (<=100)

 OUTPUTS:
		Result = The JPEG compressed browse image is returned as the 
			 function result if noblob is not set.  If set the 
			 output is the browse image without compression

 PROCEDURE:

      The browse image is defined to be a byte array not larger than the 
      optional input parameter or a default size if it is not defined.  The 
      browse image is compressed using the JPEG algorithm.  The objective is 
      to create a representation of the full image which is less than 3 kbytes,
      in order to be able to quickly transfer the information electronically.
      The browse image can then be used to determine if the full image should 
      be transferred, which might take much longer to transfer.  The browse 
      image is not intended to be used for analysis purposes.

      browse = JPEG ( bytscl (congrid(image,maxpix,maxpix)))

 MODIFICATION HISTORY:
	Written  RA Howard, NRL, 4 Oct 1995
       Version 1
       Version 2  RAH  2/12/96   Changed order from 1 to 0
       Version 3  RAH  3/09/96   Write image to specific directory and 
                                 optionally save.  Scale image using log
       Version 4  RAH  3/29/96   Changed max size to 2000 bytes, qf=90
       Version 5  RAH  4/20/96   Removed "w" as second character in name
       Version 6  RAH  5/15/96   Corrected error if zeros everywhere
       Version 7  RAH  5/25/96   Use histogram equalization to scale image
       Version 8  RAH  10/21/96  Subtract background model
       Version 9  RAH  02/20/97  Correct case of constant image
	VERSION 10 NBR	02/01/02  Add /SH to SPAWN

       @(#)make_browse.pro	1.8 02/01/02 LASCO IDL LIBRARY


MAKE_DAILY_IMAGE

[List of Routines] (See ./synoptic/make_daily_image.pro)

 NAME:
	MAKE_DAILY_IMAGE

 PURPOSE:
	This function generates the daily image for the SOHO summary images.

 CATEGORY:
	LASCO_SYNOPTIC

 CALLING SEQUENCE:
	Result - MAKE_DAILY_IMAGE (Date, Tele)

 INPUTS:
	Date:	Date for which the image is desired, (YYMMDD)
		If undefined, then uses the current date
	Tele:	Telescope designator, string of 'c2','c3'

 KEYWORD PARAMETERS:
	TIME:	If set use the image closest to the specified time (HHMM)
		else uses the latest image
	FITS:	If set create a FITS file as output
	GIF:	If set create a GIF file as output
	LZ:	IF set, use level 0 data else use quick look data
	SCREEN:	If set, writes the resultant image to the current display
		else writes to the Z buffer
	ARCHIVE:	If set, write to the SOHO Summary file area

 OUTPUTS:
	Result:	Returns the byte-scaled image if successful, else returns -1.

 RESTRICTION:
	Only works for C2 and C3

 PROCEDURE:
	If the input parameter, date, is defined, then that date is used
	otherwise the current date is used.  Then reads in the img_hdr.txt 
	file corresponding to the desired date.
	Finds the image that is closest to the input time if set, else
	finds the latest image.  The standard synoptic type of image is
	selected (C2: orange/clear; C3: clear/clear).  The image shold
	be large enough and not have too many missing blocks.
	Then the image is scaled by the background model.

 EXAMPLE:
	cimg = MAKE_DAILY_IMAGE('960810','c3')

 MODIFICATION HISTORY:
 	Written by:	S.E. Paswaters, NRL, Dec 1997
	1/31/01, nbr - Change bkg model settings for C2

	%H% %W% LASCO IDL LIBRARY


MAKE_DIFF_MPEG

[List of Routines] (See ./movie/make_diff_mpeg.pro)

 Project     : SOHO - LASCO/EIT

 Name        : MAKE_DIFF_MPEG

 Purpose     : Make Diff MPEG from existing MVI files

 Use         : IDL>	MAKE_DIFF_MPEG, '020120', '020205'

 Inputs      :

 Optional Inputs:

 Outputs     :

 Keywords    :

 Comments    :

 Side effects:

 Category    : Image Display.  Animation.

 Written     : Jake Wendt, NRL, February 2002

 Version     :	020401	jake	modified cleanup lines to remove files then dirs
		030117	jake	made working directories in /tmp
		030205	jake	switched search dirs for existing mvis
				to search monthdir first
		030715	jake	adding PNG keyword to pass on



	%H% %W% : LASCO IDL LIBRARY


MAKE_FITS_HDR

[List of Routines] (See ./reduce/make_fits_hdr.pro)

 NAME:				MAKE_FITS_HDR

 PURPOSE:			Generate a FITS header for Level 0.5 images

 CATEGORY:			REDUCTION

 CALLING SEQUENCE:		Result = MAKE_FITS_HDR (h,img)

 INPUTS:			H   = Header structure
				Img = Image

 OUTPUTS:			Result = FITS header

 PROCEDURE:			Makes calls to FXADDPAR

 MODIFICATION HISTORY:		Written RA Howard, NRL, 31 Oct 1995
   Version 2  rah 16 Nov 1995   Converted filter/polarizer/lp_num/readport
   Version 3  rah 11 Dec 1995   Corrected tag name of polarizer & eit/detector
   Version 4  rah 18 Jan 1996   Corrected exposure time to be entire exp & 
                                added subsection times
   Version 5  rah 15 Feb 1996   Corrected DATE-OBS/TIME-OBS
   Version 6  rah 22 Feb 1996   Corrected FP WL Keywords to be 8 characters
   Version 7  rah 18 Mar 1996   Added KW for LEB summing, and corrected exptime
   Version 8  rah 19 Mar 1996   Corrected exposure time for dark and continuous images
   Version 9  rah 27 Mar 1996   Corrected lp_num structure tag
   Version 10 rah 03 Apr 1996   Modified exposure mid point names
   Version 11 rah 05 Apr 1996   Compute exposure time in real
   Version 12 sep 17 Jul 1996   Modified to work with new LEB header (obev145+)
                                units on exp[1,2,3], version, order
   Version 13 rah 22 Jul 1996   Increased WAVELENG to double precision
   Version 14 rah 01 Aug 1996   Modified exptime calc for new OBE version
                                Increased FP_WL* to double precision
   Version 15 sep 18 Jun 1997   Changed call for new OFFSET_BIAS()
   Version 16 rah 18 Jul 1997   BITPIX set to reflect the image data type

 @(#)make_fits_hdr.pro	1.10 07/24/97 :NRL Solar Physics


MAKE_GIFS

[List of Routines] (See ./inout/make_gifs.pro)

 Project     : SOHO - LASCO/EIT
                   
 Name        : MAKE_GIFS
               
 Purpose     : Write GIF images from list.
               
 Use         : IDL> MAKE_GIFS, list

 Inputs      :	list	STRARR	List of FITS files

 Keywords    : SAVEDIR STRING	Directory where images are to be saved. Default is '.'.
		NOLABEL		When set, omits time and logo on images (c3 only)
		PICT	Save as PICT files
		VIDEO	Save as 640x480 video size
		TIFF	Save as TIFF files
		PAN	Rebin image (ex: Pan=0.5)
		BW	Use B&W color table
		NOLOGO	Omit logo only (c3 only)

 Calls       : For EIT you need to have $SSW/soho/eit in your IDL_PATH

 Side effects: None.
               
 Category    : Image Display.  Animation.
               
 Written     : Nathan Rich, Jan 2000.  From rtmvi.pro
               
 Changes     :
	5/9/2000, NBR, Add PICT option
	10/27/00, NBR, Auto create pictprefx
	 3/12/01, nbr, Add TIFF option
	 5/ 2/01, nbr, Add /sh to spawn; save picts in SAVEDIR
	 5/22/01, nbr, Add BW keyword, NOLABEL for C3
	 4/ 8/02, nbr, Implement eit_prep
	 9/20/02, nbr, Change output filename for TIFF and GIF; add NOLOGO and NOLABEL for C2


 10/01/02 @(#)make_gifs.pro	1.4 :LASCO IDL LIBRARY


MAKE_IMAGE_EIT

[List of Routines] (See ./movie/make_image_eit.pro)

UNCTION MAKE_IMAGE_EIT, img, hdr, $
FIXGAPS=fixgaps, $
NOLABEL=nolabel, $
NOBYTESCL=nobytescl, $
FILENAME=filename, $
USEEITPREP=useeitprep, $
RDIFF=rdiff


 Returns scaled EIT image with time label and sets color table for viewing
 image.

 INPUTS:
  img		512x512 or 1024x1024 EIT image array
  hdr		LASCO header structure

 OUTPUTS:
  1024x1024 BYTARR

 KEYWORDS:
  FIXGAPS	If set, replace gaps with previous image (in common block)
  NOLABEL	If set, do not put on time label
  NOBYTESCL	If set, floating point array with no time label
  FILENAME	Set to full filename if image to be read here
  USEEITPREP	Set if wanting to use EIT_PREP, must also use FILENAME
  RDIFF	Set equal to variable which will contain scaled running difference image

 SIDE EFFECTS:
  changes color table

 MODS:

 1999/05/21	N B Rich	Add FIXGAPS keyword, common block
 1999/05/26	N B Rich	Move case statement; make all images 1024x1024
 1999/11/15 	N B Rich	Adapt for Mercury transit images (horiz. strips)
 1999/12	N B Rich	Check for allowable nz
 2000/01	N B Rich	Add NOLABEL keyword
 2000/09/08	N B Rich	Add EIT_NORM_RESPONSE and change bmin/bmax settings
 2000/09/22	n b rich	Divide by exptime and sumcol^2
 2001/01/29    n.b.rich	Change bmin/bmax after updating SSW library
 2001/02/09	n.b.rich	Move reduce_std_size and remove box_refn
 2001/02/12	n.b.rich	Add NOBYTESCL option
 2001.03.01	n.b.rich	Reset bmin,bmax and colortables for new flat field;
				fixed hsize
 2001.03.02	n.b.rich	Fix ind00 again and fix call to EIT_DEGRID
 2001.03.06	n.b.rich	Do ind00 before reduce_std_size
 2001.04.11  	n.b.rich	Add default box_avg values

 20010516		jake	Added autoscaling of images based on median to help
				correct for binned image problems.  Corrected indentations
				on all code.
 2001.06.07	n.b.rich	Omit /ORIG from EIT_DEGRID call for SSW
 20010724		jake	began incorporation of EIT_PREP
 2002.04.08	n.b.rich	Change location of .dat files
 2002.08.05	n.b.rich	Change lasco_hdr2struct to lasco_fitshdr2struct
	030723		jake		rotate image if CROTA1 = 180
 2003.12.22, nbr - Add rdiff keyword

  12/23/03 @(#)make_image_eit.pro	1.11 - IDL NRL LASCO Library


MAKE_INDEX

[List of Routines] (See ./reduce/make_index.pro)

 Project     : SOHO - LASCO/EIT

 Name        :	MAKE_INDEX

 Purpose     :

 Use         : IDL>

 Inputs      :

 Optional Inputs:

 Outputs     :

 Keywords    :

 Comments    :

 Side effects:

 Category    :

 Written     :

 Version     :

 Modification:	020606 Jake Changed End of Repeat loop to check numpckts as well
	03.10.08, nbr - change name of output file

 @(#)make_index.pro	1.5 10/08/03 :LASCO IDL LIBRARY


MAKE_MPEG

[List of Routines] (See ./display/make_mpeg.pro)

 MAKE_MPEG

 Usage:
	make_mpeg, filename[, destdir]

 Arguments:
	filename string	input	The name of the MPEG file (if not
				given, then use lasco.mpg).
	destdir	string	input	The name of the directory in which to
				put the mpeg file. (If not given then
				use: ${LASCO_WORK}/${USER}/gif)

 Keywords:
	times	int	input	If set, then put the time on the
				frames before dumping them. (1 -
				bottom left, 2 - bottom right, 3 - top
                                                left, 4 - bottom right)
	scratchdir string in	The directory to which to write the gif
				files (default = destdir)
	table	int	input	The colour table to use
	range	float	input	The range of image values to display
				(default min & max of first image)
	ncolours int	input	The number of colours to use in each
				frame (Default !d.table_size) N.B. if
				this key is set, then TABLE must be
				set as well.
	names	int	input	If set, put the names of the input
				files on the files before dumping them
				(same code as time and note it's not
				clever enough to check if they are
				going on top of each other)
	rescale	int	input	The rescaling factor (-n = increase by
				2^n, +n = decrease by 2^n)
 Method:
	Saves the selected images as PPM (Portable PixMap) format
	files and then spawns "mpeg_encode" to convert them to an MPEG
	file (the PPM files are deleted after the operation)

 Restrictions:
	1) Can handle a maximum of 1000 frames
	2) Must have MPEG_ENCODE available.
	3) Any prexisting files called Lnnn.ppm or MPEG.PARAM will be
		overwritten.

 History:
	Original: 23/7/96; SJT
	Change from GIF to PPM: 25/7/96; SJT


MAKE_VHS_GIF

[List of Routines] (See ./movie/make_vhs_gif.pro)

 NAME:
	MAKE_VHS_GIF

 PURPOSE:
	This procedure makes a series of gif files from a movie, 
	stored in mvi format for putting onto a VHS tape

 CATEGORY:
	Movie

 CALLING SEQUENCE:
	MAKE_VHS_GIF,Gif_file


 INPUTS:
	Gif_file:	A string giving the root file name of the gifs:
			It should be no more than 8 characters.  It is
			suggested that the name should end in gif, leaving
			5 characters for the useful information.  The
			files will then have an extension of 001, 002, etc.
			A path can be included at the beginning of the string.

 OPTIONAL INPUTS:
	Movie_file:	The name of the .mvi file.  If this is not present
			you will be allowed to select the file.
	
 KEYWORD PARAMETERS:
	Title:		An optional title to be added to the top of the image.

 OUTPUTS:
	A series of gif files will be written to disk.

 EXAMPLE:
	To create a series of gif files:

		MAKE_VHS_GIF,'c3j96gif',title='SOHO/LASCO  3.7 - 32 Rs'

 MODIFICATION HISTORY:
 	Written by:	R.A. Howard, NRL, 9/25/96

	@(#)make_vhs_gif.pro	1.2 09/12/97 LASCO IDL LIBRARY


MASKE

[List of Routines] (See ./display/maske.pro)

 NAME:  
	MASKE

 PURPOSE:
	Performs a unsharp mask treatment with an image

 CATEGORY:
	PICO

 CALLING SEQUENCE:
	result = MASKE(image, level, region)

 INPUTS:
	image:  The two dimensional array containing the
		image to be masked.
	level:  An integer specifying the level at which
		the image should be treated. See procedure
		for more explanations
	region: The size of the averaging region for the
		smoothed image. See below.

       If both level and region are NOT set, a default 
       value of 3,8 is supposed.

 OPTIONAL INPUTS:
	None

 KEYWORD PARAMETERS:
	MEDIAN: If set, the median filter is used to smooth
		the image instead of a simple averaging
		mean value filter
	NOAUTOLIMIT: The image will not be limited to the 
		same levels as the input image.

 OUTPUTS:
	result: The resulting image, treated by the unsharp
		mask

 OPTIONAL OUTPUTS:
	None

 EXAMPLE:
	To treat an image with a 8x8 unsharp mask at a level
	of 3 type

	result=MASKE(image,3,8)
	
 COMMON BLOCKS:
	None

 SIDE EFFECTS:
	Unknown

 RESTRICTIONS:
	None

 PROCEDURE:
	From the original image, multiplied by (level+1), 
	the original image multiplied by level and
	smoothed over region x region pixels is subtracted.
	By default the IDL SMOOTH(image,region) function is 
	used. The MEDIAN functioon can be used by setting
	the MEDIAN keyword.

 MODIFICATION HISTORY:
	Alexander Epple, AUG-1994


MASK_OUT

[List of Routines] (See ./exposure/mask_out.pro)

 MASK_OUT
	Determine missing telemetry blocks.

 Usage:
	mask=mask_out(img,hdr)

 Return value:
	mask	byte	A 2-d byte array with the same size as the
			input image with zeroes in the telemetry holes
			and ones elsewhere.

 Arguments:
	img	any	input	The image to be analysed
	hdr	string	input	The FITS header associated with the
				image.

 Method:
	The size of a telemetry block in the image is determined from
	the SUMCOL or LEBYSUM, R?COL and the actual image size. The image is
	rebinned to a 4-d array its minimum value is subtracted and
	the resulting array is summed over the telemetry
	blocks. Zeroes in the summed array are assumed to be missing
	blocks. This is justified as (a) real data are +ve definite
	and (b) the probability of getting the whole of a telemetry
	block having the same value if there are real data present is
	vanishingly small. This algorithm has the advantage of not
	being dependent on whether the exposures have been normalized
	or whether the camera bias has been subtracted.


MB2STRMAP

[List of Routines] (See ./reduce/mb2str/mb2strmap.pro)

 PROJET:
	SOHO - LASCO

 NAME:
	MB2STRMAP

 PURPOSE:
  Convert a missing block image map to a 'string map'

 CATEGORY:
  missing blocks

 CALLING SEQUENCE:


 INPUTS:

 OUTPUTS:


 OPTIONAL OUTPUTS:

 KEYWORD INPUT:


 MODIFICATION HISTORY:
	V1.0 Writen by A.Thernisien on 18/09/2001
 CVSLOG:
  $Log: mb2strmap.pro,v $
  Revision 1.2  2002/07/11 07:24:17  arnaud
  Insertion of the Log in each header



MIN_NZ

[List of Routines] (See ./exposure/min_nz.pro)

 MIN_NZ
	Extract the smallest positive element of an array.

 Call:
	val = min_nz(array[, mindex, max=max])

 Return Value:
	val	any	The smallest positive value or -1 if no positive
			values.

 Argument:
	array	any	input	The array whose min is needed
	mindex	long	output	The (first) location in the array at
				which the min value is found.

 Keyword:
	max	any	output	The maximum value in the array.

 History:
	Prototype: 24/1/91; SJT
	Improve and changes to smallest >0: 22/2/91; SJT
	Add MAX keyword: 31/3/92; SJT
	Add optional second argument for location of min value:
							20/8/93; SJT
	Add "finite" condition: 6/12/93; SJT


MISS_BLOCKS

[List of Routines] (See ./reduce/miss_blocks.pro)

 NAME:
	MISS_BLOCKS

 PURPOSE:
	This function returns a list of the missing telemetry block numbers.

 CATEGORY:
	REDUCE

 CALLING SEQUENCE:
	Result = MISS_BLOCKS (Img, Hdr)

 INPUTS:
	Img:	The image to be processed
	Hdr:	The fits header of the image

 OUTPUTS:
	The function result is a long word array of the absolute block numbers
	that are missing.  If no blocks are missing, the result is -1.

 PROCEDURE:
	The input image is rebinned to a 32 x 32 array and then teh IDL where 
	function is used to identify the locations where the super pixels are
	zero.

 MODIFICATION HISTORY:
 	Written by:	RA Howard, 4 Oct 1995

	@(#)miss_blocks.pro	1.1 10/05/96 LASCO IDL LIBRARY


MISS_PCKTS

[List of Routines] (See ./packets/miss_pckts.pro)

 NAME:
	MISS_PCKTS

 PURPOSE:
	This procedure generates a file containing a list of missing
	science telemetry packets in a d01 file in same location

 CATEGORY:
	LASCO PACKETS

 CALLING SEQUENCE:
	MISS_PCKTS

 OPTIONAL INPUTS:
	Fname:	Specifies the telemetry filename to read in.  If no
		argument is present then all files are read in.

 KEYWORDS:
  /AUTO	Analyze all d01 files in $TMOUT
	
 SIDE EFFECTS:
	A file "miss_pckts.lst" is generated and put into the user's home
	directory.

 PROCEDURE:
	The input files must reside in the current working directory.
	It then finds missing or out of order packets in science stream by 
	looking at the packet counter, which should increment by one.

 EXAMPLE:
	To process all telemetry files in the current directory:

		MISS_PCKTS

 MODIFICATION HISTORY:
 	Written by:	R.A. Howard, NRL, 7 Mar 1996
	961216 by N. Rich	prompt for input on processing status, CD info;
				changed variable volno to seqno; made /all
				keyword the default
	970131 by N. RIch	use TMFILES env variable
	970210 by RAHoward	Determine packet length to account for TM rate
	970328 by N. Rich	change default TM directory; save results file
				to start directory rather than home
	970826 by N. RIch	change default TM dir; add suff prompt
	990401 by N. Rich	Change default TM dir to gorgon; allow 4-digit
				volume numbers
	990621 by N. Rich	Change seqno to STRING input
	2000/02   N. RIch	Change default TM dir

	000630 - the Jake -	Beginning modifications to provide full scripting
				ability of this script.  ie. remove all interaction 
				and set default values.
				fname
				seqno
				vol
				proc
	000922 - the Jake -	Changed hardcoded directories to GETENV's
	001006 - the Jake - Changed write outfile in $TMOUT dir instead of 'old' directory
	001229 - nbr -	Changed getenv TMFILES to TMOUT
	03.10.10, nbr - Write output file for each input file (each day)

	@(#)miss_pckts.pro	1.21 10/10/03 LASCO IDL LIBRARY


MKDI_C1

[List of Routines] (See ./display/mkdi_c1.pro)

 Project	: SOHO - LASCO/EIT

 Name		: MKDI_C1
	
 Purpose	: Make C1 image of the day.
	
 Explanation	: This procedure will make C1 image of the day.For selected day
		  this routine will find the last pair of on-line and off-line 
		  images and  will process them to lasco 'level .99'.
	 
 Use		: IDL> MKDI_C1 [,DAY=day [,/SCREEN [,/GIF ,....]]]       
                 Without any inputs, program will use default values.

 Keyword parameters:
       DAY:    Selected day: day='960703' (string)
       FILTER: The filter: filter='Fe XIV' (string) , default value
       POLAR:  The polarizer: polar='Clear' (string) , default value
       ROWS:   The number of rows in image: rows=640 (integer), default value
       COLS:   The number of cols in image: cols=768 (integer), default value
       LEBP:   The LEB program: lebp = 'Sum/Diff' (string)
       WAVE:   The off-line and on-line wave length: wave=[5309.2,5302.4]
       SCREEN: Display result to the X-Window: /screen
       FITS:   Write result as a FITS file: /fits 
       PS:     Write result as a PostScript file: /ps
       GIF:    Write result as a GIF file: /gif
       ARCHIVE:Write result as a GIF file in 'lastimage.gif' format  
       QL:     Make daily C1 image from Quick Look data: /ql
       LZ:     Make daily C1 image from Lasco_lz data: /lz
       COSMIC: Remove cosmic rays: /cosmic
       OWNCT:  Use own color table: ownct (structure: ownct.r,ownct.g,ownct.b)
       LCT:    Load IDL color table: lct=8 GREEN/WHITE LINEAR
       GCT:    Gamma_ct: gct=.25  
       UP:     To cut an image at a certain upper value of its histogram: up =.9996
       LOW:    To cut an image at a certain lower value of its histogram: low=.01
       MINBOX: To cut an image at the median minimum of the background:   /minbox
	TIME:	Get closest image to this time: TIME='8:00' (string)
      
 Example	: IDL> MKDI_C1 
		  Without any keywords program will use default values.

		  Or you can use keywords:
 Example    	: IDL> MKDI_C1,DAY='971031',LEBP='Line Sca',/COSMIC

 Calls		:

 Comments	:

 Side effects	: None.

 Category	: Image Display. Data analysis.

 Written	: Borut Podlipnik, MPAe Oct. 15 1997.

 Modified	:  BP	13 Jan 1998 - Added keyword TIME.

 Version	: 1.0  10/15/97 LASCO IDL LIBRARY


MKMOVIE

[List of Routines] (See ./movie/mkmovie.pro)

 Project     : SOHO - LASCO/EIT
                   
 Name        : MKMOVIE
               
 Purpose     : Load FITS files into pixmaps and call WRUNMOVIE for animation.
               
 Explanation : This procedure sorts the images by time, reads them, and 
		normalizes to the exposure time of the first image.
		WRUNMOVIE is called to start a widget interface for the 
		animation sequence.  The on_off_diff keyword results in a movie
               where each on line image is displayed with a nearby offband image
               subtracted. Default is to rectify images by CROTA1.
               
 Use         : MKMOVIE, list, bmin, bmax, /TIMES, /DIFF, /NO_NORMAL, /NO_SORT, $
                        UNSHARP=unsharp, PAN=pan, COORDS=coords, BOX=box, $
                        /RATIO, /USE_MODEL,/FLAT_FIELD,/ON_OFF_DIFF,/MASK_OCC,/LG_MASK_OCC
                        /RUNNING_DIFF, /RADIAL, /DEGRID, /FIXGAPS, /LOG_SCL, /SQRT_SCL, $
			 FILL_COL=fill_col, SAVE=save

      Example: IDL> MKMOVIE, 'list960123', -100, 100, /DIFF

      Example: If you want to display BYTARR images straight from the FITS files without
		any scaling use:
               IDL> MKMOVIE, 'list', 0, 255, /NO_NORMAL, /NO_SORT
    
 Inputs      : list : Name of file containing names of FITS files.
		       Or a STRARR of the image names.
               bmin, bmax : Minimum and maximum DN for BYTSCL.
               
 Outputs     : None.
               
 Keywords    : The following keywords apply to all telescopes (C1,C2,C3,EIT)

		DBIAS = amount (DN) to subtract from raw image, in addition to bias
		/VERBOSE   : Print more info about each frame
		LABELPOS   : Set equal to 2-d array containing x-pos and y-pos of lower left
			corner of label printed on each frame; default is [10,10] for full frame
		/NORECTIFY : DO NOT Rectify images to solar north up based on roll value in 
			     $ANCIL_DATA/attitude/roll
		/KEEP	   : Tell wrunmovie not to erase pixmaps
		/TIFF	   : Save movie as TIFF frames
		/BAD_SKIP  : Skip bad frames based on nz median
		/C23	   : Use occulter mask for C2
		/NOCAM	   : Do not print detector name with time
		/HIDE_PYLON: hide pylon based on pixel values 
		/SQUARE    : Makes square 480x480 frames for video (also set /VIDEO)
		/NOEXPCORR : Don't do exposure time correction, but subtract bias
		/OUTER	   : Set along with MASK_OCC to fill in outer mask only
		/STAIND	   : Start with this position in the input file (for output filenames)
		/NX,/NY	   : Output size in pixels (superceded by PAN)
		/VIDEO	   : Generate frames ready to be saved as PICT files for video
		/SDIR       : Directory to save video frames in
		/CREM	   : Remove cosmic rays using REMOVE_CR (2 image) procedure;
			     Set CREM = 2 if you wish to define an area not to do CR removal
		/LOGO	   ; Add LASCO logo to bottom right corner
		/AUTOMAX   : Compute bmin and bmax based on median
		/LEE_FILT   : Apply Leefilt function to filter noise.
               /TIMES     : Set this keyword to display date and time in images.
		/DIFF      : Set this keyword to make a difference movie.  The 
			     first image is subtracted from all subsequent images.
		/RUNNING_DIFF  : Make a difference movie, subracting the preceding image.
		/NO_NORMAL : Don't normalize exposure times to that of the first image or subtract bias
		/NO_SORT   : Don't sort by time in header.
               UNSHARP    : Set this keyword to make a movie of unsharp masked images.
                            The value of the keyword if any is set to the size of the
                            unsharp mask, default=25
                            Example:  A value of 9 would form a 9x9 unsharp mask
		/RATIO     : If using diff or running_diff display data as ratio of image/reference frame
               /MASK_OCC  : applies a sun sized circle and removes the internal part of the image
               /LG_MASK_OCC:applies a sun sized circle and removes the part of the field to 1.2Rsun
                            for C1 (especially good for the longer 100s exposures).  
			     For C3 the pylon is masked
		/LOG_SCL   : Applies ALOG10() function to image before byte scaling
		/SQRT_SCL  : Applies SQRT() function to image before byte scaling
		/FIXGAPS   : Set to 1 to fill data gaps in image with color specified by FILL_COL
		             Set to 2 to fill data gaps in image with values from previous image
		FILL_COL   : Set this keyword to the color index to use for data gaps and occ masks.
		SAVE       : For use in batch mode.  Set this keyword to the name of the .mvi file
			     to save as.  Routine will save movie and then exit.
		PAN        : Default is to resize images to pixel size of the first image.  Set this
			     keyword to perform additional scaling.  Example: set to 0.5 for 2x2 rebinning.
		COORDS     : Set to 4 element array of image coordinates to use relative to 1024x1024 image.
			     Example: COORDS=[0,1023,128,895] for C2 Equatorial Field
		BOX        : Set to 4 element array of image coordinates to use for box normalization 
			     relative to (rectified) 1024x1024 image. Images are scaled relative to average counts
			     in box of first image. Example: BOX=[461,560,641,740]
		REF_BOX    : Set to avg counts specified in BOX otherwise first image is used

             : The following keywords apply only to C1

               /ON_OFF_DIFF: differences each on line image with an image taken at a continuum wavelength
               /FLAT_FIELD : normalizes each image by a door closed image to remove the solar spectrum
               /RADIAL	    : applies a radial filter

             : The following keywords apply only to C2 and C3

		USE_MODEL : If using diff or running_diff use background corona model
                           as base frame.   USE_MODEL=1 for closest average (any_year) monthly model
                                            USE_MODEL=2 for closest monthly model
                                            USE_MODEL=3 for for overall yearly model
					     USE_MODEL= array to do subtraction or ratio with

             : The following keywords apply only to EIT

               /DEGRID	    : applies the degridding algorithm

 Calls       : WRUNMOVIE

 Side effects: Creates multiple pixmaps.
               
 Category    : Image Display.
               
 See Also    : WMKMOVIE.PRO is a widget front-end to this procedure.
               GENERIC_MOVIE.PRO reads in bytescaled fits or gif files and creates a movie.
               
 Prev. Hist. : None.

 Written     : Scott Paswaters, NRL, Jan 1996.
               
 Modified    : SEP 29 May 96 - Place frames into multiple pixmaps instead of 1 large
				pixmap because of limitations on window size in IDL.
               SEP  9 Jul 96 - Read in img headers as structures and pass to wrunmovie
               SEP 18 Oct 96 - Add option to pass in STRARR of image names instead of filename.
               SEP 24 Oct 96 - added /RATIO and /USE_MODEL options
               RAH 13 Dec 96 - added check for daily median image which doesn't have bias
               CMK 16 Feb 97 - added all C1 related features and changed the procedure name to mkc1movie2
           RAH/SEP 14 Mar 97 - integrated mkc1movie2 features into mkmovie
               SEP 21 Mar 97 - corrected bias subtraction for LEB summed images
               SEP 01 Oct 97 - added /SUM keyword to OFFSET_BIAS call
               SEP 22 Oct 97 - fixed divide by zero error for /RATIO option
               SEP 31 Oct 97 - Binned images are scaled (/bin^2) for level_05 images only
               SEP 13 Nov 97 - Added /FLAT_FIELD for EIT, added /NEW flag to EIT_DEGRIDN
               RAH 02 Feb 98 - Now normalizes to calculated exposure time (if data exists).
		NBR 06 Nov 98 - Change default fillcol to median(image); change LG_MASK_OCC for c3 to use C3clearmask2.dat
		NBR 16 Dec 98 - Add LEEFILT keyword
		NBR  8 Feb 99 - Add AUTOMAX keyword
		NBR 11 Feb 99 - Move up first call of REDUCE_STD_SIZE
		NBR 17 Feb 99 - Do not divide by lebxsum^2 (done in REDUCE_STD_SIZE)
		NBR 10 Mar 99 - Update AUTOMAX keyword
		NBR 19 Mar 99 - Add LOGO keyword
		NBR 26 Mar 99 - Add DISTORT keyword, update LEE_FILT keyword, print time stats
		NBR  5 Apr 99 - Add CREM keyword before BYTSCL; add VIDEO keyword; refresh
				ref image for longer movies; allow arbitrary final size (NX by NY)
		NBR  9 Apr 99 - Move initialization of yloc 
		NBR 29 Apr 99 - Read obs. times from img_hdr.txt instead of file headers for 
				sorting; read other header info when image is read in instead 
				of at beginning
		NBR 30 Apr 99 - Fix fhsize problem; put AUTOMAX in loop
		NBR  3 May 99 - Fix header/time offset problem when movie starts w/ 2nd frame
		AEE  4 May 99 - Added /SH keyword to spawn command
		NBR  5 May 99 - Move image resize, bias subtraction, ind0/ind00 assignment; 
				Change fhsize, fvsize assignment
		NBR 14 May 99 - Change dumhdr line for determining ind00 in EIT case
 ** diverges from library version
		NBR    May 99 - Add SQUARE keyword; check for img_hdr.txt file; add DBIAS, HIDE_PYLON keywords; add toobig variable to ind00; add NOCAM keyword
		oNBR    Jun 99 - Move rebin/congrid to end; fix hsize,vsize so PAN works for subfields; fix suncen, sec_pix; 
		NBR	Jun 99 - let USE_MODEL be set to model you want to use
		NBR    Jul 99 - Fixed problem with COORDS
		oNBR 27 Aug 99 - IF exptime LT 15 sec then dbias = -7; BAD_SKIP keyword; change win_index incrementation
		NBR    Sep 99 - Move ADD LOGO to before REBIN; use updated EIT_DEGRID and EIT_FLAT
		NBR    Oct 99 - Add RUNNING_DIFF check in FIXGAPS; change c2 values for AUTOMAX; move 'fill gap with
				previous image' to before take ratio; Move USE_SHARP outside of RATIO group and combine
				with UNSHARP (both options use POINT_FILTER and subtract stray light)
		oNBR   Nov 99 -  Move subtract bias to before REDUCE_STD_SIZE; Fix problem with ind00
		NBR   Dec 99 -  Add TIFF keyword; 
		oNBR  Dec 99 - 	use c3clearmask2.fts with C3 LG_MASK_OCC
		NBR   Jan 00 -  Mask edge of all images; 
		oNBR  Jan 00 - 	change !D.N_COLORS to !D.TABLE_SIZE
	NBR	Feb 00 - Change R to P for determining img0_x1 etc.; Move GET_SUN_CENTER to after REDUCE_STD_SIZE
	NBR	Mar 00 - Switch USE_MODEL options ALL and ANY_YEAR; Change HIDE_PYLON and LG_MASK_OCC; fix C1 ON_OFF_DIFF; convert C1 hdr to structure; do not multiply by 100 for C1 log scale
	NBR    Apr 00 - Skip files with READFITS errors
	NBR    Jun 00 - Compute dbias for C3 based on pylon values, corrected for exp time;
			Move CREM to before diff or ratiopl
	NBR    Aug 00 - MK4 compatibility; pylon changes (box_x1,etc and pylon2)
	NBR    Jan 01 - Rebin c3mask and c3 corner box; change AUTOMAX values for daily mvis;
			Implement BIAS keyword with REDUCE_STD_SIZE; futz with ind0 and ind00
	NBR 3/21/01 -	Use /ORIG for degrid
	NBR 3/23/01 -	Don't skip any frames unless BAD_SKIP set (messes up headers)
			Put readfits in REPEAT loop
	NBR 4/6/01  - 	Don't subtract bias in REDUCE_STD_SIZE; move REDUCE_STD_SIZE down
	NBR 4/12/01 - 	Fixed ind0; increased c2 r_occ_out by 0.3
	NBR 6/7/01 - 	Omit ORIG in EIT_DEGRID call to make compatible with new version
	NBR 9/20/01-	Use fvsize instead of vsize when resizing images
	NBR 11/9/01 - 	Don't subtract bias if /NO_NORMAL
	NBR 11/19/01 - 	Use EIT_PREP; subtract bias in REDUCE_STD_SIZE (if not EIT or NO_NORM or monthly)
	NBR 11/20/01 -	Test image times for rolled condition (disabled)
	NBR 12/20/01 - Do rebin after subimage extraction; add FULL keyword
	NBR 01/03/02 - Add RECTIFY keyword
	NBR 01/07/02 - Add caching function; add LABELPOS keyword; VERBOSE keyword
	NBR 02/21/02 - Modify behavior of zero files
	NBR 09/19/02 - Fix parts problem for files in current directory; fixed problem with subfields
	NBR 11/21/02 - Removed file caching
	jake	030717	added lines to read hdr.CROTA1 to determine if image is rolled and compensate
	NBR 03.09.22 - Call wrunmovie with RECTIFIED keyword; correct suncenter and BOX if rectified
	NBR 03.09.25 - Fix DOFULL,img_pan bug
	NBR 03.10.09 - Fix NORECTIFY error
	NBR 04.01.08 - Fix md0 (missing block) error
	NBR 04.03.10 - If fits error, pause instead of stop
 

 SCCS variables for IDL use
 
 Version:	%H% %W% : NRL LASCO IDL Library


MKMOVIE0

[List of Routines] (See ./movie/mkmovie0.pro)

 Project     : SOHO - LASCO/EIT
                   
 Name        : MKMOVIE0 (obsolete version of mkmovie.pro)
               
 Purpose     : Load FITS files into pixmaps and call WRUNMOVIE for animation.
               
 Explanation : This procedure sorts the images by time, reads them, and 
		normalizes to the exposure time of the first image.
		WRUNMOVIE is called to start a widget interface for the 
		animation sequence.  The on_off_diff keyword results in a movie
               where each on line image is displayed with a nearby offband image
               subtracted.
               
 Use         : MKMOVIE, list, bmin, bmax, /TIMES, /DIFF, /NO_NORMAL, /NO_SORT, $
                        UNSHARP=unsharp, PAN=pan, COORDS=coords, BOX=box, $
                        /RATIO, /USE_MODEL,/FLAT_FIELD,/ON_OFF_DIFF,/MASK_OCC,/LG_MASK_OCC
                        /RUNNING_DIFF, /RADIAL, /DEGRID, /FIXGAPS, /LOG_SCL, /SQRT_SCL, $
			 FILL_COL=fill_col, SAVE=save

      Example: IDL> MKMOVIE, 'list960123', -100, 100, /DIFF

      Example: If you want to display BYTARR images straight from the FITS files without
		any scaling use:
               IDL> MKMOVIE, 'list', 0, 255, /NO_NORMAL, /NO_SORT
    
 Inputs      : list : Name of file containing names of FITS files.
		       Or a STRARR of the image names.
               bmin, bmax : Minimum and maximum DN for BYTSCL.
               
 Outputs     : None.
               
 Keywords    : The following keywords apply to all telescopes (C1,C2,C3,EIT)

		/BAD_SKIP  : Skip bad images based on NZ median
		/DBIAS	   : Adjust image bias by given amount
		/NOEXPCORR : Don't do exposure time correction, but subtract bias
		/OUTER	   : Set along with MASK_OCC to fill in outer mask only
		/STAIND	   : Start with this position in the input file (for output filenames)
		/NX,/NY	   : Output size in pixels (superceded by PAN)
		/VIDEO	   : Generate frames ready to be saved as PICT files for video
		/SDIR       : Directory to save video frames in
		/CREM	   : Remove cosmic rays using REMOVE_CR (2 image) procedure;
			     Set CREM = 2 if you wish to define an area not to do CR removal
		/LOGO	   ; Add LASCO logo to bottom right corner
		/AUTOMAX   : Compute bmin and bmax based on median
		/LEE_FILT   : Apply Leefilt function to filter noise.
               /TIMES     : Set this keyword to display date and time in images.
		/DIFF      : Set this keyword to make a difference movie.  The 
			     first image is subtracted from all subsequent images.
		/RUNNING_DIFF  : Make a difference movie, subracting the preceding image.
		/NO_NORMAL : Don't normalize exposure times to that of the first image.
		/NO_SORT   : Don't sort by time in header.
               UNSHARP    : Set this keyword to make a movie of unsharp masked images.
                            The value of the keyword if any is set to the size of the
                            unsharp mask, default=25
                            Example:  A value of 9 would form a 9x9 unsharp mask
		/RATIO     : If using diff or running_diff display data as ratio of image/reference frame
               /MASK_OCC  : applies a sun sized circle and removes the internal part of the image
               /LG_MASK_OCC:applies a sun sized circle and removes the part of the field to 1.2Rsun
                            for C1 (especially good for the longer 100s exposures).  
			     For C3 the pylon is masked
		/LOG_SCL   : Applies ALOG10() function to image before byte scaling
		/SQRT_SCL  : Applies SQRT() function to image before byte scaling
		/FIXGAPS   : Set to 1 to fill data gaps in image with color specified by FILL_COL
		             Set to 2 to fill data gaps in image with values from previous image
		FILL_COL   : Set this keyword to the color index to use for data gaps and occ masks.
		SAVE       : For use in batch mode.  Set this keyword to the name of the .mvi file
			     to save as.  Routine will save movie and then exit.
		PAN        : Default is to resize images to pixel size of the first image.  Set this
			     keyword to perform additional scaling.  Example: set to 0.5 for 2x2 rebinning.
		COORDS     : Set to 4 element array of image coordinates to use relative to 1024x1024 image.
			     Example: COORDS=[0,1023,128,895] for C2 Equatorial Field
		BOX        : Set to 4 element array of image coordinates to use for box normalization 
			     relative to 1024x1024 image. Images are scaled relative to average counts
			     in box of first image. Example: BOX=[461,560,641,740]
		REF_BOX    : Set to avg counts specified in BOX otherwise first image is used

             : The following keywords apply only to C1

               /ON_OFF_DIFF: differences each on line image with an image taken at a continuum wavelength
               /FLAT_FIELD : normalizes each image by a door closed image to remove the solar spectrum
               /RADIAL	    : applies a radial filter

             : The following keywords apply only to C2 and C3

		/USE_MODEL : If using diff or running_diff use background corona model
			     as base frame.  USE_MODEL=1 for closest average (any_year) monthly model
					     USE_MODEL=2 for closest monthly model
					     USE_MODEL=3 for for overall yearly model

             : The following keywords apply only to EIT

               /DEGRID	    : applies the degridding algorithm

 Calls       : WRUNMOVIE

 Side effects: Creates multiple pixmaps.
               
 Category    : Image Display.
               
 See Also    : WMKMOVIE.PRO is a widget front-end to this procedure.
               GENERIC_MOVIE.PRO reads in bytescaled fits or gif files and creates a movie.
               
 Prev. Hist. : None.

 Written     : Scott Paswaters, NRL, Jan 1996.
               
 Modified    : SEP 29 May 96 - Place frames into multiple pixmaps instead of 1 large
				pixmap because of limitations on window size in IDL.
               SEP  9 Jul 96 - Read in img headers as structures and pass to wrunmovie
               SEP 18 Oct 96 - Add option to pass in STRARR of image names instead of filename.
               SEP 24 Oct 96 - added /RATIO and /USE_MODEL options
               RAH 13 Dec 96 - added check for daily median image which doesn't have bias
               CMK 16 Feb 97 - added all C1 related features and changed the procedure name to mkc1movie2
           RAH/SEP 14 Mar 97 - integrated mkc1movie2 features into mkmovie
               SEP 21 Mar 97 - corrected bias subtraction for LEB summed images
               SEP 01 Oct 97 - added /SUM keyword to OFFSET_BIAS call
               SEP 22 Oct 97 - fixed divide by zero error for /RATIO option
               SEP 31 Oct 97 - Binned images are scaled (/bin^2) for level_05 images only
               SEP 13 Nov 97 - Added /FLAT_FIELD for EIT, added /NEW flag to EIT_DEGRIDN
               RAH 02 Feb 98 - Now normalizes to calculated exposure time (if data exists).
		NBR 06 Nov 98 - Change default fillcol to median(image); change LG_MASK_OCC for c3 to use C3clearmask2.dat
		NBR 16 Dec 98 - Add LEEFILT keyword
		NBR  8 Feb 99 - Add AUTOMAX keyword
		NBR 11 Feb 99 - Move up first call of REDUCE_STD_SIZE
		NBR 17 Feb 99 - Do not divide by lebxsum^2 (done in REDUCE_STD_SIZE)
		NBR 10 Mar 99 - Update AUTOMAX keyword
		NBR 19 Mar 99 - Add LOGO keyword
		NBR 26 Mar 99 - Add DISTORT keyword, update LEE_FILT keyword, print time stats
		NBR  5 Apr 99 - Add CREM keyword before BYTSCL; add VIDEO keyword; refresh
				ref image for longer movies; allow arbitrary final size (NX by NY)
		NBR  9 Apr 99 - Move initialization of yloc 
		NBR 29 Apr 99 - Read obs. times from img_hdr.txt instead of file headers for 
				sorting; read other header info when image is read in instead 
				of at beginning
		NBR 30 Apr 99 - Fix fhsize problem; put AUTOMAX in loop
		NBR  3 May 99 - Fix header/time offset problem when movie starts w/ 2nd frame
		AEE  4 May 99 - Added /SH keyword to spawn command
		NBR  5 May 99 - Move image resize, bias subtraction, ind0/ind00 assignment; 
				Change fhsize, fvsize assignment
		NBR 14 May 99 - Changed dumim line for determining ind00 in EIT case; change check for img_hdr.txt file; change coords for MK3; add time to tai_all 
 ** diverges from new version
		NBR 19 May 99 - Fix problem with box_ref when it hits all gap
		NBR  3 Jun 99 - Move rebin/congrid to end; fix hsize,vsize so PAN works for subfields; fix suncen, sec_pix; update AUTOMAX keyword
		NBR 26 Aug 99 - Add DBIAS keyword
	NBR 27 Aug 99 - IF exptime LT 15 sec then dbias = -7; BAD_SKIP keyword; change win_index incrementation
	NBR 15 Oct 99 - Fix initialization of prev
	NBR 22 Oct 99 - Change C2 AUTOMAX settings
	NBR    Nov 99 - Move subtract bias to before REDUCE_STD_SIZE; Fix problem with ind00
	NBR    Jan 00 - Change !D.N_COLORS to !D.TABLE_SIZE
	NBR    Feb 00 - Move GET_SUN_CENTER to after REDUCE_STD_SIZE
	NBR    Mar 00 - Change USE_MODEL options to use ANY_YEAR instead of ALL; fix C1 ON_OFF_DIFF; convert C1 hdr to structure; do not multiply by 100 for C1 log scale
	NBR    Apr 00 - Skip files with READFITS errors
	NBR  1 Aug 00 - Fix USE_MODEL if/then in for loop; modify for MK4 images (img0_x1,x2)
	NBR  3 Aug 00 - Modify for MK4 images (arcs,sec_pixel,dbiasx)


 Version:  09/24/03 @(#)mkmovie0.pro	1.1 - NRL LASCO IDL Library
 	(SCCS variables)
 



MKMOVIEM

[List of Routines] (See ./movie/mkmoviem.pro)

 Project     : SOHO - LASCO/EIT
                   
 Name        : MKMOVIEM
               
 Purpose     : Load FITS files into pixmaps and call WRUNMOVIEM for animation.
               
 Explanation : This procedure sorts the images by time, reads them, and 
		normalizes to the exposure time of the first image.
		WRUNMOVIEM is called to start a widget interface for the 
		animation sequence.
               
 Use         : MKMOVIEM, list, bmin, bmax, /TIMES, /DIFF, /NO_NORMAL, /NO_SORT, $
                        IMG_REBIN=[nx,ny], IMG_COORDS='(x1:x2,y1:y2)', UNSHARP=unsharp

      Example: IDL> MKMOVIEM, 'list960123', -100, 200, /DIFF, IMG_REBIN=[512,512]
      Example: IDL> MKMOVIEM, 'list960123', 400, 13000, /TIMES, IMG_COORDS='(0:511,*)'

      Example: If you want to display BYTARR images straight from the FITS files without
		any scaling use:
               IDL> MKMOVIEM, 'list', 0, 255, /NO_NORMAL, /NO_SORT
    
 Inputs      : list : Name of file containing names of FITS files.
               bmin, bmax : Minimum and maximum DN for BYTSCL.
               
 Outputs     : None.
               
 Keywords    : /TIMES : Default is to display image names in widget,
			 set this keyword to display TIME_OBS.
		/DIFF  : Set this keyword to make a difference movie.  The 
			 first image is subtracted from all subsequent images.
		/RUNNING_DIFF  : Make a difference movie, subracting the preceding image.
		/NO_NORMAL : Don't normalize exposure times to that of the first image.
		/NO_SORT   : Don't by time in header.
		IMG_REBIN  : Set this keyword to the size you want to REBIN all images to.
			     Example: [512,512] would REBIN a full field, full resolution
			     image down to 512x512.
		IMG_COORDS : Set this keyword to select a partial field of all images.
			     Example: '(*,0:511)' would select the bottom 1/2 of a full
			     field full resolution (1024x1024) image.
               UNSHARP    : Set this keyword to make a movie of unsharp masked images.
                            The value of the keyword if any is set to the size of the
                            unsharp mask, default=25
                            Example:  A value of 9 would form a 9x9 unsharp mask
		DERIV      : Divide difference images by time difference 
			     between frames.  Set value to the number of hours,
			     on average, between frames.
               /NOSTARS   : Attemps to remove stars using POINT_FILTER by Mike Andrews
               /FIXGAPS   : Sets data gaps so they appear as neutral grey in difference images

 Calls       : WRUNMOVIEM, FIXEXP, POINT_FILTER

 Restrictions: IMG_REBIN is applied before IMG_COORDS if both are selected.
               
 Side effects: Creates multiple pixmaps.
               
 Category    : Image Display.
               
 Prev. Hist. : None.

 Written     : Scott Paswaters, NRL, Jan 1996.
               
 Modified    : SEP 29 May 96 - Place frames into multiple pixmaps instead of 1 large
				pixmap because of limitations on window size in IDL.
               SEP  9 Jul 96 - Read in img headers as structures and pass to wrunmovie
		SHH 12 Jul 96 - Display each frame after it's processed
				Use FIXEXP function rather than exposure times for image normalization
				Scale images absolutely, rather than using TVSCL
		SHH 23 Jul 96 - Added DERIV keyword 
               SEP 29 Sep 96 - Placed frames in 1024x1024 image window.

 Version     : 3.1

	@(#)mkmoviem.pro	1.1 10/12/96 LASCO IDL LIBRARY


MKMOVIEWLC

[List of Routines] (See ./movie/mkmoviewlc.pro)

 Project     : SOHO - LASCO/EIT
                   
 Name        : MKMOVIEWLC
               
 Purpose     : Load FITS files into pixmaps and call WRUNMOVIE for animation.
               
 Explanation : This procedure sorts the images by time, reads them, and 
		normalizes to the exposure time of the first image.
		WRUNMOVIE is called to start a widget interface for the 
		animation sequence.
               
 Use         : MKMOVIEWLC, list, bmin, bmax, /TIMES, /DIFF, /NO_NORMAL, /NO_SORT, $
                        IMG_REBIN=[nx,ny], IMG_COORDS='(x1:x2,y1:y2)', UNSHARP=unsharp, $
                        /RATIO, /USE_MODEL, ROLL=roll, /MASK, /SUNMASK

      Example: IDL> MKMOVIEWLC, 'list960123', -100, 200, /DIFF, IMG_REBIN=[512,512]
      Example: IDL> MKMOVIEWLC, 'list960123', 400, 13000, /TIMES, IMG_COORDS='(0:511,*)'

      Example: If you want to display BYTARR images straight from the FITS files without
		any scaling use:
               IDL> MKMOVIEWLC, 'list', 0, 255, /NO_NORMAL, /NO_SORT
    
 Inputs      : list : Name of file containing names of FITS files.
		       Or a STRARR of the image names.
               bmin, bmax : Minimum and maximum DN for BYTSCL.
               
 Outputs     : None.
               
 Keywords    : /TIMES : Default is to display image names in widget,
			 set this keyword to display TIME_OBS.
		/DIFF  : Set this keyword to make a difference movie.  The 
			 first image is subtracted from all subsequent images.
		/RUNNING_DIFF  : Make a difference movie, subracting the preceding image.
		/NO_NORMAL : Don't normalize exposure times to that of the first image.
		/NO_SORT   : Don't by time in header.
		IMG_REBIN  : Set this keyword to the size you want to REBIN all images to.
			     Example: [512,512] would REBIN a full field, full resolution
			     image down to 512x512.
		IMG_COORDS : Set this keyword to select a partial field of all images.
			     Example: '(*,0:511)' would select the bottom 1/2 of a full
			     field full resolution (1024x1024) image.
               UNSHARP    : Set this keyword to make a movie of unsharp masked images.
                            The value of the keyword if any is set to the size of the
                            unsharp mask, default=25
                            Example:  A value of 9 would form a 9x9 unsharp mask
		/RATIO     : If using diff or running_diff display data as ratio
		/USE_MODEL : If using diff or running_diff use background corona model
			     as base frame.
		ROLL       : Set this keyword to rotate the image by the roll angle.  If
			     set to 1 then read in the roll angle from the date file
		/MASK      : Set this keyword to put a mask at the edge of the field
			     at 9 R (13.4 pixels per radius)
		/SUNMASK   : Set this keyword to put a circle where the sun should be


 Calls       : WRUNMOVIE

 Restrictions: IMG_REBIN is applied before IMG_COORDS if both are selected.
               
 Side effects: Creates multiple pixmaps.
               
 Category    : Image Display.
               
 Prev. Hist. : None.

 Written     : Scott Paswaters, NRL, Jan 1996.
               
 Modified    : SEP 29 May 96 - Place frames into multiple pixmaps instead of 1 large
				pixmap because of limitations on window size in IDL.
               SEP  9 Jul 96 - Read in img headers as structures and pass to wrunmovie
               SEP 18 Oct 96 - Add option to pass in STRARR of image names instead of filename.
               SEP 24 Oct 96 - added /RATIO and /USE_MODEL options
               SEP 14 Nov 96 - Modified to read in solwind wlc images
               RAH 14 May 98 - Modified to roll the image
		NBF  7 Jun 00 - Read separate header files; insert wlc image in full frame; cancel !order=1

 Version: 11/02/01 @(#)mkmoviewlc.pro	1.8 - LASCO NRL IDL Library


MKMOVIE_KPD

[List of Routines] (See ./nrleit/display/mkmovie_kpd.pro)

 Project     : SOHO - LASCO/EIT
                   
 Name        : MKMOVIE_kpd
               
 Purpose     : Load FITS files into a pixmap and call WRUNMOVIE for animation.
               
 Explanation : This procedure sorts the images by time, reads them, and 
		normalizes to the exposure time of the first image.  The
		images are loaded into pixmap 9 and WRUNMOVIE is called
		to start a widget interface for the animation sequence.
               
 Use         : MKMOVIE, list, bmin, bmax, /TIMES, /DIFF, /NO_NORMAL, /NO_SORT, $
                        IMG_REBIN=[nx,ny], IMG_COORDS='(x1:x2,y1:y2)'

      Example: IDL> MKMOVIE, 'list960123', -1000, 2000, /DIFF, IMG_REBIN=[512,512]
      Example: IDL> MKMOVIE, 'list960123', 400, 13000, /TIMES, IMG_COORDS='(0:511,*)'
    
 Inputs      : list : Name of file containing names of FITS files.
               bmin, bmax : Minimum and maximum DN for BYTSCL.
               
 Outputs     : None.
               
 Keywords    : /TIMES : Default is to display image names in widget,
			 set this keyword to display TIME_OBS.
		/DIFF  : Set this keyword to make a difference movie.  The 
			 first image is subtracted from all subsequent images.
		/RUNNING_DIFF  : Make a difference movie, subracting the preceeding image.
		/NO_NORMAL : Don't normalize exposure times to that of the first image.
		/NO_SORT   : Don't by time in header.
		UNSHARP  : Set this keyword to make a movie of unsharp masked images.
			   The value of the keyword if any is set to the size of the 
			   unsharp mask, default=25
                          Example:  A value of 9 would form a 9x9 unsharp mask
		IMG_REBIN  : Set this keyword to the size you want to REBIN all images to.
			     Example: [512,512] would REBIN a full field, full resolution
			     image down to 512x512.
		IMG_COORDS : Set this keyword to select a partial field of all images.
			     Example: '(*,0:511)' would select the bottom 1/2 of a full
			     field full resolution (1024x1024) image.
               SQRT_SCL:  to square root scaling of the image  (kpd)

 Calls       : WRUNMOVIE

 Restrictions: IMG_REBIN is applied before IMG_COORDS if both are selected.
               
 Side effects: Creates pixmaps in windows 9 and 0.
               
 Category    : Image Display.
               
 Prev. Hist. : None.

 Written     : Scott Paswaters, NRL, Jan 1996.
               
 Modified    : 

 Version     : 


MKQUERY

[List of Routines] (See ./display/mkquery.pro)

 NAME:
	MKQUERY

 PURPOSE:
	This procedure will generate a list of images for selected day, create
       image reduce header catalog, sort images on date and time, write a list
       of images in $HOME or ../work/$USER/list with name of the first 
       (first_last) processed day:
	960704.lst (960704_960710.lst)
       and write processed images on ../work/$USER/fits.

 CATEGORY:
	LASCO DATA ANALYSIS

 CALLING SEQUENCE:
	MKQUERY

 INPUTS:

 KEYWORD PARAMETERS:
	INST:   A string for instrument: 'C1' is default.
       DAY:    A string array: day = ['960703','960704']
       FILTER: A string for the filter: filter = 'Fe XIV'
       POLAR:  A string for the polarizer: polar = 'Clear'
       WAVE:   A float array for the wavelength: wave = [5309.2,5302.4]
       PROCESS: If this keyword is set, C1 images will be processed.
 
 
 SIDE EFFECTS:

 PROCEDURE:
      

 EXAMPLE:

		MKQUERY,day='960704'
               MKQUERY,day=['960703','960704'],inst='C1',filter='Fe XIV'

 MODIFICATION HISTORY:
 	Written by:	B Podlipnik, 04 Jul 1996

	Version:	1.0

	@(#)mkquery.pro	1.1 11/02/01 LASCO IDL LIBRARY


MK_ALL_MIN

[List of Routines] (See ./synoptic/mk_all_min.pro)

 TITLE:
	MK_ALL_MIN
 PURPOSE:
	This procedure generates the minimum of the all of the monthly
	minimum images.

 CATEGORY:
	DATA_ANAL

 CALLING SEQUENCE:
	MK_ALL_MIN,Tel,Filpol

 INPUTS:
	Tel:	String denoting the telescope: 'c1','c2','c3','c4'
	Filpol:	String denoting the filter/polarizer configuration

 OUTPUTS:
	None.  The routine will store the minimum image in a file
		named tm_all.fts, where t is the telescope number,
		m is the letter 'm', and _all is the string '_all'

 MODIFICATION HISTORY:
	WRITTEN 	RA Howard, NRL, 3 Oct 96
	 8 Nov 96	RAH, checks for bad blocks are <= 0
	30 Jan 97	SEP, check filenames for YYMMDD

	@(#)mk_all_min.pro	1.4 11/05/01 LASCO IDL LIBRARY


MK_DAILY_C1_MED

[List of Routines] (See ./synoptic/mk_daily_c1_med.pro)

 NAME:
	MK_DAILY_C1_MED

 PURPOSE:
	This procedure generates an image by taking all the files of a given
	type for one day and finding the median value for each pixel.

 CATEGORY:
	DATA_ANAL

 CALLING SEQUENCE:
	MK_DAILY_C1_MED,Tel,Date

 INPUTS:
	Tel:	String denoting the telescope, 'c1','c2','c3','c4'
	Date:	Gives the date to be processed in one of the following formats:
			YYMMDD,	6 character string
			YYYY/MM/DD, 10 character string
			CDS Date Structure
			Long Word of the modified julian date

 OPTIONAL INPUTS:
	None

 KEYWORD PARAMETERS:
	FILTER:	String denoting the filter position.  The default depends on 
		the telescope:
			C1:  FeXIV
			C2:  Orange
			C3:  Clear
			C4:  Clear
	POLAR:	String denoting the polarizer position.  The default depends on
		the telescope:
			C1:  Clear
			C2:  Clear
			C3:  Clear
			C4:  304A
	WLL:	String denoting the lower FP wavelength of an interval. 
	WLU:	String denoting the upper FP wavelength of an interval. 
	ONOFF:  String denoting whether the on line or off line wavelength should be used
	QL:	If set uses QL data, else LZ

 OUTPUTS:
	None.

 SIDE EFFECTS:
	Writes a fits file to $MONTHLY_IMAGES/daily.

 RESTRICTIONS:
	Only looks for full resolution, full width, any height.

 PROCEDURE:
	For each image that satifies the selection conditions, (naxis1=1024),
       filter and polarizer as requested), the median image is computed of 
	the median value of all the images for a single day after being
	normalized to the median exposure time.  

	If the number of images is less than 7 for any pixel, that pixel is 
	not computed in the first pass.  In the second pass, all full images
	within +/- 2 days of the given day.  

 EXAMPLE:
	To create the daily median image for 1 Sep 1996:

		MK_DAILY_C1_MED,'c3','960901'
	or
		MK_DAILY_C1_MED,'c3','1996/09/01'

 MODIFICATION HISTORY:
 	Written by:	R.A. Howard, NRL, 9/27/96

	Version 2,      RAH, 10/10/96, Modified to accept all image sizes
	Version 3,      RAH, 10/21/96, Added filter and polarizer as inputs
	Version 4,      SEP, 11/12/96, Fixed problem with equatorial img boundary lines.
				       Added check for ADCT compressed images.
			NBR,  8/ 9/01, Change output directory to $MONTHLY_IMAGES/daily


	@(#)mk_daily_c1_med.pro	1.2 08/09/01 LASCO IDL LIBRARY


MK_DAILY_MED

[List of Routines] (See ./synoptic/mk_daily_med.pro)

 NAME:
	MK_DAILY_MED

 PURPOSE:
	This procedure generates an image by taking all the files of a given
	type (up to 25) for one day and finding the median value for each pixel.

 CATEGORY:
	DATA_ANAL

 CALLING SEQUENCE:
	MK_DAILY_MED,Tel,Date

 INPUTS:
	Tel:	String denoting the telescope, 'c1','c2','c3','c4'
	Date:	Gives the date to be processed in one of the following formats:
			YYMMDD,	6 character string
			YYYY/MM/DD, 10 character string
			CDS Date Structure
			Long Word of the modified julian date

 OPTIONAL INPUTS:
	None

 KEYWORD PARAMETERS:
	QL:	If set then use quick look date, else use level 0 data
	FILTER:	String denoting the filter position.  The default depends on 
		the telescope:
			C1:  FeXIV
			C2:  Orange
			C3:  Clear
			C4:  Clear
	POLAR:	String denoting the polarizer position.  The default depends on
		the telescope:
			C1:  Clear
			C2:  Clear
			C3:  Clear
			C4:  304A
	WLL:	String denoting the lower FP wavelength of an interval. 
	WLU:	String denoting the upper FP wavelength of an interval. 
	ONOFF:  String denoting whether the on line or off line wavelength should be used
	ANYSIZE:	Accept images with dimensions GT 256
	NOREBIN:	Do not rebin images to 512x512
	SAVEDIR:	Specify where to save result
	ROLLED:		Save result in 'rolled' directory; set equal to roll angle (CROTA)
	FILES:	If set to a strarr, then use files in array to compute the median image
	VERBOSE:	Print row information for zero rows

 OUTPUTS:
	None.

 SIDE EFFECTS:
	Writes a fits file to $MONTHLY_IMAGES/daily of the format td_fwpw_yymmdd[raaa[x]].fts
	where 	t  = telescope [1,2,3]
		d  = d (daily image)
		fw = filter abbreviation from abbrv_filpol.pro
		pw = polarizer abbreviation from abbrv_filpol.pro
		yymmdd = date of the image
		r = r if roll of image GT 2 degrees from north
		aaa = average (dwell) roll angle during interval in degrees CCW
		x = x if roll angle varies more than 5 degrees during interval

 RESTRICTIONS:
	

 PROCEDURE:
	For each image that satifies the selection conditions, (default naxis1=1024,
       filter and polarizer as requested), the median image is computed of 
	the median value of all the images for a single day after being
	normalized to the median exposure time.  

	If the number of images is less than 7, there is a second pass. 
  	In the second pass, images within +/- 2 days of the given day are used, 
	up to 15 per day.  

 EXAMPLE:
	To create the daily median image for 1 Sep 1996:

		MK_DAILY_MED,'c3','960901'
	or
		MK_DAILY_MED,'c3','1996/09/01'

 MODIFICATION HISTORY:
 	Written by:	R.A. Howard, NRL, 9/27/96

	Version 2,      RAH, 10/10/96, Modified to accept all image sizes
	Version 3,      RAH, 10/21/96, Added filter and polarizer as inputs
	Version 4,      SEP, 11/12/96, Fixed problem with equatorial img boundary lines.
				       Added check for ADCT compressed images.
	Version 5,	RAH, 6/1/98, Added keyword parameter, QL to select QL or LZ images
					Force write to $MONTHLY_IMAGES
	Version 6,	NBR, 2/11/99,  Fix 1999 bug (LE instead of LT 99)
	Version 7,	NBR, 8/27/99,  Re-fix 1999 bug; rebin result to 512x512
	Version 8, 	NBR, 12/1999,	Update to use header structure; use READLIST 
					instead of HEADFITS to filter images; change 
			jjmax to 100; Add ANYSIZE and NOREBIN keywords; Make b INTARR
	NBR,  8. 8.01 - Change output directory to $MONTHLY_IMAGES/daily
	NBR, 11. 9.01 - Use IMG_HDR_TXT2STRUCT and fix exptime problem
	NBR, 11.13.01 - Add ROLLED keyword
	NBR, 11.16.01 - Fix findfile and ih conflict; add FILES keyword
	NBR, 11.20.01 - Add CROTA to header
	NBR, 12. 7.01 - Header changes
	NBR, 12.18.01 - Fix bug in Pass 2
	NBR,  5.10.02 - Change jjmax to 50; make date_obs of result midpoint between 
			date_obs of first and last images used; add N_IMAGES to header;
			Use get_sc_point for CROTA; cancel Pass 2 and make n_median_min=5;
			Change VERBOSE reporting; Move sdir and postd to end
	NBR,  5.23.02 - add caching
	NBR,  7.10.02 - Fix P[12]COL/ROW
	jake	030716	fixed indentation
	NBR, 	030718	Automatically check ROLL, even if it changes during a day


version= '@(#)mk_daily_med.pro	1.22, 07/28/03'	; NRL LASCO IDL LIBRARY
;version = 'MK_DAILY_MED testing 2002/05/23 by NBR'


MK_DAILY_MIN

[List of Routines] (See ./synoptic/mk_daily_min.pro)

 NAME:
	MK_DAILY_MIN

 PURPOSE:
	This procedure generates an image by taking all the files of a given
	type for one day and finding the minimum value for each pixel.

 CATEGORY:
	DATA_ANAL

 CALLING SEQUENCE:
	MK_DAILY_MIN,Tel,Date

 INPUTS:
	Tel:	String denoting the telescope, 'c1','c2','c3','c4'
	Date:	Gives the date to be processed in one of the following formats:
			YYMMDD,	6 character string
			YYYY/MM/DD, 10 character string
			CDS Date Structure
			Long Word of the modified julian date

 OPTIONAL INPUTS:
	None

 KEYWORD PARAMETERS:
	QL:	If set then use quick look date, else use level 0 data
	FILTER:	String denoting the filter position.  The default depends on 
		the telescope:
			C1:  FeXIV
			C2:  Orange
			C3:  Clear
			C4:  Clear
	POLAR:	String denoting the polarizer position.  The default depends on
		the telescope:
			C1:  Clear
			C2:  Clear
			C3:  Clear
			C4:  304A
	WLL:	String denoting the lower FP wavelength of an interval. 
	WLU:	String denoting the upper FP wavelength of an interval. 
	ONOFF:  String denoting whether the on line or off line wavelength should be used

 OUTPUTS:
	None.

 SIDE EFFECTS:
	Writes a fits file to $MONTHLY_IMAGES/daily.

 RESTRICTIONS:
	Only looks for full resolution, full width, any height.

 PROCEDURE:
	For each image that satifies the selection conditions, (naxis1=1024),
       filter and polarizer as requested), the minimum image is computed of 
	the minimum value of all the images for a single day after being
	normalized to the median exposure time.  

	If the number of images is less than 7 for any pixel, that pixel is 
	not computed in the first pass.  In the second pass, all full images
	within +/- 2 days of the given day.  
	Adapted from MK_DAILY_MED

 EXAMPLE:
	To create the daily minimum image for 1 Sep 1996:

		MK_DAILY_MIN,'c3','960901'
	or
		MK_DAILY_MIN,'c3','1996/09/01'

 MODIFICATION HISTORY:
 	Written by:	R.A. Howard, NRL, 9/27/96

	Version 2,      RAH, 10/10/96, Modified to accept all image sizes
	Version 3,      RAH, 10/21/96, Added filter and polarizer as inputs
	Version 4,      SEP, 11/12/96, Fixed problem with equatorial img boundary lines.
				       Added check for ADCT compressed images.
	Version 5,	RAH, 6/1/98, Added keyword parameter, QL to select QL or LZ images
					Force write to $MONTHLY_IMAGES
	Version 6,	NBR, 2/11/99,  Fix 1999 bug (LE instead of LT 99)
	Version 7,	NBR, 8/27/99,  Re-fix 1999 bug; rebin result to 512x512
			NBR,  8/ 9/01, Change output directory to $MONTHLY_IMAGES/daily



 @(#)mk_daily_min.pro	1.3 08/09/01 :LASCO IDL LIBRARY



MK_HTML_HELP

[List of Routines] (See ./util/lasco_mk_html_help.pro)

 NAME:
	MK_HTML_HELP

 PURPOSE:
	Given a list of IDL procedure files (.PRO), VMS text library 
       files (.TLB), or directories that contain such files, this procedure 
       generates a file in the HTML format that contains the documentation 
       for those routines that contain a DOC_LIBRARY style documentation 
       template.  The output file is compatible with World Wide Web browsers.

 CATEGORY:
	Help, documentation.

 CALLING SEQUENCE:
	MK_HTML_HELP, Sources, Outfile

 INPUTS:
     Sources:  A string or string array containing the name(s) of the
		.pro or .tlb files (or the names of directories containing 
               such files) for which help is desired.  If a source file is 
               a VMS text library, it must include the .TLB file extension.  
               If a source file is an IDL procedure, it must include the .PRO
               file extension.  All other source files are assumed to be
               directories.
     Outfile:	The name of the output file which will be generated.

 KEYWORDS:
     TITLE:	If present, a string which supplies the name that
		should appear as the Document Title for the help.
     VERBOSE:	Normally, MK_HTML_HELP does its work silently.
		Setting this keyword to a non-zero value causes the procedure
		to issue informational messages that indicate what it
		is currently doing. !QUIET must be 0 for these messages
               to appear.
     STRICT:   If this keyword is set to a non-zero value, MK_HTML_HELP will 
               adhere strictly to the HTML format by scanning the 
               the document headers for characters that are reserved in 
               HTML (<,>,&,").  These are then converted to the appropriate 
               HTML syntax in the output file. By default, this keyword
               is set to zero (to allow for faster processing).

 COMMON BLOCKS:
	None.

 SIDE EFFECTS:
	A help file with the name given by the Outfile argument is
	created.

 RESTRICTIONS:
	The following rules must be followed in formatting the .pro
	files that are to be searched.
		(a) The first line of the documentation block contains
		    only the characters ";+", starting in column 1.
               (b) There must be a line which contains the string "NAME:",
                   which is immediately followed by a line containing the
                   name of the procedure or function being described in
                   that documentation block.  If this NAME field is not
                   present, the name of the source file will be used.
		(c) The last line of the documentation block contains
		    only the characters ";-", starting in column 1.
		(d) Every other line in the documentation block contains
		    a ";" in column 1.

       Note that a single .pro file can contain multiple procedures and/or
       functions, each with their own documentation blocks. If it is desired
       to have "invisible" routines in a file, i.e. routines which are only
       for internal use and should not appear in the help file, simply leave
       out the ";+" and ";-" lines in the documentation block for those
       routines.

	No reformatting of the documentation is done.

 MODIFICATION HISTORY:
       July 5, 1995, DD, RSI. Original version.
       July 13, 1995, Mark Rivers, University of Chicago. Added support for
               multiple source directories and multiple documentation
               headers per .pro file.
       July 17, 1995, DD, RSI. Added code to alphabetize the subjects;
               At the end of each description block in the HTML file,
               added a reference to the source .pro file.
       July 18, 1995, DD, RSI. Added STRICT keyword to handle angle brackets.
       July 19, 1995, DD, RSI. Updated STRICT to handle & and ".
               Changed calling sequence to accept .pro filenames, .tlb
               text librarie names, and/or directory names.
               Added code to set default subject to name of file if NAME
               field is not present in the doc header.
       Mar  14, 1996, SEP, NRL-LASCO, Made "See" a hypertext link to file.
		Fix to handle case of no valid headers.

	@(#)mk_html_help.pro	1.2 10/11/96 LASCO IDL LIBRARY


MK_IMAGE

[List of Routines] (See ./display/mk_image.pro)

 Project	: SOHO - LASCO/EIT

 Name		: MK_IMAGE
	
 Purpose	: Make C1 image.
	
 Explanation	: This procedure will make C1 image of the day.For selected day
		  this routine will find the last pair of on-line and off-line 
		  images and  will process them to lasco 'level .99'.
	 
 Use		: IDL>mk_image      
              

 Keyword parameters:
	IMG0:
	IMG1:
       FILTER: The filter: filter='Fe XIV' (string) , default value
       POLAR:  The polarizer: polar='Clear' (string) , default value
       ROWS:   The number of rows in image: rows=640 (integer), default value
       COLS:   The number of cols in image: cols=768 (integer), default value
       LEBP:   The LEB program: lebp = 'Sum/Diff' (string)
       WAVE:   The off-line and on-line wave length: wave=[5309.2,5302.4]
       SCREEN: Display result to the X-Window: /screen
       FITS:   Write result as a FITS file: /fits 
       PS:     Write result as a PostScript file: /ps
       GIF:    Write result as a GIF file: /gif
       ARCHIVE:Write result as a GIF file in 'lastimage.gif' format  
       COSMIC: Remove cosmic rays: /cosmic
       OWNCT:  Use own color table: ownct (structure: ownct.r,ownct.g,ownct.b)
       LCT:    Load IDL color table: lct=8 GREEN/WHITE LINEAR
       GCT:    Gamma_ct: gct=.25  
       UP:     To cut an image at a certain upper value of its histogram: up =.9996
       LOW:    To cut an image at a certain lower value of its histogram: low=.01
       MINBOX: To cut an image at the median minimum of the background:   /minbox
      
 Example	: IDL> MK_IMAGE,IMG0,HDR0,IMG1,HDR1
		  Without any keywords program will use default values.
;
 Calls		:

 Comments	:

 Side effects	: None.

 Category	: Image Display. Data analysis.

 Written	: Borut Podlipnik, MPAe Oct. 15 1997.

 Modified	:  BP	13 Jan 1998 - Added keyword TIME
		   BP   05 May 1998 - Added keyword LOG

 Version	: 1.0  10/15/97 LASCO IDL LIBRARY


MK_IMG

[List of Routines] (See ./inout/mk_img.pro)

 Project     : SOHO - LASCO/EIT
                   
 Name        : MK_IMG
               
 Purpose     : Process FITS files for display.
               
 Explanation : This procedure  reads an imaje and 
		normalizes to the exposure time.
		(Not implemented: The on_off_diff keyword results in a movie
               where each on line imaje is displayed with a nearby offband imaje
               subtracted.)
               
 Use         : result = MK_IMG( filename, bmin, bmax, /TIMES, /DIFF, /NO_NORMAL, $
                        UNSHARP=unsharp, PAN=pan, COORDS=coords, BOX=box, $
                        /RATIO, /USE_MODEL,/FLAT_FIELD,/ON_OFF_DIFF,/MASK_OCC,/LG_MASK_OCC,
                        /RADIAL, /DEGRID, /FIXGAPS, /LOG_SCL, /SQRT_SCL, $
			 FILL_COL=fill_col, SAVE=save)

      Example: IDL> result = MK_IMG( '32002333.fts', -100, 100, shdr, /DIFF)

      Example: If you want to display BYTARR imajes straight from the FITS files without
		any scaling use:
               IDL> result = MK_IMG( filename, 0, 255, /NO_NORMAL)
    
 Inputs      : filename : string containing the filename
               bmin, bmax : Minimum and maximum DN for BYTSCL.
               
 Outputs     : processed imaje array.
		shdr	STRARR	FITS header as a string array
               
 Keywords    : The following keywords apply to all telescopes (C1,C2,C3,EIT)

	
	POINTFILT  : Implements point_filter on raw image; set equal to [boxsize, sensitivity, iterations]
			default is [5,7,3]
	SUNC	   ; Returns sun center structure {xcen, ycen}
	BKG	   ; Set equal to background image to use instead of GETBKGIMG; should 
		 	be normalized to exptime and correctly sized
	/INIT1	   ; Set to reset COMMON block; MK_IMG always returns zero for this value
	/EXPFAC    ; set equal to variable which contains exp correction factor 
		 	(-1 if not found)
	/ROLL      : Apply roll correction if GT 2 deg.; returns value of roll angle 
	/LIST	   : for use with PROCESS_LIST procedure
	/LOGO	   ; Add LASCO logo to bottom right corner
	/OUTMASK   : apply outer mask only
	/INMASK    : apply occulter mask only
	/NO_DISPLAY: do not display image as it is processed
	/NX	   : Desired final size of image; superseded by PAN
	/CREM	   : Set this keyword if doing CR removal; filename in or will prompt
	/HIDE_PYLON: Replace (byte) values below setting with median
	/DBIAS	   : Add this to bias before subtracting
	/NORM	   : Apply linear normalization function based on imaje median (5/99)
	/DO_BYTSCL : Apply bytescaling (default is not to)
	/LEE_FILT  : Apply LEEFILT function to filter noise.
       /TIMES     : Set this keyword to display date and time in imajes.
	/DIFF      : Set this keyword to make a difference imaje.  The 
			     model is subtracted.
	/NO_NORMAL : Don't normalize exposure times to that of the first imaje.
	/NO_SORT   : Don't sort by time in header.
       UNSHARP    : Set this keyword to make a movie of unsharp masked imajes.
                    The value of the keyword if any is set to the size of the
                    unsharp mask, default=25
                    Example:  A value of 9 would form a 9x9 unsharp mask
	/RATIO     : If using diff or running_diff display data as ratio of 
			imaje/reference frame
       /MASK_OCC  : applies a sun sized circle and removes the internal part of the 
			image and masks outer image
	/LOG_SCL   : Applies ALOG10() function to imaje before byte scaling
	/SQRT_SCL  : Applies SQRT() function to imaje before byte scaling
	/FIXGAPS   : Set to 1 to fill data gaps in imaje with color specified by 
			FILL_COL
		     Set to 2 to fill data gaps in imaje with values from previous 
			imaje
	FILL_COL   : Set this keyword to the color index to use for data gaps and 
			occ masks.
	SAVE       : For use in batch mode.  Set this keyword to the name of the 
			.mvi file to save as.  Routine will save movie and then exit.
	PAN        : Default is to resize imajes to pixel size of the first imaje.  
			Set this keyword to perform additional scaling.  
			Example: set to 0.5 for 2x2 rebinning.
	COORDS     : Set to 4 element array of imaje coordinates to use relative to 
			1024x1024 imaje.
		 	Example: COORDS=[0,1023,128,895] for C2 Equatorial Field
	BOX        : Set to 4 element array of imaje coordinates to use for box 
			normalization relative to 1024x1024 imaje. Images are scaled 
			relative to average counts in box of first imaje. 
			Example: BOX=[461,560,641,740]
	REF_BOX    : Set to avg counts specified in BOX otherwise first imaje is used

      : The following keywords apply only to C1

       /ON_OFF_DIFF: differences each on line imaje with an imaje taken at a continuum 
			wavelength
       /FLAT_FIELD : normalizes each imaje by a door closed imaje to remove the solar 
			spectrum
       /RADIAL	    : applies a radial filter

      : The following keywords apply only to C2 and C3

	/USE_MODEL : If using diff or running_diff use background corona model
                 as base frame.  USE_MODEL=1 for closest any_year monthly model
                                 USE_MODEL=2 for closest monthly model (1 year)
                                 USE_MODEL=3 for for overall yearly model
	/DISTORT   : Apply distortion correction for C2 or C3

       : The following keywords apply only to EIT

       /DEGRID	   : applies the degridding algorithm

 Calls       : 

 Side effects: 
               
 Category    : Image Display.
               
 See Also    : 
               
               
 Prev. Hist. : None.

 Written     : Nathan Rich, NRL/Interferferometrics, 17 Dec 1998
	Based on MKMOVIE.PRO by Scott Paswaters, NRL, Jan 1996.
               
 Modified    : SEP 29 May 96 - Place frames into multiple pixmaps instead of 1 large
				pixmap because of limitations on window size in IDL.
               SEP  9 Jul 96 - Read in img headers as structures and pass to wrunmovie
               SEP 18 Oct 96 - Add option to pass in STRARR of imaje names instead of filename.
               SEP 24 Oct 96 - added /RATIO and /USE_MODEL options
               RAH 13 Dec 96 - added check for daily median imaje which doesn't have bias
               CMK 16 Feb 97 - added all C1 related features and changed the procedure name to mkc1movie2
           RAH/SEP 14 Mar 97 - integrated mkc1movie2 features into mkmovie
               SEP 21 Mar 97 - corrected bias subtraction for LEB summed imajes
               SEP 01 Oct 97 - added /SUM keyword to OFFSET_BIAS call
               SEP 22 Oct 97 - fixed divide by zero error for /RATIO option
               SEP 31 Oct 97 - Binned imajes are scaled (/bin^2) for level_05 imajes only
               SEP 13 Nov 97 - Added /FLAT_FIELD for EIT, added /NEW flag to EIT_DEGRIDN
               RAH 02 Feb 98 - Now normalizes to calculated exposure time (if data exists).
		NBR 06 Nov 98 - Change default fillcol to median(imaje); change LG_MASK_OCC for c3 to use C3clearmask2.dat
		NBR 17 Dec 98 - Change to MK_IMG; add LEE_FILT, NO_BYTSCL, DISTORT keywords
		NBR 04 Dec 99 - Add default bmin and bmax
		nbr 13 Apr 99 - ALlow replace gaps with prev imaje
		nbr 17 May 99 - Add FNAME keyword
		nbr    Jul 99 - use first of two filename strings in 'fullname' to remove CRs; Move Leefilt before BYTSCL; Make MASK_OCC work for non-byte results; change HIDE_PYLON
		nbr    Aug 99 - Add NX keyword
		nbr    Sep 99 - Add NO_DISPLAY keyword, add OUTER keyword; Use updated EIT_DEGRID, EIT_FLAT
		nbr    Mar 00 - Automatically correct for different bias value in bkg model for c3 (default); use INMASK and outmask keywords; add LIST keyword; add 1 to imaje for ALOG10 to prevent negative output
	nbr  May 00 - Change USE_MODEL numbering; add shdr output; change NO_BYTSCL to DO_BYTSCL
	nbr  Oct 00 - Add NO_PROFILE, INIT1 keywords; use one value for maskfill when doing a list; 
			add EIT_NORM_RESPONSE and make DEGRID and FLATFIELD automatic for EIT
	nbr  Nov 00 - Change mask radius for C2 LG_MASK_OCC; add CIRC_WIDTH keyword; 
	nbr, 21Nov00 - Accept image array as input for fullname
	nbr,  4Apr01 - Always use any_year=0 for images after 2000/12/03
	nbr, 11Apr01 - Change r_occ_out for C2
	nbr,  1Jun01 - Move REMOVE_CR and RUNNING_DIFF to before ratio/difference
	nbr,  8Jun01 - Use EIT_PREP; move READFITS to middle; add PROFILE keyword and use wset
			for profile
	nbr, 17Jul01 - Use separate mask for pylon and c3mask; change how dbias is computed for C3
	nbr, 18Jul01 - Increase upper limit for HIDE_PYLON
	nbr, 20Nov01 - Add BKG keyword; do not match pylon if BKG is set
	nbr, 13Dec01 - Fix lower left corner mask problem
	nbr, 13Mar02 - Implement ROLL keyword
	nbr,  1Apr02 - DON'T divide EIT images by exptime
	nbr,  8Apr02 - Modify [hv]size, f[hv]size
	nbr,  7Aug02 - Add images common block
	nbr, 18Sep02 - Add POINTFILT keyword; add some VERBOSE comments
	nbr,  3Sep03 - Add COMMON get_im for logging with carrmapmaker2.pro
	nbr, 15Jan04 - Add header values, fix roll, add FILL_COL

 Version     : 

 06/28/05 @(#)mk_img.pro	1.7 :NRL Solar Physics


MK_LIST

[List of Routines] (See ./exposure/mk_list.pro)

 MK_LIST
	Form a "Standard" mask image from a list or more usually from
	a set of parameters to be matched.

 Usage:
	list=mk_list(  )


 Keywords: (all input)
	coronagraph	int	- Which coronagraph (1, 2 or 3)
	exposure	float	- 1-elements use exposures */10%,
				2-elements use exposures in given
				range, absent: use any exposure.
	filter		string	- Specify the filter or FP setting
				required (default "Clear")
	polarizer	string	- Specify the polarizer setting to be
				used (default clear)
	pixels		int	- Specify the size of image to use
                                 2-element array (default [1024,
                                 1024]).
	dir_pattern	string	- Specify a restricted set of
                                 directories in which to find the
                                 images (if used, this must be in a
                                 form acceptable as an argument to
                                 "find")
	upper_left	int	- Specify the location of the
                                 upper-left corner of the image
                                 (useful to distingush (say)
                                 half-resolution-whole-field images
                                 from full-resolution-quarter-field
                                 images, 2-element array (default [20,1]).

 Effects:
	A list of files matching the specified properties is
	generated.

 WARNING:
	It is the responsibility of the user to ensure that the image
	set being used is homogeneous.

 History:
	Original (modified from mk_stdim_list): 15/5/96, SJT
	Substantially improved: 14/5/96; SJT


MK_MINIM

[List of Routines] (See ./exposure/mk_minim.pro)

 MK_MINIM
	Form a "Standard" mask image from a list or more usually from
	a set of parameters to be matched.

 Usage:
	mk_minim[, stdim, {list|}]

 Arguments:
	filename string	input	The name to give to the image. If
				unset, then use "stdim.fts"
	list	string	input	An array with a list of filenames to
				be used in forming the average image.

 Keywords: (all input)
	coronagraph	int	- Which coronagraph (1, 2 or 3)
	exposure	float	- 1-elements use exposures */10%,
				2-elements use exposures in given
				range, absent: use any exposure.
	filter		string	- Specify the filter or FP setting
				required (default "Clear")
	polarizer	string	- Specify the polarizer setting to be
				used (default clear)
	pixels		int	- Specify the size of image to use
                                 2-element array (default [1024,
                                 1024]).
	dir_pattern	string	- Specify a restricted set of
                                 directories in which to find the
                                 images (if used, this must be in a
                                 form acceptable as an argument to
                                 "find")
	dark		int	- Specify the dark current (defaults
                                 c1:322, c2:470, c3:319 eit:0).
	interact	??	- If set, then display each image
                                 (reduced by a factor 2 if the larger
                                 dimansion is > 512) and ask the user
                                 whether to include it - tedious but
                                                         sometimes
                                                         needed.
	upper_left	int	- Specify the location of the
                                 upper-left corner of the image
                                 (useful to distingush (say)
                                 half-resolution-whole-field images
                                 from full-resolution-quarter-field
                                 images, 2-element array (default [20,1]).
	save		??	- If set, then save the generated image
				to disk
	clevel		float	- Specify the minimum correlation with
                                 the first image for the image to be
                                 used. When this is specified the
                                 first image is displayed as in
                                 INTERACT and you are prompted whther
                                 to use it; this continues until an
                                 image is accepted. Thereafter all
                                 images better correlated with the
                                 initial image than the given value
                                 are accepted - a typical level might
                                                be in the range .98
                                                to .99.
	centre_pick	??	- If set, then determine a Sun-centre
                                 and radius manually.
	maxc		int	- Set the maximum number of counts to
                                 show in a display of the image.

 Effects:
	A "standard" average image is generated and added to the end
	of the list of loaded images. Most of its header information
	is derived from the first image of the set. N.B. The image is
	NOT saved to disk, use one of the SAVE options in DISPLAY to
	do this.

 WARNING:
	It is the responsibility of the user to ensure that the image
	set being used is homogeneous.

 History:
	Original (modified from mk_stdim_list): 30/7/96, SJT


MK_MLO_STRUCT

[List of Routines] (See ./inout/mk_mlo_struct.pro)

 NAME:
	MK_MLO_STRUCT

 PURPOSE:
 	This procedure generates a structure type for the HAO-MLO fits files.

 CATEGORY:
	LASCO DATA ANALYSIS

 CALLING SEQUENCE:
	MK_MLO_STRUCT

 INPUTS:
	None

 OUTPUTS:
	The procedure generates a file with the desired structure.

 SIDE EFFECTS:
	Writes a file to $NRL_LIB/lasco/inout

 EXAMPLE:
	To generate a sample header, you must have a new copy of IDL, or at least one
	that hasn't had the MLO structure defined.

	MK_MLO_STRUCT

 MODIFICATION HISTORY:
 	Written by:	RAHoward, NRL, Oct, 1998


MK_MONTHLY_MIN

[List of Routines] (See ./synoptic/mk_monthly_min.pro)

 TITLE:
	MK_MONTHLY_MIN
 PURPOSE:
	This procedure generates the minimum of the daily median
	images for an interval (default is 27)

 CATEGORY:
	DATA_ANAL

 CALLING SEQUENCE:
	MK_MONTHLY_MIN,Tel,Td

 INPUTS:
	Tel:	String denoting the telescope: 'c1','c2','c3','c4'
	Td:	String denoting the date, in one of the following
		formats:	YYYY/MM/DD
				YYY-MM-DD
				YYMMDD

		This date is the MIDPOINT of the desired interval.

 OPTIONAL INPUTS:
	Filpol:	String denoting the filter/polarizer/sector 
		eg.  'clcl' for the clear/clear combination
		The default is 'fvcl', 'orcl' or 'clcl' for C1, C2, C3
		respectively.

 KEYWORDS:
	NDAYS:	Number of days to use in the minimum.  Must be an odd number.
		The default is 27. This keyword overrides the days-available test.
	OFF:	The string to put after the date if C1
	ALL_YEARS:Use daily images from multiple years
	NOREBIN:  Do not rebin result to 512x512
	ROLLED:	  Use $MONTHLY_IMAGES/rolled directory
	FILES	Use files in this array to compute minimum
	TEST	Save in $MONTHLY_IMAGES/testdir

 OUTPUTS:
	None.  The routine will write a FITS file in $MONTHLY_IMAGES. The 
		format of the filename is tm_fwpw_yymmdd.fts, where 
		t is the telescope number [1,2,3],
		m is the letter 'm' (monthly), 
		fwpw is the filter/polarizer abbreviation code, and 
		yymmdd is the date of the MIDPOINT of the interval used to 
			make the file

 PROCEDURE:
	- Date of the file output ("DATE-OBS" and filename) is ALWAYS the midpoint of 
	  interval used to make the file and is ALWAYS the input date
	- Date of file is always the same DOY (based on 3m_clcl_xx*.fts)
	- Searches daily median images in $MONTHLY_IMAGES/daily for Td +/- 13 days. 
	- Minimum interval is Td +/- 7 days (15 days); if interval is less, no file is 
	  created, unless NDAYS is set.
	- Does not span gaps more than 2 days unless NDAYS keyword is set.

 MODIFICATION HISTORY:
	Written	RA Howard, NRL, 9/27/96
	15 October 1996		RAH, mods for full images (eliminated regions)
	22 Sep 1997	RAH, corrected definition of MID_DATE and MID_TIME
			     to be mid date and time of the entire interval
	06 Oct 1997	SEP, added ALL_YEARS option.
	10 Dec 1998	NBR, for non-clear filters, save result as 512x512 image;
				divide by 4 for summed images
	25 Mar 1999	NBR, insert number of images used in the header
	20 Sep 1999	NBR, Save all images as 512x512
	   Jan 2000	NBR, Add NOREBIN keyword
	   Jun 2000	NBR, Add ROLL keyword for using *r.fts daily median files
	27 Mar 2001	NBR, change mjd0 computation
	 9 Aug 2001	NBR, Find daily images in $MONTHLY_IMAGES/daily
	20 Nov 2001	NBR, Add CROTA keyword to header
	25 Feb 2002	NBR, Modify to make files with equal number of days before
				and after date of file name; write log file
	10 Jul 2002	NBR, Fix PxCOL/ROW, RxCOL/ROW, add keyword TEST
	18 Jul 2003	NBR, Fix endutc bug for no days found; add CROTA1/2
	10 Oct 2003	NBR, Make ALL_YEARS for 2000+ only

er=	'@(#)mk_monthly_min.pro	1.14 04/12/05'	; LASCO IDL LIBRARY


MK_ONE_DEB_GIF

[List of Routines] (See ./inout/mk_one_deb_gif.pro)

 NAME:
	MK_ONE_DEB_GIF

 PURPOSE:
	This function makes one gif image of debris data.

 CATEGORY:
	LASCO INOUT

 CALLING SEQUENCE:
	MK_ONE_DEB_GIF,Fname

 INPUTS:
	Fname	STRING	  FITS filename                               

 OUTPUTS:
	Writes the gif file onto the debris directory.

 COMMON BLOCKS:
	BLOCK1:	Describe any common blocks here. If there are no COMMON
		blocks, just delete this entry.

 RESTRICTIONS:

 PROCEDURE:

 EXAMPLE:

 MODIFICATION HISTORY:
 	Written by:	Nathan Rich, NRL
	12/7/00, nbr - Change input description

	@(#)mk_one_deb_gif.pro	1.1 11/02/01 LASCO IDL LIBRARY


MK_STDIM

[List of Routines] (See ./exposure/mk_stdim.pro)

 MK_STDIM
	Form a "Standard" mask image from the current image set

 Usage:
	mk_stdim[, stdim, stexp=stexp, filename=filename]

 Arguments:
	filename string	input	The name to give to the image. If
				unset, then use "stdim.fts"

 Keywords:
	stexp	float	output	The integrated exposures of each
				pixel.
	save	??	input	If set, then save the generated image
				to disk

 Effects:
	A "standard" average image is generated and added to the end
	of the list of loaded images. Most of its header information
	is derived from the first image of the set. N.B. The image is
	NOT saved to disk, use one of the SAVE options in DISPLAY to
	do this.

 WARNING:
	It is the responsibility of the user to ensure that the image
	set being used is homogeneous.

 History:
	Original: Mar 96, SJT
	Reduce number of arrays to try to speed it up: 4/4/96; SJT
	Use NO_COPY handle extraction instead of GHANDLE for the same
	reason: 22/4/96; SJT


MK_STDIM_HDR

[List of Routines] (See ./exposure/mk_stdim_hdr.pro)

 MK_STDIM_HDR
	Make the fits header for a standard image.

 Usage:
	mk_stdim_hdr, head, last_head

 Arguments:
	head	string	in/out	The header to be updated - must be
                                                          derived
                                                          from the
                                                          first image
                                                          of the set
                                                          if it is to
                                                          work
                                                          properly
	last_head str	input	The header of the last image of the
				set.
	image	float	input	The standard image to be described by
				the header
	filename string	input	The name of the file to include in the
				header.
	nim	int	input	The number of images incorporated.

 Keyword:
	rebin	???	input	If set & non-zero, then the image may
				have been rebinned if it was a
				low-resolution image.


 Effects:
	The FITS header is updated.

 History:
	Original: 4/6/96; SJT


MK_STDIM_LIST

[List of Routines] (See ./exposure/mk_stdim_list.pro)

 MK_STDIM_LIST
	Form a "Standard" mask image from a list or more usually from
	a set of parameters to be matched.

 Usage:
	mk_stdim[, stdim, {list|}]

 Arguments:
	filename string	input	The name to give to the image. If
				unset, then use "stdim.fts"
	list	string	input	An array with a list of filenames to
				be used in forming the average image.

 Keywords: (all input)
	coronagraph	int	- Which coronagraph (1, 2 or 3)
	exposure	float	- 1-elements use exposures */10%,
				2-elements use exposures in given
				range, absent: use any exposure.
	filter		string	- Specify the filter or FP setting
				required (default "Clear")
	polarizer	string	- Specify the polarizer setting to be
				used (default clear)
	pixels		int	- Specify the size of image to use
                                 2-element array (default [1024,
                                 1024]).
	dir_pattern	string	- Specify a restricted set of
                                 directories in which to find the
                                 images (if used, this must be in a
                                 form acceptable as an argument to
                                 "find")
	interact	??	- If set, then display each image
                                 (reduced by a factor 2 if the larger
                                 dimansion is > 512) and ask the user
                                 whether to include it - tedious but
                                                         sometimes
                                                         needed.
	upper_left	int	- Specify the location of the
                                 upper-left corner of the image
                                 (useful to distingush (say)
                                 half-resolution-whole-field images
                                 from full-resolution-quarter-field
                                 images, 2-element array (default [20,1]).
	save		??	- If set, then save the generated image
				to disk
	clevel		float	- Specify the minimum correlation with
                                 the first image for the image to be
                                 used. When this is specified the
                                 first image is displayed as in
                                 INTERACT and you are prompted whther
                                 to use it; this continues until an
                                 image is accepted. Thereafter all
                                 images better correlated with the
                                 initial image than the given value
                                 are accepted - a typical level might
                                                be in the range .98
                                                to .99.
	slevel		int	- Specify a pixel value to be
                                 considered as saturated (default
                                 16383). This is needed as some
                                 images show "soft saturation" at a
                                 level below 16383 counts.
	centre_pick	??	- If set, then determine a Sun-centre
                                 and radius, manually - else get a
                                 centre from OCCLTR_CNTR

 Effects:
	A "standard" average image is generated and added to the end
	of the list of loaded images. Most of its header information
	is derived from the first image of the set. N.B. The image is
	NOT saved to disk, use one of the SAVE options in DISPLAY to
	do this.

 WARNING:
	It is the responsibility of the user to ensure that the image
	set being used is homogeneous.

 History:
	Original (modified from mk_stdim): 26/4/96, SJT
	Substantially improved: 14/5/96; SJT


MLO_FITSHDR2STRUCT

[List of Routines] (See ./inout/mlo_fitshdr2struct.pro)

 Project     : SOHO - LASCO
                   
 Name        : MLO_FITSHDR2STRUCT
               
 Purpose     : Converts a FITS header into a structure similar to the LASCO structure
               
 Use         : IDL> mlo_hdr = MLO_FITSHDR2STRUCT(fits_hdr)
    
 Inputs      : fits_hdr	FITS header, STRARR
               
 Outputs     : mlo_hdr   	MLO header structure.
               
 Calls       : FXPAR, GETTOK

 Category    : Data_Handling, I_O
               
 Prev. Hist. : None.

 Written     : Russ Howard, NRL, Aug. 1998. (adapted from LASCO_FITSHDR2STRUCT)
               
 Modified    : 

 Version     : Version 1.0, Aug. 22, 1998

 
 @(#)mlo_fitshdr2struct.pro	1.5 11/05/01 :LASCO IDL LIBRARY



MLO_MASSIMG

[List of Routines] (See ./cme/mlo_massimg.pro)

 NAME:
	MLO_MASSIMG

 PURPOSE:
	This function subracts the input calibrated images into a mass image

 CATEGORY:
	CME

 CALLING SEQUENCE:
	Result = MLO_MASSIMG(Bn,Fn)

 INPUTS:
	Bn:	String containing the filename of the base image
	Fn:	String containing the filename of the CME image

 KEYWORD PARAMETERS:
	ONLY_NE:If set, then compute electron density rather than mass
	NEW:	If set, then process the base image, even if it has been done

 OUTPUTS:
	This function returns an image of the calculated mass

 RESTRICTIONS:
	Only works for calibrated images

 EXTERNAL CALLS:
	LASCO_READFITS, CALC_CME_MASS

 PROCEDURE:
	The files for the base and CME images are read in and calibrated.
	The images are then adjusted to have the same area and summing.
	The images are differenced. CALC_CME_MASS is called to 
	compute the CME mass.

 EXAMPLE:
	To find the mass of a CME, where the base image is '320004.fts' and
	the CME image is in '320005.fts', and saving the total mass information
	in 'mass.lst':

		Massimg = MLO_MASSIMG ('320004.fts','320005.fts')

 MODIFICATION HISTORY:
 	Written by:	RA Howard, NRL, 8/28/98 from C3_MASSIMG
			RAH 5/23/98, Make work and make similar to c3_cme_front

	%W% %H% LASCO IDL LIBRARY


MONITOR_EXP

[List of Routines] (See ./expfac/monitor_exp.pro)

 NAME:
	MONITOR_EXP

 PURPOSE:
	This procedure reads all the files for a given date and processes
	the image to give statistical information for exposure monitoring.

 CATEGORY:
	DATA_ANAL

 CALLING SEQUENCE:
	MONITOR_EXP,Date,Lz

 INPUTS:
	Date:	Gives the date to be processed in one of the following formats:
			YYMMDD,	6 character string
			YYYY/MM/DD, 10 character string
			CDS Date Structure
			Long Word of the modified julian date
	Lz:	0 for Quick-look, 1 for Level-0

 OPTIONAL INPUTS:
	Tel:	The telesope designation (string):  c1, c2, c3, c4/eit
		The default is all three LASCO telescopes.

 KEYWORD PARAMETERS:
	None

 OUTPUTS:
	None.

 SIDE EFFECTS:
	Appends the information to files in $MON_EXP with the file name
	telstr_monexp_YYMMDD.dat, where telstr is a string denoting the telscope
	and YYMMDD are 6 digits giving the year, month and day of the data:
		eg.   c1_monexp_961231.dat
		      c2_monexp_961231.dat
		      c3_monexp_961231.dat
	(records) in the .dat file.

 RESTRICTIONS:

 PROCEDURE:

 EXAMPLE:
	To process the exposure monitoring information for 1 Sep 1996 quick
	look data:

		MONITOR_EXP,'960901',0
	or
		MONITOR_EXP,'1996/09/01',0
	or
		MONITOR_EXP,mjd,0
	or
		MONITOR_EXP,mjd.mjd,0

 MODIFICATION HISTORY:
 	Written by:	R.A. Howard, NRL, 10/3/96
	Modified by:	J. S. Morrill, NRL, 4/8/97
	Modified by:	RAH, 5/22/97, error handling for missing directories
	Modified by:	RAH, 5/22/97, split out loop to monitor_exp_img

 @(#)monitor_exp.pro	1.7 06/02/97 :NRL Solar Physics


MONITOR_EXP_IMG

[List of Routines] (See ./expfac/monitor_exp_img.pro)

 NAME:
	MONITOR_EXP_IMG

 PURPOSE:
	This procedure reads the specified file and processes
	the image to give statistical information for exposure monitoring.

 CATEGORY:
	DATA_ANAL

 CALLING SEQUENCE:
	MONITOR_EXP_IMG,Fn

 INPUTS:
	Fn:	String containing the file name to process

 KEYWORD PARAMETERS:
	SAVEDIR		Specify directory to save output to besides $MON_EXP

 OUTPUTS:
	None.

 SIDE EFFECTS:
	Appends the information to files in $MON_EXP with the file name
	telstr_monexp_YYMMDD.dat, where telstr is a string denoting the telscope
	and YYMMDD are 6 digits giving the year, month and day of the data:
		eg.   c1_monexp_961231.dat
		      c2_monexp_961231.dat
		      c3_monexp_961231.dat
	(records) in the .dat file.

 RESTRICTIONS:

 PROCEDURE:

 EXAMPLE:
	To process the exposure monitoring information for the image specified
	by 120050001.fts:

		MONITOR_EXP_IMG,'120050001.fts'

 MODIFICATION HISTORY:
 	Written by:	R.A. Howard, NRL, 10/3/96
	Modified by:	J. S. Morrill, NRL, 4/8/97
	Modified by:	RAH, 5/22/97, error handling for missing directories
	RAH 5/24/97, Extracted from MONITOR_EXP to be able to handle single images
	NBR 1/10/01, Extract filename from input
	NBR 1/15/02, Add SAVEDIR keyword; convert nleb and nccd to type LONGWORD

 @(#)monitor_exp_img.pro	1.3 01/15/02 :NRL Solar Physics


MOTOR_DECODE

[List of Routines] (See ./packets/motor_decode.pro)

 NAME:
	MOTOR_DECODE

 PURPOSE:
	This function returns a structure array containing the decoded motor 
	status.

 CATEGORY:
	PACKETS

 CALLING SEQUENCE:
	Result = MOTOR_DECODE (Hk,Tel)

 INPUTS:
	Hk:	A 2D byte array containg the LASCO HK packets (at least HK #2)
	Tel:	An integer (0..3) giving the telescope number 

 KEYWORD PARAMETERS:
	FOCUS:		Set for the focus motor
	FILTER:		Set for the filter wheel motor
	POLAR:		Set for the polarizer wheel motor
	SECTOR:		Set for the sector wheel motor
	SHUTTER:	Set for the shutter motor
	DOOR:		Set for the door motor
	IOCSX:		Set for the IOCS-X motor
	IOCSY:		Set for the IOCS-Y motor
	LEG1:		Set for the leg #2 motor
	LEG2:		Set for the leg #2 motor
	FPLL:		Set for the FP launch lock motor

 OUTPUTS:
	This function returns an array of structures
		pos
		rate
		adv
		status
		coil
		mode
		dir
		ok
		channel

 MODIFICATION HISTORY:
 	Written by:	S.E. Paswaters, NRL, 1995

	@(#)motor_decode.pro	1.2 08/17/01 LASCO IDL LIBRARY

	17 Aug 2001	RAH	Corrected some compilation errors


MOVE_REDUCE_LOG

[List of Routines] (See ./reduce/move_reduce_log.pro)

 NAME:
	MOVE_REDUCE_LOG

 PURPOSE:
	This procedure moves the log and db files produced by the pipeline 
	processing from the directory pointed to by $REDUCE_LOG into 
	subdirectories by process date.

 CATEGORY:
	REDUCE

 CALLING SEQUENCE:

	MOVE_REDUCE_LOG

 OPTIONAL INPUTS:
	Dte:	String giving the date to be processed in the format YYMMDD.
		The default is to process all files.

 OUTPUTS:
	None

 SIDE EFFECTS:
	Moves files into a subdirectory

 MODIFICATION HISTORY:
 	Written by:	R.A. Howard, NRL, 25 Apr 1996
	2002.02.01, NBR - Add /SH to SPAWN

	@(#)move_reduce_log.pro	1.2 02/01/02 LASCO IDL LIBRARY


MPEG_WID

[List of Routines] (See ./display/mpeg_wid.pro)

 MPEG_WID
	Widget interface for make_mpeg.

 Usage:
	mpeg_wid[, group=group]

 Keyword:
	group	long	input	The id of the group leader.

 History:
	Original: 24/7/96; SJT


MULTI_INTERP

[List of Routines] (See ./reduce/fuzzy/hcie_zone.pro)

 NAME:
       MULTI_INTERP

 PURPOSE:
       Performs a multiple 1D interpolation on a 2D image, along a set of
	lines given by a map (for ex. parallel lines)

 CALLING SEQUENCE:
       interp_array = multi_interp (array, map, theta)

 INPUTS:
	array		an array to interpolate; interpolation is performed
			on missing values within the array (i.e. null values)
			thanks to the correct values (non-null values)
	map		an array of the same dimensions, showing the location
			of lines where to performs the multiple interpolations
			The value of each pixel in that map is the number of
			the line it belongs to (0, 1, ..., N-1) for N lines
	theta		the angle perpendicular to the parallel lines

 OUTPUTS:
	The interpolated array


MULTI_SMOOTH

[List of Routines] (See ./reduce/fuzzy/hcie_zone.pro)

 NAME:
       MULTI_SMOOTH

 PURPOSE:
       Performs a multiple 1D smoothing on a 2D image, along a set of
	lines given by a map (for ex. parallel lines)
	Multi-smooth works exactely in the same way than multi-interp

 CALLING SEQUENCE:
       smooth_array = multi_smooth (array, map, theta)

 INPUTS:
	array		an array to smooth
	map		an array of the same dimensions, showing the location
			of lines where to performs the multiple smoothing
	theta		the angle perpendicular to the parallel lines

 OUTPUTS:
	The smoothed array


MVI2DATA_CUBE

[List of Routines] (See ./movie/mvi2data_cube.pro)

 Project     : SOHO - LASCO/EIT

 Name        : MVI2DATA_CUBE

 Purpose     : Convert .mvi movie to data cube and header array

 Use         : IDL> MVI2DATA_CUBE, mvifile, images, headers, /SAVE

 Inputs      : mvifile 	;** name of mvi movie file

 Outputs     : images 		;** 3 dimensional bytarr of images (nx,ny,len)
	        headers		;** array of header structures
** {mvihdr, filename:'',detector:'',time_obs:'',date_obs:'',filter:'',polar:'',sector:'',exptime:0.0}


 Keywords    : /SAVE  ;** saves images, headers, and r,g,b color vectors to IDL saveset (idlsave.dat)

 Category    : Image Conversion.

 Written     : Scott Paswaters, NRL May 1998.

 Modified    : 

 Version     : 1.0

       @(#)mvi2data_cube.pro 1.1 10/12/96 LASCO IDL LIBRARY


MVI2FRAMES

[List of Routines] (See ./movie/mvi2frames.pro)

 Project     : SOHO - LASCO/EIT

 Name        : MVI2FRAMES

 Purpose     : Convert .mvi movie to GIF, TIFF, or PICT frames.

 Use         : IDL> MVI2FRAMES, mvifile, type, /LOGO, /TIMES, /VIDEO, FITS_HDR=fits_hdr

 Inputs      : mvifile 	;** name of mvi movie file
             : type: 0 = gif
              	      1 = tiff
              	      2 = pict
              	      3 = fits

 Keywords    : /LOGO 		;** add the LASCO logo in lower right corner
               /TIMES 		;** to have the date & time displayed
               /VIDEO 		;** to reduce to video resolution 640x480 or:
               VIDEO=2 	;** to reduce to video resolution 480x480
                FITS_HDR	;** strarr fits hdr of additional keyword/value pairs 
				;** to include with fits files.
               /NAME 		;** default is to name images date_time.ext, set this
				;** keyword to 1 them after the mvi filename001.ext (etc)
				;** or set it to a string to be named string001.ext (etc)

 Side effects: Image files are written to current directory.
               Be sure to have the color table loaded before calling.

 Category    : Image Conversion.

 Written     : Scott Paswaters, NRL Dec. 1997.

 Modified    : SEP  05 Feb 1997 - Mods for mvi version 1 format.
             : SEP  14 Mar 1997 - Name images date_time.ext

 Version     : 2.0

       @(#)mvi2frames.pro 1.1 10/12/96 LASCO IDL LIBRARY


MVI2GIF

[List of Routines] (See ./movie/mvi2gif.pro)

 Project     : SOHO - LASCO/EIT

 Name        :

 Purpose     : Convert frames of .mvi movie file to individual GIFs

 Use         : IDL> MVI2GIF, InputMVIFilename, /TIMEANDCAM

 Inputs      : inputdir

 Optional Inputs: None

 Outputs     : GIF files

 Keywords    :	TIMEANDCAM	Adds time and cam to filename instead of frame number

 Comments    :

 Side effects:

 Category    : Image Display.  Animation.

 Modified:
	June 2000 - B. Podlipnik
	OCt  2000, N Rich - Load color table from MVI file
	020207	Jake	Added /TIMEANDCAM keyword
	030715	jake	added PNG keyword
	030715	jake	removed PNG rotate during write

 Version     :

;;; 11/02/01 @(#)mvi2gif.pro	1.3 - NRL/LASCO IDL LIBRARY

 07/15/03 @(#)mvi2gif.pro	1.8 :LASCO IDL LIBRARY


MVIPLAY

[List of Routines] (See ./movie/mviplay.pro)

 Project     : SOHO - LASCO/EIT
                   
 Name        : MVIPLAY
               
 Purpose     : Widget tool to display animation sequence.
               
 Explanation : This tool allows the user to view a series of images as
		an animation sequence.  The user can control the direction,
		speed, and number of frames with widget controls.
		Click any mouse button inside draw window to bring forward/hide
		control widget.
               
 Use         : IDL> MVIPLAY [, mvifile, /DISK, /FITSCREEN, START=start, SKIP=skip, LENGTH=length]

		Without any inputs, program will prompt user to select an existing .mvi file.
    Example  : IDL> MVIPLAY

               Or you could have one argument, the .mvi file you want to load.
    Example  : IDL> MVIPLAY, 'mymovie.mvi'

		Use keyword /DISK to play movie from disk instead of loading into RAM.
		This option is useful for viewing large movies on systems with a limited
		amount of RAM.  The maximum speed of the movie will depend on the transfer
		speed of the hard drive or CD-ROM and will be slower than loading into RAM.
    Example  : IDL> MVIPLAY, 'mymovie.mvi', /DISK
    
		Use keyword /FITSCREEN to redimension image to 640x480 (does not work with /DISK)
    Example  : IDL> MVIPLAY, 'mymovie.mvi', /FITSCREEN
    
               Use the keyword SKIP to skip every n frames (good for large movies).
    Example  : IDL> MVIPLAY, SKIP=1         ;* to skip every other frame

               Use the keyword START to start reading movie at frame n (good for large movies).
    Example  : IDL> MVIPLAY, START=100              ;* frame 100 becomes 1st frame of movie

               Use the keyword LENGTH to specify number of frames to read in (good for large movies).
    Example  : IDL> MVIPLAY, START=100, LENGTH=60   ;* to load frames 100-159
    
               Use the keyword TIMES to display date & time on frames (if not already there).
    Example  : IDL> MVIPLAY, /TIMES 	   ; does not work with /DISK keyword. 

               Use the keyword SPEED to preset playback speed. Range is 1-100. Default is 90.
    Example  : IDL> MVIPLAY, SPEED=80 

 Calls       : BREAK_FILE

 Side effects: None.
               
 Category    : Image Display.  Animation.
               
 Written     : Scott Paswaters, NRL Dec. 2 1996.

 Modified    : SEP  10 Jan 1997 - Added SKIP,START,LENGTH,TIMES keywords.
               SEP  05 Feb 1997 - Mods for mvi version 1 format.
               SEP  04 Apr 1997 - Fixed swapflag for .mvi files written on big_endian workstations
               SEP  22 Sep 1997 - Added current frame scrolling widget.
               SEP  27 Jan 1998 - Added /DISK option for playing from disk.
		NBR   5 May 1999 - Change PICKFILE to DIALOG_PICKFILE
		NBR   5 Apr 2000 - Add /SPEED keyword and change default speed
               NBR   1 Oct 2003 - Update READ_MVI
               RAH  23 Sep 2004 - Mods for mvi version 5 (truecolor)

 Version     : 
	09/23/04 @(#)mviplay.pro	1.9   LASCO IDL LIBRARY

 See Also    : MKMOVIE.PRO


MVIPLAY3[1]

[List of Routines] (See ./movie/mviplay3.pro)

 Project     : SOHO - LASCO/EIT
                   
 Name        : MVIPLAY3
               
 Purpose     : Widget tool to display animation sequence.
               
 Explanation : This tool allows the user to view a series of images as
		an animation sequence.  The user can control the direction,
		speed, and number of frames with widget controls.
		Click any mouse button inside draw window to bring forward/hide
		control widget.
               
 Use         : IDL> MVIPLAY3 [, mvifile, /DISK, /FITSCREEN, START=start, SKIP=skip, LENGTH=length]

		Without any inputs, program will prompt user to select an existing .mvi file.
    Example  : IDL> MVIPLAY3

               Or you could have one argument, the .mvi file you want to load.
    Example  : IDL> MVIPLAY3, 'mymovie.mvi'

		Use keyword /DISK to play movie from disk instead of loading into RAM.
		This option is useful for viewing large movies on systems with a limited
		amount of RAM.  The maximum speed of the movie will depend on the transfer
		speed of the hard drive or CD-ROM and will be slower than loading into RAM.
    Example  : IDL> MVIPLAY3, 'mymovie.mvi', /DISK
    
		Use keyword /FITSCREEN to redimension image to 640x480 (does not work with /DISK)
    Example  : IDL> MVIPLAY3, 'mymovie.mvi', /FITSCREEN
    
               Use the keyword SKIP to skip every n frames (good for large movies).
    Example  : IDL> MVIPLAY3, SKIP=1         ;* to skip every other frame

               Use the keyword START to start reading movie at frame n (good for large movies).
    Example  : IDL> MVIPLAY3, START=100              ;* frame 100 becomes 1st frame of movie

               Use the keyword LENGTH to specify number of frames to read in (good for large movies).
    Example  : IDL> MVIPLAY3, START=100, LENGTH=60   ;* to load frames 100-159

               Use the keyword TIMES to display date & time on frames (if not already there).
    Example  : IDL> MVIPLAY3, /TIMES 	   ; does not work with /DISK keyword.

               Use the keyword SPEED to preset playback speed. Range is 1-100. Default is 90.
    Example  : IDL> MVIPLAY3, SPEED=80

 Calls       : BREAK_FILE

 Side effects: None.

 Category    : Image Display.  Animation.

 Written     : Scott Paswaters, NRL Dec. 2 1996.

 Modified    : SEP  10 Jan 1997 - Added SKIP,START,LENGTH,TIMES keywords.
               SEP  05 Feb 1997 - Mods for mvi version 1 format.
               SEP  04 Apr 1997 - Fixed swapflag for .mvi files written on big_endian workstations
               SEP  22 Sep 1997 - Added current frame scrolling widget.
               SEP  27 Jan 1998 - Added /DISK option for playing from disk.
		NBR   5 May 1999 - Change PICKFILE to DIALOG_PICKFILE
		NBR   5 Apr 2000 - Add /SPEED keyword and change default speed
		thejake	011109 - After testing, additions do not seem to have done any harm so adding
					WRUNMOVIEM3, MVIPLAY3, WRITE_DISK_MOVIE3, and READ_MVI3 to library.
					Once an MVI is written with the version 3 software, it will need to
					be read with it as well.


 Version     : 2.2

 See Also    : MKMOVIE.PRO
  07/09/03 @(#)mviplay3.pro	1.3   LASCO IDL LIBRARY


MVIPLAY3[2]

[List of Routines] (See ./movie/mviplay3.pro)

 Project     : SOHO - CDS

 Name        :
	BREAK_FILE
 Purpose     :
	Break a filename into its component parts.
 Explanation :
	Given a file name, break the filename into the parts
	of disk/logical, the directory, the filename, the
	extension, and the file version (for VMS)
 Use         :
	BREAK_FILE, FILE, DISK_LOG, DIR, FILNAM, EXT, FVERSION, NODE
 Inputs      :
	file	- The file name
 Opt. Inputs :
	None.
 Outputs     : 
	disk_log- The disk or logical (looks for a ":")
		  This is generally only valid on VMS machines
	dir	- The directory
	filnam	- The filename (excluding the ".")
	ext	- The filename extension (including the ".")
	fversion- The file version (only VMS)
	node	- The Node name (only VMS)
 Opt. Outputs: 
	None.
 Keywords    : 
	None.
 Calls       : 
	None.
 Common      : 
	None.
 Restrictions: 
	VMS:
		Assumes that : always precedes []
	ULTRIX:
		Right now it has trouble with the ultrix option of use
		of "." or ".."
 Side effects: 
	None.
 Category    : 
	Utilities, Operating_system.
 Prev. Hist. : 
	Written 1988 by M.Morrison
	   Aug-91 (MDM) Changed to handle Unix filename convensions
	28-Feb-92 (MDM) * Adjusted to handle arrays
	11-Mar-92 (MDM) - Perform a STRTRIM(x,2) on input string before
			  doing the "break-up"
	 1-Dec-92 (MDM) - Moved code to do filename, extension and version
			  number for both VMS and Unix (previously it
			  did not do version number code for Unix)
	29-Jan-93 (DMZ/MDM) - checked for node in file name
 Written     : 
	M. Morrison, August 1991.
 Modified    : 
	Version 1, William Thompson, GSFC, 23 April 1993.
		Incorporated into CDS library.
	Version 1.1, William Thompson, GSFC, 7 May 1993.
		Added IDL for Windows compatibility.
 Version     : 
	Version 1.1, 7 May 1993.


MVI_SUMMARY

[List of Routines] (See ./movie/mvi_summary.pro)

RO MVI_SUMMARY, filename, ALL=all, MVI_ONLY=mvi_only

 Keywords:
  /ALL		Show info for each frame, default is MVI only

 Modified:
  2003.08.28, nbr - Add /MVI_ONLY
  2003.09.23, nbr - Make MVI_ONLY the default, add /ALL

  09/24/03, @(#)mvi_summary.pro	1.2 : NRL LASCO Library


NE2MASS

[List of Routines] (See ./cme/ne2mass.pro)

 NAME:
	NE2MASS

 PURPOSE:
	This function converts electron density into mass

 CATEGORY:
	CME 

 CALLING SEQUENCE:
	Result = NE2MASS (Num_el)

 INPUTS:
	Num_el:	The number of electrons

 OUTPUTS:
	This function returns the mass corresponding to the electron density.

 PROCEDURE:
	
 MODIFICATION HISTORY:
 	Written by:	R.A. Howard, NRL, 18 September 1996

 @(#)ne2mass.pro	1.1 04/18/99 :LASCO IDL LIBRARY



NE_FROM_PB

[List of Routines] (See ./data_anal/ne_from_pb.pro)

 NAME:
	NE_FROM_PB

 PURPOSE:
	This function does the inversion of a radial fit to pB to electron density.

 CATEGORY:
	LASCO DATA_ANALYSIS

 CALLING SEQUENCE:
	NE_FROM_PB,Radii,Q,Coeff,Exps

 INPUTS:
	Radii:	An array of radial points for which the inversion is to be done
	Q:	The limb darkening parameter (0<1)
	Coeff:	The coefficients in the fit of pB versus R
	Exps:	The coefficients in the expansion of pB versus R

 OUTPUTS:
	This function returns the electron density inverted from the fit of pB.

 RESTRICTIONS:
	The pB fit is assumed to be only of the K-corona.  Any F-coronal contribution
	must be removed.

 PROCEDURE:
	The procedure follows the method of van de Hulst, Bull Astron Institutes Netherlands, 
	vol XI, 2 Feb 1950, pp135-150

 EXAMPLE:

 MODIFICATION HISTORY:
 	Written by:	RA Howard, NRL, 27 Nov 1998

	@(#)ne_from_pb.pro	1.1 11/28/98 LASCO IDL LIBRARY


NORM_WARN

[List of Routines] (See ./exposure/norm_warn.pro)

 NORM_WARN
	Confirm the QUIT operation.

 Usage:
	iquit=norm_warn()

 Arguments and keywords: none:

 History:
	original: 19/1/95; SJT


NUMS2STRING

[List of Routines] (See ./util/nums2string.pro)

 FUNCTION nums2string

 Converts an array of numbers to a space delimited list of numeric characters

 INPUTS:
	nums 	FIX,FLOAT,BYT ARR

 OUTPUTS:
	numstring	CHAR

 KEYWORDS:
 	DELIM	Set = character to use as delimiter, default is ' '

 AUTHOR:
  Nathan Rich, NRL/Interferometrics, 2001

	@(#)nums2string.pro	1.1, 11/08/01 - NRL IDL LASCO Library


NUM_TO_FUZZY

[List of Routines] (See ./reduce/fuzzy/num_to_fuzzy.pro)

 NAME:
	NUM_TO_FUZZY

 PURPOSE:
	Converts a number to a fuzzy number

 PROPCEDURE:
	Converts a number (or array of numbers) to a fuzzy number (resp. array
	of fuzzy numbers with the same dimensions)

	A "fuzzy number" is a confidence interval around a given number.
	Given 1 number a0 (highest confidence case) and a [min,max] interval
	(lowest confidence case), the fuzzy number is an compromise beetween
	[amin,amax] and [a0, a0] according to a confidence level (0 to 1) for
	the number a0.
;	
 CALLING SEQUENCE:
	afuzzy = num_to_fuzzy (a0, amin, amax, conf)

 INPUTS:
	a0		a non-complex number or array of numbers
	amin		the minimum value for a confidence level 0
	amax		the maximum value for a confidence level 0
	conf		a confidence level, ranging from 0 (no confidence in
			the number a0) to 1 (total confidence in the number a0)

 OUTPUTS:
	A fuzzy number (structure with the form {low,high})


OBETIME2TAI

[List of Routines] (See ./scenario/obetime2tai.pro)

 NAME:
	OBETIME2TAI

 PURPOSE:
	Convert OBE time in 32 sec counter and fractional 32 second counts
	to TAI time

 CATEGORY:
	Time Utility

 CALLING SEQUENCE:

	OBETIME2TAI, Msw, Midsw, Lsw, Utc_time

 INPUTS:
	Msw:	Most Significant Word of 32 second counter
	Midsw:	Least Significant Word of 32 second counter
	Lsw:	Fractional 32 second counter

 OPTIONAL INPUTS:
	
 KEYWORD PARAMETERS:

 OUTPUTS:
	Utc_time: String containing TAI time e.g. 1999/09/21 21:30:00.000

 OPTIONAL OUTPUTS:

 COMMON BLOCKS:

 SIDE EFFECTS:

 RESTRICTIONS:

 PROCEDURE:

 EXAMPLE:

	OBETIME2TAI,'0273'X,'d2a5'X,'4000'X,utc_time

       utc_time is a string 1999/09/21 21:18:00.000

 MODIFICATION HISTORY:
 	Written by:	Dennis Wang, 21 Sep 1999

	@(#)obetime2tai.pro	1.1 09/22/99 LASCO IDL LIBRARY


OCCLTR_CNTR

[List of Routines] (See ./data_anal/occltr_cntr.pro)

 NAME:
	OCCLTR_CNTR

 PURPOSE:
	This function returns the center of the occulting disk (for LASCO)
       and Sun Centers (for EIT) as a 2 element array of the column and
       row numbers.  The number starts at 0.  The definition in the FITS
	header is starting from 1.
       

 CATEGORY:
	LASCO_ANALYSIS

 CALLING SEQUENCE:
	Result = OCCLTR_CNTR (Hdr)

 INPUTS:
	Hdr:	A FITS header for the image that the center is desired. 
               It can be either a string header  or a structure header.

 OUTPUTS:
	This function returns the occulter center as a two element array
	in which the first element is the column center and the second
	element is the row center.

 RESTRICTIONS:
	Returns the center for the readout port "C"

 PROCEDURE:
       occulter_center.dat file is used first but if related data is 
       not found, then default values that have been determined by
       other means and put into a table, here, are used.

 MODIFICATION HISTORY:
 	Written by:	R.A. Howard, 14 March 1996
	17 Oct 96	RAH, Revised C1 coords
	04 Dec 96	RAH, Corrected case statement default value
       01 Dec 98       AEE, added code to use occulter_center.dat before 
                            attempting to use the defaults in this file.
                            Also added defaults for EIT in the case statement.
	14 Mar 01	NBR, Use different method to retrieve C3 center using
				time-varying points
	 3 Dec 01	NBR, Change path to Windows and SSW compatible for GSV

	12/07/01, @(#)occltr_cntr.pro	1.9 - LASCO NRL IDL LIBRARY


OD_BRIGHT

[List of Routines] (See ./exposure/od_bright.pro)

 OD_BRIGHT
	Determine the brightness of the central block in the occulting
	disk, and also estimate whether the image has been bias
	subtracted and/or exposure corrected.

 Usage:
	od_bright, bright, bias, expc
	
 Arguments:
	bright	float	output	The relative brightness of the
				occulting disk block
	bias	byte	output	Estimate of whether the bias has been
				subtracted (Assumes that if the image
				has any part < 3/4 of the bias
				[corrected by exposure if needed] then
				the bias has been removed).
	expc	byte	output	Estimate of whether the image has been
				exposure corrected (assumes that if
				the maximum of the image multiplied
				by the exposure exceeds the saturation
				value of 16383 then the image has NOT
				been exposure-normalized).

 Restrictions:
	It is possible that "on-board summed" images may confuse the
	EXPC determination.

 History:
	Original: 1/10/96; SJT
	Try median instead of masked mean: 7/11/96; SJT


OFFSET_BIAS

[List of Routines] (See ./convert/offset_bias.pro)

 NAME:			OFFSET_BIAS

 PURPOSE:		Provides the electronic offset introduced for
			each readout port

 CATEGORY:		LASCO Calibration

 CALLING SEQUENCE:	Offset = OFFSET_BIAS(Telescope,Readport)

 INPUTS:		Telescope = String indicating telescope
				Values are 'C1','C2','C3','EIT'
			Readport = String indicating read out port
				Values are 'A','B','C','D'

 OPTIONAL INPUTS:	Date= string giving the date as YYMMDD

 KEYWORD PARAMETERS:	SUM:	If present, computes the proper bias for LEB Summing

 OUTPUTS:		Integer giving the offset bias in DN

 OPTIONAL OUTPUT PARAMETERS:
 COMMON BLOCKS:
 SIDE EFFECTS:
 RESTRICTIONS:
 PROCEDURE:		Obtained from flight calibration

 MODIFICATION HISTORY:
			RA Howard Writen 6 Feb 1996
      V1    RAH   02/06/96     Initial Release
      V2    RAH   06/02/97     Added function of date to C3
      V3    RAH   06/10/97     Added function of date to C1 & C2
      V4    RAH   08/21/97     Added correction for leb summing
      V5    RAH   06/08/98     Updates to C2 and C3 coefficients for port C
      V6    RAH   06/10/98     Updates to C2 and C3 coefficients for port C, QL through 5/98
      V7    RAH   09/18/98     Updates to C2 and C3 coefficients for port C, LZ through 6/21/98
      V8    NBR   10/21/98	Use lasco_ftshdr2struct, not ftshdr2struct
      V9    RAH   08/20/99     Updates to C2 and C3 coefficients for port C
      V10   RAH   12/21/99     Updates to C2 and C3 coefficients for port C
      V11   RAH   01/21/00     Syntax change from ENDIF to END for IDL 5.3
      V12   RAH   07/03/00     Updates to C2 and C3 coefficients for port C
	NBR, 08/04/00 - Use SCCS version number; Add HISTORY to header if FITS header
      V13   RAH   01/06/01     Updates to C2 and C3 coefficients for port C, split c2 before/after mispoint
      V14   RAH   12/13/01     Updates to C2 and C3 coefficients for port C
      V15   RAH   07/09/02     Updates to C2 and C3 coefficients for port C
      V16   RAH   05/11/05     Updates to C2 and C3 coefficients for port C


ONE2TWO

[List of Routines] (See ./util/one2two.pro)

 NAME:
       ONE2TWO
 PURPOSE:
       Convert from 1-d indices to 2-d indices.
 CATEGORY:
 CALLING SEQUENCE:
       one2two, in, arr, ix, iy
 INPUTS:
       in = 1-d indices (may be a scalar).  in
       arr = array to use (for size only).  in
         Alternatively, arr can be [nx, ny]
         where nx and ny are the image sizes
         in x and y (saves space).
 KEYWORD PARAMETERS:
 OUTPUTS:
       ix, iy = equivalent 2-d indices.     out
 COMMON BLOCKS:
 NOTES:
 MODIFICATION HISTORY:
       R. Sterner, 25 May, 1986.
       Johns Hopkins Applied Physics Lab.
       R. Sterner, 19 Nov, 1989 --- converted to SUN.
       R. Sterner, 9 Jun, 1993 --- Allowed [nx,ny] instead of ARR.

 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.


ORBIT_FILE_TYPE

[List of Routines] (See ./data_anal/orbit_file_type.pro)

 NAME:
       ORBIT_FILE_TYPE

 PURPOSE:
       This function returns an identifier, indicating which type of
       orbit files exist at the site.  If files of more than one type
       exist, then a fits file is returned if possible.

 CATEGORY:
       

 CALLING SEQUENCE:
       Result = ORBIT_FILE_TYPE (Date)

 INPUTS:
       Date:    format 'DD-Mmm-YYYY HH:MM:SS.SSS'

 OUTPUTS:
       Type:    'CDF'  - cdf format orbit files
                'FITS' - fits format orbit files
                'NULL' - no orbit files found


 PROCEDURE:
       Determines whether the available orbit files are definitive or
       predictive, whether the available file types are *.CDF or
       *.FITS, and whether the prefix is SO_OR_* or YYMMDD*.cdf

 MODIFICATION HISTORY:
       Written by:     D.A. Biesecker, 12 September 1996
       Adapted from GET_ORBIT_CDF written by S.P. Plunkett

	@(#)orbit_file_type.pro	1.1 10/04/96 LASCO IDL LIBRARY


PATTERN1[1]

[List of Routines] (See ./las-c2/pattern1.pro)

 NAME: FILTMEDIAN.PRO
 PURPOSE: apply a median filter and rebin in the same time.
 CATEGORY: General tools high level routine
 CALLING SEQUENCE: filtmedian,ima_in,kx,ky,ima_out
 INPUTS: ima_in                           image array
         kx                               step_size in x
         ky                               step_size in y
 OPTIONAL INPUT PARAMETERS:               None
 KEYWORD PARAMETERS:                      None
 OUTPUTS:ima_out                          resulting frame
 OPTIONAL OUTPUT PARAMETERS:              None
 COMMON BLOCKS:                           None
 SIDE EFFECTS:                            None
 RESTRICTIONS:                            None
 PROCEDURE:
 MODIFICATION HISTORY:   defined by M.B 20/01/94

 SCCS variables for IDL use

 @(#)filtmedian.pro  1.0 20/01/94 :LAS


PATTERN1[2]

[List of Routines] (See ./las-c2/pattern1.pro)

ro pattern2,difres1,difres2,difres_out
;; by M.B   :LAS 21/01/94  magnify the pattern (shunt aleatory peaks) & give
;;                         the signal/noise ratio


PATTERN1[2]

[List of Routines] (See ./las-c2/pattern1.pro)

ro pattern1,ima1,ima2,ima3,ima4,difres
;; by M.B :LAS  21/01/94  extract & display the pattern of ccd


PB_INVERTER

[List of Routines] (See ./polariz/pbinverter/pb_inverter.pro)

 NAME:
       PB_INVERTER

 PURPOSE:
       This program takes a calibrated pB image and returns the density
       using a Van de Hulst inversion.  A polynomial fit to the pB data
	of the form r^(-n), where n is user-defined, is inverted to get
	electron density.  Either single radial profiles or the entire
 	360 degrees in latitude can be processed.

 CATEGORY:
       Data analysis

 CALLING SEQUENCE:
       PB_INVERTER [,filename]


 OPTIONAL INPUTS:
       Filename: Enter the calibrated pB filename.  Default is to prompt
		user for filename

 OUTPUTS:
	Displays pB image, pB profiles, and calculated density profiles

 OPTIONAL OUTPUTS:
       Density data save in filenames as follows:
		pbne_YYYYMMDD_HHMM_Cx.sav;	where x is the telescope
		or
		pbne_YYYYMMDD_HHMM_Cx_aaa.sav;	where aaa is position angle

 COMMON BLOCKS:
       Programconstants:
	Simconstants:
	Widgetvars:
	Ipexpansionarg:


 PROCEDURE:
	The default is to look for pB files in the directory specified by
	the environment variable POLDIR

 EXAMPLE:
	pb_inverter

 MODIFICATION HISTORY:
       Written by:     R. Howard and A. Hayes
       various up to Nov 9, 2001 by D.A. Biesecker
		Modified so that the order of the polynomial fit and
		the width of the angular binnin can be set in the widget.
		Also modified to display the PA as the cursor is moved
		Many other mods which I've forgotted about.
       July 25, 2005   RA Howard  corrected error with Mk4 Header
                                  added simpb to the saveset
                                  added capability to set the max height in inversion

       @(#)pb_inverter.pro	1.2  07/25/05	LASCO IDL LIBRARY


PCURSOR.PRO

[List of Routines] (See ./las-c2/simcircle.pro)

 NAME:
       PCURSOR.PRO
 PURPOSE:
       Plot cursor position on display and
       put the pixels coordinates selected with the
       cursor in a table that can be readed.
 CATEGORY:
       array manipulation
 CALLING SEQUENCE:
       PCURSOR,IMA,TAB_NAME
 INPUTS: 
    		IMA	    : IMAGE INPUT
 KEYWORD PARAMETERS:
                                   None
 OUTPUTS:
  		TAB_NAME    : table des  coordonnees des points selectionnes		
	
 COMMON BLOCKS:
       None.
 SIDE EFFECTS:
       None
 RESTRICTIONS:

 PROCEDURE:
       Straightforward.
 MODIFICATION HISTORY:
       Written by JP.L & M.B  v.1.0       : LAS  01/27/94


PHOTOCAL

[List of Routines] (See ./reduce/photocal.pro)

 NAME:				PHOTOCAL

 PURPOSE:			Performs the Level 1 photometric calibration of
				an image from digital counts to mean solar 
				brightness units

 CATEGORY:			REDUCTION

 CALLING SEQUENCE:		Result = PHOTOCAL (X,Hx,Cal,Stray,Vig,Dark,Hnew)

 INPUTS:			X = Input uncalibrated image
				Hx = Header structure for X
				Cal = Photometric Calibration Structure
				Stray = Stray Light Calibration Structure
				Vig = Vignetting Calibration Structure
				Dark = Dark Image Calibration Structure

 OUTPUTS:			Result = Calibrated image
				Hnew = New FITS header

 COMMON BLOCKS:

 SIDE EFFECTS:

 RESTRICTIONS:

 PROCEDURE:

     The LASCO calibration images will be derived from flat field images
     through each filter / polarizer at several known brightness levels and
     for several exposure times.  The flat field images also contain 
     information about the vignetting function, but this information will be
     backed out of the flat fields to create the calibration images used
     here.  A dark field image will be used to subtract off any dark
     counts for that exposure time and to correct for any electronic
     bias that is introduced.

     The CCD response is linear.  However, there may be non-linearity due
     to the shutter opening and closing times.  This gives the following 
     formula to convert a raw image, in counts, to a calibrated image, in 
     photometric units.

     B  =  ( cal.B1 + cal.slope * ( xd - DN1 ) * ( cal.e1 / exptime ) )
           *  vig.img   -  stray.img

     DN1 = cal.img1 + ( ( cal.img3 - cal.img1 ) ) / ( cal.e3 - cal.e1 ) ) 
                       * ( exptime - cal.e1 )

     xd  = x - dark1

     dark1 = dark.img1 + ( (dark.img2 - dark.img1) ) / (dark.e2 - dark.e1) )
                          * ( exptime - dark.e1 )

     where,
           cal.e1    = exposure time for reference image #1
           cal.B1    = brightness level of reference image #1
           cal.slope = slope to convert DN to MSB for exposure e1
           x         = observed image in counts (DN)
           hx        = FITS header associated with image, x
           exptime   = current exposure time (in FITS header)
           DN1       = reference image at current exposure time
           dark1     = dark field image at current exposure time
           xd        = observed image in counts with dark field subtracted
           stray.img = stray light image
           vig.img   = vignetting correction image
                       The vignetting correction is the reciprocal of the 
                       function in the range of [0,1] except that close to 
                       the occulting disk where the function is close to 0, 
                       the correction might be set to 0, rather than permit 
                       the very large correction.
           hnew      = FITS header associated with calibrated image

     cal is an idl structure containing the following elements

           version   = version identification (string)
           date      = date generated (string)
           start     = start date and time when valid (UTC string)
           end       = end date and time when valid (UTC string)
           teles     = telescope (integer)
           tel_conf  = telescope configuration (integer)
           cam_conf  = camera configuration (integer)
           e1        = exposure time at reference image #1 (float)
           e2        = exposure time at reference image #2 (float)
                       (must be equal to e1)
           e3        = exposure time at reference image #3 (float)
           B1        = brightness level of reference image #1 (float)
           B2        = brightness level of reference image #2 (float)
           B3        = brightness level of reference image #3 (float)
                       (must be equal to B1)
           img1      = reference image #1 (integer image) dark subtracted
           img2      = reference image #2 (integer image) dark subtracted
           img3      = reference image #3 (integer image) dark subtracted
           slope     = slope of linear conversion (MSB/DN) (float image)

     dark is an idl structure containing the following elements

           version   = version identification (string)
           date      = date generated (string)
           start     = start date and time when valid (UTC string)
           end       = end date and time when valid (UTC string)
           teles     = telescope (integer)
           tel_conf  = telescope configuration (integer)
           cam_conf  = camera configuration (integer)
           e1        = exposure time at reference image #1 (float)
           e2        = exposure time at reference image #2 (float)
           img1      = reference image #1 (integer image) dark subtracted
           img2      = reference image #2 (integer image) dark subtracted

     stray is an idl structure containing the following elements

           version   = version identification (string)
           date      = date generated (string)
           start     = start date and time when valid (UTC string)
           end       = end date and time when valid (UTC string)
           teles     = telescope (integer)
           tel_conf  = telescope configuration (integer)
           cam_conf  = camera configuration (integer)
           img       = stray light image (float image)

     vig is an idl structure containing the following elements

           version   = version identification (string)
           date      = date generated (string)
           start     = start date and time when valid (UTC string)
           end       = end date and time when valid (UTC string)
           teles     = telescope (integer)
           tel_conf  = telescope configuration (integer)
           cam_conf  = camera configuration (integer)
           img       = vignetting correction image (float image)


 MODIFICATION HISTORY:
     Written R.A. Howard, Naval Research Lab, 23 Apr 1993
         Version 1
                 2   RAH, 12 Nov 1994 additional comments
                 3   RAH, 3 Oct 1995 added sub image capability
                                     header is in fits format
                                     adding dark image correction
                 4   RAH, 15 Nov 1995 added additional HISTORY to header

       @(#)photocal.pro	1.1 04 Apr 1996 LASCO IDL LIBRARY


PICKCOLOR

[List of Routines] (See ./dfanning/pickcolor.pro)

 NAME:
       PICKCOLOR

 PURPOSE:

       A modal dialog widget allowing the user to select
       the RGB color triple specifying a color. The return
       value of the function is the color triple specifying the
       color or the "name" of the color if the NAME keyword is set.

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

 CATEGORY:

       Graphics, Color Specification. See related program FSC_COLOR.

 CALLING SEQUENCE:

       color = PickColor(colorindex)

 RETURN VALUE:

       The return value of the function is a 1-by-3 array containing
       the values of the color triple that specifies the selected color.
       The color can be loaded, for example, in any color index:

           color = PickColor(240)
           TVLCT, color, 240

       The return value is the original color triple if the user
       selects the CANCEL button.

       IF the NAMES keyword is set, the return value of the function is
       the "name" of the selected color. This would be appropriate for
       passing to the FSC_COLOR program, for example.

 OPTIONAL INPUT POSITIONAL PARAMETERS:

       COLORINDEX: The color index of the color to be changed. If not
              specified the color index !D.Table_Size - 2 is used.
              The Current Color and the Color Sliders are set to the
              values of the color at this color index.

 OPTIONAL INPUT KEYWORD PARAMETERS:

       GROUP_LEADER: The group leader for this widget program. This
              keyword is required for MODAL operation. If not supplied
              the program is a BLOCKING widget. Be adviced, however, that
              the program will NOT work if called from a blocking widget
              program, unless a GROUP_LEADER is supplied.

       NAMES: Set this keyword to return the "name" of the selected color
              rather than its color triple.

       STARTINDEX: 88 pre-determined colors are loaded The STARTINDEX
              is the index in the color table where these 88 colors will
              be loaded. By default, it is !D.Table_Size - 89.

       TITLE: The title on the program's top-level base. By default the
              title is "Pick a Color".

 OPTIONAL INPUT KEYWORD PARAMETERS:

       CANCEL: A keyword that is set to 1 if the CANCEL button is selected
              and to 0 otherwise.

 COMMON BLOCKS:

       None.

 SIDE EFFECTS:

       88 pre-determined colors are loaded in the color table.
       In addition, the color index at COLORINDEX is modified while
       the program is on the display. When the program exits, the
       entry color table is restored. Thus, on 8-bit displays there
       might be some color effects in graphics windows while PICKCOLOR
       is on the display. Changes in the color table are not noticable
       on 16-bit and 24-bit displays.

 EXAMPLE:

       To specify a color for a plot in color decomposition OFF mode:

          Device, Decomposed=0
          !P.Color = !P.Color < (!D.Table_Size - 1)
          color = PickColor(!P.Color, Cancel=cancelled)
          IF NOT cancelled THEN BEGIN
              TVLCT, color, !P.Color
              Plot, data
          ENDIF

       To specify a color for a plot in color decomposition ON mode:

          Device, Decomposed=1
          color = PickColor(Cancel=cancelled)
          !P.Color = Color24(color)
          IF NOT cancelled THEN Plot, data

        To obtain the name of the selected color to pass to GetColor:

          selectedColor = PickColor(/Name)
          axisColor = FSC_Color(selectedColor, !D.Table_Size-4)

 MODIFICATION HISTORY:
       Written by: David Fanning, 28 Oct 99.
       Added NAME keyword. 18 March 2000, DWF.
       Fixed a small bug when choosing a colorindex less than !D.Table_Size-17. 20 April 2000. DWF.
       Added actual color names to label when NAMES keyword selected. 12 May 2000. DWF.
       Modified to use 88 colors and FSC_COLOR instead of 16 colors and GETCOLOR. 4 Dec 2000. DWF.


PICKCOLORNAME

[List of Routines] (See ./dfanning/pickcolorname.pro)

 NAME:
       PICKCOLORNAME

 PURPOSE:

       The purpose of this program is to provide a blocking
       or modal widget interface for selecting a color "name".
       The program uses colors familiar to the FSC_COLOR program,
       and is often used to select a color name for passing to FSC_COLOR.

 AUTHOR:

       FANNING SOFTWARE CONSULTING:
       David Fanning, Ph.D.
       1645 Sheely Drive
       Fort Collins, CO 80526 USA
       Phone: 970-221-0438
       E-mail: davidf@dfanning.com
       Coyote's Guide to IDL Programming: http://www.dfanning.com

 CATEGORY:

       Graphics, Color Specification.

 CALLING SEQUENCE:

       colorName = PickColorName(startColorName)

 OPTIONAL INPUT PARAMETERS:
       startColorName: A string with the "name" of the color. Valid names
           depend on program variables, but typically include these colors:

              Black       Pink
              Magenta     Aqua
              Cyan        SkyBlue
              Yellow      Beige
              Green       Charcoal
              Red         Gray
              Blue        Orchid
              Navy        White

       The color WHITE is used if this parameter is absent.

 INPUT KEYWORD PARAMETERS:

       BOTTOM: The colors used in the program must be loaded somewhere
           in the color table. This keyword indicates where the colors
           start loading. By default BOTTOM is set equal to !D.Table_Size-NCOLORS-1.

       COLUMNS: Set this keyword to the number of columns the colors should
           be arranged in.

       FILENAME: The string name of an ASCII file that can be opened to read in
           color values and color names. There should be one color per row
           in the file. Please be sure there are no blank lines in the file.
           The format of each row should be:

              redValue  greenValue  blueValue  colorName

           Color values should be between 0 and 255. Any kind of white-space
           separation (blank characters, commas, or tabs) are allowed. The color
           name should be a string, but it should NOT be in quotes. A typical
           entry into the file would look like this:

               255   255   0   Yellow

       GROUP_LEADER: This identifies a group leader if the program is called
           from within a widget program. Note that this keyword MUST be provided
           if you want to guarantee modal widget functionality. (If you don't know
           what this means, believe me, you WANT to use this keyword, always.)

       INDEX: This keyword identifies a color table index where the selected color
           is to be loaded when the program exits. The default behavior is to restore
           the input color table and NOT load a color.

       TITLE: This keyword accepts a string value for the window title. The default
           is "Select a Color".

 OUTPUT KEYWORD PARAMETERS:

       CANCEL: On exit, this keyword value is set to 0 if the user selected
           the ACCEPT button. IF the user selected the CANCEL button, or
           closed the window in any other way, this keyword value is set to 1.

 COMMON BLOCKS:

       None.

 SIDE EFFECTS:

       Colors are loaded in the current color table. The input color table
       is restored when the program exits. This will only be noticable on
       8-bit displays. The startColorName is returned if the user cancels
       or destroys the widget before a selection is made. Users should
       check the CANCEL flag before using the returned color.

 EXAMPLE:

       To call the program from the IDL comamnd line:

         IDL> color = PickColorName("red") & Print, color

       To call the program from within a widget program:

         color = PickColorName("red", Group_Leader=event.top) & Print, color

 MODIFICATION HISTORY:

       Written by: David Fanning, 31 August 2000.
       Modified program to read colors from a file and to use more
         colors on 24-bit platforms. 16 October 2000. DWF.
       Added the COLUMNS keyword. 16 October 2000. DWF.
       Fixed a small problem with mapping a modal widget. 2 Jan 2001. DWF


PICKFILES

[List of Routines] (See ./display/pickfiles.pro)

 Project     : SOHO - LASCO/EIT

 Name	      : PICKFILES

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

 Category    : Widgets

 Explanation : 

 Use         : result = pickfiles()

 Examples    : result = pickfiles()

 Inputs      : 

 Opt. Inputs : 

 Outputs     : 
       PICKFILES returns a string array that contains the names of the files selected.
       If no file(s) is selected, PICKFILES returns a null string.

 Opt. Outputs:

 Keywords    : 

       FILTER: A string value for filtering the files in the file list.
               The user can modify the default filter value: "*.fts *.mvi". 

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

 Common      :

 Restrictions: None.

 Side effects: None.

 History     :  16-feb-1996,Borut Podlipnik, MPAe,Written

 Contact     : BP, borut@lasco1.mpae.gwdg.de


PICKFILES2

[List of Routines] (See ./inout/pickfiles2.pro)

 Project     : SOHO - LASCO/EIT
                   
 Name        : PICKFILES2
               
 Purpose     : Widget tool to allow user to pick multiple files.
               
 Use         : files = PICKFILES2(FILES=files, FILTER=filter, PATH=path)
    
 Inputs      : None.
               
 Outputs     : STRARR containing names of files selected, or '' (empty string)
		if none selected.
               
 Keywords    : 
       FILES:  A string array containing file choices to diplay.

       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.
               Example filter values might be "*.fits" or "*.pro".


 Common      : PICKFILES2_COMMON
               
 Restrictions: None.
               
 Side effects: None.
               
 Category    : Widgets.
               
 Prev. Hist. : None.

 Written     : Scott Paswaters, NRL, Feb. 1996.
               
 Modified    : 

 Version     : 

	@(#)pickfiles2.pro	1.1 10/05/96 LASCO IDL LIBRARY


PLOT_EXP_FACTOR

[List of Routines] (See ./expfac/plot_exp_factor.pro)

 NAME:
	PLOT_EXP_FACTOR

 PURPOSE:
	This procedure reads all the files for the given date range
	and plots the exposure time factors

 CATEGORY:
	EXP_FAC

 CALLING SEQUENCE:
	PLOT_EXP_FACTOR,Tel,Dtea

 INPUTS:
	Tel:	The telesope designation (string):  c1, c2, c3, c4/eit
		The default is all three LASCO telescopes.
	Dtea:	Gives the date to be processed in one of the following formats:
			YYMMDD,	6 character string
			YYYY/MM/DD, 10 character string
			CDS Date Structure
			Long Word of the modified julian date

 OPTIONAL INPUTS:
	Dteb:	Gives the final date to be processed in the same format as DteA

 KEYWORD PARAMETERS:
	PS:	If set then the plot is sent to the printer, else it is sent to the current
		graphics device

 OUTPUTS:
	None.

 RESTRICTIONS:

 PROCEDURE:

 EXAMPLE:

 MODIFICATION HISTORY:
 	Written by:	R.A. Howard, NRL, 10/7/97

 @(#)plot_exp_factor.pro	1.2 10/07/97 :LASCO IDL LIBRARY


PLOT_HKLZ

[List of Routines] (See ./packets/plot_hklz.pro)

 Jan 1998
 Ed Esfandiari - first version.
                 This pro uses level-0 housekeeping files to plot various
                 temperatures and voltages. It is based on plot_temps,
                 plot_bs_pes, plot_ccd_temps, and plot_lev_volt pros.

 Jan 28 1998 AEE Added xzoom option.

 Sep 14 1998 AEE Added 21 Motor Encoder Positions from Hk2.

 Oct 19 1998 AEE Corrected DN plot for BS and PES.

 Dec 22 1998 AEE added y-axes rescale option.

 Dec 23 1998 AEE made y-axes rescale more precise.

 Jan 26 1999 AEE Fixed for Y2K problem.

 Sep 08 1999 AEE Fixed code to handle days with no/bad packets.

 Jun 29 2000 AEE Added psym option and corrected start/stop dates display.

 Jul 28 2000 AEE Added code to crate the gif files using white backgrounds.

 NAME:
       PLOT_HKLZ

 PURPOSE:
        This subroutine plots various temperatures and voltages of LEB, 
        C1, C2, C3, and EIT for a day (or range of days) using the level-0
        housekeeping datafiles. between 1 to 9 plots can be displayed at
        the same time with the options of saving them to a gif file or
        printing them to a printer of choice.

 CALLING SEQUENCE:
        PLOT_HKLZ

 INPUTS:
        None

 OUTPUTS:
        None

 @(#)plot_hklz.pro	1.2 03/03/98 :LASCO IDL LIBRARY


PLOT_HK_TIME

[List of Routines] (See ./packets/plot_hk_time.pro)

 NAME:
	PLOT_HK_TIME

 PURPOSE:
	This procedure plots the difference between LASCO HK time and S/C time.

 CATEGORY:
	LASCO PACKETS

 CALLING SEQUENCE:
	PLOT_HK_TIME,Dte

 INPUTS:
	Dte:	A string giving the date to be plotted, YYMMDD.

 OPTIONAL INPUTS:
	None
	
 KEYWORD PARAMETERS:
	None

 OUTPUTS:
	None

 OPTIONAL OUTPUTS:
	None

 COMMON BLOCKS:
	None

 SIDE EFFECTS:
	None

 RESTRICTIONS:
	None

 PROCEDURE:
	This procedure finds the time stamp put on by the S/C and the time
	stamp put on by TCE in housekeeping packet #1 (8869).  It forms
	the difference in the TAI values (seconds) and plots the difference
	along the Y-axis against the S/C time along the X-axis.

 EXAMPLE:
	To form the plot:

		PLOT_HK_TIME, '960530'

 MODIFICATION HISTORY:
 	Written by:	RA Howard, 2 June 1996

	@(#)plot_hk_time.pro	1.1 01/23/98 LASCO IDL LIBRARY


PLOT_HT

[List of Routines] (See ./movie/plot_ht.pro)

 NAME:
	PLOT_HT

 PURPOSE:
	This procedure is used to display height-time curves. It reads in a
       height-time file created by one of the movie programs and generates
       a plot.

 CATEGORY:
	MOVIE

 CALLING SEQUENCE:
	PLOT_HT

 INPUTS:

 OPTIONAL INPUT PARAMETERS:
	Filename:	If filename is present then it is used immediately

 OUTPUTS:
	A plot is generated on the screen, and optionally a print file is
	generated of the form idlplot.psnnn, where nnn is a sequential
	number.

 OPTIONAL OUTPUT PARAMETERS:

 COMMON BLOCKS:
	com_xplot_ht

 SIDE EFFECTS:
	Initiates the XMANAGER if it is not already running.

 RESTRICTIONS:

 PROCEDURE:
	The various widgets are set up and registered.  The user selects the
	height-time file to be processed.  The file is read in and the data
	points plotted.  The user is then able to fit the data to polynomial
	functions of degree 1,2, or 3.  The plot can be printed.  The speeds
	can be saved to a file.

 MODIFICATION HISTORY:
 	Written by:	Scott Hawley, NRL Summer Student, June 1996
	Version 2	RA Howard, NRL, Modified plot calls to use utplot
	15 Oct 96	RAH, widgetized
       27 Oct 96       RAH, Corrected overplots of interpolated values
                            Set new window number before plotting
       08 Nov 96       RAH, Corrected situation if called without argument
       10 Nov 96       RAH, Corrected Acceleration = 2*fit_coeff
       11 Nov 96       RAH, Added plot of position angles
	25 Jun 02	NBR, Put in obsolete notice.

	@(#)plot_ht.pro	1.7 06/25/02 LASCO IDL LIBRARY


PLOT_LASCO_SPECTRA

[List of Routines] (See ./data_anal/plot_lasco_spectra.pro)

 NAME:
	PLOT_LASCO_SPECTRA

 PURPOSE:
	This procedure plots the LASCO filter spectral data

 CATEGORY
	CALIBRATION

 CALLING SEQUENCE:
	PLOT_LASCO_SPECTRA,Tel

 INPUTS:
	Tel:	string containing the telescope: 'c1','c2','c3'

 KEYWORD PARAMETERS:
	SINGLE:	If set then a single plot is made.  The default is
		to plot all of the spectra.

 OUTPUTS:
	Generates a plot

 MODIFICATION HISTORY:
	Written by R.A. Howard, NRL

 @(#)plot_lasco_spectra.pro	1.1 07/31/97 :NRL Solar Physics


PLOT_MONEXP_STD

[List of Routines] (See ./expfac/plot_monexp_std.pro)


 NAME:
	PLOT_MONEXP_STD

 PURPOSE:
         This procedure reads in the output data file from MONITOR-EXP.PRO,
         and makes standard plots

 CATEGORY:
         DATA_ANAL

 CALLING SEQUENCE:

         PLOT_MONEXP_STD,Tel,Dtea,Dteb

 INPUTS:
         Tel:	String giving the telesope name, eg. 'c1'
         Dtea:	String giving the starting date, eg, '960601'
         Dteb:	String giving the ending date, eg, '960607'

 KEYWORD PARAMETERS:
         PS:	If set, create a postscript file

 OUTPUTS:
         None

 SIDE EFFECTS:
         Generates plot files

 RESTRICTIONS:
        NONE

 PROCEDURE:


 MODIFICATION HISTORY:
         

	@(#)plot_monexp_std.pro	1.2 09/26/97 LASCO IDL LIBRARY


PLOT_OBE_TIME

[List of Routines] (See ./packets/plot_obe_time.pro)

 NAME:
	PLOT_OBE_TIME

 PURPOSE:
	This procedure plots the difference between LASCO OBE time and S/C time.

 CATEGORY:
	LASCO PACKETS

 CALLING SEQUENCE:
	PLOT_OBE_TIME,Dte

 INPUTS:
	Dte:	A string giving the date to be plotted, YYMMDD.

 OPTIONAL INPUTS:
	None
	
 KEYWORD PARAMETERS:
	None

 OUTPUTS:
	None

 OPTIONAL OUTPUTS:
	None

 COMMON BLOCKS:
	None

 SIDE EFFECTS:
	None

 RESTRICTIONS:
	None

 PROCEDURE:
	This procedure finds the time stamp put on by the S/C in the first
	HK packet saved each hour and the time stamp put on by OBE in the 
	first science packet saved each hour.  It forms the difference in 
	the TAI values (seconds) and plots the difference along the Y-axis 
	against the S/C time along the X-axis.

 EXAMPLE:
	To plot the difference in times:

		PLOT_OBE_TIME, '960530'

 MODIFICATION HISTORY:
 	Written by:	RA Howard, 2 June 1996

	@(#)plot_obe_time.pro	1.1 01/23/98 LASCO IDL LIBRARY


PLOT_SUBHTR

[List of Routines] (See ./packets/plot_subhtr.pro)

 NAME:
	PLOT_SUBHTR

 PURPOSE:
	This procedure plots the LASCO and EIT substitution heater status

 CATEGORY:
	LASCO PACKETS

 CALLING SEQUENCE:
	PLOT_SUBHTR,Svmhk1

 INPUTS:
	Svmhk1:	An array of the telemetry packets from SVMHK1.  It should
		have been read in using READ_TM_PACKETS with the NO_HDR
		switch set.

 KEYWORD PARAMETERS:
	SINGLE:	A parameter from 1 to 3, indicating the plot number.  The default
		is to plot all three plots too quickly to be of any use except
		if the output is going to the printer.

	NOCONVERT:	If set then don't convert the DN to engineering units
		The default is to do the conversion.

	SAVE:	A gif file will be written to the ftp directory on lasco6 for web access

	UTIME:	If set, then the UTC time get put into it.
	Relays:	If set, then the state of the relays get put into it.  It would be an
		integer array (npts,nplot)  where nplot is either 3, 2 or 5 depending upon
		how many relays are being plotted and npts is the number of samples.

 PROCEDURE:
	The TM files can be from DACS or from ECS.  At this point, there is no
	difference as long as the NO_HDR option was used in READ_TM_PACKET.

	The plots are:
		1	LASCO Nominal subsitition heater (along with GOLF and Virgo)
		2	EIT Nominal substitution heater (along with SUMER and CELIAS)
		3	LASCO and EIT redundant substitution heaters
		4	LASCO and EIT substitution heater relays settings
		5	LASCO and EIT substitution heater relays dutycycle

 EXAMPLE:
	To plot the first plot type of the LASCO substitution heater on the nominal side.
		PLOT_SUBHTR,svmhk1,single=1

 MODIFICATION HISTORY:
 	Written by:	R.A. Howard, 1994.
	Sep 17, 1998	RAH.  Modified for ECS and DACS usage.
	Sep 20, 1998	RAH.  Corrected the relay setting plots.  Added relay dutycycle plot
				Added relay plot.  Added save to gif option.  Added return of
				relay and utc arrays.
	Sep 22, 1998	RAH.  Added 11 point median filter to Plot type 5
	Sep 24, 1998	RAH.  Check of packet times, changed position of labels.

	@(#)plot_subhtr.pro	1.7 09/24/98 LASCO IDL LIBRARY


PLOT_TEMPS2

[List of Routines] (See ./packets/plot_temps2.pro)

 Procedure: plot_temps2,hk,timeint,single=single

     hk = array of all monitors from HK TLM stream generated by DACS 
     timeint = 2 word array giving the start and end times for the plot 
 

 EXAMPLE:	 
    IDL> hk = readallhk('971022') or hk = readallhk('971022_1', /ecs)
    IDL> plot_temps2, hk or plot_temps2, hk, ['1997/10/22 16:00','1997/10/22 20:00']


 KEYWORD:
          single        plot
            0           all zones
            1           LEB PC 
            2           FP APZ
            3           C2 Th 1
            4           C2 Th 2
            5           C2 Th 3 
            6           C3 Th 1
            7           C3 Th 2
            8           Zone 1
            9           Zone 2
           10           Zone 3
           11           Zone 4
           12           Zone 5
           13           EIT Zone 6
           14           EIT Zone 7

 HISTORY:
 offset the beginning of HK before LASCO HK information begins 
 
  modified for byte version of hk

 VERSION:
 01/01/97 	S. Stezelberger -  adjusted yrange limits
 10/15/99   	D. Wang  - Added Eit Zone 6 and 7 and output var v

 @(#)plot_temps2.pro	1.2 10/15/99 : NRL LASCO IDL LIBRARY


PLOT_THETAS

[List of Routines] (See ./util/plot_thetas.pro)

unction plot_thetas, im, xc, yc, th, HDR=hdr, INTRVAL=intrval, RANGE=range, SDIR=sdir, ROOT=root, SAVE=save, PIXELS=pixels, OCC=occ, RSUN=rsun, OVERPLOT=overplot, YTITLE=ytitle, XRANGE=xrange, YRANGE=yrange, THICKNESS=thickness

 Purpose:
 generates values of plots starting at a given center for different thetas

 INPUTS:
  im:   	2D array
  xc, yc:	Center of plot in IDL pixels
  th:		(first) angle to plot

 KEYWORDS
  INTRVAL:	Interval of Thetas to test (ie, 2 means plot every other angle)
  HDR:		LASCO or EIT image header (structure)
  RANGE:	range of angles to test (Degrees). Default is 180.
  SDIR:		Directory to save plots in
  ROOT:		Identifier for plot filenames
  RSUN:	Label in units of solar radii from center (needs HDR set)
  START:	First angle to plot (default is 0, defined as right equator)
  OCC:		Use occulter center instead of sun center (if HDR is set)
  RMAX:	Length of each ray computed; default is sqrt(naxis1)/2
  OVERPLOT:	Use oplot instead of plot
  YTITLE:	Units of values in im (string)

 RESTRICTIONS:
  Must have window 0 for image and window 2 for plot open

 Written by N. Rich, NRL/Interferometrics

 Modified
  8/21/02, N. Rich - Make general rather than using header for center

 08/29/02 @(#)plot_thetas.pro	1.1


PLOT_TIME_DIFFS

[List of Routines] (See ./packets/plot_time_diffs.pro)

 NAME:
	PLOT_TIME_DIFFS

 PURPOSE:
	This procedure plots the time differences between LASCO HK time,
	S/C time and OBE time.

 CATEGORY:
	LASCO PACKETS

 CALLING SEQUENCE:
	PLOT_TIME_DIFFS,Dte

 INPUTS:
	Dte:	A string giving the date to be plotted, YYMMDD.

 OPTIONAL INPUTS:
	None
	
 KEYWORD PARAMETERS:
	None

 OUTPUTS:
	None

 OPTIONAL OUTPUTS:
	None

 COMMON BLOCKS:
	None

 SIDE EFFECTS:
	None

 RESTRICTIONS:
	None

 PROCEDURE:
	This procedure uses the routines, PLOT_OBE_TIME, and PLOT_HK_TIME
	and puts the two plots onto a single page.

 EXAMPLE:
	To form the plots:

		PLOT_TIME_DIFFS, '960530'

 MODIFICATION HISTORY:
 	Written by:	RA Howard, 2 June 1996

	@(#)plot_time_diffs.pro	1.1 01/23/98 LASCO IDL LIBRARY


PLOT_XY

[List of Routines] (See ./display/plot_xy.pro)

 Project     : SOHO - LASCO

 Name        : 

 Purpose     : 

 Category    : 

 Explanation : 

 Syntax      : 

 Examples    : 

 Inputs      : None

 Opt. Inputs : None

 Outputs     : None

 Opt. Outputs: None

 Keywords    : None

 Common      : 

 Restrictions:                                  

 Side effects: Not known

 History     : Version 1, 02-Sep-1995, B Podlipnik. Written

 Contact     : BP, borut@lasco1.mpae.gwdg.de


POINTING3

[List of Routines] (See ./astrometry/ephemeris/pointing3.pro)

 PROJECT:
	SOHO - LASCO
 NAME:
	POINTING3

 PURPOSE:
       Widget interface to display LASCO pointing information.

 CATEGORY:
	Widgets.

 CALLING SEQUENCE:
	Pointing3

 INPUTS:

 OPTIONAL INPUTS:
	
 KEYWORD PARAMETERS:

 OUTPUTS:

 OPTIONAL OUTPUTS:

 COMMON BLOCKS:
	lasco.com, chandle.com

 SIDE EFFECTS:

 RESTRICTIONS:

 PROCEDURE:

 EXAMPLE:

 MODIFICATION HISTORY:
 	Written by:	Simon Plunkett, May 1995.
	November 1995: Major revision--adapted to use FITS keywords
		and do gnomonic projections. Got rid of (almost) all
		common blocks. SPP.
	December 1995: Included distortion effects in C2.
		       Tidied up format statements.
		       Made compatible with V1.0 of LASCO display
		       s/w. SPP.
	April 1996: Adapted to use SOHO orbit parameters from CDF
		    files. SPP.
	011219, NR - Fix second call to sohoephem

	12/19/01, @(#)pointing3.pro	1.2 - IDL LASCO NRL Library


POINT_FILTER

[List of Routines] (See ./data_anal/point_filter.pro)

 
 NAME:
	point_filter

 PURPOSE:
	This procedure filters out the pixels which are brighter than
	the area in which they are found.

 CALLING SEQUENCE:
	point_filter,indata,bw,tol,niter,outdata,outpts

 INPUTS:
	indata  = 2-dim array of data to be filtered
	bw	= width of square filter box - must be ODD, recommended
		  value 5.
	tol	= scaling factor to controll how bright the point
		  is before being replaced, recommended value 7.
	niter	= number of time to repeat the process

 OUTPUTS:
	outdata = the filtered array
	outpts	= the value and location of the points removed from
		  the indata array.  outpts is an (n,3) array.
		  n is the number of points subtracted; ,0 is the data
		  value (indata - outdata) with pixel coordinates of
		  x=,1, and y=,2.
 PROCEDURE:
	Uses filter_image to calculate the mean, median, and variance
	over a square box of size bw.  For those point which differ from
       the mean by more than tol*standard deviation, replace the value
       with the median.  Finally, fill the outpoint array with the 
       subtracted values and pixel coordinates.

  MODIFICATION HISTORY:
	Written by Mike Andrews LASCO/NRL/HUGHES STX  12 Feb 1996.
       Modified by MDA 20 Mar 1996 to reduce memory requirement by
		reusing the hold array.
	Modified by MDA 26 Feb 97 to calculate x and y correctly.


POLARIZ

[List of Routines] (See ./polariz/polariz.pro)

@(#)polariz.pro	1.8 03/05/01 - NRL IDL Library

PURPOSE: POLARIZ.PRO defines a^2, a0^2, and mu

 assumption: e1, e2, e3 in that order around the horizontal axis
further assumption e1 = -60, e2 = 0, e3 = +60

 KEYWORDS: /Diff = input images are differenced images, do not adjust for bias or exposure times

 HISTORY
  1 Feb 2000   DW - Modified for lack of C3 +0 filter 
  7 Jun 2000   DW - Added seqno and datatype input vars


POLARIZ_CALC

[List of Routines] (See ./polariz/polariz_calc.pro)

 NAME:
	POLARIZ_CALC

 PURPOSE:
	
	This function produces the Stoke I, Q, U and parameters derived
       from them such as polarization angle, pB 
       Vignetting , point filtering is also done here

 CATEGORY:
	Data Analysis

 CALLING SEQUENCE:

       POLARIZ_CALC,j0,j1,j2,j3,filter0,filter1,filter2,filter3,batch_mode,ptf,vig

 
	Result = FUNCTION_NAME(Parameter1, Parameter2, Foobar)

 INPUTS:
	j0:	Raw Clear image
	j1:	Raw -60 image
	j2:	Raw 0 image
	j3:	Raw +60 image
	filter0: Filter for j0
	filter1: Filter for j1
	filter2: Filter for j2
       batch_mode : flag for batch mode,true = 1
       ptf : flag for point filter mode,true = 1
       vig : flag for vignetting,true = 1

 OPTIONAL INPUTS:
	
 KEYWORD PARAMETERS:

	DIFF: for C1 observations that have already had straylight and the
             continum removed by differencing	
	

 OUTPUTS:

 OPTIONAL OUTPUTS:

 COMMON BLOCKS:
	POLARIZ_DATA: Output Stokes and other parameters are placed here 
	POLARIZ_RTAN: Output j in radial and tangential coord system are here

 SIDE EFFECTS:

 RESTRICTIONS:

 PROCEDURE:

 EXAMPLE:

 MODIFICATION HISTORY:
 	Written by:	Dennis Wang
	11 Feb 1999 - Mueller matrices	
        1 Feb 2000 - Move FIXC3ZERO calculations  - DW
       12 Oct 2000 - polariz_rtan call changed to add cmu
       02 Mar 2001 - Added B0 call to c2_calibrate and c3_calibrate

	@(#)polariz_calc.pro	1.8 03/05/01 LASCO IDL LIBRARY - D. Wang


POLARIZ_DISPLAY

[List of Routines] (See ./polariz/polariz_display.pro)

 NAME:			polariz_display

 PURPOSE:		Widget Interface for do_polariz

 CATEGORY:
 CALLING SEQUENCE:	
 INPUTS:		NONE
		

 OPTIONAL INPUTS:	

 OUTPUTS:
 OPTIONAL OUTPUT PARAMETERS:
 COMMON BLOCKS:        POLARIZ_DATA
 SIDE EFFECTS:
 RESTRICTIONS:
      Requires JULDAT and DAYCNV from the IDL ASTRON Library
 PROCEDURE:

 MODIFICATION HISTORY:
	WRITTEN BY:	Dennis Wang, Interferometrics/NRL, 1996
       29 Sep 97       - Save File header changes
                          1. Date-OBS and TIME-OBS are now the average of
                             3 individual DATE-OBS and TIME-OBS 
                          2. Added as comment Exposure times of all 3 exposures; 
                          3. Added as comment offset bias 
                          4. Added file permission check prior to writing file
       4 Oct 99        Added roll to position angle calculation
      27 Oct 99        Changed PICKFILE to DIALOG_PICKFILE for IDL5.x 
       1 Feb 00        Removed FIXC3ZERO in polariz_calc call - DW
      15 Aug 2000      Fixed NaN values in % Pol when field stop mask is used 
      12 Oct 2000      Added Non Tang Angle display to Pol Angle Button
      01 Mar 2001      Fixed Raw.Clr Button Case statement
                       Added B0 Displays

	@(#)polariz_display.pro	1.16 03/05/01 NRL LASCO IDL LIBRARY


POLARIZ_RTAN

[List of Routines] (See ./polariz/polariz_rtan.pro)

 PURPOSE: convert to tangential frame of reference

 HISTORY:
 12 Oct 2000 - Added cmu array of angles for non tang angle - DW
 @(#)polariz_rtan.pro	1.2 03/06/01 - NRL IDL Library - D.Wang


POLM1M2[1]

[List of Routines] (See ./las-c2/polm1m2.pro)

 NAME: MEAN_2D_FRM.PRO
 PURPOSE: make an image of local means and of standard deviation
 CATEGORY: General tools high level routine
 CALLING SEQUENCE: mean_2d_frm,ima_in,kx,ky,ima_moy,ima_std
 INPUTS: ima_in                           image array
         kx                               step_size in x
         ky                               step_size in y
 OPTIONAL INPUT PARAMETERS:               None
 KEYWORD PARAMETERS:                      None
 OUTPUTS:ima_moy                          mapping of local means
         ima_std                          mapping of local sigmas
 OPTIONAL OUTPUT PARAMETERS:              None
 COMMON BLOCKS:                           None
 SIDE EFFECTS:                            None
 RESTRICTIONS:                            None
 PROCEDURE:
 MODIFICATION HISTORY:   defined by M.B 07/12/93

 SCCS variables for IDL use

 @(#)mean_2d_frm.pro  1.0 07/12/93 :LAS


POLM1M2[2]

[List of Routines] (See ./las-c2/polm1m2.pro)

 NAME: POLM1M2.PRO
 PURPOSE: make images of local means and of standard deviation for
          the Stokes parameters, the fractionnal polarization & direction of 
          polarization for the light of calib lamps after passing thru mirrors 
 CATEGORY: General tools high level routine
 CALLING SEQUENCE: polm1m2,I1p,I2p,I3p,kx,ky,P_moy,P_std,alpha_moy,alpha_std
 INPUTS: I1p                              image array of intensity with pol-60
         I2p                              image array of intensity with pol00
         I3p                              image array of intensity with pol+60
         kx                               step_size in x
         ky                               step_size in y
 OPTIONAL INPUT PARAMETERS:               None
 KEYWORD PARAMETERS:                      None
 OUTPUTS:P_moy                         mapping of local means for polarization
         P_std                         mapping of local sigmas for polarization
         alpha_moy                     mapping of local means for direction
         alpha_std                     mapping of local sigmas for direction
 OPTIONAL OUTPUT PARAMETERS:              None
 COMMON BLOCKS:                           None
 SIDE EFFECTS:                            None
 RESTRICTIONS:                            None
 PROCEDURE:
 MODIFICATION HISTORY:   defined by M.B 07/12/93

 SCCS variables for IDL use

 @(#)polm1m2.pro  1.0 07/12/93 :LAS


POLY_DIFFIM

[List of Routines] (See ./exposure/poly_diffim.pro)

 POLY_DIFFIM
	Multiple image differencer.

 Usage:
	poly_diffim, {dindex | dname=dname}

 Argument:
	dindex	int	input	The number of the subtrahend image.

 Keyword:
	dname	string	input	The name of the subtrahend image
				(which must be loaded).
	in_place ??	input	If set, then do the subtraction in
				place and overwrite the old image in
				memory.
	divide	int	input	Whether to subtract images (divide=0
				or unset), divide images (1) or divide
				and subtract 1 (2).
	cr_mask	??	input	If set, then attempt to use
				SIGMA_FILTER to remove cosmic rays.
	fix_sum	??	input	If set, then divide the input image by
				the onboard summing.

 Restrictions:
	The DINDEX argument and the DNAME keyword are exclusive. Only
	the currently selected images are processed (the subtrahend
	isn't processed whether or not it is selected).

 Effects:
	A set of difference images is generated and selected (the
	previously selected images are deselected.

 History:
	Original: 21/3/96; SJT
	Modify to cope with assorted summings: Nov 96; SJT


POLY_E

[List of Routines] (See ./util/poly_e.pro)

 NAME:
	POLY_E

 PURPOSE:
	Evaluate a polynomial function of a variable.

 CATEGORY:
	C1 - Operations on polynomials.

 CALLING SEQUENCE:
	Result = POLY_E(X,C,[E])

 INPUTS:
	X:	The variable.  This value can be a scalar, vector or array.

	C:	The vector of polynomial coefficients.  The degree of 
		of the polynomial is N_ELEMENTS(C) - 1.

	E: 	The vector of exponents.

 OUTPUTS:
	POLY_E returns a result equal to:
		 C(0) + c(1) * X + c(2)*x^2 + ...

 COMMON BLOCKS:
	None.

 SIDE EFFECTS:
	None.

 RESTRICTIONS:
	None.

 PROCEDURE:
	Straightforward.

 MODIFICATION HISTORY:
	Andrew Hayes	16 AUG 2000


POPUP_HELP[1]

[List of Routines] (See ./data_anal/popup_help.pro)


 file POPUP_HELP.PRO - Creates a widget that displays a pop up message,
                      modifed from DMZ's acknowledge.pro -- LYW


POPUP_HELP[2]

[List of Routines] (See ./data_anal/popup_help.pro)

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

 pro popup_help_event, event

 The event handler for PRO POP_HELP
  calls to  :  none
  common    :  none

  The only purpose of the routine is to kill the message window, 
     created by PRO POP_HELP, AFTER the user reads the message.
     The user clicks the "Dismiss" button to get here.

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


POPUP_HELP[2]

[List of Routines] (See ./data_anal/popup_help.pro)

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

 pro popup_help, message [, title=title, group=group]

  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.

  calls to  :  xregistered('pop_help'), xmanager,'popup_help'
  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)
     title:    Optional title of the message window
 OUTPUT
     none

 MODIFICATION HISTORY
	JAN 1993        -- Elaine Einfalt (HSTX)
       August 19, 1994 -- Liyun Wang (ARC)
       August 31, 1994 -- Liyun Wang (ARC), added GROUP keyword
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


PROFILE

[List of Routines] (See ./display/profile1.pro)

 NAME:
	PROFILE

 PURPOSE:
	Extract a profile from an image.

 CATEGORY:
	Image processing.

 CALLING SEQUENCE:
	Result = PROFILE(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:
	PROFILE 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.

 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.  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 = PROFILE(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:
	Written, DMS, November, 1982.
	Modified for Sun, march, 1988.
	December 1991, KRC  Made PROFILES return XX and YY.


PSCONFIG

[List of Routines] (See ./dfanning/psconfig.pro)

 NAME:
   PSCONFIG

 PURPOSE:

   This program is simply a function wrapper for the FSC_PSCONFIG
   object program (fsc_psconfig__define.pro). It was written so
   that it could serve as a drop-in replacement for the PS_FORM
   program it replaces. It calls the object program's graphical
   user interface as a modal widget and returns the DEVICE keywords
   collected from the form in a form that is appropriate for
   configuring the PostScript device.

 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/

 CALLING SEQUENCE:

   psKeywords = PSConfig()

 CATEGORY:

   Configuring PostScript output.

 DOCUMENTATION:

   Complete documentation for the FSC_PSCONFIG object, including
   keyword and method descriptions, and example programs using the object
   can be found on the Coyote's Guide to IDL Programming web page:

     http://www.dfanning.com/programs/docs/fsc_psconfig.html

 INPUT:

    psConfigObject -- An optional FSC_PSCONFIG object reference can be
       passed as an argument to the function. The object is not destroyed
       if passed in as an argument.

       psObject = Obj_New("FSC_PSCONFIG")
       keywords = PSConfig(psObject)

    Having the object means that you have an on-going and current record
    of exactly how your PostScript device is configured. Be sure to destroy
    the object when you are finished with it.

 KEYWORDS:

   Any keyword accepted by the FSC_PSCONFIG object can be used with
   this program. Here are a few of the most popular keywords.

   Bits_per_Pixel - The number of image bits saved for each image pixel: 2, 4, or 8. The default is 8.
   Color - Set this keyword to select Color PostScript output. Turned on by default.
   DefaultSetup - Set this keyword to the "name" of a default style. Current styles (you can easily
     create and add your own to the source code) are the following:

       "System (Portrait)" - The normal "default" system set-up. Also, "System".
       "System (Landcape)" - The normal "default" landscape system set-up.
       "Centered (Portrait)" - The window centered on the page. Also, "Center" or "Centered".
       "Centered (Landscape)" - The window centered on the landscape page. Also, "Landscape".
       "Square (Portrait)" - A square plot, centered on the page.
       "Square (Landscape)" - A square plot, centered on the landscape page.
       "Figure (Small)" - A small encapsulated figure size, centered on page. Also, "Encapsulated" or "Encapsulate".
       "Figure (Large)" - A larger encapsulated figure size, centered on page. Also, "Figure".
       "Color (Portrait)" - A "centered" plot, with color turned on. Also, "Color".
       "Color (Landscape)" - A "centered" landscape plot, with color turned on.

   Directory - Set this keyword to the name of the starting directory. The current directory is used by default.
   Encapsulate - Set this keyword to select Encapsulated PostScript output. Turned off by default.
   European - Set this keyword to indicate "european" mode (i.e., A4 page and centimeter units). Turned off by default.
   Filename - Set thie keyword to the name of the PostScript file. The default is "idl.ps".
   Inches - Set this keyword to indicate sizes and offsets are in inches as opposed to centimeters. Set by European keyword by default.
   Landscape - Set this keyword to select Landscape page output. Portrait page output is the default.
   PageType - Set this keyword to the "type" of page. Possible values are:
       "Letter" - 8.5 by 11 inches. (Default, unless the European keyword is set.)
       "Legal" - 8.5 by 14 inches.
       "Ledger" - 11 by 17 inches.
       "A4" - 21.0 by 29.7 centimeters. (Default, if the European keyword is set.)
   XOffset - Set this keyword to the X Offset. Uses "System (Portrait)" defaults. (Note: offset calculated from lower-left corner of page.)
   XSize - Set this keyword to the X size of the PostScript "window". Uses "System (Portrait)" defaults.
   YOffset - Set this keyword to the Y Offset. Uses "System (Portrait)" defaults. (Note: offset calculated from lower-left corner of page.)
   YSize - Set this keyword to the Y size of the PostScript "window". Uses "System (Portrait)" defaults.

   In addition, the following keywords can be used:

   CANCEL -- An output keyword that will be set to 1 if the user
   chooses the Cancel button on the form. It will be 0 otherwise.

   FONTINFO -- Set this keyword is you wish to have font information
   appear on the form. The default is to not include font information.

   FONTTYPE -- Set this keyword to a named variable that will indicate
   the user's preference for font type. Values will be -1 (Hershey fonts),
   0 (hardware fonts), and 1 (true-type fonts). This keyword will always
   return -1 unless the FONTINFO keyword has also been set.

   GROUP_LEADER -- Set this keyword to a widget identifier of the widget
   you wish to be a group leader for this program.

 EXAMPLE:

   To have the user specify PostScript configuration parameters, use
   the program like this:

     keywords = PSConfig(Cancel=cancelled)
     IF cancelled THEN RETURN
     thisDevice = !D.Name
     Set_Plot, 'PS'
     Device, _Extra=keywords
     Plot, findgen(11) ; Or whatever graphics commands you use.
     Device, /Close_File
     Set_Plot, thisDevice

 OTHER PROGRAMS NEEDED:

   The following programs are required to run this one:

     fsc_droplist.pro
     fsc_fileselect.pro
     fsc_inputfield.pro
     fsc_plotwindow
     fsc_psconfig__define.pro

 MODIFICATIONS:

   Written by David Fanning, 31 January 2000.


PSWINDOW

[List of Routines] (See ./dfanning/pswindow.pro)

 NAME:
    PSWINDOW

 PURPOSE:

    This function is used to calculate the size of a PostScript
    window that has the same aspect ratio (ratio of height to
    width) as the current display graphics window. It creates
    the largest possible PostScript output window with the
    desired aspect ratio. This assures that graphics output
    looks similar, if not identical, to PostScript output.

 AUTHOR:

   FANNING SOFTWARE CONSULTING
   David Fanning, Ph.D.
   1645 Sheely Drive
   Fort Collins, CO 80526 USA
   Phone: 970-221-0438
   E-mail: davidf@dfanning.com
   Coyote's Guide to IDL Programming: http://www.dfanning.com/

 CATEGORY:

    Graphics.

 CALLING SEQUENCE:

    pageInfo = PSWINDOW()

 INPUTS:

    None.

 KEYWORD PARAMETERS:

    CM: Normally the structure value that is returned from this
    function reports its values in inches. Setting this keyword
    causes the return values to be in units of centimeters.

    FUDGE: A quick way to set symetrical XFUDGE and YFUDGE factors.
    If this keyword is set to a value, XFUDGE and YFUDGE keywords are
    set to the same value.

    LANDSCAPE: Normally this function assumes a PostScript window
    in Portrait mode. Setting this keyword assumes you want
    the graphic in Landscape mode.

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

    PAGESIZE: Set this keyword to a string indicating the type
    of PostScript page size you want. Current values are "LETTER",
    "LEGAL", and "A4". Default is "LETTER".

    PRINTER: Set this keyword if the output will be used to
    configure the PRINTER device, rather than the PS device.
    (In the PRINTER device, offsets are always calculated from
    the lower-left corner of the page and do not rotate in
    Landscape mode, as they do with the PS device.) Note that
    the PRINTER device is only able to accept these keywords
    in IDL 5.1 and higher.

    XFUDGE: Printers calculate the offset point from the printable
    edge of the paper (sometimes), rather from the corner of the paper.
    For example, on my Lexmark printer, both X and Y offsets are
    calculated from a point 0.25 inches in from the edge. This keyword
    allows you to set a "fudge" factor that will be subtracted from
    the XOFFSET that is returned to the user. This allows you to create
    output that is centered on the page. The fudge factor should be in
    the same units as the returned size and offset values.

    YFUDGE: Printers calculate the offset point from the printable
    edge of the paper (sometimes), rather from the corner of the paper.
    For example, on my Lexmark printer, both X and Y offsets are
    calculated from a point 0.25 inches in from the edge. This keyword
    allows you to set a "fudge" factor that will be subtracted from
    the YOFFSET that is returned to the user. This allows you to create
    output that is centered on the page. The fudge factor should be in
    the same units as the returned size and offset values.

 OUTPUTS:

    pageInfo: The output value is a named structure defined like
    this:

      pageInfo = {PSWINDOW_STRUCT, XSIZE:0.0, YSIZE:0.0, $
         XOFSET:0.0, YOFFSET:0.0, INCHES:0, PORTRAIT:0, LANDSCAPE:0}

    The units of the four size fields are inches unless the CM
    keyword is set.

    The output can be used to immediately configure the PostScript
    or Printer device, like this:

       Set_Plot, 'PS' ; or 'PRINTER'
       Device, _Extra=pageInfo

 RESTRICTIONS:

    The aspect ratio of the current graphics window is calculated
    like this:

       aspectRatio = FLOAT(!D.Y_VSIZE) / !D.X_VSIZE

 EXAMPLE:

    To create a PostScript output window with the same aspect
    ratio as the curently active display window, type:

     pageInfo = PSWINDOW()
     SET_PLOT, 'PS'
     DEVICE, _Extra=pageInfo

     To configure the PRINTER device:

     pageInfo = PSWINDOW(/Printer, Fudge=0.25)
     SET_PLOT, 'PRINTER'
     DEVICE, _Extra=pageInfo

 MODIFICATION HISTORY:

    Written by: David Fanning, November 1996.
       Fixed a bug in which the YOFFSET was calculated incorrectly
          in Landscape mode. 12 Feb 97.
       Took out a line of code that wasn't being used. 14 Mar 97.
       Added correct units keyword to return structure. 29 JUN 98. DWF
       Fixed a bug in how landscape offsets were calculated. 19 JUL 99. DWF.
       Fixed a bug in the way margins were used to conform to my
          original conception of the program. 19 JUL 99. DWF.
       Added Landscape and Portrait fields to the return structure. 19 JUL 99. DWF.
       Added PageSize keyword, changed MARGIN keyword, and completely
          rewrote most of the intenal code. 9 FEB 2000. DWF.
       Fixed a bug in how I calculated the aspect ratio. 1 MAR 2000. DWF.
       Added PRINTER keyword to return proper offset values for the
          PRINTER device, where the offset location is not rotated. 1 MAR 2000. DWF.
       Added PRINTER fudge factors to take into account that printer offsets are
          calculated from the printable area of the paper, rather than the corner
          of the paper. 8 AUG 2000. DWF.


PS_SETUP

[List of Routines] (See ./util/ps_setup.pro)

 NAME:			ps_setup

 PURPOSE:		setup Postscript printer

 CATEGORY:
 CALLING SEQUENCE:	ps_setup,param,printer
 INPUTS:		param = 0 to change the idl plot device to the printer
			param =	1 to return the plot device back to the screen
				  and to transfer the plot file to the printer
 			param = 2 to read current window and send to Postscript
		  		  This may be faster for plots with lots of 
				  points.  This is a screen dump, if you 
				  suddenly decide a plot is worth printing.

 			param = 3 Save to a file

 			param = 4 Same as 2 but color table is inverted first

 OPTIONAL INPUTS:	printer = ascii string designating the printer to be
				  used
			color_prt = specify color postscript printer

			encap = output encapsulated Postscript

                       gif = output gif image (only for ps_setup,2)


 OUTPUTS:
 OPTIONAL OUTPUT PARAMETERS:
 COMMON BLOCKS:
 SIDE EFFECTS:
 RESTRICTIONS:
 PROCEDURE:
		  Example:
		    ps_setup,0
		    plot,x
		    plot,y
		    ps_setup,1,'A13'
		  Example:
		    ps_setup,0,/color_prt
		    tvscl,img
		    ps_setup,1,'lasco_phaser'
		  Example:
		    plot,huge_array
		    ps_setup,2

 MODIFICATION HISTORY:
	WRITTEN BY:	RA Howard, NRL, 1990
	2000/07/18, NBR - Use printer input for naming GIF file
 
	07/18/00 @(#)ps_setup.pro	1.10 LASCO IDL LIBRARY


QDB

[List of Routines] (See ./database/qdb.pro)

 NAME:
	QDB

 PURPOSE:
	Query the LASCO database

 CATEGORY:
	DATABASE

 CALLING SEQUENCE:
	Result = QDB()

 INPUTS:
	None required

 OPTIONAL INPUTS:
	Query:	A string giving the query in boolean form.  If not present a menu will be given
	DB:	A string giving the database to be queried. If not present, 'LASCO' will be used.
	
 OUTPUTS:
	This function returns a structure giving the results of the query.

 PROCEDURE:
	 This function interfaces with a C routine that uses sybase for querying 
	 existing databases. Input to this pro is either two parameters (database
	 name and query command) or nothing. If no parameter is passed, the user
	 is provided with a menu system to form a query command. Output is a 
	 structure containing the selected columns (fields) of the query command
	 as its fields.

 EXAMPLE:
 	Here are some sample calls (first type .run qdb.pro):
 	Input:
 		q= qdb("solwind","select * from transient where date_time > 'Nov 12 1984'")
 		p= qdb("solwind","select * from transient where date_time > '1984/11/12'")
 		r= qdb("solwind","select * from transient where importance = 'A'") 
 		s= qdb("solwind","select height,date_time from transient where height > 10")

		 Note that character strings must be placed in quotation marks such as 
		 'Jul 19 1982' and 'A' and they must be of correct case (upper/lower).

	 Output for s:
		 s.height, s.date_time
		 s.height and s.date_time

	Another example using the menu: 
	 Input:
		 s= qdb()
	 Output:
		 s contains fields selected from the menus

 MODIFICATION HISTORY:
 	Written by:	Ed Esfandiari, Nov 95
			Ed Esfandiari, Feb 96
			 added code to handle sybase "image" data type. Note that "text" type of
			 length > 256 is not handled by this pro"
			Ed Esfandiari, Nov 96
			 added code to recognize LAS's OSF and use lascos in rsh.
                       Ed Esfandiari, Oct 01
                        Changed code to eliminate the use of rsh. Instead of using the
                        sybsrv account on corona, we are now using a copy of db_query_24hr
                        that I have placed in $NRL_LIB/lasco/C/lib.

	@(#)qdb.pro	1.2 03/31/99 LASCO IDL LIBRARY


QL_GETLASCODIR

[List of Routines] (See ./inout/ql_getlascodir.pro)

NAME: QL_GETLASCODIR

PURPOSE:
       Tells user which directory contains a given days worth of Quick Look
	LASCO data for a particular
       camera.

CALLING SEQUENCE:
	dir=ql_getlascodir(1,6,1996,'C1')
     or
	dir=ql_getlascodir(1,6,96,'c1')

INPUTS:
	month:	an integer betwen 1 (January) and 12 (December)
	day:	day of the month
	year:	either the last two digits of the year (e.g. 96) or all 4 digits
	camera:	a two-character string describing which camera is desired.
		Acceptable choices for camera are: "c1","c2","c3", or "c4"
		camera is case-insensitive

KEYWORDS:  
	SILENT:	Suppress output of all error messages except lower-level
		IDL or system messages.

OUTPUTS:
      A string specifiying the directory in which desired images can be found.

AUTHOR: Scott Hawley, NRL, June 27, 1996

MODIFIED:	Nathan Rich	960923	shortened to look at cplex1 
	                                instead of jukebox
               Ed Esfandiari   990126  Fixed code for Y2K problem.
 
 SCCS variables for IDL use
 
 @(#)ql_getlascodir.pro	1.5 05/14/97 :NRL Solar Physics


QUICK_LOOK

[List of Routines] (See ./data_anal/quick_look.pro)

 Project     : SOHO - LASCO/EIT
                   
 Name        : QUICK_LOOK
               
 Purpose     : 
               
 Explanation : 
               
		
               
 Use         : IDL> QUICK_LOOK, img
    
 Inputs      : img		2 Dimensional image.
               
 Opt. Inputs : caller		A structure containing the id of the caller.
               
 Outputs     : None.
               
 Opt. Outputs: None.
               
 Keywords    : None.

 Calls       : 

 Common      : QUICK_LOOK_SHARE
               
 Restrictions: None.
               
 Side effects: None.
               
 Category    : Image Display.
               
 Prev. Hist. : None.

 Written     : Scott Paswaters, NRL, January 1995.
               
 Modified    : 

 Version     : Version 0.1, January 9, 1995


RAD_SPOKE

[List of Routines] (See ./movie/rad_spoke.pro)

 NAME:
       rad_spoke

 PURPOSE:
       This procedure produces radia-spoke image of a directily observed 
       solar image by LASCO

 CATEGORY:
       DATA ANALYSIS

 CALLING SEQUENCE:
       rad_spoke,image_in,hdr_in,image_rad=image_rad,hdr_rad=hdr_rad

 INPUTS:
       image_in: image with direct solar observation
     
 OPTIONAL INPUTS:
       x0, y0: the Sun's center in pixel unit of the image
       r1, r2: inner and outer radius in pixel unit of the image for transformation   
       th1,th2:starting and ending azimuth angle in degree for transformation
               0 refer to north pole and increase counter-clockwise
       n_r: number of samples in radius in spoken image
       n_th: number of samples in azimuth angle in spoken image
       
 KEYWORDS

 OUTPUTS:
       image_rad: radial-spoke image

 RESTRICTIONS:

 PROCEDURE:
  
 EXAMPLE:
       rad_spoke,image_in,image_rad

 MODIFICATION HISTORY:
       Written by:     J. Zhang, Mar. 1, 2001


RD_ASC

[List of Routines] (See ./display/rd_asc.pro)

 Project     : SOHO - LASCO

 Name        : 

 Purpose     : 

 Category    : 

 Explanation : 

 Syntax      : 

 Examples    : 

 Inputs      : None

 Opt. Inputs : None

 Outputs     : None

 Opt. Outputs: None

 Keywords    : None

 Common      : 

 Restrictions:                                  

 Side effects: Not known

 History     : Version 1, 02-Sep-1995, B Podlipnik. Written

 Contact     : BP, borut@lasco1.mpae.gwdg.de


RD_CATALOG

[List of Routines] (See ./astrometry/ephemeris/rd_catalog.pro)

 NAME:
      RD_CATALOG

 PURPOSE:
      Read star catalogs for any of the three LASCO coronagraphs.
 CATEGORY:
      
 CALLING SEQUENCE:
      rd_catalog,telescope,catalog

 INPUTS:
      telescope: string containing telescope name.

 KEYWORD PARAMETERS:
      None.

 OUTPUTS:
      catalog: structure containing fields in catalog file.

 PROCEDURE:
      Straightforward.

 MODIFICATION HISTORY:
      Written by Simon Plunkett, April 1995.


RD_LAS_CAT_FITS

[List of Routines] (See ./astrometry/ephemeris/rd_las_cat_fits.pro)

 NAME:
      RD_LAS_CAT_FITS

 PURPOSE:
      Read new star catalogs LASCO coronagraphs C2 or C3.
 CATEGORY:
      
 CALLING SEQUENCE:
      rd_las_cat_fits,telescope,catalog

 INPUTS:
      telescope: string containing telescope name.

 KEYWORD PARAMETERS:
      None.

 OUTPUTS:
      catalog: structure containing fields in catalog file.

 PROCEDURE:
      Straightforward.

 MODIFICATION HISTORY:
      Written by Doug Biesecker, May 1999.
	011101, nbr - Check in to SCCS

 11/01/01 @(#)rd_las_cat_fits.pro	1.1	; LASCO NRL IDL Library


READALLHK

[List of Routines] (See ./packets/readallhk.pro)

 NAME:
	READALLHK

 PURPOSE:
	This routine reads in all LASCO housekeeping packets for a given date.

 CATEGORY:
	LASCO PACKETS

 CALLING SEQUENCE:
	Result = READALLHK ( Date )

 INPUTS:
	Date:	A string specifying the date in the format YYMMDD

 KEYWORD PARAMETERS:
	ECS:	This keyword will indicate that the file type to be read in
		are files generated by the EOF Core System (ECS).  If the
		keyword is not present, the routine assumes the files were
		generated by DACS.

       HKLZ:   This keyword will indicate that the file type to be read in
               are house keeping level-0 files (i.e. *.d01).

       LOW_RES: This keyword will indicate that the file type to be read in
                are house keeping level-0 compressed file. (i.e. *.s01). It 
                must be used in combination with HKLZ keyword.

 OUTPUTS:
	This function returns the LASCO housekeeping data as a 2D byte array
	in which the packet information is the first dimension and time is
	the second dimension.

 COMMON BLOCKS:
	None

 RESTRICTIONS:
	The current working directory must be the directory where the files
	are located,  except for /HKLZ option.

 PROCEDURE:
	Calls the routine READ_TM_PACKET

 EXAMPLE:
	Read in the ECS housekeeping data for the date 6 March 1996:

		hk = READALLHK ('960306',/ecs)
               or
               hk = READALLHK ('960306',/hklz)
               or
               hk = READALLHK ('960306',/hklz,/low_res)

 MODIFICATION HISTORY:
 	Written by:	R.A. Howard, 1992
	Jan, 1996	Modified for ECS and READ_TM_PACKET.
       Jan, 1998       AEE - Added /hklz (level-0 house keeping)  and
                             /low_res keyword options.
       Sep, 1998       AEE - Added HK2 (G016) to get Motor Encoder Positions.
       Oct, 1998       RAH - Added environment variable TMPCKTS
       Dec, 1998       AEE - Added path (from TMPCKTS) to the ecs files.
       Sep, 1999       AEE _ Check first 6 chars of a line for the yymmdd instead of the whole line.

 @(#)readallhk.pro	1.4 10/02/98 :LASCO IDL LIBRARY



READALLSV1

[List of Routines] (See ./packets/readallsv1.pro)

 NAME:
	READALLSV1

 PURPOSE:
	This routine reads in all service module housekeeping packets type 1,
	(SVMHK1) for a given date.

 CATEGORY:
	LASCO PACKETS

 CALLING SEQUENCE:
	Result = READALLSV1 ( Date )

 INPUTS:
	Date:	A string or array of strings specifying the date in the format YYMMDD

 KEYWORD PARAMETERS:
	ECS:	This keyword will indicate that the file type to be read in
		are files generated by the EOF Core System (ECS).  If the
		keyword is not present, the routine assumes the files were
		generated by DACS.

 OUTPUTS:
	This function returns the SVMHK1 housekeeping data as a 2D byte array
	in which the packet information is the first dimension and time is
	the second dimension.

 COMMON BLOCKS:
	None

 RESTRICTIONS:
	If the environment variable, TMPCKTS, is not defined then the current 
	working directory must be the directory where the files are located.

 PROCEDURE:
	Calls the routines READ_TM_PACKET, GET_PACKET_FNAMES and READ_PACKET_FNAMES

 EXAMPLE:
	Read in the ECS housekeeping data for the date 6 March 1996:

		hk = READALLSV1 ('960306',/ecs)

 MODIFICATION HISTORY:
 	Written by:	R.A. Howard, 1992
	Jan, 1996	Modified for ECS and READ_TM_PACKET.
	Sep, 1998	Added environment variable TMPCKTS
	Sep, 1998	Changed method of accumulating packets
			Permit an array of dates
			Use GET_PACKET_FNAMES and READ_PACKET_FNAMES

 @(#)readallsv1.pro	1.4 07/05/00 :LASCO IDL LIBRARY


READALLSV2

[List of Routines] (See ./packets/readallsv2.pro)

 NAME:
	READALLSV2

 PURPOSE:
	This routine reads in all service module housekeeping packets type 2,
	(SVMHK2) for a given date.

 CATEGORY:
	LASCO PACKETS

 CALLING SEQUENCE:
	Result = READALLSV2 ( Date )

 INPUTS:
	Date:	A string specifying the date in the format YYMMDD

 KEYWORD PARAMETERS:
	ECS:	This keyword will indicate that the file type to be read in
		are files generated by the EOF Core System (ECS).  If the
		keyword is not present, the routine assumes the files were
		generated by DACS.

 OUTPUTS:
	This function returns the SVMHK2 housekeeping data as a 2D byte array
	in which the packet information is the first dimension and time is
	the second dimension.

 COMMON BLOCKS:
	None

 RESTRICTIONS:
       If the environment variable, TMPCKTS, is not defined then the current
       working directory must be the directory where the files are located.

 PROCEDURE:
	Calls the routines READ_TM_PACKET, GET_PACKET_FNAMES and READ_PACKET_FNAMES

 EXAMPLE:
	Read in the ECS housekeeping data for the date 6 March 1996:

		hk = READALLSV2 ('960306',/ecs)

 MODIFICATION HISTORY:
 	Written by:	R.A. Howard, 1992
	Jan, 1996	Modified for ECS and READ_TM_PACKET.
       Sep, 1998       Added environment variable TMPCKTS
       Sep 24, 1998	Use GET_PACKET_FNAMES and READ_PACKET_FNAMES

 @(#)readallsv2.pro	1.3 09/24/98 :LASCO IDL LIBRARY


READALLSV4

[List of Routines] (See ./packets/readallsv4.pro)

 NAME:
	READALLSV4

 PURPOSE:
	This routine reads in all service module housekeeping packets type 4,
	(SVMHK4) for a given date.

 CATEGORY:
	LASCO PACKETS

 CALLING SEQUENCE:
	Result = READALLSV4 ( Date )

 INPUTS:
	Date:	A string specifying the date in the format YYMMDD

 KEYWORD PARAMETERS:
	ECS:	This keyword will indicate that the file type to be read in
		are files generated by the EOF Core System (ECS).  If the
		keyword is not present, the routine assumes the files were
		generated by DACS.

 OUTPUTS:
	This function returns the SVMHK4 housekeeping data as a 2D byte array
	in which the packet information is the first dimension and time is
	the second dimension.

 COMMON BLOCKS:
	None

 RESTRICTIONS:
       If the environment variable, TMPCKTS, is not defined then the current
       working directory must be the directory where the files are located.

 PROCEDURE:
	Calls the routines READ_TM_PACKET, GET_PACKET_FNAMES and READ_PACKET_FNAMES

 EXAMPLE:
	Read in the ECS housekeeping data for the date 6 March 1996:

		hk = READALLSV4 ('960306',/ecs)

 MODIFICATION HISTORY:
 	Written by:	R.A. Howard, 1992
	Jan, 1996	Modified for ECS and READ_TM_PACKET.
       Sep, 1998       Added environment variable TMPCKTS
       Sep 25, 1998	Use GET_PACKET_FNAMES and READ_PACKET_FNAMES

 @(#)readallsv4.pro	1.3 09/24/98 :LASCO IDL LIBRARY


READFITSL

[List of Routines] (See ./display/readfitsl.pro)

 Project     :

 Name        : READFITSL
	
 Purpose     : Read a FITS file into IDL data and header variables.

 Category    :
 
 Explanation :

 Syntax      : Result = READFITSL( Filename,[ Header, /NOSCALE, EXTEN_NO = ,
			/SILENT , NaNVALUE = , STARTROW = , NUMROW = ] )
 Example     :
	Read a FITS file TEST.FITS into an IDL image array, IM and FITS 
	header array, H.   Do not scale the data with BSCALE and BZERO.

		IDL> im = READFITSL( 'TEST.FITS', h, /NOSCALE)

	If the file contain a FITS extension, it could be read with

		IDL> tab = READFITSL( 'TEST.FITS', htab, /EXTEN )

	To read only rows 100-149 of the FITS extension,

		IDL> tab = READFITSL( 'TEST.FITS', htab, /EXTEN, 
					STARTR=100, NUMR = 50 )

 Inputs      :	FILENAME = Scalar string containing the name of the FITS file  
		(including extension) to be read.

 Opt.Inputs  :
	NOSCALE - If present and non-zero, then the ouput data will not be
		scaled using the optional BSCALE and BZERO keywords in the 
		FITS header.   Default is to scale.

	SILENT - Normally, READFITS will display the size the array at the
		terminal.  The SILENT keyword will suppress this

	NaNVALUE - This scalar is only needed on Vax architectures.   It 
		specifies the value to translate any IEEE "not a number"
		values in the FITS data array.   It is needed because
		the Vax does not recognize the "not a number" convention.

	EXTEN_NO - scalar integer specify the FITS extension to read.  For
		example, specify EXTEN = 1 or /EXTEN to read the first 
		FITS extension.    Extensions are read using recursive
		calls to READFITS.

	POINT_LUN  -  Position (in bytes) in the FITS file at which to start
		reading.   Useful if READFITS is called by another procedure
		which needs to directly read a FITS extension.    Should 
		always be a multiple of 2880.

	STARTROW - This keyword only applies when reading a FITS extension
		It specifies the row (scalar integer) of the extension table at
		which to begin reading. Useful when one does not want to read 
		the entire table.

	NUMROW -  This keyword only applies when reading a FITS extension. 
		If specifies the number of rows (scalar integer) of the 
		extension table to read.   Useful when one does not want to
		read the entire table.

 Outputs     :
	Result = FITS data array constructed from designated record.

 Opt. Outputs:
	Header = String array containing the header from the FITS file.

 Keywords    :

 Common      :

 Restrictions:
		Cannot handle random group FITS

	The procedure FXREAD can be used as an alternative to READFITS.
	FXREAD has the option of reading a subsection of the primary FITS data.

    	Procedures used:
       Functions:   SXPAR, WHERENAN
	Procedures:  IEEE_TO_HOST, SXADDPAR

 History     :
	MODIFIED, Wayne Landsman  October, 1991
	Added call to TEMPORARY function to speed processing     Feb-92
	Added STARTROW and NUMROW keywords for FITS tables       Jul-92
	Close logical unit if EOF encountered
	Make SILENT keyword work for tables                      Oct-92
	Work under "windows"   R. Isaacman                       Jan-93
	Check for SIMPLE keyword in first 8 characters           Feb-93
	Removed EOF function for DECNET access                   Aug-93
	Work under "alpha"                                       Sep-93
       Null array processing fixed:  quotes in a message 
          properly nested, return added.  Affected case when
          readfits called from another procedure.   R.S.Hill    Jul-94
       Added CONTINUE keyword in messages : 
          message, 'ERROR - EOF encountered while reading
	             FITS header',/CONTINUE 
	   message,'ERROR - Header does not contain required
	             SIMPLE keyword',/CONT 
	   and return,-1.	B.Podlipnik			 Feb-95

 Contact     : BP, borut@lasco1.mpae.gwdg.de


READ_BITP_SCE

[List of Routines] (See ./scenario/read_bitp_sce.pro)

 NAME:
	READ_BITP_SCE

 PURPOSE:
	Read a bitpacked scenario file (output from schedule tool)
	and print commands in the file

 CATEGORY:
	Debug

 CALLING SEQUENCE:

	READ_BITP_SCE, Scenario_filename 


 INPUTS:
	Scenario_filename: Name of Scenario file

 OPTIONAL INPUTS:
	
 KEYWORD PARAMETERS:
	PRINTIT:  Put output in Scenario_filename.prt
		

 OUTPUTS:

 OPTIONAL OUTPUTS:

 COMMON BLOCKS:

 SIDE EFFECTS:

 RESTRICTIONS:

 PROCEDURE:

 EXAMPLE:

		READ_BITP_SCE,'LAS19990917000.IPT.sce'

 MODIFICATION HISTORY:
 	Written by:	Dennis Wang - 21 Sep 1999

	@(#)read_bitp_sce.pro	1.1 09/22/99 LASCO IDL LIBRARY


READ_BLOCK

[List of Routines] (See ./reduce/fuzzy/read_block.pro)

 PROJEcT:
       SOHO - LASCO

 NAME:
       READ_BLOCK

 PURPOSE:
       returns the block (array of pixel) at column i and row j

 CATEGORY:
       Missing Blocks

 CALLING SEQUENCE:
       block = read_block (image, i, j)

 INPUTS:
       image           the image where to read the block onto
       i, j            the column i and the row j of the block
                       (i and j ranges from 0 to 31)

 KEYWORD PARAMETERS:
       SIDE            the side of the square blocks (default is 32 pixels)

 OUTPUTS:
       The function returns the corresponding block, a 32 x 32 integer array

 MODIFICATION HISTORY:
       written by J.More, September 1996


READ_CARR_LONG

[List of Routines] (See ./synoptic/read_carr_long.pro)

 NAME:
	READ_CARR_LONG

 PURPOSE:
	This procedure reads in the carrington number and date information file.
	It is called from other routines as needed, and thus doesn't need to be
	called by the user explicitly.

 CATEGORY:
	LASCO Synoptic

 CALLING SEQUENCE:
	READ_CARR_LONG, Date, Cr, Clong

 INPUTS:
	None

 OPTIONAL INPUTS:
	None

 OUTPUTS:
	The only output is the storing of the carrington information into a common block.
	
 COMMON BLOCKS:
	carr_long:	Contains the start date of the carrington rotations from
			the almanac.  Generated by this routine.

 EXAMPLE:
       

 MODIFICATION HISTORY:
 	Written by:	RA Howard, NRL, 3/18/96

	@(#)read_carr_long.pro	1.4 11/07/96 LASCO IDL LIBRARY


READ_DOOR_STATUS

[List of Routines] (See ./database/read_door_status.pro)

 NAME:
	READ_DOOR_STATUS

 PURPOSE:
	Returns an array of the LASCO door status

 CATEGORY:
	DATABASE

 CALLING SEQUENCE:
       Result = READ_DOOR_STATUS()

 INPUTS:
	None

 OUTPUTS:
	This function returns the door status as a structure array with tags:
		.tele	; int (0-3) telescope
		.closed	; double, date closed TAI time format
		.opened	; double, date opened TAI time format

 PROCEDURE:
	Reads lasco/eit door close/open dates from datafile.

 EXAMPLE:
	door_status = READ_DOOR_STATUS()

 MODIFICATION HISTORY:
 	Written by:	Scott Paswaters, NRL, Mar 1998

	@(#)read_door_status.pro	1.2 03/31/99 LASCO IDL LIBRARY


READ_EXP_FACTOR

[List of Routines] (See ./expfac/read_exp_factor.pro)

 NAME:
	READ_EXP_FACTOR

 PURPOSE:
	This function reads the exposure factor file for a given date

 CATEGORY:
	EXPFAC

 CALLING SEQUENCE:
	Result = READ_EXP_FACTOR(Date)

 INPUTS:
	Tel:		Telescope (string: 'c1','c2','c3')
	Date:		Date for which the exposure factors are wanted, either
			in YYMMDD, MJD, or CDS time structure formate

 OUTPUTS:
	Result:		0 = Successful read
			-1 = File not found

 COMMON BLOCKS:
	EXP_FACTOR_ARRAY:	The exposure facotor information for a given date.

 PROCEDURE:
	Called by GET_EXP_FACTOR

	The file for the image date specified in the image header is 
	read into the common block.
  
	The format in the exposure factor file is:
      fname       tsnnnnnn.fts    (a12)  
      factor      number          (f10.6)  
      bias        number          (f10.1)  
      date        YYMMDD          (a6)  
      time        SEC.MM          (12.2)  
      Filter      string          (a12)  
      Polarizer   string          (a12)  
      Wavelength  NNNN.NNNN       (a9)  
      Nregion     NNNN            (i4)
      Sigma       NNNN.NNNN       (f10.2)

	Checks for duplicate entries and only saves the last one read in.

 MODIFICATION HISTORY:
 	Written by:	RA Howard, NRL, 21 September 1997
	6 October 1997	RAH, Split read away from GET_EXP_FACTOR
	20 Feb 98	RAH, added fits filenames to the common block
			and changed the variable name to be nregion instead
			of nzero
	22 Feb 98	RAH, check for duplicate entries, and permit any format
			for date
	 4 Dec 01 	Use FILEPATH for filename
	17 Sep 02	Add filedate to common block, from file_date_mod


 @(#)read_exp_factor.pro	1.12, 09/18/02 :LASCO IDL LIBRARY

	


READ_HT

[List of Routines] (See ./movie/read_ht.pro)

 NAME:
	READ_HT

 PURPOSE:
	This procedure is used to read height-time files.

 CATEGORY:
	MOVIE

 CALLING SEQUENCE:
	READ_HT,Filename,

 INPUTS:
	Filename:	If filename is present then it is used immediately

 OUTPUTS:
	The procedure returns the contents of the height time file in the
	common block.

 COMMON BLOCKS:
	None

 RESTRICTIONS:
	The file should not have any blank lines.

 PROCEDURE:
   	Reads in the height-time file, stores the height, time and position
	angle into arrays.  Time is converted to tai.

 MODIFICATION HISTORY:
 	Written by:	Scott H. Hawley, NRL Summer Student, June 1996
       02 May 97       RAH, Made into a separate file
	30 Sep 97	RAH, Mods for version 2
	 3 Feb 98	RAH, Correct read of feature description, add array to comments
	 3 Jul 02	NBR, Provide for case of no feature description

 07/03/02 @(#)read_ht.pro	1.8 :LASCO IDL LIBRARY



READ_IMG

[List of Routines] (See ./display/read_img.pro)

 NAME:				READ_IMG
 PURPOSE:			reads a ccd image from disk
 CATEGORY:			C1
 CALLING SEQUENCE:		a = read_img(filename)
				a = read_img(filename,hdr)
 INPUTS:			filen = string of the name of the file to read
 OPTIONAL INPUT PARAMETERS:	None
 KEYWORD PARAMETERS:		nx - number of rows
                               ny - number of coloumns
                               data_type - data type in bytes
 OUTPUTS:			a = array containing the image
 OPTIONAL OUTPUT PARAMETERS:	hdr = header to read from disk
 COMMON BLOCKS:		writes the header to ccd_header
 SIDE EFFECTS:			
 RESTRICTIONS:                 None
 PROCEDURE:
 MODIFICATION HISTORY:		bp 3/16/93

 SCCS variables for IDL use
 
 @(#)read_img.pro	1.0  3/16/93 : MPAe


READ_IP_DAT

[List of Routines] (See ./convert/read_ip_dat.pro)

 NAME:
	READ_IP_DAT

 PURPOSE:
	Returns an array of structures comtaining defined
	image processing id codes and descriptions.

 CATEGORY:
	LASCO CONVERT

 CALLING SEQUENCE:
	Result = READ_IP_DAT ()

 INPUTS:
	None

 OUTPUTS:
	Result = array of structures containing:
		Result.ip_num    ;int: compression type as understood by OBE
		Result.ip_char   ;string: 1 character compression code 
		Result.ip_description  	;string: String describing compression step 

 CALLS:
	GET_DB_STRUCT

 RESTRICTIONS:
	The file cnvrt_ip.dat must exist in $NRL_LIB/lasco/convert

 MODIFICATION HISTORY:
         Written,  SE Paswaters, NRL
   Version 1  sep  13 Jun 1996

       @(#)read_ip_dat.pro	1.5 12/11/97  LASCO IDL LIBRARY


READ_LASCO_SPECTRA

[List of Routines] (See ./inout/read_lasco_spectra.pro)

 NAME:
	READ_LASCO_SPECTRA

 PURPOSE:
	This procedure reads the LASCO filter spectral data

 CATEGORY
	CALIBRATION

 CALLING SEQUENCE:
	READ_LASCO_SPECTRA,Fname,Wl,Int,Np

 INPUTS:
	Fname:	String containing the file name

 Outputs:
	Wl:	Array containing the wavelengths
	Int:	Array containing the intensities
	Np:	Number of points in the array

 OPTIONAL OUTPUTS:
	Title:	Title of file

 MODIFICATION HISTORY:
	Written by R.A. Howard, NRL

 @(#)read_lasco_spectra.pro	1.1 07/31/97 :NRL Solar Physics


READ_LIMB_DARK

[List of Routines] (See ./inout/read_limb_dark.pro)

 NAME:
	READ_LIMB_DARK

 PURPOSE:
	This procedure reads the LASCO filter spectral data

 CATEGORY
	CALIBRATION

 CALLING SEQUENCE:
	READ_LIMB_DARK,Wavel,Limbdark

 INPUTS:
	None

 Outputs:
	Wavel:		An array of wavelengths in nm
	Limbdark:	An array of limb darkening parameters

 MODIFICATION HISTORY:
	Written by R.A. Howard, NRL, Nov 29, 1998

 @(#)read_limb_dark.pro	1.1 11/28/98 :LASCO IDL LIBRARY



READ_MONEXP_DATA

[List of Routines] (See ./expfac/read_monexp_data.pro)

 NAME:
	READ_MONEXP_DATA

 PURPOSE:
	This procedure reads in the MONEXP data for the given telescope and date.

 CATEGORY:
	LASCO data analysis

 CALLING SEQUENCE:
	READ_MONEXP_DATA,Tel,Dtea,Dteb

 INPUTS:
	Tel:	String giving the telescope: C1, C2, C3
	Dtea:	First date to be read in, either YYMMDD, or MJD or UTC
	Dteb:	Last date to be read in, either YYMMDD, or MJD or UTC

 KEYWORD PARAMETERS:
	NOSORT:	If set then the MONEXP data are not sorted by time.  The default is
		to sort the data

 OUTPUTS:
	Stores data into the common array

 COMMON BLOCKS:
	MONEXP_DATA

 SIDE EFFECTS:
	Reads in the data files of the form, $MON_EXP/cx_monexp_yymmdd.dat
		where cx is c1, c2, c3, or c4
		and   yymmdd is the year, month, day

 RESTRICTIONS:

 PROCEDURE:

 MODIFICATION HISTORY:
 	Written by:	RAHoward, NRL, June 2 1997
	Modified:	11/11/97  RAH	Check to see if MON_EXP file exists
	         	06/06/97  RAH	Added nosort option, check for nrec=0
	         	12/18/98  RAH	Added check for compressed files

	@(#)read_monexp_data.pro	1.9 01/15/02 LASCO IDL LIBRARY


READ_MVI

[List of Routines] (See ./movie/read_mvi.pro)

RO READ_MVI, lu, file_hdr, ihdrs, imgs, swapflag, NO_COLOR=no_color, RGBVEC=rgbvec

 Project     : SOHO - LASCO/EIT

 Name        : READ_MVI

 Purpose     : Read MVI format files

 Use         : IDL> openr,1,'file.mvi'
		IDL> read_mvi, 1, mvihdr, framehdrs, images

 Inputs      : 
	lu	INT	logical unit of MVI file to read

 Optional Inputs:

 Outputs     :
	file_hdr  STRUCT	describes movie
	ihdrs  	BYTE File Array	describes frame headers
	imgs  	BYTE File Array	descrives frame data (images)
	swapflag  BYTE	byte-swap ON (1) or OFF (0)

 Keywords    :
	/NO_COLOR	Do not load color tables in mvi file 
	RGBVEC=[r,g,b]	Returns color table vectors

 Comments    :

 Side effects: creates structure FILE_HDR

 Category    : Image Display.  Animation.

 Added keyword rgbvec to allow color tables from mvi file to be passed back
 to calling routine. SPP (USRA/NRL) 97/10/10.

 Version     :
       @(#)read_mvi.pro	1.7, 09/23/04 : NRL LASCO LIBRARY

 Modifications:
	010711	the jake	Added Version 3 to handle RTHETA Movies
	011109  thejake		After testing, additions do not seem to have done any harm so adding
				WRUNMOVIEM3, MVIPLAY3, WRITE_DISK_MOVIE3, and READ_MVI3 to library.
				Once an MVI is written with the version 3 software, it will need to
				be read with it as well.
	030828, nbr - Incorporate read_mvi3.pro/RTheta header; add version 4 header w/ RECTIFY


READ_MVI3

[List of Routines] (See ./movie/read_mvi3.pro)

 Project     : SOHO - LASCO/EIT

 Name        : READ_MVI3

 Purpose     :

 Use         : IDL>

 Inputs      :

 Optional Inputs:

 Outputs     :

 Keywords    :

 Comments    :

 Side effects:

 Category    : Image Display.  Animation.

 Added keyword rgbvec to allow color tables from mvi file to be passed back
 to calling routine. SPP (USRA/NRL) 97/10/10.


	010711	the jake	Added Version 3 to handle RTHETA Movies
	011109  thejake		After testing, additions do not seem to have done any harm so adding
				WRUNMOVIEM3, MVIPLAY3, WRITE_DISK_MOVIE3, and READ_MVI3 to library.
				Once an MVI is written with the version 3 software, it will need to
				be read with it as well.




 Version     :

 07/09/03 @(#)read_mvi3.pro	1.3 :LASCO IDL LIBRARY


READ_OCC_DAT

[List of Routines] (See ./convert/read_occ_dat.pro)

 NAME:
         READ_OCC_DAT

 PURPOSE:
         Returns an array of structures containing LASCO occulter centers, and EIT Sun Centers

 CATEGORY:
         LASCO CONVERT

 CALLING SEQUENCE:
         Result = READ_OCC_DAT ()

 INPUTS:
         None

 OUTPUTS:
         Result = 4 by 5 by 2 element array of structures containing:
			 4 for C1,C2,C3,EIT
			 5 for filter position
			 2 for valid dates (now have only two)
                   Result.xcen    ;double: x center of occulter
                   Result.ycen    ;double: y center of occulter
                   Result.mjd     ;long: start date of validity

 RESTRICTIONS:
         The file occulter_center.dat must exist in $NRL_LIB/lasco/convert

 MODIFICATION HISTORY:
         Written,  SE Paswaters, NRL
         Version 1  sep  30 Aug 1996
         Version 2  rah  27 Nov 1998	added valid date
	11 Jan 2002, nbr - Change path for windows compatibility

 01/11/02 @(#)read_occ_dat.pro	1.8 :NRL Solar Physics



READ_PACKET_FNAMES

[List of Routines] (See ./packets/read_packet_fnames.pro)

 NAME:
	READ_PACKET_FNAMES

 PURPOSE:
	This routine reads in all packets specified by the files

 CATEGORY:
	LASCO PACKETS

 CALLING SEQUENCE:
	Result = READ_PACKET_FNAMES ( Files )

 INPUTS:
	Files:	A string or array of strings specifying the file names

 OUTPUTS:
	This function returns the packet information as a 2D array
	in which the packet information is the first dimension and time is
	the second dimension.

 COMMON BLOCKS:
	None

 PROCEDURE:
	Calls the routine READ_TM_PACKET
	Reformats the packet information from each file into a singly dimensioned
	array.  Then the information from each file can be concatenated together.
	When all files have been read in then the array can be reformatted into
	the 2D array.

 EXAMPLE:
	Read in the ECS housekeeping data for the files, files

		hk = READ_PACKET_FNAMES (files)

 MODIFICATION HISTORY:
 	Written by:	R.A. Howard, 1998
	Sep, 1998	Taken from READALLSV1

 @(#)read_packet_fnames.pro	1.1 09/24/98 :LASCO IDL LIBRARY


READ_TM_PACKET

[List of Routines] (See ./packets/read_tm_packet.pro)

 NAME:
	READ_TM_PACKET

 PURPOSE:
	This routine reads in raw telemetry packets.

 CATEGORY:
	LASCO PACKET

 CALLING SEQUENCE:
	Result = READ_TM_PACKET (Pckt_file_name)

 INPUTS:
	Pckt_file_name:	String containing the name of the file to be read in.
	
 KEYWORD PARAMETERS:

	NO_HDR:	 	Strips off the 12 byte header information added by DACS
	FIRST_ONLY:	Only returns first packet in file
	SILENT:		Suppresses informational messages

 OUTPUTS:
	Result:	A 2D byte array containing the packets.  The contents of 
		one packet is in the first dimension, and time is in the
		second dimension.

 COMMON BLOCKS:
	READ_TM_PACKET_COMMON:	Contains the TM packet types that have been
	read in by INIT_APID_STRUCT

 MODIFICATION HISTORY:
 	Written by:	S.E. Paswaters, NRL, Jan 1996
	Version 2  23 Mar 1996   RAHoward	Corrected No_HDR option
	Version 3  26 Mar 1996   RAHoward	Added .dat file type to archive
						type for LZ HK.
       Version 4  23 Jan 1998   Ed Esfandiari  added .s01 and .sat data types
                                               (sub-sampled .d01 and dat data).

 @(#)read_tm_packet.pro	1.2 01/23/98 :LASCO IDL LIBRARY


READ_ZONE

[List of Routines] (See ./reduce/fuzzy/read_zone.pro)

 PROJET:
	SOHO - LASCO

 NAME:
	READ_ZONE

 PURPOSE:
	Gets the missing zone surrounding a given list of missing blocks

 PROCEDURE:
	Gets the missing zone (array of pixel) surrounding a given list of
	missing blocks

	A missing zone is defined as the smallest rectangle of blocks that
	surrounds a cluster of missing blocks (likely to be neighbor missing
	blocks) but has  no missing block on its border (its outermost rows
	and columns)
	For example, 1 single block leads to a 3x3 surrounding block zone

 CATEGORY:
	Missing Blocks

 CALLING SEQUENCE:
	zone = 	read_zone (image, list_miss_blocks [,zone_width, zone_height])

 INPUTS:
	image				the image containing the zone to read
	list_miss_blocks		a list of missing blocks (or 1 block)
					that the missing zone will surround
 KEYWORD INPUT:
	rebindex : rebin index (see fuzzy_image.pro)

 OUTPUTS:
	zone				the zone surrounding these blocks

 Optional OUTPUTS:
	zone_width, zone_height 	the dimentions of the zone, in pixels

 MODIFICATION HISTORY:
	Written by J.MORE, September 1996
	Add of rebindex keyword on 28/01/2000 by A.Thernisien


RECONVERT[1]

[List of Routines] (See ./display/gammasca.pro)

 NAME:
	RECONVERT

 PURPOSE:
	Converts data to a specified data type

 CATEGORY:
	PICO

 CALLING SEQUENCE:
	result = reconvert(image, data_type)

 INPUTS:
	image:  array to be converted
	data_type: an integer between 0 and 7 specifying 
		to which data_type the image should be 
		converted.

 OPTIONAL INPUT PARAMETERS:
	None

 KEYWORD PARAMETERS:
	None

 OUTPUTS:
	result: the converted image of the new data type

 OPTIONAL OUTPUT PARAMETERS:
	None

 COMMON BLOCKS:
	None

 SIDE EFFECTS:
	Unknown

 RESTRICTIONS:
	None

 PROCEDURE:
	Straightfroward

 MODIFICATION HISTORY:         ae 11-AUG-1994 Pic Du Midi


RECONVERT[2]

[List of Routines] (See ./display/reconvert.pro)

 NAME:
	RECONVERT

 PURPOSE:
	Converts data to a specified data type

 CATEGORY:
	PICO

 CALLING SEQUENCE:
	result = reconvert(image, data_type)

 INPUTS:
	image:  array to be converted
	data_type: an integer between 0 and 7 specifying 
		to which data_type the image should be 
		converted.

 OPTIONAL INPUT PARAMETERS:
	None

 KEYWORD PARAMETERS:
	None

 OUTPUTS:
	result: the converted image of the new data type

 OPTIONAL OUTPUT PARAMETERS:
	None

 COMMON BLOCKS:
	None

 SIDE EFFECTS:
	Unknown

 RESTRICTIONS:
	None

 PROCEDURE:
	Straightfroward

 MODIFICATION HISTORY:         ae 11-AUG-1994 Pic Du Midi


REDUCE_DAILY

[List of Routines] (See ./reduce/reduce_daily.pro)

 NAME:
	REDUCE_DAILY

 PURPOSE:
	This procedure performs the reduction tasks that are done on a daily basis.

 CATEGORY:
	LASCO REDUCE

 CALLING SEQUENCE:
	REDUCE_DAILY

 INPUTS:
	None

 OPTIONAL INPUTS:
	STDate:	A string in the format YYMMDD that defines the starting date to be processed.
		If not present, the routine looks at the dates in daily.dat
	ENDATE:	A string in the format YYMMDD that defines the ending date to be processed.
		If not present, then only one date is processed
	
 KEYWORD PARAMETERS:
	LZ:	If present the level 0 data are to be processed.  The default is
		to process the quick look data.
	NOMED:	Do not do daily median images
	NO_C3:	Do not do C3 daily medians

 PROCEDURE:
	This procedure calls the routines to do the following tasks:

		check the monexp file for duplicates
		generate the daily median image
		generate PB and %P images

	All 4 telescopes are processed.

 EXAMPLE:
	To process the quick look files for June 1, 1998:

		REDUCE_DAILY,'980601'

	To process the level 0 files for June 1, 1998:

		REDUCE_DAILY,'980601',/lz

 MODIFICATION HISTORY:
 	Written by:	RA Howard, NRL, 6/19/98
	NB Rich	 6/23/98	Comment out make-movie calls
	NB Rich 11/06/98 	Add DO_POLARIZE
	NB Rich 07/07/99	Fixed typo with 'endate'
	NB Rich    12/99	Add NOMED keyword
	NB Rich	   01/00	Add NO_C3 keyword
       D  Wang 12 Jul 00       Added /VIG,/PTF to DO_POLARIZ call
	NB Rich 11 Jan 01	Fix call to open weekly.dat
	NB Rich 13 Apr 01 	Add NOREBIN to calls to MK_DAILY_MED
	NB Rich 31 Jan 02	Add /SH to spawn calls
	jake	030716		removing old commented out code
						fixing indentations


	@(#)reduce_daily.pro	1.8 07/16/03: LASCO IDL LIBRARY


REDUCE_IMAGE

[List of Routines] (See ./reduce/reduce_image.pro)

 NAME:				REDUCE_IMAGE

 PURPOSE:			Perform the pipeline processing for one file

 CATEGORY:			REDUCTION

 CALLING SEQUENCE:		REDUCE_IMAGE,File_name,Source

 INPUTS:			File_name = Name of DDIS file to be processed
				Source    = 0 for R/T processed at GSFC
					    1 for R/T processed at NRL
					    2 for Level 0/PB processed at NRL

 OUTPUTS:			None

 OPTIONAL OUTPUTS:		None

 COMMON BLOCKS:		DBMS

 SIDE EFFECTS:			Moves DDIS file, Creates FITS file

 PROCEDURE: 			Processes a new image created by DDIS and 
				detected by the CRON job moves the image to a 
				new directory for permanent storage.  Log 
				entries are written.

 MODIFICATION HISTORY:		Written, RA Howard, NRL, 13 Oct 1995
   Version 1
           2      RAH    15 Nov 1995    Modified log output
           3      RAH    14 Dec 1995    Corrected condition to call to reduce_level_1

       @(#)reduce_image.pro	1.1 04 Apr 1996 LASCO IDL LIBRARY


REDUCE_IMG_HDR

[List of Routines] (See ./reduce/reduce_img_hdr.pro)

 NAME:
	REDUCE_IMG_HDR

 PURPOSE:
	This procedure appends information from the current image header to 
	the header files in $LAST_IMG and in the current image directory.

 CATEGORY:
	REDUCTION

 CALLING SEQUENCE:
	REDUCE_IMG_HDR, Hdr

 INPUTS:
	Hdr = FITS header

 OPTIONAL INPUTS:
	None
	
 KEYWORD PARAMETERS:
	DAY_ONLY	Only update current directory

 OUTPUTS:
	None

 OPTIONAL OUTPUTS:
	None

 MODIFICATION HISTORY:
	Written, RA Howard, NRL
   VERSION 1  rah 16 Dec 1995
           2  rah 28 Dec 1995  Changed environment variable to LAST_IMG
           3  rah 29 Mar 1996  Write info to date directory also
           4  rah  4 Apr 1996  Modify filt/polar filed to be A6 from A5
           5  rah 26 Aug 1996  Added FP WL and OS Num to listing
	    6  nbr  6 Mar 1997  Write info to catalogs/daily directory
	    7  sep  3 Sep 1997  Write info to catalogs/daily_combined directory
           8  aee 21 Oct 1997  If level 1 or 2 image, write img_hdr.txt info 
                               only to the date directory.
	nbr 29 Aug 2000	- Write catalog files to $LAST_IMG instead of $IMAGES;
			  Add DAY_ONLY keyword
	nbr 11 Oct 2000 - Write img_hdr.txt file in $IMAGES also if NE $LAST_IMG
	nbr  9 Apr 2003 - Modify for level 1 processing
	nbr 25 Aug 2003 - imghdr changes
       k.battams 6/03/2005 -- get correct format for Level-1 img_hdr's

 SCCS variables for IDL use
 
 @(#)reduce_img_hdr.pro	1.13 09/08/03 :NRL LASCO IDL LIBRARY



REDUCE_IMG_HDR2

[List of Routines] (See ./display/reduce_img_hdr2.pro)

 NAME:
	REDUCE_IMG_HDR2

 PURPOSE:
	This procedure appends information from the current image header to 
	the header files in $LAST_IMG and in the current image directory.

 CATEGORY:
	REDUCTION

 CALLING SEQUENCE:
	REDUCE_IMG_HDR2, Hdr

 INPUTS:
	Hdr = FITS header

 OPTIONAL INPUTS:
	None
	
 KEYWORD PARAMETERS:
	None

 OUTPUTS:
	None

 OPTIONAL OUTPUTS:
	None

 MODIFICATION HISTORY:
	Written, RA Howard, NRL
   VERSION 1  rah 16 Dec 1995
           2  rah 28 Dec 1995  Changed environment variable to LAST_IMG
           3  rah 29 Mar 1996  Write info to date directory also
           4  rah  4 Apr 1996  Modify filt/polar filed to be A6 from A5

       @(#)reduce_img_hdr2.pro	1.1 11/02/01 LASCO IDL LIBRARY


REDUCE_LEVEL_05

[List of Routines] (See ./reduce/reduce_level_05.pro)

 NAME:
		REDUCE_LEVEL_05

 PURPOSE:
		Perform the Level 0.5 Processing

 CATEGORY:
		REDUCTION

 CALLING SEQUENCE:
		Result = REDUCE_LEVEL_05 (File_name,Fits_name,Source)

 INPUTS:
		File_name = Name of file to process in the 
				            format YYMMDD_HHMMSS.img
		Source    = parameter indicating file source

 OPTIONAL INPUTS:
		Fits_name = If DB_ONLY is set, then use this file to create 
				a database update file
	
 KEYWORD PARAMETERS:
	DB_ONLY		If set, then only create database update file from 
			input fits_name

 OUTPUTS:
 		Fits_name = Name of FITS file created
   		Result = 0 do process to level 1
			 1 don't process to level 1

 OPTIONAL OUTPUTS:
		None

 COMMON BLOCKS:
		DBMS

 PROCEDURE:

   processes a compressed LEB image created by DDIS to level 0.5
   the image is assumed to be located in the current directory
   level 0.5 consists of 
           decompression
           remove readout port effect
           rotate image to put solar north at top of image
           make FITS file
	    generate DBMS update records
           make gif file for lastimg_cx

   The level 0.5 image file is named according to the standard name 
   convention in the subdirectory tree:  
              $IMAGES/level_05/date/tel
   Note: if dark, cal lamp or continuous image then put in 
              $IMAGES/misc/tel/[dark,lamp,cont]/date
         if header from Ground to Peripheral LP then put in 
              $IMAGES/misc/leb/gnd/date

 MODIFICATION HISTORY:
 	WRITTEN    RA Howard, 3 October 1995
   Version 1      rah    3 Oct 95    Initial release
           2      rah    6 Nov 95    Add log output
           3      rah   15 Nov 95    Modified log output
           4      rah   11 Dec 95    Changed call to write_last_image to be 
                                     fits header
           5      rah   15 Dec 95    Changed call to rectify to be fits header
           6      rah   11 Jan 96    Changed rectify to include solar north
           7      rah   12 Jan 96    Added call to rectify P1, P2 coords
           8      rah   17 Jan 96    Corrected handling of read_leb_image 
                                     image read error
           9      rah   29 Mar 96    Rearranged reduce_img_hdr to be after 
				      changing to date directory to be able to
				      write img hdr also to date directory.
				      Changed browse image to be 128 x 128
				      Changed browse name to form from fits
                                     Added call to REDUCE_STATISTICS
                                     Added call to fill up DBMS IMG_STATS
          10      rah   03 Apr 96    Added DBMS update of leb_img_hdr & _ip
                                     Added non-hdr parameters to leb_img_hdr
          11      rah   10 Apr 96    Only compute stats if image found
          12      rah   15 Apr 96    Added call to REDUCE_REFCOORD
          13      sep   04 Jun 96    Added compression_str to img_leb_hdr table
                                     Corrected insertions into img_ip table
          14      sep   28 Jun 96    Added chmod 640 on .fts files
          15      sep   17 Jul 96    Modified for new LEB hdr (obev145+)
                                     added version and fp_order to DB updates.
          16      sep   02 Oct 96    added proc_time, p1row, p1col, p2row, p2col to DB updates.
          17      rah   21 Oct 96    added fits_hdr in call to make_browse
	   18	   nbr   11 Mar 97    print FITS_filename and directory 
	   19	   rah   23 Mar 97    moved REDUCE_REFCOORD and REDUCE_STATISTIC
                                     to always process, not just if DISPLAY
                                     Also, added call to CHECK_OBESUMERROR
          20      sep   13 Jun 97    Modified for new LEB hdr (obev203+)
          21      aee   27 Jun 97    Added unique_os field to img_leb_hdr
          22      rah   18 Jul 97    Check for image summing/differencing
          23      sep   14 Apr 98    Modified diskpath entry to use $IMAGES (always /net/corona/cplex..)
          24      rah   12 Jun 98    Add monexp and dark calcs
	   25      nbr   31 Jul 98    Change diskpath to use $DSKPATH
	   26	   nbr   22 Oct 98    Use LASCO_FITSHDR2STRUCT, not FITSHDR2STRUCT
	   27	   nbr   09 Mar 99    Set a.dateorig='NULL' for img_leb_hdr table
	   28	   nbr   12 Apr 99    Set chmod to 644 on .fts files
	nbr	29 Aug 00 - Change to SCCS version for ver; Use $LAST_IMG as location
			    of link directory if different from $IMAGES
          30      aee   21 Nov 00    Subtract lpulse from exp3 (and therefore from exptime)
                                     for cal lamp images on and after july 28, 1997.
	nbr	22 Jan 01 - Add door_cls output directory
	nbr 	30 Nov 01 - Add DB_ONLY option
	nbr	11 Dec 01 - Fix ss variable definition
	nbr	 1 Feb 02 - Add /SH to SPAWN calls
	jake	030721	added CROTA[12] keywords to EIT images
					(these keywords are added to LASCO in REDUCE_REFCOORD)
	jake	030804	replaced GET_SOHO_ROLL with GET_CROTA
                                     

 SCCS variables for IDL use
 
ersion=  '@(#)reduce_level_05.pro	1.29 08/04/03' ; LASCO IDL LIBRARY



REDUCE_LEVEL_1

[List of Routines] (See ./reduce/reduce_level_1.pro)

 NAME:
	REDUCE_LEVEL_1

 PURPOSE:
	This procedure performs the standard pipeline processing to 
	take the level 0.5 image to Level 1. 
   *** Note: This procedure is now designed to operate without
	any calling procedure. Simply input a level_05 FITS
	filename with path and it will do the rest.
	- NBR, 8/4/00

 CATEGORY:
	LASCO REDUCTION

 CALLING SEQUENCE:
	REDUCE_LEVEL_1, Fits_name

 INPUTS:
	Fits_name = Name of FITS file to process, including path

 OPTIONAL INPUTS:
	$RED_L1_PATH, $REDUCE_OPTS: environment variable for pipeline processing
	
 KEYWORD PARAMETERS:
  /REM_CR	Perform cosmic ray removal algorithm - THIS OPTION IS NOT RECOMMENDED because it 
		doesn't work very well
  /NO_VIG	Do not apply vignetting correction
  /PIPELINE	Process for pipeline (saves in pipeline directory, creates database entry)
  /RESET	Read in calibration images (vignetting, mask, ramp, etc.) from file instead
		of using what is stored in the common block
  SAVEDIR = 'pathname'		Directory to save output in. Default is current directory.


 OUTPUTS:
   Default:
	Writes FITS file in current directory or SAVEDIR (or $IMAGES if PIPELINE set)
	Writes ./reduce_level_1.log (or unique log file if PIPELINE set)
	Description of keywords in FITS header are at 
		http://lasco-www.nrl.navy.mil/level_1/level_1_keywords.html

 OPTIONAL OUTPUTS:
	None

 COMMON BLOCKS:
	DBMS, REDUCE_HISTORY

 RESTRICTIONS:
	Must have LASCO IDL Library
	Must have environment $LASCO_DATA defined
	The REM_CR option is not currently supported outside of NRL
  ***  Current versions of calibration files only tested for images observed before July 1998!!! ***
   	Polarization processing or background removal is Level 2

 PROCEDURE:

   Level 1 consists of calibrating for 
           dark current
           flat field
           stray light 
           distortion  
           vignetting  
           photometry (physical units)
	    corrected time and position


 MODIFICATION HISTORY:
		Written	 RA Howard, NRL
   Version 1	rah  3 Oct 1995    Initial release
           2   rah 15 Nov 1995    Modified log output
           3   rah 21 Oct 1996    Added fits_hdr to make_browse
           4   aee 23 Oct 1997    Added fits name error handling and camera 
                                  case statement and modified the code to
                                  use C3_CALIBRATE instead of photocal. Also
                                  introduced environment variable 
                                  REDUCE_L1_OPTS which must contain 'DBMS'
                                  in order to create a DB file. Set negative
                                  image intensity values to zeros. Also adds
                                  image info to the img_hdr.txt file. Also
                                  added stray light and distortion correction.
	   	nbr  5 Oct 1998	   changed output directory; no database entry
	    5   nbr  1 Mar 1999    Added header updates from GET_IMG_LEB_HDR_UPDATES;
				   added IMG_LEB_HDR for .db files; open .db file
	nbr  4 Aug 2000 - Update version recording; reconstruct FITS header for Level 1;
			  compute roll, suncenter, time corrections
	nbr  7 Aug 2000 - Edit HISTORY fields
	nbr 26 Oct 2000 - Edit call to C3_CALIBRATE
	nbr 14 Nov 2000 - Add header field N_MISSING, REM_CR keyword
	nbr 12 Jan 2001 - Apply mask after warp
	nbr 25 Jan 2001 - Add bkg, mask_blocks, zblocks0 to common block; add MISSLIST to header
	nbr 15 Feb 2001 - Add C2
	nbr 15 May 2001 - Change SOLAR_R to R_SUN in hdr
	nbr 31 May 2001 - Change $ANCIL_DATA to $LASCO_DATA
	nbr  8 Nov 2001 - Modify for use outside of pipeline; remove c3_cal_img COMMON block
	nbr  3 Dec 2001 - Make paths compatible with Windows SSW for GSV
	nbr 17 Dec 2001 - Make paths compatible with Windows SSW for GSV
	nbr 24 Jun 2002 - Use RED_L1_PATH for pipeline savedir and for log and db files;
			  use yyyymmdd for output dir
	nbr  5 Jul 2002 - Change comment for CROTA; reinsert READPORT in header because is 
			  used in offset_bias.pro
	nbr 17 Sep 2002 - Use BSCALE and BZERO to save images as integers; 
			  add BLANK keyword; use .txt instead of .sav for c3[2]nullblocks
	nbr  9 Jan 2003 - mask_flag=0 for debugging
	nbr 14 Mar 2003 - Reinsert COMMON c3_cal_img for mask; don't get mask in this program;
			  add fixwrap for summed images; convert only C3 Clear to type integer;
			  use adjust_hdr_tcr() for time, roll, suncenter
	nbr  9 Apr 2003 - reduce_img_hdr DAY_ONLY if not pipeline
	nbr 14 Apr 2003 - Modify to do monthly images.
	nbr 16 May 2003 - Modify keyword comments
	nbr 11 Sep 2003 - Change img_leb_hdr db update
	04.04.01, nbr - Use best available values post-interruption and note in header;
                obsolete TIME-OBS; rotate inverted images
       04.04.08, nbr - Update for bkg images
       05.07.25, nbr - Update/fix C3 mask implementation
       05/07/28 KarlB - Change output directory structure
       Aug 1,05  KB  - Another minor change to output dir

ersion= '@(#)reduce_level_1.pro	1.36, 08/01/05' ; LASCO IDL LIBRARY


REDUCE_MAIN

[List of Routines] (See ./reduce/reduce_main.pro)

 NAME:				REDUCE_MAIN

 PURPOSE:			Main program to search for new files created by
				DDIS to perform pipeline processing on.

 CATEGORY:			REDUCTION

 CALLING SEQUENCE:		REDUCE_MAIN, Src

 INPUTS:			None

 OPTIONAL INPUTS:		Src = 0 for processing R/T files at GSFC
 				      1 for processing R/T files at NRL
 				      2 for processing PB files at NRL
	
 KEYWORD PARAMETERS:		Auto = if set then use closed_img_file
                                      if not set then use closed_img_file2
                               reduce_only -- for use by user reduce only. Nobody  
                                       else should need it

 OUTPUTS:			None

 OPTIONAL OUTPUTS:		None

 COMMON BLOCKS:		DBMS

 SIDE EFFECTS:

 RESTRICTIONS:

 PROCEDURE:

 EXAMPLE:

 MODIFICATION HISTORY:		Written  RA Howard, NRL
    Version 1   RAH, 6 Nov 1995,    Initial Release
    Version 2   rah, 15 Nov 1995,   Added closed_img_file flag file
                                    Modified log printing
    Version 3   rah, 18 Nov 1995,   Added source as optional parameter
    Version 4   rah,  7 Dec 1995,   Minor corrections to version
    Version 5   rah,  4 Jan 1996,   Correction to handling of .mem files
    Version 6   rah, 15 Jan 1996,   Minor correction to file name and get_lun,luf
    Version 7   rah, 18 Jan 1996,   Corrected handling of contents of closed_img_file
				     to correct FP files
    Version 8   rah, 09 Apr 1996,   Added check of letter extension to filename
    Version 9   rah, 19 Apr 1996,   More mods to account for letter extension
    Version 10  rah, 27 Apr 1996,   Added error handling opening closed_img_file
    Version 11  rah, 08 May 1996,   Added creation of file for update list
    Version 12  nbr, 08 Apr 1997,   Changed target directories for .log and .db files
    Version 13  rah, 26 Aug 1997,   Error handling opening closed_img_file
    Version 14  rah, 27 Sep 1997,   Handling of files created out of time order
    Version 15  rah, 16 Jan 1998,   Process mem files first before img files
    Version 16  nbr, 03 Jun 1998,   Remove old .img dirs from previous session
    Version 17  rah, 19 Oct 1998,   Remove old log files for GSFC processing
    Version 18  nbr,  4 Jan 1999,   Add row to .db file to remove QL LEB_HDR
    Version 19  nbr, 20 Oct 1999,   Send message to user if gap between current and last
					.img files is > 1 hour; add check for good date
    Version 20  nbr,  4 Apr 2000,   Halt processing of QL for db update at 2AM; move save lastdate.sav
    Version 21  nbr, 24 Jul 2000,   Add /SH to spawn commands
    Version 22 nbr , 17 Oct 2001,   Change filename sent in email for db update halt
    Version 23 nbr,   1 Feb 2002 - Use /noshell keyword for two spawn commands; move chmod updates to end; Add /SH to SPAWN calls
    Version 23 nbr,   4 Feb 2002 - Move chmod to correct location
				jake,	030813	-	changed mail's to /usr/ucb/mail's
               Karl  14 Oct 2004 - Add reduce_only keyword to specify LASCO_DATA variable

			PLEASE CORRECTLY USE TABS FOR INDENTATION
			POORLY INDENTED CODE IS HARD TO READ

 @(#)reduce_main.pro	1.30 10/14/04 :LASCO IDL LIBRARY



REDUCE_RECTIFY

[List of Routines] (See ./reduce/reduce_rectify.pro)

 NAME:			REDUCE_RECTIFY
 PURPOSE:
	function procedure to rectify the CCD image to account
	for the port that the image has been read out
 
 CATEGORY:
 CALLING SEQUENCE:	x = REDUCE_RECTIFY (a,h)

 INPUTS:		a = input image
			h = FITS header

 OUTPUTS:		x = rectified image
			h will be modified to reflect the rectification

 OPTIONAL OUTPUT PARAMETERS:
 COMMON BLOCKS:
 SIDE EFFECTS:
 RESTRICTIONS:
 PROCEDURE:
	rectifies an image taken with the CCD camera to be as
	though the observer were looking through the CCD.
	The telescope is assumed to be an erecting one.

	If !order is 0, the image will be displayed on the screen
	properly.
 MODIFICATION HISTORY:

	rah 3/16/93  revised to use idl built in function, rotate
	rah 11/7/95  revised to accept readport as string or number
	V4  rah 11/7/95  revised to accept header as FITS header
	V5  rah 1/11/96  revised to rectify image for !order=0, origin at
                        bottom left of image
	V6  rah 1/14/96  EIT doesn't need a rotation, it is an inverting 
			 telescope
	V7  rah 1/30/96  Correction to C1
	V8  rah 3/6/96   Correction to C1 orientation and "R" coordinates

 SCCS variables for IDL use
 

	@(#)reduce_rectify.pro	1.1 04 Apr 1996 LASCO IDL LIBRARY


REDUCE_RECTIFY_P1P2

[List of Routines] (See ./reduce/reduce_rectify_p1p2.pro)

 NAME:	
			REDUCE_RECTIFY_P1P2

 PURPOSE:
			Generate R1 and R2 coordinates from the P1,P2
			CCD coordinates that simulate coordinates
			that would have been used if the CCD had been
			read out in the rectified position.
			
 CATEGORY:		
			LASCO REDUCTION

 CALLING SEQUENCE:
			REDUCE_RECTIFY_P1P2,Effport,Hdr

 INPUTS:		
			Effport:  A character 'A' to 'D' indicating
				  the CCD readout port, corrected for
				  the telescope position on the S/C
			Hdr:	  The FITS image header

 OUTPUTS:		
			None

 OPTIONAL OUTPUT PARAMETERS:
			None

 COMMON BLOCKS:
			None

 SIDE EFFECTS:
			Adds parameters R1COL, R1ROW, R2COL, R2ROW,
			EFFPORT to the FITS headers

 RESTRICTIONS:
			If the port is not A..D then the values of R1
			and R2 are just set to P1 and P2

			If R1 is less than 1, the R1 and R2 coordinates
			are adjusted accordingly

 PROCEDURE:
 MODIFICATION HISTORY:
	Version 1	RA Howard 11 Jan 96	Written

       @(#)reduce_rectify_p1p2.pro	1.1 04 Apr 1996 LASCO IDL LIBRARY


REDUCE_REFCOORD

[List of Routines] (See ./reduce/reduce_refcoord.pro)

 NAME:
	REDUCE_REFCOORD

 PURPOSE:
	Converts coordinate system to the standard coordinate system
	using the FITS keyword notation

 CATEGORY:
	LASCO DATA REDUCTION

 CALLING SEQUENCE:
	REDUCE_REFCOORD, Hdr, Level

 INPUTS:
	Hdr:	FITS header
	Level:	String indicating level to define coordinate system:
			'0.5', '1.0', '2.0'

 SIDE EFFECTS:
	Keywords are added to the FITS header, where n=1,2:
		CRPIXn, CRVALn, CROTAn, CDELTn, CTYPEn, CUNITn

 PROCEDURE:
	The 12 FITS keywords are computed for each of the processing
	levels and added to the header.  The keywords for one level
	do not require that the keywords for the preceeding level are 
	present.

 SUBROUTINE CALLS:
	FXPAR, FXADDPAR, GET_SUN_CENTER, GET_SEC_PIXEL

 MODIFICATION HISTORY:
       RA Howard, NRL, 14 April 1996
	Vers 1   14 Apr 1996, Initial Release
	     2   23 May 1997, All levels use solar coords
			030710 jake	added lines to account for nominal_roll_attitude
			030716 jake	using get_soho_roll instead of get_crota
			030804 jake replaced GET_SOHO_ROLL with GET_CROTA

	@(#)reduce_refcoord.pro	1.6 08/04/03 LASCO IDL LIBRARY


REDUCE_TRANSFER

[List of Routines] (See ./reduce/reduce_transfer.pro)

 NAME:				REDUCE_TRANSFER

 PURPOSE:			Peform the transfer of an image file
				created by DDIS into $LEB_IMG to the 
				appropriate subdirectory under $LAST_IMG

 CATEGORY:			REDUCTION

 CALLING SEQUENCE:	 	Result = REDUCE_TRANSFER (File_name, Source)

 INPUTS:			File_name = Name of DDIS file to transfer
				Source = parameter giving source of data

 OPTIONAL INPUTS:		None
	
 KEYWORD PARAMETERS:		None

 OUTPUTS: 			Result =  0 process to level 0.5
               			  1 don't process further

 OPTIONAL OUTPUTS:		None

 COMMON BLOCKS:

 SIDE EFFECTS:			None

 PROCEDURE:			
	The subdirectories under $RAW are:
	$RAW/YYMMDD if .img file
	The subdirectories under $IMAGES are not used in the procedure.
	The subdirectories under $LAST_IMG are:
       $LAST_IMG/misc/leb/mem/YYMMDD if memory dump
       $LAST_IMG/misc/leb/gnd/YYMMDD if ground to peripheral header
   Also enters the appropriate information into the data base

 MODIFICATION HISTORY:		Written, RA Howard, NRL

   Version 1	RAH   13 Oct 1995     Initial Release
           2   RAH   15 Nov 1995     Modified log printouts
           3   RAH   18 Mar 1996     Added leb summing to DB
           4   RAH   03 Apr 1996     Moved DBMS update of hdr & ip to 05
           5   RAH   09 Apr 1996     Check validity of image date
           6   RAH   29 Oct 1996     Added -f option to mv to force the move
	    7   NBR   19 May 1997     Use 'RAW' env var to place .img files
	    8	NBR   24 Dec 1997     Handle 0-length .img files
	    9   NBR   03 Feb 1999     Change upper bound of validdate to today + 2
		NBR   29 Aug 2000 - Use $LAST_IMG instead of $IMAGES
	NBR, 31 Jan 2002 - Add /SH to spawn calls


       @(#)reduce_transfer.pro	1.10 02/01/02 ; NRL LASCO IDL LIBRARY


REFORMAT

[List of Routines] (See ./reduce/reformat.pro)

 reformat.pro
 Run the reformatting code in the EOF
 
 SCCS variables for IDL use
 
 @(#)reformat.pro	1.1 05/14/97 :NRL Solar Physics


REFORMAT_DATE

[List of Routines] (See ./database/reformat_date.pro)


 fixed for year 2000 - 2020 AD

 @(#)reformat_date.pro	1.2 01/21/99 : NRL IDL Library

+
 NAME:
	reformat_date

 PURPOSE:
       change dates like m/d/yy to mm/dd/yyyy format.

 CATEGORY:
       Time Utility

 CALLING SEQUENCE:

	RESULT = reformat_date ( date )


 INPUTS:
	date:  string with date in m/d/yy format	

 OPTIONAL INPUTS:
	
 KEYWORD PARAMETERS:

 OUTPUTS:
       returns string in mm/dd/yyyy format

 OPTIONAL OUTPUTS:

 COMMON BLOCKS:

 SIDE EFFECTS:

 RESTRICTIONS:
	For years 1951 - 2050 only

 PROCEDURE:

 EXAMPLE:

       datestring='12/1/99'
	result = reformat_date(datestring)

       Produces datestring equal to '12/1/1999'

 MODIFICATION HISTORY:
 	Written by:	Ed Esfandiari -  April 1997
       21 Jan 99 -     Y2k Fix for years 2000-2050 - DW

	@(#)reformat_date.pro	1.2 01/21/99 LASCO IDL LIBRARY


REL_QL_FILL

[List of Routines] (See ./packets/rel_ql_fill.pro)

 Purpose:
  Fill in gaps in *.REL Sci TM with packets from QKL files and write new
  output REL file 

  This will fill in data gaps from the first packet to the last packet 
  in the REL file.  For preceding gaps or trailing gaps use the FIRST and LAST
  keywords to set the range of packet seq numbers  

 CALL:
   rel_ql_fill,rel_file,ql_file,out_file,rel,ql,out

 INPUT:  
       rel_file - *.REL file with data gap(s)
       ql_file -  *.QKL file used to fill data gap(s)
       out_file - name of output file


 OUTPUT: 
 	rel - byte array containing input REL packets
 	 ql - byte array containing input QKL packets
	out - output byte array containing merge packets
        

 KEYWORDS:
	DEBUG  - output debug information
	WRITE  - write output file (default is not to write)
       FIRST  - set the start Packet Seq Num 
                (error if first is not found in REL file)
       LAST   - set the last Packet Seq Num 

 EXAMPLE:  

 HISTORY:
 25 Oct 1999 D.Wang    - Created

 @(#)rel_ql_fill.pro	1.1 10/28/99 :LASCO NRL IDL LIBRARY

 COMMENTS:
 1. Compared to *.rec files QKL and REL are offset by 9 words e.g word 9 
    in *.recs  are bytes 0 and 1 in rel and ql

 2. Packet Sequence Number is 14 bits and rolls over at 16383. So this routine
    can only handle up to 16383 packets.  Since the typical *.REL file is
    about 4000 packets this should be OK.

 3. REL files have a FITS like header header that contains the start and 
    end times and the number of packets in the file.  Output REL files
    generated by this routine modify only the number of packets, start time 
    and end time

 4. REL files have a trailer that contains ???????

 for *.recs files
 standard lo-rate sci packet
 pacor time received in first 6 words
 word 0: sync 1A1
 word 1: year - 1900
 word 2: day of year (0 = Jan 1)
 word 3: hour
 word 4: minute
 word 5: second

 word 9: APID
 word 10: packet counter and TM mode (hi-bits)
 word 11: packet size
 word 12: TAI time
 word 13: TAI time
 word 14: TAI time
 word 15: subpacket hdr - hi-byte = word count lo-byte = type
 word 16: subpacket hdr - hi 2 bits = TM type, lo 14 bits = packet counter


REMOVE_CR

[List of Routines] (See ./data_anal/remove_cr.pro)

 NAME:
       REMOVE_CR 

 PURPOSE:
       Removes cosmic rays (and other bright pixels which are not stars). 

 PROCEDURE:
	Compares each pixel of crnt_im with the pixel in im1 where 
	a star would be if there was a star in that pixel. If the ratio
	exceeds 'threshold', then that pixel = median value of superpixel
	in the previous image.

 CALLING SEQUENCE:
       Result = REMOVE_CR(im1,h1,crnt_im,h2,again) 

 INPUTS:
       im1	(num)ARR	previous image
       h1	STRUCT		header from previous image
	crnt_im (num)ARR	current image
	h2	STRUCT		header from current image
	AGAIN	STRING 		'y' to prompt for ROI
	shrink	FLOAT		Factor by which the image is shrunk from 1024x1024

 KEYWORDS:
	ALL	remove cosmic rays AND stars
	INIT	define ROI on first time through
	SUMSTARS	Sum star images
	PF	Return point-filtered image

 Returned in Common block:
	N_CR	Returns number of pixels removed
 	COORDS	Returns coordinates of removed pixels


 OUTPUTS:
       crnt_im with cosmic rays removed is returned

 PROCEDURE:
 Compute point filtered image. Subtract point filtered image from current image (imdiff). 
 Subtract background image from point filtered image (bkgdiff).
 Compute std dev of each superpixel of bkgdiff. Candidate crays 
 and stars are where imdiff is greater than TWICE the interpolated standard deviation for each 
 superpixel of bkgdiff. For each candidate pixel, check in the previous image in a 5x5 box 
 where that pixel should have been if it was a star, based on a given star motion across 
 the FOV. If the maximum value from this box is less than the value of that pixel in the 
 current image minus the standard deviation of the superpixel from diff, than replace with 
 the median value of the superpixel of the previous image.



 MODIFICATION HISTORY:
               Written 12/23/98, N Rich - NRL/Interferometrics
	4/12/99 NBR	Use median-filtered image to check for CRs
	7/14/99 NBR	Fix problem when gaps in im1
	11/14/00 NBR	Add N_CR keyword, reduce_history common block; use point_filter
	11/21/00 NBR - Optimized for raw images
	12/28/00 NBR - Use C3clearmask2.fts for defining no-check area
	 7/19/01 NBR - Tinkering; using dn/sec images

 LIMITATIONS:
	- may remove comets, planets, etc. if not exempted by setting 
	  again to 'y' which calls the DEFROI routine

ersion = '@(#)remove_cr.pro	1.2 11/02/01'  ; NRL LASCO IDL LIBRARY


REPLACIMA.PRO

[List of Routines] (See ./las-c2/align1.pro)

 NAME:
	REPLACIMA.PRO
 PURPOSE:
         Select an interval of pixels values and replace these one by another
 CATEGORY:
	??
 CALLING SEQUENCE:
	REPLACIMA, IMA, minval, maxval, selectval
 INPUTS:
	ima                          image array (in memory)
       minval                       lower cuts value selected
       maxval                       higher cuts value selected
       selectval                    new value of pixels between lcuts & hcuts
 KEYWORD PARAMETERS:               
                                   None
 OUTPUTS:
          ima with the selected intervals replaced
 COMMON BLOCKS:
	None.
 SIDE EFFECTS:
	None
 RESTRICTIONS:

 PROCEDURE:
	Straightforward.
 MODIFICATION HISTORY:
	Written by M.B  v.1.0       LAS  12/13/93           


RESCALE

[List of Routines] (See ./display/rescale.pro)

 Project     : SOHO - LASCO

 Name        : 

 Purpose     : 

 Category    : 

 Explanation : 

 Syntax      : 

 Examples    : 

 Inputs      : None

 Opt. Inputs : None

 Outputs     : None

 Opt. Outputs: None

 Keywords    : None

 Common      : 

 Restrictions:                                  

 Side effects: Not known

 History     : Version 1, 02-Sep-1995, B Podlipnik. Written

 Contact     : BP, borut@lasco1.mpae.gwdg.de


RINTER

[List of Routines] (See ./las-c2/crosscorr.pro)


UNCTION RINTER, P, X, Y, DFDX, DFDY
+
 NAME:
	RINTER
 PURPOSE:
	Cubic interpolation of an image at a set of reference points
	points.   Optionally obtain the X and Y derivatives at 
	these points.    Used by the DAOPHOT PSF sequence but can also
	be for general cubic interpolation.

 CALLING SEQUENCE:
	Z = RINTER( P, X, Y, [ DFDX, DFDY ] )

 INPUTS:                 
	P  - Two dimensional data array, 
	X  - Either an N element vector or an N x M element array,
		containing X subscripts where cubic interpolation is desired.
	Y -  Either an N element vector or an N x M element arra, 
		containing Y subscripts where cubic interpolation is desired.

 OUTPUT:
	Z -  Result = interpolated vector or array.  If X and Y are vectors,
		then so is Z, but if X and Y are arrays then Z will be also.
		If P is DOUBLE precision, then so is Z, otherwise Z is REAL.

 OPTIONAL OUTPUT:
	DFDX - Vector or Array, (same size and type as Z), containing the 
		derivatives with respect to X
	DFDY - Array containing derivatives with respect to Y

 EXAMPLE:
	suppose P is a 256 x 256 element array and X = FINDGEN(50)/2. + 100.
	and Y = X.  Then Z will be a 50 element array, containing the
	cubic interpolated points.

 SIDE EFFECTS:
	can be time consuming.

 RESTRICTION:
	Interpolation is not possible at positions outside the range of 
	the array (including all negative subscripts), or within 2 pixel
	units of the edge.  No error message is given but values of the 
	output array are meaningless at these positions.

 PROCEDURE:
	invokes CUBIC interpolation algorithm to evaluate each element
	in Z at virtual coordinates contained in X and Y with the data
	in P.                                                          

 COMMON BLOCKS:
	If repeated interpolation of the same array is to occur, then
	one can save time by initializing the common block RINTER
 REVISION HISTORY:
	March 1988 written W. Landsman STX Co.
	Checked for IDL Version 2, J. Isensee, September, 1990
	Corrected call to HISTOGRAM, W. Landsman November 1990


ROI_SECTOR

[List of Routines] (See ./cme/roi_sector.pro)

 NAME:
	ROI_SECTOR

 PURPOSE:
	This function returns the 1D list of indices contained within
	the specified sector

 CATEGORY:
	CME

 CALLING SEQUENCE:
	Result = ROI_SECTOR (Hdr,R1,R2,T1,T2)

 INPUTS:
	Hdr:	Image header (LASCO header structure)
	R1:	Inner radius of the sector (in solar radii), from sun center
	R2:	Outer radius of the sector (in solar radii), from sun center
	T1:	Left hand boundary of the sector (in degrees)
	T2:	Right hand boundary of the sector (in degrees)

 KEYWORD PARAMETERS:
	PIXEL:	If set, the inner and outer radii are specified in pixels
	DRAW:	If set, the perimeter of the sector is drawn on the image

 OUTPUTS:
	This function returns the indices of the pixels contained within
	the sector as an array of long integers.

 COMMON BLOCKS:
	None

 SIDE EFFECTS:
	None

 RESTRICTIONS:

 PROCEDURE:
	A sector is defined as the region bounded by two radial lines 
	(from sun center) at two position angles and the annulus (centered 
	on the sun) at two heights.

	The pixel coordinates of the inner and outer boundaries of the 
	annulus are computed at one degree increments from one position
	angle to the next.  Correction is made if the sector spans the
	North pole (where the position angle is 0/360).

	POLYFILLV is used to fill in the indices from the definition of
	the boundary.

	The image header is used in determining the sun center and the 
	number of pixels per radius.

 CALLED ROUTINES:
	GET_SUN_CENTER, GET_SOLAR_RADIUS, POLYFILLV

 EXAMPLE:
	To obtain the indices of a sector from 5 to 10 solar radii and
	position angles 270 to 280.  Note that the left hand boundary
	as viewed from the sun is 280 and the right hand boundary is 270.
	The outline of the sector is drawn on the display

	Result = ROI_SECTOR(hdr,5,10,280,270,/draw)

 MODIFICATION HISTORY:
 	Written by:	RA Howard, NRL, 2 December 1997

	@(#)roi_sector.pro	1.1 03/14/98 LASCO IDL LIBRARY


ROLL_TIMES

[List of Routines] (See ./data_anal/roll_times.pro)

 NAME:
	ROLL_TIMES

 PURPOSE:
	Returns dates/times of time periods when SOHO is rolled in TAI seconds

 CATEGORY:
	Attitude

 CALLING SEQUENCE:
	roll_times,stautc,enutc

 INPUTS:
	None

 OUTPUTS:
    Double-arrays of seconds (times)
  stautc	Start times of roll periods
  enutc	End times of roll periods
	
 KEYWORD PARAMETERS:


 MODIFICATION HISTORY:
 	Written by:	Nathan Rich, NRL/Interferometrics - 20 Nov. 2001

	@(#)roll_times.pro	1.1, 11/30/01 LASCO IDL LIBRARY


ROUTINE_NAME

[List of Routines] (See ./template.pro)

 NAME:
	ROUTINE_NAME

 PURPOSE:
	Tell what your routine does here.  I like to start with the words:
	"This function (or procedure) ..."
	Try to use the active, present tense.

 CATEGORY:
	Put a category (or categories) here.  For example:
	Widgets.

 CALLING SEQUENCE:
	Write the calling sequence here. Include only positional parameters
	(i.e., NO KEYWORDS). For procedures, use the form:

	ROUTINE_NAME, Parameter1, Parameter2, Foobar

	Note that the routine name is ALL CAPS and arguments have Initial
	Caps.  For functions, use the form:
 
	Result = FUNCTION_NAME(Parameter1, Parameter2, Foobar)

	Always use the "Result = " part to begin. This makes it super-obvious
	to the user that this routine is a function!

 INPUTS:
	Parm1:	Describe the positional input parameters here. Note again
		that positional parameters are shown with Initial Caps.

 OPTIONAL INPUTS:
	Parm2:	Describe optional inputs here. If you don't have any, just
		delete this section.
	
 KEYWORD PARAMETERS:
	KEY1:	Document keyword parameters like this. Note that the keyword
		is shown in ALL CAPS!

	KEY2:	Yet another keyword. Try to use the active, present tense
		when describing your keywords.  For example, if this keyword
		is just a set or unset flag, say something like:
		"Set this keyword to use foobar subfloatation. The default
		 is foobar superfloatation."

 OUTPUTS:
	Describe any outputs here.  For example, "This function returns the
	foobar superflimpt version of the input array."  This is where you
	should also document the return value for functions.

 OPTIONAL OUTPUTS:
	Describe optional outputs here.  If the routine doesn't have any, 
	just delete this section.

 COMMON BLOCKS:
	BLOCK1:	Describe any common blocks here. If there are no COMMON
		blocks, just delete this entry.

 SIDE EFFECTS:
	Describe "side effects" here.  There aren't any?  Well, just delete
	this entry.

 RESTRICTIONS:
	Describe any "restrictions" here.  Delete this section if there are
	no important restrictions.

 PROCEDURE:
	You can describe the foobar superfloatation method being used here.
	You might not need this section for your routine.

 EXAMPLE:
	Please provide a simple example here. An example from the PICKFILE
	documentation is shown below.

	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:	Your name here, Date.
	July, 1994	Any additional mods get described here.  Remember to
			change the stuff above if you add a new keyword or
			something!

	%W% %H% LASCO IDL LIBRARY


RT

[List of Routines] (See ./movie/rt.pro)

RO RT, tele, RUNNING_DIFF=running_diff, FFV=ffv, LENGTH=length, SKIP=skip

 Procedure to call RTMVIPLAY to play real-time movie

 INPUTS:

 tele:	'eit_195'
	'eit_304'
	'eit_171'
	'eit_284'
	'c1_fexiv'
	'c2'
	'c3'

 KEYWORDS:
  /FFV  for full resolution images (default is 1/2 resolution  ex. 512x512)
  /LENGTH	Set equal to desired length of movie
  /SKIP	Skip every other frame

 Example:  IDL> rt, 'c2'

 MODIFIED:
	nbr, 11/9/01 - Add documentation in header
       Karl, 7/26/04 -- change gif_dir path

	@(#)rt.pro	1.6, 07/26/04 - IDL NRL LASCO Library


RTMOVIE

[List of Routines] (See ./movie/rtmovie.pro)

 Project     : SOHO - LASCO/EIT
                   
 Name        : RTMOVIE
               
 Purpose     : Display movie of images as they are received in real time at the EOF.
               
 Explanation : Starts a movie of the previous 48 (~2 days) images.  As new images
		are received at the EOF they are added to the movie in time order.
               
 Use         : IDL> RTMOVIE [, telescope, num_frames, /MPEG ]

 Optional Inputs:
	        telescope   ;string 'c2' or 'c3'  -  default is 'c2'
	        num_frames  ;integer number of images to load  -  default is 48

 Keywords    : /MPEG ;will write out new .mvis and mpeg movies every time a new image is received.

 Calls       : 

 Comments    : Must be running IDL on a machine at the EOF or have /net/lasco6/data mounted.
               
 Side effects: None.
               
 Category    : Image Display.  Animation.
               
 Written     : Scott Paswaters, NRL Dec. 2 1996.
               
 Version     : RAH, NRL, 2/18/97  Mods for computation of center
               SEP, NRL, 3/25/97  Save .mvi files

	@(#)rtmovie.pro	1.5 09/12/97 LASCO IDL LIBRARY


RTMVI

[List of Routines] (See ./movie/rtmvi.pro)

 Project     : SOHO - LASCO/EIT
                   
 Name        : RTMVI
               
 Purpose     : Write GIF images as they are received in real time.
               
 Use         : IDL> RTMVI [, /MPEG, /TV, CAM=['c2','c3','eit','eit_195','eit_171','eit_284','eit_304']]

 Inputs      : None

 Optional Inputs: None

 Outputs     : GIF, JPG, MPG files

 Keywords    :
	NOMPEG	Does not generate .mpg files, and exits after finishing one cycle through all cameras.
	TV	Generate and save GIFs in videodir
	CAM	Set equal to one telescope to process
	DEBUG	Write file transfer durations to ~/cmd_times.lst and certain event times to ~/rt_times.lst
	MPEG_ONLY	Does not generate gif or jpeg images

 Calls       : $SSW/soho

 Comments    : Must be running IDL on a machine with /net/lasco6/data mounted.
		Must setenv RTMVI (replaces MVIS), QL_IMG, WEBDIR, LAST_IMG
               
 Side effects: None.
               
 Category    : Image Display.  Animation.

 Written     : Scott Paswaters, NRL Dec. 2 1996.
               
 Version     : RAH, NRL, 2/18/97  Mods for computation of center
		SEP, NRL, 3/25/97  Save .mvi files
		RAH, NRL, 2/04/98  EIT normalization box changed to bottom of image, and AL +1 filter
				   added as a valid option for the filter wheel (in addition to clear)
		SEP, NRL, 4/06/98  Changed to write GIF images instead of MVI files
		NBR, NRL, 3/22/99  Write JPEG images also
		NBR, NRL, 4/21/99  Fix removal of old JPEG images
		NBR, NRL, 5/17/99  Add RTMVI_COMMON_IMG block; utilize FIXGAPS keyword
		NBR, NRL, 5/27/99  Add /NOMPEG keyword
		DW,  NRL, 6/11/99  Add mpeg_dir variable
		NBR, NRL, 7/22/99  Change call for GIF2JPG24
		NBR, NRL, 7/23/99  Changed mpeg_dir
		NBR, NRL, 8/6/99   Add 13 day mpeg
		DW,  NRL, 8/09/99  Add nrl_mpeg_dir variable
		NBR, NRL, Sep 1999 Reduce TIMER settings; Change movie making interval to 3 hours;
				   Move NOMPEG keyword action
		DW , NRL, 8 Sep 1999 Check each movie directory for old files
		NBR, NRL, 9/20/99  Change order of cameras; Add CAM keyword
		NBR, NRL,  Jan 2000  Make daily mpegs; chmod daily mpg
		NBR, NRL,  Feb 2000  GOTO, next instead of do_movies
		NBR, NRL,  Mar 2000  EIT option for CAM keyword
		NBR, NRL,  May 2000  Add VIDEO and PICT outputs
		NBR, NRL,  Aug 2000  Skip files where exptime LT 6 (to omit C3 Clear of about 5.3sec)
		NBR, NRL, 3/22/01 - Make RT EIT movies (108 frames > 2 days long)
		NBR, NRL, 3/29/01 - Add quit button
		NBR, NRL, 4/9/01  - Skip bad images; do not copy to lasco6
		NBR, NRL, 5/17/01 - Add TV keyword; implement env var usage; disable daily mpg
		GW, NRL, 7/24/01 - Use EIT_PREP
		NBR, NRL, 7/31/01 - Use $LAST_IMG for txtfile
		NBR, NRL, 8/ 6/01 - Set last_ptr for reading txtfile and add
					to common block
		NBR, NRL, 9/ 4/01 - Comment out daily movie part of WRTMVI_EVENT
		jake, NRL, 011220 -	fix indentation of code with TABS
							fix CAPITALIZATION
							began writing WRTMVI_DIFF
		jake, NRL, 020104 - adding diff mpegs
		NBR, NRL, 5/ 1/02 - CD,'' in wrtmvi_event
		nbr, nrl,10/11/02 - Add days2save variable; set at 4; add xtra=2 for C2 and C3
		jake, NRL, 021022 - changed s_file to include differential gifs
		jake, NRL, 021022 - changed s_file back and d_file
		jake, NRL, 021023 - modified RTMVI_COMMON to include d_file
		jake, NRL, 021209 - adding messages to console again, bc somehow got removed
		jake, NRL, 030117 - making Diff stuff every 8 hrs instead of 4 hrs.
		NBR, NRL,  030124 - Allow half-res C2 and C3
		jake, NRL, 030213 - made wrtmvi_diff check last made dif-gif, not first
		jake, NRL, 030227 - making Diff stuff every 24 hrs instead of 8 hrs.
						using RTMVI instead of MVI to keep hera out of loop
		jake, NRL, 030228 - changing to 12 instead of 24, because 24 doesn't work right
		jake, NRL, 030303 - changed back to 24
		jake, NRL, 030303 - added "l" after last 60 because was overflowing variable
		jake, NRL, 030304 - added touch diffs routine to try to keep diffs near midnight only
		jake, NRL, 030321 - added some code to begin archiving 13day realtime mpegs
		jake, NRL, 030414 - modified 13day archive code because difference between
				UTC and local time was sometimes causing 2 files to be saved.
		jake, NRL, 030430 - added WRITE_PNG so can use idl56
		jake, NRL, 030807 - diff image creation begins at 10PM now
		jake, NRL, 030807 - preserving last 100 LASCO images to avoid all realtime gifs
							from being deleted in times with no telemetry
		nbr, NRL, 030912 - Add t argument to WRTMVI_DIFF; increase logging; edit use of first_mvi
		nbr, NRL, 030929 - add debugset to common block; more logging
		nbr, NRL, 031024 - add dompegset, no_img_set to common block; keyword MPEG_ONLY
		nbr, NRL, 031028 - Use n2save to determine how many to delete, set to 200 (*2 for EIT195)
		nbr, NRL, 031030 - Eliminate widgets and make RTMVI a function
		nbr, NRL, 031105 - Fix tai_old bug in WRTMVI_DIFF
               nbr, NRL, 031222 - Change running_diff implementation: rdiff image is computed in make_image_*.pro
               KB, NRL,  040607 - Mods at line 746-ish and 980-ish
		KB, NRL,  040609 - Add missed_count to rtmvi_common. Attempt at fixing 'skipped images' problem.
		KB, NRL,  040610 - Edit line 983 -- stop procedure from looking in wrong directory for some c3 files
		KB, NRL,  040616 - Add code to force a reprocess when GT 8 images are skipped (line 752)
		KB, NRL,  040706 - Tweaked to make sure "skipped image" problem is finally solved...
               KB, NRL,  040929 - Filter out long exposure images


	@(#)rtmvi.pro	1.69 12/22/03 :LASCO IDL LIBRARY


RTMVI020102

[List of Routines] (See ./movie/rtmvi020102.pro)

 Project     : SOHO - LASCO/EIT
                   
 Name        : RTMVI
               
 Purpose     : Write GIF images as they are received in real time.
               
 Use         : IDL> RTMVI [, /MPEG, /TV, CAM=['c2','c3','eit','eit_195','eit_171','eit_284','eit_304']]

 Inputs      : None

 Optional Inputs: None

 Outputs     : GIF, JPG, MPG files

 Keywords    :
	NOMPEG	Does not generate .mpg files, and exits after finishing one cycle through all cameras.
	TV	Generate and save GIFs in videodir
	CAM	Set equal to one telescope to process
	DEBUG	Write file transfer durations to ~/cmd_times.lst and certain event times to ~/rt_times.lst

 Calls       : $SSW/soho

 Comments    : Must be running IDL on a machine with /net/lasco6/data mounted.
		Must setenv MVIS, QL_IMG, WEBDIR, LAST_IMG
               
 Side effects: None.
               
 Category    : Image Display.  Animation.
               
 Written     : Scott Paswaters, NRL Dec. 2 1996.
               
 Version     : RAH, NRL, 2/18/97  Mods for computation of center
               SEP, NRL, 3/25/97  Save .mvi files
               RAH, NRL, 2/04/98  EIT normalization box changed to bottom of image, and AL +1 filter
				   added as a valid option for the filter wheel (in addition to clear)
               SEP, NRL, 4/06/98  Changed to write GIF images instead of MVI files
		NBR, NRL, 3/22/99  Write JPEG images also
		NBR, NRL, 4/21/99  Fix removal of old JPEG images
		NBR, NRL, 5/17/99  Add RTMVI_COMMON_IMG block; utilize FIXGAPS keyword
		NBR, NRL, 5/27/99  Add /NOMPEG keyword
		DW,  NRL, 6/11/99  Add mpeg_dir variable
		NBR, NRL, 7/22/99  Change call for GIF2JPG24
		NBR, NRL, 7/23/99  Changed mpeg_dir
		NBR, NRL, 8/6/99   Add 13 day mpeg
		DW,  NRL, 8/09/99  Add nrl_mpeg_dir variable
		NBR, NRL, Sep 1999 Reduce TIMER settings; Change movie making interval to 3 hours;
				   Move NOMPEG keyword action
               DW , NRL, 8 Sep 1999 Check each movie directory for old files
		NBR, NRL, 9/20/99  Change order of cameras; Add CAM keyword
		NBR, NRL,  Jan 2000  Make daily mpegs; chmod daily mpg
		NBR, NRL,  Feb 2000  GOTO, next instead of do_movies
		NBR, NRL,  Mar 2000  EIT option for CAM keyword
		NBR, NRL,  May 2000  Add VIDEO and PICT outputs
		NBR, NRL,  Aug 2000  Skip files where exptime LT 6 (to omit C3 Clear of about 5.3sec)
		NBR, NRL, 3/22/01 - Make RT EIT movies (108 frames > 2 days long)
		NBR, NRL, 3/29/01 - Add quit button
		NBR, NRL, 4/9/01  - Skip bad images; do not copy to lasco6
		NBR, NRL, 5/17/01 - Add TV keyword; implement env var usage; disable daily mpg
		GW, NRL, 7/24/01 - Use EIT_PREP
		NBR, NRL, 7/31/01 - Use $LAST_IMG for txtfile
		NBR, NRL, 8/ 6/01 - Set last_ptr for reading txtfile and add
					to common block
		NBR, NRL, 9/ 4/01 - Comment out daily movie part of WRTMVI_EVENT

 %H% %W% :LASCO IDL LIBRARY


RTMVIPLAY

[List of Routines] (See ./movie/rtmviplay.pro)

 Project     : SOHO - LASCO/EIT

 Name        : RTMVIPLAY

 Purpose     : Widget tool to display animation sequence from gif files.

 Explanation : This tool allows the user to view a series of gif images as
               an animation sequence.  The user can control the direction,
               speed, and number of frames with widget controls.  A directory
		is monitored for new images and they are added to the movie
		in time order.

 Use         : IDL> RTMVIPLAY, match, LENGTH=length, GIF_DIR=gif_dir, IMG_REBIN=img_rebin, 
 			RUNNING_DIFF=running_diff

 Inputs      : match : string to use to match gif files to load.
	           ex : RTMVIPLAY, 'c1_fexiv'
	           ex : RTMVIPLAY, 'c2'
	           ex : RTMVIPLAY, 'c3'
	           ex : RTMVIPLAY, 'eit_195'
	           ex : RTMVIPLAY, 'eit_304'
	           ex : RTMVIPLAY, 'eit_171'
	           ex : RTMVIPLAY, 'eit_284'

 Outputs     : None.

 Keywords    : 
               LENGTH=length     : maximum number of frames to load (default is all).
               GIF_DIR=gif_dir   : directory to read gif images from (default is $MVIS/rtmovie/gifs/ 
                                   or current directory if $MVIS doesn't exist)**
                                   **New default is /net/solardata/sd4/rtmovie/gifs/  -- KB
               IMG_REBIN=img_rebin  : set to dimensions to rebin (or congrid) images to
				     : ex. IMG_REBIN=[512,512]
               /RUNNING_DIFF     : set this flag for a running difference movie

 Calls       :

 Side effects: None.

 Category    : Image Display.  Animation.

 Written     : Scott Paswaters, NRL Apr. 8 1998.

 MODIFIED:
	A. Vourlidas, 11/9/01 - Put WRUNMOVIEM_RT button in widget
	N. Rich, 11/14/01 - CD to olddir if calling wrunmoviem_rt
       Karl B  7/26/04 - changed gif directory to solardata instead of $MVIS
       Karl B  7/26/04 - changed mvidir to /net/mercury/mvi/


 See Also    : MKMOVIE.PRO

       @(#)rtmviplay.pro	1.8, 07/26/04 - NRL LASCO IDL LIBRARY


RTMVIPLAYPNG

[List of Routines] (See ./movie/rtmviplaypng.pro)

 Project     : SOHO - LASCO/EIT

 Name        : RTMVIPLAYPNG

 Purpose     : Widget tool to display animation sequence from png files.

 Explanation : This tool allows the user to view a series of png images as
               an animation sequence.  The user can control the direction,
               speed, and number of frames with widget controls.  A directory
		is monitored for new images and they are added to the movie
		in time order.

 Use         : IDL> RTMVIPLAYPNG, match, LENGTH=length, PNG_DIR=png_dir, IMG_REBIN=img_rebin, 
 			RUNNING_DIFF=running_diff

 Inputs      : match : string to use to match png files to load.
	           ex : RTMVIPLAYPNG, 'c1_fexiv'
	           ex : RTMVIPLAYPNG, 'c2'
	           ex : RTMVIPLAYPNG, 'c3'
	           ex : RTMVIPLAYPNG, 'eit_195'
	           ex : RTMVIPLAYPNG, 'eit_304'
	           ex : RTMVIPLAYPNG, 'eit_171'
	           ex : RTMVIPLAYPNG, 'eit_284'

 Outputs     : None.

 Keywords    : 
               LENGTH=length     : maximum number of frames to load (default is all).
               PNG_DIR=png_dir   : directory to read png images from (default is $MVIS/rtmovie/pngs/ 
                                   or current directory if $MVIS doesn't exist)
               IMG_REBIN=img_rebin  : set to dimensions to rebin (or congrid) images to
				     : ex. IMG_REBIN=[512,512]
               /RUNNING_DIFF     : set this flag for a running difference movie

 Calls       :

 Side effects: None.

 Category    : Image Display.  Animation.

 Written     : Scott Paswaters, NRL Apr. 8 1998.

 MODIFIED:
	A. Vourlidas, 11/9/01 - Put WRUNMOVIEM_RT button in widget
	N. Rich, 11/14/01 - CD to olddir if calling wrunmoviem_rt
	jake 030430 - created RTMVIPLAYPNG from RTMVIPLAY
				changed all GIF to PNG
	jake 030509 - idl53 needs pngs rotated


 See Also    : MKMOVIE.PRO

       @(#)rtmviplaypng.pro	1.2, 05/09/03 - NRL LASCO IDL LIBRARY


RTPNG

[List of Routines] (See ./movie/rtpng.pro)

RO RTPNG, tele, RUNNING_DIFF=running_diff, FFV=ffv, LENGTH=length, SKIP=skip

 Procedure to call RTMVIPLAY to play real-time movie

 INPUTS:

 tele:	'eit_195'
	'eit_304'
	'eit_171'
	'eit_284'
	'c1_fexiv'
	'c2'
	'c3'

 KEYWORDS:
  /FFV  for full resolution images (default is 1/2 resolution  ex. 512x512)
  /LENGTH	Set equal to desired length of movie
  /SKIP	Skip every other frame

 Example:  IDL> rt, 'c2'

 MODIFIED:
	nbr, 11/9/01 - Add documentation in header
	jake 030430 - created rtpng from rt
				change all GIF to PNG

	@(#)rtpng.pro	1.1, 05/01/03 - IDL NRL LASCO Library


RT_CARRMAPMAKER

[List of Routines] (See ./synoptic/rt_carrmapmaker.pro)

unction rt_carrmapmaker, yymmdd, num_r, rad, limb, wlimb, hdr, disp, saveset, nextrot


PURPOSE: 
	Restores partially finished Carrington Maps for a given limb/camera 
	and appends the passed day's worth of images.

INPUTS:
	yymmdd	STRING:	date
	num_r	INT:	number of radii to make maps for-passed empty
	rad	FLTARR(num_r):		radii for maps-passed empty
	cmap	FLTARR(mapsize,181,num_r):	passed undefined
	limb	INTARR:	0 or 1 tells which limb for carrdate procedure
	disp	INT:	1 to display images
	wlimb	STRING:	'wl' or 'el'
	hdr	STRUCT: dummy header sent back to carrmap3 for fits header
	saveset	STRING:	filename of saved set of carrmapmaker
	nextrot	INT	1 if going on to the next rotation


 OUTPUTS:	rad = fltarr(num_r)	:	radii of maps
		num_r	: number of radii
		RESULT = fltarr(mapsize,181,num_r):	carrington maps, one per radius
		

ROUTINES CALLED:
    carrdate2.pro
    getc2c3norm2.pro
    savestrips.pro

 AUTHOR:	Nathan Rich, NRL, Nov. 1996
		Julia Kraemer, NRL, June 7, 1996

 MODIFIED:
	11/12/98 NBR	modified from carrmapmaker2.pro
	12/09/98 NBR	do cn=cn+1 in beginning
	04/16/99 NBR	make into a function
	06/08/99 NBR	Put check for m LE 0 (median)
	11/23/99 NBR	Change strip end skip criteria
	02/2000  NBR	GET_BKG=2 for any_year
	12/17/01 NBR	Use GET_BKG=1 for current year

 12/17/01, @(#)rt_carrmapmaker.pro	1.2


SC

[List of Routines] (See ./display/gammasca.pro)

 NAME:  
	SC

 PURPOSE:
	To convert a numerical value in a string cutting all
	trailing blanks (performed with STRCOMRESS)

 CATEGORY:
	PICO

 CALLING SEQUENCE:
	result=SC(value)

 INPUTS:
	value:  The numerical value to be converted into a
		string. This might also be a vector (one
		dimensional array)

 OPTIONAL INPUTS:
	None

 KEYWORD PARAMETERS:
	DECIMALS: gives the number of decimals returned in 
		the string. Numbers are rounded.
	SIGNIFICANT: gives the number of significant digits.
		The number of decimals is automatically de-
		termined.
       FIELD:  The number of characters in the output string
               result. If the number can not be displayed
               with the number of characters, asterisks are
               returned (as in FORTRAN); If field is greater
               than the number of characters, blanks are added
               in front of the string so that the string 
               always ends with a character.

 OUTPUTS:
	result: The string without any leading or trailing
	blank

 OPTIONAL OUTPUTS:
	None

 EXAMPLE:
	To print the result of a calculation execute
	print,'The result is: '+SC(result,DEC=3)

       Or: print a number with a width of 5 characters:
       print, SC(13,FIELD=5) -> '   13'
       print, SC(100000,FIELD=3) -> '**'

 COMMON BLOCKS:
	None

 SIDE EFFECTS:
	Unknown

 RESTRICTIONS:
	None

 PROCEDURE:
	Straightforward. For Vectors recursive calls are
	executed

 MODIFICATION HISTORY:
	Alo Epple, 31-AUG-1994
	Extension for vectors 4-MAY-1995 MPAe Lindau


SCALE_ROTATE

[List of Routines] (See ./data_anal/scale_rotate.pro)

 NAME:  
            SCALE_ROTATE  
  
 PURPOSE:  
            This function moves, scales and rotates an
            image to a new position and plate scale   
            factor.  
  
 CATEGORY:  
            ANALYSIS  
  
 CALLING SEQUENCE:  
            Result = SCALE_ROTATE (Img,Roll,  
                                   Oldscale,Xcen,Ycen,
                                   Newscale,Newxcen,Newycen)
  
 INPUTS:  
            Img:      Input image array  
            Roll:     Angle between solar north and the top
                      of the image measured eastward (radians)
            Oldscale: Plate scale (arc sec/pixel) of input image
            Xcen:     Column of sun center of input  
            Ycen:     Row of sun center of input  
            Newscale: Plate scale (arc sec/pixel) of output image
            Newxcen:  Column of sun center to move to  
            Newycen:  Row of sun center to move to  
  
 OPTIONAL INPUTS:  
            None  
  
 KEYWORD PARAMETERS:  
            Xsize:  Number of columns in output image  
                    Default is input image  
            Ysize:  Number of rows in output image  
                    Default is input image  
  
 OUTPUTS:  
            Result: The scaled and rotated image  
  
 OPTIONAL OUTPUTS:  
            None  
  
 COMMON BLOCKS:  
            None  
  
 SIDE EFFECTS:  
            None  
  
 RESTRICTIONS:  
  
 PROCEDURE:  
  
 EXAMPLE:  
  
 MODIFICATION HISTORY:  
       Written by:     RA Howard, NRL, 27 Nov 1995.  
 
 @(#)scale_rotate.pro	1.2 05/14/97 :NRL Solar Physics


SCAN4LIMB

[List of Routines] (See ./display/scan4limb.pro)

 Project     : SOHO - LASCO

 Name        : 

 Purpose     : 

 Category    : 

 Explanation : 

 Syntax      : 

 Examples    : 

 Inputs      : None

 Opt. Inputs : None

 Outputs     : None

 Opt. Outputs: None

 Keywords    : None

 Common      : 

 Restrictions:                                  

 Side effects: Not known

 History     : Version 1, 02-Sep-1995, B Podlipnik. Written

 Contact     : BP, borut@lasco1.mpae.gwdg.de


SCAN_PROFILE

[List of Routines] (See ./data_anal/scan_profile.pro)

 NAME: SCAN_PROFILE

 PURPOSE:
	This function returns the values of the Img in a straight line between
	the end points specified by P0 and P1.

 CATEGORY:
	LASCO ANALYSIS

 CALLING SEQUENCE:
	Result = SCAN_PROFILE(Img,P0,P1,Col,Row)

 INPUTS:
	Img:	A 2-D array containing the image intensities
	P0:	A 2 element array containing the column and row 
		values of one of the end points
	P1:	A 2 element array containing the column and row 
		values of the other end point

 OUTPUTS:
	Result:	An array containing the scan profile from P0 to P1

 OPTIONAL OUTPUTS:
	COL:	An array containing the image column values,
		where the Function result has been computed.
	ROW:	An array containing the image row values,
		where the Function result has been computed.


 MODIFICATION HISTORY:
 	Written by:	RA Howard, 17 Mar 1996
 
 @(#)scan_profile.pro	1.2 05/14/97 :NRL Solar Physics



SCAN_SC_HDR

[List of Routines] (See ./packets/scan_sc_hdr.pro)

 NAME:
	SCAN_SC_HDR

 PURPOSE:
	This procedure identifies the subpacket headers in the science packets

 CATEGORY:
	LASCO PACKETS

 CALLING SEQUENCE:
	SCAN_SC_HDR,Sc

 INPUTS:
	Sc:	A 2D byte array of the packet data as read in by
		READ_TM_PACKET

 OUTPUTS:
	This procedure writes the subpacket information to a file in 
	the current directory.  The file name is scan_YYYY-MM-DD,
	where the date is today's date.

 PROCEDURE:
	The science packet is scanned for the 4-byte subpacket headers.
	The first byte is the number of 2-byte data words in the 
	subpacket.  The second byte is the subpacket type.  The 
	packet data are only valid when the OBE is running.  WHen
	OBE is not running the packets will contain 'FF'X.

 MODIFICATION HISTORY:
 	Written by:	R.A. Howard, NRL, 1993
	Sep, 1999	RAH, The input data is now a byte array

	@(#)scan_sc_hdr.pro	1.4 09/08/99 LASCO IDL LIBRARY


SELECTD

[List of Routines] (See ./display/selectd.pro)

 Project     : SOHO - LASCO/EIT

 Name        : SELECTD

 Purpose     : Select images on date

 Category    : Utils

 Explanation : From a list of FITS files header is read and a keyword DATE-OBS
		  is checked .

 Syntax      : result = selectd ( files, start_date, end_date )

 Examples    :

 Inputs      : STRARR files : list with FITS files to be checked
		  STRING start_date, end_date in form : "95-MAR-8" 

 Opt. Inputs : None.

 Outputs     : STRARR result with a list of FITS files found.

 Opt. Outputs: None.

 Keywords    : None. 

 Common      : None.

 Restrictions: None.

 Side effects: None.

 History     : 22 mar 1995,Borut Podlipnik,MPAe,Written

 Contact     : BP, borut@lasco1.mpae.gwdg.de
 

 Calls       : anytim2utc(), grep(), headfits()


SETUP

[List of Routines] (See ./display/setup.pro)

 Project     : SOHO - LASCO

 Name        : 

 Purpose     : 

 Category    : 

 Explanation : 

 Syntax      : 

 Examples    : 

 Inputs      : None

 Opt. Inputs : None

 Outputs     : None

 Opt. Outputs: None

 Keywords    : None

 Common      : 

 Restrictions:                                  

 Side effects: Not known

 History     : Version 1, 02-Sep-1995, B Podlipnik. Written

 Contact     : BP, borut@lasco1.mpae.gwdg.de


SETUP_ASTROM

[List of Routines] (See ./astrometry/ephemeris/setup_astrom.pro)

 PROJECT:
      SOHO - LASCO
 NAME:
      SETUP_ASTROM
 PURPOSE:
      Set up FITS-type astrometry structure in CD format for any
      of the LASCO telescopes.
 CALLING SEQUENCE:
      setup_astrom, telescope, astrom
 INPUTS:
      telescope: string containing telescope name.
      sunephem: structure containing solar ephemeris information
                (obtained from sohoephem.pro).
      naxis1: no. of pixels in horizontal direction.
      naxis2: no. of pixels in vertical direction.
 OUTPUTS:
      astrom: Anonymous structure containing astrometry info in FITS
              CD format.
 OPTIONAL INPUTS:
      ocentre: Two-element vector giving pixel location of centre of
               occulting disk (defaults to image centre).
      pscale: Scalar giving plate scale in arcsec/pixel (defaults to
              nominal value for specified telescope.
      vangle: Scalar giving angle of image vertical (Y-axis) from
              solar north in degrees (defaults to zero).
 PROCEDURE:
      Straightforward.
 RESTRICTIONS:
      Assumes nominal values for astrometry parameters for each
      telescope (i.e. solar north is straight up, Sun at centre of
      occulter and nominal values for plate scale).
      Intended to be called from another routine (e.g. starfield.pro).
 MODIFICATION HISTORY:
      Written by Simon Plunkett, February 1996.
	2003.08.18, nbr - Add latpole to astrom structure to make compatible 
			with SSW; add sccs version
   @(#)setup_astrom.pro	1.2 08/18/03 - LASCO NRL IDL Library


SHANDLE

[List of Routines] (See ./display/shandle.pro)

 Project     : SOHO - LASCO

 Name        : 

 Purpose     : 

 Category    : 

 Explanation : 

 Syntax      : 

 Examples    : 

 Inputs      : None

 Opt. Inputs : None

 Outputs     : None

 Opt. Outputs: None

 Keywords    : None

 Common      : 

 Restrictions:                                  

 Side effects: Not known

 History     : Version 1, 14-May-1996, B Podlipnik. Written

 Contact     : BP, borut@lasco1.mpae.gwdg.de


SHARPEN

[List of Routines] (See ./util/sharpen.pro)

 NAME:
	SHARPEN

 PURPOSE:
	Sharpens a ratio image by adding in a small amount of an edge enhanced image

 CATEGORY:
	LASCO UTIL

 CALLING SEQUENCE:
	Result = SHARPEN(Img,Bkg,factor)

 INPUTS:
	Img:	Input image in DN/sec
	Bkg:	Background image in DN/sec
	Factor:	Factor of edge enhanced image to add to original image, Default is .015

 KEYWORD PARAMETERS:
	PF:	Point filter factor, default is 4
	BOX_SIZE:	Size of box to use in unsharp mask.  Default is 11 points
	NO_RATIO:	Return straight edge-enhanced image

 OUTPUTS:
	This function returns the edge enhance ratio image as a real number.

 SIDE EFFECTS:

 RESTRICTIONS:

 PROCEDURE:
	The procedure to enhance an image adds a little edge enhancement to the original image.

	First the image (in DN/sec) is point filtered to remove the stars and cosmic rays.

	Then the unsharp mask image is formed with the original image and the background
	image.  The edge enhanced image is the difference between the unsharp mask of
	the original image and the background image.  The difference is performed to remove
	any artifacts such as stray light arcs that are in both the original and background images.

	The ratio image is computed and the missing blocks are set to 1.0.

	The edge enhanced image is computed as:
		(Img/Bkg) + factor*edge_enhanced_image 

 EXAMPLE:

 MODIFICATION HISTORY:
 	Written by:	RAH, 20 Apr 98
	99/10/27, N Rich	Add NO_RATIO keyword

	%W% %H% LASCO IDL LIBRARY


SIGMA_MASK

[List of Routines] (See ./exposure/sigma_mask.pro)

 NAME:
	sigma_mask
 PURPOSE:
	Computes the mean and standard deviation of pixels in a box
	centered at  
	each pixel of the image, but excluding the center pixel. If the center 
	pixel value exceeds some # of standard deviations from the mean, it is 
	flagged. Note option to process pixels on
	the edges.
	
 CALLING SEQUENCE:
	Result = sigma_mask( image, box_width, N_sigma=(#), /ALL,/MON )
 INPUTS:
	image = 2-D image (matrix)
	box_width = width of square filter box, in # pixels (default = 3)
 KEYWORDS:
	N_sigma - # standard deviations to define outliers, floating point,
			recommend > 2, default = 3. For gaussian statistics:
			N_sigma = 1 flags 35% of pixels, 2 = 5%, 3 = 1%.
	RADIUS - alternative to specify box radius, so box_width = 2*radius+1.
      /ALL_PIXELS causes computation to include edges of image,
      /MONITOR prints information about % pixels replaced.
 Optional Outputs:
	N_CHANGE - # of pixels flagged (mask = 0)
	VARIANCE - image of pixel neighborhood variances * (N_sigma)^2,
	DEVIATION - image of pixel deviations from neighborhood means,
	squared.
	OUTBOX - Size of box to return flagged around any marked pixel
                (default 1)
 CALLS:
	function filter_image( )
 PROCEDURE:
	Compute mean over moving box-cars using smooth, subtract center values,
	compute variance using smooth on deviations from mean,
	check where pixel deviation from mean is within variance of
	box.
	Return a mask array with ones where the deviation is less than
	the specified amount and zeros for the points outside the range.
	
 MODIFICATION HISTORY:
	Derived from Frank Varosi's SIGMA_FILTER routine. Mar 1996, SJT.


SIMCIRCLE

[List of Routines] (See ./las-c2/simcircle.pro)

unction round1,var
 ;; by JP.L & M.B at LAS : 02/11/94
 ;;Arrondit la variable a la valeur la plus proche


SLIDE_IMAGEF

[List of Routines] (See ./display/slide_imagef.pro)

 NAME:
	SLIDE_IMAGEf

 PURPOSE:
	Create a scrolling graphics window for examining large images.
	By default, 2 draw widgets are used.  The left draw widget shows
	a reduced version of the complete image, while the draw widget on
	the right displays the actual image with scrollbars that allow sliding
	the visible window.

 CALLING SEQUENCE:
	SLIDE_IMAGE [, Image]

 INPUTS:
	Image:	The 2-dimensional image array to be displayed.  If this 
		argument is not specified, no image is displayed. The 
		FULL_WINDOW and SCROLL_WINDOW keywords can be used to obtain 
		the window numbers of the 2 draw widgets so they can be drawn
		into at a later time.

 KEYWORDS:
      CONGRID:	Normally, the image is processed with the CONGRID
		procedure before it is written to the fully visible
		window on the left. Specifying CONGIRD=0 will force
		the image to be drawn as is.

  FULL_WINDOW:	A named variable in which to store the IDL window number of \
		the non-sliding window.  This window number can be used with 
		the WSET procedure to draw to the scrolling window at a later
		point.

	GROUP:	The widget ID of the widget that calls SLIDE_IMAGE.  If this
		keyword is specified, the death of the caller results in the
		death of SLIDE_IMAGE.

	ORDER:	This keyword is passed directly to the TV procedure
		to control the order in which the images are drawn. Usually,
		images are drawn from the bottom up.  Set this keyword to a
		non-zero value to draw images from the top down.

     REGISTER:	Set this keyword to create a "Done" button for SLIDE_IMAGE
		and register the widgets with the XMANAGER procedure.

		The basic widgets used in this procedure do not generate
		widget events, so it is not necessary to process events
		in an event loop.  The default is therefore to simply create
		the widgets and return.  Hence, when register is not set, 
		SLIDE_IMAGE can be displayed and the user can still type 
		commands at the "IDL>" prompt that use the widgets.

	RETAIN:	This keyword is passed directly to the WIDGET_DRAW
		function, and controls the type of backing store
		used for the draw windows.  If not present, a value of
		2 is used to make IDL handle backing store.

 SLIDE_WINDOW:	A named variable in which to store the IDL window number of 
		the sliding window.  This window number can be used with the 
		WSET procedure to draw to the scrolling window at a later 
		time.

	TITLE:	The title to be used for the SLIDE_IMAGE widget.  If this
		keyword is not specified, "Slide Image" is used.

	TOP_ID:	A named variable in which to store the top widget ID of the 
		SLIDE_IMAGE hierarchy.  This ID can be used to kill the 
		hierarchy as shown below:

			SLIDE_IMAGE, TOP_ID=base, ...
			.
			.
			.
			WIDGET_CONTROL, /DESTROY, base

	XSIZE:	The maximum width of the image that can be displayed by
		the scrolling window.  This keyword should not be confused 
		with the visible size of the image, controlled by the XVISIBLE
		keyword.  If XSIZE is not specified, the width of Image is 
		used.  If Image is not specified, 256 is used.

     XVISIBLE:	The width of the viewport on the scrolling window.  If this 
		keyword is not specified, 256 is used.

	YSIZE:	The maximum height of the image that can be displayed by
		the scrolling window.  This keyword should not be confused 
		with the visible size of the image, controlled by the YVISIBLE
		keyword.  If YSIZE is not present the height of Image is used.
		If Image is not specified, 256 is used.

     YVISIBLE:	The height of the viewport on the scrolling window. If
		this keyword is not present, 256 is used.

 OUTPUTS:
	None.

 COMMON BLOCKS:
	None.

 SIDE EFFECTS:
	Widgets for displaying a very large image are created.
	The user typically uses the window manager to destroy
	the window, although the TOP_ID keyword can also be used to
	obtain the widget ID to use in destroying it via WIDGET_CONTROL.

 RESTRICTIONS:
	Scrolling windows don't work correctly if backing store is not 
	provided.  They work best with window-system-provided backing store
	(RETAIN=1), but are also usable with IDL provided backing store 
	(RETAIN=2).

	Various machines place different restrictions on the size of the
	actual image that can be handled.

 MODIFICATION HISTORY:
	7 August, 1991, Written by AB, RSI.
	10 March, 1993, ACY, Change default RETAIN=2
	23 Sept., 1994  KDB, Fixed Typo in comments. Fixed error in
			Congrid call. xvisible was used instead of yvisible.
	14 June, 1999	NBR, Make full-image window always 256x256; 
			change name to SLIDE_IMAGEf


SOHOEPHEM

[List of Routines] (See ./astrometry/ephemeris/sohoephem.pro)

 NAME:
       sohoephem
 PURPOSE:
       Compute solar/planetary ephemerides.
 CATEGORY:

 CALLING SEQUENCE:
       sohoephem,tjd,rsoho,iorig,sunephem,planephem
 INPUTS:
       tjd: Julian date (including fraction of day).
       rsoho: Position/velocity of SOHO in heliocentric coordinates
               (in AU and AU/day).
       iorig: Origin of coordinates.
               iorig = 1: Geocentric.
               iorig = 2: Sohocentric.
 OUTPUTS:
       sunephem: Structure containing solar ephemeris information.
       planephem: Array of structures containing planetary ephemeris
               information for 5 major planets.
 PROCEDURE:
       Uses CALL_EXTERNAL to FORTRAN routine.
       Results returned in structures.
 HISTORY:
       Written by Simon Plunkett, September 1995.
       Adapted 29 March 1996 to include SOHO orbit parameters. (SPP).
       Adapted 4 June 1996 to use FITS rather than CDF orbit files
               (change only in output message). (SPP).
       Adapted 14 March 1997 to use FITS or CDF files, including all
               mods to CDF file structure (change only in output
               message). (SPP). 
       Adapted 15 November 2000 to correct calling sequence in
               comments (SPP).
	Changed shareable object call for OSF from ephem.so to
		ephem_dec.so, 15-Aug-2001 (SPP).
       011109  Added Linux external file ephem_linux.so (DW)
	011219, NR - Rename to "sohoephem"


       12/19/01, @(#)sohoephem.pro	1.7 - NRL LASCO IDL Library


SOLAR_NORTH_UP

[List of Routines] (See ./reduce/solar_north_up.pro)

 NAME:				SOLAR_NORTH_UP

 PURPOSE:			Rotates the image to put the solar north at the
				top of the image.

 CATEGORY:			REDUCTION

 CALLING SEQUENCE:		Result = SOLAR_NORTH_UP (Img, Tel)

 INPUTS:			Img = Image array, corrected for readout port
				telescope = int representing telescope (0,1,2,3) -or-
					string representing telescope
 OPTIONAL INPUTS:		None
	
 KEYWORD PARAMETERS:		None

 OUTPUTS:			Result = Image array, corrected for telescope 
					 orientation

 OPTIONAL OUTPUTS:		None

 COMMON BLOCKS:

 SIDE EFFECTS:

 RESTRICTIONS:
   assumes that the images are already rectified so that the readout port 
   effect has been taken care of
   To visualize the images properly, the parameter, !order, should be set =1

 PROCEDURE:

 EXAMPLE:

 MODIFICATION HISTORY:		Written, RA Howard, NRL
   VERSION 1  rah 3 Nov 1995
   VERSION 2  rah 2 Jan 1996  EIT changed from 1 to 0
  	nbr, 3 Jan 2002 - Can use string camera as input

       @(#)solar_north_up.pro	1.2 01/03/02 LASCO IDL LIBRARY


SPLIT_QKL

[List of Routines] (See ./reduce/split_qkl.pro)

 NAME:		SPLIT_QKL

 PURPOSE:	Pre-process QKL files to split them up if they have gaps

 CATEGORY:	REDUCTION

 CALLING SEQUENCE:	SPLIT_QKL, yymmdd

 INPUTS:	date = Date to be processed

 OPTIONAL INPUTS:	None

 KEYWORD PARAMETERS:	None

 OUTPUTS:	None

 OPTIONAL OUTPUTS:	None

 COMMON BLOCKS:	UNPACK_SCIENCE

 PROCEDURE:
	A QKL file is broken into smaller files, for which the times in consecutive
	packets differ by no more than 30 secs.

 MODIFICATION HISTORY:
 	WRITTEN     4 Nov 1998 by Nathan Rich, Interferometrics/NRL
	12 Nov 1998	NBR	change qkl allowed gap to 30 sec
	30 Nov 1998	RAH	Check for undefined input date.
	020312		Jake	Added /SH to SPAWN

 SCCS variables for IDL use
 
 @(#)split_qkl.pro	1.7 03/12/02 :NRL Solar Physics



SPM_FCOR

[List of Routines] (See ./data_anal/spm_fcor.pro)

 TITLE:
		SPM_FCOR

 PURPOSE:
  		This function returns the Saito-Poland-Munro F corona

 INPUT PARAMETERS:
		R:		Radius (in solar radii) Can be a single number or an array

 OPTIONAL INPUT PARAMETERS:
		PA:		Position angle (in degrees).  If omitted, then the equatorial
				corona is returned (PA=90)

 OUTPUTS:
		The F corona is returned in Mean Solar Brightness units as an array
		of floating point numbers corresponding to the size of the input R
		array.

 RESTRICTION:
		The F corona is only valid for radial distances from 1.5 to 5 solar
		radii.

 PROCEDURE:
		The F-coronal values for the polar and equatorial cases given in
		Saito, Poland and Munro, Solar Physics, vol 55, pp 121-134, 1977 are
		used as the reference points.  The logs of the brightness values are
		linearly interpolated to obtain the brightness at the desired radii.
		To obtain the brightness for a position angle between the pole and
		equator, the polar and equatorial values are linearly interpolated
		(in the log).

 EXAMPLES:
		To obtain the polar F-corona at 2.8 solar radii:
			f = SPM_FCOR(2.8,0)
		To obtain the equatorial K-corona at 2.8 solar radii:
			f = SPM_FCOR(2.8,90)
			or
			f = SPM_FCOR(2.8)
		To obtain the F-corona at 45 degrees at 2, 3, 4, 5,  and 6 Rs:
			r = [2,3,4,5,6]
			f = SPM_FCOR(r,45)

 WRITTEN:
		18 Dec 1997,	RAHoward, NRL

 @(#)spm_fcor.pro	1.1 12/30/97 :LASCO IDL LIBRARY


SPM_KCOR

[List of Routines] (See ./data_anal/spm_kcor.pro)

 TITLE:
		SPM_KCOR

 PURPOSE:
  		This function returns the Saito-Poland-Munro K corona

 INPUT PARAMETERS:
		R:		Radius (in solar radii) Can be a single number or an array

 OPTIONAL INPUT PARAMETERS:
		PA:		Position angle (in degrees).  If omitted, then the equatorial
				corona is returned (PA=90)

 OUTPUTS:
		The K corona is returned in Mean Solar Brightness units as an array
		of floating point numbers corresponding to the size of the input R
		array.

 PROCEDURE:
		The K-coronal values for the polar and equatorial cases given in
		Saito, Poland and Munro, Solar Physics, vol 55, pp 121-134, 1977 are
		used as the reference points.  The logs of the brightness values are
		linearly interpolated to obtain the brightness at the desired radii.
		To obtain the coronal intensity for a position angle between the pole
		and equator, the polar and equatorial values are linearly interpolated
		(in the log).

 EXAMPLES:
		To obtain the polar K-corona at 2.8 solar radii:
			K = SPM_KCOR(2.8,0)
		To obtain the equatorial K-corona at 2.8 solar radii:
			K = SPM_KCOR(2.8,90)
			or
			K = SPM_KCOR(2.8)
		To obtain the K-corona at 45 degrees at 2, 3, 4, 5,  and 6 Rs:
			r = [2,3,4,5,6]
			k = SPM_KCOR(r,45)

 WRITTEN:
		18 Dec 1997,	RAHoward, NRL

 @(#)spm_kcor.pro	1.1 12/30/97 :LASCO IDL LIBRARY


SPM_NE

[List of Routines] (See ./data_anal/spm_ne.pro)

 TITLE:
		SPM_NE

 PURPOSE:
  		This function returns the Saito-Poland-Munro electron density

 INPUT PARAMETERS:
		R:		Radius (in solar radii) Can be a single number or an array

 OPTIONAL INPUT PARAMETERS:
		Region:	=0:  Return the equatorial corona density
				=1:  Return the polar coronal density
				=2:  Return the coronal hole density
				If omitted, then the equatorial corona density is returned

 OUTPUTS:
		The electron density in particles per cm^3 as an array of floating
		point numbers corresponding to the size of the input R array.

 PROCEDURE:
		The electron density for the polar, equatorial and coronal hole cases
		given in Saito, Poland and Munro, Solar Physics, vol 55, pp 121-134,
		1977 are used as the reference points.  The density models are given
		in a function form as
				Ne = c1 * R^d1 + c2 * R^d2
		The coefficients c1, c2, d1 and d2 are given by SPM for each of the
		three models.

 EXAMPLES:
		To obtain the polar electron density at 2.8 solar radii:
			dne = SPM_NE(2.8,1)
		To obtain the equatorial K-corona at 2.8 solar radii:
			dne = SPM_NE(2.8,0)
			or
			dnef = SPM_NE(2.8)
		To obtain the electron density in an equatorial coronal hole at 2, 3, 4, 5,  and 6 Rs:
			r = [2,3,4,5,6]
			dne = SPM_NE(r,2)

 WRITTEN:
		18 Dec 1997,	RAHoward, NRL
		16 Aug 2000,	AHayes, NRL, switched polar and equatorial CH order to agree with paper

 @(#)spm_ne.pro	1.2 08/16/00 :LASCO IDL LIBRARY


SPM_PB

[List of Routines] (See ./data_anal/spm_pb.pro)

 TITLE:
		SPM_PB

 PURPOSE:
  		This function returns the Saito-Poland-Munro polarization brightness

 INPUT PARAMETERS:
		R:		Radius (in solar radii) Can be a single number or an array

 OPTIONAL INPUT PARAMETERS:
		Region:	=0:  Return the equatorial pB
				=1:  Return the polar pB
				=2:  Return the coronal hole pB
				If omitted, then the equatorial pB is returned

 OUTPUTS:
		The polarization brightness in mean solar brightness units is returned
		as an array of floating point numbers corresponding to the size of the
		input R array.

 PROCEDURE:
		The polarization brightness for the polar, equatorial and coronal hole cases
		given in Saito, Poland and Munro, Solar Physics, vol 55, pp 121-134,
		1977 are used as the reference points.  The pB models are given
		in a function form as
				pB = c1 * R^d1 + c2 * R^d2
		The coefficients c1, c2, d1 and d2 are given by SPM for each of the
		three models.

 EXAMPLES:
		To obtain the polar pB model at 2.8 solar radii:
			pb = SPM_PB(2.8,1)
		To obtain the equatorial K-corona at 2.8 solar radii:
			pb = SPM_PB(2.8,0)
			or
			pb = SPM_PB(2.8)
		To obtain the pB in an equatorial coronal hole at 2, 3, 4, 5,  and 6 Rs:
			r = [2,3,4,5,6]
			pb = SPM_PB(r,2)

 WRITTEN:
		18 Dec 1997,	RAHoward, NRL
		16 Aug 2000,	AHayes, NRL, corrected order of polar and CH

 @(#)spm_pb.pro	1.2 08/16/00 :LASCO IDL LIBRARY


STARFIELD

[List of Routines] (See ./astrometry/ephemeris/starfield.pro)

 PROJECT:
	SOHO - LASCO
 NAME:
	STARFIELD

 PURPOSE:
       Widget interface to display stars and planets in field of view
       of any of the three LASCO coronagraphs.

 CATEGORY:
	Widgets.

 CALLING SEQUENCE:
	Starfield

 INPUTS:

 OPTIONAL INPUTS:
	
 KEYWORD PARAMETERS:

 OUTPUTS:

 OPTIONAL OUTPUTS:

 COMMON BLOCKS:

 SIDE EFFECTS:

 RESTRICTIONS:

 PROCEDURE:

 EXAMPLE:

 MODIFICATION HISTORY:
 	Written by:	Simon Plunkett, February 1996
                       (adapted from pointing3.pro).
	Adapted to use SOHO orbit parameters from either CDF or FITS
 	files. 14 March 1997 (SPP).
       Removed use of LASCO_ASTROMETRY environment variable for
       output. Now writes to current directory. 23-Jun-2000 (SPP).
	Use library routines for C2/C3 distortion. 15-Aug-2001 (SPP).
	Use default occulter centers for all telescopes, instead of
	assuming occulter at center of CCD. 15-Aug-2001 (SPP).
	Changes needed in future:
	1) Decouple Sun location from occulter center.
	011219, NBR - Change "sohoephem3" to "sohoephem"

 @(#)starfield.pro	1.3, 12/19/01 : IDL NRL LIBRARY


STAT_CURSOR.PRO

[List of Routines] (See ./las-c2/align1.pro)

 NAME:
	STAT_CURSOR.PRO
 PURPOSE:
	Draws a box in a image and does a statistic (mean and standard 
       deviation inside
 CATEGORY:
	??
 CALLING SEQUENCE:
	STAT_CURSOR, ima
 INPUTS:
	ima                          image array (in memory)
 KEYWORD PARAMETERS:               
                                   None
 OUTPUTS:
	Values
 COMMON BLOCKS:
	None.
 SIDE EFFECTS:
	None
 RESTRICTIONS:

 PROCEDURE:
	Straightforward.
 MODIFICATION HISTORY:
	Written by A.LL  v.1.0       LAS  08/25/93           


STDIMGPLOT

[List of Routines] (See ./data_anal/stdimgplot.pro)

Name:
       STDIMGPLOT

Purpose:
    generates standard plots for image analysis

Usage:
       STDIMGPLOT,A,Hdr

Inputs:
       A   = image
       Hdr = FITS header, header structure

 SCCS variables for IDL use
 
 %W% %H% :NRL Solar Physics


STDIMGPLOT2

[List of Routines] (See ./data_anal/stdimgplot2.pro)

Name:
       STDIMGPLOT2

Purpose:
    generates standard plots for analysis of 64x1024 images 

Usage:
       STDIMGPLOT2,A,Hdr

Inputs:
       A   = image
       Hdr = FITS header

 
 %W% %H% :LASCO IDL LIBRARY


STRMAP2MB

[List of Routines] (See ./reduce/mb2str/strmap2mb.pro)

 PROJET:
	SOHO - LASCO

 NAME:
	STRMAP2MB

 PURPOSE:
  Convert a 'string map' to a missing block image map

 CATEGORY:
  missing blocks

 CALLING SEQUENCE:


 INPUTS:
  sm : string coded MB map
  sx,sy : size in pixel of the original image

 OPTIONAL INPUTS:
  rebindex : only necessary if 'full' parameter is passed
             rebin factor of the original image: 1 : full resolution
                                                 2 : half resolution
                                                 4 : quarter resolution
                                                 8 : 8th resolution
 OUTPUTS:
  mb : missing block map mask

 OPTIONAL OUTPUTS:

 KEYWORD INPUT:
  full : set to [frame_start_X,frame_start_Y] in 1024 CCD pix if
         image is not full field

 MODIFICATION HISTORY:
	V1.0 Writen by A.Thernisien on 18/07/2001
 CVSLOG:
  $Log: strmap2mb.pro,v $
  Revision 1.2  2002/07/11 07:24:19  arnaud
  Insertion of the Log in each header



STR_SEP2

[List of Routines] (See ./util/str_sep2.pro)

 NAME:
	STR_SEP2

 PURPOSE:
	This function breaks up a string into words that are separated by
	either spaces or tabs.

 CATEGORY:
	UTIL

 CALLING SEQUENCE:
	Result = STR_SEP2(Str)

 INPUTS:
	Str:	String to be processed

 OUTPUTS:
	The function result is a string array with each word in each element
	of the array.

 MODIFICATION HISTORY:
 	Written by:	

	@(#)str_sep2.pro	1.1 10/05/96 LASCO IDL LIBRARY


STR_SIZE

[List of Routines] (See ./dfanning/str_size.pro)

 NAME:
  STR_SIZE

 PURPOSE:

  The purpose of this function is to return the proper
  character size to make a specified string a specifed
  width in a window. The width is specified in normalized
  coordinates. The function is extremely useful for sizing
  strings and labels in resizeable graphics windows.

 AUTHOR:

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

 CATEGORY:

  Graphics Programs, Widgets.

 CALLING SEQUENCE:

  thisCharSize = STR_SIZE(thisSting, targetWidth)

 INPUTS:

  thisString:  This is the string that you want to make a specifed
     target size or width.

 OPTIONAL INPUTS:

  targetWidth:  This is the target width of the string in normalized
     coordinates in the current graphics window. The character
     size of the string (returned as thisCharSize) will be
     calculated to get the string width as close as possible to
     the target width. The default is 0.25.

 KEYWORD PARAMETERS:

  INITSIZE:  This is the initial size of the string. Default is 1.0.

  STEP:   This is the amount the string size will change in each step
     of the interative process of calculating the string size.
     The default value is 0.05.

 OUTPUTS:

  thisCharSize:  This is the size the specified string should be set
     to if you want to produce output of the specified target
     width. The value is in standard character size units where
     1.0 is the standard character size.

 EXAMPLE:

  To make the string "Happy Holidays" take up 30% of the width of
  the current graphics window, type this:

               XYOUTS, 0.5, 0.5, ALIGN=0.5, "Happy Holidays", $
        CHARSIZE=STR_SIZE("Happy Holidays", 0.3)

 MODIFICATION HISTORY:

  Written by: David Fanning, 17 DEC 96.
  Added a scaling factor to take into account the aspect ratio
     of the window in determing the character size. 28 Oct 97. DWF
  Added check to be sure hardware fonts are not selected. 29 April 2000. DWF.
  Added a pixmap to get proper scaling in skinny windows. 16 May 2000. DWF.
  Forgot I can't do pixmaps in all devices. :-( Fixed. 7 Aug 2000. DWF.


STR_UNIQUE

[List of Routines] (See ./util/str_unique.pro)

 NAME:
	STR_UNIQUE

 PURPOSE:
	Returns an array which is the unique elements of the input string

 CATEGORY:
	UTIL

 CALLING SEQUENCE:
	Result = STR_UNIQUE(Str)

 INPUTS:
	Str:	A string array

 OUTPUTS:
	This function returns a string array containing the unique elements
	of the input array

 RESTRICTIONS:
	The input string must be a singly dimensioned array

 PROCEDURE:
	

 EXAMPLE:
	Suppose you have a string array, s, that contains, ['A','A','a','B','B','A']

	To create an array of the unique elements of the array s:

		unique= STR_UNIQUE(s)

	The output array, unique will contain ['A','a','B']

 MODIFICATION HISTORY:
 	Written by:	RA Howard, 7/30/97

	@(#)str_unique.pro	1.2 11/20/97 LASCO IDL LIBRARY


STV

[List of Routines] (See ./util/stv.pro)

 NAME:
	STV

 PURPOSE:
	Create a scrolling graphics window for examining large images.
	By default, 1 draw widgets are used.  It displays the actual image with 
	scrollbars that allow sliding
	the visible window.

 CALLING SEQUENCE:
	STV , Image

 INPUTS:
	Image:	The 2-dimensional image array to be displayed.  If this 
		argument is not specified, no image is displayed. The 
		WID keyword can be used to obtain 
		the window number of the draw widget so it can be drawn
		into at a later time.

 KEYWORDS:


	GROUP:	The widget ID of the widget that calls SLIDE_IMAGE.  If this
		keyword is specified, the death of the caller results in the
		death of STV.

	ORDER:	This keyword is passed directly to the TV procedure
		to control the order in which the images are drawn. Usually,
		images are drawn from the bottom up.  Set this keyword to a
		non-zero value to draw images from the top down.

     REGISTER:	Set this keyword to create a "Done" button for SLIDE_IMAGE
		and register the widgets with the XMANAGER procedure.

		The basic widgets used in this procedure do not generate
		widget events, so it is not necessary to process events
		in an event loop.  The default is therefore to simply create
		the widgets and return.  Hence, when register is not set, 
		SLIDE_IMAGE can be displayed and the user can still type 
		commands at the "IDL>" prompt that use the widgets.

	RETAIN:	This keyword is passed directly to the WIDGET_DRAW
		function, and controls the type of backing store
		used for the draw windows.  If not present, a value of
		2 is used to make IDL handle backing store.

 WID:	A named variable in which to store the IDL window number of 
		the sliding window.  This window number can be used with the 
		WSET procedure to draw to the scrolling window at a later 
		time.

	TITLE:	The title to be used for the SLIDE_IMAGE widget.  If this
		keyword is not specified, "STV Image" is used.

	TOP_ID:	A named variable in which to store the top widget ID of the 
		STV hierarchy.  This ID can be used to kill the 
		hierarchy as shown below:

			STV, TOP_ID=base, ...
			.
			.
			.
			WIDGET_CONTROL, /DESTROY, base

     XVISIBLE:	The width of the viewport on the scrolling window.  If this 
		keyword is not specified, 1/2 of display size is used.

     YVISIBLE:	The height of the viewport on the scrolling window. If
		this keyword is not present, 1/2 of display size is used.

 OUTPUTS:
	None.

 COMMON BLOCKS:
	None.

 SIDE EFFECTS:
	Widgets for displaying a very large image are created.
	The user typically uses the window manager to destroy
	the window, although the TOP_ID keyword can also be used to
	obtain the widget ID to use in destroying it via WIDGET_CONTROL.

 RESTRICTIONS:
	Scrolling windows don't work correctly if backing store is not 
	provided.  They work best with window-system-provided backing store
	(RETAIN=1), but are also usable with IDL provided backing store 
	(RETAIN=2).

	Various machines place different restrictions on the size of the
	actual image that can be handled.

 MODIFICATION HISTORY:
	04.01.02, nbr - Written, based on SLIDE_IMAGE.pro

	01/02/04 @(#)stv.pro	1.1


SUBTENSE

[List of Routines] (See ./convert/subtense.pro)

 NAME:				SUBTENSE

 PURPOSE:			Returns the angular subtense (arc sec/pixel)
				for the requested telescope

 CATEGORY:			REDUCTION

 CALLING SEQUENCE:		Result = SUBTENSE (Telescope)

 INPUTS:			Telescope = Number of the telescope that the
					    angular subtense is desired
                                           Either (C1..C4/EIT) or (0..3)

 OPTIONAL INPUTS:		None
	
 KEYWORD PARAMETERS:		None

 OUTPUTS:			Result = angular subtense of a pixel in arc 
					 seconds

 OPTIONAL OUTPUTS:		None

 COMMON BLOCKS:		None

 MODIFICATION HISTORY:		Written,  RAH, NRL
   Version 1  rah  5 Nov 1995
   Version 2  rah  13 Apr 1996		Added test for telescope as string
   Version 3  rah   6 May 1997		Changed C2 and C3 based on star transits
   Version 4  sep  16 Dec 1997		Changed EIT from 2.8 to 2.59
   Version 4  rah  26 Feb 1998		Changed C2 from 12.4 to 12.1
   Version 5  sep   7 Apr 1998		Changed C1 from 5.6 to 5.8
   Version 6  sep  28 Aug 1998		Mods for telescope being a structure
   Version 7  rah  12 Nov 1998		Mods for MLO MK3 k-coronameter
   Version 8  rah  20 Nov 1998		Changed C2 from 12.1 to 11.9
   Version 9  dab  14 Jan 2000		Mods for MLO MK$ k-coronameter
	nbr	26 Jul 2000	Use SCCS version for reduce_history common block

 SCCS variables for IDL use
 
ersion= '@(#)subtense.pro	1.13 08/07/00' ; LASCO IDL LIBRARY


SUMBUFFIX

[List of Routines] (See ./sumbuff/sumbuffix.pro)

 PURPOSE:
 Fix *.img science headers when summing buffer is used

 Problem: Using the summing buffers generates files with wrong FITs headers

 Image 1: Sum Buffer A +, Hdr only
 Image 2: Sum Buffer B +, Hdr only
 Image 3: Image Buffer, Rice, Sum Buffer A, Rice, Sum Buffer B, Rice

 produces
  3 files with the Image 3 FITS hdr

  Solution: Replace sci hdr with the proper one

 CALL:
        SUMBUFFIX,Root_dir,Filename,Outdir,Rep_file,Rep_hdr
 INPUT:
               Root_dir - directory name containing filename and rep_file
		Filename - file needing new header
               Outdir   - output directory
		Rep_file - replacement header filename

 OUTPUT:
		Rep_hdr  - replacement header

 EXAMPLE:
        SUMBUFFIX,'/ql/raw','file1.img','/ql/fixed','hdr.img',rep_hdr

 HISTORY:
  Written by:   Dennis Wang

  @(#)sumbuffix.pro	1.1 06/28/00 : NRL IDL LIBRARY


SUMMARY_PLOT

[List of Routines] (See ./util/summary_plot.pro)

 NAME:
	SUMMARY_PLOT

 PURPOSE:
	This procedure writes gif files of up to 25 browse images per file
       from the list of images

 CATEGORY:
	UTIL

 CALLING SEQUENCE:
	SUMMARY_PLOT,List

 INPUTS:
	List:	A string array of the filenames to be used

 KEYWORD PARAMETERS
	OUTDIR:	If set, specifies the output directory to write the images to.
		If not set, writes to the users' home directory
	
 OUTPUTS:
	A series of files are written.

 SIDE EFFECTS:

 RESTRICTIONS:
	At this time, the page size, the number of images/page, and
	the image annotation is coded into the routine.  

	It is easy to add a branch point for different number of images
	per page, i.e., 25, 36, etc.  It is not clear how to change
	the annotation.


 PROCEDURE:
	Make gifs that are 650 by 900.  Portrait mode

 EXAMPLE:

 MODIFICATION HISTORY:
 	Written by:	M.D. Andrews, 18 Aug 1997
	Modifications:
	19 Oct 1998	RAH	use lasco_readfits, test for bad image

	%W% %H% LASCO IDL LIBRARY


SUNDIST

[List of Routines] (See ./util/sundist.pro)

 NAME:
	SUNDIST

 PURPOSE:
   	This procedure generates two arrays whose elements are the distance 
	from the center of the sun and the position angle from solar north.

 CATEGORY:
	UTIL

 CALLING SEQUENCE:
	SUNDIST,Coord,Dist,Angle

 INPUTS:
	Coord = 4 word array containing the solar coordinates,
			column center of sun,
			row center of sun,
			roll angle of solar north,
			number of pixels per radius

 KEYWORD PARAMETERS:
	XSIZE = Number of columns in image, default is 1024
	YSIZE = Number of rows in image, default is square matrix

 OUTPUTS:
	Dist = array whose elements are solar radii

 OPTIONAL OUTPUTS:
 	Angle = array whose elements are position angle

 MODIFICATION HISTORY:
 	Written by:	R.A. Howard, NRL, 27 October 1995


	@(#)sundist.pro	1.1 09/19/96 LASCO IDL LIBRARY


SUNGRID

[List of Routines] (See ./display/sungrid.pro)

 NAME:
	SUNGRID

 PURPOSE:
	To plot an overlay on coronal images with
	coordinate grids on the disk and in the 
	corona.

 CATEGORY:
	PICO

 CALLING SEQUENCE:
	SUNGRID, P, B0, L0

 INPUTS:
	P: Position angle of the solar axis
	B0: Latitude of the sub-terrestrial point 
	L0: Longitude of the sub-terrestrial point

 OPTIONAL INPUT PARAMETERS:
	None

 KEYWORD PARAMETERS:
	CENTER: gives the [x,y] coorinates of the center of 
		the solar disk (on which the coordinate grid
		should be centered) in the image. Default is 
		[512,512]
	NOSUN:  If set, no grid will be drawn on the sun
	SUNRADIUS: Factor to multiply the radius of the sun.
		Default is SUNRADIUS=1. Then the sun has a 
               diameter of 489 pixels (corresponding to PICO)
	COLOR:  Color index for both grids; if COLOR is set
		SUNCOLOR and CORONACOLOR are ignored.
       CHARSIZE: giving the charsize of the labelling. By
               default the charsize is chosen automatically.
	HEADER: If an imageheader (PICO-Format!!) is given, 
               the P, B0 and L0
		as well as the apparent solar diameter 
		will be automatically calculated taking the 
		data of header.time_obs and header.date_obs
		and the EPHEMERIS procedure. The center of 
               the grid will be either centered on header.hole
               or, if present and not [0,0,0,0] on header.sun.
	GRID:   If a named and not undefined variable is spe-
		cified with this keyword, the existing screen
		is not overplotted but the grid is returned in
		this variable (by passing to the 'Z' device).
	SIZE:   The size of the image in pixels. Default is 
		[1024,1024]. If size is scalar, the image is
               assumed to be quadratic.
	LABEL:  If set, coordinate sytems will be labeled
       LATLAB: An array indicating the latitudes to be labelled.
               By default: latlab=[-60,-30,0,30,60].
               LABEL must be set
       LONLAB: Same as for latlab. Default: intervals of 30 deg.
               LABEL must be set
       LATITUDES: An array indicating which latitude circles
               shall be drawn. By default: each 15 degrees. 
       LONGITUDES: Same as for latitudes. Default: 15 degree
               spaces.

 OUTPUTS:
	None. If grid is not set, the image displayed on the
	screen will be overplotted.

 OPTIONAL OUTPUT PARAMETERS:
	None

       EXAMPLE: 
       grid=0
       SUNGRID,26,3,155,GRID=grid,CENTER=[256,256],SIZE=512, $
             PIXELDIAMETER=370

       The named variable grid contains a (512,512) byte array
       with the solar grid, centered on [256,256]. The solar disk
       has a diameter of 370 Pixels. 

 COMMON BLOCKS:
	None

 SIDE EFFECTS:
	A displayed image will be overplotted

 RESTRICTIONS:
	Up to now, the procedure only works for non-scalable
       devices (X, WIN, Z etc.) and not yet for the PS-device.
       However Parts of the solar disk can be drawn! The entire
       grid has not to be drawn anymore.

 PROCEDURE:
	Straightforward using the map drawing facilities
	MAP_SET and MAP_GRID of IDL. The procedure is highly
	adapted to PICO instrumental parameters.
       V2.0 Does not use the MAP functions anymore in order
       to be able to draw the equator instead of the central
       latitude circle on the disk

 MODIFICATION HISTORY:
	Written V1.0 16-OCT-1994 Pic Du Midi
       V2.0 Completely self written without IDL-functions MAP_GRID
       and MAP_SET: 10-APR-1996 Alexander Epple, MPAE Lindau


SUN_EPHEM

[List of Routines] (See ./display/sun_ephem.pro)

 Project     : SOHO - LASCO
                   
 Name        : SUN_EPHEM()
               
 Purpose     : To calculate the solar ephemeris parameters: ecliptic
               longitude, P, B0 angles and the semi-diameter.
  
 Category    : Util, Coords
             
 Explanation : Allows for planetary and lunar perturbations in the
               calculation of solar longitude and various other solar
               positional parameters at date/time requested.
               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.
               
 Syntax      : IDL> ang = pb0r(date_time)

 Examples    :
    
 Inputs      : date_time  -  the date/time specified in any CDS format 
               
 Opt. Inputs : None
               
 Outputs     : Function returns a 6-element array with
                                    ang(0) = nu_c (degrees)
                                    ang(1) = nu_p (degrees)
                                    ang(2) = P  (degrees)
                                    ang(3) = B0 (degrees)
                                    ang(4) = R  semi-diameter (arcmin)
                                    ang(5) = Apparent longitude of
                                             Sun (degrees).
               
 Opt. Outputs: None
               
 Keywords    : None

 Common      : None
               ;               
 Side effects: None
                              
 History     : Based on Fortran programs by Hohenkerk and Emerson (RGO)

     16-May-94,CDS/IDL version PB0R.PRO, C D Pike, RAL,Written 
               
     Update semi-diameter calculation, CDP, 20-May-94
		Version 3, William Thompson, GSFC, 14 November 1994
			Modified .DAY to .MJD
               Simon Plunkett, UofB, Adapted from CDS routine PB0R to
               include solar longitude in output parameters, 10 May 1995.

     Version 3, 14 November 1994

 Contact     :


SW_NE

[List of Routines] (See ./data_anal/ne_sw.pro)

 NAME:
	SW_NE

 PURPOSE:
	This function returns the electron density in the solar wind for
	the input solar radii values

 CATEGORY:
	DATA ANALYSIS

 CALLING SEQUENCE:
	 
	Result = NE_SW(RSUN, NE1AU)

 INPUTS:
	RSUN:	the radial distance (in solar radii) to compute the electron
		density

 OPTIONAL INPUTS:
	NE1AU:	the electron density at 1 AU.  If not specified, a value of
		7.2/cm3 is used
	
 KEYWORD PARAMETERS:
	None

 OUTPUTS:
	This function returns the electron density in particles/cm3

 OPTIONAL OUTPUTS:
	None

 COMMON BLOCKS:
	None

 SIDE EFFECTS:
	None

 RESTRICTIONS:
	None

 PROCEDURE:
	Uses the results from Leblanc, Dulk, Bougeret (Solar Physics, v183,
	pp165-180 (1998) who give the functional form of the electron 
	density as a function of solar radius.  The result is scaled to 
	a value of 7.2 particles per cubic centimeter at 1 AU.  The function
	was determined by radio Type III bursts.

 EXAMPLE:
	neprofile = NE_SW (Rsun,10)
		Rsun is an array of solar radii
		10 is the electron density at 1 AU

 MODIFICATION HISTORY:
 	Written by:	R.A. Howard, NRL 10 June 2004.

	%W% %H% LASCO IDL LIBRARY


SYNSCAN

[List of Routines] (See ./synoptic/synscan.pro)

 NAME: 
             SYNSCAN 
 
 PURPOSE: 
             This routine scans an image file and creates a  
             constant radius scan for synoptic maps. 
 
 CATEGORY: 
             REDUCTION 
 
 CALLING SEQUENCE: 
             SYNSCAN,Filename 
 
 INPUTS: 
             Filename:   Ascii string of the name of the  
                         FITS file 
 
 OPTIONAL INPUTS: 
             None 
        
 KEYWORD PARAMETERS: 
             None 
 
 OUTPUTS: 
             None 
 
 OPTIONAL OUTPUTS: 
             None 
 
 COMMON BLOCKS: 
             None 
 
 SIDE EFFECTS: 
             Creates a FITS file of the constant radius  
             scans in the current directory
 
 RESTRICTIONS: 
             The directory containing the FITS file should 
             be the local directory or !imgdir should be set
             to point to the directory
 
 PROCEDURE: 
 
 EXAMPLE: 
 
 MODIFICATION HISTORY: 
       Written by:     RA Howard, NRL, 26 Nov 1995. 
    Version 1     26 Nov 95 Initial Release 
    Version 2     13 Apr 96 Modified for keywords
 
	@(#)synscan.pro	1.2 01/19/00 LASCO IDL LIBRARY


TELESCOPE_POINTING

[List of Routines] (See ./data_anal/telescope_pointing.pro)

 NAME:
	TELESCOPE_POINTING

 PURPOSE:
	This function returns the telescope pointing information for SUNDIST.

 CATEGORY:
	LASCO DATA_ANAL

 CALLING SEQUENCE:
	Result = TELESCOPE_POINTING (Hdr)

 INPUTS:
	Hdr:	The image header as a LASCO header structure.

 OUTPUTS:
	This function returns a 4 element floating point array of the
	telescope pointing information:
	word 1:	 column coordinates of the center of the sun
	word 2:  row coordinates of the center of the sun
	word 3:  roll angle to solar north, in degrees, measured westward
	word 4:  size of the solar radius in pixels

 SIDE EFFECTS:
	Calls GET_SUN_CENTER, GET_SEC_PIXEL, GET_SOLAR_RADIUS, GET_SOLAR_ROLL

 PROCEDURE:
	The SUNDIST procedure needs the pointing information to be supplied
	in an array.

 EXAMPLE:
	Return the pointing information for the image pointed to by header.

		Coords = TELESCOPE_POINTING(Hdr)

 MODIFICATION HISTORY:
 	Written by:	RA Howard, 30 Apr 1997
	Mods to accept MLO headers

	@(#)telescope_pointing.pro	1.3 08/28/98 LASCO IDL LIBRARY


TEXTARRAY

[List of Routines] (See ./display/textarray.pro)

 NAME:  
	TEXTARRAY

 PURPOSE:
	To create a two dimensional array containing 
	text in vector font.

 CATEGORY:
	PICO

 CALLING SEQUENCE:
	result=TEXTARRAY(text)

 INPUTS:
	text:  A string containing the text

 OPTIONAL INPUTS:
	None

 KEYWORD PARAMETERS:
	CHARSIZE, CHARTHICK: Normal signification
		as for other graphical output
	COLOR:  The color index to be used.
		Default: 255

 OUTPUTS:
	result: a two dimensional array. The background
		is 0 whereas the text is written in 
		the specified color. The textarray
		can be inserted in an image using 
		PUT_TEXT.

 OPTIONAL OUTPUTS:
	None

 COMMON BLOCKS:
	None

 SIDE EFFECTS:
	Unknown

 RESTRICTIONS:
	None

 PROCEDURE:
	Straightforward

 MODIFICATION HISTORY:
	V1.0 Alexander Epple, Pic Du Midi, 15-OCT-1995
	Jun-2000, B. Podlipnik - Add BOLD, XP, YP keywords


TIME_CORRECTION

[List of Routines] (See ./data_anal/time_correction.pro)

 Name:
    TIME_CORRECTION

 Purpose:
    To return the OBE - LOBT time difference that is equal to or right before the
    the input obe-time from the values in TIME_DIFFERENCE_DB.

 Input Parameters:
    OBE_TIME           -       An input obe_time for which the time offset is to be obtained.

 Output:
    DELTA_ERROR        -       A two element string array.

 RETURN VALUE:
    DT                 -       A two element long array containing the time offset as
                               delta_mjd and delta_ms.

 Keywords:
    CORRECTION_STRING	-	Used to return an ASCII string with the
				time difference.
    VERBOSE            -       If set, print out time selection info.

 Calling Sequence:
    dt = TIME_CORRECTION(obe_time, delta_error, CORRECTION_STRING = CORRECTION_STRING, /VERBOSE)
 
 Restrictions:
    If large jumps in the difference occur between realtime contacts, this
	routine could return inaccurate values.

 History:
    1997 April 17  - D.M. fecit.
    1997 August 27 - Added CORRECTION_STRING keyword		D.M. fecit.
    1999 Feb 7     - Added binary search and indexing to speed finding
                     the right record, created unix version for Solaris -  DW
    2002 Jul 10    - Added DELTA_ERROR parameter                        -  Ed Esfandiari
    2002 Jul 10    - Also added a true binary search                    -  Ed Esfandiari
    2003 Mar 11    - Add REDUCE_HISTORY common block; 
			change datafile calls; delta_error=N/A for c2_offsets - NRich
    2004 Sep 15 - Change OS_version check to 'endian-ness' check, since
			not all unix platforns are necessarily big-endian - GR Lawrence

 @(#)time_correction.pro	1.3, 09/15/04  NRL IDL LIBRARY


TVIMAGE

[List of Routines] (See ./dfanning/ftvimage.pro)

 NAME:
     TVIMAGE

 PURPOSE:
     This purpose of TVIMAGE is to enable the TV command in IDL
     to be a completely device-independent and color-decomposition-
     state independent command. On 24-bit displays color decomposition
     is always turned off for 8-bit images and on for 24-bit images.
     The color decomposition state is restored for those versions of
     IDL that support it (> 5.2). Moreover, TVIMAGE adds features
     that TV lacks. For example, images can be positioned in windows
     using the POSITION keyword like other IDL graphics commands.
     TVIMAGE also supports the !P.MULTI system variable, unlike the
     TV command. TVIMAGE was written to work especially well in
     resizeable graphics windows. Note that if you wish to preserve
     the aspect ratio of images in resizeable windows, you should set
     the KEEP_ASPECT_RATIO keyword, described below. TVIMAGE works
     equally well on the display, in the PostScript device, and in
     the Printer and Z-Graphics Buffer devices. The TRUE keyword is
     set automatically to the correct value for 24-bit images, so you
     don't need to specify it when using TVIMAGE.

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

 CATEGORY:
     Graphics display.

 CALLING SEQUENCE:

     TVIMAGE, image

 INPUTS:
     image:    A 2D or 3D image array. It should be byte data.

       x  :    The X position of the lower-left corner of the image.
               This parameter is only recognized if the TV keyword is set.

       y  :    The Y position of the lower-left corner of the image.
               This parameter is only recognized if the TV keyword is set.

 KEYWORD PARAMETERS:

     BACKGROUND:   This keyword specifies the background color. Note that
               the keyword ONLY has effect if the ERASE keyword is also
               set or !P.MULTI is set to multiple plots and TVIMAGE is
               used to place the *first* plot.

     ERASE:    If this keyword is set an ERASE command is issued
               before the image is displayed. Note that the ERASE
               command puts the image on a new page in PostScript
               output.

     _EXTRA:   This keyword picks up any TV keywords you wish to use.

     HALF_HALF: If set, will tell CONGRID to extrapolate a *half* row
               and column on either side, rather than the default of
               one full row/column at the ends of the array.  If you
               are interpolating images with few rows, then the
               output will be more consistent with this technique.
               This keyword is intended as a replacement for
               MINUS_ONE, and both keywords probably should not be
               used in the same call to CONGRID.

     KEEP_ASPECT_RATIO: Normally, the image will be resized to fit the
               specified position in the window. If you prefer, you can
               force the image to maintain its aspect ratio in the window
               (although not its natural size) by setting this keyword.
               The image width is fitted first. If, after setting the
               image width, the image height is too big for the window,
               then the image height is fitted into the window. The
               appropriate values of the POSITION keyword are honored
               during this fitting process. Once a fit is made, the
               POSITION coordiates are re-calculated to center the image
               in the window. You can recover these new position coordinates
               as the output from the POSITION keyword.

     MARGIN:   A single value, expressed as a normalized coordinate, that
               can easily be used to calculate a position in the window.
               The margin is used to calculate a POSITION that gives
               the image an equal margin around the edge of the window.
               The margin must be a number in the range 0.0 to 0.333. This
               keyword is ignored if the POSITION keyword is used.

     MINUS_ONE: The value of this keyword is passed along to the CONGRID
               command. It prevents CONGRID from adding an extra row and
               column to the resulting array, which can be a problem with
               small image arrays.

     NOINTERPOLATION: Setting this keyword disables the default bilinear
               interpolation done to the image when it is resized. Nearest
               neighbor interpolation is done instead. This is preferred
               when you do not wish to change the pixel values of the image.
               This keyword must be set, for example, when you are displaying
               GIF files that come with their own non-IDL color table vectors.

     NORMAL:   Setting this keyword means image position coordinates x and y
               are interpreted as being in normalized coordinates. This keyword
               is only valid if the TV keyword is set.

     OVERPLOT: Setting this keyword causes the POSITION keyword to be ignored
               and the image is positioned in the location established by the
               last graphics command. For example:

                    Plot, Findgen(11), Position=[0.1, 0.3, 0.8, 0.95]
                    TVImage, image, /Overplot

     POSITION: The location of the image in the output window. This is
               a four-element floating array of normalized coordinates of
               the type given by !P.POSITION or the POSITION keyword to
               other IDL graphics commands. The form is [x0, y0, x1, y1].
               The default is [0.0, 0.0, 1.0, 1.0]. Note that this can
               be an output parameter if the KEEP_ASPECT_RATIO keyword is
               used.

     TV:       Setting this keyword makes the TVIMAGE command work much
               like the TV command, although better. That is to say, it
               will still set the correct DECOMPOSED state depending upon
               the kind of image to be displayed (8-bit or 24-bit). It will
               also allow the image to be "positioned" in the window by
               specifying the coordinates of the lower-left corner of the
               image. The NORMAL keyword is activated when the TV keyword
               is set, which will indicate that the position coordinates
               are given in normalized coordinates rather than device
               coordinates.

               Setting this keyword will ensure that the keywords
               KEEP_ASPECT_RATIO, MARGIN, MINUS_ONE, MULTI, and POSITION
               are ignored.

 OUTPUTS:
     None.

 SIDE EFFECTS:
     Unless the KEEP_ASPECT_RATIO keyword is set, the displayed image
     may not have the same aspect ratio as the input data set.

 RESTRICTIONS:
     If the POSITION keyword and the KEEP_ASPECT_RATIO keyword are
     used together, there is an excellent chance the POSITION
     parameters will change. If the POSITION is passed in as a
     variable, the new positions will be returned in the same variable
     as an output parameter.

     If a 24-bit image is displayed on an 8-bit display, the
     24-bit image must be converted to an 8-bit image and the
     appropriate color table vectors. This is done with the COLOR_QUAN
     function. The TVIMAGE command will load the color table vectors
     and set the NOINTERPOLATION keyword if this is done. Note that the
     resulting color table vectors are normally incompatible with other
     IDL-supplied color tables. Hence, other graphics windows open at
     the time the image is display are likely to look strange.

 EXAMPLE:
     To display an image with a contour plot on top of it, type:

        filename = FILEPATH(SUBDIR=['examples','data'], 'worldelv.dat')
        image = BYTARR(360,360)
        OPENR, lun, filename, /GET_LUN
        READU, lun, image
        FREE_LUN, lun

        TVIMAGE, image, POSITION=thisPosition, /KEEP_ASPECT_RATIO
        CONTOUR, image, POSITION=thisPosition, /NOERASE, XSTYLE=1, $
            YSTYLE=1, XRANGE=[0,360], YRANGE=[0,360], NLEVELS=10

 MODIFICATION HISTORY:
      Written by:     David Fanning, 20 NOV 1996.
      Fixed a small bug with the resizing of the image. 17 Feb 1997. DWF.
      Removed BOTTOM and NCOLORS keywords. This reflects my growing belief
         that this program should act more like TV and less like a "color
         aware" application. I leave "color awareness" to the program
         using TVIMAGE. Added 24-bit image capability. 15 April 1997. DWF.
      Fixed a small bug that prevented this program from working in the
          Z-buffer. 17 April 1997. DWF.
      Fixed a subtle bug that caused me to think I was going crazy!
          Lession learned: Be sure you know the *current* graphics
          window! 17 April 1997. DWF.
      Added support for the PRINTER device. 25 June 1997. DWF.
      Extensive modifications. 27 Oct 1997. DWF
          1) Removed PRINTER support, which didn't work as expected.
          2) Modified Keep_Aspect_Ratio code to work with POSITION keyword.
          3) Added check for window-able devices (!D.Flags AND 256).
          4) Modified PostScript color handling.
      Craig Markwart points out that Congrid adds an extra row and column
          onto an array. When viewing small images (e.g., 20x20) this can be
          a problem. Added a Minus_One keyword whose value can be passed
          along to the Congrid keyword of the same name. 28 Oct 1997. DWF
      Changed default POSITION to fill entire window. 30 July 1998. DWF.
      Made sure color decomposition is OFF for 2D images. 6 Aug 1998. DWF.
      Added limited PRINTER portrait mode support. The correct aspect ratio
          of the image is always maintained when outputting to the
          PRINTER device and POSITION coordinates are ignored. 6 Aug 1998. DWF
      Removed 6 August 98 fixes (Device, Decomposed=0) after realizing that
          they interfere with operation in the Z-graphics buffer. 9 Oct 1998. DWF
      Added a MARGIN keyword. 18 Oct 1998. DWF.
      Re-established Device, Decomposed=0 keyword for devices that
         support it. 18 Oct 1998. DWF.
      Added support for the !P.Multi system variable. 3 March 99. DWF
      Added DEVICE, DECOMPOSED=1 command for all 24-bit images. 2 April 99. DWF.
      Added ability to preserve DECOMPOSED state for IDL 5.2 and higher. 4 April 99. DWF.
      Added TV keyword to allow TVIMAGE to work like the TV command. 11 May 99. DWF.
      Added the OVERPLOT keyword to allow plotting on POSITION coordinates
         estabished by the preceding graphics command. 11 Oct 99. DWF.
      Added automatic recognition of !P.Multi. Setting MULTI keyword is no
         longer required. 18 Nov 99. DWF.
      Added NOINTERPOLATION keyword so that nearest neighbor interpolation
         is performed rather than bilinear. 3 Dec 99. DWF
      Changed ON_ERROR condition from 1 to 2. 19 Dec 99. DWF.
      Added Craig Markwardt's CMCongrid program and removed RSI's. 24 Feb 2000. DWF.
      Added HALF_HALF keyword to support CMCONGRID. 24 Feb 2000. DWF.
      Fixed a small problem with image start position by adding ROUND function. 19 March 2000. DWF.
      Updated the PRINTER device code to take advantage of available keywords. 2 April 2000. DWF.
      Reorganized the code to handle 24-bit images on 8-bit displays better. 2 April 2000. DWF.
      Added BACKGROUND keyword. 20 April 2000. DWF.
      Fixed a small problem in where the ERASE was occuring. 6 May 2000. DWF.
      Rearranged the PLOT part of code to occur before decomposition state
         is changed to fix Background color bug in multiple plots. 23 Sept 2000. DWF.
      Removed MULTI keyword, which is no longer needed. 23 Sept 2000. DWF.
      Fixed a small problem with handling images that are slices from 3D image cubes. 5 Oct 2000. DWF.
	2/5/04, nbr - Rename for SSW compatability


TVREAD

[List of Routines] (See ./dfanning/ftvread.pro)

 NAME:
       TVREAD

 PURPOSE:

       To get accurate screen dumps with the IDL command TVRD on 24-bit
       PC and Macintosh computers, you have to be sure to set color
       decomposition on. This program adds that capability automatically.
       In addition, the program will optionally write BMP, GIF, JPEG,
       PICT, PNG, and TIFF color image files of the screen dump.

 AUTHOR:

       FANNING SOFTWARE CONSULTING
       David Fanning, Ph.D.
       1645 Sheely Drive
       Fort Collins, CO 80526 USA
       Phone: 970-221-0438
       E-mail: davidf@dfanning.com
       Coyote's Guide to IDL Programming: http://www.dfanning.com

 CATEGORY:

       Graphics

 CALLING SEQUENCE:

       image = TVREAD(xstart, ystart, ncols, nrows)

       The returned image will be a 2D image on 8-bit systems and
       a 24-bit pixel interleaved true-color image on 24-bit systems.
       A -1 will be returned if a file output keyword is used (e.g., JPEG, TIFF, etc.)=tvr

 OPTIONAL INPUTS:

       XSTART -- The starting column index.  By default, 0.

       YSTART -- The starting row index. By default, 0.

       NCOLS -- The number of columns to read. By default, !D.X_Size - XSTART

       NROWS -- The number of rows to read. By default, !D.Y_Size - YSTART.

 KEYWORD PARAMETERS:

       BMP -- Set this keyword to write the screen dump as a color BMP file.

       COLORS -- If a 24-bit image has to be quantized, this will set the number
          of colors in the output image. Set to 256 by default. Applies to BMP,
          GIF, PICT, and PNG formats written from 24-bit displays.(See the
          COLOR_QUAN documentation for details.)

       CUBE -- If this keyword is set to a value between 2 and 6 the color
          quantization will use a cubic method of quantization. Applies to BMP,
          GIF, PICT, and PNG formats written from 24-bit displays.(See the
          COLOR_QUAN documentation for details.)

       DITHER -- If this keyword is set the quantized image will be dithered.
          Applies to BMP, GIF, PICT, and PNG formats written from 24-bit displays.
          (See the COLOR_QUAN documentation for details.)

       FILENAME -- The base name of the output file. (No file extensions;
           they will be added automatically.) This name may be changed by the user.

              image = TVREAD(Filename='myfile', /JPEG)

       GIF -- Set this keyword to write the screen dump as a color GIF file.

       JPEG -- Set this keyword to write the screen dump as a color JPEG file.

       PICT -- Set this keyword to write the screen dump as a color PICT file.

       PNG -- Set this keyword to write the screen dump as a color PNG file.

       TIFF -- Set this keyword to write the screen dump as a color TIFF file.

       QUALITY -- This keyword sets the amount of compression for JPEG images.
           It should be set to a value between 0 and 100. It is set to 75 by default.
           (See the WRITE_JPEG documentation for details.)

       WID -- The index number of the window to read from. The current graphics window
           (!D.Window) is selected by default. An error is issued if no windows are
           currently open on a device that supports windows.

       _EXTRA -- Any keywords that are appropriate for the WRITE_*** routines are
           also accepted via keyword inheritance.

 COMMON BLOCKS:

       None

 RESTRICTIONS:   Requires ERROR_MESSAGE from the Coyote Library:

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

                 Requires IDL 5.2 and higher.

 MODIFICATION HISTORY:

       Written by David Fanning, 9 AUG 2000.
       Added changes to make the program more device independent. 16 SEP 2000. DWF.
       Removed GIF file support for IDL 5.4 and above. 18 JAN 2001. DWF.
 04.05.02, nbr - Rename for SSW compatability
 04.07.01, nbr - Use PNG not JPEG in case GIF not available


TVSCALE

[List of Routines] (See ./dfanning/tvscale.pro)

 NAME:
     TVSCALE

 PURPOSE:
     This purpose of TVSCALE is to enable the TVSCL command in IDL
     to be a completely device-independent and color-decomposition-
     state independent command. On 24-bit displays color decomposition
     is always turned off for 8-bit images and on for 24-bit images.
     The color decomposition state is restored for those versions of
     IDL that support it (> 5.2). Moreover, TVSCALE adds features
     that TVSCL lacks. For example, images can be positioned in windows
     using the POSITION keyword like other IDL graphics commands.
     TVSCALE also supports the !P.MULTI system variable, unlike the
     TVSCL command. TVSCALE was written to work especially well in
     resizeable graphics windows. Note that if you wish to preserve
     the aspect ratio of images in resizeable windows, you should set
     the KEEP_ASPECT_RATIO keyword, described below. TVSCALE works
     equally well on the display, in the PostScript device, and in
     the Printer and Z-Graphics Buffer devices. The TRUE keyword is
     set automatically to the correct value for 24-bit images, so you
     don't need to specify it when using TVSCALE. In addition, you can
     use the TOP and BOTTOM keywords to define a particular set of
     number to scale the data to. The algorithm used is this:

         TV. BytScl(image, TOP=top-bottom) + bottom

     Note that if you scale the image between 100 and 200, that
     there are 101 possible pixel values. So the proper way to
     load colors would be like this:

       LoadCT, NColors=101, Bottom=100
       TVSCALE, image, Top=200, Bottom=100

     Alternatively, you could use the NCOLORS keyword:

       LoadCT, NColors=100, Bottom=100
       TVSCALE, image, NColors=100, Bottom=100

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

 CATEGORY:
     Graphics display.

 CALLING SEQUENCE:

     TVSCALE, image

 INPUTS:
     image:    A 2D or 3D image array. It does not have to be byte data.

       x  :    The X position of the lower-left corner of the image.
               This parameter is only recognized if the TVSCL keyword is set.

       y  :    The Y position of the lower-left corner of the image.
               This parameter is only recognized if the TVSCL keyword is set.

 KEYWORD PARAMETERS:
     BACKGROUND:   This keyword specifies the background color. Note that
               the keyword ONLY has effect if the ERASE keyword is also
               set or !P.MULTI is set to multiple plots and TVSCALE is
               used to place the *first* plot.

     BOTTOM:   The image is scaled so that all displayed pixels have values
               greater than or equal to BOTTOM and less than or equal to TOP.
               The value of BOTTOM is 0 by default.

     ERASE:    If this keyword is set an ERASE command is issued
               before the image is displayed. Note that the ERASE
               command puts the image on a new page in PostScript
               output.

     _EXTRA:   This keyword picks up any TV keywords you wish to use.

     HALF_HALF: If set, will tell CONGRID to extrapolate a *half* row
               and column on either side, rather than the default of
               one full row/column at the ends of the array.  If you
               are interpolating images with few rows, then the
               output will be more consistent with this technique.
               This keyword is intended as a replacement for
               MINUS_ONE, and both keywords probably should not be
               used in the same call to CONGRID.

     KEEP_ASPECT_RATIO: Normally, the image will be resized to fit the
               specified position in the window. If you prefer, you can
               force the image to maintain its aspect ratio in the window
               (although not its natural size) by setting this keyword.
               The image width is fitted first. If, after setting the
               image width, the image height is too big for the window,
               then the image height is fitted into the window. The
               appropriate values of the POSITION keyword are honored
               during this fitting process. Once a fit is made, the
               POSITION coordiates are re-calculated to center the image
               in the window. You can recover these new position coordinates
               as the output from the POSITION keyword.

     MARGIN:   A single value, expressed as a normalized coordinate, that
               can easily be used to calculate a position in the window.
               The margin is used to calculate a POSITION that gives
               the image an equal margin around the edge of the window.
               The margin must be a number in the range 0.0 to 0.333. This
               keyword is ignored if the POSITION keyword is used.

     MAXVALUE: The data is linearly scaled between the MIN and MAX values,
               if they are provided. MAX is set to MAX(image) by default.

     MINVALUE: The data is linearly scaled between the MIN and MAX values,
               if they are provided. MIN is set to MIN(image) by default.

     MINUS_ONE: The value of this keyword is passed along to the CONGRID
               command. It prevents CONGRID from adding an extra row and
               column to the resulting array, which can be a problem with
               small image arrays.

     NCOLORS:  If this keyword is supplied, the TOP keyword is ignored and
               the TOP keyword is set equal to BOTTOM + NCOLORS - 1. This
               keyword is provided to make TVSCALE easier to use with the
               color-loading programs such as LOADCT:

                  LoadCT, 5, NColors=100, Bottom=100
                  TVScale, image, NColors=100, Bottom=100

     NOINTERPOLATION: Setting this keyword disables the default bilinear
               interpolation done to the image when it is resized. Nearest
               neighbor interpolation is done instead. This is preferred
               when you do not wish to change the pixel values of the image.

     NORMAL:   Setting this keyword means image position coordinates x and y
               are interpreted as being in normalized coordinates. This keyword
               is only valid if the TVSCL keyword is set.

     OVERPLOT: Setting this keyword causes the POSITION keyword to be ignored
               and the image is positioned in the location established by the
               last graphics command. For example:

                    Plot, Findgen(11), Position=[0.1, 0.3, 0.8, 0.95]
                    TVScale, image, /Overplot

     POSITION: The location of the image in the output window. This is
               a four-element floating array of normalized coordinates of
               the type given by !P.POSITION or the POSITION keyword to
               other IDL graphics commands. The form is [x0, y0, x1, y1].
               The default is [0.0, 0.0, 1.0, 1.0]. Note that this can
               be an output parameter if the KEEP_ASPECT_RATIO keyword is
               used.

     TOP:      The image is scaled so that all displayed pixels have values
               greater than or equal to BOTTOM and less than or equal to TOP.
               The value of TOP is !D.Table_Size by default.

     TVSCL:    Setting this keyword makes the TVIMAGE command work much
               like the TVSCL command, although better. That is to say, it
               will still set the correct DECOMPOSED state depending upon
               the kind of image to be displayed (8-bit or 24-bit). It will
               also allow the image to be "positioned" in the window by
               specifying the coordinates of the lower-left corner of the
               image. The NORMAL keyword is activated when the TV keyword
               is set, which will indicate that the position coordinates
               are given in normalized coordinates rather than device
               coordinates.

               Setting this keyword will ensure that the keywords
               KEEP_ASPECT_RATIO, MARGIN, MINUS_ONE, MULTI, and POSITION
               are ignored.

 OUTPUTS:
     None.

 SIDE EFFECTS:
     Unless the KEEP_ASPECT_RATIO keyword is set, the displayed image
     may not have the same aspect ratio as the input data set.

 RESTRICTIONS:
     If the POSITION keyword and the KEEP_ASPECT_RATIO keyword are
     used together, there is an excellent chance the POSITION
     parameters will change. If the POSITION is passed in as a
     variable, the new positions will be returned as an output parameter.

     If the image is 2D then color decomposition is turned OFF
     for the current graphics device (i.e., DEVICE, DECOMPOSED=0).

     If outputting to the PRINTER device, the aspect ratio of the image
     is always maintained and the POSITION coordinates are ignored.
     The image always printed in portrait mode.

 EXAMPLE:
     To display an image with a contour plot on top of it, type:

        filename = FILEPATH(SUBDIR=['examples','data'], 'worldelv.dat')
        image = BYTARR(360,360)
        OPENR, lun, filename, /GET_LUN
        READU, lun, image
        FREE_LUN, lun

        thisPosition = [0.1, 0.1, 0.9, 0.9]
        TVSCALE, image, POSITION=thisPosition, /KEEP_ASPECT_RATIO
        CONTOUR, image, POSITION=thisPosition, /NOERASE, XSTYLE=1, $
            YSTYLE=1, XRANGE=[0,360], YRANGE=[0,360], NLEVELS=10

 MODIFICATION HISTORY:
      Written by:     David Fanning, 27 May 1999 from TVIMAGE code.
      Added MIN, MAX, and NCOLORS keywords 28 May 1999. DWF.
      Added the OVERPLOT keyword to allow plotting on POSITION coordinates
         estabished by the preceding graphics command. 11 Oct 99. DWF.
      Added NOINTERPOLATION keyword so that nearest neighbor interpolation
         is performed rather than bilinear. 3 Dec 99. DWF
      Brought the TVSCALE code up to date with TVIMAGE code. 3 April 2000. DWF.
      Brought the TVSCALE code up to date with TVIMAGE code. 6 May 2000. DWF.
      Change MIN and MAX keywords to MINVALUE and MAXVALUE to prevent
         ambiguous keyword errors. 27 July 2000. DWF.
      Brought up to date with changes in TVImage. 23 Sept 2000. DWF.
      Fixed a small problem with handling images that are slices from 3D image cubes. 19 Oct 2000. DWF


TVSCL_IMAGE

[List of Routines] (See ./display/tvscl_image.pro)

 Project     : SOHO - LASCO

 Name        : 

 Purpose     : 

 Category    : 

 Explanation : 

 Syntax      : 

 Examples    : 

 Inputs      : None

 Opt. Inputs : None

 Outputs     : None

 Opt. Outputs: None

 Keywords    : None

 Common      : 

 Restrictions:                                  

 Side effects: Not known

 History     : Version 1, 02-Sep-1995, B Podlipnik. Written

 Contact     : BP, borut@lasco1.mpae.gwdg.de


TWO2ONE

[List of Routines] (See ./util/two2one.pro)

 NAME:
       TWO2ONE
 PURPOSE:
       Convert from 2-d indices to 1-d indices.
 CATEGORY:
 CALLING SEQUENCE:
       two2one, ix, iy, arr, in
 INPUTS:
       ix, iy = 2-d indices.                 in
       arr = array to use (for size only).   in
         Alternatively, arr can be [nx, ny]
         where nx and ny are the image sizes
         in x and y (saves space).
 KEYWORD PARAMETERS:
 OUTPUTS:
       in = equivalent 1-d indices.          out
 COMMON BLOCKS:
 NOTES:
 MODIFICATION HISTORY:
       R. Sterner, 7 May, 1986.
       Johns Hopkins Applied Physics Lab.
       R. Sterner, 19 Nov, 1989 --- converted to SUN
       R. Sterner, 15 Feb, 1993 --- fixed a bug in the [nx,ny] case.

 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.


T_CARTES

[List of Routines] (See ./display/t_cartes.pro)


 NAME:
	T_CARTES
 PURPOSE:
	To convert polar co-ordinates into cartesians (reverse of T_POLAR)
 CATEGORY:
	Image manipulation.
 CALLING SEQUENCE:
	T_CARTES,IMAGE_IN,IMAGE_OUT,XC,YC,RAD1,RAD2,AZ1,AZ2,COL,LIN
 INPUTS:
	IMAGE_IN = input image
	XC,YC = centre of rotation
	RAD1,RAD2 = inner and outer radius
	AZ1,AZ2 = starting and finishing azimuth in degrees.
	COL,LIN = the number of columns and lines in the output
 OPTIONAL INPUT PARAMETERS:
	NONE
 OUTPUTS:
	IMAGE_OUT = output image
 OPTIONAL OUTPUT PARAMETERS:
	NONE
 COMMON BLOCKS:
	NONE
 SIDE EFFECTS:
	NONE
 RESTRICTIONS:
	NOTE THAT NO MASK IS APPLIED SO THERE WILL BE EDGE EFFECTS
 PROCEDURE:
	TRIVIAL
 MODIFICATION HISTORY:
	5-12-89  NT
	14-06-1993  NT   Version 3.0


T_PARAM.PRO

[List of Routines] (See ./las-c2/t_param.pro)

 PROJECT:
      SOHO - LASCO
 NAME:
     t_param.pro
 PURPOSE:
     Gets main telescope parameters
 CALLING SEQUENCE:
     value = t_param( detector, key )
 EXAMPLE
     pixsze = t_param('C2','PIXEL')
 INPUTS:
     detector   'C1','C2','C3'                       STRING
     key        parameter name                       STRING
                'PIXEL'   pixelsize  (in mm)
                'SCALE'   angular scale for pixel  (in deg)
                'FOCAL'   equivalent focal (in mm)
                'FIELD'   field (in deg)
                'DFIELD'  diagonal field (in deg)
                'BIAS'    electric bias of each amplifier (in ADU)
                            get byas from  offset_bias.pro (needs the header)
                'OCCULTER' radius of occlusion due to internal oculter
                           in 'CCD pixel units'
                'DISTORTION' set of coefs of distortion (to be used in mm)
                              NOTE: drho = a0*rho+a1*rho^3+a2*rho^5
                'DISCNTR' distortion center (in mm)
                'CENTER'  Sun center (in pixels)
                'OCCENTER' occulter center (in pixels)
 KEYWORD INPUT
     none
 OUTPUTS:
     value      searched value
 OUTPUTS INPUTS:
     none
 PROCEDURE:
     Gets parameters from a set of internal data 
 CALLED PROCEDURES:
     none

 HISTORY:
     Def. and code: A.Llebaria (LAS-CNRS)    Aug 1996 
     Corrected and modified by Dr. M.-V. Bout on March, 4th, 1998
 NOTA :

   Distortion parameters:               ; rho*(a0+a1*rho^2+a2*rho^4)
   history
           pm.distortion = [0.0060519645, -0.00014672423, 2.0899603e-07]
 list9604_1ora_00_g_ldist.dat
           pm.distortion = [0.0051344125, -0.00012233862, 1.0978595e-07]  
 list9603_1ora_00_a_ldist.dat
           pm.distortion = [0.0044836143, -0.00011276272, 5.9968042e-08]  
 list9602_2ora_00_a_ldist.dat
           pm.distortion = [0.0051344125, -0.00012233862, 1.0978595e-07]  
 list9603_1ora_00_a_ldist.dat
           pm.distortion = [0.0056511656, -0.00013827504, 1.6940201e-07]  
 list9604_1ora_00_h_ldist.dat


T_POLAR

[List of Routines] (See ./display/t_polar.pro)


 NAME:
	T_POLAR
 PURPOSE:
	Polar coordinate transform
 CATEGORY:
	Image manipulation.
 CALLING SEQUENCE:
	T_POLAR,P,P1,X,Y,RAD1,RAD2,AZ1,AZ2,COL,LIN
 INPUTS:
	P = input array
	X,Y = centre of rotation
	RAD1,RAD2 = inner and outer radius
	AZ1,AZ2 = starting and finishing azimuth in degrees.
	COL = number of samples in radius
	LIN = number of samples in azimuth
 OPTIONAL INPUT PARAMETERS:
	NONE
 KEYWORDS:
	NONE
 OUTPUTS:
	P1 = OUTPUT ARRAY
 OPTIONAL OUTPUT PARAMETERS:
	NONE
 COMMON BLOCKS:
	NONE
 SIDE EFFECTS:
	NONE
 RESTRICTIONS:
	NONE
 PROCEDURE:
	TRIVIAL
 MODIFICATION HISTORY:
	10-JUN-1987  NT
	5-12-1989  NT  Modified to speed up but uses larger arrays!!
	14-6-1993  NT  Version 3.0 IDL


UNDEFINE

[List of Routines] (See ./display/undefine.pro)

 Project	: SOHO - LASCO/EIT

 Name		: UNDEFINE

 Purpose	: 

 Category	: Utilities, Array

 Explanation	: 

 Syntax	: undefine, a

 Examples      :

 Inputs	: 

 Opt. Inputs	: 

 Outputs	: 

 Opt. Outputs	:

 Keywords	: 

 Common	:

 Restrictions  : None.

 Side effects	: None.

 History	: 12 jun 1993,Alo Eple, MPAe,Written

 Contact	:


UNIQ_NOSORT

[List of Routines] (See ./util/uniq_nosort.pro)

 NAME:
       UNIQ_NOSORT

 PURPOSE:
       Return the subscripts of the unique elements in an array.
       Does not require array to be sorted (as in UNIQ).

 CATEGORY:
       Array manipulation.

 CALLING SEQUENCE:
       UNIQ_SORT(Array)

 INPUTS:
       Array:  The array to be scanned.  

 OUTPUTS:
       An array of indicies into ARRAY is returned.  The expression:

               ARRAY(UNIQ_NOSORT(ARRAY))

       will be a copy of the sorted Array with duplicate elements removed.

 COMMON BLOCKS:
       None.

 Written     : Scott Paswaters, NRL, Dec 1996.

 SCCS variables for IDL use
 
 @(#)uniq_nosort.pro	1.1 05/14/97 :NRL Solar Physics



UNPACK_ALL_SCIENCE

[List of Routines] (See ./reduce/unpack_all_science.pro)

 NAME:				UNPACK_ALL_SCIENCE

 PURPOSE:			Main program to unpack all science TM files
				from DACS, or ECS into raw DDIS files

 CATEGORY:			REDUCTION

 CALLING SEQUENCE:		UNPACK_ALL_SCIENCE, Date

 INPUTS:			None

 OPTIONAL INPUTS:		Date = Date to be processed, YYMMDD
				       If date is not present, then all
				       science files in $LEB_IMG will be 
				       processed.
	
 KEYWORD PARAMETERS:		/QKL	Set to process only QKL files

 OUTPUTS:			None

 OPTIONAL OUTPUTS:		None

 COMMON BLOCKS:		unpack_science

 SIDE EFFECTS:

 RESTRICTIONS:

 PROCEDURE:

 EXAMPLE:

 MODIFICATION HISTORY:		Written  RA Howard, NRL
    Version 1   RAH, 21 Dec 1995,    Initial Release
    Version 2   RAH, 23 Dec 1995,    Changed to read in QKL and REL files
    Version 3   RAH, 25 Dec 1995,    Added call to reduction processing
    Version 4   RAH, 28 Dec 1995,    Removed call to reduction processing
    Version 5   SEP, 14 Jan 1996,    Sort QKL/REL by time
    Version 6   RAH, 19 Jan 1996,    Modified FP file names
    Version 7   RAH, 26 Jan 1996,    Corrected write if nwds=0
    Version 8   RAH, 22 Apr 1996,    Mods for TM returning after 0 or FF
    Version 9   RAH, 01 Aug 1996,    Added check for end of packet
    Version 10  RAH, 27 Aug 1996,    Correct ddis_name for duplicate times
    Version 11  SEP, 12 Dec 1996,    Sort High & Low packets by time
    Version 12  NBR, 29 Dec 1997,    Ensure pkidwd is less than pktsize in 
					UNPACK_SCIENCE_PACKET
    Version 13  NBR, 13 May 1998,    Fix findfile to not find *.SDU files
    Version 14  NBR,  4 Nov 1998,    Call SPLIT_QKL.pro for QKL files
    Version 15  NBR, 16 Nov 1998,    Added QKL keyword
    Version 16  NBR, 11 Dec 1998,    Do not call SPLIT_QKL with QKL keyword
    Version 17  NBR,    Feb 2000,    Fix unpack_science_packet again
    Version 18  NBR,    May 2000,    Fix endelse in unpack_science_packet
    Version 19  NBR, 31 Jan 2002,    Add /SH to spawn calls


       02/01/02 @(#)unpack_all_science.pro	1.15 LASCO IDL LIBRARY


UNPACK_LZ_SCIENCE

[List of Routines] (See ./reduce/unpack_lz_science.pro)

 NAME:				UNPACK_LZ_SCIENCE

 PURPOSE:			Main program to unpack all science TM files
				from Level-0 disks into raw DDIS files

 CATEGORY:			REDUCTION

 CALLING SEQUENCE:		UNPACK_LZ_SCIENCE [, filenames]

 INPUTS:			None

 OPTIONAL INPUTS:		Name of d01 file[s] to be processed
	filenames	STR or STRARR	 Ex.: '70750101.d01'
	
 KEYWORD PARAMETERS:		None

 OUTPUTS:			None

 OPTIONAL OUTPUTS:		None

 COMMON BLOCKS:		unpack_science

 SIDE EFFECTS:

 RESTRICTIONS:

 PROCEDURE:

 EXAMPLE:

 MODIFICATION HISTORY:		Written  RA Howard, NRL
    Version 1   RAH, 21 Dec 1995,    Initial Release
    Version 2   RAH, 23 Dec 1995,    Changed to read in QKL and REL files
    Version 3   RAH, 25 Dec 1995,    Added call to reduction processing
    Version 4   RAH, 28 Dec 1995,    Removed call to reduction processing
    Version 5   SEP, 14 Jan 1996,    Sort QKL/REL by time
    Version 6   RAH, 19 Jan 1996,    Modified FP file names
    Version 7   RAH, 26 Jan 1996,    Corrected write if nwds=0
    Version 8   RAH, 28 Feb 1996,    Mods for level-0
    Version 9   RAH, 21 Apr 1996,    Corrected when TM comes back after off
    Version 10  RAH, 04 Aug 1996,    Don't process if date < May 1996
					because getting disks out of order
					Also check for end of packet
    Version 11  RAH, 29 Aug 1996,    Correct ddis_name for duplicate times
    Version 12  RAH, 03 Sep 1996,    Correct for time jumps
    Version 13  RAH, 04 Feb 1997,    Correct high/low rate packet lengths
    Version 14  NBR,  3 Aug 1998,    Allow optional input of search parameter
    Version 15  NBR, 28 Jan 1998,    Check for gaps in packet file
    Version 16  NBR, 13 Sep 1999,    Stop for gaps of 10 min. or more
    Version 17 NBR, Feb 2000,	'first GT 0' instead of 'keyword_set(first)'; 
	If apid NE '88ac' or '88af' then skip packet and go on to the next
    Version 18 NBR, Apr 2000,  Fix case where most of packet is 255 (skip the packet)
    Version 19 NBR, 31 Jan 2002 - Add /SH to spawn calls
    03.10.09, nbr - Allow input of d01 filename(s)
    03/12/18 - KB - Changed findfiles() to findfiles('*d01') in Line #610


	@(#)unpack_lz_science.pro	1.28 12/18/03 LASCO IDL LIBRARY


UNPACK_REDUCE_MAIN

[List of Routines] (See ./reduce/unpack_reduce_main.pro)

 NAME:				UNPACK_REDUCE_MAIN

 PURPOSE:			Main program to perform pipeline processing 
                               on a file created by unpack_science 

 CATEGORY:			REDUCTION

 CALLING SEQUENCE:		UNPACK_REDUCE_MAIN, Filename, Src

 INPUTS:			Filename = file name to process
                        	Src = 1 for processing QL files at NRL
 				      2 for processing Level-0 files at NRL

 OPTIONAL INPUTS:		None
	
 KEYWORD PARAMETERS:		None

 OUTPUTS:			None

 OPTIONAL OUTPUTS:		None

 COMMON BLOCKS:		DBMS

 SIDE EFFECTS:

 RESTRICTIONS:

 PROCEDURE:

 EXAMPLE:

 MODIFICATION HISTORY:		Written  RA Howard, NRL
    Version 1   RAH, 25 Dec 1995,    Modified from REDUCE_MAIN, V3
    Version 2	NBR, 31 Jan 2002 - Add /SH to spawn calls

       @(#)unpack_reduce_main.pro	1.2 02/01/02 LASCO IDL LIBRARY


UPDATE_HDR_ROLLXY

[List of Routines] (See ./reduce/update_hdr_rollxy.pro)

 NAME:
       UPDATE_HDR_ROLLXY 

 PURPOSE:
       This function updates a level-1 hdr with the solar roll angle, sun xpos
       and sun ypos obtained from stars and also their running median
       equivalents. It also writes the number of stars used to calculate
       the center and total number of stars that could have been used. 
       Center values from time files start with 0 but in FTS header
       starts with 1, therefore 1 is added to these when updating the
       header.

 CATEGORY:
       LASCO_ANALYSIS

 CALLING SEQUENCE:
       Result = UPDATE_HDR_ROLLXY (Hdr)

 INPUTS:
       Hdr:      A LASCO header structure

 OUTPUTS:
       1:        Update Success
       0:        Update Failure

 PROCEDURE:
	Update the hdr using the time files as defined in the
	c*_rollxy_yymmdd.dat format files.

 MODIFICATION HISTORY:
       Written by:     98/10/06  Ed Esfandiari 


UPDATE_MPG

[List of Routines] (See ./movie/update_mpg.pro)

 Project     : SOHO - LASCO/EIT
                   
 Name        : UPDATE_MPG
               
 Purpose     : Updates 13-day mpegs and writes daily mpegs for yesterday.

 Calls       : 

 Comments    : 
               
 Side effects: None.
               
 Category    : Image Display.  Animation.
               
 Written     : Nathan Rich, NRL jan. 2000. Based on RTMVI.PRO
               
 Version     :

 
	11/02/01 @(#)update_mpg.pro	1.1 :LASCO IDL LIBRARY


UTC2YYMMDD

[List of Routines] (See ./util/utc2yymmdd.pro)

 NAME:
	UTC2YYMMDD

 PURPOSE:
	This function converts a modified julian date structure into a date 
	string in the format yymmdd 

 CATEGORY:
	UTIL

 CALLING SEQUENCE:
	Result = UTC2YYMMDD(Utc)

 INPUTS:
	Utc:	Universal time in the CDS time structure

 OPTIONAL KEYWORDS:
	Use /HHMMSS to have '_HHMMSS' added.  Ex result: 'YYMMDD_HHMMSS'
	Use /YYYY to have 4 digit year.  Ex result: 'YYYYMMDD_HHMMSS'

 OUTPUTS:
	This function returns a date string in the format YYMMDD.

 MODIFICATION HISTORY:
 	Written by:	RA Howard, 1995

 	  Updated :	97/01/28 SE Paswaters - Added /HHMMSS keyword
 	  Updated :	97/12/15 SE Paswaters - Added /HHMMSS keyword

	@(#)utc2yymmdd.pro	1.2 05/14/97 LASCO IDL LIBRARY


UTILITIES

[List of Routines] (See ./las-c2/utilities.pro)

.NAME:
	utilities.pro

.PURPOSE:
	Define a bunch of handy IDL utilities.

.COMMENT:
	Compile with ".run utilities" from IDL V2.

.AUTHOR:
	Hans-Martin Adorf
	Space Telescope - European Coordinating Facility
	European Southern Observatory
	D-8046 Garching bei Muenchen
	Karl-Schwarzschild-Str. 2
	F.R. Germany
	Internet: adorf@eso.org		SPAN:  ESO::ADORF or adorf@eso.span

.MODIFICATION HISTORY:
	Jul 1990	HMA	Initial implementation
	Aug 1990	HMA	Further improvements
	Sep 1991	HMA	Some comments provided
       Oct 1991	HMA	Added new features
       Feb 1992        HMA     Added new utilities
       jan 1994        M.B     Truncated version for IDL v 3.1.1 <==> LASCO

.TO DO
	Introduce global variables to control, e.g. the verbosity of
	graphics and image display of intermediate results.


VALIDLASCODIR

[List of Routines] (See ./inout/validlascodir.pro)

NAME:
	VALIDLASCODIR

PURPOSE:
	This procedure (called by others) determines if the directory is
	valid

CALLING SEQUENCE:
	Result = VALIDLASCODIR (Sd,Camera,Silent)

INPUTS:
	Sd:	A string giving the date directory (YYMMDD)
	Camera:	A two-character string describing which camera is
		desired.  Acceptable choices for camera are: "c1",
		"c2","c3", or "c4".  Camera is case-insensitive.
	SILENT:	Supress output of all error messages except lower-
		level IDL and system messages.

OUTPUTS:
	This function returns a string specifiying the directory in
	which desired images can be found.

RESTRICTIONS:
	You must have the LASCO/EIT image file system mounted on
	the machine your are running IDL from.

EXAMPLE:
	dir=validlascodir('960531','C1',silent)

AUTHOR: Scott Hawley, NRL, June 27, 1996
	7/12/96	SHH, Generates directory names for cplex2
	9/22/96	RAH, NRL Addapted from LZ_GETLASCODIR


	@(#)validlascodir.pro	1.2 10/17/96 LASCO IDL LIBRARY


VAR_IN

[List of Routines] (See ./display/var_in.pro)

 Project     :

 Name        :	VAR_IN

 Purpose    :import image array and image header
                               in lasco_block

 Category    :	LASCO

 Explanation :

 Syntax      :	var_in,a,h

 Examples    :

 Inputs      :	array variable, structure for header

 Opt. Inputs :	

 Outputs     :			 

 Opt. Outputs:	

 Keyword     :	None

 Common      :		

 Restrictions: None

 Side Effects:	lasco_block

 History     : 1/28/94, B. PODLIPNIK, Written
                SCCS variables for IDL use

 Contact     : BP, borut@lasco1.mpae.gwdg.de


VDHAN[1]

[List of Routines] (See ./data_anal/vdhan.pro)

 NAME:
	VDHAN

 PURPOSE:
	This function computes the "an" coefficient in equation 24 of van de 
	Hulst's paper

 CATEGORY:
	LASCO DATA_ANALYSIS

 CALLING SEQUENCE:
	VDHAN,N

 INPUTS:
	N:	The index of the term

 OUTPUTS:
	This function returns the an coefficient.

 RESTRICTIONS:
	The index must be positive and less than 34.

 PROCEDURE:
	The procedure computes the an coefficient in equations 24a and 24b of 
	van de Hulst, ;	Bull Astron Institutes Netherlands, vol XI, 2 Feb 1950, 
	pp143.  The definition of the coefficient is given in equation 25:
	
	an = pi * n! / ((n/2)!)^2 / 2^(n+1)

 EXAMPLE:

 MODIFICATION HISTORY:
 	Written by:	RA Howard, NRL, 27 Nov 1998

	@(#)vdhan.pro	1.4 11/02/01 LASCO IDL LIBRARY


VDHAN[2]

[List of Routines] (See ./data_anal/vdhan_new.pro)

 NAME:
	VDHAN

 PURPOSE:
	This function computes the "an" coefficient in equation 24 of van de 
	Hulst's paper

 CATEGORY:
	LASCO DATA_ANALYSIS

 CALLING SEQUENCE:
	VDHAN,N

 INPUTS:
	N:	The index of the term

 OUTPUTS:
	This function returns the an coefficient.

 RESTRICTIONS:
	The index must be positive and less than 34.

 PROCEDURE:
	The procedure computes the an coefficient in equations 24a and 24b of 
	van de Hulst, ;	Bull Astron Institutes Netherlands, vol XI, 2 Feb 1950, 
	pp143.  The definition of the coefficient is given in equation 25:
	
	an = pi * n! / ((n/2)!)^2 / 2^(n+1)

 EXAMPLE:

 MODIFICATION HISTORY:
 	Written by:	RA Howard, NRL, 27 Nov 1998

	@(#)vdhan_new.pro	1.1 11/02/01 LASCO IDL LIBRARY


VDHCOEFF

[List of Routines] (See ./data_anal/vdhcoeff.pro)

 NAME:
	VDHCOEFF

 PURPOSE:
	This procedure returns the Van de Hulst coefficients for electron scattering.

 CATEGORY:
	LASCO Data Analysis

 CALLING SEQUENCE:
	VDHCOEFF,RADII,Q,AVDH,BVDH

 INPUTS:
	RADII:	Array of positions above sun center in solar radii
	Q;	Limb darkening coefficient

 OUTPUTS:
	AVDH:	Van de Hulst "A" coefficient
	BVDH:	Van de Hulst "B" coefficient

 COMMON BLOCKS:
	COM_ELTHEORY:	R,AEL,BEL,CEL,DEL

 PROCEDURE:
	The functions that describe the scattering of photospheric sunlight from 
	electrons have been developed by van de Hulst (Bulletin of the Astronomical 
	Institutes of the Netherlands, Volume XI, Number 410, February 2, 1950, 
	pp 135-150.  The equations were originally developed in a different form by 
	Minnaert (Zeitschrift fur Astrophysics, Vol 1, 209, 1930) and are included 
	in Billings book "A Guide to the Solar Corona.  The IDL routine, ELTHEORY 
	in the NRL IDL library, computes the Minnaert coefficients, which are only 
	slightly different from the van de Hulst functions in equations 11 and 12 of 
	his paper.  To compute the electron densities from pB, the VDH functions, 
	A and B, are quite useful.
	
	The routine ELTHEORY is called to return the Minnaert coefficients and then 
	the VDH coefficients are computed from them.

 EXAMPLE:
	To return the VDH coefficients, you must specify an array for the radial 
	distance from the sun and the limb darkening coefficient.  

	VDHCOEFF,R,Q,A,B

 MODIFICATION HISTORY:
 	Written by:	RA Howard, 27 Nov 1998..

	@(#)vdhcoeff.pro	1.3 10/27/99 LASCO IDL LIBRARY


VDH_INVERSION

[List of Routines] (See ./data_anal/vdh_inversion.pro)

 NAME:
	VDH_INVERSION

 PURPOSE:
	This function does the inversion of a radial fit to pB to electron density.

 CATEGORY:
	LASCO DATA_ANALYSIS

 CALLING SEQUENCE:
	VDH_INVERSION,Radii,Q,Coeff,Exps

 INPUTS:
	Radii:	An array of radial points for which the inversion is to be done
	Q:	The limb darkening parameter (0<1)
	Coeff:	The coefficients in the fit of pB versus R
	Exps:	The coefficients in the expansion of pB versus R

 OUTPUTS:
	This function returns the electron density inverted from the fit of pB.

 RESTRICTIONS:
	The pB fit is assumed to be only of the K-corona.  Any F-coronal 
	contribution must be removed.
	The pB fit coefficients must be a polynomial of the form, r^(-n).
	The exponents don't need to be incrementing by 1 and may be 
	fractional.

 PROCEDURE:
	The procedure follows the method of van de Hulst, Bull Astron Institutes 
	Netherlands, vol XI, 2 Feb 1950, pp135-150

	The Ne is assumed to be axially symmetic.

 EXAMPLE:

 MODIFICATION HISTORY:
 	Written by:	RA Howard & Andrew Hayes, NRL, Dec 1998

	@(#)vdh_inversion.pro	1.2 10/08/00 LASCO IDL LIBRARY


VIEWLIST

[List of Routines] (See ./movie/viewlist.pro)

ro viewlist, list, minv, maxv, DELAY=delay, LOOP=loop, PAN=pan, HALT=halt, $
   RDIFF=rdiff, DIFF=diff, SHOW_KEYWORD=show_keyword, HISTEQUAL=histequal

 View a list of image files, loading 1 at a time.

 INPUT:
  list		STRARR, list of files

 OPTIONAL INPUT:
  minv     min scale value
  maxv     max scale value

 KEYWORDS:
  DELAY	Set to number of seconds between frames
  LOOP		Repeat display of sequence; if =1, then indefinitely
  PAN		rebin/congrid by a factor or fraction
  HALT		advance images with '.cont' at command line
  RDIFF    	Running difference images
  DIFF=n     	Difference with the nth image in list (first is default)
  SHOW_KEYWORD Print value of given FITS keyword before displaying each image
  HISTEQUAL	Display with histogram equalization

 Written 11Jul2002 by N. Rich, NRL/Interferometrics

 04.01.21, nbr - Add PAN
 04.03.25, nbr - Add Halt
 04.10.18, nbr - add diff and rdiff

 @(#)viewlist.pro	1.2 12/21/04 LASCO NRL IDL Library


VIGNETTAGE[1]

[List of Routines] (See ./las-c2/vignettage.pro)


unction vignettage,xc,yc
;  created by M.B on 02/02/94 at LAS
;  modified by M.B on 04/03/94 at LAS
;  construction of a normalized model of vignetting function for LASCO
;  This model can be used for vignetting of solar corona frames
;  inputs :
;
;          xc,yc   center coordinates of internal occultor
;
;  outputs :
;          model         name of the resultant image
;
;  restrictions :
;          the generated model is 512*512 pixels


VIGNETTAGE[2]

[List of Routines] (See ./las-c2/vignettage.pro)

 NAME:                        crevig.pro
 PURPOSE:                     construction of the vignetting function for
                              LASCO/C2 coronagraph using the bidimensionnal
                              convolution filtering method
 CATEGORY:                    Processing high level
 CALLING SEQUENCE:            crevig,ima_name,off_x,off_y
 INPUTS:                      ima_name      name of the simulation result
                              off_x,off_y   off-centering of the occultor

 OPTIONAL INPUT PARAMETERS:   None
 KEYWORD PARAMETERS:          None
 OUTPUTS:                     image of given name

 OPTIONAL OUTPUT PARAMETERS:  None
 COMMON BLOCKS:               None
 SIDE EFFECTS:                None
 RESTRICTIONS:                This procedure is adapted to 512*512 frames
 PROCEDURE:
 MODIFICATION HISTORY:   defined by M.B 02/07/94

 SCCS variables for IDL use

 @(#)crevig.pro  v 1.0 02/07/94 :LAS


VIGNETTAGE[2]

[List of Routines] (See ./las-c2/vignettage.pro)

unction lunule,R1,R2,d


VIGNETTAGE[3]

[List of Routines] (See ./las-c2/vignettage.pro)


ro crevig,ima_name,off_x,off_y


W256

[List of Routines] (See ./util/w256.pro)

NAME
	w256

PURPOSE
	To assure an IDL color table with the full 256 colors.

CALLING EXAMPLE
	w256

RESULT
	IDL will use full 256 colors for the rest of the session.
	In order to achieve this the color table of a window is only
	correct when the cursor is on a window.  The outcome here
	is like that of 'Netscape -install'.

RESTRICTIONS
	This will only work if done BEFORE any other windows are
	opened with a "window" or "wdsef" command.  Do it first thing
	upon beginning a session.

HISTORY
	Written by S.Paswaters, NRL, 1997/10/21
	 6/ 6/01, nbr - Add header notes.
	  


WC2P

[List of Routines] (See ./display/wc2p.pro)

 Project     : SOHO - LASCO/EIT

 Name	      : WC2P

 Purpose     : 

 Category    : Widgets

 Explanation : 

 Syntax      : wc2p

 Examples    :

 Inputs      : 

 Opt. Inputs : 

 Outputs     : 

 Opt. Outputs:

 Keywords    : 

 Common      :

 Restrictions: 

 Side effects: None.

 History     : 26-sep-1995,Borut Podlipnik, MPAe,Written 

 Contact     : BP, borut@lasco1.mpae.gwdg.de


WCALCL

[List of Routines] (See ./display/wcalcl.pro)

 Project	: SOHO - LASCO/EIT

 Name		: WCALCL 

 Purpose	: 

 Category      : Widgets

 Explanation	: 

 Syntax	: wcalcl

 Examples      :

 Inputs	: 

 Opt. Inputs	: 

 Outputs	: 

 Opt. Outputs	:

 Keywords	: 

 Common	:

 Restrictions  : None.

 Side effects	: None.

 History	: 12-jun-1994,Borut Podlipnik, MPAe, Written

 Contact       : BP, borut@lasco1.mpae.gwdg.de


WCALCNEW

[List of Routines] (See ./display/wcalcnew.pro)

 Project     : SOHO - LASCO/EIT

 Name	      : WCALCNEW

 Purpose     : 

 Category    : Widgets

 Explanation : 

 Syntax      : wcalcnew

 Examples    :

 Inputs      : 

 Opt. Inputs : 

 Outputs     : 

 Opt. Outputs:

 Keywords    : 

 Common      :

 Restrictions: None.

 Side effects: None.

 History     :  12-jun-1994,Borut Podlipnik, MPAe,Written

 Contact     : BP, borut@lasco1.mpae.gwdg.de


WCANCEL

[List of Routines] (See ./display/wcancel.pro)

 Project     : SOHO - LASCO/EIT
                   
 Name        : WRUNMOVIE
               
 Purpose     : Widget tool to display animation sequence.
               
 Explanation : This tool allows the user to view a series of images as
		an animation sequence.  The user can control the direction,
		speed, and number of frames with widget controls.
               
 Use         : IDL> WRUNMOVIE, NAMES=names
    
 Inputs      : None.
               
 Outputs     : None.
               
 Keywords    : NAMES	Labels to display for frames.  STRARR()

 Calls       : 

 Restrictions: Data frames must be preloaded into pixmap 9, size(xsize,ysize*len).
               Use mkmovie.pro to load into pixmap.
               
 Side effects: None.
               
 Category    : Image Display.  Animation.
               
 Written     : Scott Paswaters, NRL Feb. 13 1996.
               
 Modified    : 

 Version     : 


WCURRENT

[List of Routines] (See ./display/wcurrent.pro)

 Project	: SOHO - LASCO/EIT

 Name		: WCURRENT 

 Purpose	: 

 Category      : Widgets

 Explanation	: 

 Syntax	: wcurrent

 Examples      :

 Inputs	: 

 Opt. Inputs	: 

 Outputs	: 

 Opt. Outputs	:

 Keywords	: 

 Common	:

 Restrictions  : None.

 Side effects	: None.

 History	: 12-jun-1994,Borut Podlipnik, MPAe, Written

 Contact       : BP, borut@lasco1.mpae.gwdg.de


WCURSOR

[List of Routines] (See ./display/wcursor.pro)

 Project	: SOHO - LASCO/EIT

 Name		: WCURSOR

 Purpose	: Widgets program for reading current cursor position from ;window.

 Category	: Widgets

 Explanation	: 

 Syntax	: wcursor,image,x,y,counts,win_id=win_id

 Examples      :

 Inputs	: image

 Opt. Inputs	: 
	x variable for cursor position
	y variable for cursor position
	counts variable

 Outputs	: 
	current x and y position if set as optional input parameter
	counts value at x,y if set as optional input parameter.

 Opt. Outputs	: 
	current x position
	current y position
	counts = image(x,y)

 Keywords	: win_id, if not set then current window will be read and set.

 Common	:

 Restrictions  : No check for not valid windows yet !

 Side effects	: None.

 History	:1-dec-1994, Borut Podlipnik, MPAe, Written

 Contact     : BP, borut@lasco1.mpae.gwdg.de


WDEF_LOAD

[List of Routines] (See ./display/wdef_load.pro)

 Project     : SOHO - LASCO/EIT

 Name	      : WSAVE_PS

 Purpose     : 

 Category    : Widgets

 Explanation : 

 Syntax      : wsave_ps

 Examples    :

 Inputs      : 

 Opt. Inputs : 

 Outputs     : 

 Opt. Outputs:

 Keywords    : 

 Common      :

 Restrictions: set default PS keywords.

 Side effects: None.

 History     : 20-jun-1995,Borut Podlipnik, MPAe,Written 

 Contact     : BP, borut@lasco1.mpae.gwdg.de


WDMEMORY

[List of Routines] (See ./display/wdmemory.pro)

 Project     : SOHO - LASCO

 Name        : WDMEMORY 

 Purpose     : 

 Category    : 

 Explanation : 

 Syntax      : 

 Examples    : 

 Inputs      : None

 Opt. Inputs : None

 Outputs     : None

 Opt. Outputs: None

 Keywords    : None

 Common      : 

 Restrictions:                                  

 Side effects: Not known

 History     : Version 1, 02-Sep-1995, B Podlipnik. Written

 Contact     : BP, borut@lasco1.mpae.gwdg.de


WFLIMB

[List of Routines] (See ./display/wflimb.pro)

Program      : WFLIMB.PRO

 Name        : 

 Purpose     : 

 Category    : 

 Explanation : 

 Syntax      : 

 Examples    : 

 Inputs      : None

 Opt. Inputs : None

 Outputs     : None

 Opt. Outputs: None

 Keywords    : None

 Common      : 

 Restrictions:                                  

 Side effects: Not known

 History     : Version 1, 02-Sep-1995, B Podlipnik. Written

 Contact     : BP, borut@lasco1.mpae.gwdg.de


WHEADINFO

[List of Routines] (See ./display/wheadinfo.pro)

 Project     : SOHO - LASCO/EIT

 Name        : WMESSAGE

 Purpose     : 

 Category    : Widgets

 Explanation : 

 Syntax      : 

 Examples    : 

 Inputs      : 

 Opt. Inputs : 

 Outputs     : 

 Opt. Outputs:

 Keywords    : TITLE (a string containing the title to be used for the widget)
               LABEL (a string containing a message in WIDGET_LABEL)
               TEXT  (a string to display in WIDGET_TEXT) 
 Common      :

 Restrictions: None.

 Side effects: None.

 History     :  15-nov-1995,Borut Podlipnik, MPAe,Written

 Contact     : BP, borut@lasco1.mpae.gwdg.de


WHERE2D

[List of Routines] (See ./reduce/fuzzy/where2d.pro)

 PROJET:
	SOHO - LASCO

 NAME:
	WHERE2D

 PURPOSE:
	Performs the same job as the "where" function but for a 2D array

 PROCEDURE:
	Performs the same job as the "where" function, for a 2-dimentional
	array, but returns explicits a list of 2-D (x and y) subscripts,
	instead of 1-D subscripts for "where"

	Afterward, a 2-D subscripts array can be subscripted using the
	resulting subscript array w2d from where2d, with a sequence such as :
	arr( w2d(0,*), w2d(1,*) )   (instead of arr(w) with the where function)

 CATEGORY:
	Detection

 CALLING SEQUENCE:
	index2d = where2d(array [, count] )

 INPUTS:
	array		An array (or more generally an array expression)
			where the function will determine the nonzero elements

 OUTPUTS:
	The result is the list of 2-D subscripts of the nonzero elements, i.e.:
	_ if there are nonzero elements : a 2 x n array
	  the first and second columns contains respectively the x and y
	  subscripts of the non-zero elements of the array 
	_ if there are NO nonzero elements, the result is the scalar -1

 Optional OUTPUTS:
	count		the number of nonzero elements found by where2d
			(=number of rows of the output list, or 0 if empty)

 MODIFICATION HISTORY:
	v1.0 written by J.More, September 1996


WHIST

[List of Routines] (See ./display/whist.pro)

Program : WHIST.PRO

 Name        : 

 Purpose     : 

 Category    : 

 Explanation : 

 Syntax      : 

 Examples    : 

 Inputs      : None

 Opt. Inputs : None

 Outputs     : None

 Opt. Outputs: None

 Keywords    : None

 Common      : 

 Restrictions:                                  

 Side effects: Not known

 History     : Version 1, 02-Sep-1995, B Podlipnik. Written

 Contact     : BP, borut@lasco1.mpae.gwdg.de


WIC

[List of Routines] (See ./display/wic.pro)

 Project     : SOHO - LASCO/EIT

 Name	      : WIC

 Purpose     : widgets display countours

 Category    : Widget

 Explanation : REBIN image and then TVSCL to output device.

 Syntax      : wic

 Examples    :

 Inputs      : from wloadh

 Opt. Inputs : 

 Outputs     : 

 Opt. Outputs:

 Keywords    : 

 Common      : lasco.com

 Restrictions: None.

 Side effects: None.

 History     :  21-jan-1993,Borut Podlipnik, MPAe, Written

 Contact     : BP, borut@lasco1.mpae.gwdg.de


WIMG_INFO1

[List of Routines] (See ./display/wimg_info1.pro)

 Project     : SOHO - LASCO/EIT

 Name	      : WIMG_INFO1

 Purpose     : 

 Category    : Widgets

 Explanation : 

 Syntax      : wimg_info1

 Examples    :

 Inputs      : 

 Opt. Inputs : 

 Outputs     : 

 Opt. Outputs:

 Keywords    : 

 Common      :

 Restrictions: None.

 Side effects: None.

 History     :  12-jun-1994,Borut Podlipnik, MPAe,Written

 Contact     : BP, borut@lasco1.mpae.gwdg.de


WIMG_INFO2

[List of Routines] (See ./display/wimg_info2.pro)

 Project     : SOHO - LASCO/EIT

 Name	      : WIMG_INFO2

 Purpose     : 

 Category    : Widgets

 Explanation : 

 Syntax      : wimg_info2

 Examples    :

 Inputs      : 

 Opt. Inputs : 

 Outputs     : 

 Opt. Outputs:

 Keywords    : 

 Common      :

 Restrictions: None.

 Side effects: None.

 History     : 12-jun-1994,Borut Podlipnik, MPAe,Written 

 Contact     : BP, borut@lasco1.mpae.gwdg.de


WIMG_INFO3

[List of Routines] (See ./display/wimg_info3.pro)

 Project     : SOHO - LASCO/EIT

 Name	      : WIMG_INFO3

 Purpose     : 

 Category    : Widgets

 Explanation : 

 Syntax      : wimg_info3

 Examples    :

 Inputs      : 

 Opt. Inputs : 

 Outputs     : 

 Opt. Outputs:

 Keywords    : 

 Common      :

 Restrictions: None.

 Side effects: None.

 History     :  12-jun-1994,Borut Podlipnik, MPAe,Written

 Contact     : BP, borut@lasco1.mpae.gwdg.de


WIMG_INFO4

[List of Routines] (See ./display/wimg_info4.pro)

 Project     : SOHO - LASCO/EIT

 Name	      : WIMG_INFO4

 Purpose     : 

 Category    : Widgets

 Explanation : 

 Syntax      : wimg_info4

 Examples    :

 Inputs      : 

 Opt. Inputs : 

 Outputs     : 

 Opt. Outputs:

 Keywords    : 

 Common      :

 Restrictions: None.

 Side effects: None.

 History     :  12-jun-1994,Borut Podlipnik, MPAe,Written

 Contact     : BP, borut@lasco1.mpae.gwdg.de


WIN2PS

[List of Routines] (See ./util/win2ps.pro)

 NAME:
	WIN2PS

 PURPOSE:
	This routine reads the current window and colortable and saves it to 
	a postscript file in the current directory named win2ps.ps.

 CATEGORY:
	Utilities.  Output.

 CALLING SEQUENCE:

	WIN2PS

 INPUTS:
	None.

 OUTPUTS:
	None.

 SIDE EFFECTS:
	Creates a file in the current directory (or /tmp if no write permission) 
	named win2ps.ps.

 MODIFICATION HISTORY:
 	Written by:	S.E. Paswaters October, 1996

 	Modified:	96/12/12  SEP  Scaled image to 256 colors for postscript
 			00/10/18  RAH  Added option to not rescale image, default was to rescale

 SCCS variables for IDL use
 
 %W% %H% :NRL Solar Physics


WINFO_ACTIV

[List of Routines] (See ./display/winfo_activ.pro)

 Project     : SOHO - LASCO/EIT

 Name	      : WINFO_ACTIV

 Purpose     : 

 Category    : Widgets

 Explanation : 

 Syntax      : winfo_activ

 Examples    :

 Inputs      : 

 Opt. Inputs : 

 Outputs     : 

 Opt. Outputs:

 Keywords    : 

 Common      :

 Restrictions: None.

 Side effects: None.

 History     :  12-jun-1994,Borut Podlipnik, MPAe,Written

 Contact     : BP, borut@lasco1.mpae.gwdg.de


WLINES

[List of Routines] (See ./display/wlines.pro)

 Project     : SOHO - LASCO/EIT

 Name	      : WLINES

 Purpose     : plot scan lines

 Category    : Widgets

 Explanation : 

 Syntax      : wlines

 Examples    :

 Inputs      : 

 Opt. Inputs : 

 Outputs     : 

 Opt. Outputs:

 Keywords    : 

 Common      : lasco.com, wload.com, wplot.com

 Restrictions: None.

 Side effects: None.

 History     : 21-feb-1996,Borut Podlipnik, MPAe,Written 

 Contact     : BP, borut@lasco1.mpae.gwdg.de


WLISTER

[List of Routines] (See ./display/wlister.pro)

 Project     : SOHO - LASCO

 Name        : WLISTER

 Purpose     : Get a list of selected images.

 Category    : Widget 

 Explanation : This widget function will return a string array 
               with filenames and absolute path of selected images.

 Use         : IDL>list=wlister()

 Examples    : IDL>list=wlister()

 Inputs      : None

 Opt. Inputs : None

 Outputs     : A string array.

 Opt. Outputs: None

 Keywords    : None

 Common      : chandle.com, wload.com

 Restrictions: Requires specification of enviroment variables
               defined in file: instrument.def                                 

 Side effects: Not known

 History     : ; Version 2.5, 29-Sep-1997, bp
		15 Dec 1998  N Rich	Changed default source to LZ_IMG
               10 Feb 1999  A. Vourlidas, removed MODAL keyword from 
                            XMANAGER call to comply with IDL5.2  
               03 Jan 2000  D. Wang Y2K date fix
               07 Jan 2000  DAB Another Y2K date fix
		02 Mar 2001,NBR  Do not search LZ directory for available dates; add 
				informational messages
		19 Feb 2002, DAB - Quickpath Directory droplist fixed
		28 Jan 2003, NBR - Change findfile path in module FIND; add /VERBOSE

 Contact     : BP, borut@lasco1.mpae.gwdg.de
		Nathan Rich, nathan.rich@nrl.navy.mil

     %H% %W% LASCO NRL IDL LIBRARY


WLOAD

[List of Routines] (See ./display/wload.pro)

 Project     : SOHO - LASCO

 Name        : WLOAD

 Purpose     : Load image(s) in FITS format.

 Category    : SU:IMAGE_TOOL ?

 Explanation : This widget loader tool allows searching images
               in your archiv and at the end load it.

 Syntax      : IDL>wload

 Examples    : IDL>wload

 Inputs      : None

 Opt. Inputs : None

 Outputs     : None

 Opt. Outputs: None

 Keywords    : None

 Common      : dirs_files, lasco.com, wload.com

 Restrictions: Requires specification of enviroment variables
               defined in file: instrument.def                                 

 Side effects: Not known

 History     : Version 2.0, 28-Sep-1996, B Podlipnik. Written
               Version 2.1, 10-Oct-1996, bp               
		 change: replace CW_BSELECTOR with WIDGET_DROPLIST
               Version 2.2, 10-Oct-1996, bp
                add: SET_DROPLIST_SELECT to widget ID w_d_e, w_d_b 
               Version 2.3, 29-Oct-1996, bp
                change: bug fixed in loading from catalog
	                     Jan-07-2000 bp removed MODAL keyword  
					    Y2K date fixed 
               Jan 11, 2005 -- Updates (from J.Tappin) to add 2005 to date list 
                           -- bug fix -- remove /utc keyword from systime() call
                                   - Karl B, NRL

 Contact     : BP, borut@lasco1.mpae.gwdg.de


WLOADC

[List of Routines] (See ./display/wloadc.pro)

 Project     : SOHO - LASCO

 Name        : WLOADC

 Purpose     : Load image(s) in FITS format.

 Category    : SU:IMAGE_TOOL ?

 Explanation : This widget loader tool allows searching images
               in your archiv and at the end load it.

 Syntax      : IDL>wloadc

 Examples    : IDL>wloadc

 Inputs      : None

 Opt. Inputs : None

 Outputs     : None

 Opt. Outputs: None

 Keywords    : None

 Common      : dirs_files, lasco.com, wload.com

 Restrictions: Requires specification of enviroment variables
               defined in file: instrument.def                                 

 Side effects: Not known

 History     : Version 1, 02-Sep-1995, B Podlipnik. Written

 Contact     : BP, borut@lasco1.mpae.gwdg.de


WLOADINFO

[List of Routines] (See ./display/wloadinfo.pro)

 Project     : SOHO - LASCO/EIT

 Name	      : WLOADINFO

 Purpose     : 

 Category    : Widgets

 Explanation : 

 Syntax      : wloadinfo

 Examples    :

 Inputs      : 

 Opt. Inputs : 

 Outputs     : 

 Opt. Outputs:

 Keywords    : 

 Common      :

 Restrictions: None.

 Side effects: None.

 History     :  12-jun-1994,Borut Podlipnik, MPAe,Written

 Contact     : BP, borut@lasco1.mpae.gwdg.de


WLOADINFO1

[List of Routines] (See ./display/wloadinfo1.pro)

 Project     : SOHO - LASCO/EIT

 Name	      : WLOADINFO1

 Purpose     : 

 Category    : Widgets

 Explanation : 

 Syntax      : wloadinfo1

 Examples    :

 Inputs      : 

 Opt. Inputs : 

 Outputs     : 

 Opt. Outputs:

 Keywords    : 

 Common      :

 Restrictions: None.

 Side effects: None.

 History     :  12-jun-1994,Borut Podlipnik, MPAe,Written

 Contact     : BP, borut@lasco1.mpae.gwdg.de


WMESSAGE

[List of Routines] (See ./display/wmessage.pro)

 Project     : SOHO - LASCO/EIT

 Name	      : WMESSAGE

 Purpose     : 

 Category    : Widgets

 Explanation : 

 Syntax      : 

 Examples    : 

 Inputs      : 

 Opt. Inputs : 

 Outputs     : 

 Opt. Outputs:

 Keywords    : TITLE (a string containing the title to be used for the widget)
               LABEL (a string containing a message in WIDGET_LABEL)
               TEXT  (a string to display in WIDGET_TEXT) 
 Common      :

 Restrictions: None.

 Side effects: None.

 History     :  15-nov-1995,Borut Podlipnik, MPAe,Written

 Contact     : BP, borut@lasco1.mpae.gwdg.de


WOBSDATE

[List of Routines] (See ./display/wobsdate.pro)

 Project     : SOHO - LASCO

 Name        : WOBSDATE*

 Purpose     : 

 Category    : SU:IMAGE_TOOL ?

 Explanation : This widget FITS search tool allows searching images
               on specific observation date. Image header will be 
               scaned for keyword observation date.

 Syntax      : IDL>wobsdate, instruments, path, filter

 Examples    : IDL>wloada, " LASCO C1 ", "/data/lasco/c1", "*.fits"

 Inputs      : string array of instruments,
               string array of directories,
               string array of searcing filter.

 Opt. Inputs : None

 Outputs     : string array of files,
               string array of directories.

 Opt. Outputs: None

 Keywords    : None

 Common      : dirs_files, date_block

 Restrictions: None                                 

 Side effects: Not known

 History     : Version 1, 02-Sep-1995, B Podlipnik. Written

 Contact     : BP, borut@lasco1.mpae.gwdg.de


WPLOT

[List of Routines] (See ./display/wplot.pro)

 Project     : SOHO - LASCO/EIT

 Name	      : WPLOT

 Purpose     : plot

 Category    : Widgets

 Explanation : 

 Syntax      : wplot

 Examples    :

 Inputs      : 

 Opt. Inputs : 

 Outputs     : 

 Opt. Outputs:

 Keywords    : 

 Common      : lasco.com, wload.com, wplot.com

 Restrictions: None.

 Side effects: None.

 History     : 15-jan-1993,Borut Podlipnik, MPAe,Written 

 Contact     : BP, borut@lasco1.mpae.gwdg.de


WPLOT1

[List of Routines] (See ./display/wplot1.pro)

 Project     : SOHO - LASCO/EIT

 Name	      : WPLOT1

 Purpose     : plot

 Category    : Widgets

 Explanation : 

 Syntax      : wplot1

 Examples    :

 Inputs      : 

 Opt. Inputs : 

 Outputs     : 

 Opt. Outputs:

 Keywords    : 

 Common      : lasco.com, wload.com, wplot.com

 Restrictions: None.

 Side effects: None.

 History     : 15-jan-1993,Borut Podlipnik, MPAe,Written 

 Contact     : BP, borut@lasco1.mpae.gwdg.de


WPLOT_NONOP

[List of Routines] (See ./packets/wplot_nonop.pro)

 NAME:
	WPLOT_NONOP

 PURPOSE:
	This procedure generates plots of the non-operational temperature sensors.

 CATEGORY:
	LASCO PACKETS

 CALLING SEQUENCE:
	WPLOT_NONOP

 INPUTS:
	None

 KEYWORD PARAMETERS:
	DACS:	If set then use the .recs files generated by DACS.  The default
		is to use the .REL files generated by ECS.  If the environment
		variable, TMPCKTS, is set then tHe files should be located in
		that directory.  If it isn't set then the files are located in
		the current directory.

	AUTO:	If set then generate an automatic plot for the latest data.
		The value of the AUTO parameter determines the number of times
		the plot cycle is repeated.  The default is to use the program
		interactively.

	FDAY:	If set then specifies the start time of the plot in fractional
		days from the current time in the automatic mode.  The default 
		is to start 1 day, 86400 seconds, earlier than the current time.

	NWAIT:	If set then specifies the number of seconds to wait between 
		automatic cycles.  The default is to wait 3600 seconds.

 COMMON BLOCKS:
	WPLOT_NONOP_COMMON

 SIDE EFFECTS:

 RESTRICTIONS:

 PROCEDURE:

 EXAMPLE:
	
	WPLOT_NONOP
		Allows interactive plotting using .REL files from ECS

	WPLOT_NONOP,/dacs
		Allows interactive plotting using .recs files from DACS

	WPLOT_NONOP,/dacs,/auto
		Generates a single automatic plot for the latest 24 hours.

	WPLOT_NONOP,/dacs,auto=24,fday=2,wait=7200.
		Generates automatic plots every 2 hours covering the latest 2 days.


 MODIFICATION HISTORY:
 	Written by:	Scott Paswaters, Dec 1995
	Modifications:
 	971216  aee 	 Fixed year/month change in GET_PCKT_NAMES.
 	980811  rah	Fixed offsets (added 6 bytes in line 96 to nonop.offs)
	980916  rah	A number of changes to make it work for DACS/REL files
			There were many files per hour of REL files.
			TM_READ_PACKET returns the same 12 byte header, for both .recs and .REL
			files.  The 12 bytes are 6 for packet ID, length, etc and 6 for OBT.
			We want to start the packet offsets with the first byte of time at
			0.  Therefore the dacs_offset value should be 6, to skip over the 
			packet ID, etc.
	980917  rah	Added the automatic plot capability.
	980923  rah	Added plot of -10 or -50
       990126  aee     Fixed for Y2K problem.

 @(#)wplot_nonop.pro	1.11 12/23/98 :LASCO IDL LIBRARY


WPLOT_SUBHTR[1]

[List of Routines] (See ./packets/gethkpackets.pro)

 NAME:
	WPLOT_SUBHTR

 PURPOSE:
	This procedure generates plots of the non-operational temperature sensors.

 CATEGORY:
	LASCO PACKETS

 CALLING SEQUENCE:
	WPLOT_SUBHTR

 INPUTS:
	None

 KEYWORD PARAMETERS:
	DACS:	If set then use the .recs files generated by DACS.  The default
		is to use the .REL files generated by ECS.  If the environment
		variable, TMPCKTS, is set then tHe files should be located in
		that directory.  If it isn't set then the files are located in
		the current directory.

	AUTO:	If set then generate an automatic plot for the latest data.
		The value of the AUTO parameter determines the number of times
		the plot cycle is repeated.  The default is to use the program
		interactively.

	FDAY:	If set then specifies the start time of the plot in fractional
		days from the current time in the automatic mode.  The default 
		is to start 1 day, 86400 seconds, earlier than the current time.

	NWAIT:	If set then specifies the number of seconds to wait between 
		automatic cycles.  The default is to wait 3600 seconds.

 COMMON BLOCKS:
	WPLOT_SUBHTR_COMMON

 SIDE EFFECTS:

 RESTRICTIONS:

 PROCEDURE:

 EXAMPLE:
	
	WPLOT_SUBHTR
		Allows interactive plotting using .REL files from ECS

	WPLOT_SUBHTR,/dacs
		Allows interactive plotting using .recs files from DACS

	WPLOT_SUBHTR,/dacs,/auto
		Generates a single automatic plot for the latest 24 hours.

	WPLOT_SUBHTR,/dacs,auto=24,fday=2,wait=7200.
		Generates automatic plots every 2 hours covering the latest 2 days.


 MODIFICATION HISTORY:
 	Written by:	Scott Paswaters, Dec 1995
	Modifications:
 	971216  aee 	 Fixed year/month change in GET_PCKT_NAMES.
 	980811  rah	Fixed offsets (added 6 bytes in line 96 to nonop.offs)
	980916  rah	A number of changes to make it work for DACS/REL files
			There were many files per hour of REL files.
			TM_READ_PACKET returns the same 12 byte header, for both .recs and .REL
			files.  The 12 bytes are 6 for packet ID, length, etc and 6 for OBT.
			We want to start the packet offsets with the first byte of time at
			0.  Therefore the dacs_offset value should be 6, to skip over the 
			packet ID, etc.
	980917  rah	Added the automatic plot capability.
       990126  aee     Fixed for Y2K problem.

 @(#)gethkpackets.pro	1.1 01/26/99 :LASCO IDL LIBRARY


WPLOT_SUBHTR[2]

[List of Routines] (See ./packets/wplot_subhtr.pro)

 NAME:
	WPLOT_SUBHTR

 PURPOSE:
	This procedure generates plots of the non-operational temperature sensors.

 CATEGORY:
	LASCO PACKETS

 CALLING SEQUENCE:
	WPLOT_SUBHTR

 INPUTS:
	None

 KEYWORD PARAMETERS:
	DACS:	If set then use the .recs files generated by DACS.  The default
		is to use the .REL files generated by ECS.  If the environment
		variable, TMPCKTS, is set then tHe files should be located in
		that directory.  If it isn't set then the files are located in
		the current directory.

	AUTO:	If set then generate an automatic plot for the latest data.
		The value of the AUTO parameter determines the number of times
		the plot cycle is repeated.  The default is to use the program
		interactively.

	FDAY:	If set then specifies the start time of the plot in fractional
		days from the current time in the automatic mode.  The default 
		is to start 1 day, 86400 seconds, earlier than the current time.

	NWAIT:	If set then specifies the number of seconds to wait between 
		automatic cycles.  The default is to wait 3600 seconds.

 COMMON BLOCKS:
	WPLOT_SUBHTR_COMMON

 SIDE EFFECTS:

 RESTRICTIONS:

 PROCEDURE:

 EXAMPLE:
	
	WPLOT_SUBHTR
		Allows interactive plotting using .REL files from ECS

	WPLOT_SUBHTR,/dacs
		Allows interactive plotting using .recs files from DACS

	WPLOT_SUBHTR,/dacs,/auto
		Generates a single automatic plot for the latest 24 hours.

	WPLOT_SUBHTR,/dacs,auto=24,fday=2,wait=7200.
		Generates automatic plots every 2 hours covering the latest 2 days.


 MODIFICATION HISTORY:
 	Written by:	Scott Paswaters, Dec 1995
	Modifications:
 	971216  aee 	 Fixed year/month change in GET_PCKT_NAMES.
 	980811  rah	Fixed offsets (added 6 bytes in line 96 to nonop.offs)
	980916  rah	A number of changes to make it work for DACS/REL files
			There were many files per hour of REL files.
			TM_READ_PACKET returns the same 12 byte header, for both .recs and .REL
			files.  The 12 bytes are 6 for packet ID, length, etc and 6 for OBT.
			We want to start the packet offsets with the first byte of time at
			0.  Therefore the dacs_offset value should be 6, to skip over the 
			packet ID, etc.
	980917  rah	Added the automatic plot capability.
       990126  aee     Fixed for Y2K problem.

 @(#)wplot_subhtr.pro	1.1 01/26/99 :LASCO IDL LIBRARY


WPRINT

[List of Routines] (See ./display/wprint.pro)

 Project     : SOHO - LASCO

 Name        : 

 Purpose     : 

 Category    : 

 Explanation : 

 Syntax      : 

 Examples    : 

 Inputs      : None

 Opt. Inputs : None

 Outputs     : None

 Opt. Outputs: None

 Keywords    : None

 Common      : 

 Restrictions:                                  

 Side effects: Not known

 History     : Version 1, 02-Sep-1995, B Podlipnik. Written

 Contact     : BP, borut@lasco1.mpae.gwdg.de


WREBIN

[List of Routines] (See ./display/wrebin.pro)

 Project     : SOHO - LASCO

 Name        : WREBIN

 Purpose     : 

 Category    : 

 Explanation : 

 Syntax      : 

 Examples    : 

 Inputs      : None

 Opt. Inputs : None

 Outputs     : None

 Opt. Outputs: None

 Keywords    : None

 Common      : 

 Restrictions:                                  

 Side effects: Not known

 History     : Version 1, 13-Nov-1995, B Podlipnik. Written

 Contact     : BP, borut@lasco1.mpae.gwdg.de


WRITE_BLOCK

[List of Routines] (See ./reduce/fuzzy/write_block.pro)

 PROJET:
	SOHO - LASCO

 NAME:
	WRITE_BLOCK

 PURPOSE:
	sets the block at column i and row j

 PROCEDURE:
	sets the block (array of pixels) at column i and row j to a given
	array of values, or to a given constant value

 CATEGORY:
	Missing Blocks

 CALLING SEQUENCE:
	write_block, image, i, j, block

 INPUTS:
	image		the image where to write the block
			(image is both an input and a output)
	i, j		the column i and the row j of the block to change
			(i and j ranges from 0 to 31)
	block		the block (dim : size x size) to overwrite; it can be :
			_ a integer array
			_ a scalar value, which leads to a constant array

 KEYWORD PARAMETERS:
	SIDE		the side of the square blocks (default is 32 pixels)

 OUTPUTS:
	The block (i,j) on image is overwritted
	(image is both an input and a output)

 MODIFICATION HISTORY:
	written by J.More, September 1996


WRITE_CLOSED

[List of Routines] (See ./reduce/write_closed.pro)

 NAME:
	WRITE_CLOSED

 PURPOSE:
	This procedure writes the name of the latest *.img file located in 
	$LEB_IMG into closed_img_file2.  This file is used by REDUCE_MAIN.

 CATEGORY:
	LASCO DATA REDUCTION

 CALLING SEQUENCE:
	WRITE_CLOSED

 OPTIONAL INPUTS:
	Nfiles:	If this parameter is present, the file name of the nfile-th
		file will be written.  Otherwise the default is to write the
		name of the latest .img file
		
 OUTPUTS:
	This procedure creates the file $LEB_IMG/closed_img_file2

 EXAMPLE:
	Write the file name of the latest file in $LEB_IMG:

		WRITE_CLOSED

	Write the file name of the 2nd file in $LEB_IMG:

		WRITE_CLOSED,2

 MODIFICATION HISTORY:
 	Written by:	RA Howard, NRL, 23 Dec 1995
	Version 2  RAH  10 Apr 1996  Added parameter to write nfile/th name

	@(#)write_closed.pro	1.2 21 Apr 1996 LASCO IDL LIBRARY


WRITE_DISK_MOVIE[1]

[List of Routines] (See ./display/write_disk_movie_test.pro)

 NAME:
	WRITE_DISK_MOVIE

 PURPOSE:
	This procedure adds an image to a file in the disk movie format.

 CATEGORY:
	LASCO MOVIE

 CALLING SEQUENCE:
	WRITE_DISK_MOVIE, Fname, Img, Hdr

 INPUTS:
	Fname:	File name of the movie disk file, with full path

	Img:	2D image to be added to the file

	Hdr:	FITS header

 KEYWORD PARAMETERS:
	NEW:	If set this keyword indicates that a new file is to be created.
		The default is to write to an existing file

	MAXNUM:	If set, this keyword specifies the maximum number of files to
		be loaded into the file.  The default value is 128

	/REPLACE:  Flag to replace an image rather than append
	REPLACE_INDEX:Set to index of frame to replace in .mvi file

 PROCEDURE:
	The disk movie format is:

	file header:	# images in the file
			# columns in each image
			# rows in each image
			# maximum number of images in file
			# bytes in image header
			# version number

	for version 1:	# bytes in file header
	for version 1:	# sunxcen * 10
	for version 1:	# sunycen * 10
	for version 1:	# arc sec per pixel * 100
	for version 1:	# red color vector BYTARR(256)
	for version 1:	# green color vector BYTARR(256)
	for version 1:	# blue color vector BYTARR(256)

	img hdr #1:	date of image, string (15)
			time of image, string (15)
			file name, string (15)
			filter wheel, string (10)
			polarizer wheel, string (10)
			detector, string (10)
	img hdr #2
		...
	img #1
	img #2
		...

 EXAMPLE:

	Create a new movie file with img being the first image in the file:

		DISK_MOVIE_FILE, '~/mymovie.mvi', img , hdr, /new, maxnum=20

	Add to an existing movie file:

		DISK_MOVIE_FILE, '~/mymovie.mvi', img , hdr

 MODIFICATION HISTORY:
 	Written by:	RA Howard, NRL, 16 Mar 1996

 Modified    : SEP  05 Feb 1997 - Mods for mvi version 1 format.
               SEP  08 Sep 1997 - Added REPLACE option.

	@(#)write_disk_movie.pro	1.1 10/12/96 LASCO IDL LIBRARY


WRITE_DISK_MOVIE[2]

[List of Routines] (See ./movie/write_disk_movie3.pro)

 NAME:
	WRITE_DISK_MOVIE

 PURPOSE:
	This procedure adds an image to a file in the disk movie format.

 CATEGORY:
	LASCO MOVIE

 CALLING SEQUENCE:
	WRITE_DISK_MOVIE, Fname, Img, Hdr

 INPUTS:
	Fname:	File name of the movie disk file, with full path

	Img:	2D image to be added to the file

	Hdr:	FITS header

 KEYWORD PARAMETERS:
	NEW:	If set this keyword indicates that a new file is to be created.
		The default is to write to an existing file

	MAXNUM:	If set, this keyword specifies the maximum number of files to
		be loaded into the file.  The default value is 128

	/REPLACE:  Flag to replace an image rather than append
	REPLACE_INDEX:Set to index of frame to replace in .mvi file
	RTHETA	flag for making rtheta movies
	RTCOORDS	[radius0, radius1, theta0, theta1] coords for making RTHETA movies

 PROCEDURE:
	The disk movie format is:

	file header:	# images in the file
			# columns in each image
			# rows in each image
			# maximum number of images in file
			# bytes in image header
			# version number

	for version 1:	# bytes in file header
	for version 1:	# sunxcen * 10
	for version 1:	# sunycen * 10
	for version 1:	# arc sec per pixel * 100
	for version 1:	# red color vector BYTARR(256)
	for version 1:	# green color vector BYTARR(256)
	for version 1:	# blue color vector BYTARR(256)

	img hdr #1:	date of image, string (15)
			time of image, string (15)
			file name, string (15)
			filter wheel, string (10)
			polarizer wheel, string (10)
			detector, string (10)
	img hdr #2
		...
	img #1
	img #2
		...

 EXAMPLE:

	Create a new movie file with img being the first image in the file:

		DISK_MOVIE_FILE, '~/mymovie.mvi', img , hdr, /new, maxnum=20

	Add to an existing movie file:

		DISK_MOVIE_FILE, '~/mymovie.mvi', img , hdr

 MODIFICATION HISTORY:
 	Written by:	RA Howard, NRL, 16 Mar 1996

 Modified    : SEP  05 Feb 1997 - Mods for mvi version 1 format.
               SEP  08 Sep 1997 - Added REPLACE option.
			010711	the jake	Added Version 3 to handle RTHETA Movies
		thejake	011109 - After testing, additions do not seem to have done any harm so adding
					WRUNMOVIEM3, MVIPLAY3, WRITE_DISK_MOVIE3, and READ_MVI3 to library.
					Once an MVI is written with the version 3 software, it will need to
					be read with it as well.


	07/09/03 @(#)write_disk_movie3.pro	1.2 : LASCO IDL LIBRARY


WRITE_DISK_MOVIE[2]

[List of Routines] (See ./movie/write_disk_movie.pro)

 NAME:
	WRITE_DISK_MOVIE

 PURPOSE:
	This procedure adds an image to a file in the disk movie (MVI) format.

 CATEGORY:
	LASCO MOVIE

 CALLING SEQUENCE:
	WRITE_DISK_MOVIE, Fname, Img, Hdr

 INPUTS:
	Fname:	File name of the movie disk (MVI) file, with full path

	Img:	2D image array to be added to the file

	Hdr:	FITS header for image

 KEYWORD PARAMETERS:
	/NEW:	If set this keyword indicates that a new file is to be created.
		The default is to write to an existing file

	MAXNUM:	If set, this keyword specifies the maximum number of files to
		be loaded into the file.  The default value is 128

	/REPLACE:  	Flag to replace an image rather than append
	REPLACE_INDEX:	Set to index of frame to replace in .mvi file
	/RTHETA		flag indicating r-theta movie
	RTCOORDS	[radius@bottom, radius@top, theta@left, theta@right] 
			coords for making RTHETA movies
	/RECTIFIED	Image was rotated 180 deg so North is up
	TRUECOLOR	Set to indicate that the images are truecolor

 PROCEDURE:
	The disk movie format is:

	file header (each value is 2-byte integer):
			# images in the file
			# columns in each image
			# rows in each image
			# maximum number of images in file
			# bytes in image header
			# version number

	for version 1:	# bytes in file header
	for version 1:	# sunxcen * 10
	for version 1:	# sunycen * 10
	for version 1:	# arc sec per pixel * 100
	for version 3:	# R-theta flag
	for version 3:	# radius at bottom of image (Rsun)
	for version 3:	# radius at top of image (Rsun)
	for version 3:	# theta at left of image (deg, 0@N, CCW+)
	for version 3:	# theta at right of image (deg, 0@N, CCW+)
	for version 4:	# rectified flag (degrees images rotated by)
	for version 5:	# indicates true color
	for version 1:	# red color vector BYTARR(256)
	for version 1:	# green color vector BYTARR(256)
	for version 1:	# blue color vector BYTARR(256)

	img hdr #1:	date of image, string (15)
			time of image, string (15)
			file name, string (15)
			filter wheel, string (10)
			polarizer wheel, string (10)
			detector, string (10)
	img hdr #2
		...
	img #1
	img #2
		...

 EXAMPLE:

	Create a new movie file with img being the first image in the file:

		DISK_MOVIE_FILE, '~/mymovie.mvi', img , hdr, /new, maxnum=20

	Add to an existing movie file:

		DISK_MOVIE_FILE, '~/mymovie.mvi', img , hdr

       @(#)write_disk_movie.pro	1.7, 09/23/04 : NRL LASCO LIBRARY

 MODIFICATION HISTORY:
 	Written by:	RA Howard, NRL, 16 Mar 1996

 Modified    : SEP  05 Feb 1997 - Mods for mvi version 1 format.
               SEP  08 Sep 1997 - Added REPLACE option.
			010711	the jake	Added Version 3 to handle RTHETA Movies
		thejake	011109 - After testing, additions do not seem to have done any harm so adding
				WRUNMOVIEM3, MVIPLAY3, WRITE_DISK_MOVIE3, and READ_MVI3 to library.
				Once an MVI is written with the version 3 software, it will need to
				be read with it as well.
		nbr,03.09.10 - 	Incorporate write_disk_movie3.pro; add RECTIFY to mvi v4 header
		rah, 16 Sep 2004 - Add truecolor keyword


WRITE_EXP_FACTOR

[List of Routines] (See ./expfac/write_exp_factor.pro)

 NAME:
	WRITE_EXP_FACTOR

 PURPOSE:
	This procedure writes out a exposure factor record

 CATEGORY:
	LASCO EXPFAC

 CALLING SEQUENCE:
	WRITE_EXP_FACTOR,Tel,Fname,Fac,Bias,Date,Filt,Polr,Wavelen,Nz,Sigma

 INPUTS:
	Tel:	String denoting the telescope, c1,c2, c3
	Fname:	String giving the filename of the image for which the factor 
		was computed
	Fac:	Exposure correction factor
	Bias:	Offset bias
	Date:	The date of observation as MJD or CDS time structure
	Filt:	Filter wheel position (string)
	Polr:	Polarizer wheel position (string)
	Wavelen:If C1 then the FP wavelength, else 0
	Nz:	The number of non-zero regions 
	Sigma:	Standard deviation of the computation of the expsoure factor

 OUTPUTS:
	Nothing is returned to the calling program.  A record is written to
	the appropriate exposure time file.

 PROCEDURE:
	This routine is a subroutine to the expsoure factor determination and
	is not intended to be used separately.

	Write information to the exposure factor file in the following format
		filename    tsnnnnn.fts     (a12)  
		factor      number          (f10.6)  
		bias        number          (f10.1)  
		date        YYMMDD          (a6)  
		time        SSSS.mmm        (f10.2)  
		Filter      0-4             (a12)  
		Polarizer   0-4             (a12)  
		Wavelength  NNNN.NNNN       (a9)  
		Nz          NNNN            (i4)
		sigma       NNNN.NNNN       (f10.2)  

 MODIFICATION HISTORY:
 	Written by:	RA Howard, Sep 1997
	 3 Feb 98	RAH, Make sure subdirectory exists

	@(#)write_exp_factor.pro	1.7 11/16/99 LASCO IDL LIBRARY


WRITE_HT

[List of Routines] (See ./movie/write_ht.pro)

 NAME:
	WRITE_HT

 PURPOSE:
	This procedure writes out the height-time
	file.  It is used by the movie program and is not intended to be
	used in a standalone fashion.

 CATEGORY:
	MOVIE

 CALLING SEQUENCE:
	WRITE_HT,Callt,Htfile,Hdr,R,Pa,Feat,X,Y

 INPUTS:
	Callt:	Parameter indicating whether header or observation 
		information is being written
		0 = header, 1 = observation
	Htfile:	String containing the file name to be written to
	Hdr:	Structure containing the image header information
	R:	Radius of observation in units of solar radii (float)
	Pa:	Position angle of observation in degrees (float)
	X:	Column of observation (pixels)
	Y:	Row of observation (pixels)

 SIDE EFFECTS:
	Appends information to height-time file if existing or opens a new
	one if none exists.

 MODIFICATION HISTORY:
 	Written by:	Scott Hawley, NRL summer student, July 1996
	V2  5/3/97	RAHoward,NRL	Combined all writes to ht-file
	V3  9/30/97	RAHoward,NRL	Defined Version 2 for HT file
	7/25/01, N.Rich - Add CHECK_PERMISSION for htfile and check first line
		of htfile for validity
 
 @(#)write_ht.pro	1.9 07/25/01 :NRL Solar Physics


WRITE_LAST_C1

[List of Routines] (See ./display/write_last_c1.pro)

 NAME:				WRITE_LAST_IMG

 PURPOSE:			Create GIF image of the last real time image
				processed so that xv can then read and display
				it.

 CATEGORY:			REDUCTION

 CALLING SEQUENCE:		WRITE_LAST_IMG,Img,Hdr

 INPUTS:			Img = Input Image array
				Hdr = FITS header

 OPTIONAL INPUTS:		None

 KEYWORD PARAMETERS:		None

 OUTPUTS:			None

 OPTIONAL OUTPUTS:		None

 COMMON BLOCKS:		None

 SIDE EFFECTS:			None

 RESTRICTIONS:			This must be done with IDL haveing an X window
				display.

 PROCEDURE:			Scales the image to not larger than 512 x 512,
				and creates a GIF image with annotation along
				the side

 EXAMPLE:

 MODIFICATION HISTORY:		Written, RA Howard, NRL
    VERSION 1   rah    9 Nov 1995
    VERSION 2   rah   16 Nov 1995  Conversions added
    VERSION 3   rah   29 Nov 1995  Modified layout
    VERSION 4   rah   11 Dec 1995  Modified Detector conversion
    VERSION 5   rah   12 Jan 1996  Changed assumption to be !order = 0
				    Added R1 and R2 in place of P1, P2
    VERSION 6   rah   19 Apr 1996  Modified scaling of EIT image
                                   Corrected display of PIXSUM to include LEB
    VERSION 7   rah   23 May 1996  Corrected handling of images outside of chip
    VERSION 8   rah   22 Jul 1996  Corrected handling of cals > 1024 lines
    VERSION 9   rah    8 Oct 1996  Added subtraction of background model
    VERSION 10  sep   18 Jun 1997  Changed call for new OFFSET_BIAS()


	@(#)write_last_img.pro	1.12 10/06/97 LASCO IDL LIBRARY


WRITE_LAST_IMG

[List of Routines] (See ./reduce/write_last_img.pro)

 NAME:				WRITE_LAST_IMG

 PURPOSE:			Create GIF image of the last real time image
				processed so that xv can then read and display
				it.

 CATEGORY:			REDUCTION

 CALLING SEQUENCE:		WRITE_LAST_IMG,Img,Hdr

 INPUTS:			Img = Input Image array
				Hdr = FITS header

 OPTIONAL INPUTS:		None

 KEYWORD PARAMETERS:		None

 OUTPUTS:			None

 OPTIONAL OUTPUTS:		None

 COMMON BLOCKS:		None

 SIDE EFFECTS:			None

 RESTRICTIONS:			This must be done with IDL haveing an X window
				display.

 PROCEDURE:			Scales the image to not larger than 512 x 512,
				and creates a GIF image with annotation along
				the side

 EXAMPLE:

 MODIFICATION HISTORY:		Written, RA Howard, NRL
    VERSION 1   rah    9 Nov 1995
    VERSION 2   rah   16 Nov 1995  Conversions added
    VERSION 3   rah   29 Nov 1995  Modified layout
    VERSION 4   rah   11 Dec 1995  Modified Detector conversion
    VERSION 5   rah   12 Jan 1996  Changed assumption to be !order = 0
				    Added R1 and R2 in place of P1, P2
    VERSION 6   rah   19 Apr 1996  Modified scaling of EIT image
                                   Corrected display of PIXSUM to include LEB
    VERSION 7   rah   23 May 1996  Corrected handling of images outside of chip
    VERSION 8   rah   22 Jul 1996  Corrected handling of cals > 1024 lines
    VERSION 9   rah    8 Oct 1996  Added subtraction of background model
    VERSION 10  sep   18 Jun 1997  Changed call for new OFFSET_BIAS()
    VERSION 11  nbr   28 Oct 1998  Use current year for background image
    VERSION 12  rah    3 Mar 1999  Added test for C2/3 Cont RO and Dark
    VERSION 13  nbr   23 Mar 1999  Change header to structure before calling REDUCE_STD_SIZE
    VERSION 14  nbr   29 Sep 1999  Change min/max for C2 and C3
    V 15	nbr	Feb 2000    Use ANY_YEAR, new min/max for C2
		nbr, 31 Jan 2001 - Do not use ANY_YEAR for C2
		nbr, 21 Oct 2001 - Move placement of Logo
		nbr, 31 Jan 2002 - no change


 @(#)write_last_img.pro	1.24 08/11/03 :LASCO IDL LIBRARY


WRITE_SUMMARIES

[List of Routines] (See ./synoptic/write_summaries.pro)

 NAME:				WRITE_SUMMARIES

 PURPOSE:			Create FITS and GIF image of the summary image 

 CATEGORY:			REDUCTION

 CALLING SEQUENCE:		WRITE_SUMMARIES,Img,Hdr

 INPUTS:			Img = Input Image array
				Hdr = FITS header

 OPTIONAL INPUTS:
				Img2 = Input image array for C1 ase image
				Hdr2 = FITS header for Img2 array
	
 OUTPUTS:			FITS and GIF files are written

 RESTRICTIONS:			This must be done with IDL having an X window 
				display.

 PROCEDURE:			Scales the image to not larger than 512 x 512,
				and creates a FITS image with LASCO logo in
				image Derived from WRITE_LAST_IMG

 EXAMPLE:

 MODIFICATION HISTORY:		Written, RA Howard, NRL
    VERSION 1   rah    12 Apr 1996
    VERSION 2   rah    15 Apr 1996
    VERSION 3   rah    29 Jun 1996
    VERSION 4   rah    29 Oct 1996, Img2 array added to subtract C1 base
    VERSION 5   rah    21 Jul 1997, changed scaling on C2/C3 to ratio model


 @(#)write_summaries.pro	1.7 11/20/97 :NRL Solar Physics


WRITE_SUMMARIES2

[List of Routines] (See ./synoptic/write_summaries2.pro)

 NAME:				WRITE_SUMMARIES

 PURPOSE:			Create FITS and GIF image of the summary image 

 CATEGORY:			REDUCTION

 CALLING SEQUENCE:		WRITE_SUMMARIES,Img,Hdr

 INPUTS:			Img = Input Image array
				Hdr = FITS header

 OPTIONAL INPUTS:		None
	
 OUTPUTS:			FITS and GIF files are written

 RESTRICTIONS:			This must be done with IDL having an X window 
				display.

 PROCEDURE:			Scales the image to not larger than 512 x 512,
				and creates a FITS image with LASCO logo in
				image Derived from WRITE_LAST_IMG

 EXAMPLE:

 MODIFICATION HISTORY:		Written, RA Howard, NRL
    VERSION 1   rah    12 Apr 1996
    VERSION 2   rah    15 Apr 1996
    VERSION 2.1 SPP    28 May 1996 (Replaced DATE-OBS and TIME-OBS
				     keywords with DATE_OBS and TIME_OBS).


	@(#)write_summaries2.pro	1.1 10/05/96 LASCO IDL LIBRARY


WRITE_ZONE

[List of Routines] (See ./reduce/fuzzy/write_zone.pro)

 PROJET:
	SOHO - LASCO

 NAME:
	WRITE_ZONE

 PURPOSE:
	Writes a missing zone
 
 PROCEDURE:
	Writes a missing zone (array of pixel) surrounding a given list of
	missing blocks onto an image

	A missing zone is defined as the smallest rectangle of blocks that
	surrounds a cluster of missing blocks (likely to be neighbor missing
	blocks) but has  no missing block on its border (its outermost rows
	and columns)
	For example, 1 single block leads to a 3x3 surrounding block zone

 CATEGORY:
	Missing Blocks

 CALLING SEQUENCE:
	write_zone, image, list_miss_blocks, zone 

 INPUTS:
	image			the image where to write the zone onto
				(image is both an input and an output)
	list_miss_blocks	a list of missing blocks (or 1 block) defining
				the missing zone
	zone			an array of pixels to overwrite onto the image

 KEYWORD INPUT:
	rebindex : rebin index (see fuzzy_image.pro)

 OUTPUTS:
	zone is overwritten onto image
	(image is both an input and an output)

 MODIFICATION HISTORY:
	Written by J.MORE, October 1996
	Add of rebindex keyword on 28/01/2000 by A.Thernisien


WRITIMA.PRO

[List of Routines] (See ./las-c2/align1.pro)

 NAME:
	WRITIMA.PRO
 PURPOSE:
	Draws a box in an image and replaces all pixels values inside
       the box by the given value
 CATEGORY:
	??
 CALLING SEQUENCE:
	WRITIMA, ima, val
 INPUTS:
	ima                          image array (in memory)
       val                          value to be written
 KEYWORD PARAMETERS:               
                                   None
 OUTPUTS:
	ima with the selected intervals replaced
 COMMON BLOCKS:
	None.
 SIDE EFFECTS:
	None
 RESTRICTIONS:

 PROCEDURE:
	Straightforward.
 MODIFICATION HISTORY:
	Written by M.B  v.1.0       LAS  12/13/93           


WRUNMOVIE

[List of Routines] (See ./movie/wrunmovie.pro)

 Project     : SOHO - LASCO/EIT
                   
 Name        : WRUNMOVIE
               
 Purpose     : Widget tool to display animation sequence.
               
 Explanation : This tool allows the user to view a series of images as
		an animation sequence.  The user can control the direction,
		speed, and number of frames with widget controls.
               
 Use         : IDL> WRUNMOVIE [, arg1 [, NAMES=names [,SKIP=skip]]]

		Use the VIDEO keyword to automatically prepare video-ready format (640x480);
		use with IMG_REBIN if you want to keep full x-field
	  	IDL> WRUNMOVIE, /VIDEO [,/IMG_REBIN]

		Without any inputs, program will prompt user to select an existing .mvi file.
    Example  : IDL> WRUNMOVIE

               Or you could have one argument, the .mvi file you want to load.
    Example  : IDL> WRUNMOVIE, 'mymovie.mvi'

               Or if you have pre-loaded images into pixmaps (like MKMOVIE.PRO does) call:
    Example  : IDL> WRUNMOVIE, win_index, NAMES=names
		Where win_index is an array of the window numbers and names is optionally
		a STRARR() containing names of each frame.
;    
		Use the keyword SKIP to skip every n frames (good for large movies).
    Example  : IDL> WRUNMOVIE, SKIP=1		;* to skip every other frame

		Use the keyword START to start reading movie at frame n (good for large movies).
    Example  : IDL> WRUNMOVIE, START=100		;* frame 100 becomes 1st frame of movie

		Use the keyword LENGTH to specify number of frames to read in (good for large movies).
    Example  : IDL> WRUNMOVIE, START=100, LENGTH=60	;* to load frames 100-159

		Use the keyword TIMES to display detector & date & time on frames (if not already there).
    Example  : IDL> WRUNMOVIE, /TIMES

		Use the keyword NOCAM with TIMES keyword to omit the detector from TIMES display.
    Example  : IDL> WRUNMOVIE, /TIMES, /NOCAM

		Use the keyword COORDS to display subframe of movie images. [x1,x2,y1,y2]
		Note: COORDS is applied before IMG_REBIN if both are selected.
		OR just use /COORDS to select coordinates interactively
    Example  : IDL> WRUNMOVIE, 'mymovie.mvi', COORDS=[256,256+511,175,175+255]

		Use the keyword IMG_REBIN to resize movie.  If shrinking by integer factor REBIN 
		is used otherwise CONGRID with linear interpolation is used.
    Example  : IDL> WRUNMOVIE, 'mymovie.mvi', IMG_REBIN=[512,512]

		Use the keyword SAVE to just save the movie and exit (for use in batch mode).
    Example  : IDL> WRUNMOVIE, win_index, SAVE='mymovie.mvi'

		Use the keyword DIFF to subtract a base frame from all frames in the movie.
		The base frame is the first frame.  Or you can use the keyword START to set it.
    Example  : IDL> WRUNMOVIE, 'mymovie.mvi', /DIFF

		Use the keyword RUNNING_DIFF to create a running difference movie.
		The default is to subtract the previous frame.  Use RUNNING_DIFF=2 to subtract
		2 frames prior from each image.
    Example  : IDL> WRUNMOVIE, 'mymovie.mvi', /RUNNING_DIFF

		Use the keyword /COSMIC to removie cosmic rays.
    Example  : IDL> WRUNMOVIE, 'mymovie.mvi', /COSMIC

		Use the keyword /FIXGAPS to replace data gaps with data from previous frame
		The default is to assume missing blocks are 32x32, 
		For 1/2 resolution images use BLOCK_SIZE=16 for example
    Example  : IDL> WRUNMOVIE, 'mymovie.mvi', /FIXGAPS

		Use the keyword /DRAW_LIMB to draw a circle at the solar limb
    Example  : IDL> WRUNMOVIE, 'mymovie.mvi', /DRAW_LIMB

 OTHER KEYWORDS:
	LOAD	Set to use saved keyword values, if any
	KEEP	Set to not delete pixmaps 
	CHSZ	Set to desired size of time label (default=1.5)
	SPOKE	Display spoked images *** NEEDS WORK ***
	DIF_MIN, DIF_MAX	Set to desired range for scaling difference images; default is +/-70
	RECTIFIED	Set to number of degrees images rotated to put solar north up (affects header only)
	/DORECTIFY	Rotate frames 180 degrees
	/CENRECTIFY	Compute new center for 180-deg-rotation
	/TRUECOLOR	Set to treat images as true color images


 Calls       : 

 Comments    : Use MKMOVIE.PRO to load into pixmaps.
               
 Side effects: None.
               
 Category    : Image Display.  Animation.
               
 Written     : Scott Paswaters, NRL Feb. 13 1996.
               
 Modified    : SEP  29 May 1996 - Changed to multiple pixmaps for images.
				   Added buttons to save and load movie files (.mvi).
				   Seperated control buttons from display window.
               SEP   9 Jul 1996 - Added keyword to pass image headers.
               SEP   7 Jan 1997 - Added skip keyword.
               SEP   9 Jan 1997 - Added START, LENGTH keywords.
               SEP  05 Feb 1997 - Mods for mvi version 1 format.
               SEP  18 Apr 1997 - Added .mpg output option with 1/2 resolution.
               SEP  16 May 1997 - Added save option and IMG_REBIN option.
               SEP  19 May 1997 - Added COORDS option.
               SEP  27 Jun 1997 - Added permission checks for output.
               SEP  22 Sep 1997 - Added current frame scrolling widget.
               SEP  02 Oct 1997 - Added ability to interactively select subimage coords.
               SEP  18 Nov 1997 - Added /COSMIC  /FIXGAPS and /DRAW_LIMB keywords.
               SEP  11 Dec 1997 - Added button to call WRUNMOVIEM, only save frames first->last
               SEP  08 May 1998 - Added BLOCK_SIZE keyword
               SP   02 Mar 1999 - Added Scroll bars for large images
		NBR  26 Mar 1999 - Added LOGO keyword; Add Save-movie-as-GIFS button
		NBR  09 Apr 1999 - Use short_names for frame names
		NBR     Jul 1999 - Add VIDEO keyword; Add detector to TIMES label
		NBR     Aug 1999 - Add detector to GIF names
		NBR     Sep 1999 - Add NOCAM keyword
               ???  06 FEB 2000 - Add bytscl range for DIFF and RUNNING_DIFF images (DIF_MIN/MAX keywords)
               JIE  14 JUN 2000 - ADD keyword CHSZ to adjust the size of displayed time
               JIE   2 MAR 2000 - ADD keyword SPOKE to display spoked images
	NBR	 3 Oct 2000 - Save gif files in current directory by default
	RAH	18 Oct 2000 - Added option to not rescale a postscript image. Default was to rescale
	NBR	15 Dec 2000 - Allow setting of TIMES keyword to color desired
	NBR	 3 Jan 2001 - Put win_index in common block, add KEEP keyword
	NBR	 4 Jan 2001 - Remove win_index from common block
	NBR	10 Apr 2001 - Change output gif filenames and reconcile diverging versions of this procedure
	NBR	25 Apr 2002 - Change default movie speed
	nbr	 3 sep 2002 - allow user input of root name for saving movie as gifs
	nbr	24 sep 2003 - Add RECTIFIED keyword; add rect to moviev and saving mvis
	nbr	26 Sep 2003 - Add /DORECTIFY, /CENRECTIFY
	nbr 	29 Sep 2003 - Add RECTIFIED to wrunmoviem call
	nbr	 1 Oct 2003 - Fix rect=0
	nbr 	 6 Feb 2004 - Save some keywords via common block
				- IF 24-bit display, loadct,0 after loading mvi
				- use ftvread.pro if saving 1 GIF frame
	nbr	12 Feb 2004 - Fix START; add dolimb to COMMON block
	nbr	26 Feb 2004 - move loadct,0 for 24-bit display
       KB      Aug 19 2004 - Fix "LOAD" bug 
	rah	Sep 16 2004 - Add capability for true color images

 Version     : 
       @(#)wrunmovie.pro	1.27, 09/23/04 : NRL LASCO LIBRARY

 See Also    : MKMOVIE.PRO


WRUNMOVIE4

[List of Routines] (See ./display/wrunmovie4.pro)

 Project     : SOHO - LASCO/EIT
                   
 Name        : WRUNMOVIE4
               
 Purpose     : Widget tool to display animation sequence.
               
 Explanation : This tool allows the user to view a series of images as
		an animation sequence.  The user can control the direction,
		speed, and number of frames with widget controls.
               
 Use         : IDL> WRUNMOVIE4 [, arg1 [, NAMES=names [,/PREVIOUS]]]

		Without any inputs, program will prompt user to select an existing .mvi file.
    Example  : IDL> WRUNMOVIE4

               Or you could have one argument, the .mvi file you want to load.
    Example  : IDL> WRUNMOVIE4, 'mymovie.mvi'

               Or if you have pre-loaded images into pixmaps (like MKMOVIE2.PRO does) call:
		Where win_index is an array of the window numbers and names is optionally
		a STRARR() containing names of each frame.
    Example  : IDL> WRUNMOVIE4, win_index, NAMES=names
    
		If after exiting WRUNMOVIE4 you want to re-load the movie call:
    Example  : IDL> WRUNMOVIE4, /PREVIOUS
    
 Calls       : 

 Comments    : Use MKMOVIE2.PRO to load into pixmaps.
               
 Side effects: None.
               
 Category    : Image Display.  Animation.
               
 Written     : Scott Paswaters, NRL Feb. 13 1996.
               
 Modified    : SEP  29 May 1996 - Changed to multiple pixmaps for images.
				   Added buttons to save and load movie files (.mvi).
				   Seperated control buttons from display window.
               SEP   9 Jul 1996 - Added keyword to pass image headers.

 Version     : 

 See Also    : MKMOVIE2.PRO


WRUNMOVIEM

[List of Routines] (See ./movie/wrunmoviem.pro)

 Project     : SOHO - LASCO/EIT
                   
 Name        : WRUNMOVIEM
               
 Purpose     : Widget tool to display animation sequence.
               
 Explanation : This tool allows the user to view a series of images as
		an animation sequence.  The user can control the direction,
		speed, and number of frames with widget controls.
               
 Use         : IDL> WRUNMOVIEM [, arg1 [, NAMES=names [,/PREVIOUS]]]

		Without any inputs, program will prompt user to select an existing .mvi file.
    Example  : IDL> WRUNMOVIEM

    Example  : IDL> WRUNMOVIEM, /ROLL_PER_FRAME

               Or you could have one argument, the .mvi file you want to load.
    Example  : IDL> WRUNMOVIEM, 'mymovie.mvi'

               Or if you have pre-loaded images into pixmaps (like MKMOVIEM.PRO does) call:
		Where win_index is an array of the window numbers and names is optionally
		a STRARR() containing names of each frame.
    Example  : IDL> WRUNMOVIEM, win_index, NAMES=names
    
		If after exiting WRUNMOVIEM you want to re-load the movie call:
    Example  : IDL> WRUNMOVIEM, /PREVIOUS
    
 Calls       : 

 Comments    : Use MKMOVIEM.PRO to load into pixmaps.
               
 Side effects: None.
               
 Category    : Image Display.  Animation.
               
 Written     : Scott Paswaters, NRL Feb. 13 1996.
               
 Modified    : SEP  29 May 1996 - Changed to multiple pixmaps for images.
				   Added buttons to save and load movie files (.mvi).
				   Seperated control buttons from display window.
               SEP   9 Jul 1996 - Added keyword to pass image headers.

		SHH  12 Jul 1996 - Enabled display of cursor position in draw window
			 	   Added height-time plotting capability
				   Added Edit Frame option	  
				   Modified effects of mouse buttons
				   Added buttons above draw window
				   Modified display of Control window

               SEP  29 Sep 1996 - Added routines from DAB for applying C3 geometric distortion and
                                  calculating solar radius as function of time.
               SEP  01 Oct 1996 - Added call to C3_DISTORTION for applying C3 geometric distortion

               RAH  01 Nov 1996 - Prior to PLOT_HT call, don't ask for filename

		SHH  09 Jan 1997 - Added "Start H-T" button
				   Calls XEDITFRAME
               SEP  05 Feb 1997 - Mods for mvi version 1 format.
               SEP  21 Mar 1997 - use sun center and arc_sec/pixel if saved in .mvi file.
               SEP  16 May 1997 - added DN output to window, added button to update center.
               SEP  23 Sep 1997 - added active slider widget for current frame.
		NBR  06 Jan 1999 - changed sec_pix check in file_hdr
		DW   11 Jan 1999 - added C2_DISTORTION and roll angle
		NBR  02 Mar 1999 - eliminated sec_pix check for getting sun center 
		NBR 09 Jul 1999  - Add warning if frame headers not saved
		NBR, 05 Mar 2002 - Only compute roll angle once per day; use AVG instead of STAR for roll; extend common block
		NBR, 24 Sep 2003 - Add mvi header roll correction (rect) in moviev; print mvi header; save MVIs with rect
		NBR, 29 Sep 2003 - Add RECTIFIED keyword for call from WRUNMOVIE
		NBR, 20 Oct 2003 - Allow case where xcen is REALLY zero
		KB,  Dec 15,2003 - Added slider so full-res images can be used with smaller screens
               KB,  Sep07, 2004 - When displaying Pos. Ang, if nominal_roll_attitude.dat can't be found, use default values
               AEE, Jan25, 2005 - Generate roll angles (using new database) when reading in frames
                                  and keep around to use later when going back and forth between
                                  frames (to make it quicker). The get_roll_or_xy is called for 
                                  first frame of the movie and also fo multi-day movies when a day 
                                  boundry is crossed. I added keyword ROLL_PER_FRAME to calculate
                                  a roll for each frame if present. Otherwise, default is to calculate
                                  one roll per day instead of one roll per frame.
               AEE, Jan27, 2005 - Calculate one roll per day if wrunmoviem is called from within wrunmovie (since 
                                  movie frames are already readin without calculating rolls in wrunmovie). 

               AEE, Jan31, 2005 - set roll to zero when image header does not have valid date/time.


 Version     : 
 @(#)wrunmoviem.pro	1.27 09/07/04 :LASCO NRL LIBRARY


 See Also    : MKMOVIEM.PRO




WRUNMOVIEM3

[List of Routines] (See ./movie/wrunmoviem3.pro)

 project     : SOHO - LASCO/EIT

 Name        : WRUNMOVIEM3

 Purpose     : Widget tool to display animation sequence.

 Explanation : This tool allows the user to view a series of images as
		an animation sequence.  The user can control the direction,
		speed, and number of frames with widget controls.

 Use         : IDL> WRUNMOVIEM [, arg1 [, NAMES=names [,/PREVIOUS]]]

		Without any inputs, program will prompt user to select an existing .mvi file.
    Example  : IDL> WRUNMOVIEM

               Or you could have one argument, the .mvi file you want to load.
    Example  : IDL> WRUNMOVIEM, 'mymovie.mvi'

               Or if you have pre-loaded images into pixmaps (like MKMOVIEM.pro does) call:
		Where win_index is an array of the window numbers and names is optionally
		a STRARR() containing names of each frame.
    Example  : IDL> WRUNMOVIEM, win_index, NAMES=names

		if after exiting WRUNMOVIEM you want to re-load the movie call:
    Example  : IDL> WRUNMOVIEM, /PREVIOUS

 Calls       :

 Comments    : Use MKMOVIEM.pro to load into pixmaps.

 Side effects: None.

 Category    : Image Display.  Animation.

 Written     : Scott Paswaters, NRL Feb. 13 1996.

 Modified    : SEP  29 May 1996 - Changed to multiple pixmaps for images.
				   Added buttons to save and load movie files (.mvi).
				   Seperated control buttons from display window.
               SEP   9 Jul 1996 - Added keyword to pass image headers.

		SHH  12 Jul 1996 - Enabled display of cursor position in draw window
			 	   Added height-time plotting capability
				   Added Edit Frame option
				   Modified effects of mouse buttons
				   Added buttons above draw window
				   Modified display of Control window

               SEP  29 Sep 1996 - Added routines from DAB for applying C3 geometric distortion and
                                  calculating solar radius as function of time.
               SEP  01 Oct 1996 - Added call to C3_DISTORTION for applying C3 geometric distortion

               RAH  01 Nov 1996 - Prior to PLOT_HT call, don't ask for filename

		SHH  09 Jan 1997 - Added "Start H-T" button
				   Calls XEDITFRAME
               SEP  05 Feb 1997 - Mods for mvi version 1 FORMAT.
               SEP  21 Mar 1997 - use sun center and arc_sec/pixel if saved in .mvi file.
               SEP  16 May 1997 - added DN output to window, added button to update center.
               SEP  23 Sep 1997 - added active slider widget for current frame.
		NBR  06 Jan 1999 - changed sec_pix check in file_hdr
		DW   11 Jan 1999 - added C2_DISTORTION and roll angle
		NBR  02 Mar 1999 - eliminated sec_pix check for getting sun center
		NBR 09 Jul 1999  - Add warning if frame headers not saved
		thejake	010705	- begin modification to handle RTHETA movies (Version 3)
		thejake	011109 - After testing, additions do not seem to have done any harm so adding
	nbr, 25 Aug 2003 - Remove #s

					WRUNMOVIEM3, MVIPLAY3, WRITE_DISK_MOVIE3, and READ_MVI3 to library.
					Once an MVI is written with the version 3 software, it will need to
					be read with it as well.

 Version     : 3.1


 See Also    : MKMOVIEM.pro

	%H% %W% : LASCO IDL LIBRARY



WRUNMOVIEM_RT

[List of Routines] (See ./movie/wrunmoviem_rt.pro)

 Project     : SOHO - LASCO/EIT
                   
 Name        : WRUNMOVIEM_RT
               
 Purpose     : Widget tool to display animation sequence.
               
 Explanation : This tool allows the user to view a series of images as
		an animation sequence.  The user can control the direction,
		speed, and number of frames with widget controls.
               
 Use         : IDL> WRUNMOVIEM_RT [, arg1 [, NAMES=names [,/PREVIOUS]]]

		Without any inputs, program will prompt user to select an existing .mvi file.
    Example  : IDL> WRUNMOVIEM_RT

               Or you could have one argument, the .mvi file you want to load.
    Example  : IDL> WRUNMOVIEM_RT, 'mymovie.mvi'

               Or if you have pre-loaded images into pixmaps (like MKMOVIEM.PRO does) call:
		Where win_index is an array of the window numbers and names is optionally
		a STRARR() containing names of each frame.
    Example  : IDL> WRUNMOVIEM_RT, win_index, NAMES=names
    
		If after exiting WRUNMOVIEM_RT you want to re-load the movie call:
    Example  : IDL> WRUNMOVIEM_RT, /PREVIOUS
    
 Calls       : 

 Comments    : Use MKMOVIEM.PRO to load into pixmaps.
               
 Side effects: None.
               
 Category    : Image Display.  Animation.
               
 Written     : Scott Paswaters, NRL Feb. 13 1996.
               
 Modified    : SEP  29 May 1996 - Changed to multiple pixmaps for images.
				   Added buttons to save and load movie files (.mvi).
				   Seperated control buttons from display window.
               SEP   9 Jul 1996 - Added keyword to pass image headers.

		SHH  12 Jul 1996 - Enabled display of cursor position in draw window
			 	   Added height-time plotting capability
				   Added Edit Frame option	  
				   Modified effects of mouse buttons
				   Added buttons above draw window
				   Modified display of Control window

               SEP  29 Sep 1996 - Added routines from DAB for applying C3 geometric distortion and
                                  calculating solar radius as function of time.
               SEP  01 Oct 1996 - Added call to C3_DISTORTION for applying C3 geometric distortion

               RAH  01 Nov 1996 - Prior to PLOT_HT call, don't ask for filename

		SHH  09 Jan 1997 - Added "Start H-T" button
				   Calls XEDITFRAME
               SEP  05 Feb 1997 - Mods for mvi version 1 format.
               SEP  21 Mar 1997 - use sun center and arc_sec/pixel if saved in .mvi file.
               SEP  16 May 1997 - added DN output to window, added button to update center.
               SEP  23 Sep 1997 - added active slider widget for current frame.
		NBR  06 Jan 1999 - changed sec_pix check in file_hdr
		DW   11 Jan 1999 - added C2_DISTORTION and roll angle
		NBR  02 Mar 1999 - eliminated sec_pix check for getting sun center 
		NBR 09 Jul 1999  - Add warning if frame headers not saved
	A. Vourlidas, 11/9/01 - Modified from WRUNMOVIEM to allow HT measurements from GIF movies

 See Also    : MKMOVIEM.PRO

 	@(#)wrunmoviem_rt.pro	1.1, 11/14/01 - NRL LASCO IDL LIBRARY



WR_BEAM

[List of Routines] (See ./display/wr_beam.pro)

 Project       : SOHO - LASCO/EIT  
  
 Name          : WR_BEAM  
  
 Purpose       : Ploting radial beams
  
 Explanation   :   
  
 Use           : wr_beam 
  
 Inputs        :   
  
 Opt. Inputs   :   
  
 Outputs       :   
  
 Opt. Outputs  :  
  
 Keywords      :   
  
 Calls         :  
  
 Common        : lasco.com, wload.com, wplot.com  
  
 Restrictions  : None.  
  
 Side effects  : None.  
  
 Category      : Widgets  
  
 Prev. Hist.   : None.  
  
 Written       : Borut Podlipnik, MPAe, 01-oct-1995  
  
 Modified      :  
  
 Version       :  


WR_BEAM1

[List of Routines] (See ./display/wr_beam1.pro)

 Project       : SOHO - LASCO/EIT  
  
 Name          : WR_BEAM1  
  
 Purpose       : Ploting radial beams
  
 Explanation   :   
  
 Use           : wr_beam1 
  
 Inputs        :   
  
 Opt. Inputs   :   
  
 Outputs       :   
  
 Opt. Outputs  :  
  
 Keywords      :   
  
 Calls         :  
  
 Common        : lasco.com, wload.com, wplot.com  
  
 Restrictions  : None.  
  
 Side effects  : None.  
  
 Category      : Widgets  
  
 Prev. Hist.   : None.  
  
 Written       : Borut Podlipnik, MPAe, 01-oct-1995  
  
 Modified      :  
  
 Version       :  


WSAVE

[List of Routines] (See ./display/wsave.pro)

 Project     : SOHO - LASCO

 Name        : 

 Purpose     : 

 Category    : 

 Explanation : 

 Syntax      : 

 Examples    : 

 Inputs      : None

 Opt. Inputs : None

 Outputs     : None

 Opt. Outputs: None

 Keywords    : None

 Common      : 

 Restrictions:                                  

 Side effects: Not known

 History     : Version 1, 02-Sep-1995, B Podlipnik. Written

 Contact     : BP, borut@lasco1.mpae.gwdg.de


WSAVE1

[List of Routines] (See ./display/wsave1.pro)

 Project     : SOHO - LASCO

 Name        : 

 Purpose     : 

 Category    : 

 Explanation : 

 Syntax      : 

 Examples    : 

 Inputs      : None

 Opt. Inputs : None

 Outputs     : None

 Opt. Outputs: None

 Keywords    : None

 Common      : 

 Restrictions:                                  

 Side effects: Not known

 History     : Version 1, 02-Sep-1995, B Podlipnik. Written

 Contact     : BP, borut@lasco1.mpae.gwdg.de


WSAVE2

[List of Routines] (See ./display/wsave2.pro)

 Project     : SOHO - LASCO

 Name        : 

 Purpose     : 

 Category    : 

 Explanation : 

 Syntax      : 

 Examples    : 

 Inputs      : None

 Opt. Inputs : None

 Outputs     : None

 Opt. Outputs: None

 Keywords    : None

 Common      : 

 Restrictions:                                  

 Side effects: Not known

 History     : Version 1, 02-Sep-1995, B Podlipnik. Written

 Contact     : BP, borut@lasco1.mpae.gwdg.de


WSAVE_PS

[List of Routines] (See ./display/wsave_ps.pro)

 Project     : SOHO - LASCO/EIT

 Name	      : WSAVE_PS

 Purpose     : 

 Category    : Widgets

 Explanation : 

 Syntax      : wsave_ps

 Examples    :

 Inputs      : 

 Opt. Inputs : 

 Outputs     : 

 Opt. Outputs:

 Keywords    : 

 Common      :

 Restrictions: set default PS keywords.

 Side effects: None.

 History     : 20-jun-1995,Borut Podlipnik, MPAe,Written 

 Contact     : BP, borut@lasco1.mpae.gwdg.de


WSIZE

[List of Routines] (See ./display/wsize.pro)

 Project	: SOHO - LASCO/EIT

 Name		: WSIZE

 Purpose	: 

 Explanation	: 

 Use		: wsize

 Inputs	: 

 Opt. Inputs	: 

 Outputs	: 

 Opt. Outputs	:

 Keywords	: 

 Calls		:

 Common	:

 Restrictions  : None.

 Side effects	: None.

 Category	: Widgets

 Prev. Hist.	: None.

 Written	: Borut Podlipnik, MPAe, 07-mar-1995

 Modified	:

 Version	:


WSUNPROFILE

[List of Routines] (See ./display/wsunprofile.pro)

 Project     : SOHO - LASCO/EIT

 Name	      : WSUNPROFILE

 Purpose     : plot

 Category    : Widgets

 Explanation : 

 Syntax      : wsunprofile

 Examples    :

 Inputs      : 

 Opt. Inputs : 

 Outputs     : 

 Opt. Outputs:

 Keywords    : 

 Common      : lasco.com, wload.com, wplot.com

 Restrictions: None.

 Side effects: None.

 History     : 15-jan-1993,Borut Podlipnik, MPAe,Written 

 Contact     : BP, borut@lasco1.mpae.gwdg.de


WSW

[List of Routines] (See ./display/wsw.pro)

 Project     : SOHO - LASCO

 Name        : WDMEMORY 

 Purpose     : 

 Category    : 

 Explanation : 

 Syntax      : 

 Examples    : 

 Inputs      : None

 Opt. Inputs : None

 Outputs     : None

 Opt. Outputs: None

 Keywords    : None

 Common      : 

 Restrictions:                                  

 Side effects: Not known

 History     : Version 1, 02-Sep-1995, B Podlipnik. Written

 Contact     : BP, borut@lasco1.mpae.gwdg.de


WTIME_HEIGHT

[List of Routines] (See ./display/wtime_height.pro)

 Project     : SOHO - LASCO/EIT

 Name	      : WTIME_HEIGHT

 Purpose     : plot time-height, time-speed, distance-speed diagrams.

 Category    : Widgets

 Explanation : 

 Syntax      : wtime_height

 Examples    :

 Inputs      : 

 Opt. Inputs : 

 Outputs     : 

 Opt. Outputs:

 Keywords    : 

 Common      : wsave_ps_block, lines_block, t2d_common

 Restrictions: None.

 Side effects: None.

 History     : 11-dec-1996,Borut Podlipnik, MPAe,Written 
		Version 1.0, 11-dec-96

 Contact     : BP, borut@lasco1.mpae.gwdg.de


WYES_NO

[List of Routines] (See ./display/wyes_no.pro)

 Project     : SOHO - LASCO/EIT

 Name	      : WYES_NO

 Purpose     : 

 Category    : Widgets

 Explanation : 

 Syntax      : Result=wyes_no()

 Examples    : 

 Inputs      : 

 Opt. Inputs : 

 Outputs     : 

 Opt. Outputs:

 Keywords    : TITLE (a string containing the title to be used for the widget)
               LABEL (a string containing a message in WIDGET_LABEL)
               TEXT  (a string to display in WIDGET_TEXT) 
 Common      :

 Restrictions: None.

 Side effects: None.

 History     :  20-oct-1995,Borut Podlipnik, MPAe,Written

 Contact     : BP, borut@lasco1.mpae.gwdg.de


W_LAS_EXP_NORM

[List of Routines] (See ./exposure/w_las_exp_norm.pro)

 W_LAS_EXP_NORM
	WIdget interface for LAS_EXP_NORM

 History:
	Original: 26/3/96; SJT


W_MK_STDIM

[List of Routines] (See ./exposure/w_mk_stdim.pro)

 W_MK_STDIM
	Widget interface for MK_STDIM

 Keywords:
	group	long	input	Group leader for the heirarchy.

 History:
	Original: 26/3/96; SJT


W_POLY_DIFFIM

[List of Routines] (See ./exposure/w_poly_diffim.pro)

 W_POLY_DIFFIM
	Widget interface for POLY_DIFFIM

 History:
	Original: 26/3/96; SJT


W_STDIM_LIST

[List of Routines] (See ./exposure/w_stdim_list.pro)

 W_STDIM_LIST
	A widget interface for MK_STDIM_LIST


W_VAC2AIR

[List of Routines] (See ./convert/w_vac2air.pro)

 NAME:  
	w_vac2air

 PURPOSE:
	Convert vacuum wavelength to air wavelength

 CALLING SEQUENCE:
	w_vac2air

 INPUTS:
	wv - vacuum wavelength (Angstroms)

 OPTIONAL INPUTS:
	none

 KEYWORD PARAMETERS:
	none

 OUTPUTS:
	The value returned is the air wavelength (in Angstroms)
	corresponding to the input vacuum wavelength.

 OPTIONAL OUTPUTS
	none
	
 COMMON BLOCKS:
	None

 SIDE EFFECTS:
	None

 RESTRICTIONS:
	Results are valid only between 2960 and 13000 Angstroms

 PROCEDURE:
	This procedure is the same algorithm used by Kurucz, et. al.
	"Solar Flux Atlas From 296 to 1300 nm", National Solar
	Observatory Atlas No. 1, June 1984.

 MODIFICATION HISTORY:
	Adapted from a FORTRAN program provided by R. Kurucz via
	private communication. Adapted by Paul Reiser July 22, 1997.


XCME_MES

[List of Routines] (See ./cme/xcme_mes.pro)

 NAME:
	XCME_MES

 PURPOSE:
	This procedure is used to display CME measurements 

 CATEGORY:
	CME

 CALLING SEQUENCE:
	XCME_MES

 INPUTS:

 OPTIONAL INPUT PARAMETERS:
	Filename:	If filename is present then it is used immediately

 OUTPUTS:

 OPTIONAL OUTPUT PARAMETERS:

 COMMON BLOCKS:
	com_xcme_mes

 SIDE EFFECTS:
	Initiates the XMANAGER if it is not already running.

 RESTRICTIONS:

 PROCEDURE:

 MODIFICATION HISTORY:
 	Written by:	RA Howard, NRL, 7 May 1997

 @(#)xcme_mes.pro	1.2 03/03/98 :NRL Solar Physics


XCOLORS

[List of Routines] (See ./dfanning/xcolors.pro)

 NAME:
       XCOLORS

 PURPOSE:

       The purpose of this routine is to interactively change color tables
       in a manner similar to XLOADCT. No common blocks are used so
       multiple copies of XCOLORS can be on the display at the same
       time (if each has a different TITLE). XCOLORS has the ability
       to notify a widget event handler, an object method, or an IDL
       procedure if and when a new color table has been loaded. The
       event handler, object method, or IDL procedure is then responsibe
       for updating the program's display on 16- or 24-bit display systems.

 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:

       Widgets, Object, Command line.

 CALLING SEQUENCE:

       XCOLORS

 INPUTS:

       None.

 KEYWORD PARAMETERS:

       BLOCK: If this keyword is set, the program will try to block the
          IDL command line. Note that this is only possible if no other
          widget program is currently blocking the IDL command line. It
          is much more reliable to make XCOLORS a modal widget (see the MODAL
          keyword), although this can generally only be done when XCOLORS
          is called from another widget program.

       BOTTOM: The lowest color index of the colors to be changed.

       COLORINFO: This output keyword will return either a pointer to
          a color information structure (if the program is called in
          a non-modal fashion) or a color information structure (if the program
          is called in modal or blocking fashion). The color information
          structure is an anonymous structure defined like this:

             struct = { R: BytArr(!D.Table_Size), $ ; The current R color vector.
                        G: BytArr(!D.Table_Size), $ ; The current G color vector.
                        B: BytArr(!D.Table_Size), $ ; The current B color vector.
                        NAME: "", $                 ; The name of the current color table.
                        INDEX: 0 }                  ; The index number of the current color table.

          If a pointer to the structure is obtained, you will be responsible
          for freeing it to prevent memory leakage:

             XColors, ColorInfo=colorInfoPtr
             Print, "Color Table Name: ", (*colorInfoPtr).Name
             Ptr_Free, colorInfoPtr

          Note that that Name field will be "Unknown" and the Index field will
          be -1 until a color table is actually selected by the user. You are
          responsible for checking this value before you use it.

          When called in modal or blocking fashion, you don't have to worry about freeing
          the pointer, since no pointer is involved:

             XColors, /Block, ColorInfo=colorInfoData
             Help, colorInfoData, /Structure
             Print, "Color Table Name: ", colorInfoData.Name

       DATA: This keyword can be set to any valid IDL variable. If
          the variable is defined, the specified object method or notify
          procedure will be passed this variable via a DATA keyword. This
          keyword is defined primarily so that Notify Procedures are compatible
          with the XLOADCT way of passing data. If is not strictly required,
          since the _EXTRA keyword inheritance mechanism will allow passing
          of *any* keyword parameter defined for the object or procedure that is
          to be notified.

       DRAG: Set this keyword if you want colors loaded as you drag
          the sliders. Default is to update colors only when you release
          the sliders.

       _EXTRA: This keyword inheritance mechanism will pick up and
          pass along to any method or procedure to be notified and keywords
          that are defined for that procedure. Note that you should be sure
          that keywords are spelled correctly. Any mis-spelled keyword will
          be ignored.

       FILE: A string variable pointing to a file that holds the
          color tables to load. The normal colors1.tbl file is used by default.

       GROUP_LEADER: The group leader for this program. When the group
          leader is destroyed, this program will be destroyed.

       MODAL: Set this keyword (along with the GROUP_LEADER keyword) to
          make the XCOLORS dialog a modal widget dialog. Note that NO
          other events can occur until the XCOLORS program is destroyed
          when in modal mode.

       NCOLORS: This is the number of colors to load when a color table
          is selected.

       NOTIFYID: A 2-column by n-row array that contains the IDs of widgets
          that should be notified when XCOLORS loads a color table. The first
          column of the array is the widgets that should be notified. The
          second column contains IDs of widgets that are at the top of the
          hierarchy in which the corresponding widgets in the first column
          are located. (The purpose of the top widget IDs is to make it
          possible for the widget in the first column to get the "info"
          structure of the widget program.) An XCOLORS_LOAD event will be
          sent to the widget identified in the first column. The event
          structure is defined like this:

          event = {XCOLORS_LOAD, ID:0L, TOP:0L, HANDLER:0L, $
             R:BytArr(!D.N_COLORS < 256), G:BytArr(!D.N_COLORS < 256), $
             B:BytArr(!D.N_COLORS < 256), INDEX:0, NAME:""}

          The ID field will be filled out with NOTIFYID[0, n] and the TOP
          field will be filled out with NOTIFYID[1, n]. The R, G, and B
          fields will have the current color table vectors, obtained by
          exectuing the command TVLCT, r, g, b, /Get. The INDEX field will
          have the index number of the just-loaded color table. The name
          field will have the name of the currently loaded color table.

          Note that XCOLORS can't initially tell *which* color table is
          loaded, since it just uses whatever colors are available when it
          is called. Thus, it stores a -1 in the INDEX field to indicate
          this "default" value. Programs that rely on the INDEX field of
          the event structure should normally do nothing if the value is
          set to -1. This value is also set to -1 if the user hits the
          CANCEL button. (Note the NAME field will initially be "Unknown").

          Typically the XCOLORS button will be defined like this:

             xcolorsID = Widget_Button(parentID, Value='Load New Color Table...', $
                Event_Pro='Program_Change_Colors_Event')

          The event handler will be written something like this:

             PRO Program_Change_Colors_Event, event

                ; Handles color table loading events. Allows colors be to changed.

             Widget_Control, event.top, Get_UValue=info, /No_Copy
             thisEvent = Tag_Names(event, /Structure_Name)
             CASE thisEvent OF

                'WIDGET_BUTTON': BEGIN

                     ; Color table tool.

                   XColors, NColors=info.ncolors, Bottom=info.bottom, $
                      Group_Leader=event.top, NotifyID=[event.id, event.top]
                   ENDCASE

                'XCOLORS_LOAD': BEGIN

                     ; Update the display for 24-bit displays.

                   Device, Get_Visual_Depth=thisDepth
                   IF thisDepth GT 8 THEN BEGIN
                   WSet, info.wid

                    ...Whatever display commands are required go here. For example...

                    TV, info.image

                 ENDIF
                 ENDCASE

              ENDCASE

              Widget_Control, event.top, Set_UValue=info, /No_Copy
              END

       NOTIFYOBJ: A vector of structures (or a single structure), with
          each element of the vector defined as follows:

             struct = {XCOLORS_NOTIFYOBJ, object:Obj_New(), method:''}

          where the Object field is an object reference, and the Method field
          is the name of the object method that should be called when XCOLORS
          loads its color tables.

             ainfo = {XCOLORS_NOTIFYOBJ, a, 'Draw'}
             binfo = {XCOLORS_NOTIFYOBJ, b, 'Display'}
             XColors, NotifyObj=[ainfo, binfo]

          Note that the XColors program must be compiled before these structures
          are used. Alternatively, you can put this program, named
          "xcolors_notifyobj__define.pro" (*three* underscore characters in this
          name!) in your PATH:

             PRO XCOLORS_NOTIFYOBJ__DEFINE
              struct = {XCOLORS_NOTIFYOBJ, OBJECT:Obj_New(), METHOD:''}
             END

          Or, you can simply define this structure as it is shown here in your code.

          "Extra" keywords added to the XCOLORS call are passed along to
          the object method, which makes this an alternative way to get information
          to your methods. If you expect such keywords, your methods should be defined
          with an _Extra keyword.

       NOTIFYPRO: The name of a procedure to notify or call when the color
          tables are loaded. If the DATA keyword is also defined, it will
          be passed to this program via an DATA keyword. But note that *any*
          keyword appropriate for the procedure can be used in the call to
          XCOLORS. For example, here is a procedure that re-displays and image
          in the current graphics window:

             PRO REFRESH_IMAGE, Image=image, _Extra=extra, WID=wid
             IF N_Elements(wid) NE 0 THEN WSet, wid
             TVIMAGE, image, _Extra=extra
             END

          This program can be invoked with this series of commands:

             IDL> Window, /Free
             IDL> fTVImage, image, Position=[0.2, 0.2, 0.8, 0.8]
             IDL> XColors, NotifyPro='Refresh_Image', Image=image, WID=!D.Window

          Note that "extra" keywords added to the XCOLORS call are passed along to
          your procedure, which makes this an alternative way to get information
          to your procedure. If you expect such keywords, your procedure should
          be defined with an _Extra keyword as illustrated above.

       TITLE: This is the window title. It is "Load Color Tables" by
          default. The program is registered with the name 'XCOLORS:' plus
          the TITLE string. The "register name" is checked before the widgets
          are defined. If a program with that name has already been registered
          you cannot register another with that name. This means that you can
          have several versions of XCOLORS open simultaneously as long as each
          has a unique title or name. For example, like this:

            IDL> XColors, NColors=100, Bottom=0, Title='First 100 Colors'
            IDL> XColors, NColors=100, Bottom=100, Title='Second 100 Colors'

       XOFFSET: This is the X offset of the program on the display. The
          program will be placed approximately in the middle of the display
          by default.

       YOFFSET: This is the Y offset of the program on the display. The
          program will be placed approximately in the middle of the display
          by default.

 COMMON BLOCKS:

       None.

 SIDE EFFECTS:

       Colors are changed. Events are sent to widgets if the NOTIFYID
       keyword is used. Object methods are called if the NOTIFYOBJ keyword
       is used. This program is a non-blocking widget.

 RESTRICTIONS:

       None.

 EXAMPLE:

       To load a color table into 100 colors, starting at color index
       50 and send an event to the widget identified at info.drawID
       in the widget heirarchy of the top-level base event.top, type:

       XCOLORS, NCOLORS=100, BOTTOM=50, NOTIFYID=[info.drawID, event.top]

 MODIFICATION HISTORY:
       Written by:     David Fanning, 15 April 97. Extensive modification
         of an older XCOLORS program with excellent suggestions for
         improvement by Liam Gumley. Now works on 8-bit and 24-bit
         systems. Subroutines renamed to avoid ambiguity. Cancel
         button restores original color table.
       23 April 1997, added color protection for the program. DWF
       24 April 1997, fixed a window initialization bug. DWF
       18 June 1997, fixed a bug with the color protection handler. DWF
       18 June 1997, Turned tracking on for draw widget to fix a bug
         in TLB Tracking Events for WindowsNT machines in IDL 5.0. DWF
       20 Oct 1997, Changed GROUP keyword to GROUP_LEADER. DWF
       19 Dec 1997, Fixed bug with TOP/BOTTOM reversals and CANCEL. DWF.
        9 Jun 1998, Fixed bug when using BOTTOM keyword on 24-bit devices. DWF
        9 Jun 1998, Added Device, Decomposed=0 for TrueColor visual classes. DWF
        9 Jun 1998, Removed all IDL 4 compatibility.
       21 Oct 1998, Fixed problem with gamma not being reset on CANCEL. DWF
        5 Nov 1998. Added the NotifyObj keyword, so that XCOLORS would work
         interactively with objects. DWF.
        9 Nov 1998. Made slider reporting only at the end of the drag. If you
         want continuous updating, set the DRAG keyword. DWF.
        9 Nov 1998. Fixed problem with TOP and BOTTOM sliders not being reset
         on CANCEL. DWF.
       10 Nov 1998. Fixed fixes. Sigh... DWF.
        5 Dec 1998. Added INDEX field to the XCOLORS_LOAD event structure. This
         field holds the current color table index number. DWF.
        5 Dec 1998. Modified the way the colorbar image was created. Results in
         greatly improved display for low number of colors. DWF.
        6 Dec 1998. Added the ability to notify an unlimited number of objects. DWF.
       12 Dec 1998. Removed obsolete Just_Reg keyword and improved documetation. DWF.
       30 Dec 1998. Fixed the way the color table index was working. DWF.
        4 Jan 1999. Added slightly modified CONGRID program to fix floating divide
          by zero problem. DWF
        2 May 1999. Added code to work around a Macintosh bug in IDL through version
          5.2 that tries to redraw the graphics window after a TVLCT command. DWF.
        5 May 1999. Restore the current window index number after drawing graphics.
          Not supported on Macs. DWF.
        9 Jul 1999. Fixed a couple of bugs I introduced with the 5 May changes. Sigh... DWF.
       13 Jul 1999. Scheesh! That May 5th change was a BAD idea! Fixed more bugs. DWF.
       31 Jul 1999. Substituted !D.Table_Size for !D.N_Colors. DWF.
        1 Sep 1999. Got rid of the May 5th fixes and replaced with something MUCH simpler. DWF.
       14 Feb 2000. Removed the window index field from the object notify structure. DWF.
       14 Feb 2000. Added NOTIFYPRO, DATA, and _EXTRA keywords. DWF.
       20 Mar 2000. Added MODAL, BLOCK, and COLORINFO keywords. DWF
       20 Mar 2000. Fixed a slight problem with color protection events triggering
          notification events. DWF.
       31 Mar 2000. Fixed a problem with pointer leakage on Cancel events, and improved
          program documentation. DWF.
       17 Aug 2000. Fixed a problem with CANCEL that occurred only if you first
          changed the gamma settings before loading a color table. DWF.
       10 Sep 2000. Removed the requirement that procedures and object methods must
          be written with an _Extra keyword. DWF.
        5 Oct 2000. Added the File keyword to LOADCT command, as I was suppose to. DWF.
        5 Oct 2000. Now properly freeing program pointers upon early exit from program. DWF.


XEDITFRAME

[List of Routines] (See ./movie/xeditframe.pro)

 Project       : SOHO -LASCO/EIT

 Name          : XEDITFRAME

 Purpose       : This tool allows the user to edit a particular image "on the
                 fly," while the WRUNMOVIEM procedure is running, using a widget
		  interface.

 Use           : XEDITFRAME, in, out, [moviev]

 Arguments     : InImg - The input, or original image
                 FinalImg - The output, or final image
                 moviev - a structure generated by the WRUNMOVIE3 program,
                       containing information about the movie.  If moviev
                       is not provided, then certain features of the program,
                       such as referencing images by "Current frame", will
                       not be supported.

 Calls         : LASCO_READFITS, POINT_FILTER, GET_FILENAME
	    	  GETSUPERBASENAME   (currently included in xeditframe.pro)	

 Comments      : 
		  The field widgets require the user to press RETURN in order for changes
		  to take effect.
		  Much of the "overhead" in this program is for the "Undo" feature,
		  which necessitates extra bookkeeping.

	 	 The resulting image is = (Primary)*Normalization - (Base), which is then
		  clipped at saturation points (cutoffs) provided by the user.

		"Super Base Frame" should probably be changed to a term easily
		  recognized by LASCO team members.  Procedure GETSUPERBASENAME
		 needs to be extended significantly.

		 "Remove Stars" currently operates on both primage & base images
		 simultaneously, and only does so when the "Remove Stars" button is
		 pressed.  For example, if primary and base images are loaded and
		 "remove stars" is selected, and then a different primary image is loaded,
	 	 remove stars will need to be run again -- but then the base image will
		 have been operated on TWICE.

		 On the "Primary Image" and "Base Image" buttons: If you want to 
		 "re-select" a given button (i.e. load the original image again even
		 though "Original Image" is already selected), you need to click
		 on a different option (e.g. "None") and then click back to the selection
		 you want.

 Side effects  : XEDITFRAME disables all other widgets (e.g. WRUNMOVIEM's interface)
		  until it is finished.

 Category      : Image Processing

 Written       : Scott Hawley, NRL Jan 09, 1996 (from editframe.pro, SHH Jul 12, 1996)

 Modified	: N. Rich	971211	Change EDIT_GETFILENAME function to use
					GET_FILENAME procedure--retrieves final data
					if it exists
	03.09.23, NRich - If moviev.rect THEN rotate image

 Version       : 

 See Also      : WRUNMOVIEM.PRO
 
 @(#)xeditframe.pro	1.7 09/24/03 :NRL Solar Physics


XLOADCT

[List of Routines] (See ./display/xloadctbp.pro)

 NAME:
       XLOADCT
 PURPOSE:
       A graphical interface to the LOADCT user library procedure.
       XLOADCT displays the current color map and provides
       an array of buttons, one per availible predefined color
       table. Using the mouse to press these buttons causes
       the corresponding color map to be loaded.
 CATEGORY:
       Widgets
 CALLING SEQUENCE:
       XLOADCT
 INPUTS:
       None.
 KEYWORDS:
	FILE:	If this keyword is set, the file by the given name is used
		instead of the file colors1.tbl in the IDL directory.  This
		allows multiple IDL users to have their own color table file.
       GROUP = The widget ID of the widget that calls XLoadct.  When 
               this ID is specified, a death of the caller results in a 
               death of XLoadct
	NCOLORS = number of colors to use.  Use color indices from BOTTOM
		to the smaller of !D.TABLE_SIZE-1 and NCOLORS-1.
		Default = !D.TABLE_SIZE = all available colors.
	BOTTOM = first color index to use. Use color indices from BOTTOM to
		BOTTOM+NCOLORS-1.  Default = 0.
       PICK_ONE - Normally, XLOADCT remains running until the user
               presses the "QUIT" button. If PICK_ONE is present and 
               non-zero, the "QUIT" button is not displayed, and
               XLOADCT quits after a single selection.
       SILENT - Normally, no informational message is printed when
               a color map is loaded. If this keyword is present and
               zero, this message is printed.
	USE_CURRENT: If set, use the current color tables, regardless of
		the contents of the COMMON block COLORS.
 OUTPUTS:
       None.
 COMMON BLOCKS:
       None.
 SIDE EFFECTS:
       One of the predefined color maps may be loaded.
 RESTRICTIONS:
       This routine uses the LOADCT user library procedure to
       do the actual work.
 MODIFICATION HISTORY:
       24, August, 1990, Written by AB, RSI.
       March 1, 1992  Mark Rivers added Reverse Table to options menu.
	7/92, DMS, Added new color tables (allows more than 16).
	9/92, ACY, Add FILE keyword.


XPLOT_HT

[List of Routines] (See ./movie/xplot_ht.pro)

 NAME:
	XPLOT_HT

 PURPOSE:
	This procedure is used to display height-time curves. It reads in a
       height-time file created by one of the movie programs and generates
       a plot.

 CATEGORY:
	MOVIE

 CALLING SEQUENCE:
	XPLOT_HT

 INPUTS:

 OPTIONAL INPUT PARAMETERS:
	Filename:	If filename is present then it is used immediately

 OUTPUTS:
	A plot is generated on the screen, and optionally a print file is
	generated of the form idlplot.psnnn, where nnn is a sequential
	number.

 OPTIONAL OUTPUT PARAMETERS:

 COMMON BLOCKS:
	com_xplot_ht

 SIDE EFFECTS:
	Initiates the XMANAGER if it is not already running.

 RESTRICTIONS:

 PROCEDURE:
	The various widgets are set up and registered.  The user selects the
	height-time file to be processed.  The file is read in and the data
	points plotted.  The user is then able to fit the data to polynomial
	functions of degree 1,2, or 3.  The plot can be printed.  The speeds
	can be saved to a file.

 MODIFICATION HISTORY:
 	Written by:	Scott H. Hawley, NRL Summer Student, June 1996
	Version 2	RA Howard, NRL, Modified plot calls to use utplot
	15 Oct 96	RAH, widgetized
       27 Oct 96       RAH, Corrected overplots of interpolated values
                            Set new window number before plotting
       08 Nov 96       RAH, Corrected situation if called without argument
       10 Nov 96       RAH, Corrected Acceleration = 2*fit_coeff
       11 Nov 96       RAH, Added plot of position angles
       04 Apr 97       RAH, Force first smoothed time to be at least first observed time
	10 Jan 96	SHH, Added custom curve fit
			     Protected against null filenames 
       10 Apr 97       RAH, Permit negative velocities to be plotted
       30 Sep 97       RAH, Modified call to READ_HT
       03 Oct 97       SEP, added ability to save to .ps file
       10 Dec 97       SEP, added user & timestamp to .ps file and hardcopy
       24 Dec 97       RAH, Plot time start includes the extrapolated time to limb
       03 Feb 98       RAH, Plot individual feature codes
       10 Aug 98       RAH, Add path name to file name

 @(#)xplot_ht.pro	1.16 07/18/00 :LASCO IDL LIBRARY


XREGISTERED

[List of Routines] (See ./util/xregistered2.pro)

 NAME: 
	XREGISTERED

 PURPOSE:
	This function returns true if the widget named as its argument 
	is currently registered with the XMANAGER as an exclusive widget, 
	otherwise this routine returns false.

 CATEGORY:
	Widgets.

 CALLING SEQUENCE:
	Result = XREGISTERED(Name)

 INPUTS:
	Name:	A string containing the name of the widget in question.

 KEYWORD PARAMETERS:
	NOSHOW:	If the widget in question is registered, it is brought
		to the front of all the other windows by default.  Set this
		keyword to keep the widget from being brought to the front.
	ID:	If the widget in question is registered, this named variable
               will contain the id of the first instance of the widget.

 OUTPUTS:
	If the named widget is registered, XREGISTERED returns the number
	of instances of that name in the list maintained by XMANAGER.  
	Otherwise, XREGISTERED returns 0.

 COMMON BLOCKS:
	MANAGED

 SIDE EFFECTS:
	Brings the widget to the front of the desktop if it finds one.

 RESTRICTIONS:
	None.

 PROCEDURE:
	Searches the list of exclusive widget names and if a match is found
	with the one in question, the return value is modified.

 MODIFICATION HISTORY:
	Written by Steve Richards, November, 1990
	Jan, 92 - SMR	Fixed a bug where an invalid widget
			was being referenced with 
			WIDGET_CONTROL and the /SHOW keyword.
	17 November 1993 - AB and SMR. Added ID validity checking to
			fix a bug where already dead widgets were being
			accessed.
	21 October 1994 - Scott Paswaters (NRL) added the ID optional param.

	@(#)xregistered2.pro	1.1 10/08/96 LASCO IDL LIBRARY


XSELECT_EIT

[List of Routines] (See ./nrleit/display/xselect_eit.pro)

 Project     : SOHO - CDS / CHIANTI     
                   
 Name        : XSELECT_EIT
               
 Purpose     : Force the user to select from a list or abort.
               
 Explanation : A menu with the supplied options is generated, as
		well as a DONE-button (to signal completion of the selection)
		and a QUIT-button (to signal abortion of the selection).
               
		Menus can be either nonexclusive or exclusive.
		A default selection can be supplied.

 Use         : XSELECT,OPTIONS,STATUS,ABORT (all 3 parameters needed)
    
 Inputs      : OPTIONS:
			A text array containing the possible selections.

		STATUS:	An integer array containing the default selection,
			STATUS( i ) eq 1 signifies that OPTION( i ) is
			selected by default. Must have same dimensions as
                       OPTIONS parameter.
               
 Opt. Inputs : None.
               
 Outputs     : STATUS:	The resulting selection array. OPTION( i ) eq 1
			signifies selection of option no. i.

		ABORT:	Set to 1 if the user aborted the selection.
               
 Opt. Outputs: None.
               
 Keywords    : TITLE:	String with the title of the window with the menu.
			(default: 'Select options below')
		
		QUIT:	String with the text to go on the QUIT button.
			(default: 'Quit')

		DONE:	String with the text to go on the DONE button.
			(default: 'Done')

		GROUP_LEADER:
			Standard Xmanager/Widget meaning.

		X/YOFFSET: The position of the upper left corner of the
			new base.

		EXCLUSIVE/
		NONEXCLUSIVE:
			The type of base showing the selection buttons.
			Default: NONEXCLUSIVE

		MODAL:	Set to make the selection widget modal. 
			See Side effects.

 Calls       : DATATYPE

 Common      : XSELECT
               
 Restrictions: None.
               
 Side effects: The use of the MODAL keyword causes all widget
		DRAW windows to be blanked out.... Might be fixed
		in later versions of IDL...? (Depending on whether
		they see it as a bug or a feature :-)
               
 Category    : CDS, QuickLook, General
               
 Prev. Hist. : None.

 Written     : Stein Vidar Hagfors Haugan, 18 November 1993
               
 Modified    : SVHH, Version 1.5, 3 June 1994
			Added MODAL and X/YOFFSET keywords.
		PB,   Version 1.6, 24 Aug 1994  
		        Changed button 'Done' to 'Continue'
               CDP,  Upgraded header info and set default xoffset 
                     and yoffset.  14-Feb-95
               Ken Dere, made list scrollable  Sept 1996

 Version     : Version 2, 14-Feb-95


XSTARTHT

[List of Routines] (See ./movie/xstartht.pro)

 NAME:
	XSTARTHT

 PURPOSE:
	This procedure is used to start the CME measurements

 CATEGORY:
	CME

 CALLING SEQUENCE:
	XSTARTHT

 INPUTS:

 OPTIONAL INPUT PARAMETERS:

 OUTPUTS:

 OPTIONAL OUTPUT PARAMETERS:

 COMMON BLOCKS:
	com_xstartht
	com_height_time

 SIDE EFFECTS:
	Initiates the XMANAGER if it is not already running.

 RESTRICTIONS:

 PROCEDURE:

 MODIFICATION HISTORY:
 	Written by:	RA Howard, NRL, 7 May 1997

 @(#)xstartht.pro	1.2 09/12/97 :NRL Solar Physics


XVALIDL()

[List of Routines] (See ./display/xvalidl.pro)

 PROJECT:
       SOHO - CDS/SUMER

 NAME:
       XVALIDL()

 PURPOSE:
       Determine if a named widget is registered with XMANAGER

 CATEGORY:
       Utility

 EXPLANATION:
       This is a widget utility program similar to xregistered (it is
       actually modified from xregistered). It does one more thing
       than xregistered: it returns the ID of the named widget as an
       optional output keyword parameter. XREGISTERED should have had
       this ID keyword (suggestion has been sent to RSI by LYW).

 SYNTAX:
       Result = xvalidl(name)

 EXAMPLES:
       IF xvalidl('image_tool', id=parent) THEN ...

 INPUTS:
       NAME - String, name of the widget program

 OPTIONAL INPUTS:
       None.

 OUTPUTS:
       RESULT - Integer with a value of 1 or 0, indicating if the
                named widget is registered with XMANAGER

 OPTIONAL OUTPUTS:
       ID     - ID of the top level widget which is registered with
                XMANAGER. If the named widget is not registered with
                XMANAGER, a -1 will be returned.

 KEYWORDS:
	NOSHOW - If the widget in question is registered, it is brought
		 to the front of all the other windows by default.  Set this
		 keyword to keep the widget from being brought to the front.

 COMMON:
       MANAGED (defined in XMANAGER and XREGISTERED)

 RESTRICTIONS:
       XMANAGER and/or XREGISTERED must be called prior to calling
       this routine to establish the MANAGED common block.

 SIDE EFFECTS:
       The named widget is brought to foreground id NOSHOW keyword is
       not set.

 HISTORY:
       Version 1, January 4, 1996, Liyun Wang, GSFC/ARC. Modified
          from XREGISTERED

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


XVAREDT

[List of Routines] (See ./display/xvaredt.pro)

 NAME:
	XVAREDT
 PURPOSE:
	This routine provides an editor for any IDL variable.
 CATEGORY:
	Widgets
 CALLING SEQUENCE:
	XVAREDT, VAR
 INPUTS:
	VAR = The variable that is to be edited.
 KEYWORD PARAMETERS:
	NAME = The NAME of the variable.  This keyword is overwritten with the
		structure name if the variable is a structure.
	GROUP = The widget ID of the widget that calls XVarEdit.  When this
		ID is specified, a death of the caller results in a death of
		XVarEdit.
 OUTPUTS:
	VAR= The variable that has been edited, or the original when the user
		selects the "Cancel" button in the editor.
 COMMON BLOCKS:
	Xvarcom - stores the state of the variable that is being edited.
 SIDE EFFECTS:
	Initiates the XManager if it is not already running.
 RESTRICTIONS:
	If the variable is exceedingly large such as a giant structure or
	huge array, the editor will not fit on the screen and may not be able
	to create enough widget components to edit the whole variable.
 PROCEDURE:
	Create and register the widget and then exit.
	If the user selects "accept", the values in the editor are written
	to the variable passed in, otherwise, they are ignored.
 MODIFICATION HISTORY:
	Written by: Steve Richards,	February, 1991


XY_BILIN

[List of Routines] (See ./display/xy_bilin.pro)

 NAME:
	XY_BILIN
 PURPOSE:
	Bilinear interpolation routine for arrays.
 CATEGORY:
	Image analysis.
 CALLING SEQUENCE:
	XY_BILIN,P,X1,Y1,VAL
 INPUTS:
	P = array.
	X1,Y1 = required points.
 OPTIONAL INPUT PARAMETERS:
	NONE
 OUTPUTS:
	VAL = value at point.
 OPTIONAL OUTPUT PARAMETERS:
	NONE
 COMMON BLOCKS:
	NONE
 SIDE EFFECTS:
	NONE
 RESTRICTIONS:
	NONE
 PROCEDURE:
	TRIVIAL
 MODIFICATION HISTORY:
	3-3-87 NT
	10-6-1987  REVISED TO SET MISSING PIXELS TO -32768  NT
	28-1-88  NT REVISED
	11-3-88 revised because of possible errors caused by large array
		manipulation.  NT


YYMMDD

[List of Routines] (See ./display/yymmdd.pro)

 NAME:
	YYMMDD
 PURPOSE:
       YYMMDD returns a list of "numerical" directories (e.g., '970803/')
       It rejects other directories (e.g. assorted/, bad_dates/)
 CALLING SEQUENCE:
	yymmdd, ff
 INPUTS:
       ff -- a list of directories
 OUTPUTS:
       Returns only "numerical" directories  
 SIDE EFFECTS:

 RESTRICTIONS:
       Uses  the CDS routine VALID_NUM to check for numerical directories
 PROCEDURE:

 MODIFICATION HISTORY:
       Written by:     A. Vourlidas  9/12/97


YYMMDD2UTC

[List of Routines] (See ./util/yymmdd2utc.pro)

 NAME:
	YYMMDD2UTC

 PURPOSE:
	This function converts a date string in the format [YY]YYMMDD[_][HHMMSS]
       into a modified julian date structure

 CATEGORY: UTIL, time

 CALLING SEQUENCE:
	Result = YYMMDD2UTC(Dates)

 INPUTS:
	Dates:	Date string in the format yymmdd, yyyymmdd, or yyyymmdd_hhmmss,
               or mjd or CDS time structure

 OUTPUTS:
	This function returns a CDS date structure.  If the input is an array of
	date strings, then the output will be an array of structures.

 MODIFICATION HISTORY:
 	Written by:	RA Howard, 1995
	V2:  RAH, Jun 2, 1997, input dates can be long, string or CDS time structure
	V3:  RAH, Sep 22, 1997, corrected CDS time structure to be longs not integers
   2005.03.17, nbr - allow/use _hhmmss in argument
   2005.03.30, nbr - fix bug that modified argument

	@(#)yymmdd2utc.pro	1.6 03/30/05 LASCO IDL LIBRARY


ZOOM_IT

[List of Routines] (See ./display/zoom_it.pro)

 Project     : SOHO - LASCO

 Name        : 

 Purpose     : 

 Category    : 

 Explanation : 

 Syntax      : 

 Examples    : 

 Inputs      : None

 Opt. Inputs : None

 Outputs     : None

 Opt. Outputs: None

 Keywords    : None

 Common      : 

 Restrictions:                                  

 Side effects: Not known

 History     : Version 1, 02-Sep-1995, B Podlipnik. Written

 Contact     : BP, borut@lasco1.mpae.gwdg.de


[1]

[List of Routines] (See ./data_anal/image_profiles.pro)

 NAME:

       GET_PT
       
 PURPOSE:
 
        Digitize a point on a previously plotted curve, and return
        the corresponding array element.

 CALLING SEQUENCE:
 
        Result = GET_PT(XAXIS,YAXIS,XPOINT,YPOINT)
        
 INPUTS:
 
        XAXIS - the x axis vector which was used to make the plot.
        
        YAXIS - the y axis vector which was used to make the plot.
		
 KEYWORD PARAMETERS:
 
        NOHIGHLIGHT - set to inhibit putting a red mark on the curve
                      at the digitized point.
			
        MESSAGE - a string to print as the message to the user.
                  Default = 'Digitize a point: '
			
        NOINIT - set to inhibit placing the cursor in the center of
                 the plot window.
		    
 OUTPUTS:
 
        Result - The array subscript of the digitized point.

 OPTIONAL OUTPUT PARAMETERS:
 
        XPOINT, YPOINT - the digitized points.

 SIDE EFFECTS:
 
        A mark is drawn on the plot at the digitized point.

 PROCEDURE:

        The user is asked to digitize a point on the curve using the
        mouse.  The VALUE_TO_INDEX function is used to find the
        closest array element.
		
 MODIFICATION HISTORY:
 
        D. L. Windt, Bell Laboratories, November 1989
        Feb. 1991, Removed call to TEK_COLOR
        Mar. 1997, replaced index search code with call to
        VALUE_TO_INDEX function.

        windt@bell-labs.com


[2]

[List of Routines] (See ./data_anal/reduce_std_size.pro)

 NAME:

	REDUCE_STD_SIZE

 PURPOSE:

	Create a "full image" 512x512 of the input image.  Accounts for sub 
	images and pixel summing.

 CATEGORY:

	LASCO DATA REDUCTION

 CALLING SEQUENCE:

	Result = REDUCE_STD_SIZE(Img,Hdr)

 INPUTS:

	Img:	Input Image array
	Hdr:	FITS header or LASCO header structure

 OPTIONAL INPUTS:
	None
	
 KEYWORD PARAMETERS:

	FULL:	   Returns an image of size 1024x1024 pixels if set. The default is a 
		   512x512 image.

	NO_REBIN:  Set this to return an array which has not been rescaled 
		   into 512 or 1024.  The default is to perform a rebin to 
                  resize the image.

	BIAS:	Subtracts bias and corrects values for binning before returning image. 
		Will return bias value.

	SAVEHDR:	Do not put new values in header

 OUTPUTS:

	The function result is a full image, with the input image inserted into
	the correct place in the full image. Also, hdr is modified.

 OPTIONAL OUTPUTS:
	bias

 COMMON BLOCKS:
	None

 SIDE EFFECTS:
	None

 PROCEDURE:

	The input image is inserted into its proper place in a full image.  
	On-chip and off-chip pixel summing are properly considered. The output 
	image is resized to a 512 x 512 image.  Optionally, it can be resized 
	to 1024 x 1024 or any size, or not resized at all.  

	If the image is not resized, then each dimension would be determined
	by the amount of summing along each axis according to 1024 / SUM,
	where SUM is the number of pixels summed along the axis.  i.e., if 2x2 
	summing is used, then the image size would be 512 x 512.  If 4x2 
	summing were used, then the image size would be 256 x 512.

	IF BIAS keyword is set, output image values are corrected for summing 
	and offset bias. LEBSUM and SUM header values are changed to reflect output. 

 EXAMPLE:

	To obtain the default 512 x 512 image:

		Output = REDUCE_STD_SIZE(Img,Hdr)

	To obtain a 1024 x 1024 image:

		Output = REDUCE_STD_SIZE(Img,Hdr,/full)

	To obtain an image sized by the summing:

		Output = REDUCE_STD_SIZE(Img,Hdr,/no_rebin)

 MODIFICATION HISTORY:		Written, RA Howard, NRL
    VERSION 1   rah    29 Aug 1996
    VERSION 1.1 sep    29 Sep 1996	added /FULL keyword, and ability to
					handle header structures
    VERSION 1.2 rah    22 Oct 1996	Added /no_rebin keyword
    VERSION 1.3 rah    17 Jul 1997	Corrected handling of image sizes >1024
    VERSION 1.4 nbr	11 Dec 1998	Corrected handling of summed images with sizes > 512
    VERSION 1.5 nbr    11 Feb 1999	Modify R[1,2][row,col] in header (returned)
   		 nbr	12 Feb 1999	Divide by lebxsum*lebysum if binned image
		 nbr	17 Feb 1999	See notes below
		 nbr	18 Feb 1999	Do not divide by lebxsum*lebysum if %P or PB image
		 nbr	23 Mar 1999	Modify NAXIS[1,2] in header
		 nbr 	23 Apr 1999	Added telescope check
		nbr	 7 Dec 1999	Replace stc_flag with LASCO_FITSHDR2STRUCT; fix
					problem with unsummed, rebinned images
		nbr,  1 Aug 2000 - Modify for MK4 images
	nbr, 30 Jan 01 - Add BIAS keyword and streamline program
	nbr, 15 Jun 01 - Remove conditional on REBIN
	nbr, 19 Nov 01 - Handle zero-size images
	nbr, 14 Mar 03 - Correct binning correction again; add /SAVEHDR
	nbr,  5 May 04 - Update crpix values in header if subfield

 
 05/10/04 @(#)reduce_std_size.pro	1.15 :NRL Solar Physics


[2]

[List of Routines] (See ./reduce/reduce_statistics.pro)

 NAME:

	REDUCE_STATISTICS

 PURPOSE:

	This procedure generates image statistics for the level 0.5 processing.

 CATEGORY:

	LASCO REDUCTION

 CALLING SEQUENCE:

	REDUCE_STATISTICS, Img, Hdr

 INPUTS:

	Img:	The 2D image to compute statistics on.

	Hdr:	A FITS header

 OUTPUTS:

	Hdr:	The FITS header will have additional keywords added.

 PROCEDURE:
	Generates the following statistical quantities:
	   minimum value not equal to 0 
	   maximum value not equal to saturated (16383)
	   number of zero pixels
	   percentage of saturated pixels
	   percentile values for 1%, 10%, 25%, 75%, 90%, 95%, 98% 99%
	   mean of image
	   standard deviation of image


 MODIFICATION HISTORY:
 	Written by:	RA Howard, NRL, 20 Mar 1996
	Version 2  RAH, 19 Apr 1996   Made low a long word
	V3  RAH, 18 Jul 1997   Added check for data type for maximum

       @(#)reduce_statistics.pro	1.4 07/23/97 LASCO IDL LIBRARY


[3]

[List of Routines] (See ./reduce/reduce_statistics2.pro)

 NAME:

	REDUCE_STATISTICS2

 PURPOSE:

	This procedure generates image statistics for the level 1 processing.

 CATEGORY:

	LASCO REDUCTION, modified

 CALLING SEQUENCE:

	REDUCE_STATISTICS2, Img, Hdr

 INPUTS:

	Img:	The 2D image to compute statistics on.

	Hdr:	A FITS header

 KEYWORDS:

	SATMAX	set equal to value to be considered saturated (upper cutoff)
	SATMIN	sat equal to value to be considered minimum cutoff

 OUTPUTS:

	Hdr:	The FITS header will have additional keywords added.

 PROCEDURE:
	Generates the following statistical quantities:
	   minimum value not equal to 0 
	   maximum value not equal to saturated (input value or max of image)
	   number of zero pixels
	   percentage of saturated pixels
	   percentile values for 1%, 10%, 25%, 75%, 90%, 95%, 98% 99%
	   mean of image
	   standard deviation of image


 MODIFICATION HISTORY:
 	Written by:	NB Rich, NRL -- Copied from REDUCE_STATISTICS.PRO by RA Howard
	NBR, 1 Sep 1998	 Make generic, change name, add sat input 
	NBR, 19 Jan 2001 - Change value of DATASAT keyword in output
	NBR, 29 Aug 2002 - Add SATMAX keyword in input and change handling of this value; 
			add SATMIN; add NDATASAT, DSATMIN, NDSATMIN in output
	NBR, 11 Mar 2003 - Do percentiles before truncation if SATMAX set

       03/14/03 @(#)reduce_statistics2.pro	1.3 LASCO IDL LIBRARY


[4]

[List of Routines] (See ./reduce/std_int_scale.pro)

 NAME:

	STD_INT_SCALE

 PURPOSE:

	Scale the intensities of the input image into DN/sec, accounting for
	the bias in case of summing.

 CATEGORY:

	LASCO REDUCTION

 CALLING SEQUENCE:

	Result = STD_INT_SCALE(Img,Hdr)

 INPUTS:

	Img = Input Image array.
	Hdr = FITS header

 KEYWORDS:
	None

 OUTPUTS:
	The function returns a floating point image.

 PROCEDURE:
	The input header is examined to extract the on-chip and off-chip
	summing parameters, and the exposure time.  The appropriate bias
	value is subtracted off the image and then the resultant is 
	divided by the exposure time.

 MODIFICATION HISTORY:
	Written, RA Howard, NRL, 22 October 1996

       @(#)std_int_scale.pro	1.1 10/22/96     LASCO IDL LIBRARY


This page was created by IDL lasco_mk_html_help.pro on Wed Aug 17 12:22:40 2005.