You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
procxrayEnergyToFreq(E: keV): s⁻¹ =## converts the input energy in keV to a correct frequencyresult= E.to(Joule) / hp
echo1.keV.xrayEnergyToFreq
it gives a CT error, because the resulting unit it computes is KiloGram²•Meter⁴•Second⁻³ instead of Second⁻¹.
The issue is that we are inverting both the power of the units as well as its base units for compounds. But the base units can never be inverted! That implies that the meaning of the compound unit was just changed.
The fix is easy. Just remove the inversion of the base powers in invert.
The text was updated successfully, but these errors were encountered:
Take the following code:
it gives a CT error, because the resulting unit it computes is KiloGram²•Meter⁴•Second⁻³ instead of Second⁻¹.
The issue is that we are inverting both the power of the units as well as its base units for compounds. But the base units can never be inverted! That implies that the meaning of the compound unit was just changed.
The fix is easy. Just remove the inversion of the base powers in
invert
.The text was updated successfully, but these errors were encountered: