Skip to content

Commit 2d8b215

Browse files
authored
chore: remove unused StaticArrays dependency (#8)
1 parent ac85cf8 commit 2d8b215

File tree

6 files changed

+22
-16
lines changed

6 files changed

+22
-16
lines changed

.github/workflows/documentation.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,7 @@ jobs:
2727
runs-on: ubuntu-latest
2828
steps:
2929
- uses: extractions/setup-just@v3
30+
- name: Install LibAACGM.jl
31+
run: just install && just install_lib docs
3032
- name: Build and deploy Documenter.jl docs
3133
uses: JuliaSpacePhysics/actions/DocsDocumenter@main

Project.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ LazyArrays = "5078a376-72f3-5289-bfd5-ec5146d43c02"
1212
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
1313
PrecompileTools = "aea7be01-6a6a-4083-8856-8a6e6704d82a"
1414
SphericalHarmonics = "c489a379-e885-57ff-9236-bd896d33c250"
15-
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
1615
Tullio = "bc48ee85-29a4-5162-ae0b-a64e1601d4bc"
1716

1817
[compat]
@@ -24,6 +23,5 @@ LazyArrays = "2.6"
2423
LinearAlgebra = "1"
2524
PrecompileTools = "1.2"
2625
SphericalHarmonics = "0.1.19"
27-
StaticArrays = "1"
2826
Tullio = "0.3"
2927
julia = "1.10"

README.md

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,19 @@
11
# GeoAACGM
22

3-
[![Documentation](https://img.shields.io/badge/docs-dev-blue.svg)](https://juliaspacephysics.github.io/GeoAACGM.jl)
3+
[![DOI](https://zenodo.org/badge/992753544.svg)](https://doi.org/10.5281/zenodo.15588522)
44

55
[![Build Status](https://github.com/JuliaSpacePhysics/GeoAACGM.jl/actions/workflows/CI.yml/badge.svg?branch=main)](https://github.com/JuliaSpacePhysics/GeoAACGM.jl/actions/workflows/CI.yml?query=branch%3Amain)
66
[![](https://img.shields.io/badge/%F0%9F%9B%A9%EF%B8%8F_tested_with-JET.jl-233f9a)](https://github.com/aviatesk/JET.jl)
77
[![Aqua QA](https://raw.githubusercontent.com/JuliaTesting/Aqua.jl/master/badge.svg)](https://github.com/JuliaTesting/Aqua.jl)
88
[![Coverage](https://codecov.io/gh/JuliaSpacePhysics/GeoAACGM.jl/branch/main/graph/badge.svg)](https://codecov.io/gh/JuliaSpacePhysics/GeoAACGM.jl)
99

10-
[![DOI](https://zenodo.org/badge/992753544.svg)](https://doi.org/10.5281/zenodo.15588522)
11-
1210
A pure Julia implementation of the Altitude-Adjusted Corrected Geomagnetic (AACGM) coordinate system. Fast and accurate.
1311

14-
A Julia wrapper `LibAACGM` for the AACGM-v2 C library is also available in the [`LibAACGM`](./LibAACGM) directory, mainly used for testing and benchmarking.
12+
A Julia wrapper `LibAACGM` for the [AACGM-v2 C library](https://superdarn.thayer.dartmouth.edu/aacgm.html) is also available in the [`LibAACGM`](./LibAACGM) directory, mainly used for testing and benchmarking.
1513

16-
## Installation
14+
**Installation**: at the Julia REPL, run `using Pkg; Pkg.add("LibAACGM")`
1715

18-
```julia
19-
using Pkg
20-
Pkg.add("GeoAACGM")
21-
```
16+
**Documentation**: [![Documentation](https://img.shields.io/badge/docs-dev-blue.svg?logo=julia)](https://juliaspacephysics.github.io/GeoAACGM.jl)
2217

2318
## Usage
2419

notes.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
## Performance
2+
3+
`@tullio 𝐫[i] = Yₗₘ[k] * coefs[k, i, j] * alt_powers[j] threads = false` is much faster than something like
4+
5+
```julia
6+
x, y, z = ntuple(3) do i
7+
sum(1:N) do k
8+
sum(1:5) do j
9+
Yₗₘ[k] * coefs[k, i, j] * alt_powers[j]
10+
end
11+
end
12+
end
13+
```

src/GeoAACGM.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ using Dates: AbstractTime
4646
using Dictionaries: dictionary
4747
using LinearAlgebra
4848
using FixedSizeArrays
49-
using StaticArrays: MVector
49+
using Bumper
5050
using Tullio: @tullio
5151
using LazyArrays
5252

src/cotrans.jl

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
using Bumper
2-
31
function check_height(height)
42
height < 0 && @warn "Coordinate transformations are not intended for altitudes < 0 km: $height"
53
height > MAXALT && @error "Coefficients are not valid for altitudes above $MAXALT km: $height"
@@ -29,7 +27,7 @@ function geoc2aacgm(lat, lon, height, coefs = geo2aacgm_coefs[]; order = nothing
2927

3028
x, y, z = @no_escape begin
3129
𝐫 = @alloc(T, 3)
32-
@tullio 𝐫[i] = Yₗₘ[k] * coefs[k, i, j] * alt_powers[j]
30+
@tullio 𝐫[i] = Yₗₘ[k] * coefs[k, i, j] * alt_powers[j] threads = false
3331
𝐫[1], 𝐫[2], 𝐫[3]
3432
end
3533

@@ -97,7 +95,7 @@ function aacgm2geoc(mlat, mlon, r, coefs = aacgm2geo_coefs[]; order = nothing)
9795

9896
x, y, z = @no_escape begin
9997
𝐫 = @alloc(T, 3)
100-
@tullio 𝐫[i] = Yₗₘ[k] * coefs[k, i, j] * alt_powers[j]
98+
@tullio 𝐫[i] = Yₗₘ[k] * coefs[k, i, j] * alt_powers[j] threads = false
10199
normalize!(𝐫)
102100
𝐫[1], 𝐫[2], 𝐫[3]
103101
end

0 commit comments

Comments
 (0)