# 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)

  Bases: `BaseInteractor`, `SlicerModel`

  AnnulusInteractor plots a data1D average of an annulus area defined in a Data2D object. The data1D averaging itself is performed in sasdata by manipulations.py

  This class uses the RingInteractor class to define two rings of radius r1 and r2 (Q1 and Q2). All Q points at a constant angle phi from the x-axis are averaged together to provide a 1D array in phi from 0 to 180 degrees.

  clear()

    Clear the slicer and all connected events related to this slicer

  draw()
  getParams()

    Store a copy of values of parameters of the slicer into a dictionary. :return params: the dictionary created

  move(x, y, ev)

    Process move to a new position, making sure that the move is allowed.

  moveend(ev)

    Called when any dragging motion ends. Redraw the plot with new parameters.

  restore(ev)

    Restore the roughness for this layer.

  save(ev)

    Remember the roughness for this layer and the next so that we can restore on Esc.

  setParams(params)

    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)
  set_layer(n)

    Allow adding plot to the same panel :param n: the number of layer

  update()

    Respond to changes in the model by recalculating the profiles and resetting the widgets.

  validate(param_name, param_value)

    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)

  Bases: `BaseInteractor`

  Draw a ring on a data2D plot centered at (0,0) given a radius

  clear()

    Clear the slicer and all connected events related to this slicer

  getParams()

    Store a copy of values of parameters of the slicer into a dictionary. :return params: the dictionary created

  get_radius()
    Return self._inner_mouse_x:

      the current radius of the ring

  move(x, y, ev)

    Process move to a new position, making sure that the move is allowed.

  moveend(ev)

    Called after a dragging motion

  restore(ev)

    Restore the roughness for this layer.

  save(ev)

    Remember the roughness for this layer and the next so that we can restore on Esc.

  setParams(params)

    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)

    draw the ring given x, y value

  set_layer(n)

    Allow adding plot to the same panel

    Parameters:

      n – the number of layer

  update()

    Draw the new roughness on the graph.

## sas.qtgui.Plotting.Slicers.ArcInteractor module

class sas.qtgui.Plotting.Slicers.ArcInteractor.ArcInteractor(base, axes, color='black', zorder=5, r=1.0, theta=1.0471975511965976, phi=0.39269908169872414)

  Bases: `BaseInteractor`

  Draw an arc on a data2D plot with a variable radius (centered at [0,0]). User interaction adjusts the parameter r

  param r: radius from (0,0) of the arc on a data2D plot param theta: angle from x-axis of the central point on the arc param phi: angle from the centre point on the arc to each of its edges

  clear()

    Clear this slicer and its markers

  move(x, y, ev)

    Process move to a new position.

  moveend(ev)

    After a dragging motion reset the flag self.has_move to False :param ev: event

  restore(ev)

    Restore the roughness for this layer.

  save(ev)

    Remember the roughness for this layer and the next so that we can restore on Esc.

  set_cursor(x, y)
  set_layer(n)

    Allow adding plot to the same panel :param n: the number of layer

  update(theta=None, phi=None, r=None)

    Draw the new roughness on the graph. :param theta: angle from x-axis of the central point on the arc :param phi: angle from the centre point on the arc to each of its edges :param r: radius from (0,0) of the arc on a data2D plot

## sas.qtgui.Plotting.Slicers.BaseInteractor module

class sas.qtgui.Plotting.Slicers.BaseInteractor.BaseInteractor(base, axes, color='black')

  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

  clear_markers()

    Clear old markers and interfaces.

  connect_markers(markers)

    Connect markers to callbacks

  dpixel(x, y, nudge=False)

    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)
  moveend(ev)
  onClick(ev)

    Prepare to move the artist. Calls save() to preserve the state for later restore().

  onDrag(ev)

    Move the artist. Calls move() to update the state, or restore() if the mouse leaves the window.

  onHilite(ev)

    Hilite the artist reporting the event, indicating that it is ready to receive a click.

  onKey(ev)

    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)

    Restore the artist to the original colour when the cursor leaves.

  onRelease(ev)
  restore(ev)
  save(ev)

## sas.qtgui.Plotting.Slicers.BoxSlicer module

