ikayaki
Class MeasurementValue<T>

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

public abstract class MeasurementValue<T>
extends 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.

Author:
Esko Luontola

Field Summary
private  String caption
          A short name for the value.
static MeasurementValue<Double> DECLINATION
          Calculates the declination from the component averages in geographic coordinates.
private  String description
          A long description of the value.
static MeasurementValue<Double> GEOGRAPHIC_X
          Calculates the average of all X components in geographic coordinates.
static MeasurementValue<Double> GEOGRAPHIC_X_NORMALIZED
          Calculates the normalized average of all X components in geographic coordinates.
static MeasurementValue<Double> GEOGRAPHIC_Y
          Calculates the average of all Y components in geographic coordinates.
static MeasurementValue<Double> GEOGRAPHIC_Y_NORMALIZED
          Calculates the normalized average of all Y components in geographic coordinates.
static MeasurementValue<Double> GEOGRAPHIC_Z
          Calculates the average of all Z components in geographic coordinates.
static MeasurementValue<Double> GEOGRAPHIC_Z_NORMALIZED
          Calculates the normalized average of all Z components in geographic coordinates.
static MeasurementValue<Double> INCLINATION
          Calculates the inclination from the component averages in geographic coordinates.
static MeasurementValue<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<Double> MOMENT
          Calculates the length of the vector from the component averages.
static MeasurementValue<Double> RELATIVE_MAGNETIZATION
          Calculates the magnetic intensity (or remanence) relative to the first measurement's magnetic intensity.
static MeasurementValue<Double> SAMPLE_X
          Calculates the average of all X components in sample coordinates.
static MeasurementValue<Double> SAMPLE_X_NORMALIZED
          Calculates the normalized average of all X components in sample coordinates.
static MeasurementValue<Double> SAMPLE_Y
          Calculates the average of all Y components in sample coordinates.
static MeasurementValue<Double> SAMPLE_Y_NORMALIZED
          Calculates the normalized average of all Y components in sample coordinates.
static MeasurementValue<Double> SAMPLE_Z
          Calculates the average of all Z components in sample coordinates.
static MeasurementValue<Double> SAMPLE_Z_NORMALIZED
          Calculates the normalized average of all Z components in sample coordinates.
static MeasurementValue<Double> SIGNAL_TO_DRIFT
          TODO: enter description
static MeasurementValue<Double> SIGNAL_TO_HOLDER
          TODO: enter description
static MeasurementValue<Double> SIGNAL_TO_NOISE
          TODO: enter description
static MeasurementValue<Double> THETA63
          Calculates the angular standard deviation (Theta 63) from the measurement result set.
private  String unit
          The unit of the value.
 
Constructor Summary
MeasurementValue(String caption, String unit, String description)
          Creates a new measurement value.
 
Method Summary
 String getCaption(Project project)
          Returns a short name for the value.
 String getDescription(Project project)
          Returns a long description of the value.
 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<Double> GEOGRAPHIC_X
Calculates the average of all X components in geographic coordinates.


GEOGRAPHIC_Y

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


GEOGRAPHIC_Z

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


SAMPLE_X

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


SAMPLE_Y

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


SAMPLE_Z

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


GEOGRAPHIC_X_NORMALIZED

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


GEOGRAPHIC_Y_NORMALIZED

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


GEOGRAPHIC_Z_NORMALIZED

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


SAMPLE_X_NORMALIZED

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


SAMPLE_Y_NORMALIZED

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


SAMPLE_Z_NORMALIZED

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


DECLINATION

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


INCLINATION

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


MOMENT

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


MAGNETIZATION

public static final MeasurementValue<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<Double> RELATIVE_MAGNETIZATION
Calculates the magnetic intensity (or remanence) relative to the first measurement's magnetic intensity.


THETA63

public static final MeasurementValue<Double> THETA63
Calculates the angular standard deviation (Theta 63) from the measurement result set.


SIGNAL_TO_NOISE

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


SIGNAL_TO_DRIFT

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


SIGNAL_TO_HOLDER

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


caption

private final String caption
A short name for the value.


unit

private final String unit
The unit of the value.


description

private final String description
A long description of the value.

Constructor Detail

MeasurementValue

public MeasurementValue(String caption,
                        String unit,
                        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:
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:
NullPointerException - if step is null.

getCaption

public 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 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 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.