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_LABELFields 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 voidaddPropertiesTo(DataAdaptor container) Save the state values particular toEnvelopeProbeStateobjects 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 voidreadPropertiesFrom(DataAdaptor container) Recover the state values particular toEnvelopeProbeStateobjects from the data source.double[]Convenience Method: Returns the rms emittances for this state as determined by the correlation matrix.voidsaveStateAsTwiss(DataAdaptor daSink) Save the state values particular toEnvelopeProbeStateobjects to the data sink.voidsetCovariance(CovarianceMatrix matTau) Set the correlation matrix for this probe (7x7 matrix in homogeneous coordinates).voidsetPerturbationMatrix(PhaseMatrix matPerturb) Set the first-order response matrix of the current element slicevoidsetResponseMatrix(PhaseMatrix matResp) Set the first-order response matrix accumulated by the Envelope since its initial state.voidSet 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, setBunchFrequencyMethods 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, emptyEnvelopeProbeStateobject. -
EnvelopeProbeState
Copy constructor for EnvelopeProbeState. Initializes the newEnvelopeProbeStateobjects with the state attributes of the givenEnvelopeProbeState.- Parameters:
prsEnv- initializing state- Since:
- Jun 26, 2014
-
EnvelopeProbeState
Initializing Constructor. Create a newEnvelopeProbeStateobject and initialize it to the state of the probe argument.- Parameters:
probe-EnvelopeProbecontaining initializing state information
-
-
Method Details
-
copy
Implements the cloning operation required by the base classProbeState.- Specified by:
copyin 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 forEnvelopeProbeobjects.- 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 thetwissParamslocal 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
EnvelopeProbeStateobjects 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
EnvelopeProbeStateinformation in the save format as the load()/save() methods do, but you cannot restore anEnvelopeProbeobject from these data.- Parameters:
daSink- data sink represented byDataAdaptorinterface
-
addPropertiesTo
Save the state values particular toEnvelopeProbeStateobjects to the data sink.- Overrides:
addPropertiesToin classBunchProbeState<EnvelopeProbeState>- Parameters:
container- data sink represented byDataAdaptorinterface
-
readPropertiesFrom
Recover the state values particular toEnvelopeProbeStateobjects from the data source.- Overrides:
readPropertiesFromin classBunchProbeState<EnvelopeProbeState>- Parameters:
container- data source represented by aDataAdaptorinterface- Throws:
DataFormatException- state information in data source is malformatted
-
toString
Write out state information to a string.- Overrides:
toStringin classBunchProbeState<EnvelopeProbeState>- Returns:
- text version of internal state data
-