Chianti collision data broken for heavier elements
jsilvabeyer opened this issue · 1 comments
Describe the bug
When using ChiantiReader
to get collision data for heavier elements (I tested O and Si), the resulting TARDISAtomData
collision DataFrame has atomic_number
and ion_number
(among others) as float64, instead of int64. This results in an error when using the data for NLTE ions in TARDIS.
To Reproduce
Run the Quickstart notebook, but without using CMFGEN, and using CHIANTI as:
chianti_reader = ChiantiReader('O; Si', collisions=True, priority=30)
Screenshots
System
-
OS:
- GNU/Linux
-
Environment (
conda list
): carsus environment
Additional context
Also, when running TARDISAtomData
, the logger gave me a math warning
RuntimeWarning:
divide by zero encountered in log10
I tend to ignore those but maybe is related to my issue?
Edit: I found that these values can't be changed into int64
because there are nan
values among them. The ChiantiReader
object doesn't show any value like that, so somewhere in the TARDISAtomData.create_collisions
method some numbers are becoming nan
.
This is likely to be resolved by #406