使用 PyEphem 将地心坐标(方位角、高程)转换为赤道坐标(RA、Dec)
这看起来是一项非常基本的任务,但我无法解决。
PyEphem 文档:
http://rhodesmill.org/pyephem/radec.html
描述了如何执行反过来,从 Body
和 Observer
对象到视在地心位置,其中高度和方位角位于 .alt
中, .az
属性。
然而,我应该如何从仰角和方位角开始并获得 RA 和 Dec?
例如,这是一组坐标,我想在赤道参考系中获取赤道和赤道:
az = 3.30084818 #rad
el = 0.94610742 #rad
lat = 34.64 #deg
lon = -103.7 #deg
alt = 35800.26 #m
ut = 2455822.20000367 #julian date
谢谢!
This looks quite a basic task, but I cannot sort it out.
The PyEphem documentation:
http://rhodesmill.org/pyephem/radec.html
describes how to perform the conversion the other way around, from a Body
and an Observer
objects to Apparent Topocentric Position, with elevation and azimuth in the .alt
and .az
attributes.
However how should I, instead, start from Elevation and Azimuth and get RA and Dec?
For example here is one set of coordinates for which I'd like to get RA and Dec in Equatorial reference frame:
az = 3.30084818 #rad
el = 0.94610742 #rad
lat = 34.64 #deg
lon = -103.7 #deg
alt = 35800.26 #m
ut = 2455822.20000367 #julian date
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这里有两个微妙之处。首先,您碰巧使用“仰角”和“高度”来表示与 PyEphem 库中这两个术语的含义相反的含义 - 因此您将天空中的点称为“仰角/方位角”位置,而不是“高度”其次,PyEphem 似乎忘记提供一种简单的方法将日期从 Julian 转换为它自己的格式。
julian_date()
会走向另一个方向,我们必须自己做一些工作才能走向另一个方向,通过弄清楚ephem
的名字是什么。考虑到这些规定,我认为这个脚本可能会回答您的问题:
对于这个特定的观察,它产生的答案看起来正确吗?这是脚本为我打印的内容:
让我知道这对于这个特定的观察是否具有物理意义,或者如果其中一个数字错误并且仍然需要调整了!
There are two subtleties here. First, you have happened to use “elevation” and “altitude” to mean the opposite of what the two terms mean in the PyEphem library — so you are calling the spot in the sky its “elevation / azimuth" position instead of its “altitude / azimuth” position. Second, it appears that PyEphem has forgotten to provide an easy way to convert dates from Julian to its own format. While there is a function
julian_date()
that will go the other direction, we will have to do a bit of work ourselves to go the other direction by figuring out whatephem
's name is for.With those stipulations in mind, I think this script might answer your question:
Does the answer it produces look correct for this particular observation? Here is what the script prints for me:
Let me know if that makes physical sense for this particular observation, or if one of the numbers is wrong here and still needs to be tweaked!