CircularROI

class glue.core.roi.CircularROI(xc=None, yc=None, radius=None)[source]

Bases: glue.core.roi.Roi

A 2D circular region of interest.

Methods Summary

contains(self, x, y)

Test whether a set of (x,y) points falls within the region of interest

defined(self)

Returns True if the ROI is defined

get_center(self)

get_radius(self)

reset(self)

Reset the rectangular region.

set_center(self, x, y)

Set the center of the circular region

set_radius(self, radius)

Set the radius of the circular region

to_polygon(self)

Returns x, y, where each is a list of points

transformed(self[, xfunc, yfunc])

A transformed version of the ROI

Methods Documentation

contains(self, x, y)[source]

Test whether a set of (x,y) points falls within the region of interest

Parameters
  • x – A list of x points

  • y – A list of y points

Returns

A list of True/False values, for whether each (x,y) point falls within the ROI

defined(self)[source]

Returns True if the ROI is defined

get_center(self)[source]
get_radius(self)[source]
reset(self)[source]

Reset the rectangular region.

set_center(self, x, y)[source]

Set the center of the circular region

set_radius(self, radius)[source]

Set the radius of the circular region

to_polygon(self)[source]

Returns x, y, where each is a list of points

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

A transformed version of the ROI