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
I was trying to use pint to perform convertions between wavelength (nm), frequencies (THz), angular frequencies (rad/s), and wave number (m**-1). What I realize is that it cannot be done automatically. I can use the units, but I have to explicitly enter the formulas for convertions. This is probably my misunderstanding of what pint is. Sorry for the noise.
I rethought about that, and I think that hertz should be defined as cycle / second instead of 1 / second. Since cycle already is defined as 2 * pi * radian, it would allow to convert hertz to radian / second, to rpm, and to cps.
But the problem is that hertz is the inverse of second. It is not a good idea to redefine it in the canonical list included with pint as it will break user expectations. Converting from frequency to angular frequency is not really a unit conversion problem. It is a relation between physical quantities. Both have the same units: 1/second.
Activity
hgrecco commentedon Sep 12, 2013
The problem is that it will class with
This is sometimes called
cycles_per_second. We could also call itangular_hertz, but I have never heard such name.cbrunet commentedon Sep 13, 2013
I see...
I was trying to use pint to perform convertions between wavelength (nm), frequencies (THz), angular frequencies (rad/s), and wave number (m**-1). What I realize is that it cannot be done automatically. I can use the units, but I have to explicitly enter the formulas for convertions. This is probably my misunderstanding of what pint is. Sorry for the noise.
hgrecco commentedon Sep 13, 2013
Thanks for your comments. It is funny that you mention this because I was writing an enhancement proposal in this regard. Take a look at: #65
cbrunet commentedon Sep 13, 2013
I rethought about that, and I think that
hertzshould be defined ascycle / secondinstead of1 / second. Sincecyclealready is defined as2 * pi * radian, it would allow to converthertztoradian / second, torpm, and tocps.hgrecco commentedon Sep 13, 2013
But the problem is that
hertzis the inverse ofsecond. It is not a good idea to redefine it in the canonical list included withpintas it will break user expectations. Converting fromfrequencytoangular frequencyis not really a unit conversion problem. It is a relation between physical quantities. Both have the same units:1/second.