wtbarnes / fiasco

Python interface to the CHIANTI atomic database
http://fiasco.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
21 stars 16 forks source link

Compile a transitions wavelength list for astronomical observations. #335

Open Vital-Fernandez opened 1 month ago

Vital-Fernandez commented 1 month ago

First of all, I would like to thank you for your work on this great package.

I am currently seeking to compile a list of ionic transition wavelengths for use in astronomical spectra observations and would appreciate your guidance on the best way to achieve this with FIASCO.

To provide some context, I maintain a small package called LiMe for measuring lines. The library includes a small table that lists the line names, ions, bands, and wavelengths. I am looking for a more robust way to set the theoretical wavelengths in this table. One approach I have considered is using the wavelengths compiled in Cloudy’s LineLabels.txt file and updating it with each new release.

However, I am wondering if this could be done using FIASCO automatically, specifically by leveraging the .spectrum attribute of Ion objects. Could you please provide any insights on how I might retrieve weighted transitions and their corresponding wavelengths?

Thank you very much for your time and assistance.

jwreep commented 1 month ago

I think this should be able to be done if you create an Ion object, but it might not be in the easiest-to-use form yet.

For example,

iron = fiasco.Element('Fe', 1e6*u.K)
print(iron[5].transitions.wavelength)

This will print the wavelength for each transition of Fe VI, for example. (Looks like there are 1417 of them.). You can also print the upper and lower levels with e.g. iron[5].transitions.upper_level. The electronic configurations can be found in the Level object, for example,

>>> iron[5]._all_levels[10]
Level: 11
Configuration: 3p63d3
Orbital Angular Momentum: P
Energy: 3.285023329586858 eV

The Level and Transitions objects in fiasco.levels I think should have the information you're looking for, but Will can correct me if there's something that might be better.

The one caveat is that these are the transitions in CHIANTI, which was designed with the solar corona in mind, and may not have all transitions that you're looking for. We have open issues to integrate with other atomic databases (#11).

Vital-Fernandez commented 3 weeks ago

Thank you very much @jwreep for your reply. I am going to play a bit with the commands to keep learning how better do this.

wtbarnes commented 3 weeks ago

Thanks for your question @Vital-Fernandez and your interest in fiasco! @jwreep has already answered most of your questions. Just a few follow-up comments/questions:

jwreep commented 3 weeks ago

@wtbarnes, thank you for the clarifications! As an aside, would it be worth adding an all_ions command to generate the list automatically, since we use it so often?

@Vital-Fernandez Hope it works! Let us know how else we might help, or if there's any new or additional functionality that might be useful.

Vital-Fernandez commented 5 days ago

Ty @wtbarnes for your reply. Sorry for no following up on, I am just now going back to the problem.