Skip to content

Commit 34a88c7

Browse files
committed
shift GUP one to the left and test for it
1 parent 2922473 commit 34a88c7

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

astroquery/linelists/cdms/core.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ def _parse_result(self, response, verbose=False):
224224
'LGINT': 25,
225225
'DR': 36,
226226
'ELO': 38,
227-
'GUP': 48,
227+
'GUP': 47,
228228
'MOLWT': 51,
229229
'TAG': 54,
230230
'QNFMT': 58,
@@ -255,13 +255,17 @@ def _parse_result(self, response, verbose=False):
255255
result['MOLWT'] = np.abs(result['MOLWT'])
256256
result['MOLWT'].unit = u.Da
257257

258+
fix_keys = ['GUP']
258259
for suf in 'ul':
259260
for qn in ('J', 'v', 'K', 'F1', 'F2', 'F3'):
260261
qnind = qn+suf
261-
if result[qnind].dtype != int:
262-
intcol = np.array(list(map(parse_letternumber, result[qnind])),
263-
dtype=int)
264-
result[qnind] = intcol
262+
fix_keys.append(qnind)
263+
for key in fix_keys:
264+
if result[key].dtype != int:
265+
intcol = np.array(list(map(parse_letternumber, result[key])),
266+
dtype=int)
267+
result[key] = intcol
268+
265269

266270
# if there is a crash at this step, something went wrong with the query
267271
# and the _last_query_temperature was not set. This shouldn't ever

astroquery/linelists/cdms/tests/test_cdms.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ def test_hc7s(patch_post):
118118
assert tbl['LGINT'][0] == -3.9202
119119
assert tbl['MOLWT'][0] == 117
120120

121+
assert tbl['GUP'][0] == 255
121122
assert tbl['Ju'][0] == 126
122123
assert tbl['Jl'][0] == 125
123124
assert tbl['vu'][0] == 127

0 commit comments

Comments
 (0)