Skip to content

Commit 2d00d20

Browse files
authored
Merge pull request #224 from astro-group-bristol/fergus/cleanup
Remove Voronoi tessellation code
2 parents f862f2e + 807864f commit 2d00d20

File tree

10 files changed

+17
-323
lines changed

10 files changed

+17
-323
lines changed

Project.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ SimpleNonlinearSolve = "727e6d20-b764-4bd8-a329-72de5adea6c7"
2727
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
2828
Symbolics = "0c5d862f-8b57-4792-8d23-62f2024744c7"
2929
Tullio = "bc48ee85-29a4-5162-ae0b-a64e1601d4bc"
30-
VoronoiCells = "e3e34ffb-84e9-5012-9490-92c94d0c60a4"
3130

3231
[weakdeps]
3332
DiffEqGPU = "071ae1c0-96b5-11e9-1965-c90190d839ea"

docs/src/emissivity.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,6 @@ sample_position_velocity
5555
RadialDiscProfile
5656
```
5757

58-
## Voronoi disc profile
59-
60-
```@docs
61-
VoronoiDiscProfile
62-
```
63-
6458
## Emissivity profile algorithms
6559

6660
In this case, we must be careful to weight the emissivity accordingly:

src/Gradus.jl

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ using DiffEqCallbacks
1414
using StaticArrays
1515
using Optim
1616
using DataInterpolations
17-
using VoronoiCells
1817
using Roots
1918
import SimpleNonlinearSolve
2019
using ProgressMeter
@@ -338,10 +337,23 @@ end
338337
"""
339338
AbstractDiscProfile
340339
341-
Abstract type for binning structures over discs (e.g., radial bins, voronoi).
340+
Abstract type for binning structures over discs.
342341
"""
343342
abstract type AbstractDiscProfile end
344343

344+
emissivity_at(prof::AbstractDiscProfile, ::AbstractGeodesicPoint) =
345+
error("Not implemented for $(typeof(prof))")
346+
347+
coordtime_at(prof::AbstractDiscProfile, ::AbstractGeodesicPoint) =
348+
error("Not implemented for $(typeof(prof))")
349+
350+
emissivity_at(prof::AbstractDiscProfile, v::AbstractArray) =
351+
map(i -> emissivity_at(prof, i), v)
352+
coordtime_at(prof::AbstractDiscProfile, v::AbstractArray) =
353+
map(i -> coordtime_at(prof, i), v)
354+
355+
export emissivity_at, coordtime_at
356+
345357
"""
346358
abstract type AbstractCoronaModel{T}
347359
@@ -494,7 +506,8 @@ include("transfer-functions/integration.jl")
494506

495507
include("corona/samplers.jl")
496508
include("corona/corona-models.jl")
497-
include("corona/disc-profiles.jl")
509+
include("corona/radial.jl")
510+
include("corona/analytic.jl")
498511
# needs the types from disc profiles so defer include
499512
include("transfer-functions/transfer-functions-2d.jl")
500513
include("corona/flux-calculations.jl")

src/corona/disc-profiles.jl

Lines changed: 0 additions & 16 deletions
This file was deleted.

src/corona/emissivity.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ local to global coordinates.
128128
This function assumes axis symmetry, and therefore always interpolates the
129129
emissivity as a function of the radial coordinate on the disc. If non-symmetric
130130
profiles are desired, consider using [`tracecorona`](@ref) with a profile
131-
constructor, e.g. [`VoronoiDiscProfile`](@ref).
131+
constructor.
132132
"""
133133
function emissivity_profile(
134134
m::AbstractMetric{T},

src/corona/flux-calculations.jl

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -111,14 +111,4 @@ function energy_ratio(m::AbstractMetric, gp::GeodesicPoint, v_src, v_disc)
111111
e_src / e_disc
112112
end
113113

114-
function flux_source_to_disc(
115-
m::AbstractMetric,
116-
model::AbstractCoronaModel,
117-
vdp::VoronoiDiscProfile;
118-
kwargs...,
119-
)
120-
areas = getareas(vdp)
121-
flux_source_to_disc(m, model, vdp.geodesic_points, areas; kwargs...)
122-
end
123-
124114
export flux_source_to_disc

src/corona/profiles/voronoi.jl

Lines changed: 0 additions & 234 deletions
This file was deleted.

test/smoke-tests/disc-profiles.jl

Lines changed: 0 additions & 52 deletions
This file was deleted.

0 commit comments

Comments
 (0)