DimensionfulAngles

📐 An extension of Unitful.jl to include angles as a dimension.

https://github.com/cmichelenstrofer/dimensionfulangles.jl

Science Score: 54.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
    Found 1 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (15.3%) to scientific vocabulary

Keywords

angle julia julia-language unitful units units-of-measure

Keywords from Contributors

tensors numeric state-management battery degoogle programming-language energy-systems factor-graph hack data-mining
Last synced: 4 months ago · JSON representation ·

Repository

📐 An extension of Unitful.jl to include angles as a dimension.

Basic Info
Statistics
  • Stars: 9
  • Watchers: 1
  • Forks: 5
  • Open Issues: 3
  • Releases: 6
Topics
angle julia julia-language unitful units units-of-measure
Created over 3 years ago · Last pushed over 1 year ago
Metadata Files
Readme License Citation

README.md

Project Status: Active – The project has reached a stable, usable state and is being actively developed. CI codecov deps dependencies

DimensionfulAngles.jl

Extends Unitful.jl to include angle as a dimension and allow dispatching on angles.

Installation ⚙

Install DimensionfulAngles.jl the usual way Julia packages are installed, i.e., using Julia package manager: ```julia using Pkg Pkg.add("DimensionfulAngles") ``` or in the Pkg REPL (enter from the Julia REPL with `]`): ```julia pkg> add DimensionfulAngles ```

Documentation 📜

Documentation of latest stable release. Documentation for the current code status in the <em>main</em> branch.

The full documentation can be found at https://cmichelenstrofer.github.io/DimensionfulAngles.jl.

Citing 📝

DOI of latest version

If you use this code for your research please consider citing:

Michelén Ströfer, C. A. (2022). DimensionfulAngles.jl (Version 0.1.0) [Computer software]. https://github.com/cmichelenstrofer/DimensionfulAngles.jl

BibTeX:


@software{Michelen_Strofer_DimensionfulAngles_jl_2022,
  author = {Michelén Ströfer, Carlos Alejandro},
  doi = {10.5281/zenodo.7500588},
  month = {12},
  title = {{DimensionfulAngles.jl}},
  url = {https://github.com/cmichelenstrofer/DimensionfulAngles.jl},
  version = {0.1.0},
  year = {2022}
}

Basic Usage

Use DimensionfulAngles.jl for units containing angles and Unitful.jl for all other units. The units in DimensionfulAngles.jl are differentiated from their dimensionless counterparts with a superscript . Simply add this superscript to any angle units to make it dimensionful. In Julia environments this can be typed as \^a<tab>.

```julia julia> using Unitful

julia> using DimensionfulAngles

julia> dimensionless_angle = 1u"rad"

1 rad

julia> dimensionful_angle = 1u"radᵃ" 1 rad

julia> typeof(dimensionless_angle) Quantity{Int64, NoDims, Unitful.FreeUnits{(rad,), NoDims, nothing}}

julia> typeof(dimensionful_angle) Quantity{Int64, 𝐀, Unitful.FreeUnits{(rad,), 𝐀, nothing}} ```

When defining quantities with units from DimensionfulAngles.jl you can use the ua string instead and omit the superscript . But when defining quantities with units from both it is more convenient to use the u string.

```julia julia> dimensionful_angle = 1ua"rad" 1 rad

julia> typeof(dimensionful_angle) Quantity{Int64, 𝐀, Unitful.FreeUnits{(rad,), 𝐀, nothing}}

julia> angular_velocity = 1.2u"radᵃ/s" 1.2 rad s⁻¹

julia> typeof(angular_velocity) Quantity{Float64, 𝐀 𝐓⁻¹, Unitful.FreeUnits{(rad, s⁻¹), 𝐀 𝐓⁻¹, nothing}} ```

A third alternative is to directly import only the units you will be using and renaming those from DimensionfulAngles.jl to remove the superscript .

```julia julia> using Unitful

julia> using Unitful: m, s, kg

julia> using DimensionfulAngles: radᵃ as rad, °ᵃ as °

julia> angular_velocity = 1.2rad / s 1.2 rad s⁻¹ ```

Default Symbols

Another way of doing this is to import all default units, which includes SI base and derived units from Unitful.jl with angle units from DimensionfulAngles.jl. This is done as

```julia julia> using DimensionfulAngles.DefaultSymbols

julia> angular_velocity = 1.2rad / s ```

Converting to/from Unitful.jl

To convert a quantity to or from Unitful.jl use the uconvert function with first argument either :Unitful or :DimensionfulAngles. For example:

```julia julia> using Unitful, DimensionfulAngles

julia> ω = 3.2u"radᵃ/s" 3.2 rad s⁻¹

julia> ω̄ = uconvert(:Unitful, ω) 3.2 rad s⁻¹

julia> dimension(ω) 𝐀 𝐓⁻¹

julia> dimension(ω̄) 𝐓⁻¹ ```

Contributing

All Contributors <!-- ALL-CONTRIBUTORS-BADGE:END -->

Contributions are welcome! 🎊 Please see the contribution guidelines for ways to contribute to the project.

Contributors ✨

Thanks goes to these wonderful people (emoji key):

Carlos A. Michelén Ströfer
Carlos A. Michelén Ströfer

💻 📖 ⚠️ 🤔
Sebastian Stock
Sebastian Stock

🤔
Kristoffer Carlsson
Kristoffer Carlsson

🚧
Daniel Boland
Daniel Boland

🤔 🐛 💻
devel-chm
devel-chm

📖
Ben Conrad
Ben Conrad

🚧

Acknowledgments

Some portions of this software are adapted from:

  • UnitfulAngles.jl: Copyright (c) 2017: Yakir Luc Gagnon.
  • UnitfulUS.jl: Copyright (c) 2017, California Institute of Technology. All rights reserved.

Owner

  • Name: Carlos A. Michelén Ströfer
  • Login: cmichelenstrofer
  • Kind: user
  • Location: Albuquerque, NM
  • Company: Sandia National Laboratories @sandialabs

🌊🌊 Marine renewable energy 🌊🌊, Software research engineer, Data-driven methods, Julia programming, Mathematics, Open-source, Open science, Inclusive STEM

Citation (CITATION.bib)

@software{Michelen_Strofer_DimensionfulAngles_jl_2022,
  author = {Michelén Ströfer, Carlos Alejandro},
  doi = {10.5281/zenodo.7500588},
  month = {12},
  title = {{DimensionfulAngles.jl}},
  url = {https://github.com/cmichelenstrofer/DimensionfulAngles.jl},
  version = {0.1.0},
  year = {2022}
}

GitHub Events

Total
Last Year

Committers

Last synced: 9 months ago

All Time
  • Total Commits: 88
  • Total Committers: 7
  • Avg Commits per committer: 12.571
  • Development Distribution Score (DDS): 0.091
Past Year
  • Commits: 1
  • Committers: 1
  • Avg Commits per committer: 1.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Carlos A. Michelén Ströfer c****l@s****v 80
allcontributors[bot] 4****] 2
Daniel Boland d****d@g****m 2
github-actions[bot] 4****] 1
devel-chm d****1@g****m 1
Kristoffer Carlsson k****9@g****m 1
Ben Conrad b****n 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 5 months ago

