Open mikemhenry opened 2 years ago
We could possibly do these as separate classes (ideally with a better name than this):
class Thing(DefaultModel):
mass: FloatQuantity["mass"]
some_physical_property: FloatQuantityThatOnlySpecifiesDimensionality['temperature']
It's not clear if these functionalities could be handled by the same class, and maybe it's better if they are handled by separate classes. In general this would be great for situations in which you don't care which unit is used (i.e. you will do the appropriate Quantity.magnitude_as
conversions) but it is important that you don't try to measure a mass with Kelving.
It would be nice to support something like:
And then we would accept any unit that has dimensionality "mass". Same would go for "length" so then we would accept "nm", "angstrom", etc
something like https://github.com/hgrecco/pint/issues/1166#issuecomment-1116309404