sas.qtgui.Plotting.Slicers package
Submodules
sas.qtgui.Plotting.Slicers.AnnulusSlicer module
- class sas.qtgui.Plotting.Slicers.AnnulusSlicer.AnnulusInteractor(base, axes, item=None, color='black', zorder=3)[source]
Bases:
BaseInteractor
,SlicerModel
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.
- __doc__ = '\n Select an annulus through a 2D plot.\n This interactor is used to average 2D data with the region\n defined by 2 radius.\n this class is defined by 2 Ringinterators.\n '
- __init__(base, axes, item=None, color='black', zorder=3)[source]
- __module__ = 'sas.qtgui.Plotting.Slicers.AnnulusSlicer'
- _post_data(nbins=None)[source]
Uses annulus parameters to plot averaged data into 1D data.
- Parameters:
nbins – the number of points to plot
- clear()[source]
Clear the slicer and all connected events related to this slicer
- draw()[source]
- getParams()[source]
Store a copy of values of parameters of the slicer into a dictionary. :return params: the dictionary created
- move(x, y, ev)[source]
Process move to a new position, making sure that the move is allowed.
- moveend(ev)[source]
Called when any dragging motion ends. Redraw the plot with new parameters.
- restore()[source]
Restore the roughness for this layer.
- save(ev)[source]
Remember the roughness for this layer and the next so that we can restore on Esc.
- setParams(params)[source]
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.
- set_cursor(x, y)[source]
- set_layer(n)[source]
Allow adding plot to the same panel :param n: the number of layer
- update()[source]
Respond to changes in the model by recalculating the profiles and resetting the widgets.
- validate(param_name, param_value)[source]
Test the proposed new value “value” for row “row” of parameters
- class sas.qtgui.Plotting.Slicers.AnnulusSlicer.RingInteractor(base, axes, color='black', zorder=5, r=1.0, sign=1)[source]
Bases:
BaseInteractor
Draw a ring Given a radius
- __doc__ = '\n Draw a ring Given a radius\n '
- __init__(base, axes, color='black', zorder=5, r=1.0, sign=1)[source]
- Param:
the color of the line that defined the ring
- Parameters:
r – the radius of the ring
sign – the direction of motion the the marker
- __module__ = 'sas.qtgui.Plotting.Slicers.AnnulusSlicer'
- clear()[source]
Clear the slicer and all connected events related to this slicer
- getParams()[source]
Store a copy of values of parameters of the slicer into a dictionary. :return params: the dictionary created
- get_radius()[source]
- Return self._inner_mouse_x:
the current radius of the ring
- move(x, y, ev)[source]
Process move to a new position, making sure that the move is allowed.
- moveend(ev)[source]
Called after a dragging motion
- restore()[source]
Restore the roughness for this layer.
- save(ev)[source]
Remember the roughness for this layer and the next so that we can restore on Esc.
- setParams(params)[source]
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.
- set_cursor(x, y)[source]
draw the ring given x, y value
- set_layer(n)[source]
Allow adding plot to the same panel
- Parameters:
n – the number of layer
- update()[source]
Draw the new roughness on the graph.
sas.qtgui.Plotting.Slicers.Arc module
Arc slicer for 2D data
- class sas.qtgui.Plotting.Slicers.Arc.ArcInteractor(base, axes, color='black', zorder=5, r=1.0, theta1=0.39269908169872414, theta2=0.7853981633974483)[source]
Bases:
BaseInteractor
Select an annulus through a 2D plot
- __doc__ = '\n Select an annulus through a 2D plot\n '
- __init__(base, axes, color='black', zorder=5, r=1.0, theta1=0.39269908169872414, theta2=0.7853981633974483)[source]
- __module__ = 'sas.qtgui.Plotting.Slicers.Arc'
- clear()[source]
Clear this slicer and its markers
- get_params()[source]
- get_radius()[source]
Return arc radius
- move(x, y, ev)[source]
Process move to a new position, making sure that the move is allowed.
- moveend(ev)[source]
After a dragging motion reset the flag self.has_move to False :param ev: event
- restore()[source]
Restore the roughness for this layer.
- save(ev)[source]
Remember the roughness for this layer and the next so that we can restore on Esc.
- set_cursor(radius, phi_min, phi_max, nbins)[source]
- set_layer(n)[source]
Allow adding plot to the same panel :param n: the number of layer
- set_params(params)[source]
- update(theta1=None, theta2=None, nbins=None, r=None)[source]
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
sas.qtgui.Plotting.Slicers.AzimutSlicer module
- class sas.qtgui.Plotting.Slicers.AzimutSlicer.SectorInteractor(base, axes, color='black', zorder=3)[source]
Bases:
BaseInteractor
Select an annulus through a 2D plot
- __doc__ = '\n Select an annulus through a 2D plot\n '
- __init__(base, axes, color='black', zorder=3)[source]
- __module__ = 'sas.qtgui.Plotting.Slicers.AzimutSlicer'
- _post_data()[source]
- clear()[source]
- draw()[source]
- freeze_axes()[source]
- get_params()[source]
- move(x, y, ev)[source]
Process move to a new position, making sure that the move is allowed.
- moveend(ev)[source]
- post_data(new_sector)[source]
post data averaging in Q
- restore()[source]
Restore the roughness for this layer.
- save(ev)[source]
Remember the roughness for this layer and the next so that we can restore on Esc.
- set_cursor(x, y)[source]
- set_layer(n)[source]
- set_params(params)[source]
- thaw_axes()[source]
- update()[source]
Respond to changes in the model by recalculating the profiles and resetting the widgets.
- validate(param_name, param_value)[source]
Test the proposed new value “value” for row “row” of parameters
- class sas.qtgui.Plotting.Slicers.AzimutSlicer.SectorInteractorPhi(base, axes, color='black', zorder=3)[source]
Bases:
SectorInteractor
- __doc__ = '\n '
- __init__(base, axes, color='black', zorder=3)[source]
- __module__ = 'sas.qtgui.Plotting.Slicers.AzimutSlicer'
- _post_data()[source]
- class sas.qtgui.Plotting.Slicers.AzimutSlicer.SectorInteractorQ(base, axes, color='black', zorder=3)[source]
Bases:
SectorInteractor
- __doc__ = '\n '
- __init__(base, axes, color='black', zorder=3)[source]
- __module__ = 'sas.qtgui.Plotting.Slicers.AzimutSlicer'
- _post_data()[source]
sas.qtgui.Plotting.Slicers.BaseInteractor module
- class sas.qtgui.Plotting.Slicers.BaseInteractor.BaseInteractor(base, axes, color='black')[source]
Bases:
object
Share some functions between the interface interactor and various layer interactors.
Individual interactors need the following functions:
save(ev) - save the current state for later restore restore() - restore the old state move(x,y,ev) - move the interactor to position x,y moveend(ev) - end the drag event update() - draw the interactors
The following are provided by the base class:
connect_markers(markers) - register callbacks for all markers clear_markers() - remove all items in self.markers onHilite(ev) - enter/leave event processing onLeave(ev) - enter/leave event processing onClick(ev) - mouse click: calls save() onRelease(ev) - mouse click ends: calls moveend() onDrag(ev) - mouse move: calls move() or restore() onKey(ev) - keyboard move: calls move() or restore()
Interactor attributes:
base - model we are operating on axes - axes holding the interactor color - color of the interactor in non-active state markers - list of handles for the interactor
- __dict__ = mappingproxy({'__module__': 'sas.qtgui.Plotting.Slicers.BaseInteractor', '__doc__': '\n Share some functions between the interface interactor and various layer\n interactors.\n\n Individual interactors need the following functions:\n\n save(ev) - save the current state for later restore\n restore() - restore the old state\n move(x,y,ev) - move the interactor to position x,y\n moveend(ev) - end the drag event\n update() - draw the interactors\n\n The following are provided by the base class:\n\n connect_markers(markers) - register callbacks for all markers\n clear_markers() - remove all items in self.markers\n onHilite(ev) - enter/leave event processing\n onLeave(ev) - enter/leave event processing\n onClick(ev) - mouse click: calls save()\n onRelease(ev) - mouse click ends: calls moveend()\n onDrag(ev) - mouse move: calls move() or restore()\n onKey(ev) - keyboard move: calls move() or restore()\n\n Interactor attributes:\n\n base - model we are operating on\n axes - axes holding the interactor\n color - color of the interactor in non-active state\n markers - list of handles for the interactor\n\n ', '__init__': <function BaseInteractor.__init__>, 'clear_markers': <function BaseInteractor.clear_markers>, 'save': <function BaseInteractor.save>, 'restore': <function BaseInteractor.restore>, 'move': <function BaseInteractor.move>, 'moveend': <function BaseInteractor.moveend>, 'connect_markers': <function BaseInteractor.connect_markers>, 'onHilite': <function BaseInteractor.onHilite>, 'onLeave': <function BaseInteractor.onLeave>, 'onClick': <function BaseInteractor.onClick>, 'onRelease': <function BaseInteractor.onRelease>, 'onDrag': <function BaseInteractor.onDrag>, 'onKey': <function BaseInteractor.onKey>, 'dpixel': <function BaseInteractor.dpixel>, '__dict__': <attribute '__dict__' of 'BaseInteractor' objects>, '__weakref__': <attribute '__weakref__' of 'BaseInteractor' objects>, '__annotations__': {}})
- __doc__ = '\n Share some functions between the interface interactor and various layer\n interactors.\n\n Individual interactors need the following functions:\n\n save(ev) - save the current state for later restore\n restore() - restore the old state\n move(x,y,ev) - move the interactor to position x,y\n moveend(ev) - end the drag event\n update() - draw the interactors\n\n The following are provided by the base class:\n\n connect_markers(markers) - register callbacks for all markers\n clear_markers() - remove all items in self.markers\n onHilite(ev) - enter/leave event processing\n onLeave(ev) - enter/leave event processing\n onClick(ev) - mouse click: calls save()\n onRelease(ev) - mouse click ends: calls moveend()\n onDrag(ev) - mouse move: calls move() or restore()\n onKey(ev) - keyboard move: calls move() or restore()\n\n Interactor attributes:\n\n base - model we are operating on\n axes - axes holding the interactor\n color - color of the interactor in non-active state\n markers - list of handles for the interactor\n\n '
- __init__(base, axes, color='black')[source]
- __module__ = 'sas.qtgui.Plotting.Slicers.BaseInteractor'
- __weakref__
list of weak references to the object (if defined)
- clear_markers()[source]
Clear old markers and interfaces.
- connect_markers(markers)[source]
Connect markers to callbacks
- dpixel(x, y, nudge=False)[source]
Return the step size in data coordinates for a small step in screen coordinates. If nudge is False (default) the step size is one pixel. If nudge is True, the step size is 0.2 pixels.
- move(x, y, ev)[source]
- moveend(ev)[source]
- onClick(ev)[source]
Prepare to move the artist. Calls save() to preserve the state for later restore().
- onDrag(ev)[source]
Move the artist. Calls move() to update the state, or restore() if the mouse leaves the window.
- onHilite(ev)[source]
Hilite the artist reporting the event, indicating that it is ready to receive a click.
- onKey(ev)[source]
Respond to keyboard events. Arrow keys move the widget. Escape restores it to the position before the last click.
Calls move() to update the state. Calls restore() on escape.
- onLeave(ev)[source]
Restore the artist to the original colour when the cursor leaves.
- onRelease(ev)[source]
- restore(ev)[source]
- save(ev)[source]
sas.qtgui.Plotting.Slicers.BoxSlicer module
- class sas.qtgui.Plotting.Slicers.BoxSlicer.BoxInteractor(base, axes, item=None, color='black', zorder=3)[source]
Bases:
BaseInteractor
,SlicerModel
BoxInteractor define a rectangle that return data1D average of Data2D in a rectangle area defined by -x, x ,y, -y
- __doc__ = '\n BoxInteractor define a rectangle that return data1D average of Data2D\n in a rectangle area defined by -x, x ,y, -y\n '
- __init__(base, axes, item=None, color='black', zorder=3)[source]
- __module__ = 'sas.qtgui.Plotting.Slicers.BoxSlicer'
- _post_data()[source]
- clear()[source]
Clear the slicer and all connected events related to this slicer
- draw()[source]
- getParams()[source]
Store a copy of values of parameters of the slicer into a dictionary.
- Return params:
the dictionary created
- move(x, y, ev)[source]
Process move to a new position, making sure that the move is allowed.
- moveend(ev)[source]
Called after a dragging event. Post the slicer new parameters and creates a new Data1D corresponding to the new average
- post_data(new_slab=None, nbins=None, direction=None)[source]
post data averaging in Qx or Qy given new_slab type
- Parameters:
new_slab – slicer that determine with direction to average
nbins – the number of points plotted when averaging
direction – the direction of averaging
- restore()[source]
Restore the roughness for this layer.
- save(ev)[source]
Remember the roughness for this layer and the next so that we can restore on Esc.
- setParams(params)[source]
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.
- set_cursor(x, y)[source]
- set_layer(n)[source]
Allow adding plot to the same panel
- Parameters:
n – the number of layer
- update()[source]
Respond to changes in the model by recalculating the profiles and resetting the widgets.
- update_and_post()[source]
Update the slicer and plot the resulting data
- class sas.qtgui.Plotting.Slicers.BoxSlicer.BoxInteractorX(base, axes, item=None, color='black', zorder=3)[source]
Bases:
BoxInteractor
Average in Qx direction
- __doc__ = '\n Average in Qx direction\n '
- __init__(base, axes, item=None, color='black', zorder=3)[source]
- __module__ = 'sas.qtgui.Plotting.Slicers.BoxSlicer'
- _post_data()[source]
Post data creating by averaging in Qx direction
- validate(param_name, param_value)[source]
Validate input from user. Values get checked at apply time.
- class sas.qtgui.Plotting.Slicers.BoxSlicer.BoxInteractorY(base, axes, item=None, color='black', zorder=3)[source]
Bases:
BoxInteractor
Average in Qy direction
- __doc__ = '\n Average in Qy direction\n '
- __init__(base, axes, item=None, color='black', zorder=3)[source]
- __module__ = 'sas.qtgui.Plotting.Slicers.BoxSlicer'
- _post_data()[source]
Post data creating by averaging in Qy direction
- validate(param_name, param_value)[source]
Validate input from user Values get checked at apply time.
- class sas.qtgui.Plotting.Slicers.BoxSlicer.HorizontalLines(base, axes, color='black', zorder=5, x=0.5, y=0.5)[source]
Bases:
BaseInteractor
Draw 2 Horizontal lines centered on (0,0) that can move on the x- direction and in opposite direction
- __doc__ = '\n Draw 2 Horizontal lines centered on (0,0) that can move\n on the x- direction and in opposite direction\n '
- __init__(base, axes, color='black', zorder=5, x=0.5, y=0.5)[source]
- __module__ = 'sas.qtgui.Plotting.Slicers.BoxSlicer'
- clear()[source]
Clear this slicer and its markers
- move(x, y, ev)[source]
Process move to a new position, making sure that the move is allowed.
- moveend(ev)[source]
Called after a dragging this edge and set self.has_move to False to specify the end of dragging motion
- restore()[source]
Restore the roughness for this layer.
- save(ev)[source]
Remember the roughness for this layer and the next so that we can restore on Esc.
- set_layer(n)[source]
Allow adding plot to the same panel
- Parameters:
n – the number of layer
- update(x=None, y=None)[source]
Draw the new roughness on the graph.
- Parameters:
x – x-coordinates to reset current class x
y – y-coordinates to reset current class y
- class sas.qtgui.Plotting.Slicers.BoxSlicer.VerticalLines(base, axes, color='black', zorder=5, x=0.5, y=0.5)[source]
Bases:
BaseInteractor
Select an annulus through a 2D plot
- __doc__ = '\n Select an annulus through a 2D plot\n '
- __init__(base, axes, color='black', zorder=5, x=0.5, y=0.5)[source]
- __module__ = 'sas.qtgui.Plotting.Slicers.BoxSlicer'
- clear()[source]
Clear this slicer and its markers
- move(x, y, ev)[source]
Process move to a new position, making sure that the move is allowed.
- moveend(ev)[source]
Called after a dragging this edge and set self.has_move to False to specify the end of dragging motion
- restore()[source]
Restore the roughness for this layer.
- save(ev)[source]
Remember the roughness for this layer and the next so that we can restore on Esc.
- set_layer(n)[source]
Allow adding plot to the same panel
- Parameters:
n – the number of layer
- update(x=None, y=None)[source]
Draw the new roughness on the graph.
- Parameters:
x – x-coordinates to reset current class x
y – y-coordinates to reset current class y
- validate(param_name, param_value)[source]
Validate input from user
sas.qtgui.Plotting.Slicers.BoxSum module
Boxsum Class: determine 2 rectangular area to compute the sum of pixel of a Data.
- class sas.qtgui.Plotting.Slicers.BoxSum.BoxSumCalculator(base, axes, color='black', zorder=3)[source]
Bases:
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
- __doc__ = '\n Boxsum Class: determine 2 rectangular area to compute\n the sum of pixel of a Data.\n Uses PointerInteractor , VerticalDoubleLine,HorizontalDoubleLine.\n @param zorder: Artists with lower zorder values are drawn first.\n @param x_min: the minimum value of the x coordinate\n @param x_max: the maximum value of the x coordinate\n @param y_min: the minimum value of the y coordinate\n @param y_max: the maximum value of the y coordinate\n\n '
- __init__(base, axes, color='black', zorder=3)[source]
- __module__ = 'sas.qtgui.Plotting.Slicers.BoxSum'
- clear()[source]
Clear the slicer and all connected events related to this slicer
- draw()[source]
Redraw canvas
- getParams()[source]
Store a copy of values of parameters of the slicer into a dictionary. :return params: the dictionary created
- getResult()[source]
Return the result of box summation
- model()[source]
model accessor
- moveend(ev)[source]
After a dragging motion this function is called to compute the error and the sum of pixel of a given data 2D
- postData()[source]
Get the limits of the boxsum and compute the sum of the pixel contained in that region and the error on that sum
- restore()[source]
Restore the roughness for this layer.
- save(ev)[source]
Remember the roughness for this layer and the next so that we can restore on Esc.
- setLayer(n)[source]
Allow adding plot to the same panel :param n: the number of layer
- setModelFromParams()[source]
Set up the Qt model for data handling between controls
- setPanelName(name)[source]
Store the name of the panel associated to this slicer @param name: the name of this panel
- setParams(params)[source]
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.
- setParamsFromModel()[source]
Cast model content onto params dict
- setReadOnlyParametersFromModel()[source]
Cast model content onto “read-only” subset of parameters
- update()[source]
Respond to changes in the model by recalculating the profiles and resetting the widgets.
- validate(param_name, param_value)[source]
Validate input from user
- class sas.qtgui.Plotting.Slicers.BoxSum.HorizontalDoubleLine(base, axes, color='black', zorder=5, x=0.5, y=0.5, center_x=0.0, center_y=0.0)[source]
Bases:
BaseInteractor
Select an annulus through a 2D plot
- __doc__ = '\n Select an annulus through a 2D plot\n '
- __init__(base, axes, color='black', zorder=5, x=0.5, y=0.5, center_x=0.0, center_y=0.0)[source]
- __module__ = 'sas.qtgui.Plotting.Slicers.BoxSum'
- clear()[source]
Clear this figure and its markers
- move(x, y, ev)[source]
Process move to a new position, making sure that the move is allowed.
- moveend(ev)[source]
After a dragging motion reset the flag self.has_move to False
- restore()[source]
Restore the roughness for this layer.
- save(ev)[source]
Remember the roughness for this layer and the next so that we can restore on Esc.
- setCursor(x, y)[source]
Update the figure given x and y
- setLayer(n)[source]
Allow adding plot to the same panel @param n: the number of layer
- update(x1=None, x2=None, y1=None, y2=None, width=None, height=None, center=None)[source]
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
- class sas.qtgui.Plotting.Slicers.BoxSum.PointInteractor(base, axes, color='black', zorder=5, center_x=0.0, center_y=0.0)[source]
Bases:
BaseInteractor
Draw a point that can be dragged with the marker. this class controls the motion the center of the BoxSum
- __doc__ = '\n Draw a point that can be dragged with the marker.\n this class controls the motion the center of the BoxSum\n '
- __init__(base, axes, color='black', zorder=5, center_x=0.0, center_y=0.0)[source]
- __module__ = 'sas.qtgui.Plotting.Slicers.BoxSum'
- clear()[source]
Clear this figure and its markers
- move(x, y, ev)[source]
Process move to a new position, making sure that the move is allowed.
- moveend(ev)[source]
- restore()[source]
Restore the roughness for this layer.
- save(ev)[source]
Remember the roughness for this layer and the next so that we can restore on Esc.
- setCursor(x, y)[source]
- setLayer(n)[source]
Allow adding plot to the same panel @param n: the number of layer
- update(center_x=None, center_y=None)[source]
Draw the new roughness on the graph.
- class sas.qtgui.Plotting.Slicers.BoxSum.VerticalDoubleLine(base, axes, color='black', zorder=5, x=0.5, y=0.5, center_x=0.0, center_y=0.0)[source]
Bases:
BaseInteractor
Draw 2 vertical lines moving in opposite direction and centered on a point (PointInteractor)
- __doc__ = '\n Draw 2 vertical lines moving in opposite direction and centered on\n a point (PointInteractor)\n '
- __init__(base, axes, color='black', zorder=5, x=0.5, y=0.5, center_x=0.0, center_y=0.0)[source]
- __module__ = 'sas.qtgui.Plotting.Slicers.BoxSum'
- clear()[source]
Clear this slicer and its markers
- move(x, y, ev)[source]
Process move to a new position, making sure that the move is allowed.
- moveend(ev)[source]
After a dragging motion reset the flag self.has_move to False
- restore()[source]
Restore the roughness for this layer.
- save(ev)[source]
Remember the roughness for this layer and the next so that we can restore on Esc.
- setCursor(x, y)[source]
Update the figure given x and y
- setLayer(n)[source]
Allow adding plot to the same panel :param n: the number of layer
- update(x1=None, x2=None, y1=None, y2=None, width=None, height=None, center=None)[source]
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
sas.qtgui.Plotting.Slicers.RadiusInteractor module
- class sas.qtgui.Plotting.Slicers.RadiusInteractor.RadiusInteractor(base, axes, color='black', zorder=5, arc1=None, arc2=None, theta=0.39269908169872414)[source]
Bases:
BaseInteractor
Select an annulus through a 2D plot
- __doc__ = '\n Select an annulus through a 2D plot\n '
- __init__(base, axes, color='black', zorder=5, arc1=None, arc2=None, theta=0.39269908169872414)[source]
- __module__ = 'sas.qtgui.Plotting.Slicers.RadiusInteractor'
- clear()[source]
- get_angle()[source]
- get_params()[source]
- move(x, y, ev)[source]
Process move to a new position, making sure that the move is allowed.
- moveend(ev)[source]
- restore(ev)[source]
Restore the roughness for this layer.
- save(ev)[source]
Remember the roughness for this layer and the next so that we can restore on Esc.
- set_cursor(r_min, r_max, theta)[source]
- set_layer(n)[source]
- set_params(params)[source]
- update(r1=None, r2=None, theta=None)[source]
Draw the new roughness on the graph.
sas.qtgui.Plotting.Slicers.SectorSlicer module
Sector interactor
- class sas.qtgui.Plotting.Slicers.SectorSlicer.LineInteractor(base, axes, color='black', zorder=5, r=1.0, theta=0.7853981633974483)[source]
Bases:
BaseInteractor
Select an annulus through a 2D plot
- __doc__ = '\n Select an annulus through a 2D plot\n '
- __init__(base, axes, color='black', zorder=5, r=1.0, theta=0.7853981633974483)[source]
- __module__ = 'sas.qtgui.Plotting.Slicers.SectorSlicer'
- clear()[source]
- getParams()[source]
- move(x, y, ev)[source]
Process move to a new position, making sure that the move is allowed.
- moveend(ev)[source]
- restore()[source]
Restore the roughness for this layer.
- save(ev)[source]
Remember the roughness for this layer and the next so that we can restore on Esc.
- setParams(params)[source]
- set_cursor(x, y)[source]
- set_layer(n)[source]
- update(theta=None)[source]
Draw the new roughness on the graph.
- class sas.qtgui.Plotting.Slicers.SectorSlicer.SectorInteractor(base, axes, item=None, color='black', zorder=3)[source]
Bases:
BaseInteractor
,SlicerModel
Draw a sector slicer.Allow to performQ averaging on data 2D
- __doc__ = '\n Draw a sector slicer.Allow to performQ averaging on data 2D\n '
- __init__(base, axes, item=None, color='black', zorder=3)[source]
- __module__ = 'sas.qtgui.Plotting.Slicers.SectorSlicer'
- _post_data(nbins=None)[source]
compute sector averaging of data2D into data1D :param nbins: the number of point to plot for the average 1D data
- clear()[source]
Clear the slicer and all connected events related to this slicer
- draw()[source]
Redraw canvas
- getParams()[source]
Store a copy of values of parameters of the slicer into a dictionary. :return params: the dictionary created
- move(x, y, ev)[source]
Process move to a new position, making sure that the move is allowed.
- moveend(ev)[source]
Called a dragging motion ends.Get slicer event
- restore()[source]
Restore the roughness for this layer.
- save(ev)[source]
Remember the roughness for this layer and the next so that we can restore on Esc.
- setParams(params)[source]
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.
- set_cursor(x, y)[source]
- set_layer(n)[source]
Allow adding plot to the same panel
- Parameters:
n – the number of layer
- update()[source]
Respond to changes in the model by recalculating the profiles and resetting the widgets.
- validate(param_name, param_value)[source]
Test the proposed new value “value” for row “row” of parameters
- class sas.qtgui.Plotting.Slicers.SectorSlicer.SideInteractor(base, axes, color='black', zorder=5, r=1.0, phi=0.7853981633974483, theta2=1.0471975511965976)[source]
Bases:
BaseInteractor
Draw an oblique line
- Parameters:
phi – the phase between the middle line and one side line
theta2 – the angle between the middle line and x- axis
- __doc__ = '\n Draw an oblique line\n\n :param phi: the phase between the middle line and one side line\n :param theta2: the angle between the middle line and x- axis\n\n '
- __init__(base, axes, color='black', zorder=5, r=1.0, phi=0.7853981633974483, theta2=1.0471975511965976)[source]
- __module__ = 'sas.qtgui.Plotting.Slicers.SectorSlicer'
- clear()[source]
Clear the slicer and all connected events related to this slicer
- getParams()[source]
- move(x, y, ev)[source]
Process move to a new position, making sure that the move is allowed.
- moveend(ev)[source]
- restore()[source]
Restore the roughness for this layer.
- save(ev)[source]
Remember the roughness for this layer and the next so that we can restore on Esc.
- setParams(params)[source]
- set_cursor(x, y)[source]
- set_layer(n)[source]
Allow adding plot to the same panel
- Parameters:
n – the number of layer
- update(phi=None, delta=None, mline=None, side=False, left=False, right=False)[source]
Draw oblique line
- Parameters:
phi – the phase between the middle line and the current line
delta – phi/2 applied only when the mline was moved