Skip to content

Commit

Permalink
Add radiation equivalent dose (angularsen#1352)
Browse files Browse the repository at this point in the history
Added radiation equivalent dose and its two units - Sievert (SI-derived)
and Roentgen equivalent man (or, simply, rem).

Sievert comes with three prefixes - milli, micro, nano. This will
support 99% of usecases, ranging from radiation caused by Earth itself
(~6 to 83nSv/h, per this
[article](https://www.epa.gov/radnet/about-exposure-and-dose-rates)),
[eating bananas](https://en.wikipedia.org/wiki/Banana_equivalent_dose)
(yep, that's a real unit), X-rays or tomography scans, as well as
measuring health risk of radiation-induced cancer and radiation
sickness.

Roentgen equivalent man is mostly used in the US, and it can be easily
converted to sieverts (1 sievert = 100 rems). It includes only one
prefix - milli - as I did not find any sources with other prefixes being
used.

Wikipedia pages:

https://en.wikipedia.org/wiki/Equivalent_dose
https://en.wikipedia.org/wiki/Sievert
https://en.wikipedia.org/wiki/Roentgen_equivalent_man
https://en.wikipedia.org/wiki/Orders_of_magnitude_(radiation)

---------

Co-authored-by: Piotr Stenke <piotr.stenke@nexpertis.pl>
  • Loading branch information
piotrstenke and Piotr Stenke authored Feb 17, 2024
1 parent 85aec1b commit 3b74e19
Show file tree
Hide file tree
Showing 18 changed files with 2,561 additions and 0 deletions.
48 changes: 48 additions & 0 deletions Common/UnitDefinitions/RadiationEquivalentDose.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"Name": "RadiationEquivalentDose",
"BaseUnit": "Sievert",
"XmlDocSummary": "Equivalent dose is a dose quantity representing the stochastic health effects of low levels of ionizing radiation on the human body which represents the probability of radiation-induced cancer and genetic damage.",
"XmlDocsRemarks": "https://en.wikipedia.org/wiki/Equivalent_dose",
"BaseDimensions": {
"L": 2,
"T": -2
},
"Units": [
{
"SingularName": "Sievert",
"PluralName": "Sieverts",
"FromUnitToBaseFunc": "{x}",
"FromBaseToUnitFunc": "{x}",
"BaseUnits": {
"L": "Meter",
"T": "Second"
},
"Prefixes": [ "Nano", "Micro", "Milli" ],
"XmlDocSummary": "The sievert is a unit in the International System of Units (SI) intended to represent the stochastic health risk of ionizing radiation, which is defined as the probability of causing radiation-induced cancer and genetic damage.",
"XmlDocRemarks": "https://en.wikipedia.org/wiki/Sievert",
"Localization": [
{
"Culture": "en-US",
"Abbreviations": [ "Sv" ]
},
{
"Culture": "ru-RU",
"Abbreviations": [ "Зв" ]
}
]
},
{
"SingularName": "RoentgenEquivalentMan",
"PluralName": "RoentgensEquivalentMan",
"FromUnitToBaseFunc": "{x} / 100",
"FromBaseToUnitFunc": "{x} * 100",
"Prefixes": [ "Milli" ],
"Localization": [
{
"Culture": "en-US",
"Abbreviations": [ "rem" ]
}
]
}
]
}
10 changes: 10 additions & 0 deletions Common/UnitEnumValues.g.json
Original file line number Diff line number Diff line change
Expand Up @@ -1845,5 +1845,15 @@
"Roentgen": 4,
"Microroentgen": 12,
"Milliroentgen": 13
},
"RadiationEquivalentDose": {
"Microsievert": 1,
"MilliroentgenEquivalentMan": 2,
"Millisievert": 7,
"Nanosievert": 5,
"RoentgenEquivalentMan": 4,
"Sievert": 9,
"Kilosievert": 3,
"Megasievert": 6
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
<NanoFrameworkProjectSystemPath>$(MSBuildExtensionsPath)\nanoFramework\v1.0\</NanoFrameworkProjectSystemPath>
</PropertyGroup>
<Import Project="$(NanoFrameworkProjectSystemPath)NFProjectSystem.Default.props" Condition="Exists('$(NanoFrameworkProjectSystemPath)NFProjectSystem.Default.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectTypeGuids>{11A8DD76-328B-46DF-9F39-F559912D0360};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<ProjectGuid>{dcdccf04-c930-b455-77a4-d9d4a7df8723}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<FileAlignment>512</FileAlignment>
<RootNamespace>UnitsNet</RootNamespace>
<AssemblyName>UnitsNet.RadiationEquivalentDose</AssemblyName>
<TargetFrameworkVersion>v1.0</TargetFrameworkVersion>
<DocumentationFile>bin\$(Configuration)\$(AssemblyName).xml</DocumentationFile>
</PropertyGroup>
<Import Project="$(NanoFrameworkProjectSystemPath)NFProjectSystem.props" Condition="Exists('$(NanoFrameworkProjectSystemPath)NFProjectSystem.props')" />
<ItemGroup>
<Compile Include="..\Quantities\RadiationEquivalentDose.g.cs" />
<Compile Include="..\Units\RadiationEquivalentDoseUnit.g.cs" />
<Compile Include="..\Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<Reference Include="mscorlib, Version=1.15.6.0, Culture=neutral, PublicKeyToken=c07d481e9758c731">
<HintPath>..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll</HintPath>
<Private>True</Private>
<SpecificVersion>True</SpecificVersion>
</Reference>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(NanoFrameworkProjectSystemPath)NFProjectSystem.CSharp.targets" Condition="Exists('$(NanoFrameworkProjectSystemPath)NFProjectSystem.CSharp.targets')" />
<ProjectExtensions>
<ProjectCapabilities>
<ProjectConfigurationsDeclaredAsItems />
</ProjectCapabilities>
</ProjectExtensions>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
<metadata>
<id>UnitsNet.nanoFramework.RadiationEquivalentDose</id>
<version>5.42.0</version>
<title>Units.NET RadiationEquivalentDose - nanoFramework</title>
<authors>Andreas Gullberg Larsen,nanoframework</authors>
<owners>UnitsNet</owners>
<license type="expression">MIT</license>
<projectUrl>https://github.com/angularsen/UnitsNet</projectUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>Adds RadiationEquivalentDose units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead.</description>
<iconUrl>https://raw.githubusercontent.com/angularsen/UnitsNet/ce85185429be345d77eb2ce09c99d59cc9ab8aed/Docs/Images/logo-32.png</iconUrl>
<releaseNotes>
</releaseNotes>
<copyright>Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com).</copyright>
<language>en-US</language>
<tags>nanoframework radiationequivalentdose unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable</tags>
<dependencies>
<dependency id="nanoFramework.CoreLibrary" version="1.15.5" />
</dependencies>
</metadata>
<files>
<file src="..\..\..\Artifacts\UnitsNet.NanoFramework\RadiationEquivalentDose\UnitsNet.*" target="lib" />
</files>
</package>
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="nanoFramework.CoreLibrary" version="1.15.5" targetFramework="netnanoframework10" />
</packages>
Loading

0 comments on commit 3b74e19

Please sign in to comment.