WrightTools.data.Data
- class WrightTools.data.Data(*args, **kwargs)[source]
Multidimensional dataset.
Methods
__init__
(*args, **kwargs)Create a new Group object by binding to a low-level GroupID.
at
([parent, name])Return data of a subset of the data at specified axis position(s).
bring_to_front
(channel)Bring a specific channel to the zero-indexed position in channels.
build_virtual_dataset
(name, shape, dtype[, ...])Assemble a virtual dataset in this group.
chop
(*args[, at, parent, verbose])Divide the dataset into its lower-dimensionality components.
clear
()close
()Close the file that contains the Group.
collapse
(axis[, method])Collapse the dataset along one axis, adding lower rank channels.
convert
(destination_units, *[, ...])Convert all compatable axes and constants to given units.
copy
([parent, name, verbose])Create a copy under parent.
create_channel
(name[, values, shape, units, ...])Append a new channel.
create_constant
(expression, *[, verbose])Append a constant to the stored list.
create_dataset
(name[, shape, dtype, data])Create a new HDF5 dataset
create_dataset_like
(name, other, **kwupdate)Create a dataset similar to other.
create_group
(name[, track_order])Create and return a new subgroup.
create_variable
(name[, values, shape, ...])Add new child variable.
create_virtual_dataset
(name, layout[, fillvalue])Create a new virtual dataset in this group.
flush
()Ensure contents are written to file.
get
(name[, default, getclass, getlink])Retrieve an item or other information.
get_nadir
([channel])Get the coordinates, in units, of the minimum in a channel.
get_zenith
([channel])Get the coordinates, in units, of the maximum in a channel.
gradient
(axis, *[, channel])Compute the gradient along one axis.
heal
([channel, method, fill_value, verbose])Remove nans from channel using interpolation.
ichop
(*args[, at, autoclose])Similar to chop, but an iterable is produced insted of a collection.
items
()Get a view object on member items
keys
()Get a view object on member names
level
(channel, axis, npts, *[, verbose])Subtract the average value of npts at the edge of a given axis.
map_variable
(variable, points[, ...])Map points of an axis to new points using linear interpolation.
moment
(axis[, channel, moment, resultant])Take the nth moment the dataset along one axis, adding lower rank channels.
move
(source, dest)Move a link to a new location in the file.
offset
(points, offsets, along, offset_axis)Offset one axis based on another axis' values.
pop
(k[,d])If key is not found, d is returned if given, otherwise KeyError is raised.
popitem
()as a 2-tuple; but raise KeyError if D is empty.
print_tree
(*[, verbose])Print a ascii-formatted tree representation of the data contents.
prune
([keep_channels, verbose])Remove unused variables and (optionally) channels from the Data object.
remove_channel
(channel, *[, verbose])Remove channel from data.
remove_constant
(constant, *[, verbose])Remove a constant from the stored list.
remove_variable
(variable, *[, implied, verbose])Remove variable from data.
rename_channels
(*[, verbose])Rename a set of channels.
rename_variables
(*[, implied, verbose])Rename a set of variables.
require_dataset
(name, shape, dtype[, exact])Open a dataset, creating it if it doesn't exist.
require_group
(name)Return a group, creating it if it doesn't exist.
save
([filepath, overwrite, verbose])Save as root of a new file.
set_constants
(*constants[, verbose])Set the constants associated with the data.
setdefault
(k[,d])Share not-a-numbers between all channels.
smooth
(factors[, channel, verbose])Smooth a channel using an n-dimenional kaiser window.
split
(expression, positions, *[, units, ...])Split the data object along a given expression, in units.
squeeze
([name, parent])Reduce the data to the dimensionality of the (non-trivial) span of the axes.
transform
(*axes[, verbose])Transform the data.
translate_to_txt
(filepath[, delimiter, ...])Write a serialized, readable list of the channels and variables to file.
update
([E, ]**F)If E present and has a .keys() method, does: for k in E: D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k, v in F.items(): D[k] = v
values
()Get a view object on member objects
visit
(func)Recursively visit all names in this group and subgroups.
visit_links
(func)Recursively visit all names in this group and subgroups.
visititems
(func)Recursively visit names and objects in this group.
visititems_links
(func)Recursively visit links in this group.
zoom
(factor[, order, verbose])Zoom the data array using spline interpolation of the requested order.
Attributes
Attributes attached to this object
Axis expressions.
Axis names.
Channel names.
Channels.
Axis expressions.
Axis names.
All constant units.
Datasets.
Return a File instance associated with this object
file and internal structure.
Low-level identifier appropriate for this object
Item names.
Kind.
Return the full name of this object.
Natural name.
Get number of dimensions.
Parent.
An (opaque) HDF5 reference to this object
Create a region reference (Datasets only).
Shape.
Size.
Source.
All axis units.
Variable names.
Variables.