Class EnvelopeProbeState

All Implemented Interfaces:
IProbeState, IArchive

public class EnvelopeProbeState extends BunchProbeState<EnvelopeProbeState>
Encapsulates the state of an EnvelopeProbe at a particular point in time.
Version:
$id:
Author:
Craig McChesney, Christopher K. Allen
  • Field Details

  • Constructor Details

    • EnvelopeProbeState

      public EnvelopeProbeState()
      Default constructor. Create a new, empty EnvelopeProbeState object.
    • EnvelopeProbeState

      public EnvelopeProbeState(EnvelopeProbeState prsEnv)
      Copy constructor for EnvelopeProbeState. Initializes the new EnvelopeProbeState objects with the state attributes of the given EnvelopeProbeState.
      Parameters:
      prsEnv - initializing state
      Since:
      Jun 26, 2014
    • EnvelopeProbeState

      public EnvelopeProbeState(EnvelopeProbe probe)
      Initializing Constructor. Create a new EnvelopeProbeState object and initialize it to the state of the probe argument.
      Parameters:
      probe - EnvelopeProbe containing initializing state information
  • Method Details

    • copy

      public EnvelopeProbeState copy()
      Implements the cloning operation required by the base class ProbeState.
      Specified by:
      copy in class ProbeState<EnvelopeProbeState>
      Returns:
      a deep copy of this object.
      Since:
      Jun 27, 2014
      See Also:
    • setPerturbationMatrix

      public void setPerturbationMatrix(PhaseMatrix matPerturb)
      Set the first-order response matrix of the current element slice
      Parameters:
      matPerturb - first-order response matrix in homogeneous coordinates
    • setResponseMatrix

      public void setResponseMatrix(PhaseMatrix matResp)
      Set the first-order response matrix accumulated by the Envelope since its initial state. Note that this response includes the effects of space charge.
      Parameters:
      matResp - first-order response matrix in homogeneous coordinates
    • setResponseMatrixNoSpaceCharge

      public void setResponseMatrixNoSpaceCharge(PhaseMatrix matResp)
      Set the first-order response matrix accumulated by the Envelope since its initial state. Note that this response does not include the effects of space charge.
      Parameters:
      matResp - first-order response matrix in homogeneous coordinates
    • setCovariance

      public void setCovariance(CovarianceMatrix matTau)
      Set the correlation matrix for this probe (7x7 matrix in homogeneous coordinates).
      Parameters:
      matTau - new phase space covariance matrix of this probe
      See Also:
    • getResponseMatrix

      public PhaseMatrix getResponseMatrix()
      Get the first-order response matrix accumulated by the Envelope since its initial state. Note that this response includes the effects of space charge.
      Returns:
      first-order response matrix in homogeneous coordinates
    • getResponseMatrixNoSpaceCharge

      public PhaseMatrix getResponseMatrixNoSpaceCharge()
      Get the first-order response matrix accumulated by the Envelope since its initial state. Note that this response does not include the effects of space charge.
      Returns:
      first-order response matrix in homogeneous coordinates
    • getPerturbationMatrix

      public PhaseMatrix getPerturbationMatrix()
      Get the first-order response matrix of current element slice
      Returns:
      first-order response matrix in homogeneous coordinates
    • getCovarianceMatrix

      public CovarianceMatrix getCovarianceMatrix()
      Returns the correlation matrix of this state in homogeneous phase space coordinates. This is the primary state attribute for EnvelopeProbe objects.
      Returns:
      7x7 matrix <zz^T> in homogeneous coordinates
    • centralCovariance

      public CovarianceMatrix centralCovariance()
      Convenience Method: Returns the covariance matrix of this state in homogeneous phase space coordinates. This value is computed directly from the correlation matrix.
      Returns:
      <zzT> - <z><z>T
      See Also:
    • rmsEmittances

      public double[] rmsEmittances()
      Convenience Method: Returns the rms emittances for this state as determined by the correlation matrix. This value is computed directly from the correlation matrix and is independent of the twissParams local attribute.
      Returns:
      array (εxyz) of rms emittances
    • twissParameters

      public Twiss[] twissParameters()

      Return the twiss parameters for this state calculated from the covariance matrix.

      CKA Notes:

      - Use this method with caution. The returned information is incomplete, it is taken only from the three 2×2 diagonal blocks of the correlation matrix and, therefore, does not contain the full state of the beam. In general, you cannot restart the beam with the returned parameters, for example, in the case of bends, offsets, dipoles, etc.

      Returns:
      twiss parameters computed from diagonal blocks of the correlation matrix
    • phaseMean

      public PhaseVector phaseMean()
      Convenience Method: Return the phase space coordinates of the centroid in homogeneous coordinates. This value is taken from the correlation matrix.
      Returns:
      <z> = (<x>, <xp>, <y>, <yp>, <z>, <zp>, 1)^T
      See Also:
    • saveStateAsTwiss

      public void saveStateAsTwiss(DataAdaptor daSink)

      Save the state values particular to EnvelopeProbeState objects to the data sink. In particular we save only the data in the 2x2 diagonal blocks of the correlation matrix, and as Twiss parameters.

      CKA NOTE:

      - Be careful when using this method! It is here as a convenience only! It saves the EnvelopeProbeState information in the save format as the load()/save() methods do, but you cannot restore an EnvelopeProbe object from these data.

      Parameters:
      daSink - data sink represented by DataAdaptor interface
    • addPropertiesTo

      protected void addPropertiesTo(DataAdaptor container)
      Save the state values particular to EnvelopeProbeState objects to the data sink.
      Overrides:
      addPropertiesTo in class BunchProbeState<EnvelopeProbeState>
      Parameters:
      container - data sink represented by DataAdaptor interface
    • readPropertiesFrom

      protected void readPropertiesFrom(DataAdaptor container) throws DataFormatException
      Recover the state values particular to EnvelopeProbeState objects from the data source.
      Overrides:
      readPropertiesFrom in class BunchProbeState<EnvelopeProbeState>
      Parameters:
      container - data source represented by a DataAdaptor interface
      Throws:
      DataFormatException - state information in data source is malformatted
    • toString

      public String toString()
      Write out state information to a string.
      Overrides:
      toString in class BunchProbeState<EnvelopeProbeState>
      Returns:
      text version of internal state data