1
$\begingroup$

I'm trying to compute rising and settings times for various objects with the Skyfield library. While the task is quite easy and well documented for planets (using the almanac.rising_and_setting function), it is not too clear to me how to do this with Stars and Deep Sky Objects.

Btw, how do I load NGC catalogues?

$\endgroup$
1

1 Answer 1

1
$\begingroup$

If you have the RA and declination coordinates for any object, whether for a star or anything else, you can create a Skyfield Star that represents its position in the heavens:

https://rhodesmill.org/skyfield/stars.html#building-a-single-star-from-its-coordinates

You can then pass that object — barnard in the example code at the above link — to almanac.rising_and_setting() exactly as you would pass a planet. The code would look like the example here:

https://rhodesmill.org/skyfield/almanac.html#risings-and-settings

— except that your call would look like:

f = almanac.risings_and_settings(eph, barnard, bluffton)

There is not currently a way to load the NGC catalogs — I’ve never actually taken a look at how they are formatted online, nor have I seen a Skyfield contributor offer anything yet. If you have a link to your favorite online source for the NGC catalog, though, we could take a look? Open an issue if you find an online NGC catalog and think that Skyfield should learn to read it.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .