gov.sns.tools.phasespaceanalysis
Class PhaseSpaceData

java.lang.Object
  |
  +--gov.sns.tools.phasespaceanalysis.PhaseSpaceData

public class PhaseSpaceData
extends java.lang.Object

This class keeps raw phase space data and can create the ColorSurfaceData instance to show the phase space distribution as a color contour plot.


Constructor Summary
PhaseSpaceData(int dataSizeX, int dataSizeXP)
          The data constructor.
PhaseSpaceData(int dataSizeX, int dataSizeXP, java.lang.String dataName)
          The data constructor with data name.
 
Method Summary
 void addPoint(double x, double xp)
          Adds a raw data point.
 void centerData()
          Recalculate raw data relative the center point with average X and XP.
 void clear()
          Deletes all points.
 double getCenterX()
          Returns the averaged X for the initial raw data.
 double getCenterXP()
          Returns the averaged XP for the initial raw data.
 ColorSurfaceData getColorSurfaceData()
          Returns the ColorSurfaceData instance.
 double getGridPointX(int i)
          Returns the grid point's X for index i.
 double getGridPointXP(int i)
          Returns the grid point's XP for index i.
 int getGridSizeX()
          Returns the grid size for analysis in X direction.
 int getGridSizeXP()
          Returns the grid size for analysis in XP direction.
 double getIntegral(PhasePlaneEllipse phPE)
          Calculates integral over the phase plane bounded by ellipse.
 double getMaxX()
          Returns the maximal X value.
 double getMaxXP()
          Returns the maximal XP value.
 double getMinX()
          Returns the minimal X value.
 double getMinXP()
          Returns the minimal XP value.
 PhasePlaneEllipse getPhasePlaneEllipse()
          Returns the inner PhasePlaneEllipse instance.
 double getRawIntegral(PhasePlaneEllipse phPE)
          Calculates integral over the phase plane bounded by ellipse.
 int getSize()
          Returns a number of the raw data points.
 double getSShapeCorrelation(PhasePlaneEllipse phPE)
          Returns the correlation coefficient calculated on the ellipse.
 double getStepX()
          Returns the step size for analysis in X direction.
 double getStepXP()
          Returns the step size for analysis in XP direction.
 double getValue(double x, double xp)
          Returns phase space density value for point (x,xp).
 double getValue(int i, int j)
          Returns phase space density value for point with indexes i and j.
 double getX(int i)
          Returns the x-value for index i.
 double getXP(int i)
          Returns the xp-value for index i.
 void makeColorSurfaceData()
          Creates contour plot data.
 void setGridSizeX(int gridSizeX)
          Sets the grid size for analysis in X direction.
 void setGridSizeXP(int gridSizeXP)
          Sets the grid size for analysis in XP direction.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PhaseSpaceData

public PhaseSpaceData(int dataSizeX,
                      int dataSizeXP)
The data constructor.


PhaseSpaceData

public PhaseSpaceData(int dataSizeX,
                      int dataSizeXP,
                      java.lang.String dataName)
The data constructor with data name.

Method Detail

setGridSizeX

public void setGridSizeX(int gridSizeX)
Sets the grid size for analysis in X direction.


setGridSizeXP

public void setGridSizeXP(int gridSizeXP)
Sets the grid size for analysis in XP direction.


getGridSizeX

public int getGridSizeX()
Returns the grid size for analysis in X direction.


getGridSizeXP

public int getGridSizeXP()
Returns the grid size for analysis in XP direction.


getStepX

public double getStepX()
Returns the step size for analysis in X direction.


getStepXP

public double getStepXP()
Returns the step size for analysis in XP direction.


getGridPointX

public double getGridPointX(int i)
Returns the grid point's X for index i.


getGridPointXP

public double getGridPointXP(int i)
Returns the grid point's XP for index i.


getValue

public double getValue(double x,
                       double xp)
Returns phase space density value for point (x,xp).


getValue

public double getValue(int i,
                       int j)
Returns phase space density value for point with indexes i and j.


clear

public void clear()
Deletes all points.


getSize

public int getSize()
Returns a number of the raw data points.


addPoint

public void addPoint(double x,
                     double xp)
Adds a raw data point.


getCenterX

public double getCenterX()
Returns the averaged X for the initial raw data.


getCenterXP

public double getCenterXP()
Returns the averaged XP for the initial raw data.


getX

public double getX(int i)
Returns the x-value for index i.


getXP

public double getXP(int i)
Returns the xp-value for index i.


getMinX

public double getMinX()
Returns the minimal X value.


getMaxX

public double getMaxX()
Returns the maximal X value.


getMinXP

public double getMinXP()
Returns the minimal XP value.


getMaxXP

public double getMaxXP()
Returns the maximal XP value.


makeColorSurfaceData

public void makeColorSurfaceData()
Creates contour plot data. After that you can get ColorSurfaceData instance.


getColorSurfaceData

public ColorSurfaceData getColorSurfaceData()
Returns the ColorSurfaceData instance.


centerData

public void centerData()
Recalculate raw data relative the center point with average X and XP.


getPhasePlaneEllipse

public PhasePlaneEllipse getPhasePlaneEllipse()
Returns the inner PhasePlaneEllipse instance. It will be the PhasePlaneEllipse instance calculated on the base of raw data set if user did not use setPhasePlaneEllipse() .


getSShapeCorrelation

public double getSShapeCorrelation(PhasePlaneEllipse phPE)
Returns the correlation coefficient calculated on the ellipse.


getIntegral

public double getIntegral(PhasePlaneEllipse phPE)
Calculates integral over the phase plane bounded by ellipse. This method uses interpolated and normalized ColorSurfaceData .


getRawIntegral

public double getRawIntegral(PhasePlaneEllipse phPE)
Calculates integral over the phase plane bounded by ellipse. This method uses the raw data.