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

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

contains(self, x, y)

Return true/false for each x/y pair.

defined(self)

Returns whether or not the subset is properly defined

move_to(self, center)

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

range(self)

reset(self)

set_range(self, lo, hi)

to_polygon(self)

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

transformed(self[, xfunc, yfunc])

A transformed version of the ROI

Attributes Documentation

ori[source]

Methods Documentation

center(self)[source]

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

contains(self, 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(self)[source]

Returns whether or not the subset is properly defined

move_to(self, center)[source]

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

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

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

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

A transformed version of the ROI