Bases: sas.guiframe.local_perspectives.plotting.BaseInteractor._BaseInteractor
Select an annulus through a 2D plot. This interactor is used to average 2D data with the region defined by 2 radius. this class is defined by 2 Ringinterators.
Clear the slicer and all connected events related to this slicer
Store a copy of values of parameters of the slicer into a dictionary.
Return params: | the dictionary created |
---|
Process move to a new position, making sure that the move is allowed.
Called when any dragging motion ends. Post an event (type =SlicerParameterEvent) to plotter 2D with a copy slicer parameters Call _post_data method
Restore the roughness for this layer.
Remember the roughness for this layer and the next so that we can restore on Esc.
Allow adding plot to the same panel
Parameters: | n – the number of layer |
---|
Receive a dictionary and reset the slicer with values contained in the values of the dictionary.
Parameters: | params – a dictionary containing name of slicer parameters and values the user assigned to the slicer. |
---|
Respond to changes in the model by recalculating the profiles and resetting the widgets.
Bases: sas.guiframe.local_perspectives.plotting.BaseInteractor._BaseInteractor
Draw a ring Given a radius
Clear the slicer and all connected events related to this slicer
Store a copy of values of parameters of the slicer into a dictionary.
Return params: | the dictionary created |
---|
Process move to a new position, making sure that the move is allowed.
Called when any dragging motion ends. Post an event (type =SlicerParameterEvent) to plotter 2D with a copy slicer parameters Call _post_data method
Restore the roughness for this layer.
Remember the roughness for this layer and the next so that we can restore on Esc.
Allow adding plot to the same panel
Parameters: | n – the number of layer |
---|
Receive a dictionary and reset the slicer with values contained in the values of the dictionary.
Parameters: | params – a dictionary containing name of slicer parameters and values the user assigned to the slicer. |
---|
Respond to changes in the model by recalculating the profiles and resetting the widgets.
Bases: sas.guiframe.local_perspectives.plotting.BaseInteractor._BaseInteractor
Draw a ring Given a radius
Clear the slicer and all connected events related to this slicer
Store a copy of values of parameters of the slicer into a dictionary.
Return params: | the dictionary created |
---|
Return self._inner_mouse_x: | |
---|---|
the current radius of the ring |
Process move to a new position, making sure that the move is allowed.
Called after a dragging motion
Restore the roughness for this layer.
Remember the roughness for this layer and the next so that we can restore on Esc.
draw the ring given x, y value
Allow adding plot to the same panel
Parameters: | n – the number of layer |
---|
Receive a dictionary and reset the slicer with values contained in the values of the dictionary.
Parameters: | params – a dictionary containing name of slicer parameters and values the user assigned to the slicer. |
---|
Draw the new roughness on the graph.
Arc slicer for 2D data
Bases: sas.guiframe.local_perspectives.plotting.BaseInteractor._BaseInteractor
Select an annulus through a 2D plot
Clear this slicer and its markers
Return arc radius
Process move to a new position, making sure that the move is allowed.
After a dragging motion reset the flag self.has_move to False :param ev: event
Restore the roughness for this layer.
Remember the roughness for this layer and the next so that we can restore on Esc.
Allow adding plot to the same panel :param n: the number of layer
Update the plotted arc :param theta1: starting angle of the arc :param theta2: ending angle of the arc :param nbins: number of points along the arc :param r: radius of the arc
Bases: sas.guiframe.local_perspectives.plotting.BaseInteractor._BaseInteractor
Select an annulus through a 2D plot
Process move to a new position, making sure that the move is allowed.
post data averaging in Q
Restore the roughness for this layer.
Remember the roughness for this layer and the next so that we can restore on Esc.
Respond to changes in the model by recalculating the profiles and resetting the widgets.
Bases: sas.guiframe.local_perspectives.plotting.AzimutSlicer.SectorInteractor
Bases: sas.guiframe.local_perspectives.plotting.AzimutSlicer.SectorInteractor
Bases: sas.guiframe.local_perspectives.plotting.BaseInteractor._BaseInteractor
Select an annulus through a 2D plot
Process move to a new position, making sure that the move is allowed.
Restore the roughness for this layer.
Remember the roughness for this layer and the next so that we can restore on Esc.
Draw the new roughness on the graph.
Bases: sas.plottools.PlotPanel.PlotPanel, sas.guiframe.panel_base.PanelBase
Plot panel for use with the GUI manager
Create the custom dialog for fit appearance modification
Move the cursor line to write Q range
Draw plot
Associates label to a specific color
Get x, y data values near x = x_val
Associates label to symbol
On Modify Graph Appearance
1D plot context menu
Parameters: | event – wx context event |
---|
on Freeze data
left button down and ready to drag Display the position of the mouse on the statusbar
on_Modify Plot Property_close
On Close Event
Gets values from graph appearance dialog and sends them off to modify the plot
On Qmin Qmax vertical line event
Data is ready to be displayed
Parameters: | event – data event |
---|
Remove data from plot
Put self in schedule to full redraw list
Set the resizing (True/False)
return the key of dictionary dic given the value
Bases: sas.guiframe.local_perspectives.plotting.Plotter1D.ModelPanel1D
Plot panel for use with the GUI manager
add toolbar
Perform 2D data averaging on Qx Create a new slicer .
Parameters: | event – wx.menu event |
---|
Perform 2D data averaging on Qy Create a new slicer .
Parameters: | event – wx.menu event |
---|
perform circular averaging on Data2D
Parameters: | event – wx.menu event |
---|
Clear the slicer on the plot
2D plot context menu
Parameters: | event – wx context event |
---|
Edit legend label
left button down and ready to drag
perform circular averaging on Data2D with mask if it exists
Parameters: | event – wx.menu event |
---|
Perform sector averaging on Phi and draw annulus slicer
Perform sector averaging on Q and draw sector slicer
On Qmin Qmax vertical line event
Data is ready to be displayed
TODO: | this name should be changed to something more appropriate Don’t forget that changing this name will mean changing code in plotting.py |
---|---|
Parameters: | event – data event |
Respond to changes in the model by recalculating the profiles and resetting the widgets.
Bases: sas.plottools.toolbar.NavigationToolBar
add item to the toolbar
remove default toolbar item
return the key of dictionary dic given the value
Bases: sas.guiframe.local_perspectives.plotting.BaseInteractor._BaseInteractor
Select an annulus through a 2D plot
Process move to a new position, making sure that the move is allowed.
Restore the roughness for this layer.
Remember the roughness for this layer and the next so that we can restore on Esc.
Draw the new roughness on the graph.
Bases: sas.guiframe.local_perspectives.plotting.BaseInteractor._BaseInteractor
Draw a sector slicer.Allow to performQ averaging on data 2D
Clear the slicer and all connected events related to this slicer
Store a copy of values of parameters of the slicer into a dictionary.
Return params: | the dictionary created |
---|
Process move to a new position, making sure that the move is allowed.
Called a dragging motion ends.Get slicer event
Restore the roughness for this layer.
Remember the roughness for this layer and the next so that we can restore on Esc.
Allow adding plot to the same panel
Parameters: | n – the number of layer |
---|
Receive a dictionary and reset the slicer with values contained in the values of the dictionary.
Parameters: | params – a dictionary containing name of slicer parameters and values the user assigned to the slicer. |
---|
Respond to changes in the model by recalculating the profiles and resetting the widgets.
Bases: sas.guiframe.local_perspectives.plotting.BaseInteractor._BaseInteractor
Draw an oblique line
Parameters: |
|
---|
Clear the slicer and all connected events related to this slicer
Process move to a new position, making sure that the move is allowed.
Restore the roughness for this layer.
Remember the roughness for this layer and the next so that we can restore on Esc.
Allow adding plot to the same panel
Parameters: | n – the number of layer |
---|
Draw oblique line
Parameters: |
|
---|
Simple Plot Frame : supporting only copy, print, scale
Bases: wx._windows.Frame
Frame for simple plot
Add Image
Show background image :Param img: [imread(path) from matplotlib.pyplot]
On Close
Save image
Save image
Save image
Save image
un focusing
Bases: sas.guiframe.local_perspectives.plotting.Plotter2D.ModelPanel2D
PlotPanel for 1d and 2d
2D plot context menu
Parameters: | event – wx context event |
---|
left button down and ready to drag
On grid on/off
Reset the panel color
By pass default boundary blue color drawing
Show the plot
Bases: wx._windows.Dialog
Panel class to show the slicer parameters
Process EVT_SLICER events When the slicer changes, update the panel
Parameters: | event – EVT_SLICER event |
---|
receive an event end reset value text fields inside self.parameters
Parameters have changed
Rebuild the panel
Dialog for appearance of plot symbols, color, size etc.
This software was developed by Institut Laue-Langevin as part of Distributed Data Analysis of Neutron Scattering Experiments (DANSE).
Copyright 2012 Institut Laue-Langevin
Bases: wx._windows.Frame
Appearance dialog
On Close Dlg
Combox on click
On custom size
Find key
Get Current Values :returns : (size, color, symbol, dataname)
Create spacing needed
On OK button clicked
Populate Colors
Populate Size
Populate Symbols
Set Defaults
Extension to MPL to support the binding of artists to key/mouse events.
Remove connections for artists h1, h2, ...
Use clearall() to reset all connections.
Clear connections to all artists.
Use clear(h1,h2,...) to reset specific artists.
In case we need to disconnect from the canvas...
Trigger a particular event for the artist. Fallback to axes, to figure, and to ‘all’ if the event is not processed.
Store and compare selections.
Bases: sas.guiframe.local_perspectives.plotting.BaseInteractor._BaseInteractor
BoxMask Class: determine 2 rectangular area to find the pixel of a Data inside of box.
Uses PointerInteractor , VerticalDoubleLine,HorizontalDoubleLine.
Parameters: |
|
---|
Clear the slicer and all connected events related to this slicer
return mask as a result of boxcut
Store a copy of values of parameters of the slicer into a dictionary.
Return params: | the dictionary created |
---|
Process move to a new position, making sure that the move is allowed.
After a dragging motion this function is called to compute the error and the sum of pixel of a given data 2D
Restore the roughness for this layer.
Remember the roughness for this layer and the next so that we can restore on Esc.
Receive a dictionary and reset the slicer with values contained in the values of the dictionary.
Parameters: | params – a dictionary containing name of slicer parameters and values the user assigned to the slicer. |
---|
Respond to changes in the model by recalculating the profiles and resetting the widgets.
Bases: sas.guiframe.local_perspectives.plotting.boxMask.BoxMask
Bases: sas.guiframe.local_perspectives.plotting.BaseInteractor._BaseInteractor
BoxInteractor define a rectangle that return data1D average of Data2D in a rectangle area defined by -x, x ,y, -y
Clear the slicer and all connected events related to this slicer
Store a copy of values of parameters of the slicer into a dictionary.
Return params: | the dictionary created |
---|
Process move to a new position, making sure that the move is allowed.
Called after a dragging event. Post the slicer new parameters and creates a new Data1D corresponding to the new average
post data averaging in Qx or Qy given new_slab type
Parameters: |
|
---|
Restore the roughness for this layer.
Remember the roughness for this layer and the next so that we can restore on Esc.
Allow adding plot to the same panel
Parameters: | n – the number of layer |
---|
Receive a dictionary and reset the slicer with values contained in the values of the dictionary.
Parameters: | params – a dictionary containing name of slicer parameters and values the user assigned to the slicer. |
---|
Respond to changes in the model by recalculating the profiles and resetting the widgets.
Update the slicer and plot the resulting data
Bases: sas.guiframe.local_perspectives.plotting.boxSlicer.BoxInteractor
Average in Qx direction
Bases: sas.guiframe.local_perspectives.plotting.boxSlicer.BoxInteractor
Average in Qy direction
Bases: sas.guiframe.local_perspectives.plotting.BaseInteractor._BaseInteractor
Draw 2 Horizontal lines centered on (0,0) that can move on the x- direction and in opposite direction
Clear this slicer and its markers
Process move to a new position, making sure that the move is allowed.
Called after a dragging this edge and set self.has_move to False to specify the end of dragging motion
Restore the roughness for this layer.
Remember the roughness for this layer and the next so that we can restore on Esc.
Allow adding plot to the same panel
Parameters: | n – the number of layer |
---|
Draw the new roughness on the graph.
Parameters: |
|
---|
Bases: sas.guiframe.local_perspectives.plotting.BaseInteractor._BaseInteractor
Select an annulus through a 2D plot
Clear this slicer and its markers
Process move to a new position, making sure that the move is allowed.
Called after a dragging this edge and set self.has_move to False to specify the end of dragging motion
Restore the roughness for this layer.
Remember the roughness for this layer and the next so that we can restore on Esc.
Allow adding plot to the same panel
Parameters: | n – the number of layer |
---|
Draw the new roughness on the graph.
Parameters: |
|
---|
Boxsum Class: determine 2 rectangular area to compute the sum of pixel of a Data.
Bases: sas.guiframe.local_perspectives.plotting.BaseInteractor._BaseInteractor
Boxsum Class: determine 2 rectangular area to compute the sum of pixel of a Data. Uses PointerInteractor , VerticalDoubleLine,HorizontalDoubleLine. @param zorder: Artists with lower zorder values are drawn first. @param x_min: the minimum value of the x coordinate @param x_max: the maximum value of the x coordinate @param y_min: the minimum value of the y coordinate @param y_max: the maximum value of the y coordinate
Clear the slicer and all connected events related to this slicer
Store a copy of values of parameters of the slicer into a dictionary. :return params: the dictionary created
return the result of box summation
Process move to a new position, making sure that the move is allowed.
After a dragging motion this function is called to compute the error and the sum of pixel of a given data 2D
Restore the roughness for this layer.
Remember the roughness for this layer and the next so that we can restore on Esc.
Allow adding plot to the same panel :param n: the number of layer
Store the name of the panel associated to this slicer @param name: the name of this panel
Receive a dictionary and reset the slicer with values contained in the values of the dictionary. :param params: a dictionary containing name of slicer parameters and values the user assigned to the slicer.
Respond to changes in the model by recalculating the profiles and resetting the widgets.
Bases: sas.guiframe.local_perspectives.plotting.BaseInteractor._BaseInteractor
Select an annulus through a 2D plot
Clear this figure and its markers
Process move to a new position, making sure that the move is allowed.
After a dragging motion reset the flag self.has_move to False
Restore the roughness for this layer.
Remember the roughness for this layer and the next so that we can restore on Esc.
Update the figure given x and y
Allow adding plot to the same panel @param n: the number of layer
Draw the new roughness on the graph. :param x1: new maximum value of x coordinates :param x2: new minimum value of x coordinates :param y1: new maximum value of y coordinates :param y2: new minimum value of y coordinates :param width: is the width of the new rectangle :param height: is the height of the new rectangle :param center: provided x, y coordinates of the center point
Bases: sas.guiframe.local_perspectives.plotting.BaseInteractor._BaseInteractor
Draw a point that can be dragged with the marker. this class controls the motion the center of the BoxSum
Clear this figure and its markers
Process move to a new position, making sure that the move is allowed.
Restore the roughness for this layer.
Remember the roughness for this layer and the next so that we can restore on Esc.
Allow adding plot to the same panel @param n: the number of layer
Draw the new roughness on the graph.
Bases: sas.guiframe.local_perspectives.plotting.BaseInteractor._BaseInteractor
Draw 2 vertical lines moving in opposite direction and centered on a point (PointInteractor)
Clear this slicer and its markers
Process move to a new position, making sure that the move is allowed.
After a dragging motion reset the flag self.has_move to False
Restore the roughness for this layer.
Remember the roughness for this layer and the next so that we can restore on Esc.
Update the figure given x and y
Allow adding plot to the same panel :param n: the number of layer
Draw the new roughness on the graph. :param x1: new maximum value of x coordinates :param x2: new minimum value of x coordinates :param y1: new maximum value of y coordinates :param y2: new minimum value of y coordinates :param width: is the width of the new rectangle :param height: is the height of the new rectangle :param center: provided x, y coordinates of the center point
Widget to display a 2D map of the detector
Bases: wx._windows.Dialog
Dialog box to let the user edit detector settings
Check the valitidity of zmin and zmax value zmax should be a float and zmin less than zmax
return event containing value to reset the detector of a given data
Highlight the txtcrtl
reset detector info
received value and displayed them
Parameters: |
|
---|
Dialog for general graph appearance
This software was developed by Institut Laue-Langevin as part of Distributed Data Analysis of Neutron Scattering Experiments (DANSE).
Copyright 2012 Institut Laue-Langevin
**/
Bases: wx._windows.Frame
Associates label to a specific legend location
Help panel for plotting
Mask editor
Bases: sas.data_util.calcthread.CalcThread
Compute Resolution
excuting computation
Bases: wx._windows.Dialog
Provides the Mask Editor GUI.
Plot image
Parameters: | image – newplot [plotpanel] |
---|
freeze axes
Get Plot panel
Not implemented
thaw axes
Bases: wx._windows.Dialog
Provides the Mask Editor GUI.
Processing close event
Show error message when mask covers whole data area
freeze axes
Add new mask to old mask
Clear mask
Clear the slicer on the plot
Erase new mask from old mask
Call Draw Box Slicer and get mask inside of the box
Perform inner circular cut on Phi and draw circular slicer
Call Draw Sector Slicer and get mask inside of the sector
onMotion event
Call Draw Box Slicer and get mask outside of the box
Perform outer circular cut on Phi and draw circular slicer
Call Draw Sector Slicer and get mask outside of the sector
Reset mask to the original mask
on wheel event
Not implemented
thaw axes
Respond to changes in the model by recalculating the profiles and resetting the widgets.
Bases: sas.plottools.PlotPanel.PlotPanel
PlotPanel for Quick plot and masking plot
Add Image
Add toolbar
Draw
Default context menu for a plot panel
Disables LeftDown
Disable dragging 2D image
Disables OnPick
send to the parenet the current panel on focus
Bases: wx._core.App
Bases: wx._windows.Frame
Add comment
Bases: sas.guiframe.plugin_base.PluginBase
Plug-in class to be instantiated by the GUI manager
Clear and Hide all plot panels, and remove them from menu
clear the graph
Create and return a list of panel objects
Show a general help dialog.
hide panel with group ID = group_id
return True is this plugin is always active even if the user is switching between perspectives
Create a ‘Plot’ menu to list the panels available for displaying
Parameters: |
|
---|
remove plot of ID = id from a panel of group ID =group_id
update the graph of a given panel
SLD Profile Dialog for multifunctional models
Bases: wx._windows.Dialog
Provides the SLD profile plot panel.
Disable menu bar
When the context menu of a plot is rendered, the get_context_menu method will be called to give you a chance to add a menu item to the context menu. :param graph: the Graph object to which we attach the context menu
Returns: | a list of menu items with call-back function |
---|
Set_plot unfocus
Set schedule for redraw
Set_schedule for full draw
Show data dialog
Bases: sas.guiframe.local_perspectives.plotting.Plotter1D.ModelPanel1D
Panel
Add image(Theory1D)
Not implemented
reset the panel color
send to the parenet the current panel on focus
Bases: wx._core.App
Bases: wx._windows.Frame
Add comment
Bases: sas.guiframe.local_perspectives.plotting.BaseInteractor._BaseInteractor
Draw a sector slicer.Allow to find the data 2D inside of the sector lines
Clear the slicer and all connected events related to this slicer
Store a copy of values of parameters of the slicer into a dictionary.
Return params: | the dictionary created |
---|
Process move to a new position, making sure that the move is allowed.
Called a dragging motion ends.Get slicer event
Restore the roughness for this layer.
Remember the roughness for this layer and the next so that we can restore on Esc.
Receive a dictionary and reset the slicer with values contained in the values of the dictionary.
Parameters: | params – a dictionary containing name of slicer parameters and values the user assigned to the slicer. |
---|
Respond to changes in the model by recalculating the profiles and resetting the widgets.
Bases: wx._windows.Panel, sas.guiframe.panel_base.PanelBase
Panel class to show the slicer parameters
Process EVT_SLICER events When the slicer changes, update the panel
Parameters: | event – EVT_SLICER event |
---|
Receive and event and reset the text field contained in self.parameters
Hightlight the textcrtl
Parameters have changed
On Close Event
Rebuild the panel