Extended IDL Help

This page was created by the IDL library routine mk_html_help. For more information on this routine, refer to the IDL Online Help Navigator or type:

     ? mk_html_help

at the IDL command line prompt.

Last modified: Wed Mar 31 06:41:54 1999.


List of Routines


Routine Descriptions

AAAREADME

[Next Routine] [List of Routines]
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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/cme/AAAREADME.pro)


ABBRV_FILPOL

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/util/abbrv_filpol.pro)


ADD_LASCO_LOGO

[Previous Routine] [Next Routine] [List of Routines]
 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

 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

	@(#)add_lasco_logo.pro	1.2 03/03/98 LASCO IDL LIBRARY

(See /net/cronus/opt/local/idl_nrl_lib/lasco/util/add_lasco_logo.pro)


AIR2VAC

[Previous Routine] [Next Routine] [List of Routines]
 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.

(See /net/cronus/opt/local/idl_nrl_lib/lasco/convert/w_air2vac.pro)


ALIGN1.PRO

[Previous Routine] [Next Routine] [List of Routines]
 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           

(See /net/cronus/opt/local/idl_nrl_lib/lasco/las-c2/align1.pro)


ALIGN1[1]

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/las-c2/align1.pro)


ALIGN1[2]

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/las-c2/align1.pro)


ALIGN1[2]

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/las-c2/align1.pro)


ALIGN1[3]

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/las-c2/align1.pro)


ALL_NONOP_TEMPS

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/packets/all_nonop_temps.pro)


AWIN

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/util/awin.pro)


BK

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/data_anal/bk.pro)


BROWSE_DISP

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/util/browse_disp.pro)


BSV2ARCSEC

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/packets/bsv2arcsec.pro)


BUILD_FRAOE

[Previous Routine] [Next Routine] [List of Routines]
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           

(See /net/cronus/opt/local/idl_nrl_lib/lasco/las-c2/align1.pro)


BUILD_LASCO_HELP

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/util/build_lasco_help.pro)


C2_CALFACTOR

[Previous Routine] [Next Routine] [List of Routines]
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

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

 SCCS variables for IDL use
 
 %W% %H% :LASCO IDL LIBRARY


(See /net/cronus/opt/local/idl_nrl_lib/lasco/reduce/c2_calfactor.pro)


C2_CALIBRATE

[Previous Routine] [Next Routine] [List of Routines]
 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.

 COMMON BLOCKS:
	C2_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
	NRL_LIB/lasco/data/calib directory.  To obtain the calibration
	factors, it calls the C2_CALFACTOR procedure.

 MODIFICATION HISTORY:
 	Written by:	RA Howard, 6/12/98, copy from c3_calibrate.pro
       Updated :
       10 Feb 99 - brought in changes from c3_calibrate.pro DW

 SCCS variables for IDL use
 
 @(#)c2_calibrate.pro	1.2 02/11/99 :LASCO IDL LIBRARY

      

(See /net/cronus/opt/local/idl_nrl_lib/lasco/reduce/c2_calibrate.pro)


C2_DISTORTION

[Previous Routine] [Next Routine] [List of Routines]
 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.

(See /net/cronus/opt/local/idl_nrl_lib/lasco/data_anal/c2_distortion.pro)


C2_VIG1

[Previous Routine] [Next Routine] [List of Routines]
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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/polariz/c2_vig1.pro)


C2_WARP

[Previous Routine] [Next Routine] [List of Routines]
 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

 KNOWN BUGS:

 1. Subfield images are not handled correctly - dw

 @(#)c2_warp.pro	1.3 12/10/98 - NRL IDL LIBRARY

(See /net/cronus/opt/local/idl_nrl_lib/lasco/data_anal/c2_warp.pro)


C3_CALFACTOR

[Previous Routine] [Next Routine] [List of Routines]
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

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

 SCCS variables for IDL use
 
 @(#)c3_calfactor.pro	1.6 12/03/98 :LASCO IDL LIBRARY


(See /net/cronus/opt/local/idl_nrl_lib/lasco/reduce/c3_calfactor.pro)


C3_CALIBRATE

[Previous Routine] [Next Routine] [List of Routines]
 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.

 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
	NRL_LIB/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)

 Variables for SCCS

 %W% %H% :LASCO IDL LIBRARY

      

(See /net/cronus/opt/local/idl_nrl_lib/lasco/reduce/c3_calibrate.pro)


C3_CME

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	C3_CME

 PURPOSE:
	This function calibrates 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, 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/cme/c3_cme.pro)


C3_CME_FRONT

[Previous Routine] [Next Routine] [List of Routines]
 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 ('320004.fts','320005.fts',save='mass.lst')

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

	@(#)c3_cme_front.pro	1.1 05/23/98 LASCO IDL LIBRARY

(See /net/cronus/opt/local/idl_nrl_lib/lasco/cme/c3_cme_front.pro)


C3_DISTORTION

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/data_anal/c3_distortion.pro)


C3_MASSIMG

[Previous Routine] [Next Routine] [List of Routines]
 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

	%W% %H% LASCO IDL LIBRARY

(See /net/cronus/opt/local/idl_nrl_lib/lasco/cme/c3_massimg.pro)


CALC_CME_MASS

[Previous Routine] [Next Routine] [List of Routines]
 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

 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


 @(#)calc_cme_mass.pro	1.6 12/03/98 :NRL Solar Physics

(See /net/cronus/opt/local/idl_nrl_lib/lasco/cme/calc_cme_mass.pro)


CALC_DARK_BIAS

[Previous Routine] [Next Routine] [List of Routines]
 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

	%W% %H% LASCO IDL LIBRARY

(See /net/cronus/opt/local/idl_nrl_lib/lasco/reduce/calc_dark_bias.pro)


CALIB5[10]

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/las-c2/calib5.pro)


CALIB5[11]

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/las-c2/calib5.pro)


CALIB5[12]

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/las-c2/calib5.pro)


CALIB5[13]

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/las-c2/calib5.pro)


CALIB5[14]

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/las-c2/calib5.pro)


CALIB5[15]

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/las-c2/calib5.pro)


CALIB5[16]

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/las-c2/calib5.pro)


CALIB5[17]

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/las-c2/calib5.pro)


CALIB5[18]

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/las-c2/calib5.pro)


CALIB5[19]

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/las-c2/calib5.pro)


CALIB5[1]

[Previous Routine] [Next Routine] [List of Routines]
   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.

(See /net/cronus/opt/local/idl_nrl_lib/lasco/las-c2/calib5.pro)


CALIB5[20]

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/las-c2/calib5.pro)


CALIB5[21]

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/las-c2/calib5.pro)


CALIB5[22]

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/las-c2/calib5.pro)


CALIB5[23]

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/las-c2/calib5.pro)


CALIB5[24]

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/las-c2/calib5.pro)


CALIB5[25]

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/las-c2/calib5.pro)


CALIB5[26]

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/las-c2/calib5.pro)


CALIB5[27]

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/las-c2/calib5.pro)


CALIB5[28]

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/las-c2/calib5.pro)


CALIB5[29]

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/las-c2/calib5.pro)


CALIB5[2]

[Previous Routine] [Next Routine] [List of Routines]
 NAME: DATE_NUM_TEXT.PRO
 PURPOSE: Gives a set of date strings, ex: 12, 09, 1994 (for the 12 Sep 1994)
 A.LL. 

(See /net/cronus/opt/local/idl_nrl_lib/lasco/las-c2/calib5.pro)


CALIB5[2]

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/las-c2/calib5.pro)


CALIB5[30]

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/las-c2/calib5.pro)


CALIB5[31]

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/las-c2/calib5.pro)


CALIB5[32]

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/las-c2/calib5.pro)


CALIB5[33]

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/las-c2/calib5.pro)


CALIB5[34]

[Previous Routine] [Next Routine] [List of Routines]
 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 

(See /net/cronus/opt/local/idl_nrl_lib/lasco/las-c2/calib5.pro)


CALIB5[35]

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/las-c2/calib5.pro)


CALIB5[36]

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/las-c2/calib5.pro)


CALIB5[37]

[Previous Routine] [Next Routine] [List of Routines]
 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
 

(See /net/cronus/opt/local/idl_nrl_lib/lasco/las-c2/calib5.pro)


CALIB5[38]

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/las-c2/calib5.pro)


CALIB5[3]

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/las-c2/calib5.pro)


CALIB5[4]

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/las-c2/calib5.pro)


CALIB5[5]

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/las-c2/calib5.pro)


CALIB5[6]

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/las-c2/calib5.pro)


CALIB5[7]

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/las-c2/calib5.pro)


CALIB5[8]

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/las-c2/calib5.pro)


CALIB5[9]

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/las-c2/calib5.pro)


CARRDATE[1]

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/synoptic/carrdate.pro)


CARRDATE[2]

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/synoptic/carrdate2.pro)


CARRLONG

[Previous Routine] [Next Routine] [List of Routines]
 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 the date of East Limb passage

	WL:	Set this keyword to obtain the date of West Limb passage

	CMP:	Set this keyword to obtain the date of central meridian passage
		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

	@(#)carrlong.pro	1.2 10/17/96 LASCO IDL LIBRARY

(See /net/cronus/opt/local/idl_nrl_lib/lasco/synoptic/carrlong.pro)


CAT_PHASER

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/util/cat_phaser.pro)


CC0

[Previous Routine] [Next Routine] [List of Routines]
 CC0 - cross correlation at zero offset of 2 images.

(See /net/cronus/opt/local/idl_nrl_lib/lasco/exposure/cc0.pro)


CDF_CAT_FILE

[Previous Routine] [Next Routine] [List of Routines]
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.

(See /net/cronus/opt/local/idl_nrl_lib/lasco/astrometry/ephemeris/cdf_cat_file.pro)


CDS2JD

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/util/cds2jd.pro)


CHANDLE

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/chandle.pro)


CHECK_EXP_FACTOR_DUPS

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/expfac/check_exp_factor_dups.pro)


CHECK_FILENAME

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/las-c2/calib5.pro)


CHECK_IMGDIR

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/las-c2/calib5.pro)


CHECK_MONEXP_DUPS

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/expfac/check_monexp_dups.pro)


CHECK_OBESUMERROR

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/reduce/check_obesumerror.pro)


CHECK_PRO_NAMES

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/util/check_pro_names.pro)


CHK_H4S

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/chk_h4s.pro)


CME_MASSIMG2TOTAL

[Previous Routine] [Next Routine] [List of Routines]
 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

	%W% %H% LASCO IDL LIBRARY

(See /net/cronus/opt/local/idl_nrl_lib/lasco/cme/cme_massimg2total.pro)


CNVRT2REF

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/convert/cnvrt2ref.pro)


CNVRT_ABC[1]

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/packets/cnvrt_ab.pro)


CNVRT_ABC[2]

[Previous Routine] [Next Routine] [List of Routines]
 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_abc.pro	1.1 01/27/98 LASCO IDL LIBRARY

(See /net/cronus/opt/local/idl_nrl_lib/lasco/packets/cnvrt_abc.pro)


CNVRT_CMD_CODE

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/packets/cnvrt_cmd_code.pro)


CNVRT_CMD_DEST

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/packets/cnvrt_cmd_dest.pro)


CNVRT_CMD_ERR

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/packets/cnvrt_cmd_err.pro)


CNVRT_CURRENT

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/packets/cnvrt_current.pro)


CNVRT_FILTER

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/convert/cnvrt_filter.pro)


CNVRT_IP

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/convert/cnvrt_ip.pro)


CNVRT_LP

[Previous Routine] [Next Routine] [List of Routines]
 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


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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/convert/cnvrt_lp.pro)


CNVRT_POLAR

[Previous Routine] [Next Routine] [List of Routines]
 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


(See /net/cronus/opt/local/idl_nrl_lib/lasco/convert/cnvrt_polar.pro)


CNVRT_PORT

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/convert/cnvrt_port.pro)


CNVRT_RO_COORDS

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/convert/cnvrt_ro_coords.pro)


CNVRT_TEMPS

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/packets/cnvrt_temps.pro)


COCO_J2000

[Previous Routine] [Next Routine] [List of Routines]
 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.

(See /net/cronus/opt/local/idl_nrl_lib/lasco/astrometry/ephemeris/coco_j2000.pro)


COMBINE_IMG

[Previous Routine] [Next Routine] [List of Routines]
 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.
               WRUNMOVIE is then called for animation.

 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 image.
               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
		PROCESS:  Use MK_IMG to get images

 Category    : Image Processing/Display.

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

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

 Modified    : .
 Version     :

 @(#)combine_img.pro	1.2 01/12/99 :NRL Solar Physics

(See /net/cronus/opt/local/idl_nrl_lib/lasco/inout/combine_img.pro)


COMBINE_MVI

[Previous Routine] [Next Routine] [List of Routines]
 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.

 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.
 Version     :

 @(#)combine_mvi.pro	1.2 09/12/97 :NRL Solar Physics

(See /net/cronus/opt/local/idl_nrl_lib/lasco/movie/combine_mvi.pro)


COMB_FULL_EQ

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/synoptic/comb_full_eq.pro)


COMPUTE_MONEXP_FACTORS

[Previous Routine] [Next Routine] [List of Routines]
 
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/expfac/compute_monexp_factors.pro)


COMPUTE_MONEXP_POLY

[Previous Routine] [Next Routine] [List of Routines]

 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

	@(#)compute_monexp_poly.pro	1.7 02/26/98 LASCO IDL LIBRARY

(See /net/cronus/opt/local/idl_nrl_lib/lasco/expfac/compute_monexp_poly.pro)


COMPUTE_MONEXP_RATIO

[Previous Routine] [Next Routine] [List of Routines]

 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


(See /net/cronus/opt/local/idl_nrl_lib/lasco/expfac/compute_monexp_ratio.pro)


COMPUTE_STD_VALS

[Previous Routine] [Next Routine] [List of Routines]
 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

 

(See /net/cronus/opt/local/idl_nrl_lib/lasco/expfac/compute_std_vals.pro)


COSMICS

[Previous Routine] [Next Routine] [List of Routines]
 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:

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/cosmics.pro)


CROSSCORR

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/las-c2/crosscorr.pro)


CROSSCORRBIS

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/las-c2/crosscorrbis.pro)


CR_REM_ARRAY

[Previous Routine] [Next Routine] [List of Routines]
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	:

(See /net/cronus/opt/local/idl_nrl_lib/lasco/data_anal/cr_rem_array.pro)


CR_REM_FILE

[Previous Routine] [Next Routine] [List of Routines]
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	:

(See /net/cronus/opt/local/idl_nrl_lib/lasco/data_anal/cr_rem_file.pro)


CUT_IMG

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/cut_img.pro)


CUT_MAX

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/cut_max.pro)


CW_BSELECTOR

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	CW_BSELECTOR

 PURPOSE:
	CW_BSELECTOR is a compound widget that appears as a pull-down
	menu whose label shows the widget's current value. When the button
	is pressed, the menu appears and the newly selected value becomes
	the new title of the pull-down menu.

 CATEGORY:
	Compound widgets.

 CALLING SEQUENCE:
		widget = CW_BSELECTOR(Parent, Names)

	To get or set the value of a CW_BSELECTOR, use the GET_VALUE and
	SET_VALUE keywords to WIDGET_CONTROL. The value of a CW_BSELECTOR
	is the index of the selected item.

 INPUTS:
       Parent:		The ID of the parent widget.
	Names:		A string array, containing one string per button,
			giving the name of each button.

 KEYWORD PARAMETERS:
	EVENT_FUNCT:	The name of an optional user-supplied event function 
			for buttons. This function is called with the return
			value structure whenever a button is pressed, and 
			follows the conventions for user-written event
			functions.
	FONT:		The name of the font to be used for the button
			titles. If this keyword is not specified, the default
			font is used.
	FRAME:		Specifies the width of the frame to be drawn around
			the base.
	IDS:		A named variable into which the button IDs will be
			stored, as a longword vector.
	LABEL_LEFT:	Creates a text label to the left of the buttons.
	LABEL_TOP:	Creates a text label above the buttons.
	MAP:		If set, the base will be mapped when the widget
			is realized (the default).
	RETURN_ID:	If set, the VALUE field of returned events will be
			the widget ID of the button.
	RETURN_INDEX:	If set, the VALUE field of returned events will be
			the zero-based index of the button within the base.
			THIS IS THE DEFAULT.
	RETURN_NAME:	If set, the VALUE field of returned events will be
			the name of the button within the base.
	RETURN_UVALUE:	An array of user values to be associated with
			each button. Selecting the button sets the uvalue
			of the CW_BSELECTOR to the button's uvalue and
			returns the uvalue in the value field of the event
			structure.  If this keyword isn't specified, the
			CW_BSELECTOR's uvalue remains unchanged.
	SET_VALUE:	The initial value of the buttons. This keyword is 
			set to the index of the Names array element desired.
			So if it is desired that the initial value be the 
			second element of the Names array, SET_VALUE would
			be set equal to 1. This is equivalent to the later 
			statement:

			WIDGET_CONTROL, widget, set_value=value

	UVALUE:		The user value to be associated with the widget.
	XOFFSET:	The X offset of the widget relative to its parent.
	YOFFSET:	The Y offset of the widget relative to its parent.

 OUTPUTS:
       The ID of the created widget is returned.

 SIDE EFFECTS:
	This widget generates event structures with the following definition:

		event = { ID:0L, TOP:0L, HANDLER:0L, INDEX:0, VALUE:0 }

	The INDEX field is the index (0 based) of the menu choice. VALUE is
	either the INDEX, ID, NAME, or BUTTON_UVALUE of the button,
	depending on how the widget was created.

 RESTRICTIONS:
	Only buttons with textual names are handled by this widget.
	Bitmaps are not understood.

 MODIFICATION HISTORY:
	1 April 1993, DMS,  Adapted from CW_BGROUP.
	22 Dec. 1993, KDB,  Corrected documentation for keyword SET_VALUE.
	11 Aug. 1994, Scott Paswaters (NRL)
          1) Added MENU=2 to differentiate a pd menu from a button under Motif.
          2) Modified the CW_BSELECTOR_SETV procedure to allow changing the labels
             of the buttons.  Example if you had a pd menu with two buttons 'b1' & 'b2':
               WIDGET_CONTROL, cw_bselector_base, SET_VALUE=['b3','b4']	;** change labels
               WIDGET_CONTROL, cw_bselector_base, SET_VALUE=0			;** to select 'b3'

(See /net/cronus/opt/local/idl_nrl_lib/lasco/util/cw_bselector2.pro)


CW_ZOOM1 (MODIFIED VERSION OF CW_ZOOM).

[Previous Routine] [Next Routine] [List of Routines]
 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.

(See /net/cronus/opt/local/idl_nrl_lib/lasco/cme/cw_zoom1.pro)


DAILY_MOVIE

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/movie/daily_movie.pro)


DATA_TYPE

[Previous Routine] [Next Routine] [List of Routines]
 NAME:  
	DATA_TYPE

 PURPOSE:
	To determine the data type of a variable

 CATEGORY:
	PICO

 CALLING SEQUENCE:
	result=DATA_TYPE(var)

 INPUTS:
	var:    any variable

 OPTIONAL INPUTS:
	None

 KEYWORD PARAMETERS:
	None

 OUTPUTS:
	result: The data type (integer from 1...7 
               as diefined by the SIZE function)

 OPTIONAL OUTPUTS:
	None

 EXAMPLE:
	PRINT,DATA_TYPE(1)
       will return 2 (integer data type)
	
 COMMON BLOCKS:
	None

 SIDE EFFECTS:
	Unknown

 RESTRICTIONS:
	None

 PROCEDURE:
	Straightforward using the SIZE function

 MODIFICATION HISTORY:
	V1.0 Alexander Epple, MPAe Lindau, 25-APR-1996

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/data_type.pro)


DATE_CAL

[Previous Routine] [Next Routine] [List of Routines]
 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.

(See /net/cronus/opt/local/idl_nrl_lib/lasco/las-c2/calib5.pro)


DB_INSERT

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/database/db_insert.pro)


DCURSOR.PRO

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/las-c2/dcursor.pro)


DDISTIM2ECS

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/reduce/ddistim2ecs.pro)


DECODE_SC_DACS

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/reduce/decode_sc_dacs.pro)


DEF2C_FILL

[Previous Routine] [Next Routine] [List of Routines]
 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     : 

(See /net/cronus/opt/local/idl_nrl_lib/lasco/database/def2c_fill.pro)


DEF2C_FORMAT

[Previous Routine] [Next Routine] [List of Routines]
 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     : 

(See /net/cronus/opt/local/idl_nrl_lib/lasco/database/def2c_format.pro)


DEF2C_INSERT

[Previous Routine] [Next Routine] [List of Routines]
 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     : 

(See /net/cronus/opt/local/idl_nrl_lib/lasco/database/def2c_insert.pro)


DEF2STRUCT

[Previous Routine] [Next Routine] [List of Routines]
 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     : 

(See /net/cronus/opt/local/idl_nrl_lib/lasco/database/def2struct.pro)


DEF_LASCO_HDR

[Previous Routine] [Next Routine] [List of Routines]
 NAME:				DEF_LASCO_HDR
 PURPOSE:			Define a Header Structure for a LEB Science Image
 CATEGORY:			CCD
 CALLING SEQUENCE:		hdr=DEF_LASCO_HDR()
 INPUTS:			None
 OPTIONAL INPUT PARAMETERS:	None
 KEYWORD PARAMETERS:		None
 OUTPUTS:			a structure array containing an initialized header
 OPTIONAL OUTPUT PARAMETERS:
 COMMON BLOCKS:		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:
 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

 @(#)def_lasco_hdr.pro	1.1 05/14/97 :NRL Solar Physics

(See /net/cronus/opt/local/idl_nrl_lib/lasco/inout/def_lasco_hdr.pro)


DELETE_EXPFAC

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/expfac/delete_expfac.pro)


DIFBKGND

[Previous Routine] [Next Routine] [List of Routines]
 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

       @(#)difbkgnd.pro	1.5 03/03/98     LASCO IDL LIBRARY

(See /net/cronus/opt/local/idl_nrl_lib/lasco/synoptic/difbkgnd.pro)


DIFF2TIME

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/reduce/diff2time.pro)


DISTORTION_COEFFS

[Previous Routine] [Next Routine] [List of Routines]
 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

 

(See /net/cronus/opt/local/idl_nrl_lib/lasco/convert/distortion_coeffs.pro)


DMEMORY

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/dmemory.pro)


DMOVIE[1]

[Previous Routine] [Next Routine] [List of Routines]
 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


	%W% %H% LASCO IDL LIBRARY

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/c1_iod.pro)


DMOVIE[2]

[Previous Routine] [Next Routine] [List of Routines]
 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


	%W% %H% LASCO IDL LIBRARY

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/dmovie.pro)


DO_POLARIZ

[Previous Routine] [Next Routine] [List of Routines]
 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)
 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

	@(#)do_polariz.pro	1.4 03/22/99 LASCO IDL LIBRARY

(See /net/cronus/opt/local/idl_nrl_lib/lasco/polariz/do_polariz.pro)


DRAWCIRCLE

[Previous Routine] [Next Routine] [List of Routines]
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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/las-c2/drawcircle.pro)


DTSELECT

[Previous Routine] [Next Routine] [List of Routines]
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.

(See /net/cronus/opt/local/idl_nrl_lib/lasco/astrometry/ephemeris/dtselect.pro)


DYNIMG

[Previous Routine] [Next Routine] [List of Routines]

	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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/dynimg.pro)


EDITFRAME

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/movie/editframe.pro)


EIT_TIME_CORRECTION

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/data_anal/eit_time_correction.pro)


ELTHEORY

[Previous Routine] [Next Routine] [List of Routines]
 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

 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.
	

 MODIFICATION HISTORY:
	Created IDL version 16 May 1996, RA Howard, NRL
	RAH 11/25/98	Added common block for VDH coefficients

	@(#)eltheory.pro	1.3 11/28/98 LASCO IDL LIBRARY

(See /net/cronus/opt/local/idl_nrl_lib/lasco/data_anal/eltheory.pro)


EMIEIT

[Previous Routine] [Next Routine] [List of Routines]

	@(#)emieit.pro	1.1 09/22/96 LASCO IDL LIBRARY

(See /net/cronus/opt/local/idl_nrl_lib/lasco/packets/emieit.pro)


EMILOOK

[Previous Routine] [Next Routine] [List of Routines]

	@(#)emilook.pro	1.1 09/22/96 LASCO IDL LIBRARY

(See /net/cronus/opt/local/idl_nrl_lib/lasco/packets/emilook.pro)


EMIVIEW

[Previous Routine] [Next Routine] [List of Routines]

	@(#)emiview.pro	1.1 09/22/96 LASCO IDL LIBRARY

(See /net/cronus/opt/local/idl_nrl_lib/lasco/packets/emiview.pro)


EPHEMERIS[1]

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/ephemeris.pro)


EPHEMERIS[2]

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/ephemerix.pro)


EXP_CORR

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/expfac/exp_corr.pro)


EXP_FIT

[Previous Routine] [Next Routine] [List of Routines]

	@(#)exp_fit.pro	1.1 09/22/96 LASCO IDL LIBRARY

(See /net/cronus/opt/local/idl_nrl_lib/lasco/packets/exp_fit.pro)


EXP_FIT_PROG

[Previous Routine] [Next Routine] [List of Routines]

	@(#)exp_fit_prog.pro	1.1 09/22/96 LASCO IDL LIBRARY

(See /net/cronus/opt/local/idl_nrl_lib/lasco/packets/exp_fit_prog.pro)


EXSUNC

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/exsunc.pro)


FILTGAUSS

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/las-c2/filtgauss.pro)


FIND_CHORD_CTR

[Previous Routine] [Next Routine] [List of Routines]
 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)

 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:
	None

 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 

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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/data_anal/find_chord_ctr.pro)


FIND_CLOSEST

[Previous Routine] [Next Routine] [List of Routines]
 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 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.

 MODIFICATION HISTORY:
 	Written by:	Scott Passwaters, NRL, Feb, 1997
	24 Sep 1998, N Rich	changed /LESS keyword to include equal-to

	@(#)find_closest.pro	1.2 07/18/97 LASCO IDL LIBRARY

(See /net/cronus/opt/local/idl_nrl_lib/lasco/util/find_closest.pro)


FIND_CLOSEST_ARR

[Previous Routine] [Next Routine] [List of Routines]
 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, 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 arr that is less than num
		Otherwise the subscript of the point closest to num is
		returned.  Notice that the value of arr might be greater than 
		num.

 RESTRICTIONS:
	The input arrays should be in ascending order.

 MODIFICATION HISTORY:
 	Written by:	Scott Paswaters, NRL, Dec, 1997

       @(#)find_closest_arr.pro    1.0 12/17/97 LASCO IDL LIBRARY

(See /net/cronus/opt/local/idl_nrl_lib/lasco/util/find_closest_arr.pro)


FIND_MODE

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/exposure/find_mode.pro)


FITSHDR2STRUCT

[Previous Routine] [Next Routine] [List of Routines]
 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  

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/fitshdr2struct.pro)


FITS_HDR_LIST

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/inout/fits_hdr_list.pro)


FIX2IMGS

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/data_anal/fix2imgs.pro)


FIXWRAP

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/util/fixwrap.pro)


FIX_CONTRO

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/data_anal/fix_contro.pro)


FIX_DUP_PCKT

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/packets/fix_dup_pckt.pro)


FIX_HT_SCALE

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/convert/fix_ht_scale.pro)


FIX_OBESUMERROR

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/reduce/fix_obesumerror.pro)


FIX_TIME_JUMP

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	FIX_TIME_JUMP

 PURPOSE:
	This procedure reads a file from CDROM and puts the packets in
	order of the packets

 CATEGORY:
	LASCO PACKETS

 CALLING SEQUENCE:
	FIX_TIME_JUMPS,fname

 INPUTS:
	Fname:	Specifies the telemetry filename to read in.  If no
		argument is present then all files are read in.

 OUTPUTS:
       Outname:  Returns the temporary output file name

 SIDE EFFECTS:
	A temporary file, fname, is generated in /net/corona/cplex2/tmp

 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

	@(#)fix_time_jumps.pro	1.4 03/28/97 LASCO IDL LIBRARY

(See /net/cronus/opt/local/idl_nrl_lib/lasco/reduce/fix_time_jumps.pro)


FPARMODIFY

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/fparmodify.pro)


FPC1_3IMG

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/data_anal/fpc1_3img.pro)


FPC1_WCW

[Previous Routine] [Next Routine] [List of Routines]
 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.

(See /net/cronus/opt/local/idl_nrl_lib/lasco/data_anal/fpc1_wcw.pro)


FPC1_WWC

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/data_anal/fpc1_wwc.pro)


FP_IWCW

[Previous Routine] [Next Routine] [List of Routines]
 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 

(See /net/cronus/opt/local/idl_nrl_lib/lasco/data_anal/fpc1_iwcw.pro)


FRACTILE

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/exposure/fractile.pro)


GAMMASCAL[1]

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/gammasca.pro)


GAMMASCAL[2]

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/gammascal.pro)


GAUSSFIT

[Previous Routine] [Next Routine] [List of Routines]
 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.

(See /net/cronus/opt/local/idl_nrl_lib/lasco/exposure/las_fit_gauss.pro)


GCURSOR

[Previous Routine] [Next Routine] [List of Routines]
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.

(See /net/cronus/opt/local/idl_nrl_lib/lasco/las-c2/gcursor.pro)


GENERIC_MOVIE

[Previous Routine] [Next Routine] [List of Routines]
 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

 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.

 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

 Version     : 

 SCCS variables for IDL use
 
 @(#)generic_movie.pro	1.5 01/21/99 :NRL Solar Physics

(See /net/cronus/opt/local/idl_nrl_lib/lasco/movie/generic_movie.pro)


GETBKGIMG

[Previous Routine] [Next Routine] [List of Routines]
 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.

 Calls       : 

 Common      : None.
               
 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

 Version     : Version 0.1, December 5, 1994

(See /net/cronus/opt/local/idl_nrl_lib/lasco/data_anal/getbkgimg.pro)


GETCPUTIME

[Previous Routine] [Next Routine] [List of Routines]
     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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/packets/getcputime.pro)


GETENV_SLASH

[Previous Routine] [Next Routine] [List of Routines]
 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

       @(#)getenv_slash.pro	1.2 10/24/96 LASCO IDL LIBRARY

(See /net/cronus/opt/local/idl_nrl_lib/lasco/reduce/getenv_slash.pro)


GETFPHKN

[Previous Routine] [Next Routine] [List of Routines]
     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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/packets/getfphkn.pro)


GETHKHR

[Previous Routine] [Next Routine] [List of Routines]
     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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/packets/gethkhr.pro)


GETHKN

[Previous Routine] [Next Routine] [List of Routines]

     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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/packets/gethkn.pro)


GETLOBT

[Previous Routine] [Next Routine] [List of Routines]

  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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/packets/getlobt.pro)


GETTOK

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/las-c2/calib5.pro)


GET_ATT_FITS

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/astrometry/ephemeris/get_att_fits.pro)


GET_BAD_CMDS

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/packets/get_bad_cmds.pro)


GET_CAL_DARK

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/reduce/get_cal_dark.pro)


GET_CAL_PHOTOM

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/reduce/get_cal_photom.pro)


GET_CAL_STRAY

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/reduce/get_cal_stray.pro)


GET_CAL_STRUCT

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/reduce/get_cal_struct.pro)


GET_CAL_VIGNET

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/reduce/get_cal_vignet.pro)


GET_CMDS

[Previous Routine] [Next Routine] [List of Routines]
	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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/packets/get_cmds.pro)


GET_CME_SUMMARY

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/cme/get_cme_summary.pro)


GET_DATA

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/get_data.pro)


GET_DB_STRUCT

[Previous Routine] [Next Routine] [List of Routines]
 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     : 

(See /net/cronus/opt/local/idl_nrl_lib/lasco/database/get_db_struct.pro)


GET_EXP_FACTOR

[Previous Routine] [Next Routine] [List of Routines]
 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:
	Hdr:	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.

 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

 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)
		
 @(#)get_exp_factor.pro	1.6 09/22/98 :LASCO IDL LIBRARY

(See /net/cronus/opt/local/idl_nrl_lib/lasco/expfac/get_exp_factor.pro)


GET_IMG_CENTER

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/data_anal/get_img_center.pro)


GET_LIST

[Previous Routine] [Next Routine] [List of Routines]
 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


	%W% %H% LASCO IDL LIBRARY

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/get_list.pro)


GET_MONEXP_DATA

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/expfac/get_monexp_data.pro)


GET_NEW_FILE_NUMBER

[Previous Routine] [Next Routine] [List of Routines]
 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

       @(#)get_new_file_number.pro	1.2 03/23/97 LASCO IDL LIBRARY

(See /net/cronus/opt/local/idl_nrl_lib/lasco/reduce/get_new_file_number.pro)


GET_ORBIT_CDF

[Previous Routine] [Next Routine] [List of Routines]
 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


	@(#)get_orbit_cdf.pro	1.2 08/26/98 LASCO IDL LIBRARY

(See /net/cronus/opt/local/idl_nrl_lib/lasco/astrometry/ephemeris/get_orbit_cdf.pro)


GET_ORBIT_CDF2

[Previous Routine] [Next Routine] [List of Routines]
 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.


		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).

(See /net/cronus/opt/local/idl_nrl_lib/lasco/astrometry/ephemeris/get_orbit_cdf2.pro)


GET_ORBIT_FITS

[Previous Routine] [Next Routine] [List of Routines]
 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).

 Contact     :	WTHOMPSON

(See /net/cronus/opt/local/idl_nrl_lib/lasco/astrometry/ephemeris/get_orbit_fits.pro)


GET_PACKET_FNAMES

[Previous Routine] [Next Routine] [List of Routines]
 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


(See /net/cronus/opt/local/idl_nrl_lib/lasco/packets/get_packet_fnames.pro)


GET_ROLL_OR_XY

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
       GET_ROLL_OR_XY

 PURPOSE:
       This function returns the roll angle  of solar north in radians or
       the sun center position (stars, median, or avg) as a 2 element array 
       {sun_center,xcen:xcen,ycen:ycen} (pixels).

 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: Return the running median roll angle or sun center.
                   Result = GET_ROLL_OR_XY (Hdr, 'ROLL', /MEDIAN)
                   Result = GET_ROLL_OR_XY (Hdr, 'CENTER', /MEDIAN)
       STAR:   Return the roll angle or sun center computed from the stars.
                   Result = GET_ROLL_OR_XY (Hdr, 'ROLL', /STAR)
                   Result = GET_ROLL_OR_XY (Hdr, 'CENTER', /STAR)
       AVG:    Return the median average roll angle or sun center from an 
               average file (used as default if MEDIAN or STAR keyword is 
               set but daily time files do not contain the needed information
               for the image).
                   Result = GET_ROLL_OR_XY (Hdr, 'ROLL', /AVG)
                   Result = GET_ROLL_OR_XY (Hdr, 'CENTER', /AVG)
       SILENT: Stop printing of warning and informational messages

 OPTIONAL IO:
       source: On output, returns one of the following sources used to 
               get the sun center or roll angle: STAR, AVG, MEDIAN, ATDEF.


 PROCEDURE:
	Determines the solar north roll angle or the sun center from the 
	1. Daily time files (if STAR or MEDIAN keyword is set) as defined in 
          the c?_rollxy_yymmdd.dat format files.
         OR
       2. Average files (if no keyword or AVG keyword is set) as defined in
          the c?_avg_rollxy_yyyymmdd[_yyyymmdd].dat format files.
	3. SO_AT_DEF*.FITS files in $ANCIL_DATA/attitude/definitive

 MODIFICATION HISTORY:
       Written by:     98/10/06  Ed Esfandiari 
                       98/10/27  Ed Esfandiari - added AVG keyword. 
                       98/12/11  Ed Esfandiari - now it returns the source
                                                 used (src: AVG,MEDIAN,STAR,
                                                 NONE) as an optional parameter.

                       99/01/12 D. Wang - Added SILENT keyword
			99/03/25 N. Rich - Use AT_DEF files for roll if AVG file not found

 @(#)get_roll_or_xy.pro	1.10 01/13/99 : NRL LASCO IDL Library

(See /net/cronus/opt/local/idl_nrl_lib/lasco/data_anal/get_roll_or_xy.pro)


GET_SEC_PIXEL

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	GET_SEC_PIXEL

 PURPOSE:
	This function returns 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

	@(#)get_sec_pixel.pro	1.4 12/18/98 LASCO IDL LIBRARY

(See /net/cronus/opt/local/idl_nrl_lib/lasco/data_anal/get_sec_pixel.pro)


GET_SOLAR_RADIUS

[Previous Routine] [Next Routine] [List of Routines]
 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

 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

	@(#)get_solar_radius.pro	1.8 12/18/98 LASCO IDL LIBRARY

(See /net/cronus/opt/local/idl_nrl_lib/lasco/data_anal/get_solar_radius.pro)


GET_SOLAR_ROLL

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/data_anal/get_solar_roll.pro)


GET_SUN_CENTER[1]

[Previous Routine] [Next Routine] [List of Routines]
 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.

 @(#)get_sun_center.pro	1.19 12/18/98 :LASCO IDL LIBRARY


(See /net/cronus/opt/local/idl_nrl_lib/lasco/data_anal/get_sun_center.pro)


GET_SUN_CENTER[2]

[Previous Routine] [Next Routine] [List of Routines]
 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

	%W% %H% LASCO IDL LIBRARY

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/getsuncen.pro)


GET_SUN_CENTER[2]

[Previous Routine] [Next Routine] [List of Routines]
 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

	%W% %H% LASCO IDL LIBRARY

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/get_sun_cen.pro)


GET_TCE_COMM_ERRS

[Previous Routine] [Next Routine] [List of Routines]
	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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/packets/get_tce_comm_errs.pro)


GET_TEL_CONFIG

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/reduce/get_tel_config.pro)


GET_TM_IMG

[Previous Routine] [Next Routine] [List of Routines]

	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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/packets/get_tm_img.pro)


GET_TM_MONITOR

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/packets/get_tm_monitor.pro)


GHANDLE

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/ghandle.pro)


GIF2JPG24

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	GIF2JPG24

 PURPOSE:
	Change GIF format to 24 bit color JPEG

 CATEGORY:
	Image Processing

 CALLING SEQUENCE:

	GIF2JPG24, Gif_image,R,G,B,Jsize_x,Jsize_y,Jpg_image

 
 INPUTS:
        Gif_image 
        R           red color table
        G           green color table
        B           blue color table
        Jsize_x     desired horz size of jpg
        Jsize_y     desired vert size of jpg

 OPTIONAL INPUTS:
	
 KEYWORD PARAMETERS:

 OUTPUTS:
        Jpg_image   byte array (jsize_x,jsize_y,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,1024,1024,Jpg_image

 MODIFICATION HISTORY:
 	Written by:	Dennis Wang, 18 Mar 1999

	@(#)gif2jpg24.pro	1.1 03/19/99 LASCO IDL LIBRARY

(See /net/cronus/opt/local/idl_nrl_lib/lasco/movie/gif2jpg24.pro)


GIFDIR2JPG24

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/movie/gifdir2jpg24.pro)


H4S

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/h4s.pro)


HEADFITS

[Previous Routine] [Next Routine] [List of Routines]
 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     :

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/headfits.pro)


HEADFITSL

[Previous Routine] [Next Routine] [List of Routines]
 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     :

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/headfitsl.pro)


HIST_XY

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/hist_xy.pro)


HT_HEADER

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/movie/ht_header.pro)


IMAGE_PLOT

[Previous Routine] [Next Routine] [List of Routines]
Name:
       IMAGE_PLOT

Purpose:
    generates standard plots for image analysis

Usage:
       IMAGE_PLOT,A,Hdr

Inputs:
       A   = image
       Hdr = FITS header

(See /net/cronus/opt/local/idl_nrl_lib/lasco/data_anal/image_plot.pro)


IMCALC

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/imcalc.pro)


IMG2DNPERSEC

[Previous Routine] [Next Routine] [List of Routines]
 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 and then it and the offset bias
	are applied to the image as:
		output = (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

 MODIFICATION HISTORY:
	Written, RA Howard, NRL, 25 November 1997
	Modified:
		20 Feb 98	RAH	Added exposure factor correction

       @(#)img2dnpersec.pro	1.2 02/15/98     LASCO IDL LIBRARY

(See /net/cronus/opt/local/idl_nrl_lib/lasco/util/img2dnpersec.pro)


IMG_ADD

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/data_anal/img_add.pro)


IMG_COMP_DIST

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/data_anal/img_comp_dist.pro)


IMG_COMP_INT

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/data_anal/img_comp_int.pro)


IMG_SUM_2X2

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/data_anal/img_sum_2x2.pro)


IMG_WT_SUM

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/data_anal/img_wt_sum.pro)


INIT_DB_STRUCT

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/database/init_db_struct.pro)


INSTF

[Previous Routine] [Next Routine] [List of Routines]
 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 

(See /net/cronus/opt/local/idl_nrl_lib/lasco/data_anal/fpc1_insf.pro)


KDATE

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/util/kdate.pro)


KDAY

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/util/kday.pro)


LASCO_FITSHDR2STRUCT

[Previous Routine] [Next Routine] [List of Routines]
 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

 Version     : Version 0.1, Feb. 12, 1996


 @(#)lasco_fitshdr2struct.pro	1.8 11/28/98 :LASCO IDL LIBRARY

(See /net/cronus/opt/local/idl_nrl_lib/lasco/inout/lasco_fitshdr2struct.pro)


LASCO_IMAGE

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/inout/lasco_image.pro)


LASCO_READFITS

[Previous Routine] [Next Routine] [List of Routines]
 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

	@(#)lasco_readfits.pro	1.5 11/28/98 LASCO IDL LIBRARY

(See /net/cronus/opt/local/idl_nrl_lib/lasco/inout/lasco_readfits.pro)


LASER8EW

[Previous Routine] [Next Routine] [List of Routines]
 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.

(See /net/cronus/opt/local/idl_nrl_lib/lasco/synoptic/laser8ew.pro)


LASER8ONE

[Previous Routine] [Next Routine] [List of Routines]
 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.

(See /net/cronus/opt/local/idl_nrl_lib/lasco/synoptic/laser8one.pro)


LASER8[1]

[Previous Routine] [Next Routine] [List of Routines]
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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/util/laser8.pro)


LASER8[2]

[Previous Routine] [Next Routine] [List of Routines]
 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.

(See /net/cronus/opt/local/idl_nrl_lib/lasco/util/laser8.pro)


LAS_AUTO_EXP

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/exposure/las_auto_exp.pro)


LAS_EXP_NORM

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/exposure/las_exp_norm.pro)


LAYOUT

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/layout.pro)


LD_INST_DEF

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/ld_inst_def.pro)


LEG_DISP

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/util/leg_disp.pro)


LOAD_MESSAGE

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/load_message.pro)


LOBT2TAI

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/packets/lobt2tai.pro)


LUX_DIFF

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/las-c2/lux_diff.pro)


LZ_DISK_INIT

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/inout/lz_disk_init.pro)


LZ_GETLASCODIR

[Previous Routine] [Next Routine] [List of Routines]
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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/inout/lz_getlascodir.pro)


LZ_START_DATE

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/inout/lz_start_date.pro)


M1ANGLE

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/util/m1angle.pro)


M1COEFF

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/util/m1coeff.pro)


M1DACS

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/util/m1dacs.pro)


M1DYNIMG

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/util/m1dynimg.pro)


M1REVERSE

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/util/m1reverse.pro)


M1TEES

[Previous Routine] [Next Routine] [List of Routines]
   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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/util/m1tees.pro)


M1WOBBLE

[Previous Routine] [Next Routine] [List of Routines]
   computes the m1 wobble parameters, A, B, C, D

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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/util/m1wobble.pro)


MAKE_ALL_DAYS

[Previous Routine] [Next Routine] [List of Routines]
 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.

 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_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

	@(#)make_all_days.pro	1.2 07/23/97 LASCO IDL LIBRARY

(See /net/cronus/opt/local/idl_nrl_lib/lasco/synoptic/make_all_days.pro)


MAKE_ALL_MONEXP

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/synoptic/make_all_monexp.pro)


MAKE_ALL_MONTHS

[Previous Routine] [Next Routine] [List of Routines]
 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:
	This function generates images in $MONTHLY_IMAGES of the monthly
	monthly for the specfied telescope, and for each 7th day in between 
	the starting and ending dates.

 KEYWORDS:
	ALL_YEARS: Use daily images from multiple years.
	FILT_POLR: String representing filter/polarizer combination; if not
		   set, defaults to 'clcl' for C3 and 'orcl' for C2
	DAYS_BETWN: Number of days between monthly mins; default is 7
	DAYS_COMPT: Number of days used to compute the min; default is 28

 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_MONTHLY_MIN is called for each day.  The starting date
	is always the wednesday of the month, which is the modified julian day 
	number evenly divided by 7.

 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

	@(#)make_all_months.pro	1.2 02/11/99 LASCO IDL LIBRARY

(See /net/cronus/opt/local/idl_nrl_lib/lasco/synoptic/make_all_months.pro)


MAKE_BROWSE

[Previous Routine] [Next Routine] [List of Routines]
 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

       @(#)make_browse.pro	1.7 03/26/97 LASCO IDL LIBRARY

(See /net/cronus/opt/local/idl_nrl_lib/lasco/reduce/make_browse.pro)


MAKE_DAILY_IMAGE

[Previous Routine] [Next Routine] [List of Routines]
 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

	@(#)make_daily_image.pro	1.3 02/26/99 LASCO IDL LIBRARY

(See /net/cronus/opt/local/idl_nrl_lib/lasco/synoptic/make_daily_image.pro)


MAKE_FITS_HDR

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/reduce/make_fits_hdr.pro)


MAKE_MPEG

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/make_mpeg.pro)


MAKE_VHS_GIF

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/movie/make_vhs_gif.pro)


MASKE

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/maske.pro)


MASK_OUT

[Previous Routine] [Next Routine] [List of Routines]
 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.

