-
-
Notifications
You must be signed in to change notification settings - Fork 406
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
SDSS get_spectra() fail when data_release=12 #3169
Comments
Thanks for reporting this. I can reproduce this and indeed I see a couple of test failures regarding this data release, so I suspect some upstream changes may have been made. cc @weaverba137 in case he has some ideas straight away without diving into full debug mode |
I agree that this is likely an unexpected upstream API change. It may take me a while to find time to investigate. In the meantime, do you get the expected results when you interact directly with the SDSS data servers? |
I only use astroquery, so I can only confirm that when using DR14 and DR17 all my functions and custom queries works as usual, is only when I use DR12 when everything breaks. I can also add that other queries from NED and SIMBAD don't present any problem at all, so the problem must come directly from SDSS or the utilities in between. Just to point out, the same InconsistentTableError was pointed in astropy/astropy#9797 , but no solution was given, so maybe is the same problem? Just a different scenario. It seems kinda odd tho, since I know this function worked somewhere around July, 2024, and that issue is from 2019. The AstroML implementation of a fetch_sdss_spectrum() function works like charm, but they uses the DAS (kinda outdated, DR7), while astroquery seems to use SAS as far as I know, so the implementations are different. Hopefully this details are useful. |
I have confirmed that this is a server-side issue. In fact the DR12 service is throwing an exception, so I don't think this is an API change. I have reached out to some SDSS colleagues to investigate further. |
Thank you! |
I checked today, and DR12 seems to be working again. Please confirm and close. |
Thank you! Indeed the example code in the OP is now working. |
Version of packages:
Python 3.9.12
astroquery 0.4.7
astropy 6.0.1
numpy 1.26.4
The problem happens when I try to query a list of coordinates and when I try to get the spectra using plate, fiberID and mjd.
I'm quering real sources from the Portsmouth VAC of galaxy properties in the latest version available, which uses BOSS DR12 spectra. The pipeline I built used to work, but now it doesn't.
For example, using:
PLATE MJD FIBERID
7057 56593 293
It gives me the following error:
Long error!
--------------------------------------------------------------------------- InconsistentTableError Traceback (most recent call last) Input In [19], in () ----> 1 SDSS.get_spectra(plate=7057, fiberID=293, mjd=56593, data_release=12)[0]Now, this happens for every source in my sample (around 1k sources), it works for both DR14 and DR17, but I need DR12 spectras. The last time I ran it, I had astroquery 0.4.6, but now even forcing the use of that version, it doesn't work.
edit: forgot to mention that the spectra does indeed exist in every case, for example:
https://data.sdss.org/sas/dr12/boss/spectro/redux/v5_7_0/spectra/7057/spec-7057-56593-0293.fits
is the spectra for the plate, fiberid and mjd of the example for DR12
The text was updated successfully, but these errors were encountered: