Open Paulie14 opened 2 years ago
I created auxiliary function fot that:
def get_quantity(self, result_format, root_quantity, quantity_name):
iqspec, qspec = next(((i, q) for i, q in enumerate(result_format) if q.name == quantity_name), (0, None))
assert qspec is not None
quantity = root_quantity[quantity_name]
return qspec, quantity
root_quantity
is constructed using list ofQuantitySpec
Quantity
is accessed fromroot_quantity
by quantity nameIt would be nice to get from
Quantity
itsQuantitySpec
- get name, unit, time axis etc..Currently, I have to get
QuantitySpec
bysample_storage.load_result_format()
and search for selected quantity. When moving around, I have to passQuantitySpec
andQuantity
together manually.