Package xal.model.probe
Class EnvelopeProbe
- Direct Known Subclasses:
ElsProbe
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:
-
Field Summary
Fields inherited from class xal.model.probe.Probe
COMMENT_LABEL, PROBE_LABEL, stateCurrent, TEXT_LABEL, TIME_LABEL, trajHist, TYPE_LABEL
Fields inherited from interface xal.model.IProbe
LIGHT_SPEED, PERMITTIVITY, UNIT_CHARGE
-
Constructor Summary
ConstructorsConstructorDescriptionDefault Constructor.EnvelopeProbe
(EnvelopeProbe probe) Copy constructor - clones the argument -
Method Summary
Modifier and TypeMethodDescriptioncopy()
Create a deep copy of this probe with all state information.Creates a new, emptyEnvelopeProbeState
.Creates a snapshot of the current state and returns it as aProbeState
object of the proper type.Creates aTrajectory<EnvelopeProbeState>
object of the proper type for saving the probe's history.Returns the correlation matrix for the beam in homogeneous phase space coordinates.Return the last element in the semigroup of response matrices, that is, the last matrix to be post-multiplied onto the response matrix proper.Get the first-order response matrix accumulated by the Envelope since its initial state.Get the first-order response matrix accumulated by the Envelope since its initial state.void
initFromTwiss
(Twiss[] twiss) Set the Twiss parameters for each phase plane.protected void
initializeFrom
(Probe<EnvelopeProbeState> probe) Deprecated.Never usedstatic EnvelopeProbe
newInstance
(EnvelopeProbe probe) Probe factory convenient method - clone given probe.Return the covariance matrix of the distribution.Return the phase space coordinates of the centroid in homogeneous coordinatesprotected EnvelopeProbeState
readStateFrom
(DataAdaptor container) Read the contents of the suppliedDataAdaptor
and return an instance of the appropriate Trajectory species.void
reset()
Resets the probe to the saved initial state, if there is one and clears the Trajectory.void
setCovariance
(CovarianceMatrix matTau) Set the correlation matrix for this probe (7x7 matrix in homogeneous coordinates).void
setCurrentResponseMatrix
(PhaseMatrix matRespCurr) Set the current factor of the overall response matrix.void
setResponseMatrix
(PhaseMatrix matResp) Set the first-order response matrix accumulated by the Envelope since its initial state.void
Set the first-order response matrix accumulated by the Envelope since its initial state.stateResponse
(String elemFrom, String elemTo) Deprecated.This calculation should be done using the utility class xal.tools.beam.calc.CalculationsOnMachinesMethods inherited from class xal.model.probe.BunchProbe
beamDCPerveance, beamPerveance, bunchCharge, getBeamCurrent, getBunchFrequency, setBeamCurrent, setBunchFrequency
Methods inherited from class xal.model.probe.Probe
applyState, cloneCurrentProbeState, deepCopy, getAlgorithm, getArchive, getBeta, getComment, getCurrentElement, getCurrentElementTypeId, getCurrentHardwareId, getCurrentState, getGamma, getInitialState, getKineticEnergy, getLongitinalPhase, getMomentum, getPosition, getSpeciesCharge, getSpeciesName, getSpeciesRestEnergy, getTime, getTimestamp, getTrajectory, initialize, load, lookupLastStateFor, newProbeInitializedFrom, performPostProcessing, readFrom, save, setAlgorithm, setComment, setCurrentElement, setCurrentElementTypeId, setCurrentHardwareId, setKineticEnergy, setLongitudinalPhase, setPosition, setSpeciesCharge, setSpeciesName, setSpeciesRestEnergy, setTime, setTimestamp, setTracking, update
-
Constructor Details
-
EnvelopeProbe
public EnvelopeProbe()Default Constructor. Creates a new, empty instance of EnvelopeProbe -
EnvelopeProbe
Copy constructor - clones the argument- Parameters:
probe
-EnvelopeProbe
object to be cloned
-
-
Method Details
-
newInstance
Probe factory convenient method - clone given probe. The real work here is being done in the base classProbe
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
Create a deep copy of this probe with all state information.- Specified by:
copy
in classProbe<EnvelopeProbeState>
- Since:
- Oct 23, 2013
- See Also:
-
initFromTwiss
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.Never usedInitialize this probe from the one specified.- Overrides:
initializeFrom
in classProbe<EnvelopeProbeState>
- Parameters:
probe
- the probe from which to initialize this one
-
setCovariance
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
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
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
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
Returns the correlation matrix for the beam in homogeneous phase space coordinates. This is the primary state object for anEnvelopeProbe
object.- Returns:
- the 7x7 matrix <z*z^T> in homogeneous coordinates
-
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
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
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
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
Return the phase space coordinates of the centroid in homogeneous coordinates- Returns:
- <z> = (<x>, <xp>, <y>, <yp>, <z>, <zp>, 1)^T
-
stateResponse
Deprecated.This calculation should be done using the utility class xal.tools.beam.calc.CalculationsOnMachinesReturns 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 elementelemTo
- String identifying ending lattice element- Returns:
- response matrix from elemFrom to elemTo
- See Also:
-
EnvelopeTrajectory#computeTransferMatrix(String, String)
-
createProbeState
Creates a snapshot of the current state and returns it as aProbeState
object of the proper type.- Specified by:
createProbeState
in classBunchProbe<EnvelopeProbeState>
- Returns:
- a new
EnvelopeProbeState
encapsulating the probe's current state - See Also:
-
createEmptyProbeState
Creates a new, emptyEnvelopeProbeState
.- Specified by:
createEmptyProbeState
in classBunchProbe<EnvelopeProbeState>
- Returns:
- a new, empty
EnvelopeProbeState
- Since:
- Jul 1, 2014
-
createTrajectory
Creates aTrajectory<EnvelopeProbeState>
object of the proper type for saving the probe's history.- Specified by:
createTrajectory
in classProbe<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 classProbe<EnvelopeProbeState>
-
readStateFrom
Description copied from class:Probe
Read the contents of the suppliedDataAdaptor
and return an instance of the appropriate Trajectory species.- Specified by:
readStateFrom
in classProbe<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:
-