mavis
Class MeasurementValue<T>

java.lang.Object
  extended by mavis.MeasurementValue<T>
Direct Known Subclasses:
NormalizedValue

public abstract class MeasurementValue<T>
extends java.lang.Object

Algorithms for calculating values from the measurements. A MeasurementValue object will be passed to the getValue() method of a project to retrieve the desired value, based on calculations from that data. The class contains new extensions for the Zijderveld plot coordinate system and also a few unfortunate hacks that involve the Origo step.


Field Summary
private  java.lang.String caption
          A short name for the value.
static MeasurementValue<java.lang.Double> DECLINATION
          Calculates the declination from the component averages in geographic coordinates.
private  java.lang.String description
          A long description of the value.
static MeasurementValue<java.lang.Double> DIFFERENCE_DECLINATION
          Calculates the difference in declination between two steps.
static MeasurementValue<java.lang.Double> DIFFERENCE_GEOGRAPHIC_X
          Calculates the difference in normalized X in geographic coordinates between two steps.
static MeasurementValue<java.lang.Double> DIFFERENCE_GEOGRAPHIC_Y
          Calculates the difference in normalized Y in geographic coordinates between two steps.
static MeasurementValue<java.lang.Double> DIFFERENCE_GEOGRAPHIC_Z
          Calculates the difference in normalized Z in geographic coordinates between two steps.
static MeasurementValue<java.lang.Double> DIFFERENCE_INCLINATION
          Calculates the difference in inclination between two steps.
static MeasurementValue<java.lang.Double> DIFFERENCE_MAGNETIZATION
          Calculates the difference in magnetization between two steps
static MeasurementValue<java.lang.Double> DIFFERENCE_SAMPLE_X
          Calculates the difference in normalized X in sample coordinates between two steps.
static MeasurementValue<java.lang.Double> DIFFERENCE_SAMPLE_Y
          Calculates the difference in normalized Y in sample coordinates between two steps.
static MeasurementValue<java.lang.Double> DIFFERENCE_SAMPLE_Z
          Calculates the difference in normalized Z in sample coordinates between two steps.
static MeasurementValue<java.lang.Double> GEOGRAPHIC_X
          Calculates the average of all X components in geographic coordinates.
static MeasurementValue<java.lang.Double> GEOGRAPHIC_X_NORMALIZED
          Calculates the normalized average of all X components in geographic coordinates.
static MeasurementValue<java.lang.Double> GEOGRAPHIC_Y
          Calculates the average of all Y components in geographic coordinates.
static MeasurementValue<java.lang.Double> GEOGRAPHIC_Y_NORMALIZED
          Calculates the normalized average of all Y components in geographic coordinates.
static MeasurementValue<java.lang.Double> GEOGRAPHIC_Z
          Calculates the average of all Z components in geographic coordinates.
static MeasurementValue<java.lang.Double> GEOGRAPHIC_Z_NORMALIZED
          Calculates the normalized average of all Z components in geographic coordinates.
static MeasurementValue<java.lang.Double> INCLINATION
          Calculates the inclination from the component averages in geographic coordinates.
static MeasurementValue<java.lang.Double> MAGNETIZATION
          Calculates the magnetic intensity (or remanence) from the moment and the sample's volume or mass (depending on the selected normalization).
static MeasurementValue<java.lang.Double> MOMENT
          Calculates the length of the vector from the component averages.
static MeasurementValue<java.lang.Double> RELATIVE_MAGNETIZATION
          Calculates the magnetic intensity (or remanence) relative to the first measurement's magnetic intensity.
static MeasurementValue<java.lang.Double> SAMPLE_X
          Calculates the average of all X components in sample coordinates.
static MeasurementValue<java.lang.Double> SAMPLE_X_NORMALIZED
          Calculates the normalized average of all X components in sample coordinates.
static MeasurementValue<java.lang.Double> SAMPLE_Y
          Calculates the average of all Y components in sample coordinates.
static MeasurementValue<java.lang.Double> SAMPLE_Y_NORMALIZED
          Calculates the normalized average of all Y components in sample coordinates.
static MeasurementValue<java.lang.Double> SAMPLE_Z
          Calculates the average of all Z components in sample coordinates.
static MeasurementValue<java.lang.Double> SAMPLE_Z_NORMALIZED
          Calculates the normalized average of all Z components in sample coordinates.
static MeasurementValue<java.lang.Double> SIGNAL_TO_DRIFT
          TODO: enter description
static MeasurementValue<java.lang.Double> SIGNAL_TO_HOLDER
          TODO: enter description
static MeasurementValue<java.lang.Double> SIGNAL_TO_NOISE
          TODO: enter description
static MeasurementValue<java.lang.Double> THETA63
          Calculates the angular standard deviation (Theta 63) from the measurement result set.
private  java.lang.String unit
          The unit of the value.
static MeasurementValue<java.lang.Double> ZIDJERVELD_X
          X coordinate for Zidjerveld plot and PCA
