public class TwissProbe extends BunchProbe<TwissProbeState>
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.
COMMENT_LABEL, PROBE_LABEL, stateCurrent, TEXT_LABEL, TIME_LABEL, trajHist, TYPE_LABEL
LightSpeed, Permittivity, UnitCharge
Constructor and Description |
---|
TwissProbe()
Default Constructor.
|
TwissProbe(DataAdaptor daSource)
Initializing constructor - initialize from data adaptor
Create an new
TwissProbe object and initialize
its state variables according to the data in the data source
exposing the DataAdaptor interface. |
TwissProbe(TwissProbe prbParent)
Copy constructor - clones the argument
|
Modifier and Type | Method and Description |
---|---|
TwissProbe |
copy()
Make a deep copy of this probe and return it.
|
TwissProbeState |
createEmptyProbeState()
Creates a new, empty
TwissProbeState . |
TwissProbeState |
createProbeState()
Creates a snapshot of the current state and returns it as a
ProbeState object of the proper type. |
Trajectory<TwissProbeState> |
createTrajectory()
Creates a
Trajectory<TwissProbeState> object of the
proper type for saving the probe's history. |
R3 |
getBetatronPhase()
Returns the betatron phase with space charge for all three phase planes.
|
PhaseVector |
getCentroid()
Get the centroid location of the beam bunch in homogeneous
coordinates.
|
PhaseMatrix |
getResponseMatrix()
Get the first-order response matrix accumulated by the probe since its initial
state.
|
Twiss3D |
getTwiss()
Returns the array of Twiss parameters for this
state for all three planes.
|
Twiss |
getTwiss(Twiss3D.IND_3D iPlane)
Returns the Twiss parameters for the given phase plane.
|
protected void |
initializeFrom(Probe<TwissProbeState> probe)
Deprecated.
Never used
|
protected TwissProbeState |
readStateFrom(DataAdaptor container)
Creates a new
TwissProbeState object and initializes
it from the data source exposing the given DataAdaptor
interface. |
void |
reset()
Resets the probe to the saved initial state, if there is one and clears
the Trajectory.
|
double[] |
rmsEmittances()
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 |
setTwiss(Twiss3D.IND_3D iPlane,
Twiss twiss)
Set the Twiss parameters for the given phase plane.
|
void |
setTwiss(Twiss3D envTwiss)
Set all the twiss parameters for the probe
|
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 TwissProbe()
public TwissProbe(TwissProbe prbParent)
prbParent
- TwissProbe
object to be clonedpublic TwissProbe(DataAdaptor daSource) throws DataFormatException
TwissProbe
object and initialize
its state variables according to the data in the data source
exposing the DataAdaptor
interface.daSource
- data source containing state variable valuesDataFormatException
- unable to parse, bad data format@Deprecated protected void initializeFrom(Probe<TwissProbeState> probe)
initializeFrom
in class Probe<TwissProbeState>
probe
- to copypublic TwissProbe copy()
copy
in class Probe<TwissProbeState>
Probe.copy()
public void setCentroid(PhaseVector vecCentroid)
vecCentroid
- new centroid of the bunch (x,x',y,y',z,z',1)public void setResponseMatrix(PhaseMatrix matResp)
matResp
- first-order response matrix in homogeneous coordinatespublic void setBetatronPhase(R3 vecPhase)
vecPhase
- vector (ψx,ψy,ψz)
of betatron phases in radians public void setTwiss(Twiss3D.IND_3D iPlane, Twiss twiss)
iPlane
- phase plane indextwiss
- twiss parameterspublic void setTwiss(Twiss3D envTwiss)
envTwiss
- new 3 dimensional array of Twiss objects (hor, vert,long)Twiss
public PhaseVector getCentroid()
public PhaseMatrix getResponseMatrix()
public R3 getBetatronPhase()
public Twiss getTwiss(Twiss3D.IND_3D iPlane)
iPlane
- phase plane indexpublic Twiss3D getTwiss()
public double[] rmsEmittances()
public TwissProbeState createProbeState()
ProbeState
object of the proper type.createProbeState
in class BunchProbe<TwissProbeState>
TwissProbeState
encapsulating the probe's
current stateProbe.createProbeState()
public TwissProbeState createEmptyProbeState()
TwissProbeState
.createEmptyProbeState
in class BunchProbe<TwissProbeState>
TwissProbeState
public Trajectory<TwissProbeState> createTrajectory()
Trajectory<TwissProbeState>
object of the
proper type for saving the probe's history.createTrajectory
in class Probe<TwissProbeState>
Trajectory<TwissProbeState>
for saving the probe's historypublic void reset()
reset
in class Probe<TwissProbeState>
Probe.reset()
protected TwissProbeState readStateFrom(DataAdaptor container) throws ParsingException
TwissProbeState
object and initializes
it from the data source exposing the given DataAdaptor
interface.readStateFrom
in class Probe<TwissProbeState>
container
- DataAdaptor
to read a Trajectory fromTwissProbeState
objectParsingException
- error encountered reading the DataAdaptorProbe.readStateFrom(xal.tools.data.DataAdaptor)