Bases: BaseData
Base class for any glue data object which indicates which methods should be provided at a minimum.
The underlying data can be any kind of data (structured or unstructured) but it needs to expose an interface that looks like a regular n-dimensional cartesian dataset. This means exposing e.g. shape
and ndim
, and means that get_data can expect ndarray slices. Non-regular datasets should therefore have the concept of ‘virtual’ pixel coordinates and should typically match the highest resolution a user might want to access the data at.
Attributes Summary
Methods Summary
Attributes Documentation
The coordinates object for the data.
The number of dimensions of the data, as an integer.
Information about other datasets in the same data collection that have matching or a subset of pixel component IDs.
This is returned as a dictionary where each key is a dataset with matching pixel component IDs, and the value is the order in which the pixel component IDs of the other dataset can be found in the current one.
The n-dimensional shape of the dataset, as a tuple.
The size of the data (the product of the shape dimensions), as an integer.
A list of ComponentID
giving all world coordinate component IDs in the data.
Methods Documentation
Get a fixed-resolution buffer.
The list of bounds for the fixed resolution buffer. This list should have as many items as there are dimensions in target_data
. Each item should either be a scalar value, or a tuple of (min, max, nsteps)
.
Data
, optional
The data in whose frame of reference the bounds are defined. Defaults to data
.
ComponentID
, optional
If specified, gives the component ID giving the component to use for the data values. Alternatively, use subset_state
to get a subset mask.
SubsetState
, optional
If specified, gives the subset state for which to compute a mask. Alternatively, use target_cid
if you want to get data values.
If True, then if a dimension in target_data
for which bounds
is not a scalar does not affect any of the dimensions in data
, then the final array will be effectively broadcast along this dimension, otherwise an error will be raised.
Compute an n-dimensional histogram with regularly spaced bins.
ComponentID
Component IDs to compute the histogram over.
ComponentID
Component IDs to use for the histogram weights.
The (min, max)
of the histogram range.
The number of bins.
Whether to compute the histogram in log space.
SubsetState
, optional
If specified, the histogram will only take into account values in the subset state.
If specified, this should be an integer giving the number of values to use for the statistic.
Compute a statistic for the data.
The statistic to compute
ComponentID
or str
The component ID to compute the statistic on - if given as a string this will be assumed to be for the component belonging to the dataset (not external links).
SubsetState
, optional
If specified, the statistic will only include the values that are in the subset specified by this subset state.
If specified, the axis/axes to compute the statistic over.
Whether to include only finite values in the statistic. This should be True to ignore NaN/Inf values
Whether to include only (strictly) positive values in the statistic. This is used for example when computing statistics of data shown in log space.
If statistic
is 'percentile'
, the percentile
argument should be given and specify the percentile to calculate in the range [0:100]
If specified, this should be an integer giving the number of values to use for the statistic. This can only be used if axis
is None
Get the data values for a given component
ComponentID
The component ID to get the data for.
The ‘view’ on the data - anything that is considered a valid Numpy slice/index.
Get a boolean mask for a given subset state.
SubsetState
The subset state to use to compute the mask
The ‘view’ on the mask - anything that is considered a valid Numpy slice/index.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4