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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Peak
public Peak(double position,
double area,
double width)
- Creates new Peak assuming no uncertainty in values.
- Parameters:
position
- position of the peak centroidarea
- total peak areawidth
- 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 centroidpe
- error on positiona
- area of peakae
- uncertainty in areaw
- FWHM of peakwe
- uncertainty in FWHM
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