CGTR¶
-
class
zgoubidoo.commands.contrib.iba.
CGTR
(kinematics: georges_core.kinematics.Kinematics = Proton (.etot) Total energy: 1168.2720299999999 megaelectronvolt (.ekin) Kinetic energy: 230 megaelectronvolt (.momentum) Momentum: 696.0640299570144 megaelectronvolt_per_c (.brho): Magnetic rigidity: 2.321819896553311 meter * tesla (.range): Range in water (protons only): 32.9424672323197 centimeter (.pv): Relativistic pv: 414.71945005821954 megaelectronvolt (.beta): Relativistic beta: 0.5958064663732595 (.gamma): Relativistic gamma: 1.2451314678963625, b1g: Optional[zgoubidoo.commands.contrib.iba.B1G] = None, b2g: Optional[zgoubidoo.commands.contrib.iba.B2G] = None, b3g: Optional[zgoubidoo.commands.contrib.iba.B3G] = None, t1g: Optional[zgoubidoo.commands.contrib.iba.T1G] = None, t2g: Optional[zgoubidoo.commands.contrib.iba.T2G] = None, q1g: Optional[zgoubidoo.commands.contrib.iba.Q1G] = None, q2g: Optional[zgoubidoo.commands.contrib.iba.Q2G] = None, q3g: Optional[zgoubidoo.commands.contrib.iba.Q3G] = None, q4g: Optional[zgoubidoo.commands.contrib.iba.Q4G] = None, q5g: Optional[zgoubidoo.commands.contrib.iba.Q5G] = None, q6g: Optional[zgoubidoo.commands.contrib.iba.Q6G] = None, q7g: Optional[zgoubidoo.commands.contrib.iba.Q7G] = None, smx: Optional[zgoubidoo.commands.contrib.iba.SMX] = None, smy: Optional[zgoubidoo.commands.contrib.iba.SMY] = None, sl1g: Optional[zgoubidoo.commands.contrib.iba.SL1G] = None, sl2g: Optional[zgoubidoo.commands.contrib.iba.SL2G] = None, sl3g: Optional[zgoubidoo.commands.contrib.iba.SL3G] = None, beam: Optional[zgoubidoo.commands.beam.Beam] = None, with_fit: bool = True)[source]¶ Bases:
object
Proteus One compact gantry (CGTR) input sequence.
TODO .. rubric:: Examples
>>> cgtr = CGTR() >>> cgtr.shoot()
- Parameters
kinematics –
b1g –
b2g –
b3g –
t1g –
t2g –
q1g –
q2g –
q3g –
q4g –
q5g –
q6g –
q7g –
smx –
smy –
beam –
with_fit – if True the dipole magnets of the line will be fit.
Attributes Summary
Gantry angle (in IBA reference system).
Provides the full CGTR input sequence.
Methods Summary
fit
(zgoubi, identifier, fit)- param zgoubi
fit_dipoles
(kinematics[, dipoles])Adjusts the main field of the dipoles according to the beam energy.
plot
([artist, start, stop, crosshair])Plot the P1 beamline.
run
(zgoubi[, identifier])- param zgoubi
TODO
shoot
(x, y, zgoubi[, fit_type])- param x
spots
(spots[, fit_type, with_tracks, debug_fit])- param spots
Attributes Documentation
-
gantry_angle
¶ Gantry angle (in IBA reference system).
-
line
¶ Provides the full CGTR input sequence.
- Returns
the CGTR input sequence.
Methods Documentation
-
fit
(zgoubi: zgoubidoo.zgoubi.Zgoubi, identifier: Mapping[str, Union[pint.quantity.build_quantity_class.<locals>.Quantity, float, str]], fit: zgoubidoo.commands.actions.Fit) → zgoubidoo.commands.actions.Fit[source]¶ - Parameters
zgoubi –
identifier –
fit –
Returns:
-
fit_dipoles
(kinematics: georges_core.kinematics.Kinematics, dipoles: Optional[List[zgoubidoo.commands.contrib.iba.DipoleIBA]] = None)[source]¶ Adjusts the main field of the dipoles according to the beam energy.
The adjustment is made so that the reference trajectory exists the magnet on axis.
- Parameters
kinematics – the beam kinematics
dipoles – a list of dipoles to fit
-
plot
(artist: zgoubidoo.vis.plotly.ZgoubidooPlotlyArtist = None, start: Union[str, zgoubidoo.commands.commands.Command, None] = None, stop: Union[str, zgoubidoo.commands.commands.Command, None] = None, crosshair: bool = True)[source]¶ Plot the P1 beamline.
TODO
- Parameters
artist – an artist object for the rendering
start – first element of the beamline to be plotted
stop – last element of the beamline to be plotted
crosshair – draw a crosshair indicating the isocenter
-
run
(zgoubi: zgoubidoo.zgoubi.Zgoubi, identifier: Optional[Mapping[str, Union[pint.quantity.build_quantity_class.<locals>.Quantity, float, str]]] = None)[source]¶ - Parameters
zgoubi – TODO
identifier – TODO
Returns:
-
shoot
(x: float, y: float, zgoubi: zgoubidoo.zgoubi.Zgoubi, fit_type: zgoubidoo.commands.actions.FitType = <class 'zgoubidoo.commands.actions.Fit'>) → zgoubidoo.commands.actions.Fit[source]¶ - Parameters
x –
y –
zgoubi – TODO
fit_type –
- Returns
The Fit command (instance object) with the results of the fit.
-
spots
(spots: Iterable[Tuple[float, float]], fit_type: zgoubidoo.commands.actions.FitType = <class 'zgoubidoo.commands.actions.Fit'>, with_tracks: bool = False, debug_fit: bool = False) → Union[pandas.core.frame.DataFrame, List[zgoubidoo.commands.actions.Fit]][source]¶ - Parameters
spots –
fit_type –
with_tracks –
debug_fit –
Returns: