SkyCoords.jl
SkyCoords.jl copied to clipboard
Add AltAzCoords
This is very WIP, but conversion from AltAz to ICRS mostly works. Before I get too deep in the weeds with this, I think there are a ton of questions that need to be answered.
The whole concept of a local coordinate system gets entangled with location and time. I'm going to assume we'll want to use AstroTime for the time component, but I guess we can use anything that we can compute sidereal time with. In that same vain, where should we keep those conversions to sidereal time? Do we pull in AstroLib and use ct2lst? Then the question is how much flexibility do we want for the location info? All we need is latitude and longitude, so I suppose we could keep those as floats and not bring in any external dependency. However, packages like Geodesy have some nice conversion between other ellipsoid models and coordinate systems.
Then the big question is, how do we tie together the conversions? Having AltAz in the mix means that it can't be as simple as convert(::Type{T},c::S)... because we need the additional information of time and location. Those could live in the definition of AltAzCoords, but I wasn't sure if that made the most sense.
Lots of things to consider here - there is still a lot for me to work on here, but I thought I'd open the draft PR to get the conversation rolling.
Also this will fix #19 and #35
Codecov Report
:exclamation: No coverage uploaded for pull request base (
master@10cc6dc). Click here to learn what that means. The diff coverage is0.00%.
@@ Coverage Diff @@
## master #40 +/- ##
=========================================
Coverage ? 83.03%
=========================================
Files ? 2
Lines ? 112
Branches ? 0
=========================================
Hits ? 93
Misses ? 19
Partials ? 0
| Impacted Files | Coverage Δ | |
|---|---|---|
| src/SkyCoords.jl | 80.00% <0.00%> (ø) |
|
| src/types.jl | 95.45% <0.00%> (ø) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update 10cc6dc...8ca2cf8. Read the comment docs.
More thoughts w.r.t which libraries to pull in: I think bringing in AstroLib makes the most sense? That takes care of both sidereal time and location with Observatory, then the conversion functions only need julian day, which could externally be converted from UT1 or whatever with AstroTime
In the long term I'd like to get rid of AstroLib.jl :slightly_smiling_face: I'd be happy to move routines from there to here, if they make more sense, and use a more Julia-like interface.
I added an example to show a potential use case
Note that there was a Google Summer of Code (GSoC) proposal to implement the Naval Observatory Vector Astrometry Software (NOVAS) library in Julia. However, it was never implemented. NOVAS has much of the functionality that you are looking for. I finally have some free time in the next couple of months, so was planning to begin slowly working on NOVAS.jl. I think we should consider how to incorporate into the mix.
I'm currently working on https://github.com/kiranshila/NOVAS.jl as @barrettp suggested to provide the transformation routines instead of the napkin math used here. IIRC NOVAS will have all of the transformations (including all the strange atmospheric stuff as well as gravitational effects). If we want, once NOVAS.jl is done, SkyCoords could serve as a high-level wrapper around the conversion routines from NOVAS.
Kiran,
Do you mind if I contribute to this code? I had started my own version six months ago and now have some time to start working on it again. I feel obligated.
-- Paul
On Wed, Nov 10, 2021 at 8:01 PM Kiran Shila @.***> wrote:
I'm currently working on https://github.com/kiranshila/NOVAS.jl as @barrettp https://github.com/barrettp suggested to provide the transformation routines instead of the napkin math used here. IIRC NOVAS will have all of the transformations (including all the strange atmospheric stuff as well as gravitational effects). If we want, once NOVAS.jl is done, SkyCoords could serve as a high-level wrapper around the conversion routines from NOVAS.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/JuliaAstro/SkyCoords.jl/pull/40#issuecomment-965898616, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEPMRWXW2M46RFXNIKC7ODULMIWNANCNFSM5HREMWTA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
@barrettp Not at all! I was looking to see if you had the repo published already that I could help on but couldn't find it. Right now, I'm trying to get sidereal_time working. The function e_tilt is where things seem to get hairy.