简体   繁体   中英

How do I get a PyEphem observer's meridian in “epoch of date” coordinates?

I'm trying to determine the apparent right ascension of the an observer's meridian in the context of right ascension ephemerides that I'm getting for the observer using PyEpehm 's Observer class. I understand that the latter will be provided in "epoch of date" coordinates, but don't know how to get the meridian's right ascension for the observer in those coordinates.

I assume that sidereal_time will give me what I'm looking for

import ephem
import numpy

zone1 = ephem.city('London')
zone1.date = '2014/08/04 11:00:00'
meridian = zone1.sidereal_time()

but am not sure what epoch the resulting coordinates are in.

How do I get a PyEphem observer's meridian in "epoch of date" coordinates?

Per its definition (at least as I understand it!), the sidereal time is necessarily a relationship between two epoch-of-date coordinates: the equinox point of that date, and the point where the observe is located on the Earth's surface.

We can check this by choosing a point on the meridian — say, the point at 0° latitude where it crosses the celestial equator — and ask PyEphem, using its slightly awkward interface, what the RA of that point is for the moment that you are asking about:

import ephem
zone1 = ephem.city('London')
zone1.date = '2014/08/04 11:00:00'
zone1.pressure = 0.0
meridian = zone1.sidereal_time()
print 'Hour angle:', meridian
print

overhead = ephem.degrees('90:00')
south = ephem.degrees('180:00')

zone1.epoch = zone1.date
ra, dec = zone1.radec_of(az=south, alt=overhead - zone1.lat)
print 'Epoch-of-date:'
print 'RA:', ra
print 'dec:', dec
print

zone1.epoch = '2000/1/1'
ra, dec = zone1.radec_of(az=south, alt=overhead - zone1.lat)
print 'Epoch J2000:'
print 'RA:', ra
print 'dec:', dec
print

The output, I think, confirms that the sidereal time is the same as the epoch-of-date right ascension of the point we asked about — at least I think that the tiny, less-than-an-arcsecond discrepancy is due to rounding errors inside of the libastro that PyEphem relies upon, and not to some additional theoretical complication that is escaping us:

Sidereal time: 7:51:14.43

Epoch-of-date:
RA: 7:51:15.24
dec: 0:00:03.5

Epoch J2000:
RA: 7:50:30.36
dec: 0:02:19.5

Because I find PyEphem a bit awkward for these kinds of questions, note that I have started a new Skyfield library that tries to make computation a bit simpler, if you ever feel like trying out an alternative. Either way: enjoy!

Local Sidereal Time is by definition the RA of the local meridian. To be more precise, Local Apparent Sidereal Time is defined as the hour angle of the vernal equinox at that locality: it has the same value as the right ascension of any celestial body that is crossing the local meridian at that same moment, which is exactly what you want.

Your use of pyephem's sideral_time() function would produce the apparent RA ("epoch-of-date" RA is also probably the same thing under this definition but doesn't mean the same thing).

>>> GST = ephem.Observer()
>>> GST.lat = '0'
>>> GST.lon = '0'
>>> GST.elevation = '0'
>>> GST.elevation = 0
>>> GST.date = '2014/08/04 11:00:00'
>>> GST.sidereal_time()
7:51:44.73

Notice that London and Greenwich are not the same thing either.

Now let's place a star at this RA and see what we get--this won't work out exact, but it will be close enough to show the relationship.

>>> star._ra = '7:51:44.73'
>>> star._dec = '45'
>>> star._epoch = '2014/08/04 11:00:00'
>>> GST.pressure = 0
>>> star.compute(GST)
>>> star.az, star.alt
(359:59:38.7, 45:00:08.2)

Here we can see that our fictitious star is on our meridian (well as close and pyephem is going to allow us to calculated it), where the meridian is defined as azimuth angles of 0 or 180 degrees. In pyephem, it has always behaved a bit oddly when you try to use it basically backwards as in this demonstration. Let's try another in the forward direction.

This time we'll choose a known star and adjust the time at the site until it the LST matches the apparent RA of the star.

>>> vega = ephem.star('Vega') #retrieve vega from star catalog
>>> ephem.now() #get the current time
2015/7/9 01:42:49
>>> GST.date = '2015/7/9 01:42:49' #set time at site
>>> vega.compute(GST) #compute vega over the site for this time
>>> vega.a_ra #retrieve the astronomical RA for vega epoch J2000
18:36:56.47
>>> vega.ra #retrieve apparent RA for vega epoch now
18:37:29.64

Notice that they are a bit different owing to precession of the earth about its axis and nutation of the axis owing to earth-moon interactions

>>> GST.sidereal_time() #get the sidereal time for now
20:49:34.12

Note that the sidereal time is a bit off from the apparent RA of vega, so let's adjust the time until they are exactly the same

>>> GST.date = '2015/7/8 23:31:06.16' 
>>> GST.sidereal_time()
18:37:29.64

Now they are identical. Now compute vega for the site again.

>>> vega.compute(GST)
>>> vega.ra, vega.dec
(18:37:29.64, 38:48:06.5)
>>> vega.az, vega.alt
(0:00:00.0, 51:11:53.5)

As you can see here that the azimuth angle is precisely on the meridian as expected. This forward demonstration shows that LST is equivalent to the apparent RA for the local meridian.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM