WrightTools.data.Data

class WrightTools.data.Data(*args, **kwargs)[source]

Multidimensional dataset.

__init__(*args, **kwargs)[source]

Create a new Group object by binding to a low-level GroupID.

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_nans()

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

attrs

Attributes attached to this object

axes

axis_expressions

Axis expressions.

axis_names

Axis names.

channel_names

Channel names.

channels

Channels.

class_name

constant_expressions

Axis expressions.

constant_names

Axis names.

constant_units

All constant units.

constants

created

datasets

Datasets.

file

Return a File instance associated with this object

fullpath

file and internal structure.

id

Low-level identifier appropriate for this object

item_names

Item names.

kind

Kind.

name

Return the full name of this object.

natural_name

Natural name.

ndim

Get number of dimensions.

parent

Parent.

ref

An (opaque) HDF5 reference to this object

regionref

Create a region reference (Datasets only).

shape

Shape.

size

Size.

source

Source.

units

All axis units.

variable_names

Variable names.

variables

Variables.