Skip to content
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

Add molar unit #258

Merged
merged 1 commit into from
Jul 28, 2019
Merged

Add molar unit #258

merged 1 commit into from
Jul 28, 2019

Conversation

jlumpe
Copy link
Contributor

@jlumpe jlumpe commented Jul 22, 2019

This is a really important one in chemistry and biology, I feel it should be included by default (especially since molarity is already included as a derived dimension).

@ajkeller34
Copy link
Collaborator

I agree and I'm happy to include this, but Molar has to be defined after Liter given the definition. I'll merge this once you make that change.

@codecov-io
Copy link

Codecov Report

Merging #258 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #258   +/-   ##
=======================================
  Coverage   78.43%   78.43%           
=======================================
  Files          15       15           
  Lines        1071     1071           
=======================================
  Hits          840      840           
  Misses        231      231
Impacted Files Coverage Δ
src/pkgdefaults.jl 21.27% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e13a115...754a0a4. Read the comment docs.

@jlumpe
Copy link
Contributor Author

jlumpe commented Jul 24, 2019

Oops, fixed. I don't know if there are any tests I should incorporate it into, I didn't see any.

I'm also interested in adding a "count" unit with dimension 𝐍 which is equal to 1/6.022e23 of a mole, but I'm not really sure what its proper name or symbol should be. This would be very useful for converting from bulk (per mole) measurements to measurements per particle, like grams -> Daltons or in my case converting from concentration in a small volume like a cell to the actual number of molecules.

@ajkeller34 ajkeller34 merged commit 625db2c into PainterQubits:master Jul 28, 2019
@ajkeller34
Copy link
Collaborator

Thanks for the PR. I'm hesitant to include a unit that doesn't have an established name or symbol, though I can see the utility. Of course you can easily define units in your own packages.

@erlebach
Copy link

I tried the following with Unitful installed:

julia> 1u"ml" / 1u"L"
1.0 mL L

I am surprised that you do not convert all units to SI and then the results would have been 10^{-3}. What is the rationale for not doing so? Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants