Back to main page


HII-CHI-mistry-IR is a python program that calculates, for gaseous nebulae ionised by massive stars, 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, from a set of infrared emission-line intensities consistently with the direct method.
The methodology and the results are described in Fernández-Ontiveros et al (2020)


Each compressed file contains the python file of the code, the libraries of the models and a file with instructions. -


HIHII-CHI-mistry-IR is compatible with python versions 2 and 3. It requires the library numpy. It also needs the files of the emission line fluxes predicted by the models, assuming a different
set of input conditions, including:


representing the whole set of models, the models with constrained values of O/H as a function of log U, and the models with constrained values of O/H as a function of N/O, respectively.

All were calculated with Cloudy v.17 and a POPSTAR SED at an age of 1 Myr and using an IMF of Chabrier.
To run the program, just type for version 2.0

> python HCm_IR_v2.0.py

The program will ask for the input file, unless it has been specified in the prompt with the number of iterations for the Monte Carlo simulation (e.g. python HCm_IR_v2.0.py input.dat 100).


It must be written in text format. the first row must give the labels for the inserted columns. These columns include the line fluxes and errors in arbitrary units of the following emission lines +:

'HI_4m' and 'eHI_4m': HI 4.05 microns and its error
'HI_7m' and 'eHI_7m': HI 7.46 microns and its error
'SIV_10m' and 'eSIV_10m': [SIV] 10.5 microns and its error
'HI_12m' and 'eHI_12m': HI 12.4 microns and its error
'NeII_12m' and 'eNeII_12m': [NeII] 12.8 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
'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

all of them reddening corrected. Not all are mandatory but, If no information exists about a certain line or its error, it must typed as zero. Notice that contrary to
HII-CHI-mistry for the optical the lines do not have to be relative to Hbeta flux.


If the input file is correctly introduced, the program will ask for the chosen grid of models and the use of interpolation in the grid and it calculate the required quantities and their corresponding errors.
The information will be displayed in the screen for each object, along with the ratio of completeness of the task. It will be also added an index saying what grid was used, where

1: the complete grid is used (only ifan auroral line can be used, so it is not available for IR version).
2: the log U limited grid is used
3: the log U and N/O limited grid is used
(if, besides, [NIII]/[OIII] cannot be obtained).

In addition the results will be saved in a file whose name is the name of the input file + "_hcm-output.dat".The first 24 columns of this file will be the input emission lines and it will add the following seven columns:

grid index
error of 12+log(O/H)
log(N/O) (-10 if grid 3 is used)
error of log(N/O)
log U
error of log(U) (tak

Enrique Pérez-Montero. IAA-CSIC
Last update: 2020,November

This program has been made thanks to the financial support from Spanish AYA project Estallidos