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
Is your feature request related to a problem? Please describe.
Inputing a number in radian values needs the unit specifier "Hz"
But inputing a unit in Hz values needs the unit specifier "Hz 2pi"
This is rather counter intuitive and should be changed.
However if you currently use the unit Hz 2pi the input value will be multiplied by 2pi converting from Hz to rad. But it would be more intuitive the other way around to insert a value in Hz with the unit Hz and then transform this value to a radian value, if necessary, e.g. creating the Hamiltonian.
Describe the solution you'd like
Do not transform input value of quantity if 2pi is in the quantity name.
Objects which need a value in radians (e.g. creation of the hamiltonian) should be able to request a value that is in radians and includes a scaling factor dependend on the given unit
Describe alternatives you've considered
Transform an initalized Hz unit to a Hz 2Pi while changing the unit specifier, as well as the value.
Additional context
The text was updated successfully, but these errors were encountered:
On Thu, 28 Jan 2021, 18:37 Niklas Glaser, ***@***.***> wrote:
An additional problem with the current implementation is that a
modification by get_value and set_value is not straightvorward:
v = Qty(3, unit="Hz 2pi") v.set_value(v.get_value())
leads to an out of bounds error
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#26 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAH3Q4K3KXUJQ7IDCDFJLY3S4GHD3ANCNFSM4WXLG4QQ>
.
Is your feature request related to a problem? Please describe.
Inputing a number in radian values needs the unit specifier "Hz"
But inputing a unit in Hz values needs the unit specifier "Hz 2pi"
This is rather counter intuitive and should be changed.
However if you currently use the unit
Hz 2pi
the input value will be multiplied by 2pi converting from Hz to rad. But it would be more intuitive the other way around to insert a value in Hz with the unit Hz and then transform this value to a radian value, if necessary, e.g. creating the Hamiltonian.Describe the solution you'd like
Do not transform input value of quantity if 2pi is in the quantity name.
Objects which need a value in radians (e.g. creation of the hamiltonian) should be able to request a value that is in radians and includes a scaling factor dependend on the given unit
Describe alternatives you've considered
Transform an initalized Hz unit to a
Hz 2Pi
while changing the unit specifier, as well as the value.Additional context
The text was updated successfully, but these errors were encountered: