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 τ
EnvelopeTrackerBase
,
EnvelopeProbeState
COMMENT_LABEL, PROBE_LABEL, stateCurrent, TEXT_LABEL, TIME_LABEL, trajHist, TYPE_LABEL
LightSpeed, Permittivity, UnitCharge
Constructor and Description |
---|
EnvelopeProbe()
Default Constructor.
|
EnvelopeProbe(EnvelopeProbe probe)
Copy constructor - clones the argument
|
Modifier and Type | Method and Description |
---|---|
EnvelopeProbe |
copy()
Create a deep copy of this probe with all state information.
|
EnvelopeProbeState |
createEmptyProbeState()
Creates a new, empty
EnvelopeProbeState . |
EnvelopeProbeState |
createProbeState()
Creates a snapshot of the current state and returns it as a
ProbeState object of the proper type. |
Trajectory<EnvelopeProbeState> |
createTrajectory()
Creates a
Trajectory<EnvelopeProbeState> object of the
proper type for saving the probe's history. |
CovarianceMatrix |
getCovariance()
Returns the correlation matrix for the beam in homogeneous
phase space coordinates.
|
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.
|
PhaseMatrix |
getResponseMatrix()
Get the first-order response matrix accumulated by the Envelope since its
initial state.
|
PhaseMatrix |
getResponseMatrixNoSpaceCharge()
Get the first-order response matrix accumulated by the Envelope since its
initial state.
|
boolean |
getSaveTwissFlag()
Deprecated.
|
void |
initFromTwiss(Twiss[] twiss)
Set the twiss parameters for each phase plane.
|
protected void |
initializeFrom(Probe<EnvelopeProbeState> probe)
Deprecated.
Never used
|
static EnvelopeProbe |
newInstance(EnvelopeProbe probe)
Probe factory convenient method - clone given probe.
|
CovarianceMatrix |
phaseCovariance()
Return the covariance matrix of the distribution.
|
PhaseVector |
phaseMean()
Return the phase space coordinates of the centroid in homogeneous coordinates
|
protected EnvelopeProbeState |
readStateFrom(DataAdaptor container)
Read the contents of the supplied
DataAdaptor 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 |
setResponseMatrixNoSpaceCharge(PhaseMatrix matResp)
Set the first-order response matrix accumulated by the Envelope since its
initial state.
|
void |
setSaveTwissFlag(boolean bolSaveTwiss)
Deprecated.
If you want Twiss parameters, either take them from
the covariance matrix or use the
TwissProbe |
PhaseMatrix |
stateResponse(java.lang.String elemFrom,
java.lang.String elemTo)
Deprecated.
This calculation should be done using the utility class
xal.tools.beam.calc.CalculationsOnMachines
|
beamPerveance, bunchCharge, getBeamCurrent, getBunchFrequency, setBeamCurrent, setBunchFrequency
applyState, cloneCurrentProbeState, deepCopy, getAlgorithm, getArchive, getBeta, getComment, getCurrentElement, getCurrentHardwareId, getGamma, getKineticEnergy, getMomentum, getPosition, getSpeciesCharge, getSpeciesName, getSpeciesRestEnergy, getTime, getTimestamp, getTrajectory, initialize, load, newProbeInitializedFrom, performPostProcessing, readFrom, save, setAlgorithm, setComment, setCurrentElement, setCurrentHardwareId, setKineticEnergy, setPosition, setSpeciesCharge, setSpeciesName, setSpeciesRestEnergy, setTime, setTimestamp, setTracking, update
public EnvelopeProbe()
public EnvelopeProbe(EnvelopeProbe probe)
probe
- EnvelopeProbe
object to be clonedpublic static EnvelopeProbe newInstance(EnvelopeProbe probe)
Probe
by the static factory method of the same name. The current method
just ensure type safety.probe
- probe object to be cloned.public EnvelopeProbe copy()
copy
in class Probe<EnvelopeProbeState>
Probe.copy()
public void initFromTwiss(Twiss[] twiss)
twiss
- array of Twiss objects for H, V , long. directions@Deprecated protected void initializeFrom(Probe<EnvelopeProbeState> probe)
initializeFrom
in class Probe<EnvelopeProbeState>
probe
- the probe from which to initialize this one@Deprecated public void setSaveTwissFlag(boolean bolSaveTwiss)
TwissProbe
Changes the behavior of the save state methods.
By setting this flag to true
the Twiss
parameter attributes will be saved instead of
the correlation matrix. The default behavior for this class
is to save the correlation matrix.
Because of all of these dangers, the method is here, but deprecated.
bolSaveTwiss
- Twiss parameter save flagProbe.save(DataAdaptor)
,
Probe.applyState(ProbeState)
public void setCovariance(CovarianceMatrix matTau)
matSigam
- new phase space covariance matrix of this probeCovarianceMatrix
public void setResponseMatrix(PhaseMatrix matResp)
matResp
- first-order response matrix in homogeneous coordinatespublic void setResponseMatrixNoSpaceCharge(PhaseMatrix matResp)
matResp
- first-order response matrix in homogeneous coordinatespublic void setCurrentResponseMatrix(PhaseMatrix matRespCurr)
matRespCurr
- current response matrix factorpublic CovarianceMatrix getCovariance()
EnvelopeProbe
object.public PhaseMatrix getResponseMatrix()
public PhaseMatrix getResponseMatrixNoSpaceCharge()
public PhaseMatrix getCurrentResponseMatrix()
@Deprecated public boolean getSaveTwissFlag()
DataAdaptor
object.
NOTES:
This can be dangerous as we have the
potential to loss a lot of information. In particular,
if the probe has pasted through a bend or a steering
magnet, the Twiss parameters do not contain enough information
to restart the probe.Probe.save(DataAdaptor)
,
Probe.applyState(ProbeState)
public CovarianceMatrix phaseCovariance()
public PhaseVector phaseMean()
@Deprecated public PhaseMatrix stateResponse(java.lang.String elemFrom, java.lang.String elemTo)
elemFrom
- String identifying starting lattice elementelemTo
- String identifying ending lattice elementEnvelopeTrajectory#computeTransferMatrix(String, String)
public EnvelopeProbeState createProbeState()
ProbeState
object of the proper type.createProbeState
in class BunchProbe<EnvelopeProbeState>
EnvelopeProbeState
encapsulating the probe's
current stateProbe.createProbeState()
public EnvelopeProbeState createEmptyProbeState()
EnvelopeProbeState
.createEmptyProbeState
in class BunchProbe<EnvelopeProbeState>
EnvelopeProbeState
public Trajectory<EnvelopeProbeState> createTrajectory()
Trajectory<EnvelopeProbeState>
object of the
proper type for saving the probe's history.createTrajectory
in class Probe<EnvelopeProbeState>
Trajectory<EnvelopeProbeState>
for saving the probe's historypublic void reset()
reset
in class Probe<EnvelopeProbeState>
protected EnvelopeProbeState readStateFrom(DataAdaptor container) throws ParsingException
Probe
DataAdaptor
and return
an instance of the appropriate Trajectory species.readStateFrom
in class Probe<EnvelopeProbeState>
container
- DataAdaptor
to read a Trajectory fromParsingException
- error encountered reading the DataAdaptorProbe.readStateFrom(xal.tools.data.DataAdaptor)