astropy / astroquery

Functions and classes to access online data resources. Maintainers: @keflavich and @bsipocz and @ceb8
http://astroquery.readthedocs.org/en/latest/
BSD 3-Clause "New" or "Revised" License
706 stars 399 forks source link

Nist.query Wrong Data returned for 'Rel.'of 'Ne I, Mo' #930

Open tibidabo opened 7 years ago

tibidabo commented 7 years ago

I got some trouble with using Nist.query as it returned some strange table, howle different to the one when using the website

from astroquery.nist import Nist 
import astropy.units as u
temp_table =  Nist.query(634 * u.nm, 641 * u.nm, 'Mo, Ne I', 
                         energy_level_unit='eV', output_order='wavelength',
                         wavelength_type='vacuum')
temp_table

I was using just the same code for 'Fe I', 'Fe II', 'Ar I', 'Ar II', 'W' and others in the past and it's fine. I am not sure what went wrong, whether it is my fault or of astroquery. It would be nice if you could help me out. image

keflavich commented 7 years ago

Could you be more specific? What does the website return that is different from astroquery?

tibidabo commented 7 years ago

Hi @keflavich it seems like it was wrongly formated into the table in python. So there are bits of the 'Line' column in the 'Rel.' column and a lot of other values beside the 'Spectrum', 'Observed' and 'Ritz' columns are missing.

image

at NIST

keflavich commented 7 years ago

Sorry about the delay. I see the problem. It's probably an issue with the NIST table parser. That parser was very tricky to write, as the NIST table formats are not designed to be machine-readable.

keflavich commented 7 years ago

Something is strange about this table. The text format returned by NIST has extra column separators ("|"'s) in most rows. I'm not sure there's a good way around this.

lemmatum commented 6 years ago

I've run into the problem of extra column separators in my own code for querying NIST ionization energies. There it was the ground shells column, which I think will correspond to the lower level configuration and upper level configuration columns for the atomic spectra lines database.