e9hos $SMEI/user/pphick/idl/drivers/e9hos.pro
[Previous] [Next]
 NAME:
	e9hos
 CALLING SEQUENCE:
	function e9hos, filename
 INCLUDE:
	@compile_opt.pro	; On error, return to caller
 CALLS: ***
	CONV_VAX_UNIX, E9REV, FRECL, InitVar


EarthSky3DLoc $SMEI/ucsd/sat/idl/util/earthsky3dloc.pro
[Previous] [Next]
 NAME:
	EarthSky3DLoc
 PURPOSE:
	Returns the 3D positions for all segments along a collection of lines
	of sight. The lines of sight either form a grid for a 2D sky map, or
	are explicitly input.
 CATEGORY:
	sat/idl/util
 CALLING SEQUENCE:
	FUNCTION EarthSky3DLoc, UT  , $
	    cv2carrington=cv2carrington, $
	    nra 	= nra	    , $
	    nde 	= nde	    , $
	    nrr 	= nrr	    , $
	    drr 	= drr	    , $
	    equator	= equator   , $
	    degrees	= degrees   , $
	    ra		= ra	    , $
	    dec 	= dec	    , $
	    zero_point	= zero_point, $
	    zero_phase	= zero_phase, $
	    zero_shift	= zero_shift, $
	    rr_earth	= rr_earth  , $
	    ut_earth	= tt	    , $
	    pa_earth	= pa_earth  , $
	    elo_earth	= elo_earth , $
	    elo_sun	= elo_sun   , $
	    center	= center    , $
	    rr_los	= rr_los    , $`
	    _extra	= _extra
 INPUTS:
	UT	    scalar; type: standard time structure
		    time when skymap is required
 OPTIONAL INPUT PARAMETERS:
	/degrees    if set then all in- and ouput angles are in degrees
		    (default: radians)

	/equator    by default the lines of sight are specified in ecliptic coordinates
		    (i.e. in a skymap the horizontal plane is the ecliptic).
		    If /equator is set then equatorial coordinates are assumed (i.e.
		    in a skymap the horizontal plane is Earth's equator)

	/cv2carrington
		    NOTE: this only makes sense if keyword /to_heliographic is set !!

		    By default, the longitudinal (first) dimension in the output
		    R and rr_earth is a phase angle (longitude).
		    If heliographic coordinates are used then instead of an angle
		    a Carrington variable within 0.5 of the Carrington variable
		    corresponding to input time UT is returned.

	zero_shift=zero_shift
		scalar; type: float; default: 0.0
		    shifts the center of the sky grid. Instead of centering on the
		    Sun the grid is shifted to increasing RA or ecliptic longitude
		    by 'zero_shift'.
		    The units must be consistent with the setting of /degrees.

	nrr	scalar; type: int; default: 20
		    number of steps along lines of sight at each point in the sky
	drr	scalar; type: float; default: 0.1
		    step size along line of sight (AU)

	Lines of sight are specified as sidereal location in the sky (either
	RA/dec (/equator SET) or ecliptic longitude/latitude (/equator NOT set).

	If nRA and nDE are set to non-zero values then a grid of lines of sight
	covering the entire sky is created (see PROCEDURE):

	nra	scalar; type: int; default: 72
		    nr of points in skymap in longitudinal direction (either right
		    ascensions of ecliptic longitude)
		    If nra or nde is set to zero then ra and dec are used as input.
	nde	scalar; type: int; default: 36
		    nr of points in skymap in latitudinal direction (either declination
		    or ecliptic latitude)

	Alternatively, set the product nra*nde=0 and specify lines of sight explicitly
	through keywords ra,dec:

	ra[nLOS]
		scalar or array; right ascensions (/equator SET) or
		    ecliptic longitudes (/equator NOT set)
	dec[nLOS]
		scalar or array; declinations (/equator SET) or
		    ecliptic latitudes (/equator NOT set).

 OUTPUTS:
	Result	array[3,nra,nde,nrr]; type: double
		array[3,nlos,nrr]; type: float (if nra or nde is zero)
		    3D locations for all segments along all lines of sight. This is where
		    values need to obtained by interpolation on the 3D arrays.
		    The result is in spherical coordinates in the coordinates specified
		    as one of the /to_* keywords to CvSky.

		    R[0,*,*,*]: longitudes
				If /to_heliographic and /cv2carrington are SET then
				these are Carrington variables within 0.5 of Carrington(UT)
		    R[1,*,*,*]; latitudes
		    R[2,*,*,*]: heliocentric distances (AU)
 OPTIONAL OUTPUT PARAMETERS:
	Only if nra*nde not equal 0 on input:

	ra	array[nra]; type: float
		    right ascensions or ecliptic longitudes across sky
		    (with ra/longitude of Sun in center of array)
		    i.e. ra = (ra Sun at time UT) -pi+2*pi/nra*[0.5,1.5,...,nra-0.5]
	dec	array[nDE]; type: float
		    declination or ecliptic latitude across sky
		    (with decl/lat zero in center of array)
		    DE = -pi/2+pi/nDE*[0.5,1.5,...,nDE-0.5]

	Depending on setting of /equator, RA and DEC define a regular grid in
	equatorial or ecliptic sky coordinates for the centers of the boxes for the
	lines of sight used to build the skymap with the position of the Sun
	centered in the RA/longitudinal direction.

	zero_phase=zero_phase
		scalar; type: float
		    right ascension or ecliptic longitude of Sun (plus zero_shift)
		    if specified) at time UT, i.e. this is the value on which ra is centered
	zero_point=zero_point
		scalar; type: float
		    right ascension or ecliptic longitude of Sun (plus zero_shift)
		    at time UT (i.e. same as 'zero_phase'; should stay to ensure
		    that the values are consistent when fed e.g. to PlotEarthSkymap)
	rr_earth
		array[3]; type: float
		    heliocentric location Earth in heliographic coordinates
		    rr_earth[0]: longitude
				If /to_heliographic and /cv2carrington are SET then
				these is a Carrington variable within 0.5 of Carrington(UT)
		    rr_earth[1]; latitude
		    rr_earth[2]: heliocentric distance (AU)
	pa_earth=pa_earth
		array[nra,nde,nrr]; type: float
		    line of sight position angle measured counterclockwise
		    from ecliptic north
	elo_earth=elo_earth
		array[nra,nde,nrr]; type: float
		    line of sight elongations: angle (Sun-Earth-los segment)
	elo_sun=elo_sun
		array[nra,nde,nrr]; type: float
		    angle Earth-Sun-los segment
 INCLUDE:
	@compile_opt.pro			    ; On error, return to caller
 CALLED BY:
	GetColors [2], GetColors [3], PlotEarthSkymap [3], PlotEarthSkymap [4]
	haystack_2006, vu_coronagraph, vu_earthskymap, vu_elotime, vu_lineofsight
	vu_thomson_antifish, vu_thomson_hammer
 SEE ALSO:
	EarthTransit3DLoc, PlotEarthSkymap [1], PlotEarthSkymap [2]
	PlotEarthSkymap [3], PlotEarthSkymap [4]
 CALLS: ***
	AngleRange, Carrington, CvPointOnLos, CvSky, InitVar, SuperArray, SyncArgs, ToRadians
	big_eph, gridgen, jpl_body
 PROCEDURE:
 >	The sky map is build from nRA*nDE line of sight integrations through the
	F3D array. The locations in the sky of the lines of sight are
	    ra/Lng    = (ra/Lng Sun) -180 + (360./nra)*[0.5, 1.5, .. , nra-0.5 ]
	    Decl./Lat = - 90 + (180./nde)*[0.5, 1.5, .. , nde-0.5 ]
	    Dist along los = drr*[0.5,1.5,...,nrr-1]
	Note that each line of sight is centered on a 'box' of 360/nra by 180/nde
	degrees, and that all lines of sight together cover the entire sky.
 MODIFICATION HISTORY:
	AUG-1999, Paul Hick (UCSD/CASS)
	OCT-2004, Paul Hick (UCSD/CASS)
	    Added zero_shift keyword.
	APR-2006, Paul Hick (UCSD/CASS)
	    Added keyword /longitudes (the previous version always returned
	    heliographic longitudes). Add option to explictly specify lines of sight
	    in RA,DEC after setting nRA*nDE=0.
	FEB-2007, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
	    Replaced keyword /longitudes by keyword /cv2carrington
	    Added _extra keyword to be able to pass one of the /to_* keywords
	    to CvSky. This allows the return value to be in any one of the
	    coordinates supported by CvSky (instead of just heliographic coordinates)


EarthTransit3DLoc $SMEI/ucsd/sat/idl/util/earthtransit3dloc.pro
[Previous] [Next]
 NAME:
	EarthTransit3DLoc
 PURPOSE:
	Provides 3D heliographic coordinates for all lines of sight used for a 'transit sweep' across the sky
 CATEGORY:
	WWW: skymap
 CALLING SEQUENCE:
	FUNCTION EarthTransit3DLoc, UT, $
	    cv2carrington=cv2carrington, $
	    nra 	= nra	    , $
	    nde 	= nde	    , $
	    nrr 	= nrr	    , $
	    drr 	= drr	    , $
	    equator	= equator   , $
	    degrees	= degrees   , $
	    band	= band	    , $
	    solar	= solar     , $
	    geolng	= geolng    , $
	    ra		= ra	    , $
	    dec 	= dec	    , $
	    zero_phase	= zero_phase, $
	    zero_point	= zero_point, $
	    rr_earth	= rr_earth  , $
	    ut_earth	= ut_earth  , $
	    pa_earth	= pa_earth  , $
	    elo_earth	= elo_earth , $
	    elo_sun	= elo_sun   , $
	    _extra	= _extra
 INPUTS:
	UT	scalar; type: time structure
		    universal time, UT
		    (usually UT corresponding to local noon at geographic longitude 'geolng')
 OPTIONAL INPUT PARAMETERS:
	/degrees    if set then all in- and ouput angles are in degrees (default: radians)

	Four parameters define the grid used to calculate the sky map (see PROCEDURE)

	nra	scalar; type: int; default: 36
		    # points in skymap in longitudinal direction (either right ascensions
		    of ecliptic longitude). Note that nRA may be modified if keyword
		    band is used.
	nde	scalar; type: int; default: 18
		    # points in skymap in latitudinal direction(either declination or
		    ecliptic latitude)
	nrr	scalar; type: int; default: 20
		    # steps along lines of sight at each point in the sky
	drr	scalar; type: float; default: 0.1
		    step size along line of sight (AU)

	geolng=geolng
		scalar; type: any; default: 0
		    geographic longitude of observing location
	/equator
		by default the local meridian is set up as a strip of sky centered on the
		    intersection with the ecliptic. This results in a sweep with the Sun
		    centered, and the ecliptic along the horizontal axis (but see RESTRICTIONS).
		    If /equator is set then the strip of sky is centered on the equator, i.e.
		    the strip covers the local meridian from equatorial north to equatorial south.\
		    This is a more strict interpretation of the concept of a 'transit sweep', but
		    has the disadvantage that the Sun is not at the center of the sky map.
	band	scalar; type: float
		    Width of strip to be processed (in hours)
		    If band is not set then meridian strips covering 24 hours centered
		    around UT are selected. Use this keyword to extract only a partial strip
		    of sky covering less than 24 hour.
	/solar	by default the meridian strips are centered around the meridian strip at time UT.
		    Setting /solar rearranges the strips, putting the meridian strip at noon in
		    the center (see PROCEDURE)
	/cv2carrington
 OUTPUTS:
	R	array[3,nra,nde,nrr]; type: float
		    3D locations (in heliographic coordinates) where values need to obtained
		    by interpolation on the 3D arrays.
	nra	scalar; type: integer
		    if keyword band is set then nra is set to the number of meridians
		    inside the RA range of width 'band'.
 OPTIONAL OUTPUT PARAMETERS:
	ra	array[nra]; type: float
		    Right ascension for nra UT times covering 24 hours centered on UT
	dec	array[nde]; type: float
		    dec = -pi/2+pi/nde*[0.5,1.5,...,nde-0.5]
		    ra and dec define a regular grid in sky coordinates for the centers of
		    the boxes for the lines of sight used to sweep of the sky
	zero_point=zero_point
		scalar; type: float
		    /solar NOT set: RA angle for local meridian at 'geoloc' on time UT
		    /solar set	  : RA angle of Sun at time UT
	zero_phase=zero_phase
		/solar NOT set:
		    scalar, type: float
			RA angle for local meridian at 'geoloc' on time UT
			(i.e. same as zero_point)
		/solar set    :
		    array[nra]; type: float
			RA angles of Sun for nRA UT times covering 24 hours centered
			on UT (same times as used for output array RA).
			(i.e. 'zero_point' is approximately centered in 'zero_phase')
	pa_earth=pa_earth
		array[nra,nde,nrr]; type: float
		    line of sight position angle measured counterclockwise
		    from ecliptic north
	elo_earth=elo_earth
		array[nra,nde,nrr]; type: float
		    line of sight elongations: angle (Sun-Earth-los segment)
	elo_sun=elo_sun array[nra,nde,nrr]; type: float
		    angle (Earth-Sun-los segment)
	rr_earth=rr_earth
		array[3,nra]; type: float
		    heliocentric locations Earth in heliographic coordinates
 INCLUDE:
	@compile_opt.pro		; On error, return to caller
 CALLS: ***
	Carrington, CvPointOnLos, CvSky, InitVar, IsType, SuperArray, TimeGST, TimeOp, TimeSet
	TimeUnit, ToRadians, big_eph, gridgen, jpl_body
 CALLED BY:
	GetColors [2], GetColors [3], PlotEarthSkymap [3], PlotEarthSkymap [4]
	vu_earthskymap, vu_thomson_antifish, vu_thomson_hammer
 RESTRICTIONS:
	If /equator is NOT set then the ecliptic is put on the horizontal axis. This is
	done using a kludge. Each meridian strip (-90 to +90 degrees in declination with
	the equator in the center, is shifted vertically to put the ecliptic in the center.

	The sweep across the sky covers 24 hours in UT. Since UT is a solar time, the sweep covers
	a little more than 360 degree of sky. However, the RA array still covers exactly 360
	degrees (RA is passed to PlotEarthSkyMap to make a Hammer-Aitoff or fish-eye map).
 PROCEDURE:
 >	UT is used to set up an array of nRA equally spaced times covering UT-12h to UT+12h
	    TT = UT+((0.5+findgen(nra))/nra-0.5)*(24)
	(if 'band' is specified then only UT +/- band/2 is used).
 >	The geographic longitude, together with GST, is used to calculate the RA
	of the local meridian (hour angle zero) at times TT
 >	At each ra(TT) value nde equally spaced declinations are taken
	    dec = ((0.5+findgen(nde))/nde-0.5)*90
 >	The resulting strips along the local meridian patched together give
	a (partial) sweep of the sky. The return array RA is a monotonic increasing
	array inside [-180,+180].
 >	If /solar is NOT set then the return array zero_phase contains the right ascension
	of the local meridian at time UT.
	If /solar is set then the return array zero_phase contains the right ascension of
	the sun at the times centered on UT used also to calculate RA.
	The scalar 'zero_point'  and array 'zero_phase' are used to center the proper
	RA in a skymap by subtracting it from RA.
 >	The output array rr_earth gives the location of Earth at times TT
 MODIFICATION HISTORY:
	SEP-1999, Paul Hick (UCSD/CASS)
	FEB-2007, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
	    Replaced keyword /longitudes by keyword /cv2carrington
	    Added _extra keyword to be able to pass one of the /to_* keywords
	    to CvSky. This allows the return value to be in any one of the
	    coordinates supported by CvSky (instead of just heliographic coordinates)


eclipsed_area $SMEI/ucsd/gen/idl/toolbox/eclipsed_area.pro
[Previous] [Next]
 NAME:
	eclipsed_area
 PURPOSE:
	Calculates fraction of solar disk eclipsed by Moon or Earth
 CATEGORY:
	gen/idl/toolbox
 CALLING SEQUENCE:
	FUNCTION eclipsed_area, loc_sun, loc_em, $
	    degrees	= degrees   , $
	    elo 	= elo	    , $
	    ut		= ut	    , $
	    plotc	= plotc     , $
	    earth	= earth     , $
	    radius	= radius    , $
	    silent	= silent    , $
	    _extra	= _extra
 INPUTS:
	loc_sun 	array[3,n] or array[3,2,n]; type: float
			    if array[3,n]; location of Sun in spherical coordinates
				(RA,dec,distance, or long, lat, distance)
			    if array[3,2,n] then array[3,0,*] specifies the location
				of the Sun and array[3,1,*] specifies the location
				of the Moon or Earth. In this case loc_em is ignored.
	loc_em		array[3,n]; type: float
			    location of Earth or Moon in same coordinates as for the Sun.
 OPTIONAL INPUT PARAMETERS:
	/degrees	if set, all angles are in degrees (default: radians)
	/plotc		if set, then results are plotted
			    (angular separation of Sun and Moon or Earth, and fraction of
			    disk eclipsed).
	ut=ut		array[*]; type: structure
			    time structure used to plot a time axis (only used
			    if /plotc is set).
 OUTPUTS:
	area		array[n]; type: float
			    fraction of solar disk eclipsed by Moon or Earth.
 OPTIONAL OUTPUT PARAMETERS:
	elo		array[*]; type: float
			    angular distance between Sun and Moon or Earth
 INCLUDE:
	@compile_opt.pro
 CALLS: ***
	BadValue, InitVar, IsTime, IsType, PlotCurve, SyncArgs, ToDegrees, ToRadians
	sphere_distance
 CALLED BY:
	smei_frm_cvhdr, smei_frm_eclipse
 PROCEDURE:
 MODIFICATION HISTORY:
	OCT-2004, Paul Hick (UCSD/CASS; pphick@ucsd.edu)


edit_smei $SMEI/user/pphick/idl/edit_smei.pro
[Previous] [Next]
 NAME:
	edit_smei
 PURPOSE:
	Edits SMEI time series from ascii files
 CATEGORY:
 CALLING SEQUENCE:
 INPUTS:
	infile	    scalar; type: string; default: $TUB/03_148_02000_003.sm
			name of input file
	outfile     scalar; type: string; default: <infile>.new
			name of output file
 OPTIONAL INPUT PARAMETERS:
	first	    scalar; type: integer
			index of first sky bin to be displayed
	last	    scalar; type: integer
			index of last sky bin to be displayed
 OUTPUTS:
	(written to output file)
 CALLS: ***
	BadValue, FILEPATH, InitVar, PlotCurve, flt_read, pcursor
 PROCEDURE:
	All displayed time series can be edited
	Left-click selects a points; its data value is flagged as bad
	Right-click terminates the selection of points, and writes the modified
	data to the output file.
 MODIFICATION HISTORY:
	NOV-2003, Paul Hick (UCSD/CASS; pphick@ucsd.edu)


editsmei $SMEI/user/bjackson/editsmei.pro
[Previous] [Next]
 NAME:
	editsmei
 PURPOSE:
	Edits SMEI time series from ascii files
 CATEGORY:
 CALLING SEQUENCE:
 INPUTS:
	infile	    scalar; type: string; default: $TUB/03_148_02000_003.sm
			name of input file
	outfile     scalar; type: string; default: <infile>.new
			name of output file
 OPTIONAL INPUT PARAMETERS:
	first	    scalar; type: integer
			index of first sky bin to be displayed
	last	    scalar; type: integer
			index of last sky bin to be displayed
 OUTPUTS:
	(written to output file)
 CALLS: ***
	BadValue, FILEPATH, InitVar, PlotCurve, flt_read, pcursor
 PROCEDURE:
	All displayed time series can be edited
	Left-click selects a points; its data value is flagged as bad
	Right-click terminates the selection of points, and writes the modified
	data to the output file.
 MODIFICATION HISTORY:
	NOV-2003, Paul Hick (UCSD/CASS; pphick@ucsd.edu)


env_slashes $SMEI/ucsd/gen/idl/environment/env_slashes.pro
[Previous] [Next]
 NAME:
	env_slashes
 PURPOSE:
	Fixes environment variables on Windows
 CATEGORY:
	gen/idl/environment
 CALLING SEQUENCE:
	PRO env_slashes
 INPUTS:
	(from Windows by retrieving results of spawning
	the DOS 'set' command).
 OUTPUTS:
	(modified env variables)
 INCLUDE:
	@compile_opt.pro	; On error, return to caller
 CALLS: ***
	FILEPATH, txt_read
 PROCEDURE:
	On Windows SSW sets up environment variables with a mix
	of back- and forward slashes. This causes problems for e.g.
	the IDL dialog_pickfile procedure.
	This procedure runs through all env variables and changes
	forward slashes to backward slashes. Only env variables of
	the form SSW_*_INSTR are not modified.
 MODIFICATION HISTORY:
	FEB-2002, Paul Hick (UCSD/CASS; pphick@ucsd.edu)


EqKepler $SMEI/ucsd/gen/idl/ephem/eqkepler.pro
[Previous] [Next]
 NAME:
	EqKepler
 PURPOSE:
	Kepler's equation is used in the determination of orbital positions.
	It gives the relation between mean and eccentric anomaly (for given
	orbit eccentricity).
 CATEGORY:
	smei/gen/idl/ephem
 CALLING SEQUENCE:
	F = EqKepler(E,arg)
 INPUTS:
	E	scalar; type: float
		    eccentric anomaly (radians)
	arg	array[2], type: float
		    arg[0]  mean anomaly      (radians)
		    arg[1]  orbit ellipticity (eccentricity)
 OUTPUTS:
	EqKepler    fnc value
 EXTERNAL BY:
	KeplerOrbit
 PROCEDURE:
	The eccentric anomaly is the root of Kepler's equation:
	EqKepler = X-arg[1]*sin(X)-arg[0] = 0
	See O. Montenbruck, "Practical Ephemeris Calculations", Springer
	(1989), par. 3.1.1.4, p. 44
 MODIFICATION HISTORY:
	1990, Paul Hick (UCSD)


EulerRotate $SMEI/ucsd/gen/idl/toolbox/math/eulerrotate.pro
[Previous] [Next]
 NAME:
	EulerRotate
 PURPOSE:
	Calculate spherical angles in rotated coordinate system
 CATEGORY:
	gen/idl/toolbox/math
 CALLING SEQUENCE:
	FUNCTION EulerRotate, ABG, In, In1, In2, degrees=Degrees, rectangular=Rectangular
 INPUTS:
	ABG	    array[3] or multi-dimensional array[3,..] with first dimension of 3
			elements. If multi-dimensional, then:
			1. either the array structure, except for the 1st dimension, is the same
			   as for In. Each position in In is rotated using the matching ABG set.
			2. or In is only 1-dimensional i.e. contains only one position. Then
			   each ABG combination is applied to this one position.
			Euler angles [A, B, G]
			A	phase angle of the pole Z(new) in old coordinate system
			B	polar angle of the pole Z(new) in old coordinate system
			G	phase angle of X(new) in coordinate system (2)

	/rectangular NOT SET:
	    In		any multi-dimensional array with first dimension of 2 or 3 elements.
			array[0,..] is the longitude and array[1,..] the latitude;
			array[3,..] (usually the radial distance) is not modified.
	/rectangular SET:
	    In		array[3,..], any multi-dimensional array with array[i,..] (i=0,2)
			the x,y and z-components
 OPTIONAL INPUTS:
	/rectangular	if set, the input array In is interpreted as vectors in rectangular
			coordinates.
			if not set, the input array In is assumed to be in spherical coordinates
			(longitude, latitude, radial distance).
	/degrees	if set, input and output is in degrees
 OUTPUTS:
	/rectangular NOT SET:
			double array with same structure as input array In
			array[0:1,..] are longitude and latitude in new coordinate system
			(0<=Lng<360, -90<=Lat<=90)
	/rectangular SET:
			array[3,..] with same structure as input array In
			x,y,z coordinates in new coordinate system
 INCLUDE:
	@compile_opt.pro			; On error, return to caller
 CALLS: ***
	CvT3d, SubArray, SuperArray, SyncDims, ToRadians
 CALLED BY:
	CvPrecess, CvSky, FishEye, FitKeplerOrbit, GetColors [2], GetColors [3]
	HammerAitoff, KeplerOrbit, MercatorProj, PlotCoronagraph, PlotEarthSkymap [1]
	PlotEarthSkymap [2], PlotEarthSkymap [3], PlotEarthSkymap [4], PlotPlanarCut
	RemoteView_CMEDensity, RemoteView_Init_FOV, RemoteView_StereoStates
	RotationMeasure, ThomsonLOSDensity, qvu_draw, smei_star_stdmaps
	smei_zld_dumbbell, stardistance, vu_coronagraph, vu_elotime, vu_linecut
	vu_planarcut, vu_spherecut, vu_thomson_antifish, vu_thomson_hammer
 PROCEDURE:
 >	/rectangular NOT SET:
	Given longitude (phase angle) and latitude (90-polar angle) of a point
	in some coordinate system [axes: X(old),Y(old),Z(old)], angles are
	calculated in the new coordinate system [axes: X(new),Y(new),Z(new)]
	rotated with respect to the original one over the Euler angles Alfa,
	Beta, Gamma.
	The rotation from old to new system is realized by
	(1) rotation around Z(old) over Alfa  ---> X(1),Y(1),Z(1)=Z(old)
	(2) rotation around Y(1)   over Beta  ---> X(2),Y(2)=Y(1),Z(2)=Z(new)
	(3) rotation around Z(new) over Gamma ---> X(new),Y(new),Z(new).
 >	/rectangular SET:
	The 3D rotation !p.t is used do do the transformation.
 MODIFICATION HISTORY:
	1989, Paul Hick (MPAE,UCSD)
	FEB-1998, Paul Hick (UCSD/CASS), added call to cvt3d to handle conversion
	    of rectangular coordinates
	JUN-2000, Paul Hick (UCSD/CASS), added option to rotate
	    single position using multiple Euler angle combinations.
	SEP-2001, Paul Hick (UCSD/CASS),
	    removed a restriction on ABG for a transformation of rectangular
	    coordinates. Only one set of Euler angles was allowed. Now separate
	    Euler angles can be specified for each vector in 'In'; these are
	    processed using an explicit do-loop).
	AUG-2004, Paul Hick (UCSD/CASS)
	    For rotations of spherical coordinates (/Rectangular NOT set) a safety
	    check cos(angle) > (-1) made bad coordinate values disappear
	    (!values.f_nan > 1 returns 1, while !values.f_nan < 1 returns !values.f_nan).
	    The safety check now explicitly checks for bad values, so they don't
	    get lost.
	DEC-2005, Paul Hick (UCSD/CASS, pphick@ucsd.edu)
	    Bug fix. When 1-element arrays are input at In and In1, the output would
	    be a scalar. The output should always have the same structure as the input.


even_light $SMEI/ucsd/camera/idl/cert/even_light.pro
[Previous] [Next]
 NAME:
	even_light
 PURPOSE:
	Program used for the certification of the SMEI cameras using
	the light box data take in the 3th floor clean room.
 CATEGORY:
	stuff
 CALLING SEQUENCE:
 INPUTS:
 OPTIONAL INPUT PARAMETERS:
 OUTPUTS:
 OPTIONAL OUTPUT PARAMETERS:
 CALLS: ***
	ArrayLocation, BadValue, CV_COORD, CenterOfMass, EVEN_LIGHT_BIN_PHI
	EVEN_LIGHT_BIN_RAD, EVEN_LIGHT_CENTROID, EVEN_LIGHT_FIRSTGUESS
	EVEN_LIGHT_GEOMETRIC_FIX, EVEN_LIGHT_PRORATE, EVEN_LIGHT_SHIFT
	EVEN_LIGHT_VIEW, FILEPATH, InitVar, Inside_Wedge, MEAN, REVERSE, SuperArray, TimeOp
	TimeSystem, TimeUnit, WhatIs, bin_read, bin_write, destroyvar, even_light_background
	even_light_corrections, even_light_pedestal, even_light_photometry
	even_light_registration, flat_centerofmass, gridgen, img_read, lsqCircleFit
	lsqQuadraticFit, twin, view, wedge_bounding_box
 PROCEDURE:
 MODIFICATION HISTORY:
	???-200?, Paul Hick (UCSD/CASS; pphick@ucsd.edu)


even_light_background $SMEI/ucsd/camera/idl/cert/even_light_background.pro
[Previous] [Next]
 NAME:
	even_light_background
 PURPOSE:
 INPUTS:
	adus
	gain
	P1
	P2
 OUTPUTS:
	Background corrected adus
 INCLUDE:
	@compile_opt.pro	; On error, return to caller
 CALLED BY:
	even_light, even_light_info
 PROCEDURE:
	Calculate (adus-P1)/gain-P2
 MODIFICATION HISTORY:
	???-????, Paul Hick (UCSD/CASS; pphick@ucsd.edu)


even_light_corrections $SMEI/ucsd/camera/idl/cert/even_light_corrections.pro
[Previous] [Next]
 NAME:
	even_light_corrections
 PURPOSE:
 CATEGORY:
 INPUTS:
	hhvv		    identifies frame sequence
	spot_centroid	    x-y coordinates of spot centroids (relative to center0)
	good_spot	    list of spot indices to be used for obtaining corrections
	bins_axis
	bins_step
	img_nr
	center0 	    center of fov arc (pix)
 OUTPUTS:
	center0
	dcenter
	optaxis0
	doptaxis
	binwidth
	dbinwidth
	y_run
 INCLUDE:
	@compile_opt.pro	; On error, return to caller
 CALLS: ***
	CV_COORD, FILEPATH, InitVar, IsDisplay, MEAN, SuperArray, get_page, lsqCircleFit
	lsqQuadraticFit, qset_page, set_page, twin
 CALLED BY:
	even_light, even_light_info
 MODIFICATION HISTORY:
	???-????, Paul Hick (UCSD/CASS; pphick@ucsd.edu)


even_light_figures $SMEI/ucsd/camera/idl/cert/even_light_figures.pro
[Previous] [Next]
 NAME:
	even_light_figures
 PURPOSE:
	Draw stuff
 INCLUDE:
	@compile_opt.pro	; On error, return to caller
CALLS
InitVar
 CALLS: ***
	InitVar, MEAN, QBARGRAPH, STDDEV, flt_read, gridgen, plot3darc, plot3dline, plot3dtext
	setup3d, twin
 MODIFICATION HISTORY:
	???-????, Paul Hick (UCSD/CASS; pphick@ucsd.edu)


even_light_info $SMEI/ucsd/camera/idl/cert/even_light_info.pro
[Previous] [Next]
 NAME:
	even_light_info
 PURPOSE:
 CATEGORY:
 INCLUDE:
	@compile_opt.pro	; On error, return to caller
 CALLS: ***
	BadValue, CORRELATE, FILEPATH, InitVar, IsType, MEAN, QPLOT, STDDEV, SuperArray, bargraph
	bin_read, destroyvar, even_light_background, even_light_corrections
	even_light_pedestal, even_light_photometry, even_light_plot
	even_light_registration, lsqNormalFit, twin
 PROCEDURE:
  0: prints table of geometric constants to screen
	    /widget	calls qplot widget
  1: scatter plot: X0 vs. Y0
  2: scatter plot: phi0 vs. R0
  3: scatter plot: dX0 vs. dY0
  4: scatter plot: VP vs. VR
  5: scatter plot: bin widths vs. change in binwidth

  6: scatter plot: P1+P2 vs. P2
  7: widget with P1+P2, P1, P2 (including errors)
  8: prints table of pedestal determination
	    /redo: uses adu_per_bin to recalculate pedestals before printing

	    if run_id is specified (single run) then a scatter plot of gain
	    vs. residual background for all images in the run is displayed.
	    if keyword /raw is set then gain vs. raw background is displayed

	    /excl_img: list of images to be excluded from recalculation of
	    pedestals and scatter plots.

  9: photometric certification summary
	    displays summary plot of photometry: histgram of relative
	    photometric errors for all spots; gain, blank readout, dark reference
	    readout, raw background and residual background as a function of image
	    number.

	    if keyword /spots is set, all residual time series are plotted before
	    displaying the summary plot

	    if run_id is not specified (all_runs) then the qplot widget is shown
	    with the median photometic error for all runs.

	    if keyword /redo is set than the gains are recalculated using
	    the adu_per_bin array. Keyword excl_img can be used to exclude images
	    from the recalculation.
 MODIFICATION HISTORY:
	???-????, Paul Hick (UCSD/CASS; pphick@ucsd.edu)


even_light_pedestal $SMEI/ucsd/camera/idl/cert/even_light_pedestal.pro
[Previous] [Next]
 NAME:
	even_light_pedestal
 PURPOSE:

 CATEGORY:
	camera/idl/cert
 CALLING SEQUENCE:
 INPUTS:
 OPTIONAL INPUT PARAMETERS:
 OUTPUTS:
 OPTIONAL OUTPUT PARAMETERS:
 INCLUDE:
	@compile_opt.pro	; On error, return to caller
 CALLS: ***
	InitVar, LINFIT, LocalExtrema, MEAN, gridgen
 CALLED BY:
	even_light, even_light_info
 PROCEDURE:
 MODIFICATION HISTORY:
	???-200?, Paul Hick (UCSD/CASS; pphick@ucsd.edu)


even_light_photometry $SMEI/ucsd/camera/idl/cert/even_light_photometry.pro
[Previous] [Next]
 NAME:
	even_light_photometry
 PURPOSE:
 CATEGORY:
 INCLUDE:
	@compile_opt.pro	; On error, return to caller
 CALLS: ***
	BadValue, FILEPATH, InitVar, IsDisplay, IsType, MEAN, STDDEV, bargraph, destroyvar
	get_page, qset_page, set_page, twin
 CALLED BY:
	even_light, even_light_info
 PROCEDURE:
 MODIFICATION HISTORY:
	???-????, Paul Hick (UCSD/CASS; pphick@ucsd.edu)


even_light_platescale $SMEI/ucsd/camera/idl/cert/even_light_platescale.pro
[Previous] [Next]
 NAME:
	even_light_platescale
 PURPOSE:
 INCLUDE:
	@compile_opt.pro	; Return to caller
 CALLS: ***
	MEAN, STDDEV, gridgen
 MODIFICATION HISTORY:
	???-????, Paul Hick (UCSD/CASS; pphick@ucsd.edu)


even_light_plot $SMEI/ucsd/camera/idl/cert/even_light_plot.pro
[Previous] [Next]
 NAME:
	even_light_plot
 PURPOSE:
 CATEGORY:
 INCLUDE:
	@compile_opt.pro	; On error, return to caller
 CALLS: ***
	InitVar, MEAN, STDDEV, twin
 CALLED BY:
	even_light_info
 PROCEDURE:
 MODIFICATION HISTORY:
	???-????, Paul Hick (UCSD/CASS; pphick@ucsd.edu)


even_light_registration $SMEI/ucsd/camera/idl/cert/even_light_registration.pro
[Previous] [Next]
 NAME:
	even_light_registration
 PURPOSE:
 CATEGORY:
 CALLING SEQUENCE:
 INPUTS:
 OPTIONAL INPUT PARAMETERS:
 OUTPUTS:
 OPTIONAL OUTPUT PARAMETERS:
 INCLUDE:
	@compile_opt.pro	; On error, return to caller
 CALLS: ***
	BadValue, CV_COORD, FILEPATH, InitVar, IsDisplay, LINFIT, PlotCurve, STDDEV, bargraph
	get_page, qset_page, set_page, twin
 CALLED BY:
	even_light, even_light_info
 PROCEDURE:
 MODIFICATION HISTORY:
	???-200?, Paul Hick (UCSD/CASS; pphick@ucsd.edu)