HII-CHI-mistry-IR is a python program that calculates, for gaseous nebulae ionized by massive stars or active galactic nuclei, the oxygen abundance in terms of 12+log(O/H), the nitrogen-to-oxygen ratio as log(N/O) and the ionisation parameter as log U, consistently with the direct method. From version 3.1, the code can also supply a solution for sulphur abundance. This is done from the bayesian-like comparison between large grids of photoionization models and observed emission-line intensities in infrared spectral ranges. The methodology and the results are described in Fernández-Ontiveros et al (2021) for star-forming regions, and in Pérez-Díaz et al (2022) for the Narrow -Line Region in AGN.
MOST RECENT VERSION
The most recent version for HII-CHI-mistry-IR is version 3.1. The link leads to a compressed tar.gz file containing the python file of the code, the libraries of the models and the constrains, and a file with instructions. Previous versions of the program can be obtained in the History and Downloads section. They can also be found in GitHub.
How to run it
HII-CHI-mistry-IR has been originally written in python v. 2.7, but from version 3 is only compatible with python 3. It requires the library numpy.
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_IR and include models for star-forming galaxies using spectral energy distributions from POPSTAR and from BPASS v.2.1.
For the NLR in AGNs, the libraries include results from models calculated using a double composite power-law with parameter alpha(UV) = -1.0 and for two possible values of alpha(OX) = -0.8 and -1.2, or assuming different criteria for the stopping of calculations in the models (2% or 98% fraction of free electrons). Nevertheless, in addition the codee also admits grids of models defined by the user.
The code also requires files to constrain the model grids when a limited set of emission-lines are given as input. These are stored in the folder Constrains and can also be edited by the user. These files represent the set of models, limiting the values of log U at each Z , and limiting also the values of N/O as a function of O/H.
To run the program, just type (for v3.1, in other versions use the name of the corresponding python script:
Alternatively it is possible to specify in the prompt the input file and the number of iterations for the Monte Carlo simulation (e.g. python HCm-IR_v3.1.py input.dat 100).Once the input file has been specified in the prompt or by direct question, the code will ask about what SED of models is going to be used:
(1) Young POPSTAR massive cluster
(2) BPASS cluster models atmospheres with binaries
(3) double composite power-law AGN.
If AGN is selected, the code will also ask for the value of alpha(OX). considered in the models and the stopping criterion. Later, once selected the model SED, the program will ask for the template files used to constrain the models and for the possible use of a interpolated high-resolution grid (0: non-interpolated or 1: interpolated). This will increase the resolution of the grid in O/H, C/O and log U in a factor 10, but it will slow down the calculation.
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 and the emission line fluxes and their errors. The table can contain columns for other quantities, but the code will only read the following
ID for the identification name of the row
eHI_4m: HI 4.05 microns and its error
eArIII_7m: [ArIII] 6.98 microns and its error
eHI_7m: HI 7.46 microns and its error
eArIV_8m: [ArIV] 7.90 microns and its error
eArIII_9m: [ArIII] 8.99 microns and its error
eSIV_10m: [SIV] 10.5 microns and its error
eHI_12m: HI 12.4 microns and its error
eNeII_12m: [NeII] 12.8 microns and its
eArV_13m: [ArV] 13.1 microns and its error
eNeV_14m: [NeV] 14.9 microns and its
eNeIII_15m: [NeIII] 15.5 microns and its
eSIII_18m: [SIII] 18.7 microns and its
eNeV_24m: [NeV] 24.3 microns and its
eOIeV_25m: [OIV] 25.9 microns and its
eSIII_33m: [SIII] 33.7 microns and its
eOIII_52m: [OIII] 52 microns and its error
eNIII_57m: [NIII] 57 microns and its error
eOIII_88m: [OIII] 88 microns and its error
eNII_122m: [NII] 122 microns and its error
'NII_205m' and 'eNII_205m': [NII] 205 microns and its error
eOIII_5007: [OIII] 5007 and its error
all of them reddening corrected. It is not mandatory to introduce all lines but, if a line is included in the file and no information exists about it or its error, it must be typed as zero. Notice that contrary to HII-CHI-mistry for the optical the lines do not have to be relative to Hß flux.
If the input file is correct, the program will ask for the chosen SED 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. It will be also added an index indicating if a specific constrain has been used, where
1: the complete grid is used (only if an auroral-to-nebular line is introduced, so in the IR version is not used)
2: the log U limited grid is used
3: the log U and N/O limited grid is used (if, besides, CIII]/OIII] cannot be obtained).
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, and nine columns with the solutions corresponding to the following information:
error of 12+log(O/H)
error of 12+log(S/H)
log(N/O) (-10 if grid 3 is used)
error of log(N/O)
error of log(U) (take with care if constrains 2 or 3 are used)
History and Downloads
Here we list the different versions of the program with links to download them.
- Version 3.1 (2023/08). Now the code performs an independent estimation of sulfur abundances (12+log(S/H)) based on sulfur emission lines. Argon emission lines are now accepted as inputs for the code. More details can be found in Pérez-Díaz et al. (in prep.).
- Version 3.01 (2022/04). Now SEDs for AGNs have been incorporated, using the same models and methodology as described for the optical version of the code in Pérez-Montero et al (2019). Two different values for the parameter alpha(OX) and for the stopping criterion in the models are considered. More details can be found in Pérez-Díaz et al (2022). The code automatically sorts the grid of models to perform the interpolation. A bug related with the output file when additional columns are introduced in the input file has been fixed.
- Version 2.2 (2022/01). The user can now select the constraints to generate limited grids for the code. Libraries with models and constraints are stored in particular folders. Changes in the code to optimize the reading of the files. The output file no longer shows columns with emission lines that were not introduced as inputs. Now high excitation IR emission lines of [NeV] and [OIV] are included.
- Version 2.1 (2021/05). The emission line [NII] at 205 microns has been incorporated to the models, so it can be used for the N23, N2N3 and O3N2 observables to calculate O/H and U. New models from BPASS syntehtic cluster atmospheres, suitable for Extreme Emission Line Galaxies, have been incorporated.
- Version 2.0 (2020/11). Labels for the different columns of the input can be used, so an ID can be use to denote each result and not all emission lines must be included.
- Version 1.1 (2020/07). Based on the architecture of HCm v.4.2 in the optical.