QSAS_2_4/QSAS_dist/src/Ext/DeHT/HofTel.cc File Reference

#include <stdio.h>
#include <math.h>
#include <string.h>
#include <stdlib.h>
#include "qplug_if.h"
#include "qdutil.h"
#include "Qdos.h"
#include "qar.h"
#include <qstring.h>
#include <qdatetime.h>
#include "GenericMinVar.h"

Functions

QdRMatrix_var Q_MVAB_calc (QdRMatrixSeq_var B, QdRMatrixSeq_var V, QdRMatrix_var U, QdRMatrixSeq_var Valf, QdRScalarSeq_var N, double *wl, double *cc, int nestsize, int full)
double slope (QdRMatrixSeq_var X_in, QdRMatrixSeq_var Y_in, int n)
 calculates the regression line
double correlationCoeff (QdRMatrixSeq_var X_in, QdRMatrixSeq_var Y_in, int n)
 calculates the correlation coefficient between two 3 element vectors
double QSAS_vecsum2 (QdRMatrix_var Vector)
 Calculates the length of a vector.
double QSAS_vecsum2 (QdRMatrixSeq_var VectorSeq, long index)
 Calculates the length of a vector.
double minimizeD (int M, QdRMatrix_var V, QdRMatrixSeq_var vm, QdRMatrixSeq_var Bm)
 Calculate the least square residue between two vectors.
QdRMatrix_var V_HTcalc (long nestsize, double deltat, QdRMatrixSeq_var B, QdRMatrixSeq_var V, QdRMatrix_var K0, QdRMatrix_var K, QdRMatrix_var K1, QdRMatrix_var K2, QdRMatrix_var KV, QdRMatrix_var KVT)
 calculates the deHoffmann-Teller velcoity
QdRMatrix_var str2Vec (QString s)
 Parses the a text and converts text to a Vector.
QdRMatrix_var aveVectorOver (QdRMatrixSeq_var VectorSeq, long start, long stop)
 Calculates the average of a vector between two indices.
double aveScalarOver (QdRScalarSeq_var ScalarSeq, long start, long stop)
 Calculates the average of a scalar between two indices.
QplugReturnStatus HofTel (QplugArgList *call_list)
 Perform a deHoffmann-Teller analysis and return the results as QSAS_objects and outputs.
int main ()

Function Documentation

double aveScalarOver ( QdRScalarSeq_var  ScalarSeq,
long  start,
long  stop 
)

Calculates the average of a scalar between two indices.

Returns:
a Scalar with the average
Parameters:
ScalarSeq - vector series
start,stop - indices to average over
use overloading ?

QdRMatrix_var aveVectorOver ( QdRMatrixSeq_var  VectorSeq,
long  start,
long  stop 
)

Calculates the average of a vector between two indices.

Returns:
a Vector with the average
Parameters:
VectorSeq - vector series
start,stop - indices to average over

double correlationCoeff ( QdRMatrixSeq_var  X_in,
QdRMatrixSeq_var  Y_in,
int  n 
)

calculates the correlation coefficient between two 3 element vectors

Returns:
a double with correlation coefficient
Parameters:
X_in - 3 component vector with time series 1
Y_in - 3 component vector with time series 2
n - number of elements in the two vectors

QplugReturnStatus HofTel ( QplugArgList call_list  ) 

Perform a deHoffmann-Teller analysis and return the results as QSAS_objects and outputs.

performs a deHoffmann-Teller analysis

Parameters:
call_list - pointer to a list of input objects

int main (  ) 

double minimizeD ( int  M,
QdRMatrix_var  V,
QdRMatrixSeq_var  vm,
QdRMatrixSeq_var  Bm 
)

Calculate the least square residue between two vectors.

Returns:
the least square residue
Parameters:
M - number of elements in the input vectors
V - vector time series
vm - vector time series
Bm - vector time series
Calculates the residual from Eq 9.8 in blue ISSI book

QdRMatrix_var Q_MVAB_calc ( QdRMatrixSeq_var  B,
QdRMatrixSeq_var  V,
QdRMatrix_var  U,
QdRMatrixSeq_var  Valf,
QdRScalarSeq_var  N,
double *  wl,
double *  cc,
int  nestsize,
int  full 
)

double QSAS_vecsum2 ( QdRMatrixSeq_var  VectorSeq,
long  index 
)

Calculates the length of a vector.

Returns:
the norm^2 of a vector TS
Parameters:
VectorSeq - vector series
index - select element in vector series to calculate norm^2
Overloaded of below

double QSAS_vecsum2 ( QdRMatrix_var  Vector  ) 

Calculates the length of a vector.

Returns:
the norm^2 of a vector
Parameters:
Vector - vector

double slope ( QdRMatrixSeq_var  X_in,
QdRMatrixSeq_var  Y_in,
int  n 
)

calculates the regression line

Returns:
a double with the slope, i.e., the coeff b in y(x) = a + bx
Parameters:
X_in - 3 component vector with time series 1
Y_in - 3 component vector with time series 2
n - number of elements in the two vectors

QdRMatrix_var str2Vec ( QString  s  ) 

Parses the a text and converts text to a Vector.

Returns:
QSAS matrix with the parsed values of the string
Parameters:
s - a string on the form '[2.00 -23.0 9.0]'

QdRMatrix_var V_HTcalc ( long  nestsize,
double  deltat,
QdRMatrixSeq_var  B,
QdRMatrixSeq_var  V,
QdRMatrix_var  K0,
QdRMatrix_var  K,
QdRMatrix_var  K1,
QdRMatrix_var  K2,
QdRMatrix_var  KV,
QdRMatrix_var  KVT 
)

calculates the deHoffmann-Teller velcoity

Returns:
a vector with the deHoffmann-Teller velocity in the same frame as the input data
Parameters:
nestsize - number of elements in the B-field and Velcity vectors
deltat - sampling time - used for the accellerated HT frame
B - vector time series with magnetic field
V - vector time series with plasma velocity
K0 - 3x3 projection matrix - see Blue ISSI book, p 226
K - 3x3 projection matrix - see Blue ISSI book, p 226
K1 - 3x3 projection matrix - see Blue ISSI book, p 240
K2 - 3x3 projection matrix - see Blue ISSI book, p 240
KV - 6x6 projection matrix - see Blue ISSI book, p 240
KVT - 6x6 projection matrix - see Blue ISSI book, p 240
This routine calculates a deHoffmann-Teller velocity and fills in the various projection matrices as given by the ISSI book on Multi-spacecraft analysis (ISSI SR-001)


Generated on Fri Jan 8 12:51:22 2010 for QSAS by  doxygen 1.5.7