net.talvi.puffinplot.data
Class MedianDestructiveField

java.lang.Object
  extended by net.talvi.puffinplot.data.MedianDestructiveField

public class MedianDestructiveField
extends java.lang.Object

This class calculates and stores the median destructive field (MDF) for a set of Datum objects. This is the AF field required to reduce the magnetic moment of a sample to half of its original value. Despite the name of the class, it will calculate a ‘median destructive’ value for any quantifiable treatment type, so it can also provide a ‘median destructive temperature’.

It is unlikely that a particular step will reduce the sample's magnetic moment to precisely half the original value, so the MDF value is calculated by linear interpolation between the two closest data points on either side of the halfway line.

The MDF is not guaranteed to be well-defined for all samples, since some samples may never reach half the original intensity. The intensity of others may fluctuate and cross the midpoint multiple times; in this case only this first crossing is considered.


Method Summary
static MedianDestructiveField calculate(java.util.List<Datum> data)
          Calculate and create a median destructive field (or temperature) value for the supplied data.
 double getDemagLevel()
          Returns the treatment level at which the intensity of the sample's magnetic moment reached half of its initial value.
static java.util.List<java.lang.String> getEmptyFields()
          Returns a list of empty strings equal in length to the number of parameters.
static java.util.List<java.lang.String> getHeaders()
          Returns the headers describing the parameters as a list of strings.
 double getIntensity()
          Returns half of the intensity of the sample's initial magnetic moment.
 boolean isHalfIntReached()
          Reports whether this sample reached half its initial intensity.
 java.util.List<java.lang.String> toStrings()
          Returns the parameters as a list of strings.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

calculate

public static MedianDestructiveField calculate(java.util.List<Datum> data)
Calculate and create a median destructive field (or temperature) value for the supplied data.

Parameters:
data - a list of data representing successive demagnetization steps for a single sample
Returns:
the treatment level at which the sample retains half of its original magnetic moment

getDemagLevel

public double getDemagLevel()
Returns the treatment level at which the intensity of the sample's magnetic moment reached half of its initial value. If this did not happen, this method may return an arbitrary value.

Returns:
the treatment level at which the intensity of the sample's magnetic moment reached half of its initial value, if possible

getIntensity

public double getIntensity()
Returns half of the intensity of the sample's initial magnetic moment.

Returns:
half of the intensity of the sample's initial magnetic moment

isHalfIntReached

public boolean isHalfIntReached()
Reports whether this sample reached half its initial intensity.

Returns:
true if this sample reached half its initial intensity

getHeaders

public static java.util.List<java.lang.String> getHeaders()
Returns the headers describing the parameters as a list of strings.

Returns:
the headers describing the parameters

getEmptyFields

public static java.util.List<java.lang.String> getEmptyFields()
Returns a list of empty strings equal in length to the number of parameters.

Returns:
a list of empty strings equal in length to the number of parameters

toStrings

public java.util.List<java.lang.String> toStrings()
Returns the parameters as a list of strings. The order of the parameters is the same as the order of the headers provided by getHeaders().

Returns:
the parameters as a list of strings