starplot
python library from NASA
it's easy to use and provides lots of functionalities.
it will be a good choice to make a celestial image.
https://starplot.dev/
drawing star chart into SVG
https://github.com/codebox/star-charts
This sample draws star chart directly from stardata.csv.
I think this can work offline.
even though stardata.csv contains not quite a lot of star databases, i think it's a very nice try.
I didn't look into the code yet but I wonder how it handles the projection.
using astropy, skyfield
I found a stackoverflow thread discussing an issue but it includes a sample python code using skyfield and astropy which is a good reference code to use astropy and skyfield.
https://stackoverflow.com/questions/78778792/plotting-star-maps-with-equatorial-coordinates-system
Most star maps and catalogs use the equitorial coordinate system which uses RA(right ascension) and Dec (declination) as coordinates.
Ecliptic coordinate system is rarely used (it is not that it is never used)
from astropy.time import Time
from astropy.coordinates import EarthLocation, LST
# Create location
observatory = EarthLocation(lat=40*u.deg, lon=-75*u.deg)
# Get current time
current_time = Time.now()
# Calculate LST
lst = current_time.sidereal_time('apparent', observatory.lon)
import ephem
# Create observer
observer = ephem.Observer()
observer.lat = '40' # North
observer.lon = '-75' # West
observer.date = ephem.now()
# Get LST
lst = observer.sidereal_time()
using ASCOM.Tools.Novas31;
var novas = new Novas();
var jdutc = novas.JulianDate(year, month, day, hour);
var lst = novas.SiderealTime(jdutc, longitude, 0);
--> this usage is not correct.
--> instead, Novas class provides static methods.
--> Novas.JulianDate(), Novas.SiderealTime()
--> but usage is a little different.
--> refer to https://ascom-standards.org/library/html/T_ASCOM_Tools_Novas31_Novas.htm page.
this requires NOVAS-C (or libnovas).
this will install AASharp package
b) or at the project folder
$ dotnet add package AASharp
2) How to use it
using AASharp;
double dayvalue = DateTime.UtcNow.Day + DateTime.UtcNow.Hour/24.0 + DateTime.UtcNow.Minute/24.0/60.0 + DateTime.UtcNow.Second/24.0/60.0/60.0 + DateTime.UtcNow.Millisecond / 24.0/60.0/60.0/1000.0;
double JD = AASDate.DateToJD(year, month, dayvalue, true);
double GMST = AASSidereal.MeanGreenwichSiderealTime(JD);
double GAST = AASSidereal.ApparentGreenwichSiderealTime(JD);
// GMST = Greenwitch Mean Sidereal time in degree (0-360)
// GAST = Apparent Sidereal time in degree(0-360)
// to change it to local, we must add longitude
in most cases, we use Apprent Sidereal time when calculating celestial object position.