V4 $SSW/packages/ztools/vectors/v4.pro
[Previous] [Next]
 NAME:
	V4
 PURPOSE:
	Returns a four-vector structure with the given information in it.
	(see index.html in this directory for more info)
 METHOD:
	Generate a structure.  Use input parameters where available
 CALLING SEQUENCE:
	foo = v4(x0,x1,x2,x3,unit0,unit1,unit2,unit3,coords,defined)
	foo = v4(x0,x1,x2,unit0,unit1,unit2,coords,defined)

 INPUT:
	xn	- The coordinates
	unitn	- The units (string value; "TIMESTAMP" for times)
	coords  - The name of the coordinate system to use
	defined - An array of booleans saying which of xn is defined (optional)
 OUTPUT:
	A vect4 structure with the given information
 CAUTIONS:
	Very forgiving. For example, you can refuse to specify x3 and still
	declare it to be defined(!)
 CALLS: ***
	ISNUM, ISVALID [1], ISVALID [2], ISVALID [3], NLM [1], NLM [2]
 CALLED BY:
	MAKE_DIPOLES, PIX2V4, v4canon
 HISTORY:
	6-Oct-1997 Initial version
	24-Oct-1997 Fixed vector inputs.


V42PIX $SSW/packages/ztools/vectors/v42pix.pro
[Previous] [Next]
 NAME:
	V42PIX
 PURPOSE:
	Convert a VECT4 structure to pixel coordinates in an image.
 CALLING SEQUENCE:
	xy = pix2v4(coords,tohdr)  
		("coords" is a(n array of) v4 structure(s))
 RETURNS:
	an nx2 array containing X's and Y's.
 CALLS: ***
	ISVALID [1], ISVALID [2], ISVALID [3], V4XFORM, ZCOORD, solar_hdr, v4canon
 HISTORY: 
	Written by Craig DeForest, 24-Oct-1997


