-
-
Notifications
You must be signed in to change notification settings - Fork 217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
List of stars #304
Comments
My guess is that I might delete the comment now that the Wikipedia entry is gone, thanks for letting me know the link was out of date. The name |
Descriptive/readability beats clunky! |
This old experimental `NamedStar` API from 2015, which was never documented, is now broken because the Hipparcos catalog is not (for the moment) being downloaded in compressed form (see #454). Rather than delay today’s release to fix `NamedStar`, let’s remove it. This is a dicey and uncharacteristic decision for me. I usually pride myself on not breaking anything that appears in a file like `api.py` and that someone might have started using through their own research of the code. But in this case, with the function marked as deprecated for several years, I am going to chance it. Thanks to the original author, though, as the experiment led eventually to the modern approach of loading stars using a Pandas Dataframe! The actual dictionary of named stars is retained, per promises in #304.
Google brought me here, while searching for a way to get star names in skyfield. Just in case it could help someone else, here's a way to get common star names in the Hipparcos dataframe: from skyfield.api import load
from skyfield.data import hipparcos
from skyfield.named_stars import named_star_dict
# Load Hipparcos data
with load.open(hipparcos.URL) as f:
df = hipparcos.load_dataframe(f)
hip_to_name = {v: k for k, v in named_star_dict.items()}
def get_star_name(hip):
return hip_to_name.get(hip, f"HIP{hip}")
df["name"] = df.index.map(get_star_name)
Here's a way to display the 20 brightest stars: print(df.sort_values("magnitude")[:20][["magnitude", "name"]]) It outputs:
|
In the file
named_stars.py
, there is a list of stars but the function at the end is deprecated. Is it safe to use the list of stars (not the function) or will it eventually be removed? You mentioned in #174 that you might look at the list and keep it.In my application, I want to provide a list of typical/named/visible stars, similar to that in PyEphem, and the list in
named_stars.py
works well, particularly with the associated HIP (makes it easy to load up the star from the dataframe).Finally, the link mentioned to the list of stars on Wikipedia https://en.wikipedia.org/wiki/List_of_stars_in_the_Hipparcos_Catalogue has been deleted. FWIW I found this older version https://web.archive.org/web/20131012032059/https://en.wikipedia.org/wiki/List_of_stars_in_the_Hipparcos_Catalogue
Edit: I found https://www.cosmos.esa.int/web/hipparcos/common-star-names which may be useful given the missing Wikipedia entry. Note this list contains a duplicate Hipparcos Identifier of 68702 for a star with two common names: Agena and Hadar (the official name is Hadar).
The text was updated successfully, but these errors were encountered: