Skip to content

Commit

Permalink
Add radiation exposure (#1348)
Browse files Browse the repository at this point in the history
Added radiation exposure along with two units - Coulomb per kilogram
(SI-based) and Roentgen.

Coulombs per kilogram come with four prefixes (pico, nano, micro and
milli), which is two less (with kilo and mega missing) than the
definition of Coulomb itself in ElectricCharge.json. This is due to the
fact that C/kg is quite large and there are not many practical usecases
for anything beyond than that.

Roentgens come with two prefixes (milli and micro). Most often than not,
Roentgens are used 'as is', without prefixes, e.g. in case of the famous
20000R/h during Chernobyl disaster, but in some sources milli and micro
are also used (example articles below).

https://www.epa.gov/radnet/about-exposure-and-dose-rates
https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7155967/

Wikipedia pages:

https://en.wikipedia.org/wiki/Radiation_exposure
https://en.wikipedia.org/wiki/Roentgen_(unit)

---------

Co-authored-by: Piotr Stenke <[email protected]>
  • Loading branch information
piotrstenke and Piotr Stenke authored Jan 2, 2024
1 parent c712490 commit efc6317
Show file tree
Hide file tree
Showing 17 changed files with 2,623 additions and 0 deletions.
49 changes: 49 additions & 0 deletions Common/UnitDefinitions/RadiationExposure.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"Name": "RadiationExposure",
"BaseUnit": "CoulombPerKilogram",
"XmlDocSummary": "Radiation exposure is a measure of the ionization of air due to ionizing radiation from photons.",
"XmlDocsRemarks": "https://en.wikipedia.org/wiki/Radiation_exposure",
"BaseDimensions": {
"M": -1,
"T": 1,
"I": 1
},
"Units": [
{
"SingularName": "CoulombPerKilogram",
"PluralName": "CoulombsPerKilogram",
"FromUnitToBaseFunc": "{x}",
"FromBaseToUnitFunc": "{x}",
"BaseUnits": {
"M": "Kilogram",
"T": "Second",
"I": "Ampere"
},
"Prefixes": [ "Pico", "Nano", "Micro", "Milli" ],
"Localization": [
{
"Culture": "en-US",
"Abbreviations": [ "C/kg" ]
}
]
},
{
"SingularName": "Roentgen",
"PluralName": "Roentgens",
"FromUnitToBaseFunc": "{x} * 2.58e-4",
"FromBaseToUnitFunc": "{x} / 2.58e-4",
"Prefixes": [ "Micro", "Milli" ],
"BaseUnits": {
"M": "Kilogram",
"T": "Second",
"I": "Ampere"
},
"Localization": [
{
"Culture": "en-US",
"Abbreviations": [ "R" ]
}
]
}
]
}
10 changes: 10 additions & 0 deletions Common/UnitEnumValues.g.json
Original file line number Diff line number Diff line change
Expand Up @@ -1825,5 +1825,15 @@
"Picobecquerel": 36,
"Picocurie": 35,
"Picorutherford": 25
},
"RadiationExposure": {
"CoulombPerKilogram": 10,
"MicrocoulombPerKilogram": 3,
"MillicoulombPerKilogram": 2,
"NanocoulombPerKilogram": 6,
"PicocoulombPerKilogram": 5,
"Roentgen": 4,
"Microroentgen": 12,
"Milliroentgen": 13
}
}
250 changes: 250 additions & 0 deletions UnitsNet.NanoFramework/GeneratedCode/Quantities/RadiationExposure.g.cs

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>{69b383c7-828a-1857-cbe2-f11b9ba77320}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<FileAlignment>512</FileAlignment>
<RootNamespace>UnitsNet</RootNamespace>
<AssemblyName>UnitsNet.RadiationExposure</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\RadiationExposure.g.cs" />
<Compile Include="..\Units\RadiationExposureUnit.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.RadiationExposure</id>
<version>5.41.0</version>
<title>Units.NET RadiationExposure - 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 RadiationExposure 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 ([email protected]).</copyright>
<language>en-US</language>
<tags>nanoframework radiationexposure 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\RadiationExposure\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 efc6317

Please sign in to comment.