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

Fe XXIII level populations are noisy #238

Open
wtbarnes opened this issue Apr 28, 2023 · 4 comments
Open

Fe XXIII level populations are noisy #238

wtbarnes opened this issue Apr 28, 2023 · 4 comments
Labels
bug(?) Ion Anything related to the Ion object

Comments

@wtbarnes
Copy link
Owner

wtbarnes commented Apr 28, 2023

The Fe XXIII level populations are all noisy and it is not clear why. This does not happen for Fe XXII or XXIV. It could be that there is an issue with one of the data files, but it is also possible the way I'm solving the level populations leads to noise amplification in the system of equations for particular ions.

This appears to be independent of whether the level resolved corrections are applied or not.

import fiasco
import astropy.units as u
import matplotlib.pyplot as plt

temperature = 10**np.arange(5,8,0.01) * u.K
fe23 = fiasco.Ion('Fe XXIII', temperature)
density = 1e15*u.cm**(-3)*u.K / fe23.temperature
level_pops = fe23.level_populations(density, couple_density_to_temperature=True, include_level_resolved_rate_correction=False)
plt.plot(fe23.temperature, level_pops[:,0,:])
plt.xscale('log')
plt.yscale('log')
plt.ylim(1e-40, 2)
plt.xlim(1e6, 1e8)

image

@jwreep
Copy link
Collaborator

jwreep commented Dec 14, 2023

You may have noticed already, but the noise is not present when couple_density_to_temperature = False:
Figure_1

Is the difference here?

fiasco/fiasco/ions.py

Lines 487 to 490 in bb4670e

if couple_density_to_temperature:
proton_density = (pe_ratio * density)[:, np.newaxis, np.newaxis]
else:
proton_density = np.outer(pe_ratio, density)[:, :, np.newaxis]

@wtbarnes
Copy link
Owner Author

Oh interesting. I actually had not noticed that. What density did you use for the level populations you're plotting there?

@jwreep
Copy link
Collaborator

jwreep commented Dec 16, 2023

I copied and pasted your code in the first comment and just changed that to false out of sheer curiosity.

@wtbarnes
Copy link
Owner Author

Ah ok so it's calculating them over the whole density/temperature grid so that's plotting the level populations at 1e10 cm-3. I wonder if it's the actual coupling that's the problem or if a particular density is leading to the oscillations.

@wtbarnes wtbarnes added bug(?) Ion Anything related to the Ion object labels Jan 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug(?) Ion Anything related to the Ion object
Projects
None yet
Development

No branches or pull requests

2 participants