net.talvi.puffinplot.data
Class KentParams

java.lang.Object
  extended by net.talvi.puffinplot.data.KentParams

public class KentParams
extends java.lang.Object

A class representing the parameters of a Kent confidence ellipse. It also provides methods to calculate the parameters from sets of tensors using programs from Lisa Tauxe's pmagpy suite.

For details of the pmagpy programs and anisotropy statistics, see Lisa Tauxe, Essentials of Paleomagnetism (University of California Press, 2010).


Constructor Summary
KentParams(double tau, double tauSigma, double dec, double inc, double etaMag, double etaDec, double etaInc, double zetaMag, double zetaDec, double zetaInc)
          Creates an object representing a Kent confidence ellipse defined by the supplied parameters.
KentParams(java.lang.String line)
          Creates an object representing a Kent confidence ellipse defined by the parameters listed in the supplied string.
 
Method Summary
static java.util.List<KentParams> calculateBootstrap(java.util.List<Tensor> tensors, boolean parametric, java.lang.String scriptPath)
          Calculates 95% Kent confidence ellipses from the supplied tensors by running the bootams.py script from Lisa Tauxe's pmagpy suite.
static java.util.List<KentParams> calculateHext(java.util.List<Tensor> tensors, java.lang.String scriptPath)
          Calculates 95% Kent confidence ellipses from the supplied tensors by running the s_hext.py script from Lisa Tauxe's pmagpy suite.
 Vec3 getEtaDir()
          Returns the direction of the confidence ellipse's first axis
 double getEtaMag()
          Returns the semiangle of the confidence ellipse's first axis
 Vec3 getMean()
          Returns the mean direction
 double getTau()
          Returns the tau value (eigenvalue of normalized mean susceptibility tensor).
 double getTauSigma()
          Returns (95% confidence region for tau)
 Vec3 getZetaDir()
          Returns the direction of the confidence ellipse's second axis
 double getZetaMag()
          Returns the semiangle of the confidence ellipse's second axis
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KentParams

public KentParams(double tau,
                  double tauSigma,
                  double dec,
                  double inc,
                  double etaMag,
                  double etaDec,
                  double etaInc,
                  double zetaMag,
                  double zetaDec,
                  double zetaInc)
Creates an object representing a Kent confidence ellipse defined by the supplied parameters.

Parameters:
tau - the tau value (eigenvalue of normalized mean susceptibility tensor)
tauSigma - (95% confidence region for tau)
dec - the mean declination in degrees
inc - the mean inclination in degrees
etaMag - the semiangle of the confidence ellipse's first axis
etaDec - the declination of the confidence ellipse's first axis
etaInc - the inclination of the confidence ellipse's first axis
zetaMag - the semiangle of the confidence ellipse's second axis
zetaDec - the declination of the confidence ellipse's second axis
zetaInc - the inclination of the confidence ellipse's second axis

KentParams

public KentParams(java.lang.String line)

Creates an object representing a Kent confidence ellipse defined by the parameters listed in the supplied string. The parameters in the string should be separated by white space, and occur in the following order:

tau tau_sigma mean_dec mean_inc eta_semiangle eta_dec eta_inc zeta_semiangle zeta_dec zeta_inc

In the above, dec and inc refer to declination and inclination respectively; all angles are given in degrees.

Parameters:
line -
Method Detail

calculateBootstrap

public static java.util.List<KentParams> calculateBootstrap(java.util.List<Tensor> tensors,
                                                            boolean parametric,
                                                            java.lang.String scriptPath)
                                                     throws java.io.IOException
Calculates 95% Kent confidence ellipses from the supplied tensors by running the bootams.py script from Lisa Tauxe's pmagpy suite. The ellipses are calculated by bootstrap statistics.

Parameters:
tensors - the tensors on which to calculate statistics
parametric - true to use a parametric bootstrap; to use a ‘naïve’ bootstrap
scriptPath - filesystem path to the bootams.py script
Returns:
a list of three 95% Kent confidence ellipses for the supplied data. The ellipses are for the maximum, intermediate, and minimum axes, in that order
Throws:
java.io.IOException - if an I/O error occurred

calculateHext

public static java.util.List<KentParams> calculateHext(java.util.List<Tensor> tensors,
                                                       java.lang.String scriptPath)
                                                throws java.io.IOException
Calculates 95% Kent confidence ellipses from the supplied tensors by running the s_hext.py script from Lisa Tauxe's pmagpy suite. The ellipses are calculated by Hext statistics. Note that no value is calculated for tau_sigma, which is set to zero.

Parameters:
tensors - the tensors on which to calculate statistics
scriptPath - filesystem path to the s_hext.py script
Returns:
a list of three 95% Kent confidence ellipses for the supplied data. The ellipses are for the maximum, intermediate, and minimum axes, in that order
Throws:
java.io.IOException - if an I/O error occurred

getTau

public double getTau()
Returns the tau value (eigenvalue of normalized mean susceptibility tensor).

Returns:
the tau value (eigenvalue of normalized mean susceptibility tensor).

getTauSigma

public double getTauSigma()
Returns (95% confidence region for tau)

Returns:
(95% confidence region for tau)

getMean

public Vec3 getMean()
Returns the mean direction

Returns:
the mean direction

getEtaMag

public double getEtaMag()
Returns the semiangle of the confidence ellipse's first axis

Returns:
the semiangle of the confidence ellipse's first axis

getEtaDir

public Vec3 getEtaDir()
Returns the direction of the confidence ellipse's first axis

Returns:
the direction of the confidence ellipse's first axis

getZetaMag

public double getZetaMag()
Returns the semiangle of the confidence ellipse's second axis

Returns:
the semiangle of the confidence ellipse's second axis

getZetaDir

public Vec3 getZetaDir()
Returns the direction of the confidence ellipse's second axis

Returns:
the direction of the confidence ellipse's second axis