Class EnvelopeProbe

All Implemented Interfaces:
IProbe, IArchive
Direct Known Subclasses:
ElsProbe

public class EnvelopeProbe extends BunchProbe<EnvelopeProbeState>

EnvelopeProbe represents the RMS beam envelopes of a beam. Specifically, its primary state object is the 7×7 matrix of homogeneous phase space moments up to, and including second order. This is the covariance matrix for the beam and is represented as

  τ ≡ <z*zT>

where z=(x,x',y,y',z,z',1) is the vector of homogeneous phase space coordinates, and < · > is the moment operator with respect to the beam distribution. We reserve the symbol σ for the central covariance matrix, which is defined

  στ - <z><z>T

Note that the centroid position = <z> is carried in the last row and column of τ

Since:
August, 2002
Version:
4
Author:
Christopher K. Allen, Craig McChesney
See Also:
  • Constructor Details

    • EnvelopeProbe

      public EnvelopeProbe()
      Default Constructor. Creates a new, empty instance of EnvelopeProbe
    • EnvelopeProbe

      public EnvelopeProbe(EnvelopeProbe probe)
      Copy constructor - clones the argument
      Parameters:
      probe - EnvelopeProbe object to be cloned
  • Method Details

    • newInstance

      public static EnvelopeProbe newInstance(EnvelopeProbe probe)
      Probe factory convenient method - clone given probe. The real work here is being done in the base class Probe by the static factory method of the same name. The current method just ensure type safety.
      Parameters:
      probe - probe object to be cloned.
      Returns:
      a clone of the given probe argument
    • copy

      public EnvelopeProbe copy()
      Create a deep copy of this probe with all state information.
      Specified by:
      copy in class Probe<EnvelopeProbeState>
      Since:
      Oct 23, 2013
      See Also:
    • initFromTwiss

      public void initFromTwiss(Twiss[] twiss)
      Set the Twiss parameters for each phase plane. CKA NOTES: - The current method signature is misleading. If there is an beam axis offset before this method is called, then that offset is preserved, but the previous correlation matrix is wiped out. Thus, even though the method signature suggests there will be no offset, there can be.
      Parameters:
      twiss - array of Twiss objects for H, V , long. directions
    • initializeFrom

      @Deprecated protected void initializeFrom(Probe<EnvelopeProbeState> probe)
      Deprecated.
      Never used
      Initialize this probe from the one specified.
      Overrides:
      initializeFrom in class Probe<EnvelopeProbeState>
      Parameters:
      probe - the probe from which to initialize this one
    • 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:
    • 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 includes the effects of space charge.
      Parameters:
      matResp - first-order response matrix in homogeneous coordinates
    • setCurrentResponseMatrix

      public void setCurrentResponseMatrix(PhaseMatrix matRespCurr)
      Set the current factor of the overall response matrix. This is the last factor post multiplied onto the response matrix.
      Parameters:
      matRespCurr - current response matrix factor
    • getCovariance

      public CovarianceMatrix getCovariance()
      Returns the correlation matrix for the beam in homogeneous phase space coordinates. This is the primary state object for an EnvelopeProbe object.
      Returns:
      the 7x7 matrix <z*z^T> in homogeneous coordinates
    • 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
    • getCurrentResponseMatrix

      public PhaseMatrix getCurrentResponseMatrix()
      Return the last element in the semigroup of response matrices, that is, the last matrix to be post-multiplied onto the response matrix proper.
      Returns:
      last factor of the response matrix
    • phaseCovariance

      public CovarianceMatrix phaseCovariance()
      Return the covariance matrix of the distribution. Note that this can be computed from the correlation matrix in homogeneous coordinates since the mean values are included in that case.
      Returns:
      <(z-<z>)*(z-<z>)^T> = <z*z^T> - <z>*<z>^T
    • phaseMean

      public PhaseVector phaseMean()
      Return the phase space coordinates of the centroid in homogeneous coordinates
      Returns:
      <z> = (<x>, <xp>, <y>, <yp>, <z>, <zp>, 1)^T
    • stateResponse

      @Deprecated public PhaseMatrix stateResponse(String elemFrom, String elemTo)
      Deprecated.
      This calculation should be done using the utility class xal.tools.beam.calc.CalculationsOnMachines
      Returns the state response matrix calculated from the front face of elemFrom to the back face of elemTo. This is a convenience wrapper to the real method in the trajectory class
      Parameters:
      elemFrom - String identifying starting lattice element
      elemTo - String identifying ending lattice element
      Returns:
      response matrix from elemFrom to elemTo
      See Also:
      • EnvelopeTrajectory#computeTransferMatrix(String, String)
    • createProbeState

      public EnvelopeProbeState createProbeState()
      Creates a snapshot of the current state and returns it as a ProbeState object of the proper type.
      Specified by:
      createProbeState in class BunchProbe<EnvelopeProbeState>
      Returns:
      a new EnvelopeProbeState encapsulating the probe's current state
      See Also:
    • createEmptyProbeState

      public EnvelopeProbeState createEmptyProbeState()
      Creates a new, empty EnvelopeProbeState.
      Specified by:
      createEmptyProbeState in class BunchProbe<EnvelopeProbeState>
      Returns:
      a new, empty EnvelopeProbeState
      Since:
      Jul 1, 2014
    • createTrajectory

      public Trajectory<EnvelopeProbeState> createTrajectory()
      Creates a Trajectory<EnvelopeProbeState> object of the proper type for saving the probe's history.
      Specified by:
      createTrajectory in class Probe<EnvelopeProbeState>
      Returns:
      a new, empty Trajectory<EnvelopeProbeState> for saving the probe's history
    • reset

      public void reset()
      Resets the probe to the saved initial state, if there is one and clears the Trajectory.
      Overrides:
      reset in class Probe<EnvelopeProbeState>
    • readStateFrom

      protected EnvelopeProbeState readStateFrom(DataAdaptor container) throws DataFormatException
      Description copied from class: Probe
      Read the contents of the supplied DataAdaptor and return an instance of the appropriate Trajectory species.
      Specified by:
      readStateFrom in class Probe<EnvelopeProbeState>
      Parameters:
      container - DataAdaptor to read a Trajectory from
      Returns:
      a ProbeState for the contents of the DataAdaptor
      Throws:
      DataFormatException - error encountered reading the DataAdaptor
      See Also: