I would like to be able to convert between frequency values and period values. These are not directly convertible since they are not exactly the same unit, but I read that there are predefined relationships between units called Contexts. However, I can't find which Contexts define which relations and I cannot convert MHz to ns in the context 'sp'
given in the example:
>>> import pint
>>> ureg = pint.UnitRegistry()
>>> freq = 25 * ureg.MHz
>>> ureg.enable_contexts('sp')
>>> freq.to('us')
gives the error
pint.errors.DimensionalityError: Cannot convert from 'megahertz' (1 / [time]) to 'microsecond' ([time])