Skip to content

Commit ab7fdaa

Browse files
authored
Merge pull request #2945 from bsipocz/BUG_jplspec_build_lookup
BUG: fix jplspec build lookup
2 parents 4dd1fc0 + c4cd1df commit ab7fdaa

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

CHANGES.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,12 @@ jplsbdb
216216
- Fix a bug for jplsdbd query when the returned physical quantity contains
217217
a unit with exponential. [#2377]
218218

219+
jplspec
220+
^^^^^^^
221+
222+
- Fix a bug in lookup-table generation when using ``parse_name_locally``
223+
option. [#2945]
224+
219225
linelists.cdms
220226
^^^^^^^^^^^^^^
221227

astroquery/jplspec/core.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -238,9 +238,9 @@ def get_species_table(self, *, catfile='catdir.cat'):
238238
def build_lookup():
239239

240240
result = JPLSpec.get_species_table()
241-
keys = list(result[1][:]) # convert NAME column to list
242-
values = list(result[0][:]) # convert TAG column to list
243-
dictionary = dict(zip(keys, values)) # make k,v dictionary
241+
keys = list(result['NAME'])
242+
values = list(result['TAG'])
243+
dictionary = dict(zip(keys, values))
244244
lookuptable = lookup_table.Lookuptable(dictionary) # apply the class above
245245

246246
return lookuptable

0 commit comments

Comments
 (0)