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 '¶
- __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
- getParams()[source]¶
Store a copy of values of parameters of the slicer into a dictionary. :return params: the dictionary created
- 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.
- 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'¶
- getParams()[source]¶
Store a copy of values of parameters of the slicer into a dictionary. :return params: the dictionary created
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'¶
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 '¶
- __module__ = 'sas.qtgui.Plotting.Slicers.AzimutSlicer'¶
- class sas.qtgui.Plotting.Slicers.AzimutSlicer.SectorInteractorPhi(base, axes, color='black', zorder=3)[source]¶
Bases:
SectorInteractor
- __doc__ = '\n '¶
- __module__ = 'sas.qtgui.Plotting.Slicers.AzimutSlicer'¶
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 '¶
- __module__ = 'sas.qtgui.Plotting.Slicers.BaseInteractor'¶
- __weakref__¶
list of weak references to the object (if defined)
- 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.
- 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.
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 '¶
- __module__ = 'sas.qtgui.Plotting.Slicers.BoxSlicer'¶
- getParams()[source]¶
Store a copy of values of parameters of the slicer into a dictionary.
- Return params:
the dictionary created
- 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
- 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.
- 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 '¶
- __module__ = 'sas.qtgui.Plotting.Slicers.BoxSlicer'¶
- 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 '¶
- __module__ = 'sas.qtgui.Plotting.Slicers.BoxSlicer'¶
- 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 '¶
- __module__ = 'sas.qtgui.Plotting.Slicers.BoxSlicer'¶
- 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 '¶
- __module__ = 'sas.qtgui.Plotting.Slicers.BoxSlicer'¶
- moveend(ev)[source]¶
Called after a dragging this edge and set self.has_move to False to specify the end of dragging motion
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 '¶
- __module__ = 'sas.qtgui.Plotting.Slicers.BoxSum'¶
- getParams()[source]¶
Store a copy of values of parameters of the slicer into a dictionary. :return params: the dictionary created
- 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
- 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.
- 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 '¶
- __module__ = 'sas.qtgui.Plotting.Slicers.BoxSum'¶
- 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 '¶
- __module__ = 'sas.qtgui.Plotting.Slicers.BoxSum'¶
- 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 '¶
- __module__ = 'sas.qtgui.Plotting.Slicers.BoxSum'¶
- 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'¶
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 '¶
- __module__ = 'sas.qtgui.Plotting.Slicers.SectorSlicer'¶
- 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 '¶
- __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
- getParams()[source]¶
Store a copy of values of parameters of the slicer into a dictionary. :return params: the dictionary created
- 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.
- 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'¶