VALID_CDS_POINT $SSW/soho/cds/idl/util/ops/planning/valid_cds_point.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : VALID_CDS_POINT
               
 Purpose     : validate that CDS pointing is within acceptable limits
               
 Category    : Planning
               
 Explanation : CDS is capable of pointing within a 4080 arcsec square
               centered approx. on the Sun. The square is rotated 45 degs
               from N/S owing to the orientation of the OPS legs.
               
 Syntax      : IDL> valid=valid_cds_point(x,y)
    
 CALLED BY:
	CDSFOV, ITOOL_PTOOL, MK_CDS_PLAN, MK_POINT_BASE, MK_STUDY
 Examples    : 

 Inputs      : x,y = coordinate pair to check (e.g. -200, 300) in units of
               arcsecs (N and W being positive)
               
 Opt. Inputs : None
               
 Outputs     : 1/0 = for valid/invalid pointing. If coordinates are
               arrays, then valid is an array.

 Opt. Outputs: None
               
 Keywords    : None

 CALLS: ***
	GET_OPS_POS, HAVE_PROC
 Common      : None
               
 Restrictions: None
               
 Side effects: None.
               
 History     : Version 1,  17-Nov-1995,  D M Zarro.  Written
               Version 2,  28-Jun-1996   C D Pike    Rewrite to only take
                                                     account of OPL limits

 Contact     : DZARRO@SOLAR.STANFORD.EDU


VALID_NUM [3] $SSW/soho/mdi/idl_old/gen/ssw_lib/valid_num.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : VALID_NUM()
               
 Purpose     : Check if a string is a valid number representation.
               
 Explanation : The input string is parsed for characters that may possibly
               form a valid number.  It is more robust than simply checking
               for an IDL conversion error because that allows strings such
               as '22.3qwert' to be returned as the valid number 22.3
               See also the original NUM_CHK which returns the status in 
               the opposite sense.

 Use         : IDL> status = valid_num(string  [,value]  [,/integer])
    
 Inputs      : string  -  the string to be tested
               
 Opt. Inputs : None
               
 Outputs     : The function returns 1 for valid, 0 for invalid number
               
 Opt. Outputs: value	- The value the string decodes to.  This will be
			  returned as a double precision number unless /INTEGER
			  is present, in which case a long integer is returned.
               
 Keywords    : Integer   -  if present code checks specfically for an integer.

 Calls       : None
 CALLED BY:
	ANYNAME2STD, CDS_IMAGE, CH_SYNTHETIC, CONVERT_TERMS, CONVERT_TERMS_ALL
	EIS_IMAGE_TOOL_EVENT [1], EIS_IMAGE_TOOL_EVENT [2], FIND_CDS_STUDIES
	FITSHEAD2WCS, FXPAR [1], FXPAR [2], HEX2DEC, IMAGE_TOOL_EVENT, ITOOL_RD_FITS
	KAP_VERS, MAKE_CHIANTI_SPEC, MK_IMG, MK_RASTER, MK_SYNOPTIC, MK_WAVECAL, MRDFITS [1]
	MRDFITS [2], QL_RD_LLIST, RATIO_PLOTTER [1], RD_IMAGE_FITS, STR2UTC [1]
	STR2UTC [2], STR2UTC [3], TP_READ_TEXTW, WCS_FIND_PIXEL_LIST, WCS_HCLEAN
	XSET_COLOR, XSET_VALUE, YYMMDD, ch_ss, fits2rm, ratio_plotter [2]
 Restrictions: None
               
 Side effects: None
               
 Category    : Utilities, Numerical
               
 Prev. Hist. : Small changes from NUM_CHK by Andrew Bowen, 
                                             Tessella Support Services, 8/3/93

 Written     : CDS version by C D Pike, RAL, 24-May-93
               
 Modified    : Version 1, C D Pike, RAL, 24-May-93
		Version 2, William Thompson, GSFC, 14 October 1994
			Added optional output parameter VALUE to allow
			VALID_NUM to replace STRNUMBER in FITS routines.

 Version     : Version 1  24-May-93


VALID_QL $SSW/soho/cds/idl/sci/data_handling/i_o/fits/cds/valid_ql.pro
[Previous] [Next]
 Project     : SOHO - CDS

 Name        : VALID_QL

 Purpose     : checks if CDS QL structure is valid

 Category    : CDS planning

 Syntax      : IDL> valid=valid_ql(ql)

 Inputs      : QL = CDS QL data structure 

 Outputs     : VALID = 1/0 if valid/invalid

 Keywords    : STORAGE = 1/0 if using new/old storage scheme
               DELETE = set to delete QL if invalid

 CALLS: ***
	DATATYPE [1], DATATYPE [2], DATATYPE [3], DELETE_QLDS, GET_TAG_VALUE, HAVE_TAG
	VALID_POINTER
 CALLED BY:
	CDS_STACK, MK_CDS_MAP, XCAT
 History     : 9-Nov-1999,  D.M. Zarro.  Written

 Contact     : DZARRO@SOLAR.STANFORD.EDU


VALIDCDSHEAD $SSW/soho/cds/idl/sci/data_handling/i_o/fits/cds/validcdshead.pro
[Previous] [Next]
 Project     :	SOHO - CDS

 Name        :	VALIDCDSHEAD()

 Purpose     :	Check FITS file header for validity in SFDU registration file.

 Explanation :	This routine is called by the CHECKCDSFITS procedure and 
		checks to make sure that all of the FITS header keywords are
		registered with the NSSDCA through the SFDU registration
		files.  It also checks to see that the CDS SFDUADID keyword
		value is correct (='NSSD0229').

 Use         :	RESULT = VALIDCDSHEAD( HEADER, [MESSG, KEYREG] )

 Inputs      :	HEADER:  The extended header of the FITS file.

 Opt. Inputs :	None.

 Outputs     :	RESULT:	STRING (scalar) is output:
				'valid' if file meets criterion test,
				'invalid' if it fails.

 Opt. Outputs:	MESSG:	A detailed message describing why the FITS header is
			invalid (STRING, can be scalar or array depending on
			number of errors found).

		KEYREG:	A complete listing of all the registered SFDU FITS 
			file keywords is returned (STRING).

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

				ERRMSG = ''
				RES = VALIDCDSHEAD( HEADER, ERRMSG=ERRMSG)
				IF ERRMSG(0) NE '' THEN ...

 Calls       : ***
	DATATYPE [1], DATATYPE [2], DATATYPE [3], SFDU_GETREG, SXPAR [1], SXPAR [2]
	SXPAR [3]
 CALLED BY:
	CHECKCDSFITS
 Common      :	None.

 Restrictions:	Only one FITS file header can be sent at a time.

 Side effects:	None.

 Category    :	Data Handling, I/O, FITS, SFDU, CDS, Quicklook

 Prev. Hist. :	None.

 Written     :	Donald G. Luttermoser, GSFC/ARC, 26 October 1995

 Modified    :	Version 1, Donald G. Luttermoser, GSFC/ARC, 20 December 1995
			Initial program.

 Version     :	Version 1,  20 December 1995.


VALIDCDSTYPE $SSW/soho/cds/idl/sci/data_handling/i_o/fits/cds/validcdstype.pro
[Previous] [Next]
 Project     :	SOHO - CDS

 Name        :	VALIDCDSTYPE

 Purpose     :	Makes a structure containing valid FITS extension column types.

 Explanation :	This procedure creates a structure that contains information
		regarding the valid TYPES of columns in a CDS binary table
		FITS file.

 Use         :	VALIDCDSTYPE, TCOLM, AXES

 Inputs      :	None.

 Opt. Inputs :	None.

 Outputs     :	TCOLM:	Structure containing valid FITS column information.
			It is named "TCOLM" and has the following tags:
			TYPE:	Type of data associated with the binary table
				column.  Essentially a main FITS header 
				keyword.
			UNIT:	The units of the data: 'counts', 'counts/sec',
				'second', 'arcsec', etc.
			NDIM:	Minimum number of dimensions allowed for the 
				data (note that the maximum is 4 dimensions).
			IDLTYPE:	Type of data values in terms of IDL
				"type" numbers.
			QWAVE:	If set to 1, then first dimension of a 3 or 4
				dimensional array is wavelength (WAVELNTH).
				If set to 0, then the data in question is 
				loaded into either a 1-D or 2-D array or the
				first dimension in a 3 or 4 dimensional array
				is associated with a detector (DETECTOR).

		AXES:	Units for multi-dimensional data.  The array indicies
			must conform to the following units:
			 1-D:	any units,
			 2-D:	(SOLAR_X,SOLAR_Y),
			 3-D:	(WAVELNTH,SOLAR_X,SOLAR_Y), or
				(DETECTOR,SOLAR_X,SOLAR_Y),
			 4-D:	(WAVELNTH,SOLAR_X,SOLAR_Y,DEL_TIME), or
				(DETECTOR,SOLAR_X,SOLAR_Y,DEL_TIME).

 Opt. Outputs:	None.

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

				ERRMSG = ''
				VALIDCDSTYPE, TCOLM, AXES, ERRMSG=ERRMSG
				IF ERRMSG(0) NE '' THEN ...

 Calls       :	None.
 CALLED BY:
	CHECKCDSFITS
 Common      :	None.

 Restrictions:	None.

 Side effects:	None.

 Category    :	Data Handling, I/O, FITS, SFDU, CDS, Quicklook

 Prev. Hist. :	None.

 Written     :	Donald G. Luttermoser, GSFC/ARC, 21 December 1995

 Modified    :	Version 1, Donald G. Luttermoser, GSFC/ARC, 21 December 1995
			Initial program.

 Version     :	Version 1,  21 December 1995.


VALIDLASCODIR $SSW/soho/lasco/idl/inout/validlascodir.pro
[Previous] [Next]
NAME:
	VALIDLASCODIR

PURPOSE:
	This procedure (called by others) determines if the directory is
	valid

CALLING SEQUENCE:
	Result = VALIDLASCODIR (Sd,Camera,Silent)

INPUTS:
	Sd:	A string giving the date directory (YYMMDD)
	Camera:	A two-character string describing which camera is
		desired.  Acceptable choices for camera are: "c1",
		"c2","c3", or "c4".  Camera is case-insensitive.
	SILENT:	Supress output of all error messages except lower-
		level IDL and system messages.

OUTPUTS:
	This function returns a string specifiying the directory in
	which desired images can be found.

RESTRICTIONS:
	You must have the LASCO/EIT image file system mounted on
	the machine your are running IDL from.

EXAMPLE:
	dir=validlascodir('960531','C1',silent)

AUTHOR: Scott Hawley, NRL, June 27, 1996
	7/12/96	SHH, Generates directory names for cplex2
	9/22/96	RAH, NRL Addapted from LZ_GETLASCODIR


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


VAR_IN $SSW/soho/lasco/idl/display/var_in.pro
[Previous] [Next]
 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


VAR_TYPE $SSW/soho/gen/idl/plan/msproject/var_type.pro
[Previous] [Next]
 Project     :	SOHO - CDS/SUMER

 Name        :	VAR_TYPE

 Purpose     :	Determine the data type of a variable or parameter.

 Explanation :	This function checks what type of variable or parameter has 
               been passed to it and returns and integer based on the data
               type of the variable.

 Use         :	RESULT = VAR_TYPE (V)

		COLA = 8
		IF VAR_TYPE (COLA) EQ 1 THEN PRINT, "Variable is an integer."
		ELSE PRINT, "Variable is not an integer."

               IDL>Variable is an integer.


 Inputs      :	V	 = Variable to determine data type of.

 Opt. Inputs :	None.

 Outputs     :	None.

 Opt. Outputs:	None.

 Result      : The data type of the variable passed to the function as V.

               The data type is represented as integer according to the 
               following table:

               0      Undefined
               1      Byte
               2      Integer
               3      Longword Integer
               4      Floating Point
               5      Double Precision Floating Point
               6      Complex
               7      String
               8      Structure

               If no parameter is passed to this function then the function
               will return 0 anyway.

 Keywords    :	None.

 Calls       :	None.
 CALLED BY:
	GET_SECTION_NO
 Common      :	None.

 Restrictions:	None.

 Side effects:	None.

 Category    :	Planning, science

 Prev. Hist. :	None.

 Written     :	Ron Yurow, 26 October 1995

 Modified    :	Version 1, Ron Yurow, 26 October 1995

 Version     :	Version 1, 26 October 1995


vax2ieee [2] $SSW/soho/mdi/idl_old/gen/ys_util/vax2ieee.pro
[Previous] [Next]
  NAME:
       vax2ieee
  PURPOSE:
       To convert VAX floating point to Sun IEEE floating point
  CALLING SEQUENCE:
       vax2ieee, variable
  INPUTS:
       variable - The data variable to be converted.  This may be a scalar
                  or an array.  Valid datatypes are floating point, and 
                  double precision.
  OUTPUTS:
       variable - The result of the conversion is passed back in the
                  original variable.
 CALLED BY:
	vax2sun [1], vax2sun [2], word_conv [1], word_conv [2], yoh_vax2ieee [1]
	yoh_vax2ieee [2]
  COMMON BLOCKS:
       none
  SIDE EFFECTS:
       none
  RESTRICTIONS:
       Only floating point arrays or scalars are converted, others are
       unchanged.
  MODIFICATION HISTORY:

       Version 1       By John Hoegy           13-Jun-88

       21-Oct-88 - JAH:  Fixed problem where it wouldn't convert float
                         and double scalars.

       24-Oct-88 - JAH:  Fixed problem with converting integer arrays.

       21-May-91 - T. Metcalf:  Cannibalized vax_to_sun to get IEEE conversions
                                See also vax2sun.pro


vax2sun [2] $SSW/soho/mdi/idl_old/gen/ys_util/vax2sun.pro
[Previous] [Next]
NAME:
	vax2sun
PURPOSE:
	Converts data written on a DEC machine to SUN format by swapping
	bytes appropriately for the type of the input data.
CATEGORY:
	Byte-swapping
CALLING SEQUENCE:
	vax2sun,a
INPUTS:
	a = input variable which is to have its bytes swapped
OPTIONAL INPUT PARAMETERS:
	none
KEYWORD PARAMETERS
	none
OUTPUTS:
	a = reformatted variable is passed back in the original variable
 CALLS: ***
	vax2ieee [1], vax2ieee [2]
 CALLED BY:
	BFITS, MLSO_SYN_READER
COMMON BLOCKS:
	None
SIDE EFFECTS:
	None
RESTRICTIONS:
	None.
PROCEDURE:
	Determines the type of the variable and swaps the bytes depending
	on the type.  If the variable is a structure, the tags are 
	recursively searched so that the bytes are swapped throughout
	the structure.
MODIFICATION HISTORY:
	T. Metcalf 5/20/91  Version 1.0

       T. Metcalf Aug 1991: Added complex floating point  Version 1.1


