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

Added Radioactivity #915

Closed
wants to merge 2 commits into from
Closed

Added Radioactivity #915

wants to merge 2 commits into from

Conversation

nforwood
Copy link

@nforwood nforwood commented Apr 8, 2021

The Si unit for radioactivity is the Becquerel (Bq) which is one disintegration per second. The non-SI unit is the Curie (Ci) where 1 Curie = 3.7e10 Becquerel

@codecov
Copy link

codecov bot commented Apr 8, 2021

Codecov Report

Merging #915 (ff93ffd) into master (a6615fd) will decrease coverage by 0.1%.
The diff coverage is 81.1%.

Impacted file tree graph

@@           Coverage Diff            @@
##           master    #915     +/-   ##
========================================
- Coverage    82.7%   82.7%   -0.0%     
========================================
  Files         291     293      +2     
  Lines       44038   44392    +354     
========================================
+ Hits        36418   36705    +287     
- Misses       7620    7687     +67     
Impacted Files Coverage Δ
UnitsNet/GeneratedCode/UnitAbbreviationsCache.g.cs 100.0% <ø> (ø)
UnitsNet/GeneratedCode/Quantity.g.cs 52.0% <50.0%> (-<0.1%) ⬇️
...itsNet/GeneratedCode/Quantities/Radioactivity.g.cs 80.4% <80.4%> (ø)
...GeneratedCode/NumberToRadioactivityExtensions.g.cs 100.0% <100.0%> (ø)
UnitsNet/GeneratedCode/UnitConverter.g.cs 100.0% <100.0%> (ø)

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 a6615fd...ff93ffd. Read the comment docs.

Copy link
Owner

@angularsen angularsen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, only a few minor comments!

"Abbreviations": [ "Bq" ]
},
{
"Culture": "en-AU",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

en-US is the default culture, so you can safely remove en-AU here since all the unit abbreviations are identical.

},
"FromUnitToBaseFunc": "x*3.7e10",
"FromBaseToUnitFunc": "x/3.7e10",
"Prefixes": [ "micro", "milli" ],
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For consistency, please start with a big letter in prefixes.

// Override properties in base class here
protected override double BecquerelsInOneBecquerel => 1;

protected override double CuriesInOneBecquerel => 2.702702702e-11;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stale
Copy link

stale bot commented Jun 9, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Jun 9, 2021
@stale stale bot closed this Jun 16, 2021
@piotrstenke piotrstenke mentioned this pull request Dec 28, 2023
angularsen pushed a commit that referenced this pull request Dec 28, 2023
Added Radioactivity (radioactive decay), along with three units: 
Bq - Becquerel (SI-derived)
Ci - Curie (non-SI)
Rd - Rutherford (non-SI)

The scope of prefixes is fairly wide (Pico- to Exa- for Becquerel ,
Pico- to Tera- for Curie and Rutherford) in order to support most common
scenarios, like measuring concentration of radioactive elements in a
substance (e.g. 10 Bq per m3 of air is considered normal), rate of
radioactive decay in electrical parts, Geiger counter scales, cosmic ray
interactions or even global inventory of specific radioactive elements
(per [Wikipedia](https://en.wikipedia.org/wiki/Becquerel#Examples)). It
does not, however, support prefixes for things like activity produced by
[nuclear explosions](https://books.google.pl/books?id=CJqcq2C792UC&pg=PA74&redir_esc=y#v=onepage&q=hiroshima&f=false)
(values beyond 10^24 Bq), since this seems too niche even for C# devs.

Similar PR was already created a quople years back
(#915), but it was never
actually merged.

---------

Co-authored-by: Piotr Stenke <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants