dwvisser.analysis
Class Peak

java.lang.Object
  |
  +--dwvisser.analysis.Peak
All Implemented Interfaces:
java.lang.Comparable

public class Peak
extends java.lang.Object
implements java.lang.Comparable

This class represents a gaussian peak, in terms of it's properties. Fields are also provided for the error bars on these properties.

Author:
Dale

Constructor Summary
Peak(double position, double area, double width)
          Creates new Peak assuming no uncertainty in values.
Peak(double p, double pe, double a, double ae, double w, double we)
          Generates a peak with error bars on its parameters.
 
Method Summary
 int compareTo(java.lang.Object p1)
           
 double getArea()
           
 double getAreaError()
           
 double getPosition()
           
 double getPositionError()
           
 double getWidth()
           
 double getWidthError()
           
 void setArea(double a)
           
 void setArea(double a, double e)
           
 void setPosition(double p)
           
 void setPosition(double p, double e)
           
 void setWidth(double w)
           
 void setWidth(double w, double e)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Peak

public Peak(double position,
            double area,
            double width)
Creates new Peak assuming no uncertainty in values.

Parameters:
position - position of the peak centroid
area - total peak area
width - Full width at half max of the peak

Peak

public Peak(double p,
            double pe,
            double a,
            double ae,
            double w,
            double we)
Generates a peak with error bars on its parameters.

Parameters:
p - position of peak centroid
pe - error on position
a - area of peak
ae - uncertainty in area
w - FWHM of peak
we - uncertainty in FWHM
Method Detail

getPosition

public double getPosition()
Returns:

getArea

public double getArea()

getWidth

public double getWidth()

getPositionError

public double getPositionError()

getAreaError

public double getAreaError()

getWidthError

public double getWidthError()

setPosition

public void setPosition(double p)

setPosition

public void setPosition(double p,
                        double e)

setArea

public void setArea(double a)

setArea

public void setArea(double a,
                    double e)

setWidth

public void setWidth(double w)

setWidth

public void setWidth(double w,
                     double e)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

compareTo

public int compareTo(java.lang.Object p1)
Specified by:
compareTo in interface java.lang.Comparable