general/missions/rbsp/efw/utils/
rbsp_min_var_rot.pro
***************************************************************************************** FUNCTION : rbsp_min_var_rot.pro PURPOSE : Calculates the minimum variance matrix of some vector array of a particular input field along with uncertainties and angular rotation from original coordinate system. ==----------------------------------------------------------------------------- ******************************************************************************* Error Analysis from: A.V. Khrabrov and B.U.O. Sonnerup, JGR Vol. 103, 1998. avsra = WHERE(tsall LE timesta+30.d0 AND tsall GE timesta-30.d0,avsa) myrotma = MIN_VAR(myavgmax[avsra],myavgmay[avsra],myavgmaz[avsra],EIG_VALS=myeiga) dphi[i,j] = +/- SQRT(lam_3*(lam_[i]+lam_[j]-lam_3)/((K-1)*(lam_[i] - lam_[j])^2)) dphi = angular standard deviation (radians) of vector x[i] toward/away from vector x[j] ******************************************************************************* Hoppe et. al. [1981] : lam_3 : Max Variance lam_2 : Intermediate Variance lam_1 : MInimum Variance [Assume isotropic "noise" in signals] Variance due to signal (along MAX VARIANCE) : lam_1 - lam_3 Variance due to signal (along INT VARIANCE) : lam_2 - lam_3 Maximum Angular Change (along MIN VARIANCE) : th_min = ATAN(lam_3/(lam_2 - lam_3)) Maximum Angular Change (along MAX VARIANCE) : th_max = ATAN(lam_3/(lam_1 - lam_2)) -The direction of maximum variance in the plane of maximum variance is determined by the size of the difference between the two variances in this plane compared to noise. -EXAMPLES/ARGUMENTS IF lam_2 = lam_3 => th_min is NOT DEFINED AND th_max is NOT DEFINED IF lam_2 = 2*lam_3 => th_min = !PI/4 IF lam_2 = 2*lam_3 => th_min = !PI/30 IF lam_1 = lam_2 >> lam_3 => Minimum Variance Direction is still well defined! ******************************************************************************* Mazelle et. al. [2003] : Same Min. Var. variable definitions th_min = SQRT((lam_3*lam_2)/(N-1)/(lam_2 - lam_3)^2) {where : N = # of vectors measured, or # of data samples} ******************************************************************************* ==----------------------------------------------------------------------------- CALLS: rbsp_min_var.pro INPUT: FIELD : some [n,3] or [3,n] array of vectors EXAMPLES: KEYWORDS: RANGE : 2-element array defining the start and end point elements to use for calculating the min. var. NOMSSG : If set, TPLOT will NOT print out the index and TPLOT handle of the variables being plotted BKG_FIELD : [3]-Element vector for the background field to dot with MV-Vector produced in program [Default = DC(smoothed) value of input FIELD] CHANGED: 1) Changed calculation for angle of prop. w/ respect to B-field to the method defined directly above [09/29/2008 v1.0.2] 2) Corrected theta_{kB} calculation [10/05/2008 v1.0.3] 3) Changed theta_{kB} calculation, added calculation of minimum variance eigenvector error, and changed return structure [01/20/2009 v1.1.0] 4) Fixed theta_kB calc. (forgot to normalize B-field) [01/22/2009 v1.1.1] 5) Added keywords: NOMSSG and BKG_FIELD [12/04/2009 v1.2.0] 4) Fixed a typo in definition of GN variable [12/08/2009 v1.2.1] CREATED: 06/29/2008 CREATED BY: Lynn B. Wilson III LAST MODIFIED: 12/08/2009 v1.2.1 MODIFIED BY: Lynn B. Wilson III Aaron Breneman - changed name to rbsp_min_var_rot.pro. This version is unchanged from original aside from name change ***************************************************************************************** VERSION: $LastChangedBy: aaronbreneman $ $LastChangedDate: 2014-02-26 13:47:00 -0800 (Wed, 26 Feb 2014) $ $LastChangedRevision: 14449 $ $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/general/missions/rbsp/efw/utils/rbsp_min_var_rot.pro $
Routines
File attributes
Modification date: | Thu Mar 13 16:35:39 2014 |
Lines: | 119 |