pyunitwizard.storage.asdf.to_tree#
- pyunitwizard.storage.asdf.to_tree(record)[source]#
Create a detached ASDF tree containing a native quantity and sealed header.
- Parameters:
record (QuantityRecord) – Homogeneous scalar or array in a multiplicative physical unit.
- Returns:
quantityis an Astropy Quantity;pyunitwizardbinds its unit spelling to the original qrec metadata. Both are detached from input.- Return type:
dict
- Raises:
RecordError – For unsupported layout, offset or native/provider definition drift.
ModuleNotFoundError – If ASDF or asdf-astropy is absent.
Examples
>>> tree = to_tree(record)