Class EnvelopeProbeState
- All Implemented Interfaces:
IProbeState
,IArchive
- Version:
- $id:
- Author:
- Craig McChesney, Christopher K. Allen
-
Field Summary
FieldsFields inherited from class xal.model.probe.traj.ProbeState
STATE_LABEL, TYPE_LABEL
Fields inherited from interface xal.model.probe.traj.IProbeState
LIGHT_SPEED
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.EnvelopeProbeState
(EnvelopeProbe probe) Initializing Constructor.EnvelopeProbeState
(EnvelopeProbeState prsEnv) Copy constructor for EnvelopeProbeState. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addPropertiesTo
(DataAdaptor container) Save the state values particular toEnvelopeProbeState
objects to the data sink.Convenience Method: Returns the covariance matrix of this state in homogeneous phase space coordinates.copy()
Implements the cloning operation required by the base classProbeState
.Returns the correlation matrix of this state in homogeneous phase space coordinates.Get the first-order response matrix of current element sliceGet 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.Convenience Method: Return the phase space coordinates of the centroid in homogeneous coordinates.protected void
readPropertiesFrom
(DataAdaptor container) Recover the state values particular toEnvelopeProbeState
objects from the data source.double[]
Convenience Method: Returns the rms emittances for this state as determined by the correlation matrix.void
saveStateAsTwiss
(DataAdaptor daSink) Save the state values particular toEnvelopeProbeState
objects to the data sink.void
setCovariance
(CovarianceMatrix matTau) Set the correlation matrix for this probe (7x7 matrix in homogeneous coordinates).void
setPerturbationMatrix
(PhaseMatrix matPerturb) Set the first-order response matrix of the current element slicevoid
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.toString()
Write out state information to a string.Twiss[]
Return the twiss parameters for this state calculated from the covariance matrix.Methods inherited from class xal.model.probe.traj.BunchProbeState
beamDCPerveance, beamPerveance, bunchCharge, getBeamCurrent, getBunchFrequency, setBeamCurrent, setBunchFrequency
Methods inherited from class xal.model.probe.traj.ProbeState
computeBetaFromGamma, computeGammaFromBeta, computeGammaFromW, getBeta, getBetaGamma, getElementId, getElementTypeId, getGamma, getHardwareNodeId, getKineticEnergy, getLongitudinalPhase, getMomentum, getPosition, getSpeciesCharge, getSpeciesRestEnergy, getTime, load, save, setElementId, setElementTypeId, setHardwareNodeId, setKineticEnergy, setLongitudinalPhase, setPosition, setSpeciesCharge, setSpeciesRestEnergy, setTime
-
Field Details
-
LABEL_CENTROID
element tag for centroid data- See Also:
-
-
Constructor Details
-
EnvelopeProbeState
public EnvelopeProbeState()Default constructor. Create a new, emptyEnvelopeProbeState
object. -
EnvelopeProbeState
Copy constructor for EnvelopeProbeState. Initializes the newEnvelopeProbeState
objects with the state attributes of the givenEnvelopeProbeState
.- Parameters:
prsEnv
- initializing state- Since:
- Jun 26, 2014
-
EnvelopeProbeState
Initializing Constructor. Create a newEnvelopeProbeState
object and initialize it to the state of the probe argument.- Parameters:
probe
-EnvelopeProbe
containing initializing state information
-
-
Method Details
-
copy
Implements the cloning operation required by the base classProbeState
.- Specified by:
copy
in classProbeState<EnvelopeProbeState>
- Returns:
- a deep copy of this object.
- Since:
- Jun 27, 2014
- See Also:
-
setPerturbationMatrix
Set the first-order response matrix of the current element slice- Parameters:
matPerturb
- first-order response matrix in homogeneous coordinates
-
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 does not include the effects of space charge.- Parameters:
matResp
- first-order response matrix in homogeneous coordinates
-
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:
-
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
-
getPerturbationMatrix
Get the first-order response matrix of current element slice- Returns:
- first-order response matrix in homogeneous coordinates
-
getCovarianceMatrix
Returns the correlation matrix of this state in homogeneous phase space coordinates. This is the primary state attribute forEnvelopeProbe
objects.- Returns:
- 7x7 matrix <zz^T> in homogeneous coordinates
-
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 thetwissParams
local attribute.- Returns:
- array (εx,εy,εz) of rms emittances
-
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
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
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 anEnvelopeProbe
object from these data.- Parameters:
daSink
- data sink represented byDataAdaptor
interface
-
addPropertiesTo
Save the state values particular toEnvelopeProbeState
objects to the data sink.- Overrides:
addPropertiesTo
in classBunchProbeState<EnvelopeProbeState>
- Parameters:
container
- data sink represented byDataAdaptor
interface
-
readPropertiesFrom
Recover the state values particular toEnvelopeProbeState
objects from the data source.- Overrides:
readPropertiesFrom
in classBunchProbeState<EnvelopeProbeState>
- Parameters:
container
- data source represented by aDataAdaptor
interface- Throws:
DataFormatException
- state information in data source is malformatted
-
toString
Write out state information to a string.- Overrides:
toString
in classBunchProbeState<EnvelopeProbeState>
- Returns:
- text version of internal state data
-