astroquery icon indicating copy to clipboard operation
astroquery copied to clipboard

Linelists: make lookuptables a little more robust

Open keflavich opened this issue 1 year ago • 2 comments

The lookuptables used in linelist searches are a little touchy because of lines like HCO+ and HOCO+. You have to escape the +'s to get them to work, which means that even exact matches to molecules, like 29002 HCO+ v=0,1,2 will not work.

This change means that exact matches will work, while partial matches will still need to be escaped.

keflavich avatar Dec 19 '23 00:12 keflavich

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (5600762) 67.23% compared to head (869de3d) 67.23%. Report is 2 commits behind head on main.

Files Patch % Lines
astroquery/jplspec/lookup_table.py 50.00% 1 Missing :warning:
astroquery/linelists/cdms/core.py 50.00% 1 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2901      +/-   ##
==========================================
- Coverage   67.23%   67.23%   -0.01%     
==========================================
  Files         235      235              
  Lines       18155    18159       +4     
==========================================
+ Hits        12207    12209       +2     
- Misses       5948     5950       +2     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Dec 19 '23 01:12 codecov[bot]

This should probably go into a slightly larger refactor too:

  • move jplspec to linelists
  • move the lookup_table function to linelists so cdms & jpl both use the same code

keflavich avatar Dec 19 '23 12:12 keflavich