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(x, y)

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

defined()

Returns True if the ROI is defined

get_center()

get_radius()

move_to(xdelta, ydelta)

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

reset()

Reset the rectangular region.

set_center(x, y)

Set the center of the circular region

set_radius(radius)

Set the radius of the circular region

to_polygon()

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

transformed([xfunc, yfunc])

A transformed version of the ROI

Methods Documentation

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

Returns True if the ROI is defined

get_center()[source]
get_radius()[source]
move_to(xdelta, ydelta)[source]

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

reset()[source]

Reset the rectangular region.

set_center(x, y)[source]

Set the center of the circular region

set_radius(radius)[source]

Set the radius of the circular region

to_polygon()[source]

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

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

A transformed version of the ROI