We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
d
str_to_nm
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello,
I noticed that d is used as key for decameter (dam) and decimeter (dm) in the str_to_nm definition:
def str_to_nm(value, multiplier, units): v = float(value.replace(',', '.')) # avoid rounding errors if the value is already in nanometres if multiplier == 'n' and units == 'm': return v unit_prefix = { 'Y':1e24, 'Z':1e21, 'E':1e18, 'P':1e15, 'T':1e12, 'G':1e9, 'M':1e6, 'k':1e3, 'h':1e2, 'd':1e1, '': 1, 'd':1e-1, 'c':1e-2, 'm':1e-3, 'u':1e-6, 'n':1e-9, 'p':1e-12} v *= unit_prefix[multiplier] if units == 'Hz': v = 299792458. / v * 1e9 elif units == 'm': v *= 1e9 else: raise ValueError return v
The C++ code uses da for decameter: https://github.com/afichet/spectral-exr/blob/master/lib/Util.h#L82C17-L82C19
da
Cheers,
Thomas
The text was updated successfully, but these errors were encountered:
Use da for *decameter* in str_to_nm definition.
967e6cd
References afichet#3.
No branches or pull requests
Hello,
I noticed that
d
is used as key for decameter (dam) and decimeter (dm) in thestr_to_nm
definition:The C++ code uses
da
for decameter: https://github.com/afichet/spectral-exr/blob/master/lib/Util.h#L82C17-L82C19Cheers,
Thomas
The text was updated successfully, but these errors were encountered: