BUG: NIST query bugs
- Dominant language
- Python
- Stars
- 791
- Forks
- 451
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 4
Description
Edit: Here is a summary of 3 bugs uncovered by this bug report:
- [ ] `linename` parameter doesn't allow all possible examples allowed by the website. Hoverover claims the following, all of them should be supported and covered by test:
Examples of allowed spectra:
- [ ] Ar I
- [ ] Mg I-IV
- [ ] All spectra
- [ ] Fe I; Si IX,XI; Ni Co-like
- [ ] H-Ar I-II
- [ ] Mg Li-like; Al Li-like-Be-like
- [ ] Sc-Fe K-like-Ca-like
- [ ] 198Hg I
- [ ] `minwav` and `maxwav` are not mandatory on the website, we may want to mirror that behaviour
- [ ] parsing errors from the response should be done and appropriate exception is raised rather than the current `Exception: Result did not contain a table`
--------
Original issue text:
astroquery.nist does not return the table when multiple ions are set in the linename argument
The following code works:
```
import numpy as np
from astroquery.nist import Nist
import astropy.units as u
Nist.query(6500*u.AA, 6550*u.AA, linename="Al",wavelength_type='vac+air')
```
But this does not work:
```
import numpy as np
from astroquery.nist import Nist
import astropy.units as u
Nist.query(6500*u.AA, 6550*u.AA, linename="Al;Mg",wavelength_type='vac+air')
```
Contributor guide
Research direction
Start at the Nist.query entry point and reproduce the single-ion and multi-ion examples from the issue. Check the listed linename forms, behavior when minwav and maxwav are omitted, and how response parsing errors are surfaced; done means these cases are supported, covered by tests, and produce appropriate exceptions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100