<p>If you have the RA and declination coordinates for any object, whether for a star or anything else, you can create a Skyfield <code>Star</code> that represents its position in the heavens:</p>
<p><a href="https://rhodesmill.org/skyfield/stars.html#building-a-single-star-from-its-coordinates" rel="nofollow noreferrer">https://rhodesmill.org/skyfield/stars.html#building-a-single-star-from-its-coordinates</a></p>
<p>You can then pass that object — <code>barnard</code> in the example code at the above link — to <code>almanac.rising_and_setting()</code> exactly as you would pass a planet. The code would look like the example here:</p>
<p><a href="https://rhodesmill.org/skyfield/almanac.html#risings-and-settings" rel="nofollow noreferrer">https://rhodesmill.org/skyfield/almanac.html#risings-and-settings</a></p>
<p>— except that your call would look like:</p>
<pre><code>f = almanac.risings_and_settings(eph, barnard, bluffton)
</code></pre>
<p>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.</p>

CC BY-SA 4.0
2021-11-11T20:02:03.420Z
2021-11-11T20:02:03.420Z
Brandon Rhodes
<p>I'm trying to compute rising and settings times for various objects with the <a href="https://rhodesmill.org/skyfield/" rel="nofollow noreferrer">Skyfield</a> library. While the task is quite easy and well documented for planets (using the <code>almanac.rising_and_setting</code> function), it is not too clear to me how to do this with Stars and Deep Sky Objects.</p>
<p>Btw, how do I load NGC catalogues?</p>

CC BY-SA 4.0
2021-11-10T22:45:26.140Z
Not a complete answer, but start with [.starlib.Star()](https://rhodesmill.org/skyfield/api.html#stars-and-other-distant-objects) and use [.almanac.risings_and_settings()](https://rhodesmill.org/skyfield/api-almanac.html#skyfield.almanac.risings_and_settings)
uhoh
<python><skyfield>
How to compute rising / setting times for stars and deep sky objects with Skyfield?
Luca Berti
# How to compute rising / setting times for stars and deep sky objects with Skyfield?

(Asked by: username_0 on 2021-11-10)

I'm trying to compute rising and settings times for various objects with the [Skyfield](https://rhodesmill.org/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?

**Tags:** python, skyfield

> **Comments:**
> **username_1**: Not a complete answer, but start with [.starlib.Star()](https://rhodesmill.org/skyfield/api.html#stars-and-other-distant-objects) and use [.almanac.risings_and_settings()](https://rhodesmill.org/skyfield/api-almanac.html#skyfield.almanac.risings_and_settings)  

---

## 1 answers

### Answer by username_2 on 2021-11-11. Score: 1 | Accepted answer

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.


---