VDF_HEIGHT $SSW/soho/sumer/idl/atest/vdf_height.pro
[Previous] [Next]
   NAME : 
           VDF_HEIGHT
   PURPOSE:
           Gives the physcal height of default size IDL fonts
           in device units
   CALLING SEQUENCE:
          Height = VDF_HEIGHT(Device_name)
   INPUTS:
          DEVICE_NAME      either 'X' or 'PS'
   OUTPUTS:
          Height         in device units
                           1000 = 1cm in 'PS'
                           1=  1 pixel in 'X'
   MOdification History
         April 1997   Jongchul Chae
 CALLED BY
	SUMER_DISPLAY_IMA, SUMER_DISPLAY_SPECTRUM, SUMER_DISPLAY_W


VDH_INVERSION $SSW/soho/lasco/idl/data_anal/vdh_inversion.pro
[Previous] [Next]
 NAME:
	VDH_INVERSION

 PURPOSE:
	This function does the inversion of a radial fit to pB to electron density.

 CATEGORY:
	LASCO DATA_ANALYSIS

 CALLING SEQUENCE:
	VDH_INVERSION,Radii,Q,Coeff,Exps

 INPUTS:
	Radii:	An array of radial points for which the inversion is to be done
	Q:	The limb darkening parameter (0<1)
	Coeff:	The coefficients in the fit of pB versus R
	Exps:	The coefficients in the expansion of pB versus R

 OUTPUTS:
	This function returns the electron density inverted from the fit of pB.

 CALLS: ***
	VDHAN [1], VDHAN [2], VDHCOEFF
 CALLED BY:
	PB_INVERTER
 RESTRICTIONS:
	The pB fit is assumed to be only of the K-corona.  Any F-coronal 
	contribution must be removed.
	The pB fit coefficients must be a polynomial of the form, r^(-n).
	The exponents don't need to be incrementing by 1 and may be 
	fractional.

 PROCEDURE:
	The procedure follows the method of van de Hulst, Bull Astron Institutes 
	Netherlands, vol XI, 2 Feb 1950, pp135-150

	The Ne is assumed to be axially symmetic.

 EXAMPLE:

 MODIFICATION HISTORY:
 	Written by:	RA Howard & Andrew Hayes, NRL, Dec 1998

	@(#)vdh_inversion.pro	1.2 10/08/00 LASCO IDL LIBRARY


VDHAN [1] $SSW/soho/lasco/idl/data_anal/vdhan.pro
[Previous] [Next]
 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.

 CALLED BY:
	NE_FROM_PB, VDH_INVERSION
 RESTRICTIONS:
	The index must be positive and less than 34.

 PROCEDURE:
	The procedure computes the an coefficient in equations 24a and 24b of 
	van de Hulst, ;	Bull Astron Institutes Netherlands, vol XI, 2 Feb 1950, 
	pp143.  The definition of the coefficient is given in equation 25:
	
	an = pi * n! / ((n/2)!)^2 / 2^(n+1)

 EXAMPLE:

 MODIFICATION HISTORY:
 	Written by:	RA Howard, NRL, 27 Nov 1998

	@(#)vdhan.pro	1.4 11/02/01 LASCO IDL LIBRARY


VDHAN [2] $SSW/soho/lasco/idl/data_anal/vdhan_new.pro
[Previous] [Next]
 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.

 CALLED BY:
	NE_FROM_PB, VDH_INVERSION
 RESTRICTIONS:
	The index must be positive and less than 34.

 PROCEDURE:
	The procedure computes the an coefficient in equations 24a and 24b of 
	van de Hulst, ;	Bull Astron Institutes Netherlands, vol XI, 2 Feb 1950, 
	pp143.  The definition of the coefficient is given in equation 25:
	
	an = pi * n! / ((n/2)!)^2 / 2^(n+1)

 EXAMPLE:

 MODIFICATION HISTORY:
 	Written by:	RA Howard, NRL, 27 Nov 1998

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


VDHCOEFF $SSW/soho/lasco/idl/data_anal/vdhcoeff.pro
[Previous] [Next]
 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

 CALLS: ***
	ELTHEORY
 CALLED BY:
	NE_FROM_PB, VDH_INVERSION
 COMMON BLOCKS:
	COM_ELTHEORY:	R,AEL,BEL,CEL,DEL

 PROCEDURE:
	The functions that describe the scattering of photospheric sunlight from 
	electrons have been developed by van de Hulst (Bulletin of the Astronomical 
	Institutes of the Netherlands, Volume XI, Number 410, February 2, 1950, 
	pp 135-150.  The equations were originally developed in a different form by 
	Minnaert (Zeitschrift fur Astrophysics, Vol 1, 209, 1930) and are included 
	in Billings book "A Guide to the Solar Corona.  The IDL routine, ELTHEORY 
	in the NRL IDL library, computes the Minnaert coefficients, which are only 
	slightly different from the van de Hulst functions in equations 11 and 12 of 
	his paper.  To compute the electron densities from pB, the VDH functions, 
	A and B, are quite useful.
	
	The routine ELTHEORY is called to return the Minnaert coefficients and then 
	the VDH coefficients are computed from them.

 EXAMPLE:
	To return the VDH coefficients, you must specify an array for the radial 
	distance from the sun and the limb darkening coefficient.  

	VDHCOEFF,R,Q,A,B

 MODIFICATION HISTORY:
 	Written by:	RA Howard, 27 Nov 1998..

	@(#)vdhcoeff.pro	1.3 10/27/99 LASCO IDL LIBRARY


VDS_BIAS_GLITCH $SSW/soho/cds/idl/sci/engineering/vds_bias_glitch.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : VDS_BIAS_GLITCH
               
 Purpose     : Demonstrates instability in VDS bias level.
               
 Explanation : 
               
 Use         : IDL> vds_bias_glitch
    
 Inputs      : None
               
 Opt. Inputs : None
               
 Outputs     : None
               
 Opt. Outputs: None
               
 Keywords    : None

 Calls       : ***
	CDS_OUTPLOT, CDS_UTPLOT, CDS_UTSTRING, CIRCLE_SYM, CONCAT_DIR [1], CONCAT_DIR [2]
	CONCAT_DIR [3], concat_dir [4]
 Common      : None
               
 Restrictions: None
               
 Side effects: None
               
 Category    : Engineering, VDS
               
 Prev. Hist. : None

 Written     : C D Pike, RAL.  5-Aug-96
               
 Modified    : Change utplot name.  CDP, 2-Oct-96

 Version     : Version 2, 2-Oct-96


VDS_BURNIN_NEW $SSW/soho/cds/idl/sci/cal/vds/inten/vds_burnin_new.pro
[Previous] [Next]
 Project     :	SOHO - CDS

 Name        :	VDS_BURNIN_NEW

 Purpose     :	Adds burn-in to flat field for post-recovery VDS images.

 Explanation :	Called from VDS_CALIB to modify the flat field to include the
		burn-in effects for VDS data taken after recovery of the SOHO
		spacecraft in October 1998.

 Use         :	VDS_BURNIN_NEW, DATA, FLAT

 Inputs      :	DATA	= Structure variable as read by READCDSFITS.

		FLAT	= Flat field data from VDS_CALIB.

 Opt. Inputs :	None.

 Outputs     :	FLAT	= The modified flat field.

 Opt. Outputs:	None.

 Keywords    :	NOBURNIN = If set, then the burn-in correction is not applied.
			   This is mainly used when analyzing the burn-in
			   characteristics in AN_NIMCP.

		NOPRESLIT6 = If set, then the burnin from the use of slit 6
			   prior to the accident is not removed from the data.
			   This is mainly used for analyzing the burn-in
			   characteristics.

		SLIT6  = If set, then an adjustment is made for the estimated
			 burn-in effect of the use of 90 arcsecond wide "movie"
			 slit.  This correction is based on an analysis of the
			 average behavior of the 584 line as seen in the daily
			 synoptic images.  The amount of exposure elsewhere is
			 assumed to be proportional to an average slit 6
			 quiet-sun profile.

			 Note that the use of the /SLIT6 keyword is unrelated
			 to whether or not the current observation uses slit 6.
			 Instead, it is intended to correct, as best as
			 possible, for the cummulative effect that slit 6 has
			 on the detector over time.

			 If both NOBURNIN and SLIT6 is set, then only the
			 burnin from the use of slit 6 prior to the accident
			 will be removed from the data.

			 As of 29 August 2000, the default is for SLIT6 to
			 be set.  To not apply this correction, use SLIT6=0.

		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 = ''
				VDS_CALIB, ERRMSG=ERRMSG, ...
				IF ERRMSG NE '' THEN ...

               FLIGHT = Use Sep 1997 flight flatfield for OV, HeI and MgIX

 Calls       : ***
	COMP_BGAUSS, FIND_WITH_DEF [1], FIND_WITH_DEF [2], FIND_WITH_DEF [3], FXREAD [1]
	FXREAD [2], GET_NIMCP, GET_TILTCAL, GET_VDS_SLITPOS, NIMCP_DEPTH_FUNCT, NTRIM, POLY
	REVERSE, SAFE_EXP, STR_SEP, UTC2TAI
 CALLED BY:
	VDS_CALIB
 Common      :	None.

 Restrictions:	Should only be called from VDS_CALIB.

 Side effects:	None.

 Category    :	Calibration, VDS, Intensity.

 Prev. Hist. :	Previously done within VDS_CALIB

 Written     :	William Thompson, GSFC, 4 Jan 1999

 Modified    :	Version 1, 04-Jan-1999, William Thompson, GSFC
		Version 2, 30-Sep-1999, William Thompson, GSFC
			Fixed bug where post-recovery burnin was vignetted.
			Changed way that pre-recovery SLIT6 effect is
			estimated.  Added keyword NOPRESLIT6.
			Provide error messages if needed files not found.
		Version 3, 12-Jan-2000, William Thompson, GSFC
			Use broadened Gaussians when NIMCP.POST=2
		Version 4, 20-Jul-2000, William Thompson, GSFC
			Support additional SLIT6 pre-accident calibration files
			beyond version 1.  For versions 2 and beyond, multiply
			by 0.813822, as with the narrow slit burn-ins.
		Version 5, 29-Aug-2000, William Thompson, GSFC
			Apply SLIT6 post-recovery burn-in corrections.
			Make /SLIT6 the default.
		Version 6, 30-Apr-2002, William Thompson, GSFC
			Include break point for slit6 use in post-recovery
			period.  Use latest defaults.
		Version 7, 21-Aug-2003, William Thompson, GSFC
			Support additional post-recovery function

 Version     : Version 7, 21-Aug-2003


VDS_BURNIN_ORIG $SSW/soho/cds/idl/sci/cal/vds/inten/vds_burnin_orig.pro
[Previous] [Next]
 Project     :	SOHO - CDS

 Name        :	VDS_BURNIN_ORIG

 Purpose     :	Adds burn-in to flat field for pre-accident VDS images.

 Explanation :	Called from VDS_CALIB to modify the flat field to include the
		burn-in effects for VDS data taken prior to the loss of contact
		with SOHO on 25 June 1998.

 Use         :	VDS_BURNIN_ORIG, DATA, FLAT

 Inputs      :	DATA	= Structure variable as read by READCDSFITS.

		FLAT	= Flat field data from VDS_CALIB.

 Opt. Inputs :	None.

 Outputs     :	FLAT	= The modified flat field.

 Opt. Outputs:	None.

 Keywords    :	NOBURNIN = If set, then the burn-in correction is not applied.
			   This is mainly used when analyzing the burn-in
			   characteristics in AN_NIMCP.

		SLIT6  = If set, then an adjustment is made for the estimated
			 burn-in effect of the use of 90 arcsecond wide "movie"
			 slit.  This correction is based on an analysis of the
			 average behavior of the 584 line as seen in the daily
			 synoptic images.  The amount of exposure elsewhere is
			 assumed to be proportional to an average slit 6
			 quiet-sun profile.

			 Note that the use of the /SLIT6 keyword is unrelated
			 to whether or not the current observation uses slit 6.
			 Instead, it is intended to correct, as best as
			 possible, for the cummulative effect that slit 6 has
			 on the detector over time.

			 As of 21 September 1999, the default is for SLIT6 to
			 be set.  To not apply this correction, use SLIT6=0.

		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 = ''
				VDS_CALIB, ERRMSG=ERRMSG, ...
				IF ERRMSG NE '' THEN ...

               FLIGHT = Use Sep 1997 flight flatfield for OV, HeI and MgIX

 Calls       : ***
	FIND_WITH_DEF [1], FIND_WITH_DEF [2], FIND_WITH_DEF [3], FXREAD [1], FXREAD [2]
	GET_NIMCP, GET_TILTCAL, GET_VDS_SLITPOS, NTRIM, POLY, SAFE_EXP, STR_SEP, UTC2TAI
 CALLED BY:
	VDS_CALIB
 Common      :	None.

 Restrictions:	Should only be called from VDS_CALIB.

 Side effects:	None.

 Category    :	Calibration, VDS, Intensity.

 Prev. Hist. :	Previously done within VDS_CALIB

 Written     :	William Thompson, GSFC, 4 Jan 1999

 Modified    :	Version 1, 04-Jan-1999, William Thompson, GSFC
		Version 2, 26-Jan-1999, William Thompson, GSFC
			Fixed bug where UNIT was undefined
		Version 3, 11-Feb-1999, William Thompson, GSFC
			Call FREE_LUN instead of CLOSE
		Version 4, 27-Sep-1999, William Thompson, GSFC
			Changed way that /SLIT6 feature is implemented.
			Made /SLIT6 the default.
			Provide error messages if needed files not found.
		Version 5, 20-Jul-2000, William Thompson, GSFC
			Support additional SLIT6 calibration files beyond
			version 1.

 Version     : Version 5, 20-Jul-2000


VDS_CALIB $SSW/soho/cds/idl/sci/cal/vds/inten/vds_calib.pro
[Previous] [Next]
 Project     :	SOHO - CDS

 Name        :	VDS_CALIB

 Purpose     :	Applies calibration factors to VDS images.

 Explanation :	This procedure takes VDS images read with READCDSFITS and
		applies the appropriate calibration factors.  If a correction
		for the CCD bias as a function of readout quadrant has no
		already been applied, then VDS_DEBIAS will be called.  First
		the images are divided by the appropriate parts of the flat
		field image.  The exposure time is corrected and divided into
		the data.  If necessary, a nonlinear correction term is
		applied.  Finally, the VDS throughput is divided into the data
		to convert from ADC to photon-events.

 Use         :	VDS_CALIB, DATA  [, PROGVOL  [, MODE ]]

 Inputs      :	DATA	= Structure variable as read by READCDSFITS.

 Opt. Inputs :	PROGVOL	= The programmable voltage setting controlling the
			  voltage across the MCP.  Allowed values are 0-255.
			  If not passed, then taken from DATA.HEADER.VDS_PMCP.

		MODE	= The VDS readout mode.  Allowed values are 1-7.  If
			  not passed, then taken from DATA.HEADER.VDS_MODE

 Outputs     :	DATA	= The calibrated data will be returned as a new
			  structure variable with the same format as the input.
			  The units of the calibrated data will be
			  photon-events/pixel/sec.

 Opt. Outputs:	None.

 Keywords    :	NOBURNIN = If set, then the burn-in correction is not applied.
			   This is mainly used when analyzing the burn-in
			   characteristics in AN_NIMCP.

		NOPRESLIT6 = If set, then the burnin from the use of slit 6
			   prior to the accident is not removed from the data.
			   Only valid for post-recovery data.  This is mainly
			   used for analyzing the burn-in characteristics.

		EXPTIME_CORR = Returns the corrected exposure time used.

		THROUGHPUT   = Returns the VDS throughput used.

		SLIT6  = If set, then an adjustment is made for the estimated
			 burn-in effect of the use of 90 arcsecond wide "movie"
			 slit.  This correction is based on an analysis of the
			 average behavior of the 584 line as seen in the daily
			 synoptic images.  The amount of exposure elsewhere is
			 assumed to be proportional to an average slit 6
			 quiet-sun profile.

			 Note that the use of the /SLIT6 keyword is unrelated
			 to whether or not the current observation uses slit 6.
			 Instead, it is intended to correct, as best as
			 possible, for the cummulative effect that slit 6 has
			 on the detector over time.

			 As of 21 September 1999, the default is for SLIT6 to
			 be set for pre-accident data.  To not apply this
			 correction, use SLIT6=0.

			 As of 29 August 2000, the default is for SLIT6 to
			 be set for post-recovery data.  To not apply this
			 correction, use SLIT6=0.

		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 = ''
				VDS_CALIB, ERRMSG=ERRMSG, ...
				IF ERRMSG NE '' THEN ...

               NOFLAT = Do not apply the flat field (or burn-in) correction (see
                        also the NOBURNIN keyword).

 Calls       : ***
	ANYTIM2UTC [1], ANYTIM2UTC [2], DATATYPE [1], DATATYPE [2], DATATYPE [3], DETDATA
	DETDESC, FIND_WITH_DEF [1], FIND_WITH_DEF [2], FIND_WITH_DEF [3], FXREAD [1]
	FXREAD [2], REARRANGE, REVERSE, ST_WINDATA, VDS_BURNIN_NEW, VDS_BURNIN_ORIG
	VDS_DEBIAS, VDS_READ_FLAT
 CALLED BY:
	AN_NIMCP, AN_NIMCP_AVG, BP_SEEK_POS, CDS_ENG_N4_AN, FIT_CDS_MAP, GT_CDS_QL
	MK_CDS_ANALYSIS, MK_CDS_FITS, MK_CDS_GIF, MK_CDS_MAP, MK_SYNOPTIC, NIS_CALIB
	NIS_ROTATE, dsp_menu
 Common      :	None.

 Restrictions:	Before this procedure can be used, a correction for the readout
		bias in the four quadrants of the CCD--which may also include
		a scattered light component--must be applied.  If not already
		done, then this routine will attempt to use the automatic
		facility of VDS_DEBIAS.

 Side effects:	None.

 Category    :	Calibration, VDS, Intensity.

 Prev. Hist. :	None.

 Written     :	William Thompson, GSFC, 17 February 1994.

 Modified    :	Version 1, William Thompson, GSFC, 17 February 1994.
		Version 2, William Thompson, GSFC, 2 March 1994.
			Changed to use XY instead of YZ coordinate system.
		Version 3, William Thompson, GSFC, 19 October 1995
			Brought up to date with current FITS format
		Version 4, William Thompson, GSFC, 26 October 1995
			Make sure that DETDATA has the right dimensions.
		Version 5, William Thompson, GSFC, 28 December 1995
			Make PROGVOL an optional input parameter. 
		Version 6, William Thompson, GSFC, 7 February 1996
			Keep track of missing pixels, and change the missing
			pixels flag.
		Version 7, William Thompson, GSFC, 29 February 1996
			Check to make sure that VDS_DEBIAS has been called
			first, and that this routine has not already been
			called.  Add ERRMSG keyword.
		Version 8, William Thompson, GSFC, 3 April 1996
			Don't reverse calibration images in Y direction.
		Version 9, William Thompson, GSFC, 6 May 1996
			Take readout mode into account in calibration.  Added
			optional parameter MODE.
		Version 10, William Thompson, GSFC, 8 August 1996
			Rewrote to process windows one-by-one.  Will make it
			easier when QL structure is changed.
		Version 11, S.V.H. Haugan, UiO, 9 August 1996
		        Windows stored with st_windata, QL data storage system
                       should be transparent. No references to ixstart/stop.
               Version 12, S.V.H. Haugan, UiO, 12 August 1996
                       A reference to ixstop is actually needed to determine
                       whether data window has been read by readcdsfits.
		Version 13, William Thompson, GSFC, 12 September 1996
			Added call to GET_NIMCP.  Temporarily disabled flat
			field.
		Version 14, William Thompson, GSFC, 16 October 1996
			Reinstated vertical reversal of flat field and
			nonlinear images.  Reenabled flat field correction.
		Version 15, William Thompson, GSFC, 28 October 1996
			Don't stop if data has already been calibrated.
		Version 16, William Thompson, GSFC, 13 December 1996
			Also correct for small offset in every fourth pixel in
			the top half of the CCD.

			*** NOTE:  Only tested for readout mode 2. ***

		Version 17, William Thompson, GSFC, 25 February 1997
			Added keyword NOBURNIN
		Version 18, 13-Jun-1997, William Thompson, GSFC
			Call SAFE_EXP.
		Version 19, William Thompson, GSFC, 4 August 1997
			Change units of all windows
		Version 20, GDZ, UCLAN 28 October 1997 
			Added the outputs  EXPTIME_CORR,THROUGHPUT
               Version 21, CDP, Added in flight OV, HeI, MgIX flatfield.  18-Nov-97
		Version 22, 14-Jan-1998, William Thompson, GSFC
			Include tilt in burn-in calculation
		Version 23, 04-Feb-1998, William Thompson, GSFC
			Fixed bug involving non-linear correction with binning.
		Version 24, 23-Apr-1998, William Thompson, GSFC
			Fixed bug involving multiple NIMCP entries for the same
			line.
		Version 25, 04-May-1998, William Thompson, GSFC
			Added keyword SLIT6
		Version 26, 02-Jun-1998, William Thompson, GSFC
			Use SHAPE parameter from GET_NIMCP.
		Version 27, 7-Jul-1998, Zarro (SAC/GSFC)
			Fixed name conflict with variable AVG and
                       Astronomy routine of same name.
		Version 28, 04-Jan-1999, William Thompson, GSFC
			Call VDS_BURNIN_ORIG or VDS_BURNIN_NEW depending on
			observation date.
		Version 29, 15-Jan-1999, William Thompson, GSFC
			Read alternate flat-field and non-linearity images for
			post-recovery data.
		Version 30, 24-Sep-1999, William Thompson, GSFC
			Provide error message if alternate non-linearity file
			not found.  Added keyword NOPRESLIT6.
		Version 31, 04-Jan-2000, William Thompson, GSFC
			Fixed bug in correction for small offset in every
			fourth pixel when vertical binning is used.
               Version 32, 16-May-2001, CDP, RAL
                       Removed /FLIGHT keyword and added /NOFLAT.
		Version 33, 27-Sep-2002, William Thompson, GSFC
			Use FIND_WITH_DEF instead of CONCAT_DIR
               Version 34, 8-Apr-2005, William Thompson
                       Fix erroneous application of non-linearity correction.

 Version     : Version 34, 8-Apr-2005


VDS_DEBIAS $SSW/soho/cds/idl/sci/cal/vds/inten/vds_debias.pro
[Previous] [Next]
 Project     :	SOHO - CDS

 Name        :	VDS_DEBIAS

 Purpose     :	Removes CCD biases from VDS images.

 Explanation :	This procedure takes VDS images read with READCDSFITS and
		removes the CCD bias--which may also include a scattered light
		component--as a function of readout quadrant.  The resulting
		output can then be used with VDS_CALIB.

 Use         :	VDS_DEBIAS, DATA  [, BIASES ]

 Inputs      :	DATA	= Structure variable as read by READCDSFITS.

 Opt. Inputs :	BIASES	= Array containing the CCD biases for the quadrants

			     Index	Quadrant

				0	A - Upper left
				1	B - Upper right
				2	C - Lower left
				3	D - Lower right

			  It can also be an array of (N_EXP,4) elements.

 Outputs     :	DATA	= The calibrated data will be returned as a new
			  structure variable with the same format as the input.

 Opt. Outputs:	None.

 Keywords    :	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 = ''
				VDS_DEBIAS, ERRMSG=ERRMSG, ...
				IF ERRMSG NE '' THEN ...

 Calls       : ***
	AVERAGE, DATATYPE [1], DATATYPE [2], DATATYPE [3], DETDATA, DETDESC, REARRANGE
	REP_TAG_VALUE, ST_WINDATA, TAG_EXIST [1], TAG_EXIST [2], TRIM
 CALLED BY:
	AN_NIMCP, AN_NIMCP_1_2, AN_NIMCP_AVG, APPLY_CDS_ADEF, BP_SEEK_POS, CDS_CLEAN_EXP
	CDS_CLEAN_SPIKE, CDS_ENG_N4_AN, CDS_MOSAIC, CDS_NEW_SPIKE, MK_CDS_ANALYSIS
	MK_SYNOPTIC, VDS_CALIB, XCDS_COSMIC, dsp_menu
 Common      :	None.

 Restrictions:	None.

 Side effects:	None.

 Category    :	Calibration, VDS, Intensity.

 Prev. Hist. :	None.

 Written     :	William Thompson, GSFC, 3 March 1994.

 Modified    :	Version 1, William Thompson, GSFC, 3 March 1994.
		Version 2, William Thompson, GSFC, 19 October 1995
			Brought up to date with current FITS format
		Version 3, William Thompson, GSFC, 26 October 1995
			Allow BIASES to vary with exposure.
			Make sure that DETDATA has the right dimensions.
		Version 4, William Thompson, GSFC, 14 November 1995
			Make BIASES an optional parameter.  Take from DATA
			structure if not supplied.
		Version 5, William Thompson, GSFC, 28 December 1995
			Change units to "DEBIASED-ADC"
		Version 6, William Thompson, GSFC, 7 February 1996
			Correct bug when windows go across quadrant boundaries.
			Keep track of missing pixels, and change the missing
			pixels flag.
		Version 7, William Thompson, GSFC, 13 February 1996
			Correct bug with multiple exposures.
		Version 8, William Thompson, GSFC, 29 February 1996
			Check to make sure that this routine has not already
			been called.
			Add ERRMSG keyword.
		Version 9, William Thompson, GSFC, 6 May 1996
			Average together biases if not in quadrature readout
			mode.
		Version 10, William Thompson, GSFC, 8 August 1996
			Rewrote to process windows one-by-one.  Will make it
			easier when QL structure is changed.
               Version 11, S.V.H. Haugan, UiO, 9 August 1996
                       Windows stored with st_windata, QL data storage system
                       should be transparent. No references to ixstart/stop.
               Version 12, S.V.H. Haugan, UiO, 12 August 1996
                       A reference to ixstop is actually needed to determine
                       whether data window has been read by readcdsfits.
		Version 13, William Thompson, GSFC, 28 October 1996
			Don't stop if data has already been debiased.
		Version 14, Zarro, GSFC, 28 March 1997
			Fixed bug in BIASES size check
		Version 15, William Thompson, GSFC, 4 August 1997
			Change units of all windows

 Version     : Version 15, 4 August 1997


VDS_DUMMY $SSW/soho/cds/idl/sci/plan/tech/vds_dummy.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : VDS_DUMMY
               
 Purpose     : Produce dummy VDS data in the form of a (1024,256) array.
               
 Explanation : Takes past solar EUV data, folds in CDS performance
               and solar parameters to mimic 1024x256 portion of
               VDS image. Includes -
                    (i)    solar lines in correct location on image
                    (ii)   intensities calculated from past data
                           folding in CDS efficiencies
                    (iii)  effects of telescope point spread function (3" FWHM)
                    (iv)   variable slit use
                    (v)    several window options
                    (vi)   dummy solar structure along slit
                    (vii)  background intensities
                    (viii) statistical noise
                    (ix)   Doppler shifted ``events''

               Neglects pixel sampling effects (assumed small) and
               grating scatter (assumed small w.r.t. slit image
               spread).

               If requested, the output array is written to a disk file
               with an unformatted write.  In order to retrieve the data
               use the following commands:
               IDL> a = intarr(1024,256)
               IDL> openr,lun,filename,/get_lun
               IDL> readu,lun,a
               IDL> free_lun,lun
          
 Use         : IDL> vds_dummy [,slit=slit,expose=expose etc.]
               IDL> vds_dummy, slit=4,expose=10,wlist=1,file='vds1.dat',
                               image=vds1
               would return the image in variable vds1 and store in a file
               called vds1.dat

 Inputs      : Slit width, Accumulation time and Window option
               are prompted for if not supplied as keyword parameters.
               
 Opt. Inputs : None
               
 Outputs     : None
               
 Opt. Outputs: See Image keyword
               
 Keywords    : Slit         The slit size (2,4,8 or 90 arcsec).
               Expose       The exposure time in seconds.
               Wlist        The line list reference number.
               Win_width    Individual line window width in pixels.
               Image        Name of data array returned.
               File         Name of data file created (default image.dat).
               No_file      Inhibit saving of data on disk.
               Zone         Defines type of source model.  The only line
                            intensity data available at present are for
                            QUIET regions (zone=4) and ACTIVE regions (zone=5)

 Calls       : ***
	CONCAT_DIR [1], CONCAT_DIR [2], CONCAT_DIR [3], PIX2WAVE, concat_dir [4]
 CALLED BY:
	TP_GET_DUMDATA
 Restrictions: 1025 blocks required for output file if any.
               Requires solar data in files ni1.dat, ni2.dat and
               pixel address information in pixels.dat
               
 Side effects: None
               
 Category    : Planning, VDS, Model
               
 Prev. Hist. : None

 Written     : R A Harrison, RAL, March 1993
               
 Modified    : Version 2, William Thompson, GSFC, 17 May 1993.
                     Corrected algorithm used for spectral dispersion.
                     Added dispersion within VDS detector.
		Version 3, William Thompson, GSFC, 22 September 1993.
			Fixed typo in dispersion calculation.

               Version 4, CDP, Update format of data files to handle 6 zones.
                                       27-March-95
               Version 5, CDP, Manual input of zone if not on command line
                                       22-Aug-95
               Version 6, trap invalid ZONE IDs. CDP, 27-Nov-95

               Version 7, Now includes the O IV 629 A line P.B., 18-Feb-96

               Version 8, Fix bug in manual zone ID input. CDP, 20-Feb-96

               Version 9, Bump up (down?) spectral resolution to match
                          reality.  CDP, 27-Apr-96
  
 Version     : Version 9, 7 April 1996 


VDS_READ_FLAT $SSW/soho/cds/idl/sci/cal/vds/inten/vds_read_flat.pro
[Previous] [Next]
 Project     :	SOHO - CDS

 Name        :	VDS_READ_FLAT

 Purpose     :	Reads VDS flat field images.

 Category    :	Class4, CDS, Calibration

 Explanation :	The VDS flat field images were generated using readout mode 1
		(quadrature).  Each quadrant has a slightly different
		amplification level, due to differences in the four amplifier
		circuits.  When using one of the other VDS readout modes, this
		difference must be removed.

		Called from VDS_CALIB.

 Syntax      :	VDS_READ_FLAT, FLAT, VOLTAGE, MODE  [, DATE]

 CALLED BY:
	VDS_CALIB
 Examples    :	VDS_READ_FLAT, FLAT, 756, 2

 Inputs      :	VOLTAGE	= Voltage value of the flat field image.  Must be one
			  of the following: 600, 678, 756, 834, 912, 990.

		MODE	= VDS readout mode.  Must be an integer from 1 to 7.

 Opt. Inputs :	DATE	= Date/time of the observation.

 Outputs     :	FLAT	= Flat field image, modified by the readout mode.

 Opt. Outputs:	None.

 Keywords    :	None.

 Calls       : ***
	ANYTIM2UTC [1], ANYTIM2UTC [2], FIND_WITH_DEF [1], FIND_WITH_DEF [2]
	FIND_WITH_DEF [3], FXREAD [1], FXREAD [2], TRIM
 Common      :	None.

 Restrictions:	None.

 Side effects:	None.

 Prev. Hist. :	None.

 History     :	Version 1, 06-May-1996, William Thompson, GSFC
		Version 2, 15-Jan-1999, William Thompson, GSFC
			Added parameter DATE, to allow selection between flat
			fields for before and after the accident.
		Version 3, 21-Sep-1999, William Thompson, GSFC
			Provide error message if alternate flat field file not
			found.
		Version 4, 27-Sep-2002, William Thompson, GSFC
			Use FIND_WITH_DEF instead of CONCAT_DIR

 Contact     :	WTHOMPSON


VDS_ROTATE $SSW/soho/cds/idl/sci/cal/vds/inten/vds_rotate.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : VDS_ROTATE
               
 Purpose     : Corrects full NIS spectral extraction array for rotation
               
 Explanation : The dispersion axes of the NIS spectra are slanted relative
               to the CCD detector (x,y) axes.  The track of constant
               solar Y is therefore not at a constant data array Y value.
               Under some circumstances it may be appropriate to deslant the
               raw data array to align solay Y with detector Y.  This
               routine does that.  Beware of the associated changes in 
               intensity.
               
 Use         : IDL> vds_rotate, in, out, band [+keywords]

		IDL> vds_rotate, in, out, 2, /cubic, miss=-100, vel=0.0045
    
 Inputs      : IN   - input array.  Can be full spectrum or spectral 
                      extraction window.  If it is 3-d then the middle
		       dimension is assumed to be the X-scan

               BAND - spectral band (1 or 2). Needed since slants are 
                      different for NIS1 and NIS2
               
 Opt. Inputs : None
               
 Outputs     : OUT - rectified array.
               
 Opt. Outputs: None
               
 Keywords    : BILINEAR = Allows bilinear interpolation during rectification

               CUBIC    = Allows cubic interpolation during rectification
                          (NOTE both of these change the intensity values.
                           The default is to use nearest neighbour values.)

               VEL_TILT = As well as the slant of the dispersion axis, the
			   spectral lines are tilted at an angle to the
			   dispersion direction.  Give a value here if you wish
			   to correct this tilt as well.  Note the units are
			   (spectral bins per pixel along the slit).  Note also
			   that this value may change with wavelength and
			   spectral band although the value for the OV 629 A
			   line is well determined to be 0.0045.  It should
			   also be noted that values of this size have no
			   effect upon the array unless one of the
			   interpolation methods (BILINEAR or CUBIC) is used.

			   One can also pass VEL_TILT as a series of
			   coefficients to a polynomial which expresses the
			   tilt as a function of pixel position within the
			   window.  GET_TILTCAL can be used to extract the
			   proper polynomial coefficients, but only for the
			   full spectral readout case.  Thus, this option is
			   only recommended for full spectral readouts.  For
			   some reason, passing polynomial coefficients seems
			   to work best with /BILINEAR rather than /CUBIC.

		BOTTOM	 = If set, then the data is aligned so that the bottom
			   of the slit is aligned with the bottom of the array.
			   Ignored unless the data contains a full spectral
			   readout.

		MISSING	 = The value used to flag missing pixels.

		BINY	 = The binning factor in Y.  Used to adjust the tilt
			   and slant values.  Only needed for data with
			   compression mode 8 (e.g. USUN_6).

		MIRROR_SHIFT = An array containing the amount of pixels to
			   shift the spectrum for each X position, to account
			   for the scan mirror.

		XYOFFSETS = Offsets in the X and Y spatial directions.  This
			    keyword is used to support the ALIGN keyword in
			    NIS_ROTATE.

 Calls       : ***
	FIND_WITH_DEF [1], FIND_WITH_DEF [2], FIND_WITH_DEF [3], GET_UTC
	GET_VDS_SLITPOS, NTRIM
 CALLED BY:
	GET_AVGSPEC, NIS_ROTATE
 Common      : None
               
 Restrictions: None
               
 Side effects: None
               
 Category    : Data analysis
               
 Prev. Hist. : None

 Written     : C D Pike, RAL, 29-Jul-96
               
 Modified    : Handle smaller windowed data.  CDP, 9-Sep-96
               Handle 3-d data input. CDP, 16-Sep-96
		Version 4, 18-Oct-1996, William Thompson, GSFC
			Added keyword MISSING
			Deslant all data, including data windows.
			Calculate KX and KY analytically, instead of using
				POLYWARP.
			Fixed typo involving BILINEAR keyword.
		Version 5, 21-Oct-1996, William Thompson, GSFC
			Take into account that full NIS2 data is padded by
			READCDSFITS.
			Modify default slant for NIS2.
			Semi-automatic missing pixel recognition.
			Improve nearest-neighbor behavior.
		Version 6, 02-May-1997, William Thompson, GSFC
			Added keyword BOTTOM
			Corrected minor bug where wrong Y0 used for full NIS1
			data.
		Version 7, 13-Jan-1998, William Thompson, GSFC
			Added option for VEL_TILT to be polynomial
			coefficients.
		Version 8, 22-Jun-1998, William Thompson, GSFC
			Fixed bug involving time-series data.
		Version 9, 23-Sep-1998
			Fixed bug where some pixels would be erroneously marked
			as missing in full-spectrum NIS-2 data, when the input
			and output arrays are the same.
		Version 10, 29-Sep-1999
			Fixed bug where the bottom-most row would be
			unaffected.  Added keywords BINY, MIRROR_SHIFT.
			Fixed bug of wrong pivot point for 4D arrays.
		Version 11, 30-Aug-2000, William Thompson, GSFC
			Added keyword XYOFFSETS
		Version 12, 14-Sep-2000, William Thompson, GSFC
			Fixed bug in Version 11 that interfered with
			MIRROR_SHIFT keyword.

 Version     : Version 12, 14-Sep-2000


video_blink [1] $SSW/soho/mdi/idl_old/gen/ys_util/video_blink.pro
[Previous] [Next]
NAME:
	video_blink
PURPOSE:
	To blink between two video images
SAMPLE CALLING SEQUENCE:
	video_blink, st_frame, nrep, wait_sec
	video_blink, 19482, 50, .1
INPUT:
	st_frame- The starting frame number
	nrep	- The number of repeats
	wait_sec- The wait between frames in seconds
 CALLS: ***
	sonyloop [1], sonyloop [2]
HISTORY:
	Written 23-Jun-93 by M.Morrison


view_image $SSW/soho/mdi/idl/cal/view_image.pro
[Previous] [Next]
NAME:
	view_image
PURPOSE:
	Rough method to display an image
SAMPLE CALLING SEQUENCE:
	.run view_image
METHOD:
	The program reads images from the 160k decom file or from fits
	files or from F0 files.
HISTORY:
	Written 11-Mar-94 by M.Morrison (using SHOWDATA as starting point)
	 9-Jun-94 (MDM) - Modified to handle stanford FITS files.
	10-Jun-94 (MDM) - Set STEPPER_BREAK
	28-Jun-94 (MDM) - Modified to work at Stanford for raw telem files


VIEW_PHA $SSW/soho/cds/idl/sci/cal/gis/view_pha.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : VIEW_PHA.PRO
               
 Purpose     : To plot PHA data collected with raw data 
               
 Explanation : Tool to allow the user to analyse GIS raw data.

 Use         : IDL> view_pha [,file=file]
		If 'file' contains a '*' it is used as a filter for the filename
    
 Inputs      : File name *.pha

 Opt. Inputs : filename *.pha
               
 Outputs     : Plots of PHA histograms with LLD and ULD shown
               
 Opt. Outputs: None
               
 Keywords    : file

 Calls       : ***
	GIS_RAW_HEADER, PICKFILE, PS [1], PS [2], PSPLOT [1], PSPLOT [2]
 Common      : None
               
 Restrictions: None
               
 Side effects: !
               
 Category    : GIS, science data
               
 Prev. Hist. : None

 Written     : A Breeveld, MSSL/UCL, 1994
            
 Modified    : A. Breeveld, MSSL/UCL, 16 Feb 1996
			Made into a routine, and tidied up a little
			AAB added keyword for file
		ERB MSSL/UCL 17 April 1996
			Read and translated header information
		ERB MSSL/UCL 20 April 1996
			Added file filter processing
		ERB MSSL/UCL 24 July 1998
			Added getenv call to pickfile
		ERB MSSL/UCL 30 September 1999
			output to 3 plot windows, added hardcopy and
			smoothsize switches

 Version     : 2.6


VIEW_RAW $SSW/soho/cds/idl/sci/cal/gis/view_raw.pro
[Previous] [Next]
 Project     : SOHO - CDS     
                   
 Name        : VIEW_RAW.PRO
               
 Purpose     : To plot and check raw GIS data and fit LUT parameters
               

 Explanation : Tool to allow the user to analyse GIS raw data and to 
               create GIS LUT parameters.  These parameters are required
               by the on board software to process GIS spectral data.

 Use         : IDL> view_raw [, file=rawfile, params=LUT_params, $
				raw_id=raw_id, sumplot, gset_id=gset_id]
    
 Inputs      : None.

 Opt. Inputs : none

 Outputs     : LUT_params.txt file with the fitted parameters
               
 Opt. Outputs: sumplot		= a 2-D histogram array of the spiral plot;
			no further processing performed, and procedure exits.
               
 Keywords    : file 		= name of raw GIS data file
		params		= original LUT params (as an array)
		raw_id		= raw file ID (use instead of filename)
		gset_id		= use parameters from this GSET ID

 Calls       : ***
	ARROW, CONGRID [1], CONGRID [2], CONGRID [3], GET_GSET, GET_RAW, GIS_RAW_HEADER
	HIST_2D, LOADCT, PICKFILE, TRIM, VRAW_CALCGAINS, VRAW_CHGAIN, VRAW_CHK, VRAW_CHPERCENT
	VRAW_CHSTART, VRAW_DATAIN, VRAW_INTPREP, VRAW_PARAMIN, VRAW_PARAMOUT, VRAW_PDLINES
	VRAW_PDRTH, VRAW_PLINES, VRAW_PPERCENT, VRAW_PRAW, VRAW_PRTH, VRAW_PRTHCON
	VRAW_PRTHINT, VRAW_PXY, VRAW_REJECT, XLOADCT [1], XLOADCT [2], XLOADCT [3]
	ssw_strsplit
 Common      : VIEW_RAW_MYLUT containing LUT parameter structure for mylut 
				to use:
		lut_str 	=  structure LUT_str containing LUT parameters
               
 Restrictions: None
               
 Side effects: !
               
 Category    : GIS, science data
               
 Prev. Hist. : None

 Written     : A Breeveld, MSSL/UCL, 1994
            
 Modified    : v1.0 ERB, MSSL/UCL, 29 January 1995, Made into a routine, 
			and tidied up a little
		     AAB added routine to write in gset LUTs and check them, 
			March '96
		     AAB added optional output of LUT params in structure
		    	March '96
		     ERB, MSSL/UCL, added file filter option, 24 April 1996
		     ERB, MSSL/UCL, added xloadct option, 3 June 1996
		     ERB, MSSL.UCL, added getenv to pickfile
		v3.5 ERB, MSSL/UCL, 28 Sep 99, added /block to xloadct calls
		v4   erb, MSSL/UCL, 19 Oct 99, use raw ids and GSET ids
		v4.1 erb, MSSL/UCL, 11 Jan 2000, released
		Version 5, 09-May-2003, William Thompson, GSFC
			Use ssw_strsplit instead of strsplit

 Version     : Version 5, 09-May-2003


viewlist $SSW/soho/lasco/idl/movie/viewlist.pro
[Previous] [Next]
pro viewlist, list, minv, maxv, DELAY=delay, LOOP=loop, PAN=pan, HALT=halt, $
    RDIFF=rdiff, DIFF=diff, SHOW_KEYWORD=show_keyword, HISTEQUAL=histequal, $
    MAXMIN=maxmin

 View a list of image files, loading 1 at a time.

 INPUT:
  list		STRARR, list of files

 OPTIONAL INPUT:
  minv     min scale value
  maxv     max scale value

 KEYWORDS:
  DELAY	Set to number of seconds between frames
  LOOP		Repeat display of sequence; if =1, then indefinitely
  PAN		rebin/congrid by a factor or fraction
  HALT		advance images with '.cont' at command line
  RDIFF    	Running difference images
  DIFF=n     	Difference with the nth image in list (first is default)
  SHOW_KEYWORD Print value of given FITS keyword before displaying each image
  HISTEQUAL	Display with histogram equalization
  MAXMIN   	Print image statistics

 Written 11Jul2002 by N. Rich, NRL/Interferometrics

 04.01.21, nbr - Add PAN
 04.03.25, nbr - Add Halt
 04.10.18, nbr - add diff and rdiff

 @(#)viewlist.pro	1.3 10/13/06 LASCO NRL IDL Library

 CALLS:


vignettage [1] $SSW/soho/lasco/idl/las-c2/vignettage.pro
[Previous] [Next]

function 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

 CALLS:
 CALLED BY
	crevig, lunuleR1R2d


vignettage [2] $SSW/soho/lasco/idl/las-c2/vignettage.pro
[Previous] [Next]

pro crevig,ima_name,off_x,off_y

 CALLS:
 CALLED BY
	crevig, lunuleR1R2d


visu_cal $SSW/soho/lasco/idl/las-c2/calib5.pro
[Previous] [Next]
 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
 CALLED BY:
	ALIGN1, BUILD_FRAOE, REPLACIMA, STAT_CURSOR, WRITIMA, diafrai, dvpt_fra, gener_mask
	ipolarfra
 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


visu_cal_clean $SSW/soho/lasco/idl/las-c2/calib5.pro
[Previous] [Next]
 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


VISU_IMA $SSW/soho/lasco/idl/las-c2/calib5.pro
[Previous] [Next]
 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