Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upSupport natural units (hbar = c = 1) #112
Comments
|
Thank you for the feedback! I see two ways how this could be implemented
To be honest, I'm not particularly fond of either of those options. Especially since it is already possible to do similar calculations with a minimal overhead:
What do you think? (did you set |
|
@robinro Closing this as there is no further feedback and I don't see a huge benefit. |
|
I have the same request, so I'm writing to a closed issue. Note that there are different sets of natural units. The one OP seems to be after, and me as well, are Hartree atomic units. I think that the task of adding full support for these can be split in two parts:
@sharkdp What do you think? |
|
Thank you for the feedback! Definitely sounds like a sensible feature request. It's not quite clear to me how we would deal with the conflict between unit names and constants. For example: we already have Or do we want to somehow support a special conversion "to constants", which would basically just divide by that quantity and make sure that the result is a scalar. For example:
could be executed as: "make sure that both sides of the arrow have matching units (otherwise, print an error). Then, print the result of
Interesting idea. This is related to #184 which looks for a way to say: convert this quantity to base SI units. Conversion to some natural system of units would involve one additional step where Insect would basically divide by an appropriate product like |
In a way, there is no semantic difference between a unit name and a constant. A physical unit is a constant. In atomic units,
This would make perfect sense, and given what I wrote above, it's actually equivalent to #184. Expressing something in the base SI units is in fact just dividing the results by the "SI constants" (m, kg, s) and making sure the results is a scalar. |

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.

In relativistic physics it's common to set hbar = c = 1. This relates meter to second and Joule to second.
Similarly k_b = 1.
I'd like to see support for this together with an explicit warning about the use of natural units.
Results could then be
1 ns -> m = 0.299792 m (assuming c=1)1 fm-> 1/GeV = 0.806554 GeV⁻¹ (assuming hbar=c=1)