Search notes:

Astropy.coordinates

#!/usr/bin/env python3

from astropy.coordinates import EarthLocation, AltAz, SkyCoord
from astropy.time import Time
import astropy.units as u

#
# Sternwarte Eschenberg
#
location = EarthLocation(
              lat    =  47.4721981112  * u.deg,
              lon    =   8.7397303744  * u.deg,
              height = 340             * u.m)

#
# Time of observation
#
obstime = Time('2026-08-16 22:00:00')

# Example: convert a sky position from Alt/Az to RA/Dec
altaz = SkyCoord(
           alt      =  45 * u.deg,
           az       = 180 * u.deg,
           obstime  = obstime,
           location = location,
           frame    ='altaz')

#
# Transform to ICRS (RA, Dec)
#
icrs = altaz.transform_to('icrs')

print(icrs.ra, icrs.dec)

See also

Astropy

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:51 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(51): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(66): id_of(Object(PDO), 'uri', '/notes/developm...') #2 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1788519368, '216.73.217.21', 'Mozilla/5.0 App...', NULL) #3 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/languages/Python/libraries/Astropy/coordinates(67): insert_webrequest() #4 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 51