This page was created by the IDL library routine `mk_html_help2`.

Last modified: Wed Oct 7 01:15:19 2009.

# Directory Listing of Routines

# ssl_general/cotrans/special/minvar

- MINVAR
- MINVAR_MATRIX_MAKE
- MINVAR_TEST
- MVA_CRIB

# Routine Descriptions

## MINVAR

[Next Routine] [List of Routines]

     Procedure: minvar.pro
     This program computes the principal variance directions and variances of a
     vector quantity (can be 2D or 3D) as well as the associated
     eigenvalues.  This routine is a simple version
     designed to be used by a tplot wrapper with the contrans_var library
     Works with trired and triql (IDL's version of Num. Recipies w/ permission)

     Input: Vxyz, an (ndim,npoints) array of data(ie 3xN)
     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: 2008-03-05 19:13:27 -0800 (Wed, 05 Mar 2008) $
     $LastChangedRevision: 2452 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/ssl_general/trunk/cotrans/special/minvar/minvar.pro $

(See ssl_general/cotrans/special/minvar/minvar.pro)

## MINVAR_MATRIX_MAKE

[Previous Routine] [Next Routine] [List of Routines]

    Procedure: minvar_matrix_make

    Purpose: tplot wrapper for minvar.pro.  This routine generates a
    matrix or set of matrices from a time series of 3-d vector data that
    will transform three dimensional data into a minimum variance
    coordinate system.  This routine takes a tplot variable that stores 3
    dimensional vector data as an argument and produces a tplot variable
    storing the transformation matrix or matrices.

    The minimum variance coordinate system is taken by generating the covariance
    matrix for an interval of data.  This matrix is then diagonalized to
    identify the eigenvalues and eigenvectors of the covariance matrix.
    The eigenvector with the smallest eigenvalue will form the direction
    of the z component of the new coordinate system.  The eigenvector
    with the largest eigenvalue will form the direction of the x
    component of the new coordinate system.  The third eigenvector will
    form the y direction of the coordinate system.

    Warning:  The resulting transformation matrices will only correctly
    transform data from the coordinate system of the input variable to
    the minimum variance coordinate system.  So if in_var_name is in gse
    coordinates then you should only use the output matrices to transform
    other data in gse coordinates.

    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/2)
           set tslide=0 to cause the program to generate only a single
           matrix

           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

           tminname(optional): name of a tplot variable in which you would
           like to store the minimum variance direction vectors this
           vector will be represented in the original coordinate system

           tmidname(optional):  name of a tplot variable in which you would
           like to store the intermediate variance direction vectors this
           vector will be represented in the original coordinate system

           tmaxname(optional): name of a tplot variable in which you would
           like to store the minimum variance direction vectors this
           vector will be represented in the original coordinate system

      SEE ALSO:
         mva_crib.pro,minvar.pro,tvector_rotate.pro

     $LastChangedBy: pcruce $
     $LastChangedDate: 2009-08-18 14:45:25 -0700 (Tue, 18 Aug 2009) $
     $LastChangedRevision: 6602 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/ssl_general/trunk/cotrans/special/minvar/minvar_matrix_make.pro $

(See ssl_general/cotrans/special/minvar/minvar_matrix_make.pro)

## MINVAR_TEST

[Previous Routine] [Next Routine] [List of Routines]

    Basic tests for minvar.pro

    Written by Vassilis Angelopolous(vassilis@ssl.berkeley.edu)

     $LastChangedBy: pcruce $
     $LastChangedDate: 2007-10-04 15:40:27 -0700 (Thu, 04 Oct 2007) $
     $LastChangedRevision: 1667 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/ssl_general/trunk/cotrans/special/minvar/minvar.pro $

(See ssl_general/cotrans/special/minvar/minvar_test.pro)

## MVA_CRIB

[Previous Routine] [List of Routines]

    Procedure: mva_crib

    Purpose:  A crib on showing how to transform into minimum variance
    analysis coordinates

    Notes:

     $LastChangedBy: jimm $
     $LastChangedDate: 2008-05-13 18:09:41 -0700 (Tue, 13 May 2008) $
     $LastChangedRevision: 3081 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/ssl_general/trunk/cotrans/special/minvar/mva_crib.pro $

(See ssl_general/cotrans/special/minvar/mva_crib.pro)