|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.talvi.puffinplot.data.Datum
public class Datum
Datum is the fundamental data class of PuffinPlot. It represents the
state of a sample at a particular point during the stepwise demagnetization
process. The essential item of data is the demagnetization vector
representing a particular magnetometer measurement. A large number of
other fields give additional data about demagnetization procedures,
other measurements, and sample characteristics. Some of these fields
(such as the sample orientation) are in fact sample-level data rather
than demagnetization-step-level data, and may be moved to Sample
in a later version of PuffinPlot.
Datum is a mutable container class which is intended to be instantiated with no or very little data. Most of the fields can be set after instantiation using setter methods.
In terms of PuffinPlot's user interface, a Datum often defines the position and appearance of a point on one or more of the plots.
DatumField
Nested Class Summary | |
---|---|
static class |
Datum.Reader
This class allows datum objects to be created from string representations of a specified format. |
Constructor Summary | |
---|---|
Datum()
Creates a datum with no data. |
|
Datum(double x,
double y,
double z)
Creates a datum with a specified magnetization vector. |
|
Datum(Vec3 vector)
Creates a datum with a supplied magnetization vector. |
Method Summary | |
---|---|
java.lang.String |
exportFieldValues(java.util.Collection<DatumField> fields,
java.lang.String delimiter)
Produces a string containing string representations of the contents of selected data fields. |
double |
getAfX()
For AF or ARM treatment, returns the AF field strength in the x axis. |
double |
getAfY()
For AF or ARM treatment, returns the AF field strength in the y axis. |
double |
getAfZ()
For AF or ARM treatment, returns the AF field strength in the z axis. |
double |
getArea()
For continuous measurements, returns the cross-sectional area of the core. |
ArmAxis |
getArmAxis()
For ARM treatment, returns the axis of the ARM field. |
double |
getArmField()
For ARM treatment, returns the ARM bias field strength. |
java.lang.String |
getDepth()
For continuous measurements, returns the depth of this measurement within the core. |
java.lang.String |
getDiscreteId()
For discrete samples, returns the sample identifier (name). |
double |
getFormAz()
Returns the formation dip azimuth. |
double |
getFormDip()
Returns the formation dip angle. |
double |
getFormStrike()
Returns the formation strike for this datum. |
java.lang.String |
getIdOrDepth()
Returns sample identifier or measurement depth. |
double |
getIntensity()
Returns the magnitude of the magnetic dipole moment per unit volume in A/m. |
double |
getIrmField()
For IRM treatment, returns the IRM field strength. |
Line |
getLine()
Returns the measurement's data-file line. |
double |
getMagDev()
Returns the local geomagnetic field declination for the sampling site. |
double |
getMagSus()
Returns the magnetic susceptibility of the sample at this stage of treatment |
MeasType |
getMeasType()
Returns the type of this measurement (discrete or continuous). |
Vec3 |
getMoment()
Strictly speaking, the name is not quite accurate: we do not deal with magnetic moment (which would be in Am2) but in magnetic dipole moment per unit volume (in A/m). |
Vec3 |
getMoment(Correction correction)
Returns the measured magnetic dipole moment per unit volume, as modified by the supplied correction. |
int |
getRunNumber()
Returns the number of the machine run during which this measurement was made. |
double |
getSampAz()
Returns the sample's dip azimuth. |
double |
getSampDip()
Returns the sample's dip angle. |
double |
getSampHade()
Returns the sample hade for this datum. |
Sample |
getSample()
Returns the sample of which this measurement was made. |
int |
getSlotNumber()
Returns the number of the measurement tray slot in which the sample was measured. |
Suite |
getSuite()
Returns the data suite containing this measurement. |
double |
getTemp()
For thermal treatment, returns the temperature in degrees Celsius. |
java.lang.String |
getTimestamp()
Returns the timestamp of this measurement. |
double |
getTreatmentLevel()
Returns a numerical representation of the intensity of the treatment which was applied immediately before this measurement. |
TreatType |
getTreatType()
Returns the treatment applied before this measurement (AF, thermal, etc.). |
java.lang.String |
getValue(DatumField field)
Returns a String representation of a value from a specified data field. |
double |
getVolume()
For discrete measurements, returns the volume of the sample. |
double |
getXDrift()
Returns the x drift correction value. |
double |
getYDrift()
Returns the y drift correction value. |
double |
getZDrift()
Returns the z drift correction value. |
boolean |
hasMagMoment()
Reports whether the datum contains a magnetic moment measurement. |
boolean |
hasMagSus()
Reports whether this datum has any magnetic susceptibility data. |
boolean |
ignoreOnLoading()
Returns true if this datum should be ignored (thrown away)
when loading a data file. |
boolean |
isHidden()
Reports whether this datum should be hidden on plots. |
boolean |
isInPca()
Reports whether this measurement is used for a PCA fit. |
boolean |
isMagSusOnly()
Reports whether this datum has magnetic susceptibility but not magnetic moment data. |
boolean |
isOnCircle()
Reports whether this measurement is used for a great-circle fit. |
boolean |
isPcaAnchored()
Reports whether PCA fits for this point should be anchored. |
boolean |
isSelected()
Reports whether this datum is selected. |
static double |
maxIntensity(java.util.List<Datum> data)
Returns the maximum magnitude of magnetic dipole moment per unit volume within the supplied group of datum objects. |
static double |
maxMagSus(java.util.List<Datum> data)
Returns the maximum magnetic susceptibility within the supplied group of datum objects. |
static double |
maxTreatmentLevel(java.util.List<Datum> data)
Returns the maximum treatment level within the supplied group of datum objects. |
void |
rot180(MeasurementAxis axis)
Rotates magnetic moment data 180 degrees about the specified axis. |
void |
setAfX(double v)
For AF or ARM treatment, sets the AF field strength in the x axis. |
void |
setAfY(double v)
For AF or ARM treatment, sets the AF field strength in the y axis. |
void |
setAfZ(double v)
For AF or ARM treatment, sets the AF field strength in the z axis. |
void |
setArea(double v)
For continuous measurements, sets the cross-sectional area of the core. |
void |
setArmAxis(ArmAxis v)
For ARM treatment, sets the axis of the ARM field. |
void |
setArmField(double v)
For ARM treatment, sets the ARM bias field strength. |
void |
setDepth(java.lang.String v)
For continuous measurements, sets the depth of this measurement within the core. |
void |
setDiscreteId(java.lang.String v)
For discrete samples, sets the sample identifier (name). |
void |
setFormAz(double v)
Sets the formation dip azimuth. |
void |
setFormDip(double v)
Sets the formation dip angle. |
void |
setFormStrike(double strikeDeg)
Sets the formation strike for this datum. |
void |
setHidden(boolean v)
Sets whether this datum should be hidden on plots. |
void |
setInPca(boolean v)
Sets whether this measurement is to be used for a PCA fit. |
void |
setIrmField(double v)
For IRM treatment, sets the IRM field strength. |
void |
setLine(Line v)
Sets the measurement's data-file line. |
void |
setMagDev(double v)
Sets the local geomagnetic field declination for the sampling site. |
void |
setMagSus(double v)
Sets the magnetic susceptibility of the sample at this stage of treatment. |
void |
setMeasType(MeasType v)
Sets the type of this measurement (discrete or continuous). |
void |
setMoment(Vec3 v)
Sets the sample's magnetic dipole moment per unit volume in A/m. |
void |
setOnCircle(boolean v)
Sets whether this measurement is to be used for a great-circle fit. |
void |
setPcaAnchored(boolean v)
Sets whether PCA fits for this point should be anchored. |
void |
setRunNumber(int v)
Sets the number of the machine run during which this measurement was made. |
void |
setSampAz(double v)
Sets the sample's dip azimuth. |
void |
setSampDip(double v)
Sets the sample's dip angle. |
void |
setSampHade(double hadeDeg)
Sets the sample hade for this datum. |
void |
setSample(Sample v)
Sets the sampe on which this measurement was made. |
void |
setSelected(boolean v)
Sets the selection state of this datum. |
void |
setSlotNumber(int v)
Sets the number of the measurement tray slot in which the sample was measured. |
void |
setSuite(Suite v)
Sets the data suite containing this measurement. |
void |
setTemp(double v)
For thermal treatment, sets the temperature in degrees Celsius. |
void |
setTimestamp(java.lang.String v)
Sets the timestamp of this measurement. |
void |
setTreatType(TreatType v)
Sets the treatment applied before this measurement (AF, thermal, etc.). |
void |
setValue(DatumField field,
java.lang.String value)
Sets the value of a specified data field using a string. |
void |
setVolume(double v)
For discrete measurements, sets the volume of the sample. |
void |
setXDrift(double v)
Sets the x drift correction value. |
void |
setYDrift(double v)
Sets the y drift correction value. |
void |
setZDrift(double v)
Sets the z drift correction value. |
void |
toggleSel()
Toggles the datum's selection state. |
java.util.List<java.lang.String> |
toStrings()
Produces a list of strings representing the data values within this datum object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Datum(double x, double y, double z)
x
- x component of the magnetization vectory
- y component of the magnetization vectorz
- z component of the magnetization vectorpublic Datum(Vec3 vector)
vector
- the magnetization vectorpublic Datum()
Method Detail |
---|
public boolean isSelected()
true
if this datum is selectedpublic void setSelected(boolean v)
v
- true
to select this datum, false
to deselectpublic double getSampAz()
public void setSampAz(double v)
v
- the sample dip azimuth to set, in degreespublic double getSampDip()
public void setSampDip(double v)
v
- the sample dip angle to set, in degreespublic double getFormAz()
public void setFormAz(double v)
v
- the formation dip azimuth to set, in degreespublic double getFormDip()
public void setFormDip(double v)
v
- the formation dip angle to set, in degreespublic double getMagDev()
public void setMagDev(double v)
v
- the local geomagnetic field declination to set, in degreespublic boolean isPcaAnchored()
true
if PCA fits to this point should be anchoredpublic void setPcaAnchored(boolean v)
v
- true
to set PCA fits for this point to be anchoredpublic Line getLine()
public void setLine(Line v)
v
- the data-file line to set for this measurement; not currently usedpublic Sample getSample()
public void setSample(Sample v)
v
- the sample on which this measurement was madepublic boolean isHidden()
true
if this datum should not be displayed on plotspublic void setHidden(boolean v)
v
- true
if this datum should not be displayed on plotspublic java.lang.String getDepth()
public void setDepth(java.lang.String v)
v
- for continuous measurements, the depth of this measurement within the corepublic double getMagSus()
public void setMagSus(double v)
v
- the magnetic susceptibility of the sample at this stage of treatmentpublic MeasType getMeasType()
public void setMeasType(MeasType v)
v
- the type of this measurement (discrete or continuous)public java.lang.String getDiscreteId()
public void setDiscreteId(java.lang.String v)
v
- for discrete samples, the identifier (name) of the samplepublic TreatType getTreatType()
public void setTreatType(TreatType v)
v
- the treatment applied before this measurement (AF, thermal, etc.)public double getAfX()
public void setAfX(double v)
v
- for AF or ARM treatment, the AF field strength in the x axispublic double getAfY()
public void setAfY(double v)
v
- for AF or ARM treatment, the AF field strength in the y axispublic double getAfZ()
public void setAfZ(double v)
v
- for AF or ARM treatment, the AF field strength in the z axispublic double getIrmField()
public void setIrmField(double v)
v
- for IRM treatment, the IRM field strengthpublic double getArmField()
public void setArmField(double v)
v
- for ARM treatment, the ARM bias field strengthpublic ArmAxis getArmAxis()
public void setArmAxis(ArmAxis v)
v
- for ARM treatment, the axis of the ARM fieldpublic double getTemp()
public void setTemp(double v)
v
- for thermal treatment, the temperature in degrees Celsiuspublic double getArea()
public void setArea(double v)
v
- the cross-sectional area of the corepublic double getVolume()
public void setVolume(double v)
v
- for discrete measurements, the volume of the samplepublic int getRunNumber()
public void setRunNumber(int v)
v
- the number of the machine run during which this measurement was madepublic java.lang.String getTimestamp()
public void setTimestamp(java.lang.String v)
v
- the timestamp of this measurementpublic double getXDrift()
public void setXDrift(double v)
v
- the x drift correction valuepublic double getYDrift()
public void setYDrift(double v)
v
- the y drift correction valuepublic double getZDrift()
public void setZDrift(double v)
v
- the z drift correction valuepublic int getSlotNumber()
public void setSlotNumber(int v)
v
- the number of the measurement tray slot in which the sample was measuredpublic Suite getSuite()
public void setSuite(Suite v)
v
- the data suite containing this measurementpublic boolean isOnCircle()
true
if this measurement is used for a great-circle fitpublic void setOnCircle(boolean v)
v
- true
to use this measurement for a great-circle fitpublic boolean isInPca()
true
if this measurement is used for a PCA fitpublic void setInPca(boolean v)
v
- true
to use this measurement for a PCA fitpublic double getSampHade()
public void setSampHade(double hadeDeg)
hadeDeg
- the hade to set, in degreespublic double getFormStrike()
public void setFormStrike(double strikeDeg)
strikeDeg
- the formation strike, in degreespublic java.lang.String getIdOrDepth()
public boolean hasMagSus()
true
if there is magnetic susceptibility data
in this datumpublic boolean isMagSusOnly()
true
if this datum contains magnetic susceptibility
data and does not contain magnetic moment datapublic Vec3 getMoment()
Strictly speaking, the name is not quite accurate:
we do not deal with magnetic
moment (which would be in Am2) but in magnetic dipole moment
per unit volume (in A/m). But
getMagneticDipoleMomentPerUnitVolumeInAm
would be an inconveniently
long method name.
public void setMoment(Vec3 v)
v
- the magnetic dipole moment per unit volume in A/mpublic Vec3 getMoment(Correction correction)
correction
- the corrections to apply to the magnetic moment measurement
public void rot180(MeasurementAxis axis)
axis
- the axis about which to perform the rotationpublic void toggleSel()
datum.toggleSel()
is functionally equivalent to datum.setSelected(!datum.isSelected()
.
public double getTreatmentLevel()
Returns a numerical representation of the intensity of the treatment which was applied immediately before this measurement. The interpretation of the number depends on the treatment type. For thermal treatment, it is a temperature in degrees Celsius. For magnetic treatments (AF demagnetization, ARM, IRM) it returns the magnetic field. As is conventional, the magnetic field is returned as the equivalent magnetic induction in units of Tesla.
For ARM treatment, this method returns the strength of the alternating field rather than the DC bias field.
public static double maxTreatmentLevel(java.util.List<Datum> data)
data
- a list of datum objects
public static double maxIntensity(java.util.List<Datum> data)
data
- a list of datum objects
public static double maxMagSus(java.util.List<Datum> data)
data
- a list of datum objects
public double getIntensity()
public boolean ignoreOnLoading()
true
if this datum should be ignored (thrown away)
when loading a data file. Currently, this method returns true if
the measurement type is NONE
&endash; that is, there is
no data within the object.
true
if this datum should be ignored when loading a filepublic boolean hasMagMoment()
true
if the datum contains a magnetic moment measurementpublic java.lang.String getValue(DatumField field)
field
- the field to read
public void setValue(DatumField field, java.lang.String value)
field
- the field to set the value ofvalue
- a string representation of the value to set the field to
java.lang.NumberFormatException
- if the format of the string is
not compatible with the format of the field to be setpublic java.util.List<java.lang.String> toStrings()
DatumField.realFields
.
public java.lang.String exportFieldValues(java.util.Collection<DatumField> fields, java.lang.String delimiter)
fields
- the fields for which values should be produceddelimiter
- the string which should separate the values
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |