becquerel
becquerel copied to clipboard
XCOM doesn't understand scientific notation
If one provides mixtures with scientific notation for the fractional content, xcom seems to not be processing it correctly and becquerel throws an error:
bq.tools.fetch_xcom_data(['N 7.8e-1', 'O2 2.2e-1'], e_range_kev=[1, 10000])
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "becquerel/becquerel/tools/xcom.py", line 450, in fetch_xcom_data
query = _XCOMQuery(arg, **kwargs)
File "becquerel/becquerel/tools/xcom.py", line 175, in __init__
self.perform()
File "becquerel/becquerel/tools/xcom.py", line 413, in perform
self._parse_text()
File "becquerel/becquerel/tools/xcom.py", line 379, in _parse_text
tables = pd.read_html(self._text, header=0, skiprows=[1, 2])
File "/usr/lib64/python3.6/site-packages/pandas/io/html.py", line 906, in read_html
keep_default_na=keep_default_na)
File "/usr/lib64/python3.6/site-packages/pandas/io/html.py", line 743, in _parse
raise_with_traceback(retained)
File "/usr/lib64/python3.6/site-packages/pandas/compat/__init__.py", line 344, in raise_with_traceback
raise exc.with_traceback(traceback)
ValueError: No tables found
I don't think it is worth fixing this, or even our job, but I put this here for further reference