(See /net/cronus/opt/local/idl_nrl_lib/lasco/exposure/mask_out.pro)


MIN_NZ

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/exposure/min_nz.pro)


MISS_BLOCKS

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/reduce/miss_blocks.pro)


MISS_PCKTS

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	MISS_PCKTS

 PURPOSE:
	This procedure generates a file containing a list of missing
	science telemetry packets on the Level-0 CDROM or 
	/net/corona/cplex2/tmp.

 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.
	
 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

	@(#)miss_pckts.pro	1.14 01/07/98 LASCO IDL LIBRARY

(See /net/cronus/opt/local/idl_nrl_lib/lasco/packets/miss_pckts.pro)


MKDI_C1

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/mkdi_c1.pro)


MKMOVIE

[Previous Routine] [Next Routine] [List of Routines]
 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.
               
 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)

		/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 overall yearly model
					     USE_MODEL=2 for closest monthly model
					     USE_MODEL=3 for closest average (any_year) monthly 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 29 Mar 99 - Add CREM keyword

 Version     : 

 SCCS variables for IDL use
 
 @(#)mkmovie.pro	1.12 02/11/99 :NRL Solar Physics

(See /net/cronus/opt/local/idl_nrl_lib/lasco/movie/mkmovie.pro)


MKMOVIEM

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/movie/mkmoviem.pro)


MKMOVIEWLC

[Previous Routine] [Next Routine] [List of Routines]
 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

 Version     : 

 @(#)mkmoviewlc.pro	1.7 06/09/98 :LASCO IDL LIBRARY

(See /net/cronus/opt/local/idl_nrl_lib/lasco/movie/mkmoviewlc.pro)


MKQUERY

[Previous Routine] [Next Routine] [List of Routines]
 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

	%W% %H% LASCO IDL LIBRARY

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/mkquery.pro)


MK_ALL_MIN

[Previous Routine] [Next Routine] [List of Routines]
 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.3 01/30/97 LASCO IDL LIBRARY

(See /net/cronus/opt/local/idl_nrl_lib/lasco/synoptic/mk_all_min.pro)


MK_DAILY_C1_MED

[Previous Routine] [Next Routine] [List of Routines]
 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.

 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.

	@(#)mk_daily_c1_med.pro	1.1 07/16/97 LASCO IDL LIBRARY

(See /net/cronus/opt/local/idl_nrl_lib/lasco/synoptic/mk_daily_c1_med.pro)


MK_DAILY_MED

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	MK_DAILY_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_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

 OUTPUTS:
	None.

 SIDE EFFECTS:
	Writes a fits file to $MONTHLY_IMAGES.

 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_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)


	@(#)mk_daily_med.pro	1.8 02/11/99 LASCO IDL LIBRARY

(See /net/cronus/opt/local/idl_nrl_lib/lasco/synoptic/mk_daily_med.pro)


MK_HTML_HELP

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/util/lasco_mk_html_help.pro)


MK_IMAGE

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/mk_image.pro)


MK_IMG

[Previous Routine] [Next Routine] [List of Routines]
 Project     : SOHO - LASCO/EIT
                   
 Name        : MK_IMG
               
 Purpose     : Process FITS files for display.
               
 Explanation : This procedure  reads an image and 
		normalizes to the exposure time.
		(Not implemented: The on_off_diff keyword results in a movie
               where each on line image is displayed with a nearby offband image
               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, /DIFF)

      Example: If you want to display BYTARR images 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 image array.
               
 Keywords    : The following keywords apply to all telescopes (C1,C2,C3,EIT)

		/DISTORT   : Apply distortion correction for C2 or C3
		/NO_BYTSCL : Do not apply bytescaling
		/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 image.  The 
			     model is subtracted.
		/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 any-year monthly model
					     USE_MODEL=2 for closest monthly model

             : The following keywords apply only to EIT

               /DEGRID	    : applies the degridding algorithm

 Calls       : 

 Side effects: 
               
 Category    : Image Display.
               
 See Also    : 
               
               
 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 17 Dec 98 - Change to MK_IMG

 Version     : 

 SCCS variables for IDL use
 
 @(#)mk_img.pro	1.00 12/17/98 :NRL Solar Physics

(See /net/cronus/opt/local/idl_nrl_lib/lasco/inout/mk_img.pro)


MK_LIST

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/exposure/mk_list.pro)


MK_MINIM

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/exposure/mk_minim.pro)


MK_MLO_STRUCT

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/inout/mk_mlo_struct.pro)


MK_STDIM

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/exposure/mk_stdim.pro)


MK_STDIM_HDR

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/exposure/mk_stdim_hdr.pro)


MK_STDIM_LIST

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/exposure/mk_stdim_list.pro)


MLO_FITSHDR2STRUCT

[Previous Routine] [Next Routine] [List of Routines]
 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.4 12/18/98 :LASCO IDL LIBRARY


(See /net/cronus/opt/local/idl_nrl_lib/lasco/inout/mlo_fitshdr2struct.pro)


MLO_MASSIMG

[Previous Routine] [Next Routine] [List of Routines]
 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:
	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 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',save='mass.lst')

 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/cme/mlo_massimg.pro)


MONITOR_EXP

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/expfac/monitor_exp.pro)


MONITOR_EXP_IMG

[Previous Routine] [Next Routine] [List of Routines]
 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:
	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 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

 @(#)monitor_exp_img.pro	1.1 10/08/97 :NRL Solar Physics

(See /net/cronus/opt/local/idl_nrl_lib/lasco/expfac/monitor_exp_img.pro)


MOTOR_DECODE

[Previous Routine] [Next Routine] [List of Routines]
 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

tel=tel
f keyword_set(door)    then motor=0
f keyword_set(filter)  then motor=1
f keyword_set(polar)   then motor=2
f keyword_set(sector)  then motor=2
f keyword_set(shutter) then motor=3
f keyword_set(focus)   then motor=4
f Keyword_set(iocsx)   then motor=5

 MODIFICATION HISTORY:
 	Written by:	S.E. Paswaters, NRL, 1995

	@(#)motor_decode.pro	1.1 09/22/96 LASCO IDL LIBRARY

(See /net/cronus/opt/local/idl_nrl_lib/lasco/packets/motor_decode.pro)


MOVE_REDUCE_LOG

[Previous Routine] [Next Routine] [List of Routines]
 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

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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/reduce/move_reduce_log.pro)


MPEG_WID

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/mpeg_wid.pro)


MVI2DATA_CUBE

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/movie/mvi2data_cube.pro)


MVI2FRAMES

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/movie/mvi2frames.pro)


MVIPLAY[1]

[Previous Routine] [Next Routine] [List of Routines]
 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. 

 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.
               
 Version     : 2.0

 See Also    : MKMOVIE.PRO
	@(#)mviplay.pro	1.1 10/12/96 LASCO IDL LIBRARY

(See /net/cronus/opt/local/idl_nrl_lib/lasco/movie/mviplay.pro)


MVIPLAY[2]

[Previous Routine] [Next Routine] [List of Routines]
 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.

(See /net/cronus/opt/local/idl_nrl_lib/lasco/movie/mviplay.pro)


NE_FROM_PB

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/data_anal/ne_from_pb.pro)


NORM_WARN

[Previous Routine] [Next Routine] [List of Routines]
 NORM_WARN
	Confirm the QUIT operation.

 Usage:
	iquit=norm_warn()

 Arguments and keywords: none:

 History:
	original: 19/1/95; SJT

(See /net/cronus/opt/local/idl_nrl_lib/lasco/exposure/norm_warn.pro)


OCCLTR_CNTR

[Previous Routine] [Next Routine] [List of Routines]
 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.

	@(#)occltr_cntr.pro	1.3 12/04/96 LASCO IDL LIBRARY

(See /net/cronus/opt/local/idl_nrl_lib/lasco/data_anal/occltr_cntr.pro)


OD_BRIGHT

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/exposure/od_bright.pro)


OFFSET_BIAS

[Previous Routine] [Next Routine] [List of Routines]
 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
       @(#)offset_bias.pro	1.13 12/18/98 LASCO IDL LIBRARY

(See /net/cronus/opt/local/idl_nrl_lib/lasco/convert/offset_bias.pro)


OLD_OFFSET_BIAS

[Previous Routine] [Next Routine] [List of Routines]
 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

       %W% %H% LASCO IDL LIBRARY

(See /net/cronus/opt/local/idl_nrl_lib/lasco/convert/old_offset_bias.pro)


ONE2TWO

[Previous Routine] [Next Routine] [List of Routines]
 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.

(See /net/cronus/opt/local/idl_nrl_lib/lasco/util/one2two.pro)


ORBIT_FILE_TYPE

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/data_anal/orbit_file_type.pro)


PATTERN1[1]

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/las-c2/pattern1.pro)


PATTERN1[2]

[Previous Routine] [Next Routine] [List of Routines]
ro pattern2,difres1,difres2,difres_out
;; by M.B   :LAS 21/01/94  magnify the pattern (shunt aleatory peaks) & give
;;                         the signal/noise ratio

(See /net/cronus/opt/local/idl_nrl_lib/lasco/las-c2/pattern1.pro)


PATTERN1[2]

[Previous Routine] [Next Routine] [List of Routines]
ro pattern1,ima1,ima2,ima3,ima4,difres
;; by M.B :LAS  21/01/94  extract & display the pattern of ccd

(See /net/cronus/opt/local/idl_nrl_lib/lasco/las-c2/pattern1.pro)


PCURSOR.PRO

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/las-c2/simcircle.pro)


PHOTOCAL

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/reduce/photocal.pro)


PICKFILES

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/pickfiles.pro)


PICKFILES2

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/inout/pickfiles2.pro)


PLOT_EXP_FACTOR

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/expfac/plot_exp_factor.pro)


PLOT_HKLZ

[Previous Routine] [Next Routine] [List of Routines]
 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.

 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/packets/plot_hklz.pro)


PLOT_HK_TIME

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/packets/plot_hk_time.pro)


PLOT_HT

[Previous Routine] [Next Routine] [List of Routines]
 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

	@(#)plot_ht.pro	1.6 09/12/97 LASCO IDL LIBRARY

(See /net/cronus/opt/local/idl_nrl_lib/lasco/movie/plot_ht.pro)


PLOT_LASCO_SPECTRA

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/data_anal/plot_lasco_spectra.pro)


PLOT_MONEXP_STD

[Previous Routine] [Next Routine] [List of Routines]

 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/expfac/plot_monexp_std.pro)


PLOT_OBE_TIME

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/packets/plot_obe_time.pro)


PLOT_SUBHTR

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/packets/plot_subhtr.pro)


PLOT_TIME_DIFFS

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/packets/plot_time_diffs.pro)


PLOT_XY

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/plot_xy.pro)


POINTING3

[Previous Routine] [Next Routine] [List of Routines]
 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.

(See /net/cronus/opt/local/idl_nrl_lib/lasco/astrometry/ephemeris/pointing3.pro)


POINT_FILTER

[Previous Routine] [Next Routine] [List of Routines]
 
 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.

(See /net/cronus/opt/local/idl_nrl_lib/lasco/data_anal/point_filter.pro)


POLARIZ_CALC

[Previous Routine] [Next Routine] [List of Routines]
 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,fixc3zero

 
	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
       fixc3zero : flag for synthetic C3 +0 polarizer,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	

	@(#)polariz_calc.pro	1.6 03/26/99 LASCO IDL LIBRARY

(See /net/cronus/opt/local/idl_nrl_lib/lasco/polariz/polariz_calc.pro)


POLARIZ_DISPLAY

[Previous Routine] [Next Routine] [List of Routines]
 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

	@(#)polariz_display.pro	1.11 03/26/99 NRL LASCO IDL LIBRARY

(See /net/cronus/opt/local/idl_nrl_lib/lasco/polariz/polariz_display.pro)


POLM1M2[1]

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/las-c2/polm1m2.pro)


POLM1M2[2]

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/las-c2/polm1m2.pro)