class sas.qtgui.Plotting.Slicers.BoxSlicer.BoxInteractor(base, axes, item=None, color='black', zorder=3, direction=None)

  Bases: `BaseInteractor`, `SlicerModel`

  BoxInteractor plots a data1D average of a rectangular area defined in a Data2D object. The data1D averaging itself is performed in sasdata by manipulations.py

  This class uses two other classes, HorizontalLines and VerticalLines, to define the rectangle area: x1, x2 ,y1, y2. It is subclassed by BoxInteractorX and BoxInteracgtorY which define the direction of the average. BoxInteractorX averages all the points from y1 to y2 as a function of Q_x and BoxInteractorY averages all the points from x1 to x2 as a function of Q_y

  clear()

    Clear the slicer and all connected events related to this slicer

  draw()

    Draws the Canvas using the canvas.Draw from the calling class that instantiated this object.

  getParams()

    Store a copy of values of parameters of the slicer into a dictionary.

    Return params:

      the dictionary created

  move(x, y, ev)

    Process move to a new position, making sure that the move is allowed.

  moveend(ev)

    Called after a dragging event. Post the slicer new parameters and creates a new Data1D corresponding to the new average

  restore(ev)

    Restore the roughness for this layer. Only restores things that have moved. Otherwise you are restoring too far back.

    Save is only done when the mouse is clicked not when it is released. Thus, if vertical lines have changed, they will move horizontal lines also, but the original state of those horizontal lines has not been saved (there was no click event on the horizontal lines). However, restoring the vertical lines and then doing an updated will take care of the related values in horizontal lines.

  save(ev)

    Remember the roughness for this layer and the next so that we can restore on Esc.

  setParams(params)

    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)
  set_layer(n)

    Allow adding plot to the same panel

    Parameters:

      n – the number of layer

  update()

    Respond to changes in the model by recalculating the profiles and resetting the widgets.

  update_and_post()

    Update the slicer and plot the resulting data

  validate(param_name, param_value)

    Validate input from user.

    Values get checked at apply time:

    - `nbins` cannot be zero or smaller

    - The full ROI should stay within the data. Thus `center_x` and `center_y` are restricted such that the center +/- width (or height) cannot be greater or smaller than data max/min.

    - The width/height should not be set so small as to leave no data in the ROI. Here we only make sure that the width/height is not zero as done when dragging the vertical or horizontal lines. We let the call to `_post_data` capture the `ValueError` of no points in ROI raised by `manipulations.py`, log the message and negate the entry at that point.

class sas.qtgui.Plotting.Slicers.BoxSlicer.BoxInteractorX(base, axes, item=None, color='black', zorder=3)

  Bases: `BoxInteractor`

  Average in Qx direction. The data for all Qy at a constant Qx are averaged together to provide a 1D array in Qx (to be plotted as a function of Qx)

class sas.qtgui.Plotting.Slicers.BoxSlicer.BoxInteractorY(base, axes, item=None, color='black', zorder=3)

  Bases: `BoxInteractor`

  Average in Qy direction. The data for all Qx at a constant Qy are averaged together to provide a 1D array in Qy (to be plotted as a function of Qy)

class sas.qtgui.Plotting.Slicers.BoxSlicer.HorizontalDoubleLine(base, axes, color='black', zorder=5, half_width=0.5, half_height=0.5, center_x=0.0, center_y=0.0)

  Bases: `BaseInteractor`

  Draw 2 vertical lines that can move symmetrically in opposite directions in y and centered on a point (PointInteractor). It also defines the left and right x positions of a box.

  clear()

    Clear this figure and its markers

  move(x, y, ev)

    Process move to a new position, making sure that the move is allowed. In principle, the move must not create a box without any data points in it. For the dragging (continuous move), we make sure that the width or height are not negative and that the entire ROI resides withing the data. We leave the check of whether there are any data in that ROI to the manipulations.py which is called from _post_data, itself being called on moveend(ev).

  moveend(ev)

    After a dragging motion update the 1D average plot and then reset the flag self.has_move to False.

  restore(ev)

    Restore the roughness for this layer.

  save(ev)

    Remember the roughness for this layer and the next so that we can restore on Esc. This save is run on mouse click (not a drag event) by BaseInteractor

  setCursor(x, y)

    Update the figure given x and y

  setLayer(n)

    Allow adding plot to the same panel @param n: the number of layer

  update(x1=None, x2=None, y1=None, y2=None, half_width=None, half_height=None, center=None)

    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 half_width: is the half width of the new rectangle :param half_height: is the half height of the new rectangle :param center: provided x, y coordinates of the center point

class sas.qtgui.Plotting.Slicers.BoxSlicer.PointInteractor(base, axes, color='black', zorder=5, center_x=0.0, center_y=0.0)

  Bases: `BaseInteractor`

  Draw a point that can be dragged with the marker. this class controls the motion the center of the BoxSum

  clear()

    Clear this figure and its markers

  move(x, y, ev)

    Process move to a new position. BaseInteractor checks that the center is within the data. Here we check to make sure that the center move does not cause any part of the ROI box to move outside the data.

  moveend(ev)
  restore(ev)

    Restore the roughness for this layer.

  save(ev)

    Remember the roughness for this layer and the next so that we can restore on Esc.

  setCursor(x, y)
    ..todo:: the cursor moves are currently being captured somewhere upstream

      of BaseInteractor so this never gets called.

  setLayer(n)

    Allow adding plot to the same panel @param n: the number of layer

  update(center_x=None, center_y=None)

    Draw the new roughness on the graph.

class sas.qtgui.Plotting.Slicers.BoxSlicer.VerticalDoubleLine(base, axes, color='black', zorder=5, half_width=0.5, half_height=0.5, center_x=0.0, center_y=0.0)

  Bases: `BaseInteractor`

  Draw 2 vertical lines that can move symmetrically in opposite directions in x and centered on a point (PointInteractor). It also defines the top and bottom y positions of a box.

  clear()

    Clear this slicer and its markers

  move(x, y, ev)

    Process move to a new position, making sure that the move is allowed. In principle, the move must not create a box without any data points in it. For the dragging (continuous move), we make sure that the width or height are not negative and that the entire ROI resides withing the data. We leave the check of whether there are any data in that ROI to the manipulations.py which is called from _post_data, itself being called on moveend(ev).

  moveend(ev)

    After a dragging motion update the 1D average plot and then reset the flag self.has_move to False.

  restore(ev)

    Restore the roughness for this layer.

  save(ev)

    Remember the roughness for this layer and the next so that we can restore on Esc. This save is run on mouse click (not a drag event) by BaseInteractor

  setCursor(x, y)

    Update the figure given x and y

  setLayer(n)

    Allow adding plot to the same panel :param n: the number of layer

  update(x1=None, x2=None, y1=None, y2=None, half_width=None, half_height=None, center=None)

    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 half_width: is the half width of the new rectangle :param half_height: is the half height of the new rectangle :param center: provided x, y coordinates of the center point

## sas.qtgui.Plotting.Slicers.BoxSum module

class sas.qtgui.Plotting.Slicers.BoxSum.BoxSumCalculator(base, axes, color='black', zorder=3)

  Bases: `BaseInteractor`

  BoxSumCalculator Class computes properties (such as sum and average of intensities) from a rectangular area defined in a data2D object. The actual calculations are done by manipulations.py

  This class uses three other classes, PointerInteractor to define the center of the rectangle, and VerticalDoubleLine and HorizontalDoubleLine to define the rectangle x1,x2,y1,y2.

  ..TODO: the 3 classes here are the same as used by the BoxSlicer. These

    should probably be abstracted out.

  @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()

    Clear the slicer and all connected events related to this slicer

  draw()

    Redraw canvas

  getParams()

    Store a copy of values of parameters of the slicer into a dictionary. :return params: the dictionary created

  getResult()

    Return the result of box summation

  model()

    model accessor

  moveend(ev)

    After a dragging motion this function is called to compute the error and the sum of pixel of a given data 2D

  postData()

    Get the limits of the boxsum and compute the sum of the pixel contained in that region and the error on that sum

  restore(ev)

    Restore the roughness for this layer.

  save(ev)

    Remember the roughness for this layer and the next so that we can restore on Esc.

  setLayer(n)

    Allow adding plot to the same panel :param n: the number of layer

  setModelFromParams()

    Set up the Qt model for data handling between controls

  setPanelName(name)

    Store the name of the panel associated to this slicer @param name: the name of this panel

  setParams(params)

    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()

    Cast model content onto params dict

  setReadOnlyParametersFromModel()

    Cast model content onto “read-only” subset of parameters

  update()

    Respond to changes in the model by recalculating the profiles and resetting the widgets.

  validate(param_name, param_value)

    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)

  Bases: `BaseInteractor`

  Draw 2 horizontal lines moving in opposite direction and centered on a point (PointInteractor)

  clear()

    Clear this figure and its markers

  move(x, y, ev)

    Process move to a new position, making sure that the move is allowed.

  moveend(ev)

    After a dragging motion reset the flag self.has_move to False

  restore(ev)

    Restore the roughness for this layer.

  save(ev)

    Remember the roughness for this layer and the next so that we can restore on Esc.

  setCursor(x, y)

    Update the figure given x and y

  setLayer(n)

    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)

    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)

  Bases: `BaseInteractor`

  Draw a point that can be dragged with the marker. this class controls the motion the center of the BoxSum

  clear()

    Clear this figure and its markers

  move(x, y, ev)

    Process move to a new position, making sure that the move is allowed.

  moveend(ev)
  restore(ev)

    Restore the roughness for this layer.

  save(ev)

    Remember the roughness for this layer and the next so that we can restore on Esc.

  setCursor(x, y)
  setLayer(n)

    Allow adding plot to the same panel @param n: the number of layer

  update(center_x=None, center_y=None)

    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)

  Bases: `BaseInteractor`

  Draw 2 vertical lines moving in opposite direction and centered on a point (PointInteractor)

  clear()

    Clear this slicer and its markers

  move(x, y, ev)

    Process move to a new position, making sure that the move is allowed.

  moveend(ev)

    After a dragging motion reset the flag self.has_move to False

  restore(ev)

    Restore the roughness for this layer.

  save(ev)

    Remember the roughness for this layer and the next so that we can restore on Esc.

  setCursor(x, y)

    Update the figure given x and y

  setLayer(n)

    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)

    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, r1=1.0, r2=2.0, theta=1.0471975511965976, phi=0.39269908169872414)

  Bases: `BaseInteractor`

  Draw a pair of lines radiating from a center at [0,0], between radius values r1 and r2 with and average angle from the x-axis of theta, and an angular diaplacement of phi either side of this average. Used for example to to define the left and right edges of the a wedge area on a plot, see WedgeInteractor. User interaction adjusts the parameter phi.

  Parameters:

    - r1 – radius of the inner end of the radial lines

    - r2 – radius of the outer end of the radial lines

    - theta – average angle of the lines from the x-axis

    - phi – angular displacement of the lines either side of theta

  clear()

    Clear this slicer and its markers

  move(x, y, ev)

    Process move to a new position.

  moveend(ev)

    Called when any dragging motion ends. Redraw the plot with new parameters and set self.has_move to False.

  restore(ev)

    Restore the roughness for this layer.

  save(ev)

    Remember the roughness for this layer and the next so that we can restore on Esc.

  set_cursor(x, y)
  set_layer(n)

    Allow adding plot to the same panel :param n: the number of layer

  update(r1=None, r2=None, theta=None, phi=None)

    Draw the new roughness on the graph. :param r1: radius of the inner end of the radial lines :param r2: radius of the outer end of the radial lines :param theta: average angle of the lines from the x-axis :param phi: angular displacement of the lines either side of theta

## sas.qtgui.Plotting.Slicers.SectorSlicer module

class sas.qtgui.Plotting.Slicers.SectorSlicer.LineInteractor(base, axes, color='black', zorder=5, r=1.0, theta=0.7853981633974483, half_length=False)

  Bases: `BaseInteractor`

  Draws a line though 0,0 on a data2D plot. This is used to define the centerline around with other lines can be drawn to define a region of interest (such as a sector).

  Parameters:

    - theta – the angle between the middle line and x- axis

    - half_length – Defaults to False. If True, the line is drawn from the origin rather than across the whole graph.

  clear()
  getParams()
  move(x, y, ev)

    Process move to a new position, making sure that the move is allowed.

  moveend(ev)
  restore(ev)

    Restore the roughness for this layer.

  save(ev)

    Remember the roughness for this layer and the next so that we can restore on Esc.

  setParams(params)
  set_cursor(x, y)
  set_layer(n)
  update(theta=None)

    Draw the new roughness on the graph.

