Skip to content

Commit

Permalink
remove SimpleOrbit recipe for now
Browse files Browse the repository at this point in the history
  • Loading branch information
mileslucas committed Sep 24, 2022
1 parent 09f52da commit 10f223c
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions src/plots.jl
Original file line number Diff line number Diff line change
Expand Up @@ -28,28 +28,3 @@ using RecipesBase

return xs, ys
end

@recipe function f(orbit::SimpleOrbit; N = 90)
# We almost always want to see spatial coordinates with equal step sizes
aspect_ratio --> 1
# And we almost always want to reverse the RA coordinate to match how we
# see it in the sky.
xflip --> true
xguide --> "Δx"
yguide --> "Δy"

# We trace out in equal steps of true anomaly instead of time for a smooth
# curve, regardless of eccentricity.
νs = range(-π, π; length = N)
pos = @. _position(orbit, -orbit.aR_star, sin(νs), cos(νs))

xs = map(p -> p[1], pos)
ys = map(p -> p[2], pos)

if !isnothing(distance)
xs = @. xs / distance |> u"arcsecond"
ys = @. ys / distance |> u"arcsecond"
end

return xs, ys
end

0 comments on commit 10f223c

Please sign in to comment.