|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.talvi.puffinplot.data.Sample
public class Sample
This class represents a sample on which measurements have been made. It may correspond either to a discrete, physical specimen, or to a particular point on a continuous long core or u-channel sample.
Constructor Summary | |
---|---|
Sample(java.lang.String name,
Suite suite)
Creates a new sample. |
Method Summary | |
---|---|
void |
addDatum(Datum datum)
Adds a data point to this sample. |
void |
calculateMagSusJump()
Calculates the position of the first jump in magnetic susceptibility in the sample's demagnetization data. |
void |
calculateMdf()
Calculates the median destructive field using the visible data points of this sample and stores the results within this sample. |
void |
clearCalculations()
Clears all calculations for this sample (PCA, MDF, and great-circle fit) and deselects all data points. |
void |
doPca(Correction correction)
Performs principal component analysis on a subset of the magnetic moment data of this sample. |
java.util.List<java.lang.String> |
exportFields(java.util.List<DatumField> fields)
Returns a specified subset of demagnetization data as strings. |
void |
fitGreatCircle(Correction correction)
Fits a great circle to a subset of the magnetic moment vectors in this sample. |
void |
flip(MeasurementAxis axis)
Rotates all magnetic moment data 180 degrees about the sepcified axis. |
void |
fromString(java.lang.String string)
Sets some of sample's fields based on a supplied string. |
Tensor |
getAms()
Returns this sample's AMS tensor. |
java.util.List<Vec3> |
getCirclePoints(Correction correction)
Returns the magnetic moment vectors used for the current great-circle fit. |
CustomFields<java.lang.Boolean> |
getCustomFlags()
Returns this sample's custom flags. |
CustomFields<java.lang.String> |
getCustomNotes()
Returns this sample's custom notes. |
java.util.List<Datum> |
getData()
Returns all the data points within this sample. |
Datum |
getDatum(int i)
Returns a specified data point from this sample |
Datum |
getDatumByRunNumber(int maxRunNumber)
Returns the datum with the highest run number which is less than the supplied run number. |
double |
getDepth()
Returns the depth of a this sample within a continuous long core, where applicable. |
double |
getFirstGcStep()
Returns the treatment level for the first point used in the great-circle fit. |
int |
getFirstRunNumber()
Returns the run number for the first data point in this sample. |
double |
getFormAz()
Returns this sample's formation dip azimuth in degrees. |
double |
getFormDip()
Returns this sample's formation dip angle in degrees. |
double |
getFormStrike()
Returns this sample's formation strike in degrees. |
GreatCircle |
getGreatCircle()
Returns the current great-circle fit for this sample, if any. |
double |
getLastGcStep()
Returns the treatment level for the last point used in the great-circle fit. |
int |
getLastRunNumber()
Returns the run number for the last data point in this sample. |
double |
getMagDev()
Returns the geomagnetic field declination at the sampling site. |
double |
getMagSusJump()
Returns the results of the magnetic susceptibility jump calculation, if it has been performed. |
MedianDestructiveField |
getMdf()
Returns the results of the MDF calculation if it has been performed, or null if not. |
MeasType |
getMeasType()
Returns the measurement type of this sample (discrete or continuous). |
java.lang.String |
getNameOrDepth()
Returns the sample identifier or depth. |
double |
getNrm()
Returns the intensity of the sample's natural remanent magnetization (NRM). |
int |
getNumData()
Returns the number of data points within this sample. |
PcaAnnotated |
getPcaAnnotated()
Returns the annotated results of the last PCA calculation. |
PcaValues |
getPcaValues()
Returns the results of the last PCA calculation. |
double |
getSampAz()
Returns this sample's dip azimuth in degrees. |
double |
getSampDip()
Returns this sample's dip angle in degrees. |
double |
getSampHade()
Returns this sample's hade in degrees. |
java.util.List<Datum> |
getSelectedData()
Returns all the selected data points within this sample. |
java.util.BitSet |
getSelectionBitSet()
Returns the selected data point indices as a bit set. |
Site |
getSite()
Returns the site for this sample. |
int |
getSlotNumber()
Returns the tray slot number for discrete samples. |
Suite |
getSuite()
Returns the suite containing this sample. |
java.util.List<Datum> |
getVisibleData()
Returns all the visible (non-hidden) data points within this sample. |
boolean |
hasData()
Reports whether this sample contains any data. |
boolean |
hasMsData()
Reports whether this sample has any magnetic susceptibility data. |
void |
hideSelectedPoints()
Sets all the selected data points within this sample to be hidden, so they will not be shown on plots. |
boolean |
isEmptySlot()
Reports whether this sample is an empty slot on the measurement tray. |
boolean |
isPcaAnchored()
Reports whether principal component analysis should be anchored for this sample |
boolean |
isSelectionContiguous()
Returns true if the selected points are contiguous. |
void |
selectAll()
Selects all the data points within this sample. |
void |
selectNone()
De-selects all the data points within this sample. |
void |
selectVisible()
Selects all the visible (non-hidden) data points within this sample. |
void |
setAmsDirections(double i1,
double d1,
double i2,
double d2,
double i3,
double d3)
Sets the AMS data for the sample using the supplied principal directions. |
void |
setAmsFromTensor(double k11,
double k22,
double k33,
double k12,
double k23,
double k13)
Sets the AMS data for this sample using the supplied tensor. |
void |
setCorrections(double sampleAz,
double sampleDip,
double formAz,
double formDip,
double magDev)
Sets the orientation corrections for this sample's magnetic moment data. |
void |
setEmptySlot(boolean isEmptySlot)
Sets whether this sample is an empty slot on the measurement tray. |
void |
setPcaAnchored(boolean pcaAnchored)
Sets whether principal component analysis should be anchored for this sample |
void |
setSelectionBitSet(java.util.BitSet selection)
Sets the selection state of the sample's data points from a supplied bit set. |
void |
setSite(Site site)
Sets the site for this sample. |
void |
setValue(DatumField field,
java.lang.String value)
Sets the value of a specified field for each data point in the sample. |
java.util.List<java.lang.String> |
toStrings()
Returns a list of Strings representing data pertaining to this sample. |
void |
unhideAllPoints()
Unhides all data points within this sample. |
void |
useSelectionForCircleFit()
Flags the selected data points for use in the next great-circle fit. |
void |
useSelectionForPca()
Flags all selected data points for inclusion in principal component analysis |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Sample(java.lang.String name, Suite suite)
name
- sample identifier or numerical depthsuite
- the data suite of which this sample is a partMethod Detail |
---|
public void clearCalculations()
public Suite getSuite()
public void calculateMdf()
getMdf()
public MedianDestructiveField getMdf()
null
if not.
null
if notcalculateMdf()
public double getDepth()
public double getNrm()
public void calculateMagSusJump()
getMagSusJump()
public double getMagSusJump()
calculateMagSusJump()
public void flip(MeasurementAxis axis)
axis
- the axis about which to rotate the datapublic void hideSelectedPoints()
Datum.isHidden()
public void selectAll()
Datum.setSelected(boolean)
public void selectVisible()
Datum.setSelected(boolean)
,
Datum.isHidden()
public void selectNone()
public boolean hasData()
true
if this sample contains any datapublic java.util.List<Datum> getData()
public java.util.List<Datum> getVisibleData()
public java.util.List<Datum> getSelectedData()
public boolean isSelectionContiguous()
true
if the selected points are contiguous.
This is the case if there are no unselected points between the
first selected point and the last selected point.
true
if the selected points are contiguouspublic int getNumData()
public Datum getDatum(int i)
i
- the index of the requested data point
java.lang.IndexOutOfBoundsException
- if no data point with the selected index existspublic void addDatum(Datum datum)
datum
- a data point to add to this samplepublic void setCorrections(double sampleAz, double sampleDip, double formAz, double formDip, double magDev)
sampleAz
- the sample dip azimuthsampleDip
- the sample dip angleformAz
- the formation dip azimuthformDip
- the formation dip anglemagDev
- the geomagnetic field declination at the sampling sitepublic boolean hasMsData()
true
if this sample has any magnetic susceptibility datapublic void useSelectionForPca()
public boolean isPcaAnchored()
true
if principal component analysis should be anchored for this samplepublic void setPcaAnchored(boolean pcaAnchored)
pcaAnchored
- true
to anchor principal component analysis for this samplepublic void doPca(Correction correction)
Datum.isInPca()
.
The results are stored within the sample and may be retrieved with
getPcaAnnotated()
.
correction
- the correction to apply to the magnetic moment datapublic PcaAnnotated getPcaAnnotated()
public PcaValues getPcaValues()
public void useSelectionForCircleFit()
public GreatCircle getGreatCircle()
public java.util.List<Vec3> getCirclePoints(Correction correction)
correction
- the correction to apply to the magnetic moment vectors
public void fitGreatCircle(Correction correction)
Datum.isOnCircle()
is true for it.
correction
- the correction to apply to the magnetic moment datapublic double getFirstGcStep()
public double getLastGcStep()
public MeasType getMeasType()
public java.lang.String getNameOrDepth()
public int getSlotNumber()
public int getFirstRunNumber()
public int getLastRunNumber()
public Datum getDatumByRunNumber(int maxRunNumber)
maxRunNumber
-
public boolean isEmptySlot()
true
if this sample is an empty slot on the measurement traypublic void setEmptySlot(boolean isEmptySlot)
isEmptySlot
- true
to declare this sample as an empty slot
on the measurement traypublic void unhideAllPoints()
public java.util.BitSet getSelectionBitSet()
setSelectionBitSet(java.util.BitSet)
public void setSelectionBitSet(java.util.BitSet selection)
selection
- a template for the selection state of the data pointsgetSelectionBitSet()
public Site getSite()
public void setSite(Site site)
site
- the site for this samplepublic void setAmsFromTensor(double k11, double k22, double k33, double k12, double k23, double k13)
k11
- tensor value (1,1)k22
- tensor value (2,2)k33
- tensor value (3,3)k12
- tensor value (1,2)k23
- tensor value (2,3)k13
- tensor value (1,3)public void setAmsDirections(double i1, double d1, double i2, double d2, double i3, double d3)
i1
- inclination of principal axis 1d1
- declination of principal axis 1i2
- inclination of principal axis 2d2
- declination of principal axis 2i3
- inclination of principal axis 3d3
- declination of principal axis 3public Tensor getAms()
null
if none has been setpublic java.util.List<java.lang.String> exportFields(java.util.List<DatumField> fields)
DatumField
s and returns a list
of strings. Each string in the list represents one Datum
in this sample, and consists of a concatenation of string representations
of the requested fields (in the corresponding order), delimited
by tab characters.
fields
- the fields to export
Datum
in this samplepublic java.util.List<java.lang.String> toStrings()
public void fromString(java.lang.String string)
toStrings()
is a valid input for this method.
string
- a string specifying some of the sample's fieldspublic CustomFields<java.lang.Boolean> getCustomFlags()
public CustomFields<java.lang.String> getCustomNotes()
public double getSampAz()
public double getSampDip()
public double getSampHade()
public double getFormAz()
public double getFormStrike()
public double getFormDip()
public double getMagDev()
public void setValue(DatumField field, java.lang.String value)
field
- the field to setvalue
- the value to which to set the specified field
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |