-
Notifications
You must be signed in to change notification settings - Fork 35
Open
Labels
potential bugautomated label to indicate issue reportsautomated label to indicate issue reports
Milestone
Description
astroquery v0.4.12 will fix its JPLSpec module, but it seems the results are not compatible with sbpy:
>>> from sbpy.data import Phys
>>> import astropy.units as u
>>> temp_estimate = 47. * u.K
>>> mol_tag = 28001
>>> transition_freq = (345.7 * u.GHz)
>>> Phys.from_jplspec(temp_estimate, transition_freq, mol_tag)
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
Cell In[10], line 1
----> 1 Phys.from_jplspec(temp_estimate, transition_freq, mol_tag)
File ~/.venv/lib/python3.12/site-packages/sbpy/utils/decorators.py:78, in requires.<locals>.decorator.<locals>.wrapper(*func_args, **func_kwargs)
75 except RequiredPackageUnavailable as exc:
76 # trim a couple levels of the traceback to clean up error messages
77 raise exc.with_traceback(exc.__traceback__.tb_next.tb_next)
---> 78 return wrapped_function(*func_args, **func_kwargs)
File ~/.venv/lib/python3.12/site-packages/sbpy/bib/core.py:183, in cite.<locals>.decorator.<locals>.wrapper(*args, **kwargs)
180 @wraps(f)
181 def wrapper(*args, **kwargs):
182 # only cite after successful call
--> 183 result = f(*args, **kwargs)
184 register(f, citations)
185 return result
File ~/.venv/lib/python3.12/site-packages/sbpy/data/phys.py:284, in Phys.from_jplspec(cls, temp_estimate, transition_freq, mol_tag)
279 t_freq = min(list(freq_list.quantity),
280 key=lambda x: abs(x-transition_freq))
282 data = query[query['FREQ'] == t_freq.value]
--> 284 df = int(data['DR'].data)
286 lgint = float(data['LGINT'].data)
288 lgint = 10**lgint * u.nm * u.nm * u.MHz
TypeError: only 0-dimensional arrays can be converted to Python scalarssbpy==0.6.0
astropy==7.2.0
astroquery==0.4.12.dev10553
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
potential bugautomated label to indicate issue reportsautomated label to indicate issue reports