MakeMacro
Uses Chianti and Topbase to create the base for macro-atom models.
Use Chianti and Topbase to create a set of data files that can be used as the basis for creating macro-atom models of various ions
Command line usage (if any):
usage:
MakeHMacro.py ion_name nlevels [True]where the ion name is in Chianti notation, e.g c_4 for C IV, fe_25 for Fe XXV and nlevels is the number of energy levels to include in the model
and the optional True implies this is the top ion to include.
Changes as per 27/08/20
usage (in terminal window):
MakeMacro.py ion_name nlevels True/False
Description:
This routine uses ChiantiPy to access the Chianti database for level line and collision information about an ion. It attempts to create MacroAtom versions level and line and collision files from the Chianti data Then the routine retrieves (if necessary) the TopBase photoinization data from Vizier, and constructs photoinization x-sections files that match the level files.
As currently constructed the routine (attaches a line for the next ion up to the level file) so that if one trying to use these data with multiple ions, one needs to make sure to remove all but the highest ion+1 line. As an example suppose you want to construct a model for CIII, CIV, and CV. Then one must remove the last line from the level 5 for c_3 and c_4 but not c_5.
Primary routines:
doit is the routine run from the command line, and creates all of the data needed for a single ion
Notes
There is no guarantee that the file that is produced will be a file that one wants from a physical perspective so this routine should be used with great care.
In order for this program to work, one must have Chianti and ChiantiPy properly installed on your machine.
History:
- 191227 ksl
Coding begun
- 221227 ksl
Relooked at routine, verified it seemed to work and cleaned up some of the comments. The functionality is unchanged.
Functions
|
|
|
Create all of the necessary files for a given atom |
|
Given a set of levels, get the collision information associatred with these levels. |
|
Calculate an absorption oscillator strength from an Einstein A |
|
Extract the information needed to write out the the levels file, and return it as an astropy table. |
|
Given an astropy table that contains all of the levels, get the associated line information. |
|
Obtain the photoionization x-sectons from TopBase. |
|
Read a retrieved TopBase file and make a Sirocco-Photon file |
|
Print out values of information in the Elvlc file that might be used |
|