RangeSubsetState#

class glue.core.subset.RangeSubsetState(lo, hi, att=None)[source]#

Bases: SubsetState

A subset defined as the set of values inside a range.

The range is defined as being inclusive (that is, values equal to the lower or upper bounds are considered to be inside the subset).

Parameters:
lofloat

The lower limit of the range.

hifloat

The upper limit of the range.

attComponentID

The attribute being used for the subset.

Attributes Summary

att

The attribute being used for the subset.

attributes

The attributes that the subset state depends on.

hi

The upper limit of the range.

lo

The lower limit of the range.

Methods Summary

center()

Return center of underlying ROI, if any.

copy()

Return a copy of the subset state.

move_to(new_cen)

Move any underlying ROI to the new given center.

to_mask(data[, view])

Compute the mask for this subset state.

Attributes Documentation

att[source]#

The attribute being used for the subset.

attributes[source]#
hi[source]#

The upper limit of the range.

lo[source]#

The lower limit of the range.

Methods Documentation

center()[source]#

Return center of underlying ROI, if any.

copy()[source]#

Return a copy of the subset state.

move_to(new_cen)[source]#

Move any underlying ROI to the new given center.

to_mask(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.