visualize¶
Subpackages¶
- graphs
- onclick
animationGUI
animation_examples
collectionExporterGUI
onclickInterface
onclick_animate
onclick_changeSymbol
onclick_copySomething
onclick_delete
onclick_exportCollection
onclick_exportToTxt
onclick_exportTrace
onclick_extractPareto
onclick_getXY
onclick_measure
onclick_removeTrace
onclick_representDevice
onclick_tojson
representDevice_examples
- openGL
- openturns
- selector
- widgets
Package Contents¶
Classes¶
Functions¶
Attributes¶
-
class
CollectionDisplayer
¶ Bases:
PyQt5.QtWidgets.QMainWindow
GUI to display a collection.
-
add_collection
(theCollection, name='')¶ Add a collection to the GUI
-
set_shadow
(master_collectionId, shadow_collection)¶ Set a shadow collection to master_collectionID (see DataLink.set_shadow_collection)
-
remove_collection
(theCollection)¶ Remove collection from the GUI
-
update_graphs
()¶
-
set_actions_on_click
(theActionsOnClick)¶ Set actions to be performed when graph is clicked
-
get_datalink
()¶
-
_initialize
(theCollection)¶
-
_set_x
()¶
-
_set_y
()¶
-
_set_z
()¶
-
set_action_selector
(theAction)¶
-
_selector_to
()¶
-
_remove_item_selector
()¶
-
_cancel_selector
()¶
-
_apply_selector
()¶
-
_reset_colors
()¶
-
-
class
SensitivityDisplayer
(theLibrary: type(SensitivityAnalysis_LibInterface))¶ Bases:
PyQt5.QtWidgets.QMainWindow
GUI to display a sensitivity analysis.
-
add_study
(theCollection, theParameters, name)¶ Add sensitivity study to the GUI
Parameters: - theCollection – Results of the sensitivity study
- theParameters – Parameters of the sensitivity study
- name – Name (for the GUI) of the sensitivity study
Returns:
-
_set_study
(index)¶
-
_get_sobol_indices
()¶
-
_get_S1_conv
()¶
-
_get_ST_conv
()¶
-
get_SA
(theParameters, theObjectives)¶
-
set_SA
(theSA)¶
-
get_attribute_selected
()¶
-
-
analyse_sobol_plot_indices
(SA_library: optimeed.consolidate.SensitivityAnalysis_LibInterface, title='', hold=True)¶ ¨Plot first and total order sobol indices.
Parameters: - SA_library – The library used for computing the sobol indices
- title – Title of the window
- hold – If true, this function will be blocking (otherwise use plt.show())
Returns:
-
analyse_sobol_plot_convergence
(theDict, title='', hold=True)¶ Plot convergence of the sobol indices.
Parameters: - theDict – Dictionary containing sobol indices
- title – Title of the convergence window
- hold – If true, this function will be blocking (otherwise use start_qt_mainloop)
Returns: window containing convergence graphs
-
analyse_sobol_plot_2ndOrder_indices
(SA_library: optimeed.consolidate.SensitivityAnalysis_LibInterface, title='', hold=True)¶ ¨Plot second order sobol indices. Args and kwargs are the same as analyse_sobol_plot_indices
-
class
OptimizationDisplayer
(theOptiParameters, theOptiHistoric, additionalWidgets=None, light_background=False)¶ Bases:
optimeed.core.Option_class
Class used to display optimization process in real time
-
signal_optimization_over
¶
-
set_actionsOnClick
(theList)¶ Set actions to perform on click, list of
on_graph_click_interface
-
generate_optimizationGraphs
()¶ Generates the optimization graphs. :return:
Graphs
,LinkDataGraph
, :class:’~optimeed.visulaize.gui.widgets.widget_graphs_visual.widget_graphs_visual
-
__change_appearance_violate_constraints
()¶
-
__refresh
()¶
-
start_autorefresh
(timer_autosave)¶
-
stop_autorefresh
()¶
-
__set_graphs_disposition
()¶ Set nicely the graphs disposition
-
launch_optimization
(args_opti, kwargs_opti, refresh_time=0.1, max_nb_points_convergence=100)¶ Perform the optimization and spawn the convergence graphs afterwards. :param args_opti: arguments (as list) destined to launch the optimization :param kwargs_opti: keywords arguments (as dict) destined to launch the optimization :param refresh_time: float indicating the refresh time of the graphs. If it becomes laggy -> use a higher one. :param max_nb_points_convergence: maximum number of points in the graph that displays the convergence. Put None if performance is not an issue.
-
close_windows
()¶
-
display_graphs
(theGraphs)¶
-
create_main_window
()¶ From the widgets and the actions on click, spawn a window and put a gui around widgetsGraphsVisual.
-
-
class
ViewOptimizationResults
¶ Convenience class to display the results of an optimization
-
add_opti_project
(foldername, kwargsPlot=None)¶ Add an opti project to visualize.
Parameters: - foldername – the folder containing the saved files. (as string)
- kwargsPlot – Check kgwargs ~optimeed.core.graphs.Data
-
get_data_link
() → optimeed.core.LinkDataGraph¶ Return the object
LinkDataGraph
-
display_graphs_pareto_mode
(theActionsOnClick=None, kwargs_common=None, keep_alive=True, max_nb_points_convergence=None, light_background=False)¶ Same as meth:display_graphs, but only displays the points belonging to the pareto front.
Parameters: - theActionsOnClick – list of actions to perform when a graph is clicked
- kwargs_common – plot options (from Data class) to apply to all the graphs (ex: {“is_scattered”: True}).
- keep_alive – if set to true, this method will be blocking. Otherwise you should manually call start_qt_mainloop().
- max_nb_points_convergence – maximum number of points in the graph that displays the convergence. Put None if performance is not an issue.
- light_background – boolean, True or False for White or Black background color in graphs
Returns: widget_graphs_visual for the log opti, widget_graphs_visual for the convergence (
widget_graphs_visual
)
-
display_graphs
(theActionsOnClick=None, kwargs_common=None, keep_alive=True, max_nb_points_convergence=None, light_background=False)¶ Generates the optimization graphs.
Parameters: - theActionsOnClick – list of actions to perform when a graph is clicked
- kwargs_common – plot options (from Data class) to apply to all the graphs (ex: {“is_scattered”: True}).
- keep_alive – if set to true, this method will be blocking. Otherwise you should manually call start_qt_mainloop().
- max_nb_points_convergence – maximum number of points in the graph that displays the convergence. Put None if performance is not an issue.
- light_background – boolean, True or False for White or Black background color in graphs
Returns: widget_graphs_visual for the log opti, widget_graphs_visual for the convergence (
widget_graphs_visual
)
-
-
class
Widget_graphsVisual
(*args, **kwargs)¶ Bases:
Widget_graphsVisualLite
Create a gui for pyqtgraph with trace selection options, export and action on clic choices
-
refreshTraceList
()¶ Refresh all the traces
-
set_actions_on_click
(actions)¶
-
-
class
MainWindow
(QtWidgetList, isLight=True, actionOnWindowClosed=None, neverCloseWindow=False, title_window='Awesome Visualisation Tool', size=None)¶ Bases:
PyQt5.QtWidgets.QMainWindow
Main class that spawns a Qt window. Use
run()
to display it.-
set_actionOnClose
(actionOnWindowClosed)¶
-
closeEvent
(event)¶
-
run
(hold=False)¶ Display the window
-
keyPressEvent
(event)¶
-
-
start_qt_mainloop
()¶ Starts qt mainloop, which is necessary for qt to handle events
-
stop_qt_mainloop
()¶ Stops qt mainloop and resumes to program
-
process_qt_events
()¶ Process current qt events
-
class
Data
(x: list, y: list, x_label='', y_label='', legend='', is_scattered=False, transfo_x=lambda selfData, x: x, transfo_y=lambda selfData, y: y, xlim=None, ylim=None, permutations=None, sort_output=False, color=None, alpha=255, symbol='o', symbolsize=8, fillsymbol=True, outlinesymbol=1.8, linestyle='-', width=2, meta=None)¶ This class is used to store informations necessary to plot a 2D graph. It has to be combined with a gui to be useful (ex. pyqtgraph)
-
set_kwargs
(kwargs)¶ Set a kwarg after creation of the class
-
set_data
(x: list, y: list)¶ Overwrites current datapoints with new set
-
set_meta
(meta)¶ Set associated ‘Z’ data
-
get_x
()¶ Get x coordinates of datapoints
-
get_symbolsize
()¶ Get size of the symbols
-
symbol_isfilled
()¶ Check if symbols has to be filled or not
-
get_symbolOutline
()¶ Get color factor of outline of symbols
-
get_length_data
()¶ Get number of points
-
get_xlim
()¶ Get x limits of viewbox
-
get_ylim
()¶ Get y limits of viewbox
-
get_y
()¶ Get y coordinates of datapoints
-
get_meta
()¶ Get associated ‘Z’ data
-
get_color
()¶ Get color of the line, without transformation
-
get_color_alpha
()¶ Get color of the line. Return r, g, b in 0, 255 scale
-
get_alpha
()¶ Get opacity
-
get_width
()¶ Get width of the line
-
get_number_of_points
()¶ Get number of points
-
get_plot_data
()¶ Call this method to get the x and y coordinates of the points that have to be displayed. => After transformation, and after permutations.
Returns: x (list), y (list)
-
get_plot_meta
(x, y)¶ Call this method to get the z coordinates of the points that been displayed. => After transformation, and after permutations.
Returns: z (list)
-
get_permutations
(x=None)¶ Return the transformation ‘permutation’: xplot[i] = xdata[permutation[i]]
-
get_invert_permutations
()¶ Return the inverse of permutations: xdata[i] = xplot[revert[i]]
-
get_dataIndex_from_graphIndex
(index_graph_point)¶ From an index given in graph, recovers the index of the data.
Parameters: index_graph_point – Index in the graph Returns: index of the data
-
get_dataIndices_from_graphIndices
(index_graph_point_list)¶ Same as get_dataIndex_from_graphIndex but with a list in entry. Can (?) improve performances for huge dataset.
Parameters: index_graph_point_list – List of Index in the graph Returns: List of index of the data
-
get_graphIndex_from_dataIndex
(index_data)¶ From an index given in the data, recovers the index of the graph.
Parameters: index_data – Index in the data Returns: index of the graph
-
get_graphIndices_from_dataIndices
(index_data_list)¶ Same as get_graphIndex_from_dataIndex but with a list in entry. Can (?) improve performances for huge dataset.
Parameters: index_data_list – List of Index in the data Returns: List of index of the graph
-
set_permutations
(permutations)¶ Set permutations between datapoints of the trace
Parameters: permutations – list of indices to plot (example: [0, 2, 1] means that the first point will be plotted, then the third, then the second one)
-
get_x_label
()¶ Get x label of the trace
-
get_y_label
()¶ Get y label of the trace
-
get_legend
()¶ Get name of the trace
-
get_symbol
()¶ Get symbol
-
add_point
(x, y)¶ Add point(s) to trace (inputs can be list or numeral)
-
delete_point
(index_point)¶ Delete a point from the datapoints
-
isScattered
()¶ Check if plot is scatteded
-
set_indices_points_to_plot
(indices)¶ Set indices points to plot
-
get_indices_points_to_plot
()¶ Get indices points to plot
-
get_linestyle
()¶ Get linestyle
-
__str__
()¶ Return str(self).
-
export_str
()¶ Method to save the points constituting the trace
-
set_color
(theColor)¶ Set trace color
-
set_legend
(theLegend)¶ Set legend
-
-
class
Graphs
¶ Contains several
Graph
-
updateChildren
()¶
-
add_trace_firstGraph
(data, updateChildren=True)¶ Same as add_trace, but only if graphs has only one id :param data: :param updateChildren: :return:
-
add_trace
(idGraph, data, updateChildren=True)¶ Add a trace to the graph
Parameters: - idGraph – id of the graph
- data –
Data
- updateChildren – Automatically calls callback functions
Returns: id of the created trace
-
remove_trace
(idGraph, idTrace, updateChildren=True)¶ Remove the trace from the graph
Parameters: - idGraph – id of the graph
- idTrace – id of the trace to remove
- updateChildren – Automatically calls callback functions
-
get_first_graph
()¶ Get id of the first graph
Returns: id of the first graph
-
get_graph
(idGraph)¶ Get graph object at idgraph
Parameters: idGraph – id of the graph to get Returns: Graph
-
get_all_graphs_ids
()¶ Get all ids of the graphs
Returns: list of id graphs
-
get_all_graphs
()¶ Get all graphs. Return dict {id:
Graph
}
-
add_graph
(updateChildren=True)¶ Add a new graph
Returns: id of the created graph
-
remove_graph
(idGraph)¶ Delete a graph
Parameters: idGraph – id of the graph to delete
-
add_update_method
(childObject)¶ Add a callback each time a graph is modified.
Parameters: childObject – method without arguments
-
export_str
()¶ Export all the graphs in text
Returns: str
-
merge
(otherGraphs)¶
-
reset
()¶
-
is_empty
()¶
-
-
class
Onclick_measure
¶ Bases:
optimeed.visualize.onclick.onclickInterface.OnclickInterface
On Click: Measure distance. Click on two points to perform that action
-
graph_clicked
(the_graph_visual, index_graph, index_trace, indices_points)¶ Action to perform when a graph is clicked
Parameters: - theGraphsVisual – class widget_graphs_visual that has called the method
- index_graph – Index of the graph that has been clicked
- index_trace – Index of the trace that has been clicked
- indices_points – graph Indices of the points that have been clicked
Returns:
-
reset_distance
()¶
-
display_distance
()¶
-
get_name
()¶
-
-
class
Onclick_getXY
¶ Bases:
optimeed.visualize.onclick.onclickInterface.OnclickInterface
On click: display X and Y coordinates of the points
-
graph_clicked
(theGraphVisual, index_graph, index_trace, indices_points)¶ Action to perform when a graph is clicked
Parameters: - theGraphsVisual – class widget_graphs_visual that has called the method
- index_graph – Index of the graph that has been clicked
- index_trace – Index of the trace that has been clicked
- indices_points – graph Indices of the points that have been clicked
Returns:
-
get_name
()¶
-
-
class
_PlotHolders
¶ -
add_plot
(x, y, **kwargs)¶
-
get_wgGraphs
()¶
-
new_plot
()¶
-
set_title
(theTitle, **kwargs)¶
-
reset
()¶
-
axis_equal
()¶
-
-
class
WindowHolders
¶ -
set_currFigure
(currFigure)¶
-
add_plot
(*args, **kwargs)¶
-
set_title
(*args, **kwargs)¶
-
new_figure
()¶
-
new_plot
()¶
-
show
()¶
-
get_curr_plotHolder
()¶
-
get_wgGraphs
(fig=None)¶
-
get_all_figures
()¶
-
axis_equal
()¶
-
-
myWindows
¶
-
plot
(x, y, hold=False, **kwargs)¶ Plot new trace
-
show
()¶ Show (start qt mainloop) graphs. Blocking
-
figure
(numb=None)¶ Set current figure
-
add_action_on_click
(theAction)¶
-
set_title
(theTitle, **kwargs)¶ Set title of the plot
-
axis_equal
()¶
-
get_all_figures
()¶ Get all existing figures
-
get_wgGraphs
(fig=None)¶ Advanced option. :return:
widget_graphs_visual
-
class
FilledContourPlot
(*args, **kwargs)¶ Bases:
ContourPlot
-
class
SurfPlot
(X, Y, Z, **kwargs)¶ Bases:
GridPlot_Generic
-
class
MeshPlot
(X, Y, Z, **kwargs)¶ Bases:
GridPlot_Generic
-
printIfShown
(theStr, show_type=SHOW_DEBUG, isToPrint=True, appendTypeName=True, end='n')¶
-
_do_scatterPlot
(theData: optimeed.core.ScatterPlot3)¶
-
class
Widget_graphsVisualLite
(theGraphs, **kwargs)¶ Bases:
PyQt5.QtWidgets.QWidget
Widget element to draw a graph. The traces and graphs to draw are defined in
Graphs
taken as argument. This widget is linked to the excellent third-party library pyqtgraph, under MIT license-
signal_must_update
¶
-
signal_graph_changed
¶
-
set_graph_disposition
(indexGraph, row=1, col=1, rowspan=1, colspan=1)¶ Change the graphs disposition.
Parameters: - indexGraph – index of the graph to change
- row – row where to place the graph
- col – column where to place the graph
- rowspan – number of rows across which the graph spans
- colspan – number of columns across which the graph spans
Returns:
-
__create_graph
(idGraph)¶
-
__check_graphs
()¶
-
on_click
(plotDataItem, clicked_points)¶
-
update_graphs
(singleUpdate=True)¶ This method is used to update the graph. This is fast but NOT safe (especially when working with threads). To limit the risks, please use self.signal_must_update.emit() instead.
Parameters: singleUpdate – if set to False, the graph will periodically refres each self.refreshtime
-
fast_update
()¶ Use this method to update the graph in a fast way. NOT THREAD SAFE.
-
select_folder_and_export
()¶
-
exportGraphs
(filename)¶ Export the graphs
-
export_txt
(filename_txt)¶
-
export_svg
(filename)¶
-
export_tikz
(foldername_tikz)¶
-
link_axes
()¶
-
get_graph
(idGraph) → optimeed.visualize.graphs.graphVisual.GraphVisual¶ Get corresponding
GraphVisual
of the graph idGraph
-
get_trace
(idGraph, idTrace) → optimeed.visualize.graphs.traceVisual.TraceVisual¶ Get corresponding Tracevisual
-
keyPressEvent
(event)¶ What happens if a key is pressed. R: reset the axes to their default value
-
delete_graph
(idGraph)¶ Delete the graph idGraph
-
delete
()¶
-
get_all_graphsVisual
()¶ Return a dictionary {idGraph:
GraphVisual
}.
Get the QGraphicsLayout where it’s possible to add buttons, etc.
-
set_actionOnClick
(theActionOnClick)¶ Action to perform when the graph is clicked
Parameters: theActionOnClick – on_graph_click_interface
Returns:
-
set_title
(idGraph, titleName, **kwargs)¶ Set title of the graph
Parameters: - idGraph – id of the graph
- titleName – title to set
-
-
class
Widget_graphsVisual
(*args, **kwargs) Bases:
Widget_graphsVisualLite
Create a gui for pyqtgraph with trace selection options, export and action on clic choices
-
refreshTraceList
() Refresh all the traces
-
set_actions_on_click
(actions)
-
-
class
Onclick_representDevice
(theLinkDataGraph, visuals)¶ Bases:
optimeed.visualize.onclick.onclickInterface.OnclickInterface
On click: show informations about the points (loop through attributes)
-
class
DataInformationVisuals
¶ -
delete_visual
(theVisual)¶
-
add_visual
(theVisual, theTrace, indexPoint)¶
-
get_new_index
()¶
-
curr_index
()¶
-
-
graph_clicked
(theGraphVisual, index_graph, index_trace, indices_points)¶ Action to perform when a point in the graph has been clicked: Creates new window displaying the device and its informations
-
get_name
()¶
-
class
-
class
RepresentDeviceInterface
¶
-
class
Onclick_animate
(theLinkDataGraph, theAnimation)¶ Bases:
optimeed.visualize.onclick.onclickInterface.OnclickInterface
On click: add or remove an element to animate
-
graph_clicked
(theGraphVisual, index_graph, index_trace, indices_points)¶ Action to perform when a graph is clicked
Parameters: - theGraphsVisual – class widget_graphs_visual that has called the method
- index_graph – Index of the graph that has been clicked
- index_trace – Index of the trace that has been clicked
- indices_points – graph Indices of the points that have been clicked
Returns:
-
get_name
()¶
-
-
class
Onclick_changeSymbol
(theLinkDataGraph)¶ Bases:
optimeed.visualize.onclick.onclickInterface.OnclickInterface
On Click: Change the symbol of the point that is clicked
-
graph_clicked
(theGraphVisual, index_graph, index_trace, indices_points)¶ Action to perform when a graph is clicked
Parameters: - theGraphsVisual – class widget_graphs_visual that has called the method
- index_graph – Index of the graph that has been clicked
- index_trace – Index of the trace that has been clicked
- indices_points – graph Indices of the points that have been clicked
Returns:
-
get_name
()¶
-
-
class
Onclick_copySomething
(theDataLink, functionStrFromDevice)¶ Bases:
optimeed.visualize.onclick.onclickInterface.OnclickInterface
On Click: copy something
-
graph_clicked
(the_graph_visual, index_graph, index_trace, indices_points)¶ Action to perform when a graph is clicked
Parameters: - theGraphsVisual – class widget_graphs_visual that has called the method
- index_graph – Index of the graph that has been clicked
- index_trace – Index of the trace that has been clicked
- indices_points – graph Indices of the points that have been clicked
Returns:
-
get_name
()¶
-
-
class
Onclick_delete
(theDataLink)¶ Bases:
optimeed.visualize.onclick.onclickInterface.OnclickInterface
On Click: Delete the points from the graph
-
graph_clicked
(_theGraphVisual, index_graph, index_trace, indices_points)¶ Action to perform when a graph is clicked
Parameters: - theGraphsVisual – class widget_graphs_visual that has called the method
- index_graph – Index of the graph that has been clicked
- index_trace – Index of the trace that has been clicked
- indices_points – graph Indices of the points that have been clicked
Returns:
-
get_name
()¶
-
-
class
Onclick_exportCollection
(theDataLink)¶ Bases:
optimeed.visualize.onclick.onclickInterface.OnclickInterface
On click: export the selected points
-
graph_clicked
(theGraphVisual, index_graph, index_trace, indices_points)¶ Action to perform when a graph is clicked
Parameters: - theGraphsVisual – class widget_graphs_visual that has called the method
- index_graph – Index of the graph that has been clicked
- index_trace – Index of the trace that has been clicked
- indices_points – graph Indices of the points that have been clicked
Returns:
-
reset_graph
()¶
-
get_name
()¶
-
-
class
Onclick_exportToTxt
(theDataLink, attributes_shadow=None)¶ Bases:
optimeed.visualize.onclick.onclickInterface.OnclickInterface
On click: export the data of the whole the trace selected
-
graph_clicked
(theGraphVisual, index_graph, index_trace, indices_points)¶ Action to perform when a graph is clicked
Parameters: - theGraphsVisual – class widget_graphs_visual that has called the method
- index_graph – Index of the graph that has been clicked
- index_trace – Index of the trace that has been clicked
- indices_points – graph Indices of the points that have been clicked
Returns:
-
get_name
()¶
-
-
class
Onclick_exportTrace
(theDataLink, getShadow=True)¶ Bases:
optimeed.visualize.onclick.onclickInterface.OnclickInterface
On click: export the data of the whole the trace selected
-
graph_clicked
(theGraphVisual, index_graph, index_trace, indices_points)¶ Action to perform when a graph is clicked
Parameters: - theGraphsVisual – class widget_graphs_visual that has called the method
- index_graph – Index of the graph that has been clicked
- index_trace – Index of the trace that has been clicked
- indices_points – graph Indices of the points that have been clicked
Returns:
-
get_name
()¶
-
-
class
Onclick_extractPareto
(theDataLink, max_x=False, max_y=False)¶ Bases:
optimeed.visualize.onclick.onclickInterface.OnclickInterface
On click: extract the pareto from the cloud of points
-
graph_clicked
(the_graph_visual, index_graph, index_trace, _)¶ Action to perform when a graph is clicked
Parameters: - theGraphsVisual – class widget_graphs_visual that has called the method
- index_graph – Index of the graph that has been clicked
- index_trace – Index of the trace that has been clicked
- indices_points – graph Indices of the points that have been clicked
Returns:
-
get_name
()¶
-
-
class
Onclick_measure
Bases:
optimeed.visualize.onclick.onclickInterface.OnclickInterface
On Click: Measure distance. Click on two points to perform that action
-
graph_clicked
(the_graph_visual, index_graph, index_trace, indices_points) Action to perform when a graph is clicked
Parameters: - theGraphsVisual – class widget_graphs_visual that has called the method
- index_graph – Index of the graph that has been clicked
- index_trace – Index of the trace that has been clicked
- indices_points – graph Indices of the points that have been clicked
Returns:
-
reset_distance
()
-
display_distance
()
-
get_name
()
-
-
class
Onclick_removeTrace
(theDataLink)¶ Bases:
optimeed.visualize.onclick.onclickInterface.OnclickInterface
Interface class for the action to perform when a point is clicked
-
graph_clicked
(theGraphVisual, index_graph, index_trace, _)¶ Action to perform when a graph is clicked
Parameters: - theGraphsVisual – class widget_graphs_visual that has called the method
- index_graph – Index of the graph that has been clicked
- index_trace – Index of the trace that has been clicked
- indices_points – graph Indices of the points that have been clicked
Returns:
-
get_name
()¶
-
-
class
Onclick_tojson
(theDataLink)¶ Bases:
optimeed.visualize.onclick.onclickInterface.OnclickInterface
Interface class for the action to perform when a point is clicked
-
graph_clicked
(theGraphVisual, index_graph, index_trace, indices_points)¶ Action to perform when a graph is clicked
Parameters: - theGraphsVisual – class widget_graphs_visual that has called the method
- index_graph – Index of the graph that has been clicked
- index_trace – Index of the trace that has been clicked
- indices_points – graph Indices of the points that have been clicked
Returns:
-
get_name
()¶
-
-
class
OnclickInterface
¶ Interface class for the action to perform when a point is clicked
-
class
Onclick_getXY
Bases:
optimeed.visualize.onclick.onclickInterface.OnclickInterface
On click: display X and Y coordinates of the points
-
graph_clicked
(theGraphVisual, index_graph, index_trace, indices_points) Action to perform when a graph is clicked
Parameters: - theGraphsVisual – class widget_graphs_visual that has called the method
- index_graph – Index of the graph that has been clicked
- index_trace – Index of the trace that has been clicked
- indices_points – graph Indices of the points that have been clicked
Returns:
-
get_name
()
-
-
class
Represent_opengl
(DeviceDrawer)¶ Bases:
optimeed.visualize.onclick.onclick_representDevice.RepresentDeviceInterface
-
get_widget
(theNewDevice)¶ Get Qt widget that represents the device
Parameters: theDevice – the Device to be represented Returns: Qt widget
-
-
class
Represent_image
(get_base_64_from_device)¶ Bases:
optimeed.visualize.onclick.onclick_representDevice.RepresentDeviceInterface
-
get_widget
(theNewDevice)¶ Get Qt widget that represents the device
Parameters: theDevice – the Device to be represented Returns: Qt widget
-
-
class
Represent_lines
(attribute_lines)¶ Bases:
optimeed.visualize.onclick.onclick_representDevice.RepresentDeviceInterface
-
get_widget
(theNewDevice)¶ Get Qt widget that represents the device
Parameters: theDevice – the Device to be represented Returns: Qt widget
-
-
class
Represent_brut_attributes
(is_light=True, convertToHtml=True, recursion_level=5)¶ Bases:
optimeed.visualize.onclick.onclick_representDevice.RepresentDeviceInterface
-
get_widget
(theNewDevice)¶ Get Qt widget that represents the device
Parameters: theDevice – the Device to be represented Returns: Qt widget
-
-
class
Represent_txt_function
(is_light=True, convertToHtml=True)¶ Bases:
optimeed.visualize.onclick.onclick_representDevice.RepresentDeviceInterface
-
getTxt
(theNewDevice)¶
-
get_widget
(theNewDevice)¶ Get Qt widget that represents the device
Parameters: theDevice – the Device to be represented Returns: Qt widget
-
-
class
Animate_lines
(get_lines_method, is_light=True, theId=0, window_title='Animation')¶ Bases:
optimeed.visualize.onclick.animationGUI.AnimationGUI
Implements
DataAnimationVisuals
to show drawing made out of lines (widget_line_drawer
)-
export_widget
(painter)¶ Render scene with a painter
Parameters: painter – PyQt painter
-
delete_key_widgets
(key)¶ What to do when a key has to be deleted
Parameters: key – key of the trace that has to be deleted
-
update_widget_w_animation
(key, index, the_data_animation)¶ What to do when a new element has to be animated. Example: self.theOpenGLWidget.set_deviceToDraw(the_data_animation.get_element_animations(0, index))
Parameters: - key – key of the trace that has to be animated
- index – index that has to be animated
- the_data_animation –
DataAnimationTrace
that has to be animated
-
get_interesting_elements
(devices_list)¶ Function called upon new trace creation. From a list, takes the interesting elements for animation :param element_list: :return: new_element_list
-
-
class
Animate_openGL
(theOpenGLWidget, theId=0, window_title='Animation')¶ Bases:
optimeed.visualize.onclick.animationGUI.AnimationGUI
Implements
DataAnimationVisuals
to show opengl drawing-
update_widget_w_animation
(key, index, the_data_animation)¶ What to do when a new element has to be animated. Example: self.theOpenGLWidget.set_deviceToDraw(the_data_animation.get_element_animations(0, index))
Parameters: - key – key of the trace that has to be animated
- index – index that has to be animated
- the_data_animation –
DataAnimationTrace
that has to be animated
-
export_widget
(painter)¶ Render scene with a painter
Parameters: painter – PyQt painter
-
delete_key_widgets
(key)¶ What to do when a key has to be deleted
Parameters: key – key of the trace that has to be deleted
-
-
class
Animate_lines_and_text
(*args, **kwargs)¶ Bases:
Animate_lines
Same as
DataAnimationLines
but also with text-
update_widget_w_animation
(key, index, the_data_animation)¶ What to do when a new element has to be animated. Example: self.theOpenGLWidget.set_deviceToDraw(the_data_animation.get_element_animations(0, index))
Parameters: - key – key of the trace that has to be animated
- index – index that has to be animated
- the_data_animation –
DataAnimationTrace
that has to be animated
-
-
class
Animate_openGL_and_text
(*args, is_light=True, **kwargs)¶ Bases:
Animate_openGL
Implements
DataAnimationVisuals
to show opengl drawing and text-
update_widget_w_animation
(key, index, the_data_animation)¶ What to do when a new element has to be animated. Example: self.theOpenGLWidget.set_deviceToDraw(the_data_animation.get_element_animations(0, index))
Parameters: - key – key of the trace that has to be animated
- index – index that has to be animated
- the_data_animation –
DataAnimationTrace
that has to be animated
-
get_interesting_elements
(devices_list)¶ Function called upon new trace creation. From a list, takes the interesting elements for animation :param element_list: :return: new_element_list
-
-
class
DeviceDrawerInterface
¶ -
keyboard_push_action
(theKey)¶
-
get_colour_scalebar
()¶
-
get_colour_background
()¶
-
get_opengl_options
()¶
-
-
class
MaterialRenderingProperties
(amb3, dif3, spec3, shin)¶ -
getSpec3
()¶
-
getDif3
()¶
-
getAmb3
()¶
-
getShin
()¶
-
activateMaterialProperties
(alpha=1)¶
-
-
Emerald_material
¶
-
Yellow_Emerald_material
¶
-
Brass_material
¶
-
Bronze_material
¶
-
Silver_material
¶
-
Steel_material
¶
-
Copper_material
¶
-
Chrome_material
¶
-
Blue_material
¶
-
Red_material
¶
-
Green_material
¶
-
Cyan_material
¶
-
Pink_material
¶
-
class
OnselectInterface
¶
-
class
Onselect_highlight
(theLinkDataGraphs, theWgPlot)¶ Bases:
optimeed.visualize.selector.onselectInterface.OnselectInterface
-
selector_updated
(selection_name, the_collection, selected_data, not_selected_data)¶ Action to perform once the data have been selected
Parameters: - selection_name – name of the selection (deprecated ?)
- the_collection – the collection
- selected_data – indices of the data selected
- not_selected_data – indices of the data not selected
Returns:
-
cancel_selector
(selection_identifier)¶ Action to perform when data stopped being selected :param selection_identifier: identifier that was returned by selector_updated :return:
-
get_name
()¶ Get the name of the action
Returns: string
-
-
class
Onselect_setcolor
(theLinkDataGraphs, theWgPlot, color=(255, 0, 0))¶ Bases:
optimeed.visualize.selector.onselectInterface.OnselectInterface
-
selector_updated
(selection_name, the_collection, selected_data, not_selected_data)¶ Action to perform once the data have been selected
Parameters: - selection_name – name of the selection (deprecated ?)
- the_collection – the collection
- selected_data – indices of the data selected
- not_selected_data – indices of the data not selected
Returns:
-
cancel_selector
(selection_identifier)¶ Action to perform when data stopped being selected :param selection_identifier: identifier that was returned by selector_updated :return:
-
get_name
()¶ Get the name of the action
Returns: string
-
-
class
Onselect_newTrace
(theLinkDataGraphs)¶ Bases:
optimeed.visualize.selector.onselectInterface.OnselectInterface
-
selector_updated
(selection_name, the_collection, selected_data, not_selected_data)¶ Action to perform once the data have been selected
Parameters: - selection_name – name of the selection (deprecated ?)
- the_collection – the collection
- selected_data – indices of the data selected
- not_selected_data – indices of the data not selected
Returns: identifier that can later be used with cancel_selector
-
cancel_selector
(selection_identifier)¶ Action to perform when data stopped being selected :param selection_identifier: identifier that was returned by selector_updated :return:
-
get_name
()¶ Get the name of the action
Returns: string
-
-
class
Onselect_splitTrace
(theLinkDataGraphs)¶ Bases:
optimeed.visualize.selector.onselectInterface.OnselectInterface
-
selector_updated
(selection_name, the_collection, selected_data, not_selected_data)¶ Action to perform once the data have been selected
Parameters: - selection_name – name of the selection (deprecated ?)
- the_collection – the collection
- selected_data – indices of the data selected
- not_selected_data – indices of the data not selected
Returns: identifier that can later be used with cancel_selector
-
cancel_selector
(selection_identifiers)¶ Action to perform when data stopped being selected :param selection_identifier: identifier that was returned by selector_updated :return:
-
get_name
()¶ Get the name of the action
Returns: string
-
-
class
Widget_listWithSearch
(*args, **kwargs)¶ Bases:
PyQt5.QtWidgets.QWidget
-
get_index_selected
()¶
-
get_name_selected
()¶
-
set_list
(names)¶
-
_filter_list
()¶
-
_iter_items
()¶
-
-
class
Widget_image
(image_b64)¶ Bases:
PyQt5.QtWidgets.QLabel
-
eventFilter
(source, event)¶
-
set_image
(image_b64)¶ Set new image to widget
-
-
class
Widget_lineDrawer
(minWinHeight=300, minWinWidth=300, is_light=True)¶ Bases:
PyQt5.QtWidgets.QWidget
Widget allowing to display several lines easily
-
signal_must_update
¶
-
on_update_signal
(listOfLines)¶
-
delete_lines
(key_id)¶ Dele the lines :param key_id: id to delete :return:
-
set_lines
(listOfLines, key_id=0, pen=None)¶ Set the lines to display :param listOfLines: list of [x1, y1, x2, y2] corresponding to lines :param key_id: id of the trace :param pen: pen used to draw the lines :return:
-
paintEvent
(event, painter=None)¶
-
get_extrema_lines
()¶
-
Bases:
PyQt5.QtWidgets.QMenu
Same as QMenu, but integrates it behind a button more easily.
-
class
Widget_openGL
(parent=None)¶ Bases:
PyQt5.QtWidgets.QOpenGLWidget
Interface that provides opengl capabilities. Ensures zoom, light, rotation, etc.
-
sizeHint
()¶
-
minimumSizeHint
()¶
-
set_deviceDrawer
(theDeviceDrawer)¶ Set a drawer
optimeed.visualize.widgets.openGL.deviceDrawerInterface.DeviceDrawerInterface
-
set_deviceToDraw
(theDeviceToDraw)¶ Set the device to draw
-
initializeGL
()¶
-
paintGL
()¶
-
resizeGL
(w, h)¶
-
mousePressEvent
(event)¶
-
mouseMoveEvent
(event)¶
-
keyPressEvent
(event)¶
-
wheelEvent
(QWheelEvent)¶
-
-
class
Widget_tableWithSearch
(*args, **kwargs)¶ Bases:
PyQt5.QtWidgets.QWidget
-
cellChanged
¶
-
hideRow
(row)¶
-
showRow
(row)¶
-
force_hide_row
(row)¶
-
remove_forced_hide_row
(row)¶
-
get_entries_selected
()¶
-
_cellChanged
()¶
-
set_entries
(names, numColumns=3, hidden=False)¶
-
get_shown_entries
()¶
-
set_item
(row, col, item)¶
-
get_item
(row, col)¶
-
_filter_list
()¶
-
_iter_items
()¶
-