WrightTools.data.Channel

class WrightTools.data.Channel(parent, id, *, units=None, null=None, signed=None, label=None, label_seed=None, **kwargs)[source]

Bases: WrightTools._dataset.Dataset

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

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.
mag() Channel magnitude (maximum deviation from null).
max() Maximum, ignorning nans.
min() Minimum, ignoring nans.
normalize([mag]) Normalize a Channel, set null to 0 and the mag to given value.
slices() Returns a generator yielding tuple of slice objects.
symmetric_root([root])
trim(neighborhood[, method, factor, …]) Remove outliers from the dataset.

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.
major_extent Maximum deviation from null.
minor_extent Minimum deviation from null.
name Return the full name of this object.
natural_name Natural name of the dataset.
ndim Numpy-style attribute giving the number of dimensions
null
parent Parent.
points Squeezed array.
shape Numpy-style shape tuple giving dataset dimensions
signed
size Numpy-style attribute giving the total dataset size
units Units.
value Alias for dataset[()]