All Time
  • Total issues: 9
  • Total pull requests: 36
  • Average time to close issues: 3 months
  • Average time to close pull requests: 12 days
  • Total issue authors: 3
  • Total pull request authors: 7
  • Average comments per issue: 1.33
  • Average comments per pull request: 0.75
  • Merged pull requests: 30
  • Bot issues: 0
  • Bot pull requests: 12
Past Year
  • Issues: 0
  • Pull requests: 1
  • Average time to close issues: N/A
  • Average time to close pull requests: 1 minute
  • Issue authors: 0
  • Pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • cmichelenstrofer (7)
  • DanDeepPhase (1)
  • JuliaTagBot (1)
Pull Request Authors
  • cmichelenstrofer (20)
  • github-actions[bot] (6)
  • allcontributors[bot] (5)
  • DanDeepPhase (2)
  • KristofferC (1)
  • devel-chm (1)
Top Labels
Issue Labels
good first issue (4) tests (3) enhancement (3) help wanted (1) bug (1)
Pull Request Labels
formatting (6) automated pr (6) no changelog (6) documentation (1) enhancement (1)

Packages

  • Total packages: 1
  • Total downloads:
    • julia 12 total
  • Total dependent packages: 1
  • Total dependent repositories: 0
  • Total versions: 6
juliahub.com: DimensionfulAngles

📐 An extension of Unitful.jl to include angles as a dimension.

  • Versions: 6
  • Dependent Packages: 1
  • Dependent Repositories: 0
  • Downloads: 12 Total
Rankings
Dependent repos count: 9.9%
Forks count: 28.1%
Average: 30.5%
Dependent packages count: 38.9%
Stargazers count: 45.1%
Last synced: 5 months ago

Dependencies

.github/workflows/DocCleanup.yml actions
  • actions/checkout v2 composite
.github/workflows/Documentation.yml actions
  • actions/checkout v2 composite
  • codecov/codecov-action v1 composite
  • julia-actions/julia-processcoverage v1 composite
  • julia-actions/setup-julia v1 composite
.github/workflows/TagBot.yml actions
  • JuliaRegistries/TagBot v1 composite
.github/workflows/format_pr.yml actions
  • actions/checkout v2 composite
  • peter-evans/create-pull-request v3 composite
.github/workflows/CI.yml actions
  • actions/cache v3 composite
  • actions/checkout v3 composite
  • codecov/codecov-action v3 composite
  • julia-actions/julia-buildpkg v1 composite
  • julia-actions/julia-processcoverage v1 composite
  • julia-actions/julia-runtest v1 composite
  • julia-actions/setup-julia v1 composite
.github/workflows/CompatHelper.yml actions