WrightTools.data.Variable

class WrightTools.data.Variable(parent, id, units=None, **kwargs)[source]

Bases: WrightTools._dataset.Dataset

Variable.

__init__(parent, id, units=None, **kwargs)[source]

Variable.

Parameters:
  • parent (WrightTools.Data) – Parent data object.
  • id (h5py DatasetID) – Dataset ID.
  • units (string (optional)) – Variable units. Default is None.
  • kwargs – Additional keys and values to be written into dataset attrs.

Methods

argmax() Index of the maximum, ignorning nans.
argmin() Index of the minimum, ignoring nans.
chunkwise(func, *args, **kwargs) Execute a function for each chunk in the dataset.
clip([min, max, replace]) Clip values outside of a defined range.
convert(destination_units) Convert units.
log([base, floor]) Take the log of the entire dataset.
log10([floor]) Take the log base 10 of the entire dataset.
log2([floor]) Take the log base 2 of the entire dataset.
max() Maximum, ignorning nans.
min() Minimum, ignoring nans.
slices() Returns a generator yielding tuple of slice objects.
symmetric_root([root])
write_direct(source[, source_sel, dest_sel]) Write data directly to HDF5 from a NumPy array.

Attributes

attrs Attributes attached to this object
class_name
dtype Numpy dtype representing the datatype
file Return a File instance associated with this object
fillvalue Fill value for this dataset (0 by default)
flush Flush the dataset data and metadata to the file.
full
fullpath file and internal structure.
label
name Return the full name of this object.
natural_name Natural name of the dataset.
ndim Numpy-style attribute giving the number of dimensions
parent Parent.
points Squeezed array.
shape Numpy-style shape tuple giving dataset dimensions
size Numpy-style attribute giving the total dataset size
units Units.