POLY_DIFFIM

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/exposure/poly_diffim.pro)


POPUP_HELP[1]

[Previous Routine] [Next Routine] [List of Routines]

 file POPUP_HELP.PRO - Creates a widget that displays a pop up message,
                      modifed from DMZ's acknowledge.pro -- LYW

(See /net/cronus/opt/local/idl_nrl_lib/lasco/data_anal/popup_help.pro)


POPUP_HELP[2]

[Previous Routine] [Next Routine] [List of Routines]
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

 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.

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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/data_anal/popup_help.pro)


POPUP_HELP[2]

[Previous Routine] [Next Routine] [List of Routines]
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

 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
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(See /net/cronus/opt/local/idl_nrl_lib/lasco/data_anal/popup_help.pro)


PROFILE

[Previous Routine] [Next Routine] [List of Routines]
 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.

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/profile1.pro)


PROFILES

[Previous Routine] [Next Routine] [List of Routines]
 Project     :

 Name        :	PROFILES

 Purpose    :	Interactively draw row or column profiles of an image in a : 
separate window.
	A new window is created and the mouse location in the original
	window is used to plot profiles in the new window.  Pressing the
	left mouse button toggles between row and column profiles.
	The right mouse button exits.

 Category    : Image analysis.

 Explanation :

 Syntax      :	PROFILES, Img [, SX = sx, SY = sy]

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

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

	Run the PROFILES routine by entering:

		PROFILES, A

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

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

 Outputs     : No explicit outputs

 OPT. OUTPUTS:

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

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

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

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

 Common      : None.

 Restrictions: None

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

 History     : Nov 1988,DMS.

 Contact     :

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/profiles.pro)


PS_SETUP

[Previous Routine] [Next Routine] [List of Routines]
 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
 
	@(#)ps_setup.pro	1.9 10/27/98 LASCO IDL LIBRARY

(See /net/cronus/opt/local/idl_nrl_lib/lasco/util/ps_setup.pro)


QL_GETLASCODIR

[Previous Routine] [Next Routine] [List of Routines]
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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/inout/ql_getlascodir.pro)


QUICK_LOOK

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/data_anal/quick_look.pro)


RD_ASC

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/rd_asc.pro)


RD_CATALOG

[Previous Routine] [Next Routine] [List of Routines]
 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.

(See /net/cronus/opt/local/idl_nrl_lib/lasco/astrometry/ephemeris/rd_catalog.pro)


READALLHK

[Previous Routine] [Next Routine] [List of Routines]
 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.

 @(#)readallhk.pro	1.4 10/02/98 :LASCO IDL LIBRARY


(See /net/cronus/opt/local/idl_nrl_lib/lasco/packets/readallhk.pro)


READALLSV1

[Previous Routine] [Next Routine] [List of Routines]
 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 09/24/98 :LASCO IDL LIBRARY

(See /net/cronus/opt/local/idl_nrl_lib/lasco/packets/readallsv1.pro)


READALLSV2

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/packets/readallsv2.pro)


READALLSV4

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/packets/readallsv4.pro)


READFITS

[Previous Routine] [Next Routine] [List of Routines]
 Project     :

 Name        : READFITS
	
 Purpose     : Read a FITS file into IDL data and header variables.

 Category    :
 
 Explanation :

 Syntax      : Result = READFITS( 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 = READFITS( 'TEST.FITS', h, /NOSCALE)

	If the file contain a FITS extension, it could be read with

		IDL> tab = READFITS( 'TEST.FITS', htab, /EXTEN )

	To read only rows 100-149 of the FITS extension,

		IDL> tab = READFITS( '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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/readfits.pro)


READFITSL

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/readfitsl.pro)


READ_CARR_LONG

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/synoptic/read_carr_long.pro)


READ_EXP_FACTOR

[Previous Routine] [Next Routine] [List of Routines]
 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:
	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

 @(#)read_exp_factor.pro	1.9 02/22/98 :LASCO IDL LIBRARY

	

(See /net/cronus/opt/local/idl_nrl_lib/lasco/expfac/read_exp_factor.pro)


READ_HT

[Previous Routine] [Next Routine] [List of Routines]
 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

 @(#)read_ht.pro	1.7 03/03/98 :LASCO IDL LIBRARY


(See /net/cronus/opt/local/idl_nrl_lib/lasco/movie/read_ht.pro)


READ_IMG

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/read_img.pro)


READ_IP_DAT

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/convert/read_ip_dat.pro)


READ_LASCO_SPECTRA

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/inout/read_lasco_spectra.pro)


READ_LIMB_DARK

[Previous Routine] [Next Routine] [List of Routines]
 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


(See /net/cronus/opt/local/idl_nrl_lib/lasco/inout/read_limb_dark.pro)


READ_MONEXP_DATA

[Previous Routine] [Next Routine] [List of Routines]
 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.8 12/18/98 LASCO IDL LIBRARY

(See /net/cronus/opt/local/idl_nrl_lib/lasco/expfac/read_monexp_data.pro)


READ_OCC_DAT

[Previous Routine] [Next Routine] [List of Routines]
 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

 @(#)read_occ_dat.pro	1.7 11/27/98 :NRL Solar Physics


(See /net/cronus/opt/local/idl_nrl_lib/lasco/convert/read_occ_dat.pro)


READ_PACKET_FNAMES

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/packets/read_packet_fnames.pro)


READ_TM_PACKET

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/packets/read_tm_packet.pro)


RECONVERT[1]

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/gammasca.pro)


RECONVERT[2]

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/reconvert.pro)


REDUCE_DAILY

[Previous Routine] [Next Routine] [List of Routines]
 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.

 PROCEDURE:
	This procedure calls the routines to do the following tasks:

		make the daily MVI file
		check the monexp file for duplicates
		generate the daily median image

	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

	%W% %H% LASCO IDL LIBRARY

(See /net/cronus/opt/local/idl_nrl_lib/lasco/reduce/reduce_daily.pro)


REDUCE_IMAGE

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/reduce/reduce_image.pro)


REDUCE_IMG_HDR

[Previous Routine] [Next Routine] [List of Routines]
 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:
	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
           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.


 SCCS variables for IDL use
 
 @(#)reduce_img_hdr.pro	1.10 12/02/97 :LASCO IDL LIBRARY


(See /net/cronus/opt/local/idl_nrl_lib/lasco/reduce/reduce_img_hdr.pro)


REDUCE_IMG_HDR2

[Previous Routine] [Next Routine] [List of Routines]
 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

       %W% %H% LASCO IDL LIBRARY

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/reduce_img_hdr2.pro)


REDUCE_LEVEL_05

[Previous Routine] [Next Routine] [List of Routines]
 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:
		None
	
 KEYWORD PARAMETERS:
		None

 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
                                     

 SCCS variables for IDL use
 
 @(#)reduce_level_05.pro	1.16 10/22/98 :NRL Solar Physics


(See /net/cronus/opt/local/idl_nrl_lib/lasco/reduce/reduce_level_05.pro)


REDUCE_LEVEL_1

[Previous Routine] [Next Routine] [List of Routines]
 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 tested for level 0.5 BACKLOG  
                         processing initiated by REDUCE_L1_BAKLOG (which
                         calls the REDUCE_LEVEL_1). To call this routine
                         directly from REDUCE_LEVEL_05 (REDUCE_IMAGE),
                         it must be tested to make sure all input, enviroment
                         variables, and common blocks are valid and apply.

 CATEGORY:
		LASCO REDUCTION

 CALLING SEQUENCE:
		REDUCE_LEVEL_1, Fits_name

 INPUTS:
		Fits_name = Name of FITS file to process

 OPTIONAL INPUTS:
		None
	
 KEYWORD PARAMETERS:
		None

 OUTPUTS:
		None

 OPTIONAL OUTPUTS:
		None

 COMMON BLOCKS:
		DBMS

 PROCEDURE:

   level 1 consists of calibrating for 
           dark
           flat field
           stray light 
           distortion  (yes)
           vignetting  (yes)
           photometric
   removal of geometric distortion and point spread function correction
   may be added at a later time

   Polarization correction is Level 2

 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

      @(#)reduce_level_1.pro	1.7 06/03/98 LASCO IDL LIBRARY

(See /net/cronus/opt/local/idl_nrl_lib/lasco/reduce/reduce_level_1.pro)


REDUCE_MAIN

[Previous Routine] [Next Routine] [List of Routines]
 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

 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


 @(#)reduce_main.pro	1.22 01/04/99 :LASCO IDL LIBRARY


(See /net/cronus/opt/local/idl_nrl_lib/lasco/reduce/reduce_main.pro)


REDUCE_RECTIFY

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/reduce/reduce_rectify.pro)


REDUCE_RECTIFY_P1P2

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/reduce/reduce_rectify_p1p2.pro)


REDUCE_REFCOORD

[Previous Routine] [Next Routine] [List of Routines]
 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

	@(#)reduce_refcoord.pro	1.3 05/14/97 LASCO IDL LIBRARY

(See /net/cronus/opt/local/idl_nrl_lib/lasco/reduce/reduce_refcoord.pro)


REDUCE_TRANSFER

[Previous Routine] [Next Routine] [List of Routines]
 NAME:				REDUCE_TRANSFER

 PURPOSE:			Peform the transfer of an image file
				created by DDIS into $LEB_IMG to the 
				approprite subdirectory under $IMAGES

 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:
       $IMAGES/misc/leb/mem/YYMMDD if memory dump
       $IMAGES/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


       @(#)reduce_transfer.pro	1.7 12/24/97 LASCO IDL LIBRARY

(See /net/cronus/opt/local/idl_nrl_lib/lasco/reduce/reduce_transfer.pro)


REFORMAT

[Previous Routine] [Next Routine] [List of Routines]
 reformat.pro
 Run the reformatting code in the EOF
 
 SCCS variables for IDL use
 
 @(#)reformat.pro	1.1 05/14/97 :NRL Solar Physics

(See /net/cronus/opt/local/idl_nrl_lib/lasco/reduce/reformat.pro)


REFORMAT_DATE

[Previous Routine] [Next Routine] [List of Routines]

 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/database/reformat_date.pro)


REPLACIMA.PRO

[Previous Routine] [Next Routine] [List of Routines]
 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           

(See /net/cronus/opt/local/idl_nrl_lib/lasco/las-c2/align1.pro)


RESCALE

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/rescale.pro)


RINTER

[Previous Routine] [Next Routine] [List of Routines]

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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/las-c2/crosscorr.pro)


ROI_SECTOR

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/cme/roi_sector.pro)


RTMOVIE

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/movie/rtmovie.pro)


RTMVI

[Previous Routine] [Next Routine] [List of Routines]
 Project     : SOHO - LASCO/EIT
                   
 Name        : RTMVI
               
 Purpose     : Write GIF images as they are received in real time.
               
 Use         : IDL> RTMVI

 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
               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


 @(#)rtmvi.pro	1.9 03/23/99 :LASCO IDL LIBRARY

(See /net/cronus/opt/local/idl_nrl_lib/lasco/movie/rtmvi.pro)


RTMVIPLAY

[Previous Routine] [Next Routine] [List of Routines]
 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)
               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.

 See Also    : MKMOVIE.PRO
       @(#)rtmviplay.pro       1.1 10/12/96 LASCO IDL LIBRARY

(See /net/cronus/opt/local/idl_nrl_lib/lasco/movie/rtmviplay.pro)


SC

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/gammasca.pro)


SCALE_ROTATE

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/data_anal/scale_rotate.pro)


