sas.qtgui.Plotting.Slicers package

Submodules

sas.qtgui.Plotting.Slicers.AnnulusSlicer module

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

__annotations__ = {}
__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

__annotations__ = {}
__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

__annotations__ = {}
__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

__annotations__ = {}
__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

__annotations__ = {}
__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

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

sas.qtgui.Plotting.Slicers.BoxSum module

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

__annotations__ = {}
__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

Module contents