CategoricalROI

class glue.core.roi.CategoricalROI(categories=None)[source]

Bases: glue.core.roi.Roi

A ROI abstraction to represent selections of categorical data.

Methods Summary

contains(self, x, y)

Test whether a set categorical elements fall within the region of interest

defined(self)

Returns True if the ROI is defined

from_range(categories, lo, hi)

Utility function to help construct the Roi from a range.

reset(self)

to_polygon(self)

Just not possible.

update_categories(self, categories)

Methods Documentation

contains(self, x, y)[source]

Test whether a set categorical elements fall within the region of interest

Parameters
  • x – Any array-like object of categories (includes CategoricalComponenets)

  • y – Unused but required for compatibility

Returns

A list of True/False values, for whether each x value falls within the ROI

defined(self)[source]

Returns True if the ROI is defined

static from_range(categories, lo, hi)[source]

Utility function to help construct the Roi from a range.

Parameters
  • cat_comp – Anything understood by ._categorical_helper … array, list or component

  • lo – lower bound of the range

  • hi – upper bound of the range

Returns

CategoricalROI object

reset(self)[source]
to_polygon(self)[source]

Just not possible.

update_categories(self, categories)[source]