DimensionfulAngles
📐 An extension of Unitful.jl to include angles as a dimension.
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
Keywords from Contributors
Repository
📐 An extension of Unitful.jl to include angles as a dimension.
Basic Info
- Host: GitHub
- Owner: cmichelenstrofer
- License: mit
- Language: Julia
- Default Branch: main
- Homepage: https://cmichelenstrofer.github.io/DimensionfulAngles.jl/stable
- Size: 784 KB
Statistics
- Stars: 9
- Watchers: 1
- Forks: 5
- Open Issues: 3
- Releases: 6
Topics
Metadata Files
README.md
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 📜
The full documentation can be found at https://cmichelenstrofer.github.io/DimensionfulAngles.jl.
Citing 📝
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-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 💻 📖 ⚠️ 🤔 |
Sebastian Stock 🤔 |
Kristoffer Carlsson 🚧 |
Daniel Boland 🤔 🐛 💻 |
devel-chm 📖 |
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
- Repositories: 45
- Profile: https://github.com/cmichelenstrofer
🌊🌊 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
Top Committers
| Name | 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
Pull Request Labels
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.
- Homepage: https://cmichelenstrofer.github.io/DimensionfulAngles.jl/stable
- Documentation: https://docs.juliahub.com/General/DimensionfulAngles/stable/
- License: MIT
-
Latest release: 0.2.1
published over 1 year ago
Rankings
Dependencies
- actions/checkout v2 composite
- actions/checkout v2 composite
- codecov/codecov-action v1 composite
- julia-actions/julia-processcoverage v1 composite
- julia-actions/setup-julia v1 composite
- JuliaRegistries/TagBot v1 composite
- actions/checkout v2 composite
- peter-evans/create-pull-request v3 composite
- 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