V4_RESOLVE_XFORM $SSW/packages/ztools/vectors/v4_resolve_xform.pro
[Previous] [Next]
 NAME:
	V4_RESOLVE_XFORM
 PURPOSE:
	To find resolution chains to convert
	between coordinate systems that have no direct
	conversion.  You feed V4XFORM_RESOLVE a 
	coordinate system to go FROM and another to go TO,
	and you get back a string array containing the names
	of the source and destination systems and all the
	intermediate ones.
 CALLING SEQUENCE:
	chain = v4_resolve_xform(from,to)
 INPUTS:
	FROM - A string identifying the source coordinate system
	TO   - A string identifying the destination coordinate system
 KEYWORDS:
	VERBOSE - Generate LOTS of debugging information
	CACHE   - Cache the calculated chain in the V4XFORMS data structure

 RETURNS:
	A string array containing the shortest list of coordinate 
	systems	such that each adjacent pair of systems has
	a direct forward conversion routine; and that starts
	with the "FROM" system and ends with the "TO" system.

	If no such list exists, then the integer 0 is returned.

 METHOD:
	We start by testing the trivial chain (a direct
	conversion from A to B.  Then we start building a 
	list of all non-repeating conversion chains of
	length L that start from A.  The central loop
	goes from L -> L+1 by scanning the entire conversions
	database for conversions from the last item in 
	each existing chain.  A list of conversions of length
	"L+1" is then generated (no circular chains are allowed),
	and the process starts again until either there are NO 
	chains of the current length that start with A; or a 
	chain is found that reaches B.

 CALLS: ***
	DEFINE_V4TYPES, GETV4TYPE, ISVALID [1], ISVALID [2], ISVALID [3], NLM [1], NLM [2]
 CALLED BY:
	V4XFORM
 RESTRICTIONS:
	The maximum chain length is set in define_v4types.pro -- it
	is the length of the string array in the "chain" tag of 
	the v4xform structure type.

 CAUTIONS:
	The coordinate system names are converted to the standard
	names returned by GETV4TYPE.

	The speed of the method is roughly O(N^2.5) in the number of
	co-ordinate systems supported.  With more than a couple of
	dozen coordinate systems, it may get unwieldy.

 AUTHOR:
	Craig DeForest

 HISTORY:
	Initial implementation, 8-Oct-1997


v4canon $SSW/packages/ztools/vectors/v4canon.pro
[Previous] [Next]
 NAME:
	v4canon
 PURPOSE:
	Canonicalize a 4-vector (adjust units to the standard ones)
 AUTHOR:
	Craig DeForest
 CALLING SEQUENCE:
	v4out = v4canon(v4in)
 CALLS: ***
	GETV4TYPE, ISNUM, V4, data_chk [1], data_chk [2], zunits
 CALLED BY:
	PIX2V4, V42PIX, V4METRIC, V4XFORM, V4XS2SC, V4XS2SRS [1], V4XS2SRS [2], V4XSC2HC [1]
	V4XSC2HC [2], V4XSC2HEC, V4XSC2S
 HISTORY: 
	Written Oct 97
	9-Dec-97: We force numeric structuresto be doubles!


V4DIFF_ROT $SSW/packages/ztools/vectors/v4diff_rot.pro
[Previous] [Next]
 NAME:
	 V4DIFF_ROT
 PURPOSE:
	Differentially rotate a 4-vector to the specified time.
 CALLING SEQUENCE:
	b = v4diff_rot(a,t=<timestamp>)
 RETURNS:
	A v4 structure containing the input points -- but differentially
	rotated about the solar center according to an a priori rotation
	law (either Carrington or something else...)
 KEYWORDS:
	CARRINGTON - If specified, then the vector is tied to the 
	Carrington coordinate system and allowed to rotate with it to
	the specified time.
	HOWARD - If specified, then the vector is rotated according
	to the Howard and Harvey rotation law using diff_rot (default).
 NOTES:
	We should be able to vectorize 'a' and/or 't'.
 CALLS:


V4HELP $SSW/packages/ztools/vectors/v4help.pro
[Previous] [Next]
 NAME:
	V4HELP
 PURPOSE:
	Provide descriptions of each accepted VECT4 coordinate system
 CALLING SEQUENCE:
	v4help,"coordinate system"
	v4help,v4
 	v4help
 AUTHOR:
	Craig DeForest
 CALLS: ***
	DEFINE_V4TYPES, GETV4TYPE, ISVALID [1], ISVALID [2], ISVALID [3], NLM [1], NLM [2]
 HISTORY:
	6-Oct-1997 Initial version
	10-Feb-98  Added listing of all known systems
 CAUTION:
	If you pass in an array, you only get help for the first element.


V4localcart $SSW/packages/ztools/vectors/v4localcart.pro
[Previous] [Next]
 NAME:
	V4localcart
 PURPOSE:
	Generates a local-cartesian transformation matrix that goes between 
	small offsets in one coordinate system to small offsets in another.
 CALLING SEQUENCE:
	matrix = V4localcart(origin,from)
 INPUTS:
	origin - a v4 structure indicating the origin
	from - a string identifying the coordinate system to compare
 RETURNS:
	matrix(i,j) tells you the offset of the jth coordinate in the
	origin unit system per unit offset in the ith from-coordinate.
 METHOD:
	Does the explicit transform on a (hopefully suitably small) 
	simplex.
 WARNINGS:
	THE NUMBERS IN THE MATRIX CARRY UNITS!  All units are assumed
	to be the canonical units for that coordinate system (seconds 
	for time-axis coordinates...)
 BUGS:
	WE DO NOT IMPLEMENT RELATIVISTIC CORRECTIONS!!!  This would be
	tedious.

	We assume that 1e-3 is TINY.  This is not true for some unit
	systems (eg megaradians)


V4MCART $SSW/packages/ztools/vectors/v4mcart.pro
[Previous] [Next]
 NAME:
       V4MCART
 PURPOSE:
       Return the distance between two points in a cartesian coordinate system.
       (normally called by V4METRIC based on the v4type structure)
 CALLING SEQUENCE:
       out = V4MCART(in1,in2,/verbose,index=ix,units=units,dim=dim)
 INPUTS:
       in1, in2 - V4 structures containing the co-ordinates to measure
 RETURNS:
       The distance between the two points
 KEYWORDS: 
       VERBOSE - Be chatty
       INDEX   - A 4-array that re-orders the input vectors
       UNITS   - If present, V4MCART attempts to return a value in the units given.
                 If not defined, V4MCART sets this to the name of the units in which the
                 value is returned.
       DIM     - Number indicating how many dimensions to use (2,3,4)
 METHOD: 
	We can't ignore the "index" input, because even though the 3-space coordinates
	are uniform, we have to be positive about which is the time axis.

 CAVEATS: 
	We assume that we've been fed a canonicalized, matched set of v4 vectors.

	We further assume that all the spatial coordinates are in the same units.

 AUTHOR:
	Craig DeForest
 CALLS: ***
	ISVALID [1], ISVALID [2], ISVALID [3], STR2UTC [1], STR2UTC [2], STR2UTC [3], zunits
 HISTORY:
	Written 10-Feb-1997 CED


V4METRIC $SSW/packages/ztools/vectors/v4metric.pro
[Previous] [Next]
 NAME:
	V4METRIC
 PURPOSE:
	Return the distance between two arbitrary four-vectors, in either
	3-space or 4-space.
 CALLING SEQUENCE:
	dist = V4METRIC(in1,in2,/verbose,units=units,dim=dim)
 INPUTS:
	in1, in2 - V4 structures containing the co-ordinates to measure
 RETURNS:
	The 3-distance or the 4-distance between the two points.
 KEYWORDS:
	VERBOSE - Be chatty
	UNITS - If present, V4MCART attempts to return a value in the units given.
	 	If not defined, V4MCART sets this to the name of the units in which the
		value is returned.
 	DIM - Number specifying how many dimensions to use (2,3,4)
 METHOD:
	We clean up the input vectors by translating them into the same coordinate
	system and canonicalizing them, then call the appropriate metric functions
	defined in their V4TYPE structures.

 CAVEATS:
	Because some coordinate systems move with respect to others, the 3-space 
	metric between points at different (Galilean) times is not well defined.
	We measure the distance within the coordinate system of the first point.
	For example, if in1 and in2 start out in Carrington spherical coordinates
	and are at the same place but different times, then
		vmcart(in1,in2)
	will be zero.  But 
		vmcart(v4xform(in1,'heliographic'),in2)
	will be nonzero, because the spatial location of in1 is now assumed to be
	stationary in heliographic coordinates, which are moving with respect to the 
	carrington system in which in2 is specified.

	(Of course, the foregoing doesn't apply to 4-metrics, which are invariant.)
 CALLS:


V4MSPH $SSW/packages/ztools/vectors/v4msph.pro
[Previous] [Next]
 NAME:
       V4MSPH
 PURPOSE:
       Return the distance between two points in a spherical oordinate system.
       (normally called by V4METRIC based on the v4type structure)
 CALLING SEQUENCE:
       out = V4MSPH(in1,in2,/verbose,index=ix,units=units,dim=dim)
 INPUTS:
       in1, in2 - V4 structures containing the co-ordinates to measure
 RETURNS:
       The distance between the two points
 KEYWORDS: 
       VERBOSE - Be chatty
       INDEX   - A 4-array that re-orders the input vectors
       UNITS   - If present, V4MCART attempts to return a value in the units given.
                 If not defined, V4MCART sets this to the name of the units in which the
                 value is returned.
       DIM     - Number indicating how many dimensions to use (2,3,4)
 METHOD: 
	We can't ignore the "index" input, because even though the 3-space coordinates
	are uniform, we have to be positive about which is the time axis.
	
	In this case, 2-dimensional distances are measured as great-circles on 
	a unit sphere, and are returned as angles subtended.

 CAVEATS: 
	We assume that we've been fed a canonicalized, matched set of v4 vectors.

	We further assume that all the spatial coordinates are in the same units.

 AUTHOR:
	Craig DeForest
 CALLS: ***
	ISVALID [1], ISVALID [2], ISVALID [3], STR2UTC [1], STR2UTC [2], STR2UTC [3]
	V4XSPH2CART, zunits
 HISTORY:
	Written 10-Feb-1997 CED


V4MSRS $SSW/packages/ztools/vectors/v4msrs.pro
[Previous] [Next]
 NAME:
       V4MSRS
 PURPOSE:
       Return the distance between two points in the Solar Range Solar
	coordinate system.
 CALLING SEQUENCE:
       out = V4MSPH(in1,in2,/verbose,index=ix,units=units,dim=dim)
 INPUTS:
       in1, in2 - V4 structures containing the co-ordinates to measure
 RETURNS:
       The distance between the two points
 KEYWORDS: 
       VERBOSE - Be chatty
       INDEX   - A 4-array that re-orders the input vectors
       UNITS   - If present, V4MCART attempts to return a value in the units given.
                 If not defined, V4MCART sets this to the name of the units in which the
                 value is returned.
       DIM     - Number indicating how many dimensions to use (2,3,4)
 AUTHOR:
	Craig DeForest
 HISTORY:
	Written 10-Feb-1997 CED


V4OK $SSW/packages/ztools/vectors/v4ok.pro
[Previous] [Next]
 NAME:
	V4OK
 PURPOSE:
	Check for self-consistency in a V4 array
 CALLING SEQUENCE:
	ok = v4ok(vectors)
 AUTHOR:
	Craig DeForest
 CALLS: ***
	GETV4TYPE, NLM [1], NLM [2], data_chk [1], data_chk [2], zunits
 HISTORY:
	6-Oct-1997 Initial version


V4PRINT $SSW/packages/ztools/vectors/v4print.pro
[Previous] [Next]
 NAME:
	V4PRINT
 PURPOSE:
	To display the contents of a 4-vector
 CALLING SEQUENCE:
	V4PRINT,A
 CALLS:
 CALLED BY
	V4XFORM, V4XSPH2CART


V4UNITS $SSW/packages/ztools/vectors/v4units.pro
[Previous] [Next]
 NAME:
	V4UNITS
 PURPOSE:
	Return a string array containing accepted units for the given
	VECT4 coordinate system
 CALLING SEQUENCE:
	str_array = v4units("ECS")	
	str_array = v4units(v4)		[v4 is a VECT4]
	str       = v4units("ECS",3)	[str gets unit for 3rd coordinate]
	str	  = v4units(v4,   3)
 AUTHOR:
	Craig DeForest
 CALLS: ***
	DEFINE_V4TYPES, GETV4TYPE, ISVALID [1], ISVALID [2], ISVALID [3]
 HISTORY:
	6-Oct-1997 Initial version


V4XCARR2HEL $SSW/packages/ztools/vectors/v4xcarr2hel.pro
[Previous] [Next]
 NAME:
	V4XCARR2HEL
 PURPOSE:
	Convert carrington to heliographic coordinates
	(normally called by V4XFORM based on the v4xforms structure)
 CALLING SEQUENCE:
	out = V4XHEL2CARR(in,/verbose,index=ix,outdex=ox,ocoord=ocoord)
 INPUTS:
	in - a V4 structure containing the Cartesian co-ordinates to 
	     transform to spherical
 RETURNS:
	The transformed vector (or array)
 KEYWORDS:
	VERBOSE - Be chatty
	INDEX   - A 4-array that re-orders the input vector
	OUTDEX  - A 4-array that re-orders the output vector
	OCOORD  - The coordinate system name for the output coordinates 
 
 METHOD:
	The "standard interpretation" is as follows:
	I0 = time		O0 = time		
	I1 = longitude		O1 = longitude		
	I2 = latitude		O2 = latitude		
	I3 = radius		O3 = radius		

 AUTHOR:
	Craig DeForest
 CALLS: ***
	ISVALID [1], ISVALID [2], ISVALID [3], NLM [1], NLM [2], TIM2CARR, zunits
 HISTORY: 
	Initial implementation, 7-Oct-1997


V4XCART2SPH $SSW/packages/ztools/vectors/v4xcart2sph.pro
[Previous] [Next]
 NAME:
	V4XCART2SPH
 PURPOSE:
	Convert Cartesian to associated Spherical coordinates
	(normally called by V4XFORM based on the v4xforms structure)
 CALLING SEQUENCE:
	out = V4XCART2SPH(in,/verbose,index=ix,outdex=ox,ocoord=ocoord)
 INPUTS:
	in - a V4 structure containing the Cartesian co-ordinates to 
	     transform to spherical
 RETURNS:
	The transformed vector (or array)
 KEYWORDS:
	VERBOSE - Be chatty
	INDEX   - A 4-array that re-orders the input vector
	OUTDEX  - A 4-array that re-orders the output vector
	OCOORD  - The coordinate system name for the output coordinates 
 
 METHOD:
	The "standard interpretation" is as follows:
	I0 = time		O0 = time		
	I1 = X			O1 = longitude		
	I2 = Y			O2 = latitude		
	I3 = Z			O3 = radius		
 The pole points along the Z axis; the central meridian is through the X axis;
 and the Y axis forms a right-handed co-ordinate system.

 AUTHOR:
	Craig DeForest
 CALLS: ***
	ISVALID [1], ISVALID [2], ISVALID [3], zunits
 CALLED BY:
	V4XSC2S
 HISTORY: 
	Initial implementation, 7-Oct-1997

 NOTES: 
	CV_COORD would work as the engine.  But the real utility
	here isn't in the transformation -- it's in the bookkeeping of
	units and stuff.


V4XFORM $SSW/packages/ztools/vectors/v4xform.pro
[Previous] [Next]
 NAME:
	V4XFORM
 PURPOSE:
	To transform a four-vector from any of the recognized 
	co-ordinate systems to any other.

 CALLING SEQUENCE:
	new = v4xform(old,TO)

 CALLS:
 CALLED BY
	MAKE_DIPOLES, PIX2V4, V42PIX, V4DIFF_ROT, V4METRIC


V4XHEL2CARR $SSW/packages/ztools/vectors/v4xhel2carr.pro
[Previous] [Next]
 NAME:
	V4XHEL2CARR
 PURPOSE:
	Convert heliographic to carrington coordinates
	(normally called by V4XFORM based on the v4xforms structure)
 CALLING SEQUENCE:
	out = V4XHEL2CARR(in,/verbose,index=ix,outdex=ox,ocoord=ocoord)
 INPUTS:
	in - a V4 structure containing the Cartesian co-ordinates to 
	     transform to spherical
 RETURNS:
	The transformed vector (or array)
 KEYWORDS:
	VERBOSE - Be chatty
	INDEX   - A 4-array that re-orders the input vector
	OUTDEX  - A 4-array that re-orders the output vector
	OCOORD  - The coordinate system name for the output coordinates 
 
 METHOD:
	The "standard interpretation" is as follows:
	I0 = time		O0 = time		
	I1 = longitude		O1 = longitude		
	I2 = latitude		O2 = latitude		
	I3 = radius		O3 = radius		

 AUTHOR:
	Craig DeForest
 CALLS: ***
	ISVALID [1], ISVALID [2], ISVALID [3], NLM [1], NLM [2], TIM2CARR, zunits
 HISTORY: 
	Initial implementation, 7-Oct-1997


V4XS2SC $SSW/packages/ztools/vectors/v4xs2sc.pro
[Previous] [Next]
 NAME:
	V4XS2SC
 PURPOSE:
	Convert Solar to Solar Cartesian coordinates
	(normally called by V4XFORM based on the v4xforms structure)
 CALLING SEQUENCE:
	out = V4XCART2SPH(in,/verbose,index=ix,outdex=ox,ocoord=ocoord)
 INPUTS:
	in - a V4 structure containing the co-ordinates to 
	     transform
 RETURNS:
	The transformed vector (or array)
 KEYWORDS:
	VERBOSE - Be chatty
	INDEX   - A 4-array that re-orders the input vector  (IGNORED)
	OUTDEX  - A 4-array that re-orders the output vector (IGNORED)
	OCOORD  - The coordinate system name for the output coordinates 
 
 METHOD:
	Translates the Cartesian coordinates from Earth to the Sun, 
	then calls V4XCART2SPH.	

	The "standard interpretation" is as follows:
	I0 = time		O0 = time		
	I1 = W angle		O1 = X (west)		
	I2 = N angle		O2 = Y (North)		
	I3 = R (from Earth)	O3 = Z (toward Earth)	

	(Note that "North" is "Solar North projected into the image plane")
 AUTHOR:
	Craig DeForest
 CALLS: ***
	ISVALID [1], ISVALID [2], ISVALID [3], SUNEARTHDIST, V4XSPH2CART, data_chk [1]
	data_chk [2], v4canon
 CALLED BY:
	V4XS2SRS [1]
 HISTORY: 
	Initial implementation, 7-Oct-1997


V4XS2SRS [1] $SSW/packages/ztools/vectors/v4xs2srs.pro
[Previous] [Next]
 NAME:
	V4XS2SRS
 PURPOSE:
	Convert Solar (Earth-Range) coordinates to Solar Range Solar
	(normally called by V4XFORM based on the v4xforms structure)
 CALLING SEQUENCE:
	out = V4XCART2SPH(in,/verbose,index=ix,outdex=ox,ocoord=ocoord)
 INPUTS:
	in - a V4 structure containing the co-ordinates to 
	     transform
 RETURNS:
	The transformed vector (or array)
 KEYWORDS:
	VERBOSE - Be chatty
	INDEX   - A 4-array that re-orders the input vector  (IGNORED)
	OUTDEX  - A 4-array that re-orders the output vector (IGNORED)
	OCOORD  - The coordinate system name for the output coordinates 
 
 METHOD:
	Convert the angle to Solar Cartesian and then stick the radius into the 
	new coordinates.  Note ambiguity under reflection about the Z=0 plane!
 AUTHOR:
	Craig DeForest
 CALLS: ***
	ISVALID [1], ISVALID [2], ISVALID [3], V4XS2SC, v4canon
 HISTORY: 
	Initial implementation, 7-Oct-1997


V4XS2SRS [2] $SSW/packages/ztools/vectors/v4xsrs2s.pro
[Previous] [Next]
 NAME:
	V4XS2SRS
 PURPOSE:
	Convert Solar Range Solar to Solar (Earth-Range) coordinates
	(normally called by V4XFORM based on the v4xforms structure)
 CALLING SEQUENCE:
	out = V4XCART2SPH(in,/verbose,index=ix,outdex=ox,ocoord=ocoord)
 INPUTS:
	in - a V4 structure containing the co-ordinates to 
	     transform
 RETURNS:
	The transformed vector (or array)
 KEYWORDS:
	VERBOSE - Be chatty
	INDEX   - A 4-array that re-orders the input vector  (IGNORED)
	OUTDEX  - A 4-array that re-orders the output vector (IGNORED)
	OCOORD  - The coordinate system name for the output coordinates 
 
 METHOD:
	Use the Law of Cosines in the Earth-Sun-Point plane to get
	the Earth-Point radius based on the Earth-Sun radius, the given
	radius, and the Sun-Earth-Point angle.

 CALLS: ***
	V4XSRS2S, v4canon, zpb0r [1], zpb0r [2], zunits
	NOTE: because of the ambiguity about reflection in the Z=0 plane,
	we assume the point is CLOSER to us than the Sun.
 AUTHOR:
	Craig DeForest
 HISTORY: 
	Initial implementation, 7-Oct-1997


V4XSC2HC [1] $SSW/packages/ztools/vectors/v4xhc2sc.pro
[Previous] [Next]
 NAME:
	V4XSC2HC
 PURPOSE:
	Convert Solar Cartesian to Heliographic Cartesian coordinates
	(normally called by V4XFORM based on the v4xforms structure)
 CALLING SEQUENCE:
	out = V4XCART2SPH(in,/verbose,index=ix,outdex=ox,ocoord=ocoord)
 INPUTS:
	in - a V4 structure containing the co-ordinates to 
	     transform
 RETURNS:
	The transformed vector (or array)
 KEYWORDS:
	VERBOSE - Be chatty
	INDEX   - A 4-array that re-orders the input vector  (IGNORED)
	OUTDEX  - A 4-array that re-orders the output vector (IGNORED)
	OCOORD  - The coordinate system name for the output coordinates 
 
 METHOD:
	Calculate the B angle then apply a rotation matrix.
 AUTHOR:
	Craig DeForest
 CALLS: ***
	ISVALID [1], ISVALID [2], ISVALID [3], NLM [1], NLM [2], V4XHC2SC, v4canon, zpb0r [1]
	zpb0r [2]
 HISTORY: 
	Initial implementation, 7-Oct-1997


V4XSC2HC [2] $SSW/packages/ztools/vectors/v4xsc2hc.pro
[Previous] [Next]
 NAME:
	V4XSC2HC
 PURPOSE:
	Convert Solar Cartesian to Heliographic Cartesian coordinates
	(normally called by V4XFORM based on the v4xforms structure)
 CALLING SEQUENCE:
	out = V4XCART2SPH(in,/verbose,index=ix,outdex=ox,ocoord=ocoord)
 INPUTS:
	in - a V4 structure containing the co-ordinates to 
	     transform
 RETURNS:
	The transformed vector (or array)
 KEYWORDS:
	VERBOSE - Be chatty
	INDEX   - A 4-array that re-orders the input vector  (IGNORED)
	OUTDEX  - A 4-array that re-orders the output vector (IGNORED)
	OCOORD  - The coordinate system name for the output coordinates 
 
 METHOD:
	Calculate the B angle then apply a rotation matrix
 AUTHOR:
	Craig DeForest
 CALLS: ***
	ISVALID [1], ISVALID [2], ISVALID [3], NLM [1], NLM [2], v4canon, zpb0r [1], zpb0r [2]
 HISTORY: 
	Initial implementation, 7-Oct-1997


V4XSC2HEC $SSW/packages/ztools/vectors/v4xsc2hec.pro
[Previous] [Next]
 NAME:
	V4XSC2HEC
 PURPOSE:
	Convert Solar Cartesian to Heliocentric Ecliptic Cartesian coordinates
	(normally called by V4XFORM based on the v4xforms structure)
 CALLING SEQUENCE:
	out = V4XCART2SPH(in,/verbose,index=ix,outdex=ox,ocoord=ocoord)
 INPUTS:
	in - a V4 structure containing the co-ordinates to 
	     transform
 RETURNS:
	The transformed vector (or array)
 KEYWORDS:
	VERBOSE - Be chatty
	INDEX   - A 4-array that re-orders the input vector  (IGNORED)
	OUTDEX  - A 4-array that re-orders the output vector (IGNORED)
	OCOORD  - The coordinate system name for the output coordinates 
 
 METHOD:
	Calculate the B angle then apply a rotation matrix
 AUTHOR:
	Craig DeForest
 CALLS: ***
	ISVALID [1], ISVALID [2], ISVALID [3], NLM [1], NLM [2], v4canon, zpb0r [1], zpb0r [2]
 HISTORY: 
	Initial implementation, 5-April-1999


V4XSC2S $SSW/packages/ztools/vectors/v4xsc2s.pro
[Previous] [Next]
 NAME:
	V4XSC2S
 PURPOSE:
	Convert Earth-Solar Cartesian to Solar coordinates
	(normally called by V4XFORM based on the v4xforms structure)
 CALLING SEQUENCE:
	out = V4XCART2SPH(in,/verbose,index=ix,outdex=ox,ocoord=ocoord)
 INPUTS:
	in - a V4 structure containing the co-ordinates to 
	     transform
 RETURNS:
	The transformed vector (or array)
 KEYWORDS:
	VERBOSE - Be chatty
	INDEX   - A 4-array that re-orders the input vector  (IGNORED)
	OUTDEX  - A 4-array that re-orders the output vector (IGNORED)
	OCOORD  - The coordinate system name for the output coordinates 
 
 METHOD:
	Translates the Cartesian coordinates from Earth to the Sun, 
	then calls V4XCART2SPH.	

	The "standard interpretation" is as follows:
	I0 = time		O0 = time		
	I1 = X (west)		O1 = W angle
	I2 = Y (North)		O2 = N angle
	I3 = Z (toward Earth)	O3 = R (from Earth)

	(Note that "North" is "Solar North projected into the image plane")
 AUTHOR:
	Craig DeForest
 CALLS: ***
	ISVALID [1], ISVALID [2], ISVALID [3], SUNEARTHDIST, V4XCART2SPH, v4canon, zunits
 HISTORY: 
	Initial implementation, 7-Oct-1997
 CAUTION:
	Doesn't check the type of the input V4 structure.


V4XSPH2CART $SSW/packages/ztools/vectors/v4xsph2cart.pro
[Previous] [Next]
 NAME:
	V4XSPH2CART
 PURPOSE:
	Convert Spherical to associated Cartesian coordinates
	(normally called by V4XFORM based on the v4xforms structure)
 CALLING SEQUENCE:
	out = V4XSPH2CART(in,/verbose,index=ix,outdex=ox,ocoord=ocoord)
 INPUTS:
	in - a V4 structure containing the spherical co-ordinates to 
	     transform to Cartesian
 RETURNS:
	The transformed vector (or array)
 KEYWORDS:
	VERBOSE - Be chatty
	INDEX   - A 4-array that re-orders the input vector
	OUTDEX  - A 4-array that re-orders the output vector
	OCOORD  - The coordinate system name for the output coordinates 
 
 METHOD:
	The "standard interpretation" is as follows:
	I0 = time		O0 = time
	I1 = longitude		O1 = X
	I2 = latitude		O2 = Y
	I3 = radius		O3 = Z
 The pole points along the Z axis; the central meridian is through the X axis;
 and the Y axis forms a right-handed co-ordinate system.
 [Here, I<n> and O<n> are the index numbers in the "ix" and "ox" variables.
 So, for Heliographic Cartesian (where North is X2), OX should be "[0,1,3,2]"
 because then out.(ox(3)) is out.X2, which is North.]

 AUTHOR:
	Craig DeForest
 CALLS: ***
	ISVALID [1], ISVALID [2], ISVALID [3], V4PRINT, zunits
 CALLED BY:
	V4MSPH, V4XS2SC
 HISTORY: 
	Initial implementation, 7-Oct-1997
	Vectorized, 24-Oct-1997

 NOTES:
	CV_COORD would work as the engine.  But the real utility
	here isn't in the transformation -- it's in the bookkeeping of
	units and stuff.


v_orbital $SSW/packages/lparl/idl/ucon/tarbell/v_orbital.pro
[Previous] [Next]
NAME:
       v_orbital
PURPOSE:
       To return the SOHO Doppler velocity with respect to disk center
SAMPLE CALLING SEQUENCE:
      vdopp = v_orbital('10-Mar-00 17:30')
      vdopp = v_orbital(['4-Feb 18:55', '10-Mar 17:30'])
INPUT:
       timarr = array of times
OUTPUT:
       Array of Doppler velocities in m/s, + means moving away from Sun
 CALLS: ***
	INTERPOL, anytim2ints [1], anytim2ints [2], int2secarr [1], int2secarr [2]
	rd_tfile [1], rd_tfile [2]
 CALLED BY:
	sum_dt_genx
HISTORY:
 TDT  16-Aug-96  Lifted from plot_mtm_shift, V2.2 (5-Aug-96, MDM)
 TDT  23-Dec-99  changed to soho_ephemeris.txt


verner_xs $SSW/packages/chianti/idl/low_level/continuum/verner_xs.pro
[Previous] [Next]
 PROJECT:  CHIANTI

      CHIANTI is an Atomic Database Package for Spectroscopic Diagnostics of
      Astrophysical Plasmas. It is a collaborative project involving the Naval
      Research Laboratory (USA), the University of Florence (Italy), the
      University of Cambridge and the Rutherford Appleton Laboratory (UK). 

 NAME

    VERNER_XS()

 EXPLANATION

    Reads the Verner & Yakovlev (A&AS 109, 125, 1995) photoionization 
    cross-section data and generates the values of the cross-section at 
    the wavelengths WVL

 INPUTS

    IZ     Atomic number of ion (e.g., 26 = Fe)

    ION    Spectroscopic number of ion (e.g., 13 = XIII)

    WVL    Wavelengths (in angstroms) for which cross-sections are 
           required (1-D array).

 OPTIONAL INPUTS

    DATA   By default VERNER_XS reads the Verner & Yakovlev data file when 
           it is called. Through the DATA keyword the data array can be 
           sent to VERNER_XS instead.

 OUTPUT

    The photoionization cross-section for the ionization of the outer 
    electron in units of mega-barns (Mb = 10^-18 cm^2) at the input 
    wavelengths. E.g., for Fe XIII (ground configuration 
    1s2.2s2.2p6.3s2.3p2) it is the cross-section for the removal of the 
    3p electron.

 HISTORY

    Ver.1, 24-Jul-2002, Peter Young
 CALLS:
 CALLED BY
	freebound_ion


Vlth $SSW/packages/xray/idl/vlth.pro
[Previous] [Next]
 PROJECT:
	SDAC
 NAME:
	Vlth
 PURPOSE:
	This function returns a thermal line x-ray spectrum integrated over
	wider channels suitable for continuum detectors
	as a function of temperature in keV for an emission measure
	of 1e49 cm-3 for a detector at the earth with the source
	at the Sun.  It uses interpolation to obtain the results
	after an initializing call.
 CATEGORY:
	XRAY, SPECTRA
 CALLING SEQUENCE:
	flux = vlth( energy, kt[, te6=te6, edges=edges]
 INPUTS:
	energy - photon energy in keV
	kt     - plasma temperature in keV

	VLTH must first be initialized with a set of energy edges

	(the default edges are take for sxs1 using sxs_ecal, edges)

	edges  - 2xn channel edges in keV, set up for a particular detector
	te6    - optional grid of temperatures in MegaKelvin
 KEYWORDS:
	CONT_ONLY -If set, then don't include the line fluxes in the output.

 OUTPUTS:
	The function returns the flux in units of  photons/cm2/s/keV at the
	earth for a source at the Sun with an emission measure of 1e49 cm-3.
 OPTIONAL OUTPUTS:

 CALLS: ***
	AVG [1], AVG [2], CHECKVAR [1], FCHECK, INTERPOL, LOC_FILE [1], LOC_FILE [2]
	LOC_FILE [3], MEWE_KEV, checkvar [2], edge_products
 CALLED BY:
	FLARE_XRAY_MODEL, F_COMPOSITE, GE_WINDOW [1], HESSI_FLARE_SPECTRUM
	HESSI_MODEL_COUNTS, NEAR_PC_RESP [1], NEAR_PC_RESP [2]
 COMMON BLOCKS:
	VLTH
 PROCEDURE:
	Initialize an array of photon flux as a function of temperature
	and energy band suitable for a particular detectors.  Then interpolate
	on the grid in future calls until the energy grid is changed.
	Uses mewe_kev which calls mewe_spec for standard solar abundances
 RESTRICTIONS:

 MODIFICATION HISTORY:
	ras, 25-apr-94
	ras, 10-mar-95,
	ras, 3-jun-1996, changed 11.6=>(1./.08617)
	ras, 7-jul-1996, added protection for out of range index,
	ras, 15-aug-1996, protect interpolation from going below zero
	ras, 23-sep-1996, added cont_only keyword
	VERSION 7, richard.schwartz@gsfc.nasa.gov, 13-aug-1997, improved documentation.