weldx.util.WeldxAccessor#

class weldx.util.WeldxAccessor(xarray_obj)#

Custom accessor for extending DataArray functionality.

See http://xarray.pydata.org/en/stable/internals.html#extending-xarray for details.

Construct a WelDX xarray object.

Methods

coordinates_as_quantities

Convert coordinates of an xarray object to a quantity dictionary.

dequantify_coords

Format coordinates 'units' attribute as string.

indexes_as_quantities

Convert indexes of an xarray object to a quantity dictionary.

interp_like

Interpolate DataArray along dimensions of another DataArray.

quantify

Quantify an xarray object by it's unit information.

quantify_coords

Format coordinates 'units' attribute as pint.Unit.

reset_reference_time

Return copy with time values shifted to new reference time.

time_ref_restore

Convert DatetimeIndex back to TimedeltaIndex + reference Timestamp.

time_ref_unset

Convert Timedelta + reference Timestamp to DatetimeIndex.

Attributes

time_ref

Get the time_ref value or None if not set.

units

Get the unit of the data array values.