SCAN4LIMB

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/scan4limb.pro)


SCAN_PROFILE

[Previous Routine] [Next Routine] [List of Routines]
 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


(See /net/cronus/opt/local/idl_nrl_lib/lasco/data_anal/scan_profile.pro)


SELECTD

[Previous Routine] [Next Routine] [List of Routines]
 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()

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/selectd.pro)


SETUP

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/setup.pro)


SETUP_ASTROM

[Previous Routine] [Next Routine] [List of Routines]
 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.

(See /net/cronus/opt/local/idl_nrl_lib/lasco/astrometry/ephemeris/setup_astrom.pro)


SHANDLE

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/shandle.pro)


SHARPEN

[Previous Routine] [Next Routine] [List of Routines]
 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

 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

	%W% %H% LASCO IDL LIBRARY

(See /net/cronus/opt/local/idl_nrl_lib/lasco/util/sharpen.pro)


SIGMA_MASK

[Previous Routine] [Next Routine] [List of Routines]
 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.

(See /net/cronus/opt/local/idl_nrl_lib/lasco/exposure/sigma_mask.pro)


SIMCIRCLE

[Previous Routine] [Next Routine] [List of Routines]
unction round1,var
 ;; by JP.L & M.B at LAS : 02/11/94
 ;;Arrondit la variable a la valeur la plus proche

(See /net/cronus/opt/local/idl_nrl_lib/lasco/las-c2/simcircle.pro)


SOHOEPHEM

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	sohoephem
 PURPOSE:
	Compute solar/planetary ephemerides.
 CATEGORY:

 CALLING SEQUENCE:
 	sohoephem,tjd,iorig,slong,slat,orient,nrot,trot,dsol,plong,
 	plat,xphase,fillum,dpla
 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).

 KNOWN BUGS: Not handling planet positions correctly yet.

(See /net/cronus/opt/local/idl_nrl_lib/lasco/astrometry/ephemeris/sohoephem.pro)


SOHOEPHEM2

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	sohoephem2
 PURPOSE:
	Compute solar/planetary ephemerides.
 CATEGORY:

 CALLING SEQUENCE:
 	sohoephem,tjd,iorig,slong,slat,orient,nrot,trot,dsol,plong,
 	plat,xphase,fillum,dpla
 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 (SPP).

(See /net/cronus/opt/local/idl_nrl_lib/lasco/astrometry/ephemeris/sohoephem2.pro)


SOHOEPHEM3

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	sohoephem3
 PURPOSE:
	Compute solar/planetary ephemerides.
 CATEGORY:

 CALLING SEQUENCE:
 	sohoephem,tjd,iorig,slong,slat,orient,nrot,trot,dsol,plong,
 	plat,xphase,fillum,dpla
 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. (SPP).
	Adapted 14 March 1997 to use FITS or CDF files (including all
 		mods to CDF file structure). (SPP).

(See /net/cronus/opt/local/idl_nrl_lib/lasco/astrometry/ephemeris/sohoephem3.pro)


SOLAR_NORTH_UP

[Previous Routine] [Next Routine] [List of Routines]
 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

 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

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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/reduce/solar_north_up.pro)


SPLIT_QKL

[Previous Routine] [Next Routine] [List of Routines]
 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.
                                     

 SCCS variables for IDL use
 
 @(#)split_qkl.pro	1.6 11/30/98 :NRL Solar Physics


(See /net/cronus/opt/local/idl_nrl_lib/lasco/reduce/split_qkl.pro)


SPM_FCOR

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/data_anal/spm_fcor.pro)


SPM_KCOR

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/data_anal/spm_kcor.pro)


SPM_NE

[Previous Routine] [Next Routine] [List of Routines]
 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

 @(#)spm_ne.pro	1.1 12/30/97 :LASCO IDL LIBRARY

(See /net/cronus/opt/local/idl_nrl_lib/lasco/data_anal/spm_ne.pro)


SPM_PB

[Previous Routine] [Next Routine] [List of Routines]
 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

 @(#)spm_pb.pro	1.1 12/30/97 :LASCO IDL LIBRARY

(See /net/cronus/opt/local/idl_nrl_lib/lasco/data_anal/spm_pb.pro)


STARFIELD

[Previous Routine] [Next Routine] [List of Routines]
 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 CDF files,
	2-April-96 (SPP).

(See /net/cronus/opt/local/idl_nrl_lib/lasco/astrometry/ephemeris/starfield.pro)


STARFIELD2

[Previous Routine] [Next Routine] [List of Routines]
 PROJECT:
	SOHO - LASCO
 NAME:
	STARFIELD2

 PURPOSE:
       Widget interface to display stars and planets in field of view
       of any of the three LASCO coronagraphs.

 CATEGORY:
	Widgets.

 CALLING SEQUENCE:
	Starfield2

 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 FITS files,
	4-June-96 (SPP).

(See /net/cronus/opt/local/idl_nrl_lib/lasco/astrometry/ephemeris/starfield2.pro)


STARFIELD3

[Previous Routine] [Next Routine] [List of Routines]
 PROJECT:
	SOHO - LASCO
 NAME:
	STARFIELD3

 PURPOSE:
       Widget interface to display stars and planets in field of view
       of any of the three LASCO coronagraphs.

 CATEGORY:
	Widgets.

 CALLING SEQUENCE:
	Starfield3

 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 CDF files,
	2-April-96 (SPP).
	Adapted to use new version of CDF orbit files, 
	7-August-1996 (SPP).

(See /net/cronus/opt/local/idl_nrl_lib/lasco/astrometry/ephemeris/starfield3.pro)


STARFIELD4

[Previous Routine] [Next Routine] [List of Routines]
 PROJECT:
	SOHO - LASCO
 NAME:
	STARFIELD4

 PURPOSE:
       Widget interface to display stars and planets in field of view
       of any of the three LASCO coronagraphs.

 CATEGORY:
	Widgets.

 CALLING SEQUENCE:
	Starfield4

 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).

(See /net/cronus/opt/local/idl_nrl_lib/lasco/astrometry/ephemeris/starfield4.pro)


STAT_CURSOR.PRO

[Previous Routine] [Next Routine] [List of Routines]
 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           

(See /net/cronus/opt/local/idl_nrl_lib/lasco/las-c2/align1.pro)


STDIMGPLOT

[Previous Routine] [Next Routine] [List of Routines]
Name:
       STDIMGPLOT

Purpose:
    generates standard plots for image analysis

Usage:
       STDIMGPLOT,A,Hdr

Inputs:
       A   = image
       Hdr = FITS header

 SCCS variables for IDL use
 
 @(#)stdimgplot.pro	1.1 05/14/97 :NRL Solar Physics

(See /net/cronus/opt/local/idl_nrl_lib/lasco/data_anal/stdimgplot.pro)


STDIMGPLOT2

[Previous Routine] [Next Routine] [List of Routines]
Name:
       STDIMGPLOT2

Purpose:
    generates standard plots for analysis of 64x1024 images 

Usage:
       STDIMGPLOT2,A,Hdr

Inputs:
       A   = image
       Hdr = FITS header

 
 @(#)stdimgplot2.pro	1.1 10/16/98 :LASCO IDL LIBRARY

(See /net/cronus/opt/local/idl_nrl_lib/lasco/data_anal/stdimgplot2.pro)


STR_SEP2

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/util/str_sep2.pro)


STR_UNIQUE

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/util/str_unique.pro)


SUBTENSE

[Previous Routine] [Next Routine] [List of Routines]
 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

 SCCS variables for IDL use
 
 @(#)subtense.pro	1.10 12/18/98 :NRL Solar Physics

(See /net/cronus/opt/local/idl_nrl_lib/lasco/convert/subtense.pro)


SUMMARY_PLOT

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/util/summary_plot.pro)


SUNDIST

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/util/sundist.pro)


SUNGRID

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/sungrid.pro)


SUN_EPHEM

[Previous Routine] [Next Routine] [List of Routines]
 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     :

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/sun_ephem.pro)


SYNSCAN

[Previous Routine] [Next Routine] [List of Routines]
 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.1 10/05/96 LASCO IDL LIBRARY

(See /net/cronus/opt/local/idl_nrl_lib/lasco/synoptic/synscan.pro)


TELESCOPE_POINTING

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/data_anal/telescope_pointing.pro)


TEXTARRAY

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/textarray.pro)


TVSCL_IMAGE

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/tvscl_image.pro)


TWO2ONE

[Previous Routine] [Next Routine] [List of Routines]
 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.

(See /net/cronus/opt/local/idl_nrl_lib/lasco/util/two2one.pro)


T_CARTES

[Previous Routine] [Next Routine] [List of Routines]

 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/t_cartes.pro)


T_PARAM.PRO

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/las-c2/t_param.pro)


T_POLAR

[Previous Routine] [Next Routine] [List of Routines]

 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/t_polar.pro)


UNDEFINE

[Previous Routine] [Next Routine] [List of Routines]
 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	:

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/undefine.pro)


UNIQ_NOSORT

[Previous Routine] [Next Routine] [List of Routines]
 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


(See /net/cronus/opt/local/idl_nrl_lib/lasco/util/uniq_nosort.pro)


UNPACK_ALL_SCIENCE

[Previous Routine] [Next Routine] [List of Routines]
 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


       @(#)unpack_all_science.pro	1.7 12/12/96 LASCO IDL LIBRARY

(See /net/cronus/opt/local/idl_nrl_lib/lasco/reduce/unpack_all_science.pro)


UNPACK_LZ_SCIENCE

[Previous Routine] [Next Routine] [List of Routines]
 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

 INPUTS:			None

 OPTIONAL INPUTS:		Name of file to be processed
				 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


       @(#)unpack_lz_science.pro	1.12 08/03/98 LASCO IDL LIBRARY

(See /net/cronus/opt/local/idl_nrl_lib/lasco/reduce/unpack_lz_science.pro)


UNPACK_REDUCE_MAIN

[Previous Routine] [Next Routine] [List of Routines]
 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

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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/reduce/unpack_reduce_main.pro)


UPDATE_HDR_ROLLXY

[Previous Routine] [Next Routine] [List of Routines]
 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 

(See /net/cronus/opt/local/idl_nrl_lib/lasco/reduce/update_hdr_rollxy.pro)


UTC2YYMMDD

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/util/utc2yymmdd.pro)


UTILITIES

[Previous Routine] [Next Routine] [List of Routines]
.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.

(See /net/cronus/opt/local/idl_nrl_lib/lasco/las-c2/utilities.pro)


VALIDLASCODIR

[Previous Routine] [Next Routine] [List of Routines]
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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/inout/validlascodir.pro)


VAR_IN

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/var_in.pro)


VDHAN

[Previous Routine] [Next Routine] [List of Routines]
 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.
	an = pi * n! / ((n/2)!)^2 / 2^(n+1)

 EXAMPLE:

 MODIFICATION HISTORY:
 	Written by:	RA Howard, NRL, 27 Nov 1998

	@(#)vdhan.pro	1.1 11/28/98 LASCO IDL LIBRARY

(See /net/cronus/opt/local/idl_nrl_lib/lasco/data_anal/vdhan.pro)


VDHCOEFF

[Previous Routine] [Next Routine] [List of Routines]
 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.2 11/27/98 LASCO IDL LIBRARY

(See /net/cronus/opt/local/idl_nrl_lib/lasco/data_anal/vdhcoeff.pro)


VIGNETTAGE[1]

[Previous Routine] [Next Routine] [List of Routines]

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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/las-c2/vignettage.pro)


VIGNETTAGE[2]

[Previous Routine] [Next Routine] [List of Routines]
unction lunule,R1,R2,d

(See /net/cronus/opt/local/idl_nrl_lib/lasco/las-c2/vignettage.pro)


VIGNETTAGE[2]

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/las-c2/vignettage.pro)


VIGNETTAGE[3]

[Previous Routine] [Next Routine] [List of Routines]

ro crevig,ima_name,off_x,off_y

(See /net/cronus/opt/local/idl_nrl_lib/lasco/las-c2/vignettage.pro)


WC2P

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/wc2p.pro)


WCALCL

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/wcalcl.pro)


WCALCNEW

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/wcalcnew.pro)


WCANCEL

[Previous Routine] [Next Routine] [List of Routines]
 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     : 

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/wcancel.pro)


WCURRENT

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/wcurrent.pro)


WCURSOR

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/wcursor.pro)


WDEF_LOAD

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/wdef_load.pro)


WDIR

[Previous Routine] [Next Routine] [List of Routines]
 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, 11-Feb-1997, B Podlipnik. Written

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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/wdir.pro)


WDMEMORY

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/wdmemory.pro)


WFLIMB

[Previous Routine] [Next Routine] [List of Routines]
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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/wflimb.pro)


WHEADINFO

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/wheadinfo.pro)


WHIST

[Previous Routine] [Next Routine] [List of Routines]
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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/whist.pro)


WIC

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/wic.pro)


WIMG_INFO1

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/wimg_info1.pro)


WIMG_INFO2

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/wimg_info2.pro)


WIMG_INFO3

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/wimg_info3.pro)


WIMG_INFO4

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/wimg_info4.pro)


WIN2PS

[Previous Routine] [Next Routine] [List of Routines]
 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

 SCCS variables for IDL use
 
 @(#)win2ps.pro	1.6 11/20/97 :NRL Solar Physics

(See /net/cronus/opt/local/idl_nrl_lib/lasco/util/win2ps.pro)


WINFO_ACTIV

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/winfo_activ.pro)


WLINES

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/wlines.pro)


WLISTER

[Previous Routine] [Next Routine] [List of Routines]
 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
		15Dec98, N Rich	Changed default source to LZ_IMG
               10-Feb-1999, A. Vourlidas, removed MODAL keyword from 
               XMANAGER call to comply with IDL5.2  

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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/wlister.pro)


WLOAD

[Previous Routine] [Next Routine] [List of Routines]
 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
 Contact     : BP, borut@lasco1.mpae.gwdg.de

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/wload.pro)


WLOADC

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/wloadc.pro)


WLOADINFO

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/wloadinfo.pro)


WLOADINFO1

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/wloadinfo1.pro)


WMESSAGE

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/wmessage.pro)


WMKMOVIE

[Previous Routine] [Next Routine] [List of Routines]
 Project     : SOHO - LASCO/EIT
                   
 Name        : WMKMOVIE
               
 Purpose     : Widget front end to MKMOVIE.PRO
               
 Explanation : This tool allows the user to select mkmovie options with
		a widget interface.
               
 Use         : IDL> WMKMOVIE [, arg1]


    Example  : IDL> WMKMOVIE		 ;Without any inputs, program will call wlister.pro

               Or you could have one argument, a STRARR of filenames for the movie.
		(such as that returned by wlister)
    Example  : IDL> WMKMOVIE, file_arr

               Or if you have image filenames saved into a single file pass the name of that file:
    Example  : IDL> WMKMOVIE, 'filename'
    
    
 Calls       : MKMOVIE.PRO, WLISTER.PRO

 Side effects: None.
               
 Category    : Image Display.  Animation.
               
 Written     : Scott Paswaters, NRL Oct. 18 1996.
               
 Modified    : SEP  29 May 1996 
               SEP  17 Mar 1997 	;mods for new options to MKMOVIE.PRO

 Version     : 

 See Also    : MKMOVIE.PRO
	@(#)wmkmovie.pro	1.0 10/18/96 LASCO IDL LIBRARY

(See /net/cronus/opt/local/idl_nrl_lib/lasco/movie/wmkmovie.pro)


WOBSDATE

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/wobsdate.pro)


WPLOT

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/wplot.pro)


WPLOT1

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/wplot1.pro)


WPLOT_NONOP

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/packets/wplot_nonop.pro)


WPLOT_SUBHTR[1]

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/packets/gethkpackets.pro)


WPLOT_SUBHTR[2]

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/packets/wplot_subhtr.pro)


WPRINT

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/wprint.pro)


WREBIN

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/wrebin.pro)


WRITE_CLOSED

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/reduce/write_closed.pro)


WRITE_DISK_MOVIE[1]

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/write_disk_movie_test.pro)


WRITE_DISK_MOVIE[2]

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/movie/write_disk_movie.pro)


WRITE_EXP_FACTOR

[Previous Routine] [Next Routine] [List of Routines]
 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 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)  
		Nzero       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.6 02/26/98 LASCO IDL LIBRARY

(See /net/cronus/opt/local/idl_nrl_lib/lasco/expfac/write_exp_factor.pro)


WRITE_HT

[Previous Routine] [Next Routine] [List of Routines]
 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
 
 @(#)write_ht.pro	1.8 10/03/97 :NRL Solar Physics

(See /net/cronus/opt/local/idl_nrl_lib/lasco/movie/write_ht.pro)


WRITE_LAST_C1

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/write_last_c1.pro)


WRITE_LAST_IMG

[Previous Routine] [Next Routine] [List of Routines]
 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


 @(#)write_last_img.pro	1.16 03/03/99 :LASCO IDL LIBRARY

(See /net/cronus/opt/local/idl_nrl_lib/lasco/reduce/write_last_img.pro)


WRITE_SUMMARIES

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/synoptic/write_summaries.pro)


WRITE_SUMMARIES2

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/synoptic/write_summaries2.pro)


WRITIMA.PRO

[Previous Routine] [Next Routine] [List of Routines]
 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           

(See /net/cronus/opt/local/idl_nrl_lib/lasco/las-c2/align1.pro)


WRUNMOVIE

[Previous Routine] [Next Routine] [List of Routines]
 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]]]

		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:
		Where win_index is an array of the window numbers and names is optionally
		a STRARR() containing names of each frame.
    Example  : IDL> WRUNMOVIE, win_index, NAMES=names
    
		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 date & time on frames (if not already there).
    Example  : IDL> WRUNMOVIE, /TIMES

		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

 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

 Version     : 

 See Also    : MKMOVIE.PRO
	@(#)wrunmovie.pro	1.11 03/02/99 LASCO IDL LIBRARY

(See /net/cronus/opt/local/idl_nrl_lib/lasco/movie/wrunmovie.pro)


WRUNMOVIE4

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/wrunmovie4.pro)


WRUNMOVIEM

[Previous Routine] [Next Routine] [List of Routines]
 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

               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 

 Version     : 3.1


 See Also    : MKMOVIEM.PRO

 @(#)wrunmoviem.pro	1.19 01/12/99 :LASCO IDL LIBRARY


(See /net/cronus/opt/local/idl_nrl_lib/lasco/movie/wrunmoviem.pro)


WR_BEAM

[Previous Routine] [Next Routine] [List of Routines]
 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       :  

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/wr_beam.pro)


WR_BEAM1

[Previous Routine] [Next Routine] [List of Routines]
 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       :  

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/wr_beam1.pro)


WSAVE

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/wsave.pro)


WSAVE1

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/wsave1.pro)


WSAVE2

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/wsave2.pro)


WSAVE_PS

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/wsave_ps.pro)


WSIZE

[Previous Routine] [Next Routine] [List of Routines]
 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	:

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/wsize.pro)


WSUNPROFILE

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/wsunprofile.pro)


WSW

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/wsw.pro)


WTIME_HEIGHT

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/wtime_height.pro)


WYES_NO

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/wyes_no.pro)


W_LAS_EXP_NORM

[Previous Routine] [Next Routine] [List of Routines]
 W_LAS_EXP_NORM
	WIdget interface for LAS_EXP_NORM

 History:
	Original: 26/3/96; SJT

(See /net/cronus/opt/local/idl_nrl_lib/lasco/exposure/w_las_exp_norm.pro)


W_MK_STDIM

[Previous Routine] [Next Routine] [List of Routines]
 W_MK_STDIM
	Widget interface for MK_STDIM

 Keywords:
	group	long	input	Group leader for the heirarchy.

 History:
	Original: 26/3/96; SJT

(See /net/cronus/opt/local/idl_nrl_lib/lasco/exposure/w_mk_stdim.pro)


W_POLY_DIFFIM

[Previous Routine] [Next Routine] [List of Routines]
 W_POLY_DIFFIM
	Widget interface for POLY_DIFFIM

 History:
	Original: 26/3/96; SJT

(See /net/cronus/opt/local/idl_nrl_lib/lasco/exposure/w_poly_diffim.pro)


W_STDIM_LIST

[Previous Routine] [Next Routine] [List of Routines]
 W_STDIM_LIST
	A widget interface for MK_STDIM_LIST

(See /net/cronus/opt/local/idl_nrl_lib/lasco/exposure/w_stdim_list.pro)


W_VAC2AIR

[Previous Routine] [Next Routine] [List of Routines]
 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.

(See /net/cronus/opt/local/idl_nrl_lib/lasco/convert/w_vac2air.pro)


XCME_MES

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/cme/xcme_mes.pro)


XEDITFRAME

[Previous Routine] [Next Routine] [List of Routines]
 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
 Version       : 

 See Also      : WRUNMOVIEM.PRO
 
 @(#)xeditframe.pro	1.3 09/12/97 :NRL Solar Physics

(See /net/cronus/opt/local/idl_nrl_lib/lasco/movie/xeditframe.pro)


XLOADCT

[Previous Routine] [Next Routine] [List of Routines]
 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.

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/xloadctbp.pro)


XPLOT_HT

[Previous Routine] [Next Routine] [List of Routines]
 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

 %W% %H% :LASCO IDL LIBRARY

(See /net/cronus/opt/local/idl_nrl_lib/lasco/movie/xplot_ht.pro)


XREGISTERED

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/util/xregistered2.pro)


XSTARTHT

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/movie/xstartht.pro)


XVALIDL()

[Previous Routine] [Next Routine] [List of Routines]
 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)

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/xvalidl.pro)


XVAREDT

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/xvaredt.pro)


XY_BILIN

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/xy_bilin.pro)


YYMMDD

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/yymmdd.pro)


YYMMDD2UTC

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	YYMMDD2UTC

 PURPOSE:
	This function converts a date string in the format YYMMDD into a 
       modified julian date structure

 CATEGORY:
	UTIL

 CALLING SEQUENCE:
	Result = YYMMDD2UTC(Dates)

 INPUTS:
	Dates:	Date string in the format yymmdd, or yyyymmdd, 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

	@(#)yymmdd2utc.pro	1.4 09/22/97 LASCO IDL LIBRARY

(See /net/cronus/opt/local/idl_nrl_lib/lasco/util/yymmdd2utc.pro)


ZOOM_IT

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/display/zoom_it.pro)


[1]

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/data_anal/image_profiles.pro)


[2]

[Previous Routine] [Next Routine] [List of Routines]
 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:	   If set, then return a 1024x1024 image. 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 congrid to 
                  resize the image.

 OUTPUTS:

	The function result is a full image, with the input image inserted into
	the correct place in the full image.

 OPTIONAL OUTPUTS:
	None

 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 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.

 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

 
 @(#)reduce_std_size.pro	1.5 02/17/99 :NRL Solar Physics

(See /net/cronus/opt/local/idl_nrl_lib/lasco/data_anal/reduce_std_size.pro)


[2]

[Previous Routine] [Next Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/reduce/reduce_statistics.pro)


[3]

[Previous Routine] [List of Routines]
 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

(See /net/cronus/opt/local/idl_nrl_lib/lasco/reduce/std_int_scale.pro)