class sas.qtgui.Plotting.Slicers.SectorSlicer.SectorInteractor(base, axes, item=None, color='black', zorder=3)

  Bases: `BaseInteractor`, `SlicerModel`

  SectorInteractor plots a data1D average of a sector area defined in a Data2D object. The data1D averaging itself is performed in sasdata by manipulations.py. Sectors all go through a single point as (0,0).

  This class uses two other classes, LineInteractor and SideInteractor, to define a sector centered around a main line defined by LineInteractor which goes through 0,0 at some user settable angle theta from 0. The sector itself is defined by the right and left sidelines, both of which also go through (0,0), and set by SideInteractor from -phi to +phi around the center line defined by the main line. All points at a constant Q from -phi to +phi are averaged together to provide a 1D array in Q (to be plotted as a function of Q).

  > ..TODO: the 2 subclasses here are the same as used by the BoxSum. These

  >   should probably be abstracted out.

  clear()

    Clear the slicer and all connected events related to this slicer

  draw()

    Redraw canvas

  getParams()

    Store a copy of values of parameters of the slicer into a dictionary. :return params: the dictionary created

  move(x, y, ev)

    Process move to a new position, making sure that the move is allowed.

  moveend(ev)

    Called a dragging motion ends.Get slicer event

  restore(ev)

    Restore the roughness for this layer.

  save(ev)

    Remember the roughness for this layer and the next so that we can restore on Esc.

  setParams(params)

    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)
  set_layer(n)

    Allow adding plot to the same panel

    Parameters:

      n – the number of layer

  update()

    Respond to changes in the model by recalculating the profiles and resetting the widgets.

  validate(param_name, param_value)

    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)

  Bases: `BaseInteractor`

  Draws a line though 0,0 on a data2D plot with reference to a center line. This is used to define both a left and right line which are always updated together as they must remain symmetric at some phi value around the main line (at -phi and +phi).

  Parameters:

    - phi – the phase between the middle line and one side line

    - theta2 – the angle between the middle line and x- axis

  clear()

    Clear the slicer and all connected events related to this slicer

  getParams()
  move(x, y, ev)

    Process move to a new position, making sure that the move is allowed.

  moveend(ev)
  restore(ev)

    Restore the roughness for this layer.

  save(ev)

    Remember the roughness for this layer and the next so that we can restore on Esc.

  setParams(params)
  set_cursor(x, y)
  set_layer(n)

    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)

    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

## sas.qtgui.Plotting.Slicers.WedgeSlicer module

class sas.qtgui.Plotting.Slicers.WedgeSlicer.WedgeInteractor(base, axes, item=None, color='black', zorder=3)

  Bases: `BaseInteractor`, `SlicerModel`

  This WedgeInteractor is a cross between the SectorInteractor and the AnnulusInteractor. It plots a data1D average of a wedge area defined in a Data2D object, in either the Q direction or the Phi direction. The data1D averaging itself is performed in sasdata by manipulations.py.

  This class uses three other classes, ArcInteractor (in ArcInteractor.py), RadiusInteractor (in RadiusInteractor.py), and LineInteractor (in SectorSlicer.py), to define a wedge area contained between two radial lines running through (0,0) defining the left and right edges of the wedge (similar to the sector), and two rings at Q1 and Q2 (similar to the annulus). The wedge is centred on the line defined by LineInteractor, which the radial lines move symmetrically around. This class is itself subclassed by SectorInteractorPhi and SectorInteractorQ which define the direction of the averaging. SectorInteractorPhi averages all Q points at constant Phi (as for the AnnulusSlicer) and SectorInteractorQ averages all phi points at constant Q (as for the SectorSlicer).

  clear()

    Clear the slicer and all connected events related to this slicer

  draw()

    Draws the Canvas using the canvas.draw from the calling class that instantiated this object.

  getParams()

    Store a copy of values of parameters of the slicer into a dictionary. :return params: the dictionary created

  move(x, y, ev)

    Process move to a new position.

  moveend(ev)

    Called after a dragging event. Post the slicer new parameters and creates a new Data1D corresponding to the new average

  restore(ev)

    Restore the roughness for this layer.

  save(ev)

    Remember the roughness for this layer and the next so that we can restore on Esc.

  setParams(params)

    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)
  set_layer(n)

    Allow adding plot to the same panel :param n: the number of layer

  update()

    If one of the interactors has been moved, update it and the parameter it controls, then update the other interactors accordingly

  validate(param_name, param_value)

    Validate input from user. Values get checked at apply time.

class sas.qtgui.Plotting.Slicers.WedgeSlicer.WedgeInteractorPhi(base, axes, item=None, color='black', zorder=3)

  Bases: `WedgeInteractor`

  Average in phi direction. The data for all Q at a constant phi are averaged together to provide a 1D array in phi (to be plotted as a function of phi)

class sas.qtgui.Plotting.Slicers.WedgeSlicer.WedgeInteractorQ(base, axes, item=None, color='black', zorder=3)

  Bases: `WedgeInteractor`

  Average in Q direction. The data for all phi at a constant Q are averaged together to provide a 1D array in Q (to be plotted as a function of Q)

## Module contents