Population Ratios Discrepancy: ChiantiPy 0.8.3 Vs IDL
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
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
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
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
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
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