Class Twiss3D

java.lang.Object
xal.tools.beam.Twiss3D
All Implemented Interfaces:
IArchive

public class Twiss3D extends Object implements IArchive
Class .
Since:
Nov 5, 2013
Author:
Christopher K. Allen
  • Field Details

  • Constructor Details

    • Twiss3D

      public Twiss3D()
      Create a new, empty
    • Twiss3D

      public Twiss3D(Twiss3D t3d)
      Copy Constructor. Create a new Twiss3D object which is a deep copy of the given argument.
      Parameters:
      t3d - Twiss3D containing initializing state information
    • Twiss3D

      public Twiss3D(Twiss[] arrTwiss)
      Initializing constructor for Twiss3D.
      Parameters:
      arrTwiss - array of Twiss parameter for each phase plane
      Since:
      Nov 5, 2013
    • Twiss3D

      public Twiss3D(Twiss twissX, Twiss twissY, Twiss twissZ)
      Initializing Constructor: Create a new Twiss3D object and initialize to the given argument values.
      Parameters:
      twissX - x-plane Twiss parameters
      twissY - y-plane Twiss parameters
      twissZ - z-plane Twiss parameters
    • Twiss3D

      public Twiss3D(DataAdaptor daSource) throws DataFormatException
      Initializing Constructor: Create a new Twiss3D object and initialize it with data from the data source behind the DataAdaptor interface.
      Parameters:
      daSource - data source containing initializing data
      Throws:
      DataFormatException - parsing error of data source
  • Method Details

    • copy

      public Twiss3D copy()
      Creates a new, cloned instance of this Twiss3D.
      Returns:
      a clone of this Twiss3D
      Since:
      Jul 9, 2014
    • setTwiss

      public void setTwiss(Twiss3D.IND_3D iPlane, Twiss twiss)
      Set the Twiss parameters for the given phase plane.
      Parameters:
      iPlane - phase plane index
      twiss - twiss parameters
    • getTwiss

      public Twiss getTwiss(Twiss3D.IND_3D iPlane)
      Returns the Twiss parameters for the given phase plane.
      Parameters:
      iPlane - phase plane index
      Returns:
      twiss parameters for given phase plane
    • getTwiss

      public Twiss[] getTwiss()
      Returns the array of Twiss parameters for this distribution for all three planes.
      Returns:
      array(twiss-H, twiss-V, twiss-L)
    • rmsEmittances

      public double[] rmsEmittances()
      Convenience Method: Returns the rms emittances for this distribution as from the individual Twiss parameters.
      Returns:
      array (ex,ey,ez) of rms emittances
    • save

      public void save(DataAdaptor daSink)
      Save the state of this object to the data sink behind the DataAdaptor interface.
      Specified by:
      save in interface IArchive
      Parameters:
      daSink - data sink represented by DataAdaptor interface
      See Also:
    • load

      public void load(DataAdaptor daSource) throws DataFormatException
      Recover the state values particular to BunchDistribution objects from the data source.
      Specified by:
      load in interface IArchive
      Parameters:
      daSource - data source represented by a DataAdaptor interface
      Throws:
      DataFormatException - state information in data source is malformatted
      See Also:
    • toString

      public String toString()
      Returns a textual representation of the internal state of this object.
      Overrides:
      toString in class Object
      Returns:
      string representation of this object's value
      Since:
      Nov 22, 2013
      See Also: