WrightTools.data.Channel
- class WrightTools.data.Channel(parent, id, **kwargs)[source]
Channel.
- __init__(parent, id, *, units=None, null=None, signed=None, label=None, label_seed=None, **kwargs)[source]
Construct a channel object.
- Parameters:
values (array-like) – Values.
name (string) – Channel name.
units (string (optional)) – Channel units. Default is None.
null (number (optional)) – Channel null. Default is None (0).
signed (booelan (optional)) – Channel signed flag. Default is None (guess).
label (string.) – Label. Default is None.
label_seed (list of strings) – Label seed. Default is None.
**kwargs – Additional keyword arguments are added to the attrs dictionary and to the natural namespace of the object (if possible).
Methods
__init__(parent, id, *[, units, null, ...])Construct a channel object.
argmax()Index of the maximum, ignorning nans.
argmin()Index of the minimum, ignoring nans.
asstr([encoding, errors])Get a wrapper to read string data as Python strings:
astype(dtype)Get a wrapper allowing you to perform reads to a different destination type, e.g.:
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.
fields(names, *[, _prior_dtype])Get a wrapper to read a subset of fields from a compound data type:
flush()Flush the dataset data and metadata to the file.
iter_chunks([sel])Return chunk iterator.
len()The size of the first axis.
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.
mag()Channel magnitude (maximum deviation from null).
make_scale([name])Make this dataset an HDF5 dimension scale.
max()Maximum, ignorning nans.
min()Minimum, ignoring nans.
normalize([mag])Normalize a Channel, set null to 0 and the mag to given value.
read_direct(dest[, source_sel, dest_sel])Read data directly from HDF5 into an existing NumPy array.
refresh()Refresh the dataset metadata by reloading from the file.
resize(size[, axis])Resize the dataset, or the specified axis.
slices()Returns a generator yielding tuple of slice objects.
symmetric_root([root])trim(neighborhood[, method, factor, ...])Remove outliers from the dataset.
virtual_sources()Get a list of the data mappings for a virtual dataset
write_direct(source[, source_sel, dest_sel])Write data directly to HDF5 from a NumPy array.
Attributes
attrsAttributes attached to this object
chunksDataset chunks (or None)
class_namecompressionCompression strategy (or None)
compression_optsCompression setting.
dimsAccess dimension scales attached to this dataset.
dtypeNumpy dtype representing the datatype
externalExternal file settings.
fileReturn a File instance associated with this object
fillvalueFill value for this dataset (0 by default)
filter_idsNumeric IDs of HDF5 filters used for this dataset
filter_namesNames, as stored in the file, of the filters used for this dataset
fletcher32Fletcher32 filter is present (T/F)
fullfullpathfile and internal structure.
idLow-level identifier appropriate for this object
is_scaleReturn
Trueif this dataset is also a dimension scale.is_virtualCheck if this is a virtual dataset
major_extentMaximum deviation from null.
maxshapeShape up to which this dataset can be resized.
minor_extentMinimum deviation from null.
nameReturn the full name of this object.
natural_nameNatural name of the dataset.
nbytesNumpy-style attribute giving the raw dataset size as the number of bytes
ndimNumpy-style attribute giving the number of dimensions
nullparentParent.
pointsSqueezed array.
refAn (opaque) HDF5 reference to this object
regionrefCreate a region reference (Datasets only).
scaleoffsetScale/offset filter settings.
shapeNumpy-style shape tuple giving dataset dimensions
shuffleShuffle filter present (T/F)
signedsizeNumpy-style attribute giving the total dataset size
unitsUnits.