Package xal.model.probe
Class TwissProbe
EnvelopeProbe
represents the RMS beam envelopes of a beam.
Specifically, the state of this probe is the 7x7 matrix of homogeneous phase
space moments up to, and including second order. This is the correlation
matrix for the beam and is represented as
χ = <
zzT>
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.
- Author:
- Christopher K. Allen, Craig McChesney
-
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.TwissProbe
(TwissProbe prbParent) Copy constructor - clones the argumentTwissProbe
(DataAdaptor daSource) Initializing constructor - initialize from data adaptor Create an newTwissProbe
object and initialize its state variables according to the data in the data source exposing theDataAdaptor
interface. -
Method Summary
Modifier and TypeMethodDescriptioncopy()
Make a deep copy of this probe and return it.Creates a new, emptyTwissProbeState
.Creates a snapshot of the current state and returns it as aProbeState
object of the proper type.Creates aTrajectory<TwissProbeState>
object of the proper type for saving the probe's history.Returns the betatron phase with space charge for all three phase planes.Get the centroid location of the beam bunch in homogeneous coordinates.Get the first-order response matrix accumulated by the probe since its initial state.getTwiss()
Returns the array of Twiss parameters for this state for all three planes.getTwiss
(Twiss3D.IND_3D iPlane) Returns the Twiss parameters for the given phase plane.protected void
initializeFrom
(Probe<TwissProbeState> probe) Deprecated.Never usedprotected TwissProbeState
readStateFrom
(DataAdaptor container) Creates a newTwissProbeState
object and initializes it from the data source exposing the givenDataAdaptor
interface.double[]
Convenience Method: Returns the rms emittances for this state as from the individual Twiss parameters.void
setBetatronPhase
(R3 vecPhase) Set the betatron phase for each phase plane.void
setCentroid
(PhaseVector vecCentroid) Set the centroid location of the beam bunch in homogeneous coordinates.void
setResponseMatrix
(PhaseMatrix matResp) Set the first-order response matrix accumulated by the Envelope since its initial state.void
Set all the twiss parameters for the probevoid
setTwiss
(Twiss3D.IND_3D iPlane, Twiss twiss) Set the Twiss parameters for the given phase plane.Methods 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, reset, save, setAlgorithm, setComment, setCurrentElement, setCurrentElementTypeId, setCurrentHardwareId, setKineticEnergy, setLongitudinalPhase, setPosition, setSpeciesCharge, setSpeciesName, setSpeciesRestEnergy, setTime, setTimestamp, setTracking, update
-
Constructor Details
-
TwissProbe
public TwissProbe()Default Constructor. Creates a new, empty instance of TwissProbe -
TwissProbe
Copy constructor - clones the argument- Parameters:
prbParent
-TwissProbe
object to be cloned
-
TwissProbe
Initializing constructor - initialize from data adaptor Create an newTwissProbe
object and initialize its state variables according to the data in the data source exposing theDataAdaptor
interface.- Parameters:
daSource
- data source containing state variable values- Throws:
DataFormatException
- unable to parse, bad data format
-
-
Method Details
-
initializeFrom
Deprecated.Never usedInitialize this probe from the one specified.- Overrides:
initializeFrom
in classProbe<TwissProbeState>
- Parameters:
probe
- to copy
-
copy
Make a deep copy of this probe and return it.- Specified by:
copy
in classProbe<TwissProbeState>
- Returns:
- a clone of this probe object
- Since:
- Nov 5, 2013
- See Also:
-
setCentroid
Set the centroid location of the beam bunch in homogeneous coordinates.- Parameters:
vecCentroid
- new centroid of the bunch (x,x',y,y',z,z',1)
-
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
-
setBetatronPhase
Set the betatron phase for each phase plane.- Parameters:
vecPhase
- vector (ψx,ψy,ψz) of betatron phases in radians
-
setTwiss
Set the Twiss parameters for the given phase plane.- Parameters:
iPlane
- phase plane indextwiss
- twiss parameters
-
setTwiss
Set all the twiss parameters for the probe- Parameters:
envTwiss
- new 3 dimensional array of Twiss objects (hor, vert,long)- See Also:
-
getCentroid
Get the centroid location of the beam bunch in homogeneous coordinates.- Returns:
- centroid of the bunch (x,x',y,y',z,z',1)
-
getResponseMatrix
Get the first-order response matrix accumulated by the probe since its initial state.- Returns:
- first-order response matrix in homogeneous coordinates
-
getBetatronPhase
Returns the betatron phase with space charge for all three phase planes.- Returns:
- vector (ψx,ψy,ψz) of betatron phases in radians
-
getTwiss
Returns the Twiss parameters for the given phase plane.- Parameters:
iPlane
- phase plane index- Returns:
- twiss parameters for given phase plane
-
getTwiss
Returns the array of Twiss parameters for this state for all three planes.- Returns:
- array(twiss-H, twiss-V, twiss-L)
-
rmsEmittances
public double[] rmsEmittances()Convenience Method: Returns the rms emittances for this state as from the individual Twiss parameters.- Returns:
- array (ex,ey,ez) of rms emittances
-
createProbeState
Creates a snapshot of the current state and returns it as aProbeState
object of the proper type.- Specified by:
createProbeState
in classBunchProbe<TwissProbeState>
- Returns:
- a new
TwissProbeState
encapsulating the probe's current state - See Also:
-
createEmptyProbeState
Creates a new, emptyTwissProbeState
.- Specified by:
createEmptyProbeState
in classBunchProbe<TwissProbeState>
- Returns:
- a new, empty
TwissProbeState
- Since:
- Jul 1, 2014
-
createTrajectory
Creates aTrajectory<TwissProbeState>
object of the proper type for saving the probe's history.- Specified by:
createTrajectory
in classProbe<TwissProbeState>
- Returns:
- a new, empty
Trajectory<TwissProbeState>
for saving the probe's history
-
readStateFrom
Creates a newTwissProbeState
object and initializes it from the data source exposing the givenDataAdaptor
interface.- Specified by:
readStateFrom
in classProbe<TwissProbeState>
- Parameters:
container
-DataAdaptor
to read a Trajectory from- Returns:
- the newly instantiated and initialized
TwissProbeState
object - Throws:
DataFormatException
- error encountered reading the DataAdaptor- Since:
- Nov 5, 2013
- See Also:
-