RangeROI

class glue.core.roi.RangeROI(orientation, min=None, max=None)[source]

Bases: glue.core.roi.Roi

Parameters

orientation – ‘x’ or ‘y’. Sets which axis to range

Attributes Summary

ori

Methods Summary

center()

Return the (x,y) coordinates of the ROI center

contains(x, y)

Return true/false for each x/y pair.

defined()

Returns whether or not the subset is properly defined

move_to(center)

Translate the ROI to a center of (x, y)

range()

reset()

set_range(lo, hi)

to_polygon()

Returns a tuple of x and y points, approximating the ROI as a polygon.

transformed([xfunc, yfunc])

A transformed version of the ROI

Attributes Documentation

ori[source]

Methods Documentation

center()[source]

Return the (x,y) coordinates of the ROI center

contains(x, y)[source]

Return true/false for each x/y pair.

Parameters
  • x – Array of X locations

  • y – Array of Y locations

Returns

A Boolean array, where each element is True if the corresponding (x,y) tuple is inside the Roi.

Raises

UndefinedROI exception if not defined

defined()[source]

Returns whether or not the subset is properly defined

move_to(center)[source]

Translate the ROI to a center of (x, y)

range()[source]
reset()[source]
set_range(lo, hi)[source]
to_polygon()[source]

Returns a tuple of x and y points, approximating the ROI as a polygon.

transformed(xfunc=None, yfunc=None)[source]

A transformed version of the ROI