import numpy as np
import dascore as dc
# Get example patch, set unit to velocity (for demonstration)
= dc.get_example_patch().set_units("m/s")
patch
= patch.dft(dim="time")
transformed
# Note how the dimension name has changed
print(f"old_dims: {patch.dims} new dims: {transformed.dims}")
# As have the units
= patch.attrs.data_units
old_units = transformed.attrs.data_units
new_units print(f"old units: {old_units}, new units: {new_units}")
old_dims: ('distance', 'time') new dims: ('distance', 'ft_time')
old units: 1.0 m / s, new units: 1 m