This page was created by the IDL library routine
mk_html_help2.
Last modified: Fri Aug 17 01:15:17 2007.
Procedure: fac_matrix_make
Purpose: generates a field aligned coordinate transformation matrix
from an input B vector array(and sometimes a position vector array)
then stores it in a tplot variable
Arguments:
mag_var_name=the name of the tplot variable storing the magnetic field
vectors to be used in transformation matrix generation
pos_var_name(optional)=the name of the tplot variable storing the position
vectors to be used in transformation matrix generation
newname(optional)=the name of the tplot variable in which to store
the output
error(optional) = named variable that holds the error state of the
computation 1 = success 0 = failure
other_dim(optional) = the second axis for the field aligned
coordinate system.
************For all transformations Z = B************
valid second coord(other_dim) options:
'Xgse', translates from gse or gsm into FAC
Definition(works on GSE or GSM):
X Axis = on plane defined by Xgse - Z
Second coordinate definition: Y = Z x X_gse
Third coordinate, X completes orthogonal RHS
(right hand system) triad: XYZ
'Rgeo',translate from geo into FAC using radial posision vector
R_pos is radial position vector, radialy inwards.
Second coordinate definition: Y = Z x Rpos
Third coordinate, X completes orthogonal RHS XYZ.
'Ygeo', translate from geo into FAC using azimuthal position vector
Y_pos is the azimuthal position vector, positive Westward
Second coordinate definition: Y = Z x Y_pos
Third coordinate, X completes orthogonal RHS XYZ
Example:
fac_matrix_make,'tha_fgs','Xgeo',pos_var_name='tha_pos',out_var_name='tha_fgs_fac_mat'
Notes:--> I'm a little sparse on comments here, but I think the code
should be self documenting
(See ssl_general/cotrans_var/fac_matrix_make.pro)
Procedure: minvar.pro
This program computes the principal variance directions and variances of a
vector quantity (can be 2D or 3D). This routine is a simple version
designed to be used by a tplot wrapper with the contrans_var library
Input: Vxyz, an (ndim,npoints) array of data
Output: eigenVijk, an (ndim,ndim) array containing the principal axes vectors
Maximum variance direction eigenvector, Vi=eigenVijk(*,0)
Intermediate variance direction, Vj=eigenVijk(*,1) (descending order)
Vrot: if set to a name, that name becomes an array of (ndim,npoints)
containing the rotated data in the new coordinate system, ijk.
Vi(maximum direction)=Vrot(0,*)
Vj(intermediate direction)=Vrot(1,*)
Vk(minimum variance direction)=Vrot(2,*)
lambdas2=if set to a name returns the eigenvalues of the
computation
Written by: Vassilis Angelopoulos
$LastChangedBy: pcruce $
$LastChangedDate: 2007-08-13 17:37:26 -0700 (Mon, 13 Aug 2007) $
$LastChangedRevision: 1401 $
$URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/ssl_general/trunk/cotrans_var/minvar.pro $
(See ssl_general/cotrans_var/minvar.pro)
Procedure: minvar_matrix_make
Purpose: wrapper for minvar.pro,
uses tplot variables,
can generate multiple transformation matrices using sliding average
Arguments:
in_var_name: the name of the tplot variable holding the input
data, can be any sort of timeseries 3-d data
tstart(optional): the start time of the data you'd like to
consider for generating the transformation matrix(defaults to
minimum time of in_var timeseries)
tstop(optional): the stop time of the data you'd like to
consider for generating the transformation matrix(defaults to
maximum time of in_var timeseries)
twindow(optional): the size of the window(in seconds) you'd like to
consider when using a moving boxcar average to generate
multiple transformations. (defaults to the entire time series)
tslide(optional): the number of seconds the boxcar should
slide forward after each average.(defaults to twindow/2xo)
newname(optional): the name of the tplot variable in which to
store the transformation matrix(matrices) (defaults to
in_var_name+'_mva_mat'
evname(optional): the name of the tplot variable in which to
store the eigenvalues of the mva matrix(matrices) (defaults to
nowhere, ie if unset doesn't store them
error(optional): named variable that holds the error state of
the computation, 1=success 0 = failure
$LastChangedBy: pcruce $
$LastChangedDate: 2007-08-15 09:49:12 -0700 (Wed, 15 Aug 2007) $
$LastChangedRevision: 1420 $
$URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/ssl_general/trunk/cotrans_var/minvar_matrix_make.pro $
(See ssl_general/cotrans_var/minvar_matrix_make.pro)
PROCEDURE: TCROSSP Purpose: Vectorized routine to calculate the cross product of two tplot variables containing arrays of 3d vectors and storing the result in a tplot variable Arguments: v1: The name of the tplot variable storing the first vector in the cross product v2: The name of the tplot variable storing the second vector in the cross product newname(optional): the name of the output tplot variable error(optional): named variable in which to return error state of the computation. 1 = success 0 = failure NOTES:
(See ssl_general/cotrans_var/tcrossp.pro)
PROCEDURE: TDOTP Purpose: Vectorized routine to calculate the dot product of two tplot variables containing arrays of vectors and storing the results in a tplot variable Arguments: v1: The name of the tplot variable storing the first vector in the dot product v2: The name of the tplot variable storing the second vector in the dot product newname(optional): the name of the output tplot variable error(optional): named variable in which to return the error state of the computation. 1 = success 0 = failure NOTES:
(See ssl_general/cotrans_var/tdotp.pro)
Procedure: thm_crib_fac Purpose: A crib on showing how to transform into field aligned coordinates Notes: $LastChangedBy: pcruce $ $LastChangedDate: 2007-08-14 13:40:52 -0700 (Tue, 14 Aug 2007) $ $LastChangedRevision: 1410 $ $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/ssl_general/trunk/cotrans_var/thm_crib_fac.pro $
(See ssl_general/cotrans_var/thm_crib_fac.pro)
Procedure: thm_crib_mva Purpose: A crib on showing how to transform into minimum variance analysis coordinates Notes: $LastChangedBy: pcruce $ $LastChangedDate: 2007-08-15 11:24:29 -0700 (Wed, 15 Aug 2007) $ $LastChangedRevision: 1423 $ $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/ssl_general/trunk/cotrans_var/thm_crib_mva.pro $
(See ssl_general/cotrans_var/thm_crib_mva.pro)
Function: tinterpol_mxn
Purpose: Generalized interpolates across a series of vectors(since
interpol only works on 1-d vectors) This function works on any
n-dimensional vectors. Basically, this is an element by element
interpolation across M
- i. works on tplot variables
- ii. allows no extrapolation beyond valid data with
/no_extrapolate keyword"
Arguments:
xv_tvar = tplot variable to be interpolated, the y component
can have any dimesions
uses x component for x abcissa values
uz_tvar = tplot variable that V will be fit to
uses x component for u abcissa values
newname = output variable name(optional) defaults to
xv_tvar+'_interp'
/LINEAR = pass this argument to specify linear
interpolation(this is the default behavior)
/QUADRATIC = pass this argument to specify quadratic
interpolation
/SPLINE = pass this argument to specify spline
interpolation
/NO_EXTRAPOLATE = pass this argument to prevent
extrapolation of data values in V passed it's start and
end points
error(optional): named variable in which to return the error state
of the computation. 1 = success 0 = failure
CALLING SEQUENCE;
tinterpol_mxn,'tplot_var1','tplot_var2',out_var='tplot_var_out'
tinterpol_mxn,'tplot_var1','tplot_var2',/NO_EXTRAPOLATE
tinterpol_mxn,'tplot_var1','tplot_var2',/SPLINE
Output: an N by D1 by D2 by ... array stored in an output tplot variabel
Notes:
Uses a for loop over D1*D2*..., but I'm operating under the assumption that
D1*D2... << M (D1 * D2 *... is waaaay less than M)
It uses a little bit of modular arithmatic so this function is
generalized to any array dimensionality(IDL limits at 8)
Examples:
if the input is an array of 3-d vectors(say 1,1,1 and 2,2,2) and we
want 3 vectors out the output is 1,1,1 1.5 1.5 1.5 2,2,2
if the input is an array of 3x3 matrices(say all ones and all twos)
and we want three matrices then output is all 1s all 1.5s all 2s
$LastChangedBy: pcruce $
$LastChangedDate: 2007-08-14 16:33:34 -0700 (Tue, 14 Aug 2007) $
$LastChangedRevision: 1412 $
$URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/ssl_general/trunk/cotrans_var/tinterpol_mxn.pro $
(See ssl_general/cotrans_var/tinterpol_mxn.pro)
PROCEDURE: TNORMALIZE Purpose: Vectorized routine to normalize all the vectors stored in a tplot variable Arguments: v: The name of the tplot variable storing the vectors to be normalized newname(optional): The name of the output tplot variable. Defaults to v+'_normalized' error(optional): Named variable in which to return the error state of the computation, 1 = success, 0 = failure NOTES: $LastChangedBy: pcruce $ $LastChangedDate: 2007-08-10 15:40:38 -0700 (Fri, 10 Aug 2007) $ $LastChangedRevision: 1378 $ $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/ssl_general/trunk/cotrans_var/tnormalize.pro $
(See ssl_general/cotrans_var/tnormalize.pro)
Procedure: tvector_rotate
Purpose: rotates a set of vectors by a set of coordinate
transformation matrices inputs and outputs are tplot variables
Arguments:
mat_var_in: the name of the tplot variable storing input matrices
vec_var_in: the name of the tplot variable storing input vectors
newname(optional): the name of the output variable, defaults to
mat_var_in + '_times_' + vec_var_in
error(optional): named variable in which to return the error state
of the computation. 1 = success 0 = failure
CALLING SEQUENCE:
tvector_rotate,'matrix_var','vector_var',newname = 'out_var',error=error
tvector_rotate,'matrix_var','vector_var'
Notes:
(See ssl_general/cotrans_var/tvector_rotate.pro)