MaskSubsetState

class glue.core.subset.MaskSubsetState(mask, cids)[source]

Bases: glue.core.subset.SubsetState

A subset defined by a boolean mask.

Parameters
mask~numpy.ndarray

The boolean mask to apply to the data.

cidsiterable of ComponentID

The component IDs along which the mask applies.

Attributes Summary

attributes

The attributes that the subset state depends on.

cids

The component IDs along which the mask applies.

mask

The boolean mask to apply to the data.

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[source]

The attributes that the subset state depends on.

cids[source]

The component IDs along which the mask applies.

mask[source]

The boolean mask to apply to the data.

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.