Inherits from
- HasTraits: enthought.traits.has_traits.HasTraits
Attributes
- bounds_changed
Event that fires when just the bounds change.
bounds_changed = Event
- data_changed
Event that fires when the data values change.
data_changed = Event
- index_dimension
The dimensionality of the indices into this data source. Subclasses re-declare this trait as a read-only trait with the right default value.
index_dimension = DimensionTrait
- metadata
A dictionary keyed on strings. In general, it maps to indices (or tuples of indices, depending on value_dimension), as in the case of selections and annotations. Applications and renderers can add their own custom metadata, but must avoid using keys that might result in name collision.
metadata = Dict
- metadata_changed
Event that fires when metadata structure is changed.
metadata_changed = Event
- persist_data
Should the data that this datasource refers to be serialized when the datasource is serialized?
persist_data = Bool(True)
- value_dimension
The dimensionality of the value at each index point. Subclasses re-declare this trait as a read-only trait with the right default value.
value_dimension = DimensionTrait
Inherited from base classes
Method summary
- __getstate__(self)
- get_bounds(self)
- get_data(self)
- get_data_mask(self)
- get_size(self)
- is_masked(self)
Inherited from base classes
- __deepcopy__(self, memo)
- __prefix_trait__(self, name, is_set)
- __reduce_ex__(self, protocol)
- __setstate__(self, state, trait_change_notify = True)
- add_class_trait(cls, name, *trait)
- add_trait(self, name, *trait)
- add_trait_category(cls, category)
- add_trait_listener(self, object, prefix = '')
- all_trait_names(self)
- base_trait(self, name)
- class_default_traits_view(cls)
- class_editable_traits(cls)
- class_trait_names(cls, **metadata)
- class_trait_view(cls, name = None, view_element = None)
- class_trait_view_elements(cls)
- class_traits(cls, **metadata)
- clone_traits(self, traits = None, memo = None, copy = None, **metadata)
- configure_traits(self, filename = None, view = None, kind = None, edit = True, context = None, handler = None, id = '', scrollable = None, **args)
- copy_traits(self, other, traits = None, memo = None, copy = None, **metadata)
- copyable_trait_names(self, **metadata)
- default_traits_view(self)
- edit_traits(self, view = None, parent = None, kind = None, context = None, handler = None, id = '', scrollable = None, **args)
- editable_traits(self)
- has_traits_interface(self, *interfaces)
- on_trait_change(self, handler, name = None, remove = False, dispatch = 'same', priority = False, deferred = False)
- print_traits(self, show_help = False, **metadata)
- remove_trait(self, name)
- remove_trait_listener(self, object, prefix = '')
- reset_traits(self, traits = None, **metadata)
- set_trait_dispatch_handler(cls, name, klass, override = False)
- sync_trait(self, trait_name, object, alias = None, mutual = True, remove = False)
- trait(self, name, force = False, copy = False)
- trait_context(self)
- trait_get(self, *names, **metadata)
- trait_monitor(cls, handler, remove = False)
- trait_names(self, **metadata)
- trait_set(self, trait_change_notify = True, **traits)
- trait_setq(self, **traits)
- trait_subclasses(cls, all = False)
- trait_view(self, name = None, view_element = None)
- trait_view_elements(self)
- trait_views(self, klass = None)
- traits(self, **metadata)
- validate_trait(self, name, value)
Methods
- __getstate__(self)
- get_bounds(self)
get_bounds() -> tuple(min, max)
Returns a tuple (min, max) of the bounding values for the data source. In the case of 2-D data, min and max are 2-D points that represent the bounding corners of a rectangle enclosing the data set. Note that these values are not view-dependent, but represent intrinsic properties of the data source.
If data is the empty set, then the min and max vals are 0.0.
- get_data(self)
get_data() -> data_array
Returns a data array of the dimensions of the data source. This data array must not be altered in-place, and the caller must assume it is read-only. This data is contiguous and not masked.
In the case of structured (gridded) 2-D data, this method may return two 1-D ArrayDataSources as an optimization.
- get_data_mask(self)
get_data_mask() -> (data_array, mask_array)
Returns the full, raw, source data array and a corresponding binary mask array. Treat both arrays as read-only.
The mask is a superposition of the masks of all upstream data sources. The length of the returned array may be much larger than what get_size() returns; the unmasked portion, however, matches what get_size() returns.
- get_size(self)
get_size() -> int
Returns an integer estimate or the exact size of the dataset that get_data() returns for this object. This method is useful for down-sampling.
- is_masked(self)
is_masked() -> bool
Returns True if this data source's data uses a mask. In this case, to retrieve the data, call get_data_mask() instead of get_data(). If you call get_data() for this data source, it returns data, but that data might not be the expected data.