Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After upgrading to 0.9.1, recombRate() no longer works for fully ionized atoms #274

Open
The9Cat opened this issue Jan 22, 2020 · 4 comments

Comments

@The9Cat
Copy link

The9Cat commented Jan 22, 2020

Here is a trivial example that works in 0.8.3 but not in 0.9.1:

import ChiantiPy.core as ch
t = 10.*(5.8 + 0.05*np.arange(21.))
o3 = ch.ion('o_8', temperature=t)
o3.recombRate()
o3 = ch.ion('o_9', temperature=t)
o3.recombRate() 
@kdere
Copy link
Contributor

kdere commented Jan 23, 2020

I just fixed the problem on the Github code. Will soon make a release on Github and PyPI
also, note ** not ,
t = 10.**(5.8 + 0.05
np.arange(21.))

@kdere
Copy link
Contributor

kdere commented Jan 23, 2020

version 0.9.2 has been released on github and PyPI

@The9Cat
Copy link
Author

The9Cat commented Jun 3, 2020

Ken, if I'm not mistaken, this problem is back again in 0.9.5!

@kdere
Copy link
Contributor

kdere commented Jun 4, 2020

Actually, it does work but it is a little strange since the bare ions are not in the database but some data, like the recombination rate is there. Basicly you have to initiate the ion with setup=False and then do bare_ion.setupIonrec().

I have attached the commands of a jupyter notebook as just python code that shows this.

`#!/usr/bin/env python

coding: utf-8

## to test the recombrate of bare ions

In[4]:

matplotlib qt

In[5]:

o = ch.ioneq(8)

In[6]:

o.load()

In[17]:

o.plot()

In[8]:

temp = 10.**(.3+0.1*np.arange(11))

In[20]:

o9=ch.ion('o_9', temp, setup=0)

In[21]:

o9.setupIonrec()

In[22]:

o9.recombRate()

In[24]:

o9.RecombRate.keys()

In[25]:

plt.figure()
plt.loglog(temp,o9.RecombRate['rate'])
plt.tight_layout

In[ ]:

`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants