![]() |
SuperNOVAS C++ API v1.6
High-precision C/C++ astrometry library
|
| astropy | supernovas++ |
|---|---|
|
from astropy import units as u
from astropy.coordinates import SkyCoord,
EarthLocation, Longitude, Latitude,
CIRS
# Define ICRS coordinates
source = SkyCoord(
'16h 29m 24.45970s', '−26d 25m 55.2094s',
d = u.AU / 5.89 * u.mas,
pmra = -12.11 * u.mas / u.yr,
pmdec = -23.30 * u.mas / u.yr,
rv = -3.4 * u.km / u.s)
# Observer location
loc = EarthLocation.from_geodetic(
Longitude(50.7374),
Latitude(7.0982),
height=60.0)
# Set time of observation
time = astropy.time.Time(
"2025-02-27T19:57:00.728+0200"
scale='tai')
# Observer frame & system
frame = CIRS(obstime=time, location=loc)
# apparent coordinates
app = source.transform_to(frame);
|
#include <supernovas.h>
using namespace supernovas;
// IERS Earth Orientation Parameters...
// Define ICRS coordinates
"16h 29m 24.45970s", "−26d 25m 55.2094s")
.to_source();
// Observer location
auto obs = Site::from_GPS(50.7374, 7.0982, 60.0)
.to_observer(eop);
// Set time of observation
Time t("2026-03-14T13:43:00.728+0200", eop,
// Observer frame
auto frame = obs.frame_at(t);
// apparent coordinates in system
auto app = source.apparent_in(frame).cirs();
Defines the astrometric parameters of a sidereal source, such as a star, a Galactic cloud,... Definition supernovas.h:2042 Angle parallax() const Returns the parallax of the source. Definition CatalogEntry.cpp:300 static Site from_GPS(double longitude, double latitude, double altitude=0.0) Returns an observing site for its geodetic GPS location. Definition Site.cpp:394 Precise astronomical time specification, supporting all relevant astronomical timescales (UT1,... Definition supernovas.h:1750 static constexpr double mas [rad] 1 millisecond of arc in radians Definition supernovas.h:176 static constexpr double s [s] 1 second (standard unit of time) Definition supernovas.h:146 static constexpr double yr [s] 1 tropical calendar year in seconds (at J2000) Definition supernovas.h:160 static constexpr double ms [s] 1 millisecond in seconds Definition supernovas.h:145 Definition supernovas.h:32 |
Copyright (C) 2026 Attila Kovács