static MeasurementValue<java.lang.Double> ZIDJERVELD_X_NORMALIZED
          Normalized X coordinate for Zidjerveld plot and PCA
static MeasurementValue<java.lang.Double> ZIDJERVELD_Y
          Y coordinate for Zidjerveld plot and PCA
static MeasurementValue<java.lang.Double> ZIDJERVELD_Y_NORMALIZED
          Normalized Y coordinate for Zidjerveld plot and PCA
static MeasurementValue<java.lang.Double> ZIDJERVELD_Z
          Z coordinate for Zidjerveld plot and PCA
static MeasurementValue<java.lang.Double> ZIDJERVELD_Z_NORMALIZED
          Normalized Z coordinate for Zidjerveld plot and PCA
 
Constructor Summary
MeasurementValue(java.lang.String caption, java.lang.String unit, java.lang.String description)
          Creates a new measurement value.
 
Method Summary
 java.lang.String getCaption(Project project)
          Returns a short name for the value.
 java.lang.String getDescription(Project project)
          Returns a long description of the value.
private static MeasurementStep getPrev(MeasurementStep step)
          Returns the previous step in the measurement sequence
 java.lang.String getUnit(Project project)
          Returns the unit of the value.
abstract  T getValue(MeasurementStep step)
          Calculates a specific value from a measurement step.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GEOGRAPHIC_X

public static final MeasurementValue<java.lang.Double> GEOGRAPHIC_X
Calculates the average of all X components in geographic coordinates.


GEOGRAPHIC_Y

public static final MeasurementValue<java.lang.Double> GEOGRAPHIC_Y
Calculates the average of all Y components in geographic coordinates.


GEOGRAPHIC_Z

public static final MeasurementValue<java.lang.Double> GEOGRAPHIC_Z
Calculates the average of all Z components in geographic coordinates.


SAMPLE_X

public static final MeasurementValue<java.lang.Double> SAMPLE_X
Calculates the average of all X components in sample coordinates.


SAMPLE_Y

public static final MeasurementValue<java.lang.Double> SAMPLE_Y
Calculates the average of all Y components in sample coordinates.


SAMPLE_Z

public static final MeasurementValue<java.lang.Double> SAMPLE_Z
Calculates the average of all Z components in sample coordinates.


GEOGRAPHIC_X_NORMALIZED

public static final MeasurementValue<java.lang.Double> GEOGRAPHIC_X_NORMALIZED
Calculates the normalized average of all X components in geographic coordinates.


GEOGRAPHIC_Y_NORMALIZED

public static final MeasurementValue<java.lang.Double> GEOGRAPHIC_Y_NORMALIZED
Calculates the normalized average of all Y components in geographic coordinates.


GEOGRAPHIC_Z_NORMALIZED

public static final MeasurementValue<java.lang.Double> GEOGRAPHIC_Z_NORMALIZED
Calculates the normalized average of all Z components in geographic coordinates.


SAMPLE_X_NORMALIZED

public static final MeasurementValue<java.lang.Double> SAMPLE_X_NORMALIZED
Calculates the normalized average of all X components in sample coordinates.


SAMPLE_Y_NORMALIZED

public static final MeasurementValue<java.lang.Double> SAMPLE_Y_NORMALIZED
Calculates the normalized average of all Y components in sample coordinates.


SAMPLE_Z_NORMALIZED

public static final MeasurementValue<java.lang.Double> SAMPLE_Z_NORMALIZED
Calculates the normalized average of all Z components in sample coordinates.


DECLINATION

public static final MeasurementValue<java.lang.Double> DECLINATION
Calculates the declination from the component averages in geographic coordinates.


INCLINATION

public static final MeasurementValue<java.lang.Double> INCLINATION
Calculates the inclination from the component averages in geographic coordinates.


MOMENT

public static final MeasurementValue<java.lang.Double> MOMENT
Calculates the length of the vector from the component averages.


MAGNETIZATION

public static final MeasurementValue<java.lang.Double> MAGNETIZATION
Calculates the magnetic intensity (or remanence) from the moment and the sample's volume or mass (depending on the selected normalization).


RELATIVE_MAGNETIZATION

public static final MeasurementValue<java.lang.Double> RELATIVE_MAGNETIZATION
Calculates the magnetic intensity (or remanence) relative to the first measurement's magnetic intensity.


THETA63

public static final MeasurementValue<java.lang.Double> THETA63
Calculates the angular standard deviation (Theta 63) from the measurement result set. Formulas are based on information given in fisher_GTK.xls spreadsheet.


ZIDJERVELD_X

public static final MeasurementValue<java.lang.Double> ZIDJERVELD_X
X coordinate for Zidjerveld plot and PCA


ZIDJERVELD_Y

public static final MeasurementValue<java.lang.Double> ZIDJERVELD_Y
Y coordinate for Zidjerveld plot and PCA


ZIDJERVELD_Z

