MultiRangeSubsetState

class glue.core.subset.MultiRangeSubsetState(pairs, att=None)[source]

Bases: glue.core.subset.SubsetState

A subset state defined by multiple discontinuous ranges

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

Parameters
pairslist

A list of (lo, hi) tuples.

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.

pairs

A list of (lo, hi) tuples.

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

att

The attribute being used for the subset.

attributes

The attributes that the subset state depends on.

pairs

A list of (lo, hi) tuples.

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.