net.talvi.puffinplot.data
Enum DatumField

java.lang.Object
  extended by java.lang.Enum<DatumField>
      extended by net.talvi.puffinplot.data.DatumField
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<DatumField>

public enum DatumField
extends java.lang.Enum<DatumField>

This enum represents a field in the Datum class which is associated with a measurement or other value. It is used to address data values from Datum in a uniform way, for example when loading or saving data.

Each field has a heading, a string representation intended for use when reading or writing data from to to a file, and a nice name, a string representation intended to be displayed to the user. In practice these are currently identical for all existing fields, but this should not be relied upon.

Fields are classed as either ‘real’ (corresponding to an actual stored item of data) or ‘virtual’ (corresponding to data which is not explicitly stored but can be calculated on-the-fly from other data). The distinction is useful when storing data to a file, since virtual fields do not need to be stored.

See Also:
Datum

Enum Constant Summary
AF_X
          for treatments involving AF, the AF x-axis field strength in Tesla
AF_Y
          for treatments involving AF, the AF y-axis field strength in Tesla
AF_Z
          for treatments involving AF, the AF z-axis field strength in Tesla
AREA
          the cross-sectional area of a continuous core
ARM_AXIS
          for ARM treatment, the axis along which the biasing field was applied
ARM_FIELD
          for ARM treatment, the biasing field strength in Tesla
DEPTH
          the depth in the core of a continuous measurement
DISCRETE_ID
          the identifier (name) of a discrete sample
FORM_AZ
          the formation dip azimuth in degrees
FORM_DIP
          the formation dip angle in degrees
IRM_FIELD
          for IRM treatment, the field strength in Tesla
MAG_DEV
          the local geomagnetic field declination at the sampling site
MAG_SUS
          the measured magnetic susceptibility
MEAS_TYPE
          the type of the measurement (discrete or continuous)
PP_ANCHOR_PCA
          whether PCA fits are to be anchored for this datum
PP_HIDDEN
          whether this datum should be hidden on plots
PP_INPCA
          whether this datum is used for a PCA fit
PP_ONCIRCLE
          whether this datum is used for a great-circle fit
PP_SELECTED
          the selection state of the datum
RUN_NUMBER
          the number of the machine run during which the measurements were made
SAMPLE_AZ
          the sample dip azimuth in degrees
SAMPLE_DIP
          the sample dip angle in degrees
SLOT_NUMBER
          for discrete samples, the position of the sample on the measurement tray
TEMPERATURE
          for thermal treatment, the temperature in degrees Celsius
TIMESTAMP
          the timestamp of the measurement
TREATMENT
          the type of treatment applied before measurement (thermal, AF, etc.)
VIRT_DECLINATION
          declination of magnetization vector (degrees)
VIRT_FORM_STRIKE
          the strike of the formation orientation (degrees)
VIRT_INCLINATION
          inclination of magnetization vector (degrees)
VIRT_MAGNETIZATION
          the intensity of the magnetic dipole moment per unit volume (‘magnetization’)
VIRT_MSJUMP
          the temperature at which the magnetic susceptibility increases sharply
VIRT_SAMPLE_HADE
          the hade of a discrete sample (degrees)
VOLUME
          the volume of a discrete sample
X_MOMENT
          the x component of the magnetic moment measurement
Y_MOMENT
          the y component of the magnetic moment measurement
Z_MOMENT
          the z component of the magnetic moment measurement
 
Method Summary
static DatumField getByHeading(java.lang.String heading)
          Returns the field whose heading string is the specified string, or null if no such field exists.
 java.lang.String getDefaultValue()
          Currently only used in Datum.setValue(DatumField, String).
 java.lang.String getHeading()
          Returns the heading string for this field.
 java.lang.String getNiceName()
          Returns this field's ‘nice name’ (string representation for display to user)
static java.util.List<java.lang.String> getRealFieldHeadings()
          Returns an unmodifiable list of the headings of the real fields.
static java.util.List<DatumField> getRealFields()
          Returns an unmodifiable list of the real fields.
 boolean isImportable()
          Reports whether this field is importable.
 boolean isVirtual()
          Reports whether this field is virtual.
static DatumField valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static DatumField[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

DISCRETE_ID

public static final DatumField DISCRETE_ID
the identifier (name) of a discrete sample


DEPTH

public static final DatumField DEPTH
the depth in the core of a continuous measurement


RUN_NUMBER

public static final DatumField RUN_NUMBER
the number of the machine run during which the measurements were made


TIMESTAMP

public static final DatumField TIMESTAMP
the timestamp of the measurement


SLOT_NUMBER

public static final DatumField SLOT_NUMBER
for discrete samples, the position of the sample on the measurement tray


MEAS_TYPE

public static final DatumField MEAS_TYPE
the type of the measurement (discrete or continuous)


X_MOMENT

public static final DatumField X_MOMENT
the x component of the magnetic moment measurement


Y_MOMENT

public static final DatumField Y_MOMENT
the y component of the magnetic moment measurement


Z_MOMENT

public static final DatumField Z_MOMENT
the z component of the magnetic moment measurement


MAG_SUS

public static final DatumField MAG_SUS
the measured magnetic susceptibility


VOLUME

public static final DatumField VOLUME
the volume of a discrete sample


AREA

public static final DatumField AREA
the cross-sectional area of a continuous core


SAMPLE_AZ

public static final DatumField SAMPLE_AZ
the sample dip azimuth in degrees


SAMPLE_DIP

public static final DatumField SAMPLE_DIP
the sample dip angle in degrees


FORM_AZ

public static final DatumField FORM_AZ
the formation dip azimuth in degrees


FORM_DIP

public static final DatumField FORM_DIP
the formation dip angle in degrees


MAG_DEV

public static final DatumField MAG_DEV
the local geomagnetic field declination at the sampling site


TREATMENT

public static final DatumField TREATMENT
the type of treatment applied before measurement (thermal, AF, etc.)


AF_X

public static final DatumField AF_X
for treatments involving AF, the AF x-axis field strength in Tesla


AF_Y

public static final DatumField AF_Y
for treatments involving AF, the AF y-axis field strength in Tesla


AF_Z

public static final DatumField AF_Z
for treatments involving AF, the AF z-axis field strength in Tesla


TEMPERATURE

public static final DatumField TEMPERATURE
for thermal treatment, the temperature in degrees Celsius


IRM_FIELD

public static final DatumField IRM_FIELD
for IRM treatment, the field strength in Tesla


ARM_FIELD

public static final DatumField ARM_FIELD
for ARM treatment, the biasing field strength in Tesla


ARM_AXIS

public static final DatumField ARM_AXIS
for ARM treatment, the axis along which the biasing field was applied


PP_SELECTED

public static final DatumField PP_SELECTED
the selection state of the datum


PP_ANCHOR_PCA

public static final DatumField PP_ANCHOR_PCA
whether PCA fits are to be anchored for this datum


PP_HIDDEN

public static final DatumField PP_HIDDEN
whether this datum should be hidden on plots


PP_ONCIRCLE

public static final DatumField PP_ONCIRCLE
whether this datum is used for a great-circle fit


PP_INPCA

public static final DatumField PP_INPCA
whether this datum is used for a PCA fit


VIRT_MAGNETIZATION

public static final DatumField VIRT_MAGNETIZATION
the intensity of the magnetic dipole moment per unit volume (‘magnetization’)


VIRT_DECLINATION

public static final DatumField VIRT_DECLINATION
declination of magnetization vector (degrees)


VIRT_INCLINATION

public static final DatumField VIRT_INCLINATION
inclination of magnetization vector (degrees)


VIRT_MSJUMP

public static final DatumField VIRT_MSJUMP
the temperature at which the magnetic susceptibility increases sharply


VIRT_SAMPLE_HADE

public static final DatumField VIRT_SAMPLE_HADE
the hade of a discrete sample (degrees)


VIRT_FORM_STRIKE

public static final DatumField VIRT_FORM_STRIKE
the strike of the formation orientation (degrees)

Method Detail

values

public static DatumField[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (DatumField c : DatumField.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static DatumField valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

getByHeading

public static DatumField getByHeading(java.lang.String heading)
Returns the field whose heading string is the specified string, or null if no such field exists.

Parameters:
heading - a heading string for a field
Returns:
the field whose heading string is the specified string, or null if no such field exists

getHeading

public java.lang.String getHeading()
Returns the heading string for this field.

Returns:
the heading string for this field

getNiceName

public java.lang.String getNiceName()
Returns this field's ‘nice name’ (string representation for display to user)

Returns:
this field's ‘nice name’ (string representation for display to user)

getDefaultValue

public java.lang.String getDefaultValue()
Currently only used in Datum.setValue(DatumField, String).

Returns:
a string representation of the default value for the field

isVirtual

public boolean isVirtual()
Reports whether this field is virtual. Virtual fields have no corresponding explicitly stored data value. Their values are calculated on-the-fly from other fields.

Returns:
true if this field is virtual

isImportable

public boolean isImportable()
Reports whether this field is importable. Importable fields are those which may be specified for custom data import. Note that (perhaps counterintuitively) the virtual fields for declination, inclination, and magnetization are importable, although they cannot be set by Datum.setValue(DatumField, String): they are handled as a special case by FileFormat.readLine(String).

Returns:
true if this field is importable

getRealFields

public static java.util.List<DatumField> getRealFields()
Returns an unmodifiable list of the real fields. A real field corresponds to an explicitly stored data value.

Returns:
an unmodifiable list of the real fields

getRealFieldHeadings

public static java.util.List<java.lang.String> getRealFieldHeadings()
Returns an unmodifiable list of the headings of the real fields. A real field corresponds to an explicitly stored data value.

Returns:
an unmodifiable list of the headings of the real fields