[AstroPy] How can I get the rise and set time in Greenwich Mean Sidereal Time (GMST)?

Miro Saide mirosaide at gmail.com
Fri Jul 23 11:25:10 EDT 2021


Hello everyone,

I am calculating the rise and set of Barnard's star for different locations
on the globe.
But my output is in Universal time.

The sidereal time method returns a longitude with units of hour angle.


I wonder how can I get the output in GMST?

The example of the code is below:

``
from astropy.visualization import astropy_mpl_style, quantity_support
plt.style.use(astropy_mpl_style)
quantity_support()
import astropy.units as u
from astropy.time import Time
from astropy.coordinates import SkyCoord, EarthLocation, AltAz
from astroplan import Observer, FixedTarget
from astropy.time import Time
from astroplan import download_IERS_A
download_IERS_A

time = Time("2020-05-12 00:00:00",format='iso')
target = SkyCoord.from_name("Barnard's star")
Location = Observer(latitude=42.248u.deg, longitude=-122.567u.deg)
star_rise_time = Location.target_rise_time(time, target, which='nearest')
star_set_time = Location.target_set_time(time, target, which='nearest')
*Ramiro Caisse Saide*
*MPhil Research Student*
Department of Physics
University of Mauritius
Contact Number: +258 845672884
Email: ramiro.saide at umail.uom.mu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.python.org/pipermail/astropy/attachments/20210723/0ad7273e/attachment.html>


More information about the AstroPy mailing list