-
-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
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
Omit fundamental constants in scientific unit conversions? #481
Comments
How would you design this feature? If someone types
We could now go through all defined constants and see if something matches the type of that hole. We actually do that already if we help a bit (see the relevant matches in the last line):
But then how do we proceed? Do we take I would like to avoid having to hard-code any rules, if possible. |
Thanks for taking all these considerations! Yeah it needs to be more aware of the physical context, e.g., if it is converting to THz or Hz, it would use For other physical dimensions that might have bigger ambiguity, I would restrict to just fundamental physical constants. Pbb only the following three the majority of times:
If e.g. the speed of sound is involved, the user pbb should define it and use in the calculation. This feature would really be for convertion between historical and research field specific conventions of units, like cm^-1 used for MIR and Raman spectroscopy (and converting it to frequency or wavelength), eV used for high energy physics (and converting it to mass or frequency). Not that many use cases but would save quite some time every now and then. |
If you are interested in the background, please see #167 and #91
Ok, but this would mean that we would have to hard-code things. Or add a new decorator for this.. something like I would like it better if we could come up with something more flexible, even if it's not 100% as convenient. For example, I was recently thinking about some kind of Buckingham-pi-theorem-solver inside Numbat which could look like (syntax up for discussion)
which would take an arbitrary dimension type
For example: That wouldn't directly help with your use case, but it might be a very useful building block for other features. |
Thanks for the background! I do think the fundamental constants are worth having their own decorators, they are the privileged ones (Units are all made-up in a sense that they are convertible by the fundamental constants). There is really no ambiguity on how to convert from eV to rad/s or um. I also like the general idea of a solver to construct a dimension from other given ones, would be super helpful for dimensional analysis and order-of-magnitude estimations. Can we have both? blush |
For example, converting between eV and frequency using Planck's constant, and converting between length and frequency with speed of light etc.
The text was updated successfully, but these errors were encountered: