net.talvi.puffinplot.data
Class Site

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

public class Site
extends java.lang.Object

A site is a grouping of samples within a suite. In practice, it usually corresponds to a group of samples from a small physical area. In a discrete study, it usually corresponds to a physical field site within a section. In a long core study, it usually corresponds to a narrow slice of the core between two defined depths.


Constructor Summary
Site(java.lang.String name)
          Creates a site containing no samples.
Site(java.lang.String name, java.util.List<Sample> samples)
          Creates a site containing the specified samples.
 
Method Summary
 void calculateGreatCirclesDirection(Correction correction)
          Calculate a mean direction for the site using best-fit great circles.
 void clearFisher()
          Clears the stored Fisher statistics, if any.
 void clearGcFit()
          Clears the stored great-circle fit parameters, if any
 void doFisher(Correction correction)
          Calculate Fisherian statistics on the PCA directions of samples within this site.
 void fromString(java.lang.String string)
          Sets site data from information in a string.
 FisherValues getFisher()
          Returns the Fisher statistics (if any) calculated for this site.
static java.util.List<java.lang.String> getGreatCircleLimitHeader()
          Returns headers for information on the treatment steps used for the great-circle analysis.
 java.util.List<java.lang.String> getGreatCircleLimitStrings()
          Returns information on the treatment steps used for the great-circle analysis.
 GreatCircles getGreatCircles()
          Returns the great-circle parameters (if any) calculated for this site.
 FisherParams getMeanDirection()
          Returns the Fisherian parameters of the site mean direction.
 java.util.List<Sample> getSamples()
          Returns the samples in this site
 boolean isEmpty()
          Reports whether there are any samples in this site.
 java.lang.String toString()
          Returns the name of this site.
 java.util.List<java.lang.String> toStrings()
          Returns a list of strings giving information about this site.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Site

public Site(java.lang.String name,
            java.util.List<Sample> samples)
Creates a site containing the specified samples.

Parameters:
name - the name of the site
samples - the samples contained in the site

Site

public Site(java.lang.String name)
Creates a site containing no samples.

Parameters:
name - the name of the site
Method Detail

doFisher

public void doFisher(Correction correction)
Calculate Fisherian statistics on the PCA directions of samples within this site. The PCA directions will be automatically calculated (or recalculated) before the Fisher statistics are calculated. The results are stored within the site.

Parameters:
correction - the correction to apply to the magnetic moment data when performing the PCA calculations

clearFisher

public void clearFisher()
Clears the stored Fisher statistics, if any.


calculateGreatCirclesDirection

public void calculateGreatCirclesDirection(Correction correction)
Calculate a mean direction for the site using best-fit great circles. For each sample at the site, the great circle is incorporated into a calculation of the mean direction. If no great circle has been fitted for a site, the PCA direction (if any) is used. Mean direction estimate is by the method of McFadden and McElhinny (1988).

Parameters:
correction - the correction to apply to the magnetic moment data when fitting the great circles.
See Also:
GreatCircles

toString

public java.lang.String toString()
Returns the name of this site.

Overrides:
toString in class java.lang.Object
Returns:
the name of this site

getSamples

public java.util.List<Sample> getSamples()
Returns the samples in this site

Returns:
the samples in this site

getFisher

public FisherValues getFisher()
Returns the Fisher statistics (if any) calculated for this site.

Returns:
the Fisher statistics (if any) calculated for this site

getGreatCircles

public GreatCircles getGreatCircles()
Returns the great-circle parameters (if any) calculated for this site.

Returns:
the great-circle parameters (if any) calculated for this site

getMeanDirection

public FisherParams getMeanDirection()
Returns the Fisherian parameters of the site mean direction. If a great-circle mean has been calculated, its parameters will be returned. If there is no great-circle mean but a Fisher mean has been calculated, the Fisher mean will be returned. If neither type of mean has been calculated, a null value will be returned.

Returns:
the Fisherian parameters of the site mean direction

getGreatCircleLimitHeader

public static java.util.List<java.lang.String> getGreatCircleLimitHeader()
Returns headers for information on the treatment steps used for the great-circle analysis. See the PuffinPlot user manual for details of their interpretation.

Returns:
headers for information on the treatment steps used for the great-circle analyses

getGreatCircleLimitStrings

public java.util.List<java.lang.String> getGreatCircleLimitStrings()
Returns information on the treatment steps used for the great-circle analysis. The list consists of: minFirstGc, maxFirstGc, minLastGc, MaxLastGc. Where minFirstGc is the minimum (among samples in this site) first treatment step value for any great-circle fit, and so forth.

Returns:
information on the treatment steps used for the great-circle analysis

clearGcFit

public void clearGcFit()
Clears the stored great-circle fit parameters, if any


isEmpty

public boolean isEmpty()
Reports whether there are any samples in this site.

Returns:
true if there are no samples in this site

toStrings

public java.util.List<java.lang.String> toStrings()
Returns a list of strings giving information about this site.

Returns:
a list of strings giving information about this site

fromString

public void fromString(java.lang.String string)
Sets site data from information in a string. The format is the same as that exported from toStrings().

Parameters:
string - a string containing site data