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

Population Ratios Discrepancy: ChiantiPy 0.8.3 Vs IDL #229

Open
trmillertr opened this issue Apr 25, 2019 · 5 comments
Open

Population Ratios Discrepancy: ChiantiPy 0.8.3 Vs IDL #229

trmillertr opened this issue Apr 25, 2019 · 5 comments

Comments

@trmillertr
Copy link

Hello ChiantiPy Developers,
I have a large discrepancy between the population ratios determined by ChiantiPy and those by the IDL routines for O V and C III (the ones I have tested). The attached files are the output from both ChiantiPy and IDL containing the density in the first column and the ratio of O V(E=82395 cm^-1) to O V(E= 0 cm^-1) in the second column for a temperature of 100000K. I generated the ChiantiPy ratio by the following commands in ipython:

import ChiantiPy.core as ch
import numpy as np
temp = 100000
density = 10**(np.arange(111)*0.1+3.0)
nion = ch.ion('o_5',temperature=temp,eDensity=density)
nion.populate()
ratio = np.array([x[3] for x in nion.Population['population']])/np.array([x[0] for x in nion.Population['population']])

Similarly, for IDL command line I used:

temperature = 5.0
density = findgen(111)*0.1+3.0
ratio = findgen(n_elements(density))
.run
for(n=0,n_elements(density)-1 do begin
show_pops,8,5,temp=temperature,dens=density[n],popstr,/noprot
ratio[n] = popstr.level[3].pop/popstr.leve[0].pop
endfor
end

Does anyone get what I get? If so, is this a different bug from what has been fixed with the 0.8.3 version? Thank you.
O_V_82385denratioPython.txt
O_V_82385denratioIDL.txt

@kdere
Copy link
Contributor

kdere commented Apr 26, 2019

what I see is that at the highest and lowest densities, the populations are in relative agreement. What I would try is to remove the /noprot since ChiantiPy includes proton-excitation by default.

It is very unlikely that his is the problem the prompted the v0.8.3 release.

hope this helps,
Ken

@trmillertr
Copy link
Author

Hi Ken,
I removed /noprot and it produced negligible differences between the two IDL ratios for a given density (<3%). However, for Python vs IDL ratios, they differ substantially at particular densities. There are two peaks, one between log(ne) 4 and 5 (factor nearly 4.5) and between log(ne) 10 and 11 (factor nearly 2). Attached is the ratio of the Python to IDL values showing this. Do you have any other ideas as to the cause? Thank you,
Tim
O_V_82385denratioPythonDivByIDL.txt

@kdere
Copy link
Contributor

kdere commented Apr 26, 2019

I do not have any ideas at the present time but it does need to be resolved.
I will try to get to it soon.
Ken

@kdere
Copy link
Contributor

kdere commented May 31, 2019

This has been corrected by the latest 0.8.4 release. This is available from the github site and PyPI

In the case of O V, the populations are now quite comparable but not perfect. Other ions often show much better agreement.

thanks for looking into this but for now, I am going to close the issue

@kdere kdere closed this as completed May 31, 2019
@kdere kdere reopened this Jun 13, 2019
@kdere
Copy link
Contributor

kdere commented Jun 13, 2019

Version 0.8.4 mostly corrected the discrepancies. However, it still was not calculating proton rates correctly. This has been corrected in the latest 0.8.5 releasel

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