-
-
Notifications
You must be signed in to change notification settings - Fork 213
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
404 error when attempting to load Hipparcos data #454
Comments
@resistor — I can confirm that I get the error as well, using an independent tool that's not Python-related:
I have emailed the link that the FTP site advertises for assistance, and will let you know if I hear anything back! In the meantime, feel free to search for other sources for the data file, and let me know if you find alternative working URLs for it. Thanks! |
Hi - it is better to query the VizieR table using URL: (for acceptable volumetry) However, in the long term, the more secure and persistent URL to access VizieR tables are the VizieR DOI (if exists - eg: 10.26093/cds/vizier.51470007) or the landing page https://vizier.unistra.fr/viz-bin/cat/I/239 |
@gilleslandais — Do you have any information about why the file was unzipped? I am looking at your two links. Am I correct that they seem to present the data in a different format than the one documented for the Hipparcos catalog at the following link? Traditionally the file is https://heasarc.gsfc.nasa.gov/W3Browse/star-catalog/hipparcos.html |
@resistor — I may have found an alternative URL that we could use for the moment, to get the library working again. Could you try this instead?
|
(And for my own records when I return to this issue in the future: the ftp://cdsarc.u-strasbg.fr/pub/cats/I/239/ |
(It also seems to still exist at Harvard, though it looks like it might be a simple mirror of Vizier, in which case the file will disappear as soon as the next mirror update is complete:) http://vizier.cfa.harvard.edu/ftp/cats/i/239/hip_main.dat.gz |
There aren't any reasons why it is unzipped: but it is possible - (sorry for this response) Just some clarifications on the tables and their format in VizieR: The CDS provides the "original table" and the enriched VizieR table.
The ReadMe and the byte-by-bytes section describes the "original data" ONLY. The FORTRAN format is a blank-aligned format, the | are not required. If you use astropy , you can query original table using the package https://docs.astropy.org/en/stable/api/astropy.io.ascii.Cds.html |
Ah, thank you, @gilleslandais, for that clarification. So the file: http://cdsarc.u-strasbg.fr/ftp/cats/I/239/hip_main.dat — is indeed in the original format and could be used by Skyfield’s parser without modification. But, it would disappear and become a broken URL in the future if someone were to gzip the file again like it used to be. Whereas, the table-query URLs that provide the data in an alternative enhanced format should always work, but Skyfield would not at this point be able to parse their output. I may move to the more modern table-download format someday, but as I leave for vacation Saturday, I should not be attempting any large changes to Skyfield this week. I will probably try switching to the Thanks for replying quickly in the middle of your workday, @gilleslandais! It is amazing how quickly collaboration can happen between continents thanks to technology. It used to be that if an American had a question about a star catalog, they had to wait for the mail to be carried across the ocean on a wooden boat! |
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.
I have just released Skyfield 1.28 which (fingers crossed) makes a successful switch to the new uncompressed URL. I will keep this issue open for the next few weeks, though, in the hope that I have time to learn about the other better-support table formats in which VizieR can return data tables. In the meantime, I'll move this to being a feature request, as this issue will now track the new code involved and no longer this pre-1.28 breakage of the URL. |
@brandon-rhodes Crazy idea but why not put the onus of sourcing data files (hip_main.dat.gz and whatever planets.bsp you feel is most recent/correct) on to the end user (API caller)? Make it clear in the documentation where to get these files (including multiple/alternative sites). You could even extend this to the timing component (cannot remember exactly what Skyfield downloads to maintain time as such but you referred to ∆T in a recent issue). In short, it's really nice for Skyfield to download all this for me, but if Skyfield can be viewed as a library/engine, then the data should come from the caller. I do this anyway substituting de438.bsp for de421.bsp (and I even trim down de438.bsp to a smaller file called planets.bsp). I know this is a can of worms, but this issue would only affect a new caller (customer) of the library. The rest of us would already have downloaded a local copy of hip_main.dat.gz. All you'd need to have done is change the documentation to alert users the URL had changed to no longer have the .gz (and of course be able to handle a non .gz input). |
@Bernmeister — It is, indeed, a can of worms! I am going to be away-from-keyboard for the next week, but when I get back I'll think about the spectrum of choices between "Skyfield downloads everything" and "Skyfield downloads nothing". I've been adjusting that as I go along, and it will be helpful to review where things now stand. In the meantime, have a good week, and I'll try to remember to comment here when I'm back! |
Hey, everyone, I ran into the same error but found a downloaded version of the .gz file from when I'd previous run
|
Is this helpful? I do not have the physical published cd. I found this today browsing around the site. An alternate or new permanent location? This might possibly save a lot of work.
In that directory is, the prize?
|
Interesting! It depends on whether the catalog was revised after being distributed on CD in 1997. I won't have time to investigate that soon (I'll be away from the keyboard much of this week), but it would be interesting to compare the modern catalog file with the 1997 version that you link to above. |
As a rookie, I would not yet recognize the difference. However, also interesting to note, under the FTP tab at this url:
The listing there (which has only the .dat and not the .dat.gz) is actually dated, well, take a look...
Is that also not the updated one? (Rhetorical. Enjoy your week away from a keyboard!) |
I am resetting the title of this issue back to its original value “404 error when attempting to load Hipparcos data” since the original issue was the change in the database’s URL. Now that everyone can get to Hipparcos again, I am (a) not aware of any users blocked waiting for Skyfield to learn how to parse Vizier table downloads, and (b) I am not sure that we would want to make that a Skyfield-only feature. It might make more sense for Python to have a 3rd party library that knew how to read the Vizier headers and NumPy-parse the lines of data that followed — for example, imagine something like: https://astroquery.readthedocs.io/en/latest/vizier/vizier.html — but able to return a plain Pandas dataframe instead of requiring a full AstroPy install. Then all kinds of tools, Skyfield included, could benefit from Vizier data, without each having to internally implement the same parsing logic. I will be happy to consider counter-arguments against either of those premises, but at the moment they seem strong enough to me that I’m going to close this issue for now, since the original issue is long resolved. If anyone who hadn't spoken up yet is indeed blocked on the lack of a general mechanism in Skyfield for Vizier table downloads, simply reply here with further information about which tables you need, and we can discuss whether the work is in scope for Skyfield contributors. Thanks! |
When I do
load.open(hipparcos.URL)
on a fresh install of skyfield, I'm getting this error:The text was updated successfully, but these errors were encountered: