HII-CHI-mistry-Teff

DESCRIPTION

HII-CHI-mistry-Teff is a python script that calculates the ionization parameter (log U) and the equivalent effective temperature (Teff) using relative emission-line fluxes emitted by ionized gaseous nebulae. The code is described in Perez-Montero et al. (2019, MNRAS, 483, 3322). From version 4 it can also be used to estimate the number of absorbed ionizing photons in a density-bounded geometry (see Perez-Montero et al. (2020, A&A, 643, A80).

Another version of the code calculates Teff and U based on the relative fluxes of emission-lines in the mid-IR. This version, called HCm-Teff-IR, is described in Perez-Montero et al. (2024), where it has been used for a sample of Ultra-Luminous Infrared Galaxies (ULIRGs).

MOST RECENT VERSION

The most recent version for HII-CHI-mistry-Teff is version 5.5.

Regarding infrared, the most recent version is version 2.3. The links lead to the corresponding compressed tar.gz files containing the python files of the codes, the libraries of the models and a file with instructions. Previous versions of the program can be obtained in the History and Downloads section and they can also be found in GitHub.

How to run it

HII-CHI-mistry-Teff has been originally written in python v. 2.7, but from version 5 is only compatible with python 3 (This holds for the IR version). It requires the library numpy (versions previous to v2.0 use the library asciidata).

The program also requires the files of the emission line intensities predicted by the models, calculated assuming different sets of input conditions. All were calculated with Cloudy v.17. These libraries are stored in the folder Library_Teff and include models for single stars (WM-Basic from 30 kK to 60 kK, and Rauch PNe from 80 kK to 120 kK) and black-body (from 30 kK to 100 kK), both for plane-parallel and spherical geometry. The libraries also include from BPASS v.2.1 to calculate the absorption factor of ionizing photons.

To run the program, just type (for v5.5, in other versions use the name of the corresponding python script:
python HCm-Teff_v5.5.py
Once the input file has been specified in the prompt or by direct question, the code will ask about what quantity must be calculated (Teff or absorption factor) and the used models (assumed SED and geometry).
Later, once selected the model SED, the program will ask for the use of a interpolated high-resolution grid (0: non-interpolated or 1: interpolated). This will increase the resolution of the grid in O/H, Teff or f_abs and log U in a factor 10, but it will slow down the calculation. It is also possible to run the code in non-interactive mode is the variable 'interactive' is set to 'False' in the script.

For the IR version, it is all similar, with the exception that the libraries are stored in a folder called Libraries_Teff-IR, and that only Teff and U are calculated.

The input file

It is a separated file written in text format with the information organised as a table whose first row contains the labels for the different columns, corresponding to the identification of each row, the metallicity and the emission line fluxes and their errors. The table can contain columns for other quantities, but the code will only read the following labels:

ID for the identification name of the row
'12logOH and e12logOH:: 12+log(O/H) and error
CIV_1549 and eCIV_1549: CIV] 1549 and error
CIII_1909 and eCIII_1909: CIII] 1909 and error
OII_3727 and eOII_3727: [OII] 3727 and error
OIII_4959 and eOIII_4959: for [OIII] 4959 and its error
OIII_5007 and eOIII_5007: for [OIII] 5007 and its error It is possible to give only one of the two strong nebular [OIII] lines.
SII_6725 and eSII_6725: for the sum of [SII] 6716+6731 and the error. It is possible to give the [SII] lines individually too.
SIII_9069 and eSIII_9069: for [SIII] 9069 and its error
SIII_9532 and eSIII_9532: for [SIII] 9069 and its error. It is possible to give only one of the two strong nebular [SIII] lines
HeI_4471 and eHeI_4471: for HeI 4471 and its error
HeI_5876 and eHeI_5876: for HeI 5876 and its error
HeI_6678 and eHeI_6678: for HeI 6678 and its error
HeII_4686 and eHeII_4686: for HeII and its error
ArIII_7135 and eArIII_7135: for [ArIII] 7135 and its error
ArIV_4740 and eArIV_4740: for [ArIV] 4740 and its error
'NII_6584 and eNII_6584: [NII] 6584 and error

The program will only provide a calculation if at least one of the possible low-to-high emission-line ratios is given (e.g. [OII] and [OIII] and/or [SII] and [SIII] and/or HeI and HeII and/or [ArIII] and [ArIV]), although some other combinations also provide a solution (e.g. [SII] and [ArIII], or πNII] and [SIII]). Then, if only two low-excitation or high-excitation lines are given the program will provide 0 values in the results. The lines must be reddening corrected, but it is not necessary to express them in relation to Hß. If metallicity or other line is unknown for all objects the corresponding column has not to be added, but if no information can be given about a certain line or its error it can be typed as zero.

For the IR version, the possible emission-lines admitted by the code, besides those regarding the ID and the metallicity are:

ArIII_7m and eArIII_7m: [ArIII] 6.98 microns and its error
ArIV_8m and eArIV_8m: [ArIV] 7.90 microns and its error
ArIII_9m and eArIII_9m: [ArIII] 8.99 microns and its error
SIV_10m and eSIV_10m: [SIV] 10.5 microns and its error
NeII_12m and eNeII_12m: [NeII] 12.8 microns and its error
ArV_13m and eArV_13m: [ArV] 13.1 microns and its error
NeV_14m and eNeV_14m: [NeV] 14.9 microns and its error
NeIII_15m and eNeIII_15m: [NeIII] 15.5 microns and its error
SIII_18m and eSIII_18m: [SIII] 18.7 microns and its error
NeV_24m and eNeV_24m: [NeV] 24.3 microns and its error
OIV_25m and eOIeV_25m: [OIV] 25.9 microns and its error
SIII_33m and eSIII_33m: [SIII] 33.7 microns and its error
OIII_52m and eOIII_52m: [OIII] 52 microns and its error
NIII_57m and eNIII_57m: [NIII] 57 microns and its error
OIII_88m and eOIII_88m: [OIII] 88 microns and its error
NII_122m and eNII_122m: [NII] 122 microns and its error
'NII_205m' and 'eNII_205m': [NII] 205 microns and its error

Results

If the input file is correct, the program will ask for the chosen SED and geometry (plane-parallel or spherical) and the use of interpolations and it will begin to calculate the wanted quantities and their corresponding errors.
The information will be displayed on the screen for each object, along with the ratio of completeness of the task.

At the end, the program will create a file called using the name of the input file + "_hcm-output.dat with the information of the used models, the identification of each row, the input emission line fluxes and their errors, the input oxygen abundance, , and four columns with the solutions corresponding to the following information:

T_eff (in K) or f_Abs (in terms of the ratio ionizing absorbed photons over tottal of ionizing photons emitted by the central source)
error of T_eff or f_abs
log U
error of log(U

In case of error, a value '-9999' will be inserted in the corresponding row of the output table.

History and Downloads

Here we list the different versions of the program with links to download them for both the optical and the IR version.


HCm-Teff for the optical



HCm-Teff-IR