public static final MeasurementValue<java.lang.Double> ZIDJERVELD_Z
Z coordinate for Zidjerveld plot and PCA


ZIDJERVELD_X_NORMALIZED

public static final MeasurementValue<java.lang.Double> ZIDJERVELD_X_NORMALIZED
Normalized X coordinate for Zidjerveld plot and PCA


ZIDJERVELD_Y_NORMALIZED

public static final MeasurementValue<java.lang.Double> ZIDJERVELD_Y_NORMALIZED
Normalized Y coordinate for Zidjerveld plot and PCA


ZIDJERVELD_Z_NORMALIZED

public static final MeasurementValue<java.lang.Double> ZIDJERVELD_Z_NORMALIZED
Normalized Z coordinate for Zidjerveld plot and PCA


DIFFERENCE_GEOGRAPHIC_X

public static final MeasurementValue<java.lang.Double> DIFFERENCE_GEOGRAPHIC_X
Calculates the difference in normalized X in geographic coordinates between two steps. Used by DIFFERENCE_DECLINATION and DIFFERENCE_INCLINATION.


DIFFERENCE_GEOGRAPHIC_Y

public static final MeasurementValue<java.lang.Double> DIFFERENCE_GEOGRAPHIC_Y
Calculates the difference in normalized Y in geographic coordinates between two steps. Used by DIFFERENCE_DECLINATION and DIFFERENCE_INCLINATION.


DIFFERENCE_GEOGRAPHIC_Z

public static final MeasurementValue<java.lang.Double> DIFFERENCE_GEOGRAPHIC_Z
Calculates the difference in normalized Z in geographic coordinates between two steps. Used by DIFFERENCE_INCLINATION.


DIFFERENCE_SAMPLE_X

public static final MeasurementValue<java.lang.Double> DIFFERENCE_SAMPLE_X
Calculates the difference in normalized X in sample coordinates between two steps. Used by DIFFERENCE_MAGNETIZATION.


DIFFERENCE_SAMPLE_Y

public static final MeasurementValue<java.lang.Double> DIFFERENCE_SAMPLE_Y
Calculates the difference in normalized Y in sample coordinates between two steps. Used by DIFFERENCE_MAGNETIZATION.


DIFFERENCE_SAMPLE_Z

public static final MeasurementValue<java.lang.Double> DIFFERENCE_SAMPLE_Z
Calculates the difference in normalized Z in sample coordinates between two steps. Used by DIFFERENCE_MAGNETIZATION.


DIFFERENCE_MAGNETIZATION

public static final MeasurementValue<java.lang.Double> DIFFERENCE_MAGNETIZATION
Calculates the difference in magnetization between two steps


DIFFERENCE_DECLINATION

public static final MeasurementValue<java.lang.Double> DIFFERENCE_DECLINATION
Calculates the difference in declination between two steps.


DIFFERENCE_INCLINATION

public static final MeasurementValue<java.lang.Double> DIFFERENCE_INCLINATION
Calculates the difference in inclination between two steps.


SIGNAL_TO_NOISE

public static final MeasurementValue<java.lang.Double> SIGNAL_TO_NOISE
TODO: enter description


SIGNAL_TO_DRIFT

public static final MeasurementValue<java.lang.Double> SIGNAL_TO_DRIFT
TODO: enter description


SIGNAL_TO_HOLDER

public static final MeasurementValue<java.lang.Double> SIGNAL_TO_HOLDER
TODO: enter description


caption

private final java.lang.String caption
A short name for the value.


unit

private final java.lang.String unit
The unit of the value.


description

private final java.lang.String description
A long description of the value.

Constructor Detail

MeasurementValue

public MeasurementValue(java.lang.String caption,
                        java.lang.String unit,
                        java.lang.String description)
Creates a new measurement value.

Parameters:
caption - a short name for the value.
unit - the unit of the value.
description - a long description of the value.
Throws:
java.lang.NullPointerException - if any of the arguments is null.
Method Detail

getValue

public abstract T getValue(MeasurementStep step)
Calculates a specific value from a measurement step.

Parameters:
step - the step from which the value will be calculated.
Returns:
the calculated value, or null if it was not possible to calculate it.
Throws:
java.lang.NullPointerException - if step is null.

getCaption

public java.lang.String getCaption(Project project)
Returns a short name for the value.

Parameters:
project - the currently active project, or null if no project is active. Used for returning a different text depending on the project.

getUnit

public java.lang.String getUnit(Project project)
Returns the unit of the value.

Parameters:
project - the currently active project, or null if no project is active. Used for returning a different text depending on the project.

getDescription

public java.lang.String getDescription(Project project)
Returns a long description of the value.

Parameters:
project - the currently active project, or null if no project is active. Used for returning a different text depending on the project.

getPrev

private static MeasurementStep getPrev(MeasurementStep step)
Returns the previous step in the measurement sequence

Parameters:
step - the step whose
Returns:
the step before the step given as a parameter.