JuliaAstro / SkyCoords.jl

Astronomical coordinate systems in Julia
https://juliaastro.github.io/SkyCoords.jl/stable
Other
26 stars 13 forks source link

switch to using Rotations.jl #48

Closed mileslucas closed 1 year ago

mileslucas commented 1 year ago

Rotations.jl provides StaticArrays-backed rotation matrices that we can use here instead of rolling our own. Rotaitons.jl also has some things that could be nice in the future, such as derivatives and other complex rotation matrix parameterizations.

This is mostly a lateral move- we add a dependency but make this code simpler. Rotations is stable and I've used in many other projects without any issues. Speed is equal or improved (precess_from_j2000 got ~25ns faster on my machine).

I've also switched to using begin for index-agnostic methods.

codecov[bot] commented 1 year ago

Codecov Report

Base: 91.17% // Head: 90.47% // Decreases project coverage by -0.71% :warning:

Coverage data is based on head (aa2d776) compared to base (07653d1). Patch coverage: 92.30% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #48 +/- ## ========================================== - Coverage 91.17% 90.47% -0.71% ========================================== Files 3 3 Lines 136 126 -10 ========================================== - Hits 124 114 -10 Misses 12 12 ``` | [Impacted Files](https://codecov.io/gh/JuliaAstro/SkyCoords.jl/pull/48?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaAstro) | Coverage Δ | | |---|---|---| | [src/cartesian.jl](https://codecov.io/gh/JuliaAstro/SkyCoords.jl/pull/48?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaAstro#diff-c3JjL2NhcnRlc2lhbi5qbA==) | `88.88% <0.00%> (ø)` | | | [src/SkyCoords.jl](https://codecov.io/gh/JuliaAstro/SkyCoords.jl/pull/48?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaAstro#diff-c3JjL1NreUNvb3Jkcy5qbA==) | `98.68% <100.00%> (-0.16%)` | :arrow_down: | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaAstro). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaAstro)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

mileslucas commented 1 year ago

Ah, thanks for the comments, they all look good, I'll get those addressed this weekend in a new PR.