logo HCm  


Back to main page


HCm-Teff is a python script that helps to calculate 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 photons in a density-bounded geometry (see Perez-Montero et al. (2020, ApJ, 643m A80).


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


HCm-Teff has been written in python v.2.7, but from version 3.1 it is also compatible with python 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 and different geometries for the models, including:





representing the whole set of models for different SEDs and geometries as a function of log U, and T*. All were calculated with Cloudy v.17 and WM-basic single-star, black body, and cluster atmospheres for different density-bounded geometries SEDs . 


To run the program, just type in the prompt for version 5.0:


> python HCm-Teff_v5.0.py


The program will ask for the input file with the required emission lines and their errors used to perform the calculation. From version 3.1 it is possible to put in the prompt the name of the input file and the number of iterations for the Monte Carlo simulation (e.g. python HCm-Teff_v5.0.py input.dat 100).


The input file is an ascii file whose first row must be use to declare the labels of the columns. Each row corresponds to one of the objects or pointings for which we want the code to perform the calculations. The columns must have the following information and labels:


'ID': Identification name for each row

'12lgOH' and 'e12lgOH':: 12+log(O/H) 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 'HeI_5876': for HeI 5876 and its error.

'HeII_4686' and 'eHeII_4686': for HeII and its error.

Not all columns are mandatory, but if a certain flux or error is unknown, a 0 can be typed instead., but the uncertainty in the final calculation will be larger. Regarding lines the routine will only provide a calculation if at least one of the three doublets is given (e.g. [OII] and [OIII] and/or [SII] and [SIII]). 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 Hbeta.




If the input file is correctly introduced, the program will ask for the chosen SED, geometry and the use of interpolations for the grids, and it will calculate therequired 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.

In addition the results will be saved on a file whose name is the name of the input file +"_hcm-teff-output.dat".The first column denotes the identification for each row and the next 16 columns of this file will be the input emission lines and their errors and the metallicity. The last four columns will have the following information:


Effective temperature in K (f_abs if required)

error of effective temperature in K (or error of f_abs)

log (U)

error of log(U)

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