madgui.widget.twisswidget module¶
Classes
|
|
|
A figure containing some X/Y twiss parameters. |
|
|
|
This toolbar item performs (when checked) simple interactive matching via mouse clicks into the plot window. |
|
Opens info boxes when clicking on an element. |
|
Display a precomputed reference curve for comparison. |
|
|
|
|
|
|
|
|
|
-
class
madgui.widget.twisswidget.
CaptureTool
(plot)[source]¶ Bases:
object
Methods
action
()onToggle
(active)Update enabled state to match the UI.
setChecked
(checked)Attributes
bool(x) -> bool
-
active
= False¶
-
-
class
madgui.widget.twisswidget.
CompareTool
(plot, scene)[source]¶ Bases:
object
Display a precomputed reference curve for comparison.
The reference curve is NOT visible by default.
Methods
action
()activate
()Attributes
str(object=’’) -> str
str(object=’’) -> str
-
icon
= 23¶
-
short
= 'Show reference curve'¶
-
text
= 'Load data file for comparison.'¶
-
-
class
madgui.widget.twisswidget.
CurveInfo
(table, xname, name, label, style)¶ Bases:
tuple
Attributes
Alias for field number 3
Alias for field number 2
Alias for field number 4
Alias for field number 0
Alias for field number 1
-
property
label
¶ Alias for field number 3
-
property
name
¶ Alias for field number 2
-
property
style
¶ Alias for field number 4
-
property
table
¶ Alias for field number 0
-
property
xname
¶ Alias for field number 1
-
property
-
class
madgui.widget.twisswidget.
InfoTool
(plot, scene)[source]¶ Bases:
madgui.widget.twisswidget.CaptureTool
Opens info boxes when clicking on an element.
Methods
activate
()Start select mode.
advance_selection
(move_step)Stop select mode.
onClick
(event)Display a popup window with info about the selected element.
onKey
(event)onMotion
(event)Attributes
str(object=’’) -> str
str(object=’’) -> str
str(object=’’) -> str
-
icon
= 9¶
-
mode
= 'INFO'¶
-
short
= 'element info'¶
-
text
= 'Show element info boxes'¶
-
-
class
madgui.widget.twisswidget.
KeyboardEvent
(key, guiEvent)¶ Bases:
tuple
Attributes
Alias for field number 1
Alias for field number 0
-
property
guiEvent
¶ Alias for field number 1
-
property
key
¶ Alias for field number 0
-
property
-
class
madgui.widget.twisswidget.
MatchTool
(plot, scene, matcher)[source]¶ Bases:
madgui.widget.twisswidget.CaptureTool
This toolbar item performs (when checked) simple interactive matching via mouse clicks into the plot window.
Methods
activate
()Start matching mode.
addConstraints
(constraints)Add constraint and perform matching.
add_constraint
(event, name)Add constraint at cursor location.
Remove all constraints.
Stop matching mode.
onClick
(event)Handle clicks into the figure in matching mode.
removeConstraint
(elem, axis)Remove the constraint for elem.
remove_constraint
(event, name)Remove constraint nearest to cursor location.
Attributes
str(object=’’) -> str
str(object=’’) -> str
str(object=’’) -> str
-
property
icon
¶
-
mode
= 'MATCH'¶
-
short
= 'match constraints'¶
-
text
= 'Match for desired target value'¶
-
property
-
class
madgui.widget.twisswidget.
MouseEvent
(button, x, y, axes, elem, guiEvent)¶ Bases:
tuple
Attributes
Alias for field number 3
Alias for field number 0
Alias for field number 4
Alias for field number 5
Alias for field number 1
Alias for field number 2
-
property
axes
¶ Alias for field number 3
Alias for field number 0
-
property
elem
¶ Alias for field number 4
-
property
guiEvent
¶ Alias for field number 5
-
property
x
¶ Alias for field number 1
-
property
y
¶ Alias for field number 2
-
property
-
class
madgui.widget.twisswidget.
PlotInfo
(name, title, curves)¶ Bases:
tuple
Attributes
Alias for field number 2
Alias for field number 0
Alias for field number 1
-
property
curves
¶ Alias for field number 2
-
property
name
¶ Alias for field number 0
-
property
title
¶ Alias for field number 1
-
property
-
class
madgui.widget.twisswidget.
TwissFigure
(figure, session, matcher)[source]¶ Bases:
object
A figure containing some X/Y twiss parameters.
Methods
add_curve
(name, data, style)attach
(plot)del_curve
(name)destroy
()Draw the figure on its canvas.
format_coord
(ax, x, y)get_curve_by_name
(name)get_element_by_mouse_position
(axes, pos)Find an element close to the mouse cursor.
Get a set of all columns used in any graph.
get_graph_info
(name, xlim)Get the data for a particular graph.
Get a list of graph names.
Update existing plot after TWISS recomputation.
plot_twiss_curve
(ax, info)plot_user_curve
(ax, info)reset
()Reset figure and plot.
set_graph
(graph_name)show_monitor_readouts
(monitors)Attributes
Signal<<class ‘madgui.widget.twisswidget.MouseEvent’>>
Signal<>
Signal<<class ‘madgui.widget.twisswidget.KeyboardEvent’>>
Signal<<class ‘madgui.widget.twisswidget.MouseEvent’>>
int(x=0) -> integer
Signal<<class ‘madgui.widget.twisswidget.MouseEvent’>>
-
graph_changed
¶ Signal<>
-
graph_name
= None¶
-
keyPress
¶ Signal<<class ‘madgui.widget.twisswidget.KeyboardEvent’>>
-
mouseMotion
¶ Signal<<class ‘madgui.widget.twisswidget.MouseEvent’>>
-
property
show_indicators
¶
-
snapshot_num
= 0¶
-
xlim
= None¶
-
class
madgui.widget.twisswidget.
TwissWidget
(session, model, name=None, show_indicators=True, settings={})[source]¶ Bases:
PyQt5.QtWidgets.QWidget
Methods
change_figure
(index)create_menu
(menubar)from_session
(session, name)