Headers for LASCO IDL Library: EXPFAC

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


List of Routines


Routine Descriptions

CHECK_EXP_FACTOR_DUPS

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

 NAME:
	CHECK_EXP_FACTOR_DUPS

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

 CATEGORY:
	EXPFAC

 CALLING SEQUENCE:
	CHECK_EXP_FACTOR_DUPS,Tel,YYMMDD

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

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

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

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

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


CHECK_MONEXP_DUPS

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

 NAME:
	CHECK_MONEXP_DUPS

 PURPOSE:
	Check for duplicate entries in MONEXP data

 CATEGORY:
	LASCO EXPFAC

 CALLING SEQUENCE:
	CHECK_MONEXP_DUPS,Tel,Datea

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

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

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

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

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

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


COMPUTE_MONEXP_FACTORS

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

 
 NAME:
	COMPUTE_MONEXP_FACTORS

 PURPOSE:
	This procedure computes the exposure time correction factors

 CATEGORY:
	DATA_ANAL

 CALLING SEQUENCE:

	COMPUTE_MONEXP_FACTORS,Tel,Dtea,Dteb

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

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

 OUTPUTS:
	None

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

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

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

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

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

 CALLED PROCEDURES
	COMPUTE_MONEXP_POLY
	COMPUTE_MONEXP_RATIO
	OFFSET_BIAS
	WRITE_EXP_FACTOR
	READ_MONEXP_DATA
	GET_MONEXP_DATA
	STR_UNIQUE

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

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


COMPUTE_MONEXP_POLY

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


 NAME:
	COMPUTE_MONEXP_POLY

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

 CATEGORY:
	DATA_ANAL

 CALLING SEQUENCE:

	Result=COMPUTE_MONEXP_POLY(Dte,Ratio)

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

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

 RESTRICTIONS:
        NONE

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

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

	Plots are made of the fitted and observed factors.

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

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


COMPUTE_MONEXP_RATIO

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


 NAME:
	COMPUTE_MONEXP_RATIO

 PURPOSE:
	This procedure computes the region ratios

 CATEGORY:
	DATA_ANAL

 CALLING SEQUENCE:

	Result=COMPUTE_MONEXP_RATIO(Medimg,Medref)

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

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

 RESTRICTIONS:
	NONE

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

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

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

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

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



COMPUTE_STD_VALS

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

 NAME:
	COMPUTE_STD_VALS

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

 CATEGORY:
	DATA_ANAL

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

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

 OPTIONAL INPUTS:
	None

 KEYWORD PARAMETERS:
	None

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

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

 EXAMPLE:
	To compute the exposure monitoring information:

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

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

 


CORRSUBIMAGE

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

 NAME:
	CORRSUBIMAGE

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

 CATEGORY:
	LASCO EXPFAC

 CALLING SEQUENCE:
	Result = CORRSUBIMAGE (Hdr)

 INPUTS:
	Hdr:	Image header in LASCO structure format

 OUTPUTS:
	This function returns the exposure time correction factor.

 RESTRICTIONS:

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

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

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

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

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


CORR_ALLSUBS

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

 
 NAME:
	CORR_ALLSUBS

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

 CATEGORY:
	DATA_ANAL

 CALLING SEQUENCE:

	CORR_ALLSUBS,Tel,Dtea,Dteb

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

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

 OUTPUTS:
	None

 SIDE EFFECTS:
	Writes the exposure correction factors to a file

 PROCEDURE:

 MODIFICATION HISTORY:
         Written, RA Howard Oct 1999

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



DELETE_EXPFAC

[List of Routines] (See ./delete_expfac.pro)

 NAME:
	DELETE_EXPFAC

 PURPOSE:
	This procedure deletes the exposure factor files between two dates.

 CATEGORY:
	LASCO Exposure Factor

 CALLING SEQUENCE:
	DELETE_EXPFAC,Tel,Dtea,Dteb

 INPUTS:
	Tel:	The telescope: 'c1','c2,'c3','c4'
	Dtea:	The starting date, can be either a string yymmdd, or
		the modified julian date, or the CDS time structure
	Dteb:	The ending date, can be either a string yymmdd, or
		the modified julian date, or the CDS time structure

 SIDE EFFECTS:
	The files in $NRL_LIB/lasco/expfac/data/YYMM/tel+.... are deleted.

 MODIFICATION HISTORY:
 	Written by:	RA Howard, NRL, 2/1/98

	@(#)delete_expfac.pro	1.2 02/04/98 LASCO IDL LIBRARY


EXP_CORR

[List of Routines] (See ./exp_corr.pro)

 NAME:
	EXP_CORR

 PURPOSE:
	This procedure modifies the header to give the correct exposure time and 
	adds comments to give the old time and the correction factor.

 CATEGORY:
	LASCO EXPFAC

 CALLING SEQUENCE:
	EXP_CORR,Hdr

 INPUTS:
	Hdr:	LASCO image header

 OUTPUTS:
	The image header is modified

 RESTRICTIONS:
	The LASCO image structure is required.

 PROCEDURE:

 MODIFICATION HISTORY:
 	Written by:	RA Howard, NRL, 2/6/98

	@(#)exp_corr.pro	1.1 04/17/98 LASCO IDL LIBRARY


GET_EXP_FACTOR

[List of Routines] (See ./get_exp_factor.pro)

 NAME:
	GET_EXP_FACTOR

 PURPOSE:
	This function returns the exposure factor and bias for the 
	given image.

 CATEGORY:
	EXPFAC

 CALLING SEQUENCE:
	Result = GET_EXP_FACTOR (Hdr,Exp_factor,Exp_bias)

 INPUTS:
	Header:	Image header for which the factor and bias are wanted.

 OUTPUTS:
	Result:		0 for success, 
			-1 for file not found,
			-2 for time not found.
	Exp_factor:	The exposure correction factor. It should be 
			multiplied with the exposure time to get the 
			correct time.
	Exp_bias:	The offset bias that should be subtracted from the
			image.

 OPTIONAL OUTPUTS:
	Nreg:		Number of regions that particpated in the calculation.
	Exp_sig:	The standard deviation in the fit.

 KEYWORDS:
	FITS_HDR	STRARR = a FITS header, returned modified if set

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

 PROCEDURE:
	The date in the image header is tested to see if the exposure factor
	data in the common block are for that date.  If not, the data are 
	then read in to the common block using READ_EXP_FACTOR.  The data
	are searched for the time of the exposure.  If no time matches
	the exposure, then the factor is set to 1 and the standard bias from
	OFFSET_BIAS is used.

 MODIFICATION HISTORY:
 	Written by:	RA Howard, NRL, 21 September 1997
	6 Oct 1997	RAH, Split away from READ_EXP_FACTOR
	20 Feb 1998	RAH, Added the fits names to common
	19 Jul 2000	NBR - Allow FITS header input, and add HISTORY to FITS header
	 1 Aug 2000	NBR - Add FITS_HDR keyword
	 7 Aug 2000	NBR - Remove FITS_HDR keyword
	17 Sep 2002	NBR - Only use OFFSET_BIAS.pro if no expfactor; add filedate
			to common block and FITS header
	19 Sep 2002	NBR - Properly account for no expfac file found (2nd time through)
	 9 Jan 2003	NBR - Use fn instead of filenamenopath in header

 EXAMPLE:
	To obtain the exposure factor and bias information and then 
	convert the image counts to DN/sec:
		success = GET_EXP_FACTOR(hdr,expfac,bias)
		IF (success NE 0)  THEN BEGIN
			PRINT,'Exposure factor not found for image ',hdr.filename 
			PRINT,'Exposure factor is assumed to be 1.0'
               ENDIF
		img = (img-bias)/(hdr.exptime*expfac)
		
er= '@(#)get_exp_factor.pro	1.13 03/14/03' ;LASCO IDL LIBRARY


GET_MONEXP_DATA

[List of Routines] (See ./get_monexp_data.pro)

 NAME:
	GET_MONEXP_DATA

 PURPOSE:
	This function returns the monitor data of datatype = type 
	from the common block.

 CATEGORY:
	LASCO data analysis

 CALLING SEQUENCE:
	Result = GET_MONEXP_DATA(Type)

 INPUTS:
	Type:	The data type to be returned

 OUTPUTS:
	This function returns an array of the image statistics generated
	for the exposure time evaluation for the datatype specified as
	the input parameter.

 COMMON BLOCKS:
	MONEXP_DATA:  Contains the monexp data

 RESTRICTIONS:

 PROCEDURE:

 MODIFICATION HISTORY:
 	Written by:	RA Howard, 2 June 1997

	@(#)get_monexp_data.pro	1.6 11/20/97 LASCO IDL LIBRARY


MONITOR_EXP

[List of Routines] (See ./monitor_exp.pro)

 NAME:
	MONITOR_EXP

 PURPOSE:
	This procedure reads all the files for a given date and processes
	the image to give statistical information for exposure monitoring.

 CATEGORY:
	DATA_ANAL

 CALLING SEQUENCE:
	MONITOR_EXP,Date,Lz

 INPUTS:
	Date:	Gives the date to be processed in one of the following formats:
			YYMMDD,	6 character string
			YYYY/MM/DD, 10 character string
			CDS Date Structure
			Long Word of the modified julian date
	Lz:	0 for Quick-look, 1 for Level-0

 OPTIONAL INPUTS:
	Tel:	The telesope designation (string):  c1, c2, c3, c4/eit
		The default is all three LASCO telescopes.

 KEYWORD PARAMETERS:
	None

 OUTPUTS:
	None.

 SIDE EFFECTS:
	Appends the information to files in $MON_EXP with the file name
	telstr_monexp_YYMMDD.dat, where telstr is a string denoting the telscope
	and YYMMDD are 6 digits giving the year, month and day of the data:
		eg.   c1_monexp_961231.dat
		      c2_monexp_961231.dat
		      c3_monexp_961231.dat
	(records) in the .dat file.

 RESTRICTIONS:

 PROCEDURE:

 EXAMPLE:
	To process the exposure monitoring information for 1 Sep 1996 quick
	look data:

		MONITOR_EXP,'960901',0
	or
		MONITOR_EXP,'1996/09/01',0
	or
		MONITOR_EXP,mjd,0
	or
		MONITOR_EXP,mjd.mjd,0

 MODIFICATION HISTORY:
 	Written by:	R.A. Howard, NRL, 10/3/96
	Modified by:	J. S. Morrill, NRL, 4/8/97
	Modified by:	RAH, 5/22/97, error handling for missing directories
	Modified by:	RAH, 5/22/97, split out loop to monitor_exp_img

 @(#)monitor_exp.pro	1.7 06/02/97 :NRL Solar Physics


MONITOR_EXP_IMG

[List of Routines] (See ./monitor_exp_img.pro)

 NAME:
	MONITOR_EXP_IMG

 PURPOSE:
	This procedure reads the specified file and processes
	the image to give statistical information for exposure monitoring.

 CATEGORY:
	DATA_ANAL

 CALLING SEQUENCE:
	MONITOR_EXP_IMG,Fn

 INPUTS:
	Fn:	String containing the file name to process

 KEYWORD PARAMETERS:
	SAVEDIR		Specify directory to save output to besides $MON_EXP

 OUTPUTS:
	None.

 SIDE EFFECTS:
	Appends the information to files in $MON_EXP with the file name
	telstr_monexp_YYMMDD.dat, where telstr is a string denoting the telscope
	and YYMMDD are 6 digits giving the year, month and day of the data:
		eg.   c1_monexp_961231.dat
		      c2_monexp_961231.dat
		      c3_monexp_961231.dat
	(records) in the .dat file.

 RESTRICTIONS:

 PROCEDURE:

 EXAMPLE:
	To process the exposure monitoring information for the image specified
	by 120050001.fts:

		MONITOR_EXP_IMG,'120050001.fts'

 MODIFICATION HISTORY:
 	Written by:	R.A. Howard, NRL, 10/3/96
	Modified by:	J. S. Morrill, NRL, 4/8/97
	Modified by:	RAH, 5/22/97, error handling for missing directories
	RAH 5/24/97, Extracted from MONITOR_EXP to be able to handle single images
	NBR 1/10/01, Extract filename from input
	NBR 1/15/02, Add SAVEDIR keyword; convert nleb and nccd to type LONGWORD

 @(#)monitor_exp_img.pro	1.3 01/15/02 :NRL Solar Physics


PLOT_EXP_FACTOR

[List of Routines] (See ./plot_exp_factor.pro)

 NAME:
	PLOT_EXP_FACTOR

 PURPOSE:
	This procedure reads all the files for the given date range
	and plots the exposure time factors

 CATEGORY:
	EXP_FAC

 CALLING SEQUENCE:
	PLOT_EXP_FACTOR,Tel,Dtea

 INPUTS:
	Tel:	The telesope designation (string):  c1, c2, c3, c4/eit
		The default is all three LASCO telescopes.
	Dtea:	Gives the date to be processed in one of the following formats:
			YYMMDD,	6 character string
			YYYY/MM/DD, 10 character string
			CDS Date Structure
			Long Word of the modified julian date

 OPTIONAL INPUTS:
	Dteb:	Gives the final date to be processed in the same format as DteA

 KEYWORD PARAMETERS:
	PS:	If set then the plot is sent to the printer, else it is sent to the current
		graphics device

 OUTPUTS:
	None.

 RESTRICTIONS:

 PROCEDURE:

 EXAMPLE:

 MODIFICATION HISTORY:
 	Written by:	R.A. Howard, NRL, 10/7/97

 @(#)plot_exp_factor.pro	1.2 10/07/97 :LASCO IDL LIBRARY


PLOT_MONEXP_STD

[List of Routines] (See ./plot_monexp_std.pro)


 NAME:
	PLOT_MONEXP_STD

 PURPOSE:
         This procedure reads in the output data file from MONITOR-EXP.PRO,
         and makes standard plots

 CATEGORY:
         DATA_ANAL

 CALLING SEQUENCE:

         PLOT_MONEXP_STD,Tel,Dtea,Dteb

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

 KEYWORD PARAMETERS:
         PS:	If set, create a postscript file

 OUTPUTS:
         None

 SIDE EFFECTS:
         Generates plot files

 RESTRICTIONS:
        NONE

 PROCEDURE:


 MODIFICATION HISTORY:
         

	@(#)plot_monexp_std.pro	1.2 09/26/97 LASCO IDL LIBRARY


READ_EXP_FACTOR

[List of Routines] (See ./read_exp_factor.pro)

 NAME:
	READ_EXP_FACTOR

 PURPOSE:
	This function reads the exposure factor file for a given date

 CATEGORY:
	EXPFAC

 CALLING SEQUENCE:
	Result = READ_EXP_FACTOR(Date)

 INPUTS:
	Tel:		Telescope (string: 'c1','c2','c3')
	Date:		Date for which the exposure factors are wanted, either
			in YYMMDD, MJD, or CDS time structure formate

 OUTPUTS:
	Result:		0 = Successful read
			-1 = File not found

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

 PROCEDURE:
	Called by GET_EXP_FACTOR

	The file for the image date specified in the image header is 
	read into the common block.
  
	The format in the exposure factor file is:
      fname       tsnnnnnn.fts    (a12)  
      factor      number          (f10.6)  
      bias        number          (f10.1)  
      date        YYMMDD          (a6)  
      time        SEC.MM          (12.2)  
      Filter      string          (a12)  
      Polarizer   string          (a12)  
      Wavelength  NNNN.NNNN       (a9)  
      Nregion     NNNN            (i4)
      Sigma       NNNN.NNNN       (f10.2)

	Checks for duplicate entries and only saves the last one read in.

 MODIFICATION HISTORY:
 	Written by:	RA Howard, NRL, 21 September 1997
	6 October 1997	RAH, Split read away from GET_EXP_FACTOR
	20 Feb 98	RAH, added fits filenames to the common block
			and changed the variable name to be nregion instead
			of nzero
	22 Feb 98	RAH, check for duplicate entries, and permit any format
			for date
	 4 Dec 01 	Use FILEPATH for filename
	17 Sep 02	Add filedate to common block, from file_date_mod


 @(#)read_exp_factor.pro	1.12, 09/18/02 :LASCO IDL LIBRARY

	


READ_MONEXP_DATA

[List of Routines] (See ./read_monexp_data.pro)

 NAME:
	READ_MONEXP_DATA

 PURPOSE:
	This procedure reads in the MONEXP data for the given telescope and date.

 CATEGORY:
	LASCO data analysis

 CALLING SEQUENCE:
	READ_MONEXP_DATA,Tel,Dtea,Dteb

 INPUTS:
	Tel:	String giving the telescope: C1, C2, C3
	Dtea:	First date to be read in, either YYMMDD, or MJD or UTC
	Dteb:	Last date to be read in, either YYMMDD, or MJD or UTC

 KEYWORD PARAMETERS:
	NOSORT:	If set then the MONEXP data are not sorted by time.  The default is
		to sort the data

 OUTPUTS:
	Stores data into the common array

 COMMON BLOCKS:
	MONEXP_DATA

 SIDE EFFECTS:
	Reads in the data files of the form, $MON_EXP/cx_monexp_yymmdd.dat
		where cx is c1, c2, c3, or c4
		and   yymmdd is the year, month, day

 RESTRICTIONS:

 PROCEDURE:

 MODIFICATION HISTORY:
 	Written by:	RAHoward, NRL, June 2 1997
	Modified:	11/11/97  RAH	Check to see if MON_EXP file exists
	         	06/06/97  RAH	Added nosort option, check for nrec=0
	         	12/18/98  RAH	Added check for compressed files

	@(#)read_monexp_data.pro	1.9 01/15/02 LASCO IDL LIBRARY


WRITE_EXP_FACTOR

[List of Routines] (See ./write_exp_factor.pro)

 NAME:
	WRITE_EXP_FACTOR

 PURPOSE:
	This procedure writes out a exposure factor record

 CATEGORY:
	LASCO EXPFAC

 CALLING SEQUENCE:
	WRITE_EXP_FACTOR,Tel,Fname,Fac,Bias,Date,Filt,Polr,Wavelen,Nz,Sigma

 INPUTS:
	Tel:	String denoting the telescope, c1,c2, c3
	Fname:	String giving the filename of the image for which the factor 
		was computed
	Fac:	Exposure correction factor
	Bias:	Offset bias
	Date:	The date of observation as MJD or CDS time structure
	Filt:	Filter wheel position (string)
	Polr:	Polarizer wheel position (string)
	Wavelen:If C1 then the FP wavelength, else 0
	Nz:	The number of non-zero regions 
	Sigma:	Standard deviation of the computation of the expsoure factor

 OUTPUTS:
	Nothing is returned to the calling program.  A record is written to
	the appropriate exposure time file.

 PROCEDURE:
	This routine is a subroutine to the expsoure factor determination and
	is not intended to be used separately.

	Write information to the exposure factor file in the following format
		filename    tsnnnnn.fts     (a12)  
		factor      number          (f10.6)  
		bias        number          (f10.1)  
		date        YYMMDD          (a6)  
		time        SSSS.mmm        (f10.2)  
		Filter      0-4             (a12)  
		Polarizer   0-4             (a12)  
		Wavelength  NNNN.NNNN       (a9)  
		Nz          NNNN            (i4)
		sigma       NNNN.NNNN       (f10.2)  

 MODIFICATION HISTORY:
 	Written by:	RA Howard, Sep 1997
	 3 Feb 98	RAH, Make sure subdirectory exists

	@(#)write_exp_factor.pro	1.7 11/16/99 LASCO IDL LIBRARY


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