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

Question: Support for photons/keV completed? #399

Open
MadFisa opened this issue Oct 7, 2022 · 10 comments
Open

Question: Support for photons/keV completed? #399

MadFisa opened this issue Oct 7, 2022 · 10 comments

Comments

@MadFisa
Copy link

MadFisa commented Oct 7, 2022

Hi,

I have seen that units for flux can be changed using a .chiantirc files. Is the support for flux in photons and wavelength in keV completed?

@kdere
Copy link
Contributor

kdere commented Oct 7, 2022

that was the original intention. There is some support for having the flux in photon that has worked in the past. Have not tried it lately. There is no support for the wavelength in keV. but T(Kelvin)/constants.boltzmannEv should convert to eV.

@MadFisa
Copy link
Author

MadFisa commented Oct 7, 2022

So you would recommend not relying on it (the built-in functions) and instead do it manually?

@kdere
Copy link
Contributor

kdere commented Oct 7, 2022

The use of photons should be OK. I have used it in the past but all of the routine expect a temperature in Kelvin

@MadFisa
Copy link
Author

MadFisa commented Oct 9, 2022

What about wavelengths in keV?

@kdere
Copy link
Contributor

kdere commented Oct 9, 2022

right now, only eV

@MadFisa
Copy link
Author

MadFisa commented Oct 10, 2022

I am sorry, I am confused.
In .chiantirc files, options for wavelength are in angstrom,nm and keV.
But looking through the code and as you mentioned above, it looks like wavelength is actually expected in eV

if self.Defaults['wavelength'] == 'kev':
wvl = const.ev2Ang/np.asarray(wvl)

Isn't the rc file options and code contradictory then?

@kdere
Copy link
Contributor

kdere commented Oct 10, 2022

yes, they are contradictory. I have not looked at the in a long time. Will try to sort it out.

@kdere
Copy link
Contributor

kdere commented Oct 14, 2022

I have looked into this. Implementing the full range of wavelength possibilities is doable for line spectra but would take some work. However, it is more complex for the continua so I am not going to try to implement the wavelength possibilities right now.

@kdere
Copy link
Contributor

kdere commented Oct 15, 2022

I have decided to go ahead an implement the use of units other than angstroms for spectral line calculations. These include nm and energies in eV and keV. However, they will not work in spectral calculations and the user will be warned.

@MadFisa
Copy link
Author

MadFisa commented Dec 2, 2022

I see that it has been implemented in the new release, thank you for your efforts. I think it is better to leave the issue open as the feature has not been implemented fully (since continuum calculation still not work), for future reference.

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