You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We would like to use the latest ChiantiPy for the package Carsus https://github.com/tardis-sn/carsus. However, in the process of upgrading, I found that it is no longer possible to create an ion object without a defined temperature. Is this intended? The ion object states the temperature is optional, and it is None by default.
Output is:
self = <carsus.io.tests.test_chianti.TestChiantiIonReader object at 0x7f49994531d0>
request = <SubRequest 'ch_ion_reader' for <Function test_chianti_bound_levels[ne_2]>>
@pytest.fixture(scope="class", params=["ne_2", "n_5"])
def ch_ion_reader(self, request):
> return ChiantiIonReader(request.param)
carsus/io/tests/test_chianti.py:9:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
carsus/io/chianti_/chianti_.py:112: in __init__
self.ion = ch.ion(ion_name)
../miniforge3/envs/carsus/lib/python3.12/site-packages/ChiantiPy/core/Ion.py:160: in __init__
self.argCheck(temperature, eDensity, pDensity, em)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <ChiantiPy.core.Ion.ion object at 0x7f4998f2b440>, temperature = None
eDensity = None, pDensity = 'default', em = None, verbose = 0
def argCheck(self, temperature=None, eDensity=None, pDensity='default', em = None, verbose=0):
''' to check the compatibility of the three arguments
and put them into numpy arrays of atleast_1d
and create attributes to the object
'''
if temperature is not None:
self.Temperature = np.atleast_1d(temperature)
if isinstance(self.Temperature[0], str):
raise ValueError(' temperature can not be a string')
if np.any(self.Temperature <= 0.):
raise ValueError(' all temperatures must be positive')
self.Ntemp = self.Temperature.size
else:
> raise ValueError('temperature not defined')
E ValueError: temperature not defined
../miniforge3/envs/carsus/lib/python3.12/site-packages/ChiantiPy/base/_IonTrails.py:33: ValueError
The text was updated successfully, but these errors were encountered:
We would like to use the latest ChiantiPy for the package Carsus https://github.com/tardis-sn/carsus. However, in the process of upgrading, I found that it is no longer possible to create an
ion
object without a defined temperature. Is this intended? Theion
object states the temperature is optional, and it isNone
by default.Output is:
The text was updated successfully, but these errors were encountered: