RoiSubsetState

class glue.core.subset.RoiSubsetState(xatt=None, yatt=None, roi=None)[source]

Bases: glue.core.subset.SubsetState

A subset defined as the set of points in two dimensions that lie inside a region of interest (ROI).

The two dimensions are defined as two numerical data attributes.

Parameters
xattComponentID

The data attribute on the x axis.

yattComponentID

The data attribute on the y axis.

roiRoi

The region of interest.

Attributes Summary

attributes

The attributes that the subset state depends on.

roi

The region of interest.

xatt

The data attribute on the x axis.

yatt

The data attribute on the y axis.

Methods Summary

copy(self)

Return a copy of the subset state.

to_mask(self, data[, view])

Compute the mask for this subset state.

Attributes Documentation

attributes

The attributes that the subset state depends on.

roi

The region of interest.

xatt

The data attribute on the x axis.

yatt

The data attribute on the y axis.

Methods Documentation

copy(self)[source]

Return a copy of the subset state.

to_mask(self, data, view=None)[source]

Compute the mask for this subset state.

Parameters
dataData

The dataset to compute the mask for.

view

Any object that returns a valid view for a Numpy array.