Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add AltAzCoords #40

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Added observation planning example
  • Loading branch information
kiranshila committed Nov 7, 2021
commit 8ca2cf81cf579366f764472bfbe571f24b315509
22 changes: 22 additions & 0 deletions examples/observation_planning.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
using SkyCoords, AstroTime, AstroAngles, AstroLib

# First we create the instance of the object in the sky we want to observe
M13 = ICRSCoords(250.423475 |> deg2rad, 36.4613194 |> deg2rad)

# Then we define the observation time and location
# We will use the top of Mount Wilson at 4AM UTC at Nov 8, 2021 which corresponds
# to 8PM the night before local time
mt_wilson = Observatory("Mount Wilson",32.2264,-118.0642,1693.25,-8)
time = from_utc("2021-11-08T04:00")
# We will need the julian date for the conversions, which we can do now
jd = julian(time) |> value

# Now we perform the conversion
altaz = AltAzCoords(M13,jd,mt_wilson)

# We may want to see this result in degrees, which is easy with rad2deg
# For this result, M13 is visible at an elevation of 12 degrees off the horizon
# and at a (true north) compass heading of 305.8, which is WNW.

# FIXME plot over time
# This is a few tenths of a degree off the astropy solution - why the difference?
Loading