Different answers between .radec() and .altaz() #894
-
I have recently started using Skyfield and it appears at first glance that the .radec() results do not agree with the .altaz() answer if I take the .altaz() answer and covert back to RA and Dec (or vice versa). PyEphem says the satellite is at these coordinates at this time: Skyfield outputs: A calculator with input of the Skyfield RA/Dec yeilds: My issue is that Pyephem and Skyfield agree on the Az/Alt. They do not agree on the RA/Dec. Furthermore, taking the Skyfield RA/Dec and converting to Alt/Az does not seem to yield the same answer. Is there some geometric term I need to take into account for the .radec() method? The relevant part of my code is below.
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
I don't think we can answer this without seeing your code that produced both numbers. Both PyEphem and Skyfield are capable of producing both J2000 coordinates, but also equinox-of-date coordinates, and there is additionally the question of apparent versus astrometric coordinates. If you made different choices in the two libraries, you would get slightly different angles.
To help Skyfield contributors dig deeper, try constructing a small stand-alone script that folks can run, that uses PyEphem and Skyfield to print out the two sets of coordinates that concern you, and maybe that then prints out how big the difference in coordinates is. Then folks will be able to see how big the difference is, and also will be able to reproduce the numbers on their own computers. |
Beta Was this translation helpful? Give feedback.
-
Thank you Brandon. I hope I can impose on your patience a little more. I still do not quite understand.
1. If I do not specify an epoch, do I understand correctly we are computing (propagating) for epoch.now() (or whatever the method)? It seems like from the below you are suggesting that if I put both pyephem and Skyfield at the same epoch- I will get answers that ae closer. I understand there will be differences (see #2 below). What is not clear to me is that why would specifying "2000" do this but letting them both be epoch.now would not? You say PyEphem usual system is not J2000... what is it?
2. My main concern was that by switching between RA/Dec and Alt/AZ I get different answers. If you covert the AZ/Alt propagated values to RA/Dec you do not get the propagated RA/Dec values. How could you? Both PyEphem and Skyfield agree on he Az/Alt but not the RA/Dec (which again, I get why that is true). What is special about Az/Alt?
I will modify my code and check it out shortly.
…-adam
On 08/24/2023 12:34 PM MST Brandon Rhodes ***@***.***> wrote:
Thank you for the example script, which made it easier to test some possibilities! (And also for the video; it was almost kind of startling, for the very first time ever, to hear one of my Skyfield users as an actual voice instead of simply text on a screen.)
The answer to your question is that you are asking for coordinates in two different RA/dec systems. The two are explained here (maybe you'll suggest a way to make this section even clearer for folks facing your situation):
https://rhodesmill.org/skyfield/coordinates.html#icrs-and-equatorial-right-ascension-and-declination
One RA/dec system is the J2000 (or, officially, "ICRS" system) which never moves and is permanent. It's not PyEphem's usual system, but you can print it out with:
ra_pyephem_decimal = math.degrees(float(sat.a_ra))
dec_pyephem_decimal = math.degrees(float(sat.a_dec))
You'll see that the results agree very well with Skyfield.
The other RA/dec system is based on the Earth's actual pole and equator as precession gradually skews the coordinate system across the sky over thousands of years. It's the one PyEphem is using in your script. To have Skyfield use the same system, try this:
ra , dec, _ = astrometric.radec(epoch='date')
Agreement doesn't look to be quite as high when both PyEphem and Skyfield are using this "equinox-of-date" system, but it's still closer than the difference between one system to the other. The discrepancy might simply be that PyEphem and Skyfield use different models of the Earth's precession and nutation.
Anyway, try these two adjustments, and see if you can confirm that Skyfield and PyEphem think the satellite is in just about the same place in the sky, but that they are naming that place differently in the two slightly different RA/dec coordinate systems.
—
Reply to this email directly, view it on GitHub #894 (reply in thread), or unsubscribe https://github.com/notifications/unsubscribe-auth/ALJOA7JBKJZSI5X5E3BRBC3XW6UFBANCNFSM6AAAAAA34FETMM.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
Thank you for the example script, which made it easier to test some possibilities! (And also for the video; it was almost kind of startling, for the very first time ever, to hear one of my Skyfield users as an actual voice instead of simply text on a screen.)
The answer to your question is that you are asking for coordinates in two different RA/dec systems. The two are explained here (maybe you'll suggest a way to make this section even clearer for folks facing your situation):
https://rhodesmill.org/skyfield/coordinates.html#icrs-and-equatorial-right-ascension-and-declination
One RA/dec system is the J2000 (or, officially, "ICRS" system) which never moves and is permanent. It's not PyEph…