SliceSubsetState

class glue.core.subset.SliceSubsetState(reference_data, slices)[source]

Bases: glue.core.subset.SubsetState

A subset defined by a set of array slices.

Parameters
reference_dataData

The data in whose space the slices are defined.

slicesiterable of slice

An iterable containing slice objects to apply to the data.

Attributes Summary

attributes

The attributes that the subset state depends on.

reference_data

The data in whose space the slices are defined.

slices

An iterable containing slice objects to apply to the data.

Methods Summary

copy(self)

Return a copy of the subset state.

to_array(self, data, att)

to_mask(self, data[, view])

Compute the mask for this subset state.

Attributes Documentation

attributes[source]

The attributes that the subset state depends on.

reference_data[source]

The data in whose space the slices are defined.

slices[source]

An iterable containing slice objects to apply to the data.

Methods Documentation

copy(self)[source]

Return a copy of the subset state.

to_array(self, data, att)[source]
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.