Inverted level populations of hydrogen atoms in ionized gas

Context. Level population inversion of hydrogen atoms in ionized gas may lead to stimulated emission of hydrogen recombination lines, and the level populations can in turn be affected by powerful stimulated emissions. Aims. In this work the interaction of the radiation fields and the level population inversion of hydrogen atoms is studied. The effect of the stimulated emissions on the line profiles is also investigated. Methods. Our previous nl-model for calculating level populations of hydrogen atoms and hydrogen recombination lines is improved. The effects of line and continuum radiation fields on the level populations are considered in the improved model. By using this method the properties of simulated hydrogen recombination lines and level populations are used in analyses. Results. The simulations show that hydrogen radio recombination lines are often emitted from the energy level with an inverted population. The widths of Hn$\alpha$ lines can be significantly narrowed by strong stimulated emissions to be even less than 10 km s$^{-1}$. The amplification of hydrogen recombination lines is more affected by the line optical depth than by the total optical depth. The influence of stimulated emission on the estimates of electron temperature and density of ionized gas is evaluated. We find that comparing multiple line-to-continuum ratios is a reliable method for estimating the electron temperature, while the effectiveness of the estimation of electron density is determined by the relative significance of stimulated emission.


Introduction
Ionized gas, which is mainly composed of ionized hydrogen and electrons, is a common phase of the interstellar medium (ISM). This gas is usually formed by the extreme-ultraviolet (hν ≥ 13.6 eV) photons emitted from massive stars, post-asymptotic giant branch (post-AGB) stars, supernovas (SNs), or active galactic nuclei (AGNs). Star formation activities and the evolution of massive stars in molecular clouds can be studied from observations toward ionized gas caused by massive stars (Kim et al. 2017;Liu et al. 2021). Hydrogen radio recombination lines (RRLs) and continuum emissions can be used to derive the electron temperature and density of ionized gas (Wood & Churchwell 1989). These basic properties of ionized gas are helpful to determine the effective temperature and the mass of the ionizing star, the chemical abundances of the ionized gas, and the conditions of the ambient medium (Peimbert 1979;Shaver et al. 1983;Afflerbach et al. 1994;Zhu et al. 2019) The line-to-continuum ratio at centimeter and millimeter wavelengths is a common tool used to estimate the electron temperature of the ionized gas with an assumption of local thermodynamic equilibrium (LTE) conditions (Churchwell & Walmsley 1975;Shaver et al. 1983). However, in actual situations, the level populations of hydrogen atoms do not perfectly satisfy the LTE assumption (Sejnowski & Hjellming 1969;Brocklehurst 1970). This could lead to a significant difference between the estimated and the actual electron temperatures (Sorochenko & Borodzich 1965;Höglund & Mezger 1965;Gordon & Sorochenko 2002).
The excitation states of hydrogen can be classified into the cases of population inversion, overheating, thermalization, and overcooling (Strelnitski et al. 1996). In the cases of population inversion and overheating, line emission can be increased by stimulated emission and become higher than that expected under the LTE assumption. When the hydrogen recombination lines are strongly amplified due to the inverted level populations, line masers occur. The first hydrogen recombination line maser source discovered was the young stellar object (YSO) MWC 349A (Martín-Pintado et al. 1989); hydrogen recombination line masers were then also found in other sources (Cox et al. 1995;Jiménez-Serra et al. 2011;Aleman et al. 2018). The first extragalactic hydrogen recombination line maser was discovered in NGC 253 (Báez-Rubio et al. 2018). For some H II regions stimulated emissions are also important, although the line masers cannot be identified (Afflerbach et al. 1994). For these cases, the estimation method under the LTE assumption is not applicable.
In order to improve the accuracy of the estimation, the non-LTE conditions of the level populations of hydrogen atoms have been considered in some previous works (Afflerbach et al. 1994;Báez-Rubio et al. 2013). The accuracy of the departure coefficients of the level populations of hydrogen from the populations under LTE conditions is important for the estimation of electron temperature. The departure coefficients have been studied for more than 50 years (Sejnowski & Hjellming 1969). In early works, the departure coefficients were calculated via the nmodel in which only the transitions between different energy levels were considered (Brocklehurst 1970;Walmsley 1990). The nl-model, which included angular momentum changing transitions, was used in Storey & Hummer (1995), and the calculated values were then applied to specifying the conditions necessary for hydrogen recombination line masers (Strelnitski et al. 1996). Prozesky & Smits (2018) improved the nl-model with the consideration of the effect of the continuum radiation. By using the departure coefficients calculated by the nl-model without the effect of radiation fields, we provided a method for estimating the electron temperature and density of ionized gas from hydrogen RRLs in Zhu et al. (2019). However, the accuracy of this method has not been checked for H II regions with high electron density (n e ≥ 10 4 cm −3 ) and high emission measure (EM), where the departure coefficients could be significantly affected by line and continuum radiation (Prozesky & Smits 2018).
The departure coefficients and the intensities of hydrogen recombination lines were recently calculated under maser conditions by Prozesky & Smits (2020). Both the effects of radio freefree continuum and hydrogen recombination line radiation on the level populations were considered in their work. However, in this model the hydrogen recombination lines are all assumed to have a box profile with the same amplitude as the Doppler profile. This simple assumption cannot reproduce the actual line profiles. Since the optical depth of the hydrogen recombination line is clearly affected by the line width, the fluxes of the hydrogen recombination lines should also be influenced. The broadening of the hydrogen recombination line is related to the velocity field, electron temperature, and density (Peters et al. 2012). Conversely, line masers can also influence the widths of the hydrogen recombination lines (Thum et al. 1995). Moreover, the spectral simulation code CLOUDY (Ferland et al. 2017) can also treat hydrogen recombination lines under maser conditions. The radiation fields and realistic line profiles are included in this code (Guzmán et al. 2019). However, the effects of the radiation fields and line profiles on hydrogen level populations have not been explored with CLOUDY in previous works.
In this work we improve the nl-model produced in Zhu et al. (2019) with the effects of the radiation fields due to the hydrogen recombination lines and the continuum emission. The effects of the line and continuum radiation fields on the departure coefficients are studied. The relation between the line profile and the emissions of the hydrogen recombination lines is also investigated. The performance of the estimation method to derive the electron temperature from the line-to-continuum ratio under LTE assumptions for ionized gas with a series of properties is presented. Finally, we test the reliability of the estimated properties of H II regions by using hydrogen recombination lines and the continuum emissions in multiple wavebands.

The calculation of departure coefficients in Case B
The accuracy of calculations of level populations and departure coefficients of hydrogen atoms is important for the simulation of hydrogen recombination lines and continuum emission. Level population equations consists of a series of linear equations (Salgado et al. 2017;Prozesky & Smits 2018), and can be written in matrix form as where the elements of matrix A and vector y refer to the processes of different transitions from or to the state nl. The vector b is composed of the partial departure coefficients (b nl ). Then, by solving the matrix equation, b nl can be obtained. An iterative method for evaluating b nl is described in Brocklehurst (1971), and is also used in Storey & Hummer (1995) and Salgado et al. (2017). In that method, the values of b nl with the same principal quantum number n are solved simultaneously with a n×n matrix, while the partial departure coefficients with the other principal quantum numbers are treated as known quantities in the equations. Prozesky & Smits (2018) used a direct solver to calculate the departure coefficients, and provide an error estimate of the quality of the results derived from the norms of the matrix and vectors as This value can be used to estimate the convergence of the departure coefficients. In our previous work, an algorithm to calculate the departure coefficients (b n ) was used in the case when the radiation field does not have a significant effect on level populations (Case B) (Zhu et al. 2019). The iterative method was used in the algorithm, and the calculations were terminated if the largest difference of departure coefficients between two iterations ∆b t n = |b t n − b t−1 n | is less than 1 × 10 −6 , where t means the sequence number of iterations. This criterion could be too simple. In this work we directly solve the matrix equation. The error estimate is ∼ 3 × 10 −5 in all the cases. The convergence should be reached with this value of the error estimate.
However, as mentioned in Zhu et al. (2019), the resulting departure coefficients of our method are closer to the results provided in Storey & Hummer (1995) than those in Prozesky & Smits (2018), although the rates of transition processes we used are similar to those in Prozesky & Smits (2018). More checks were done, and they confirm the reliability of our results. The details are presented in Appendix A.
The amplification coefficients (β n,n+1 ) with the principal quantum number n calculated by this algorithm for different electron densities (n e ) are presented in Fig. 1. The amplification coefficients represent the departure of the level population ratios from their LTE values (Strelnitski et al. 1996;Prozesky & Smits 2018). Shown in Fig. 1, the result is similar to those calculated in the previous works in the literature (Storey & Hummer 1995;Strelnitski et al. 1996). The ranges of principal quantum number n in the cases of population inversion (β n,n+1 < 0), overheating (0 < β n,n+1 < 1), thermalization (β n,n+1 = 1), and overcooling (β n,n+1 > 1) are shown, while the locations and the widths of these ranges changing with n e are also presented. The center of the valley of β n,n+1 is closer to the left side of the low principal quantum number with high electron density n e , while the width and depth of the valley rises with decreasing n e . The result shows that population inversion is a common phenomenon for hydrogen radio recombination lines. This motivates us to study in detail the significance of the stimulation effect due to population inversion under different conditions. The level populations of hydrogen atoms could be influenced when stimulated emission is important. So in this work, the effects of the line and continuum radiation fields on the level populations and departure coefficients are both added to the new algorithm. efficients. Ionized gas is homogeneous and isothermal. In the calculation the initial conditions include electron temperature (T e ), electron density (n e ), and emission measure (EM). In the beginning the departure coefficients are derived by directly solving the matrix equation of level populations with no radiation fields. In the second step these values of departure coefficients are used to calculate the mean intensities of incident radiation fields due to line and continuum emissions. Then the departure coefficients are calculated with the intensities of the incident radiation fields, while the new values of the intensities are estimated from the new departure coefficients. This process is operated iteratively until the values of the departure coefficients converge.
Because the radiation fields and the calculated departure coefficients are inter-related, the error estimate derived from the solution of the matrix equation cannot directly be used to evaluate the convergence. We replace b t (the vector b composed of b nl in the current step t) with b t−1 in the last step t − 1 to calculate the error estimate, and terminate the calculation when the two error estimates calculated with b t and b t−1 are approximately equal. This is a reasonable stopping criterion since the values of b t and b t − 1 should be very close when the iterative calculation has converged. It is also found that the ∆b t n is always lower than 10 −9 when the calculation converges.
In addition, the mean intensity of line and continuum radiation fields (J ν ) need to be calculated in order to evaluate the effects of the radiation fields on the level populations. However, for a cloud of ionized gas, J ν should be treated nonlocally in principle with different quantities in every volume element. This would make the calculations very time consuming, so following Kegel (1979), we assume that the electron temperature, density, absorption coefficient (κ ν ), and source function (S ν ) are all homogeneous, and then the mean intensity of the incident radiation field is where τ ν is the optical depth at the frequency ν and e −τ ν is also called the escape probability. However, the box line profile as a further simplification used in Kegel (1979), Koeppen & Kegel (1980), and Röllig et al. (1999) is not assumed in this work. As defined in Hummer & Storey (1987), the mean radiation field is where φ ν is the line profile function (Peters et al. 2012). In the calculation of departure coefficients, we replace the term J ν in Eq. (5) of Prozesky & Smits (2018) withJ. Moreover, for the transitions about n = 1, the Lyman transitions are still assumed to be optically thick, and the collisional excitations from n = 1 and n = 2 states are also ignored, as in Zhu et al. (2019).

Radiative transfer
In this work only the hydrogen recombination lines and the continuum emission are considered to be the radiation fields that could affect the level populations of hydrogen atoms. The radiation from sources out of the ionized gas such as the stellar radiation field and the cosmic microwave background, and the emission from dust are not included since the influences of these emissions are generally weak (Prozesky & Smits 2018). In addition, the gas temperature is assumed to be equal to the electron temperature. For uniform ionized gas, the continuum absorption coefficient κ ν is derived by Oster (1961)  & Sorochenko (2002) with the Rayleigh-Jeans approximation (hν kT e ), which is evaluated numerically as κ ν,C = 9.770 × 10 −3 n e n i ν 2 T 1.5 e [17.72 + ln T 1.5 where n e and n i are respectively the number densities of electrons and ions in units of cm −3 , T e is the electron temperature in units of K, ν is the frequency in Hz, and κ ν,C is in units of cm −1 . The continuum optical depth is τ ν,C = κ ν,C D with the line-ofsight (LOS) depth D. Then the free-free continuum emissivity j ν,C and the intensity of the continuum emission I ν,C are and where B ν (T e ) is the intensity of a blackbody at temperature T e and frequency ν. The line absorption coefficient at frequency ν for the transition from lower level n to higher level m including the processes of absorption and stimulated emission is Article number, page 3 of 25  proofs: manuscript no. 42305corr where N n is the total number density of hydrogen atoms with the principal quantum number n, N nl is the number density of those of level nl, and l is the angular momentum number. Similarly, B nm and B nlml are the Einstein coefficients for absorption and stimulated emissions of the corresponding transitions, and they are derived from the spontaneous Einstein coefficients A mn and A ml nl (Brocklehurst 1971;Prozesky & Smits 2020). The parameter φ ν is the line profile function. Following Gordon & Sorochenko (2002) and Peters et al. (2012), when calculating the profiles of the hydrogen recombination lines, the line profile function is calculated by considering the thermal, velocity field, and pressure broadenings. The population of hydrogen atoms in level n under the LTE assumption is (Peters et al. 2012) where k is the Boltzmann constant, h the Planck constant, E n is the energy of level n below the continuum, and m e is the electron mass. The emission coefficient of a hydrogen recombination line is where κ LTE ν,L is the line absorption coefficient calculated with the LTE level populations. The source function S ν is provided by where β n,m is the amplification coefficient given by The total intensity and the observed line intensity at the frequency ν for a uniform H II region are respectively given by and where the total optical depth is τ ν = κ ν D. The total absorption coefficient is κ ν = κ ν,C + κ ν,L , and this value may be negative if the contribution of the stimulated emission is more than that of absorption. The line absorption coefficient can also be presented as κ ν,L = b n β n,m κ LTE ν,L . In this paper, the results of a series of simulations are presented. The effect of the radiation field on level populations of hydrogen atoms is considered in almost all of the simulations except for those especially indicated. On the contrary, the effect of the velocity field is only included in the simulations whose results shown in Fig. 5 in Sect. 3.2. In addition, the one-layer model is used in all the simulations, except where a "two-layer" model is included in the calculations in Sect. 3.6.

Variations in departure and amplification coefficients with radiation field
In order to assess the effect of radiation fields on the departure coefficients b n and the amplification coefficients β n,n+1 , we compared the values of b n and β n,n+1 calculated by using the non-LTE method with and without the effect of the line and continuum radiation fields. The results in the conditions of different electron temperatures and densities were analyzed, and the radiation fields were found to have a similar effect on b n and β n,n+1 . As an example, one case with electron temperature T e = 10000 K and electron density n e = 10 6 cm −3 is presented. The comparisons of b n and β n,n+1 are presented in the top and middle panels of Fig.  2. By adjusting the value of EM, the intensity of the radiation field is changed in the calculations. It is clear that the distortions of b n and β n,n+1 increase with the intensity of the radiation field. The saturation intensity (J s ) is introduced by Strelnitski et al. (1996) as a criterion compared with the mean intensity of the radiation fields (J ν ) to estimate the degree of saturation. In the bottom panel of Fig. 2 the comparison of the mean intensities of the radiation fields and the saturation intensity is shown. The saturation intensity first decreases and then increases with the principal quantum number n. This occurs because the decay rate is dominated by the spontaneous decay at low energy level n and by the collisional decay at high energy level n, and the former decreases with the energy level while the latter increases. From the results shown in Fig. 2, it is unsurprising that the saturation intensity can be a rough criterion to evaluate the influence of the radiation fields on b n and β n,n+1 . For the case of EM= 1.0 × 10 10 cm −6 pc, J ν is lower than J s for all the Hnα lines, and the distortion of b n and β n,n+1 are also very slight. The mean intensities J ν corresponding to EM= 3.0 × 10 10 and 5.0 × 10 10 cm −6 pc are higher than J s for a range of Hnα lines, and the values of b n and β n,n+1 at the corresponding principal quantum numbers n are changed significantly, but this criterion is still not very accurate. On the two sides of the valley of β n,n+1 , the values of b n and β n,n+1 can be changed significantly even if J ν is lower than J s . The stimulated emission triggered by the saturated masing line from n + 1 to n strongly increase the population of the lower level n and decreases that of the upper level n + 1. This effect can decrease the population inversion between levels n and n + 1. However, it can also increase the population inversions between the levels n − 1 and n, and between n + 1 and n + 2 if the stimulated emissions of the adjacent lines of n + 2 to n + 1 and n to n − 1 are relatively weak (Strelnitski et al. 1996;Prozesky & Smits 2020). Since the radiation field is saturated (J ν > J s ) in the range of n ∼ 20 − 50 corresponding to the valley of β n,n+1 at the conditions of EM= 3.0 × 10 10 and 5.0 × 10 10 cm −6 pc, the population inversion is weakened in the center and strengthened on the two sides of the valley of β n,n+1 .
The total optical depths (τ ν ) and the total intensities (I ν ) including the line and continuum intensities calculated with different EMs are presented in Fig. 3. The black lines represent the values derived from the departure coefficients b n calculated without the radiation fields, while the red lines represent the values calculated with the effect of radiation fields. The distortions of b n and β n,n+1 shown in Fig. 2 are clearly amplified in the intensities and optical depths displayed in Fig. 3. The intensities of the stimulated lines could be overestimated considerably in the center of the masing range and underestimated on the two sides if the radiation fields are not included in the calculations of b n and β n,n+1 . This is not surprising because of the effect of radiation fields on the population inversion mentioned above. In addition, the effect of the radiation fields causes the valley of the optical depth to be shallower and wider. For the conditions of EM= 3.0 × 10 10 and 5.0 × 10 10 cm −6 pc, the ranges of τ ν < −1 are wider when the radiation fields are considered. In the literature, a typical maser is thought to occur if the total optical depth τ ν < −1 (Strelnitski et al. 1996;Thum et al. 1998;Prozesky & Smits 2020). Strelnitski et al. (1996) suggested that saturated higher frequency masing lines could "attract" adjacent lower frequency lines to exhibit masing, and this is confirmed by the numerical calculation in Prozesky & Smits (2020). Our results show that it is also possible for saturated lower frequency masing lines to attract adjacent higher frequency lines to be masing.
In Fig. 4 the frequency-integrated intensities of the Hnα lines and the total optical depths τ ν calculated with the LTE assumption are compared to those calculated without the LTE assumption. In this case, as an example, the electron density n e is 3.0 × 10 6 cm −3 , and EM is assumed to be 10 11 cm −6 pc. As displayed in the top panel, the stimulated emission could raise the line intensity by several magnitudes more than the LTE intensity, even with a thick continuum optical depth (τ ν,C > 1). This difference of line intensities is kept until β n,n+1 and b n increase to be 1 at high energy level n. dν with different turbulence velocity fields are presented. The optically thin assumption is commonly used in the analyses of observations, and leads to the LTE value being overestimated when the actual optical depths of continuum and line are high (Kim et al. 2017;De Pree et al. 2020). In this case the electron temperature and density are T e = 10000 K and n e = 10 6 cm −3 , respectively, while EM is 3 × 10 10 cm −6 pc. The root mean squares of the velocity field σ v are adjusted to be 0, 10, and 20 km s −1 . From the recent observations for the H40α line toward ultra-compact H II regions (Liu et al. 2021), the assumptions of the velocity fields are appropriate. It is clear in the top panel of Fig. 5 that the intensity of the hydrogen recombination line is significantly affected by the line profile function. The greater broadening due to the stronger turbulence would widen the line profile so that the absolute value of the optical depth is reduced. This weakens the stimulated emissions, and reduces the distortions of β n,n+1 from the values calculated without the radiation fields, as presented in the bottom panel of Fig. 5.
The electron temperature T e is also an important condition that affects the properties of the hydrogen recombination lines. The width of the line profile function is influenced by temperature. The continuum absorption coefficients and the LTE line absorption coefficients both decrease with increasing temperature. The level populations, the departure coefficients and the amplification coefficients are also affected by the electron temperature. and κ LTE ν,L . As shown in the bottom panel, the negative value of β n,n+1 is more significant when the temperature is higher, but the value of κ LTE ν,L decreases with increasing temperature. Since the absolute value of the product of β n,n+1 and κ ν,L decreases with increasing electron temperature, the contribution of simulated emission to the hydrogen recombination line emission increases with decreasing temperature. This trend is clearly shown in the top panel of Fig. 6.

Widths of masing Hnα lines
In addition to the effect of the velocity field of ionized gas, the widths of hydrogen recombination lines are mainly determined by thermal and pressure broadenings when the optical depth is thin and the stimulated emissions are not important (Gordon & Sorochenko 2002). When line masers occur, the line widths can be narrowed because the amplification of intensity at the line center is much greater than that at the sides, due to the approximately exponential increase in stimulated emissions with the absolute value of the optical depth (Strelnitski et al. 1996). The variations in the widths of the Hnα lines are plotted in Fig. 7, which shows the maser effect on the widths of Hnα lines. The change in the line widths with n also indicates the influence of pressure broadening. Pressure broadening can increase the widths of hydrogen recombination lines. The effect of pressure broadening is important when electron density n e is high, and it increases with n for Hnα lines. The effect of the line maser on line width can be neglected when the pressure broadening is very large due to high values of n e and n. However, the maser effect can still significantly decrease the widths of Hnα lines when the influence of pressure broadening is low. The results in Fig. 7 show that the maser effect may reduce the full width at half maximum (FWHM) of the Hnα line profile by several km s −1 . For a H II region with a low equilibrium temperature of T e ∼ 5000 K, the FWHM of the Hnα line may even be lower than 10 km s −1 . In addition, although only the narrow Hnα line widths with n<70 are shown in Fig. 7, the widths of Hnα lines with high n will also be narrowed by the maser effect when the electron density becomes lower than 10 5 cm −3 . Comparing the results presented in the top three panels of this figure, it is clear that the maser effect increases with EM. According to our calculations, the reduction in hydrogen recombination line widths due to line   masers is significant (> 2 km s −1 ) only if the EM is higher than 3.0 × 10 7 cm −6 pc. This range of EMs corresponds to the conditions of hyper-compact, ultra-compact, and compact H II regions (de la Fuente et al. 2020b).
Some cases of hydrogen recombination line maser have been detected in previous observations (Martín-Pintado et al. 1989;Cox et al. 1995;Jiménez-Serra et al. 2011;Aleman et al. 2018). In the case of MWC349, comparing the widths of the H26α, H27α, H36α, and H40α lines in Table 2 of Thum et al. (1995), the ∼ 11 km s −1 widths of the red and blue components of the H26α and H27α lines are narrowed by the stimulation effect. The difference between the widths of the broad component of the H30α and H38β lines also shows the effect of stimulated emission. In addition, many H II regions with narrow hydrogen recombination lines have been discovered (Lockman 1989;Planesas et al. 1991;Anderson et al. 2011;Chen et al. 2020). Although "cool" nebulae with low electron temperatures because of high metal abundances can lead to these narrow lines (Shaver 1970;Shaver et al. 1979), the maser effect is also a natural explanation for these phenomena. T e =8000 K T e =10000 K T e =12000 K n e =10 6 cm -3 EM=3 10 10 cm -6 pc 3.4. Line optical depth leading to observable line masers Goldberg (1966) pointed out that the hydrogen recombination line intensity, increased by the strong stimulated emission, with a negative line optical depth τ ν,L can be significantly higher than its LTE value, even if the total optical depth τ ν is still positive. However, Strelnitski et al. (1996) claimed that a total optical depth much lower than -1 is necessary to produce an observable maser amplification.
From our calculation of the case mentioned in Sect. 3.1 and shown in the top panel of Fig. 4, we find that the ratio of the non-LTE Hnα line intensity to the LTE value with high energy level n > 48 and positive τ ν is even higher than that with considerably negative optical depth τ ν < −1 at low energy level n < 48. The profiles of the H30α, H50α, and H70α lines are presented in Fig. 8 along with the LTE profiles of these lines. At the H30α line center, τ ν = −3.84 and τ ν,L = −4.13. The peak brightness temperature T b of the H30α line is higher than the T b under the LTE assumption. For the center of the H50α line, τ ν,C = 7.73 is thick, τ ν = 0.10 is positive, and the line optical depth τ ν,L = −7.63 is significantly lower than -1. The brightness temperature T b of the continuum emission is 9995.6 K because of the very thick continuum optical depth, and the line center of the H50α line even reaches 9.9 × 10 4 K. The LTE line center is only 4.4 K, which is several orders lower than the non-LTE line strength. n e =1 10 6 cm -3 n e =5 10 6 cm -3 n e =1 10 7 cm -3 n e =5 10 7 cm -3 n e =1 10 8 cm -3  The width (FWHM) of the H50α optical depth profile function is 22.9 km s −1 , while the FWHM of the H50α line profile is only 13.0 km s −1 because the maser effect is important. On the other hand, due to the relatively thick optical depth, the FWHM of the H50α line will be 36.6 km s −1 if the LTE assumption is used. In addition, for the center of the H70α line, τ ν = 65.9 and τ ν,L = 0.32. The level population is overheating, and the amplification coefficient is β 70,71 = 0.14. The temperature T b at the line center is 292 K. On the contrary, the emission at the center of H70α will be negligible due to the very high optical depths if the LTE assumption is used. The H II regions B2 and G2 in W49A observed by De Pree et al. (2020) show very high EM > 5 × 10 9 cm −6 pc. Although the corresponding continuum optical depth should be higher than 18, the H92α line in these sources can still be detected. This cannot be explained under the LTE assumption, whereas inversion or overheating of the level population should exist. Under non-LTE conditions, the stimulated emission produced by a population inversion could make the corresponding hydrogen recombination line detectable even if the continuum optical depth is very thick.

Significance of stimulated emissions
In the preceding sections we show results only for hypercompact H II regions. However, the stimulated emissions still show significant influence in more classical H II regions. We use the classification of H II regions provided by de la Fuente et al. (2020b) in the subsequent analyses of the importance of stimulated emissions.
The ratios of non-LTE Hnα line intensities to LTE values ( I ν,L dν/ I LTE ν,L dν) for the typical conditions of ultra-compact, compact, and extended H II regions are plotted in Fig. 9. The ratio decreases quickly with decreasing n when the principal quantum number n is lower than 20. Then after a small decline in the range of n ≈ 20 − 40, the ratio increases monotonically when the n is higher. When the principal quantum number n is low, the line and continuum optical depths are very small. Then the ratio is approximately equal to the departure coefficient at the upper level. When the optical depths increase with n, stimulation has a gradually more important influence on the Hnα line intensity. Moreover, the significance of stimulation is greatly influenced by EM. For ultra-compact H II regions, the Hnα line intensities in the range of n > 60 under non-LTE conditions are higher than those under LTE conditions; the non-LTE values are lower than the LTE values for extended H II regions until n exceeds 105.
As mentioned above, the ratio of non-LTE Hnα line intensity to the LTE value increases with n if the small decline in the range of n ≈ 20 − 40 is ignored. We define n low crit as the biggest n with which the non-LTE Hnα line intensity is more than 15% lower than the one in LTE. And n high crit is defined as the smallest n with which the non-LTE Hnα line intensity is more than 15% higher than the LTE value. Then the Hnα lines in the range between n low crit and n high crit can be treated under the LTE assumption with an error < 15%.
The values of n low crit and n high crit at different n e and EMs for T e = 5000 K and 10000 K are listed in Table 1. Temperatures of T e = 10000 K are typical for H II regions, and the values for T e = 5000 K can display the conditions in low-temperature H II regions. The upper limit of the Lyman continuum photon production rate (N c ) is assumed to be 1.5 × 10 50 s −1 corresponding to the rate of a young massive star cluster (Nguyen-Luong et al. 2017). For a spherical and uniform H II region, N c can be calculated from T e , n e , and radius r = D/2 by using Eq. A4 in de la Fuente et al. (2020b). Conversely, the r and EM for given T e and n e can be estimated from N c . Considering that H II regions might be not spherical, the upper limit of EM is assumed to be 2 times of the value of EM calculated from the upper limit of N c with given T e and n e under the assumption of spherical H II regions. Furthermore, the lower limit of EM is calculated from the N c = 10 44 s −1 corresponding to the value of an ∼ 8 M massive star (Diaz-Miller et al. 1998).
As is shown in Table 1, the range of n between n low crit and n high crit gradually becomes narrow with the increase in EM. The Hnα lines in the centimeter waveband (60 ≤ n ≤ 129) are often used to derive the LTE temperature (T * e ) under the LTE assumption as a close estimate of the actual T e (Shaver et al. 1983;Wilson et al. 2015). In our calculations, the LTE approximation for most of the centimeter Hnα lines is appropriate when EM is lower than 10 6 cm −6 pc. On the contrary, in the cases of ultraand hyper-compact H II regions with EM> 5 × 10 7 cm −6 pc, the deviation from the LTE approximation is commonly significant for the centimeter Hnα lines. Some of the millimeter Hnα lines (28 ≤ n < 60) may be useful to accurately estimate the actual T e under the LTE approximation for ultra-compact H II regions, but the suitable range of n is often narrow and changes strongly with EM. So a precise estimate of EM is necessary to determine the range of Hnα lines suitable for the LTE approximation. For hyper-compact H II regions, the suitable range of n changes greatly with T e and n e . Even if the EM is known, no Hnα lines can be assured to be appropriate for the LTE approximation before T e and n e are obtained.

Effect of population inversion in extended H II regions around ultra-compact H II regions
The results presented in Table 1 seem to suggest that the contribution from stimulated emission to the centimeter Hnα lines is relatively weak and lower than 15% if EM< 10 6 cm −6 pc. However, as for the case of the extended H II region (n e = 10 2 cm −3 and EM= 10 5 cm −6 pc) plotted in Fig. 9, there could still be an approximately 10% difference between the non-LTE and LTE line intensities. If T e and n e are lower, the difference will be bigger. Furthermore, the stimulation effect could be much strengthened if the low-EM H II region has strong emission in the background.
Some ultra-compact H II regions have been found located near extended free-free emission (EE) (de la Fuente et al. 2020a,b). de la Fuente et al. (2020a) suggest that EE seems to be common in ultra-compact H II regions. The EM of an EE is typically 10 4 − 10 5 cm −6 pc, and the n e is ∼ 10 2 cm −3 (de la Fuente et al. 2020b). However, since large-scale structures of ionized gas are easy to miss in interferometric observations (Wood & Churchwell 1989), the contribution to hydrogen recombination lines from the extended component are probably overlooked. Two cases including an ultra-compact H II region + EE, and a hyper-compact H II region + EE are calculated. The T e is 10000 K in both cases. The values of n e are 10 6 , 10 5 , and 10 2 cm −3 for the hyper-compact regions, ultra-compact H II regions, and the EE, respectively, and the corresponding EMs are 10 8 , 5 × 10 7 , and 10 5 cm −6 pc. The high-density region and the extended region are assumed to have the same LOS velocity. Since the high-density H II region is embraced by EE, the EE is treated as a component in front of the high-density H II region. The hydrogen recombination lines passing through both the high-density and extended regions are studied.
The profiles of the H110α line in the three cases are shown in Fig. 10. The line profiles calculated respectively from hyperand ultra-compact H II regions and EE as a single component are also plotted. Compared with the line profiles from single components, it is clear that the population inversion in the EE can significantly strengthen the line emission from ultra-or hypercompact H II regions. Especially in the case of hyper-compact H II regions + EE, the part of the line emission contributed from the hyper-compact H II region is very broad. Its broad profile can be regarded as the baseline. If so, the part attributed to the stimulated emissions from the EE will be mistakenly treated as the line emission mainly emitted from the hyper-compact H II region. In addition, the line widths are also influenced by the EE. The widths (FWHMs) of the H110α line just emitted from the hyper-and ultra-compact H II regions are 870 km s −1 and 92 km s −1 , respectively. Then they become much narrower, 23 km s −1 and 49 km s −1 after the line emission passes through the EE.
When observing the Hnα lines from the hyper-and ultracompact H II regions, it is meaningful to evaluate the contamination from the EE. Compared with the line emissions just emitted from hyper-and ultra-compact H II regions, whether the contribution of the stimulated emissions from the EE needs to be considered is determined by the line optical depth τ ν,L of the EE and the ratio of I ν,L /I ν,C of the line and continuum emissions before passing through the EE. For hyper-compact H II regions with high electron density and EM that lead to very low I ν,L /I ν,C , the stimulated emission from EE may increase the peak T b of the Hnα line by more than 15% when n > 85. Even if the EM of the EE is only 10 4 cm −6 pc, the stimulated emission is still non-negligible when n > 100. For ultra-compact H II regions embraced by the EE with EM= 10 5 cm −6 pc, the stimulated emission needs to be considered when n > 100. The LTE temperature (T * ), which is the electron temperature estimated from the line-to-continuum ratios under the LTE and optically thin assumptions, has been commonly used to evaluate the actual electron temperature of ionized gas. However, the LTE temperature T * may be significantly different from the actual electron temperature T e (Afflerbach et al. 1994;Gordon & Sorochenko 2002). In Figs. 11 and 12, the variations in the LTE temperature T * with the values of EM and n e of the ionized gas are presented. These LTE temperatures are estimated from the ratios of the frequency-integrated intensities of a series of Hnα lines to the continuum intensities at the corresponding frequencies. We calculated the case for an actual electron temperature T e = 10000 K only. From the results displayed in Figs. 11 and 12, the deviation of the LTE temperature from the actual temperature is mainly determined by the departure coefficient b n when the continuum optical depth is very thin. If the departure coefficient b n is close to 1 due to high electron density or high energy level n, the LTE temperature will be relatively accurate. When the continuum optical depth increases, the values of T * could be lower due to the increasing effects of the stimulated emission on the Hnα line emitted from the energy level n without the LTE condition. If the LTE condition is approximately satisfied in the energy levels n and n+1, the LTE temperature estimated from the Hnα line will increase with the continuum optical depth. By using these hydrogen radio recombination lines, the actual electron temperature can hardly be evaluated from the LTE temperature if the continuum optical depth is τ ν,C > 0.1 and the electron density n e is unknown.

Deriving properties of ionized gas with line-to-continuum ratios of multiple RRLs under non-LTE conditions
Using multiple line-to-continuum ratios at different wavebands may be a good method for estimating the electron temperature and density of ionized gas, which had been used for the ultracompact H II region G29.96-0.02 with the departure coefficients calculated using the n-model (Afflerbach et al. 1994). However, just being successfully applied to one case does not prove that this method will work well in other situations. To study the applicability of this method, we performed a systematic analysis. As observable parameters, the line-to-continuum ratios of the α lines of hydrogen and continuum intensities at given frequencies can be used to derive T e , n e , and EM, with the method using multiple line-to-continuum ratios under non-LTE conditions. However, systematic errors or deviation in this method need to be checked. Line-to-continuum ratios for every α line of hydrogen and continuum intensities at given frequencies can be derived based on our non-LTE model, with given values of T e , n e , and EM for one ionized region. Uncertainties in the observations, including flux calibration and white noise, should be considered during such calculation. From the simulated line-tocontinuum ratios with observational uncertainties, the estimated T e , n e , and EM can be compared with the input parameters. The reliability of the estimation method is then assessed.
We give an example of the results of this calculation including the information of H30α, H40α, and H60α line intensities to the continuum intensities at the corresponding frequencies with the method using multiple line-to-continuum ratios. In addition, the continuum intensity at the frequency of 99.023 GHz is also used. This can significantly improve the estimation accuracy.
For one case of an ionized region, we first calculate the frequency-integrated line intensities and the continuum emission intensities at the corresponding frequencies for the given values of T e , n e , and EM, based on our model. Three line-to-continuum ratios are then derived. After that, a group of four random numbers are generated from the normal distribution based on the calculated values of the three line-to-continuum ratios and the 99.023 GHz continuum intensity. The calculated values are taken as the means of the normal distributions. We assume the uncertainty in the ratio observations to be 3% and 10%, and the uncertainty in the continuum intensity observation to be 3%. These uncertainties are used as the standard deviations. The four random numbers in one group are used to simulate the four quantities measured in observations. Then values of T e , n e , and EM are adjusted until the resulting line-to-continuum ratios and the 99.023 GHz continuum intensity fit the simulated values. The least-squares method is used in the fitting process. After the process mentioned above is repeated many times, a series of best fit values of T e , n e , and EM are then derived from many groups of four random numbers. These best fit values create the distributions of the estimated T e , n e , and EM. Finally, the mean values and the uncertainties of these estimated quantities are calculated from the distributions.
In Table 2, the resulting estimates of T e for hyper-compact H II regions are given. The mean values and the corresponding 1 σ uncertainties are presented with the assumed uncertainties (σ/µ) of the line-to-continuum ratios of 3% and 10%; the uncertainty of the continuum emission at 99.023 GHz is always assumed to be 3%. According to the results shown in the table, the mean values of the estimated electron temperatures T e are always close to the actual temperature T e = 10000 K. In addition, the relative uncertainties of the estimated temperatures are mostly lower than 8% and 2% for 10% and 3% uncertainties of the line-to-continuum ratios, respectively.
In Table 3, the estimated T e for the cases of ultra-compact, compact, and extended H II regions are given. The hydrogen recombination lines used in the estimation method are the H40α, H80α, and H120α lines. The 99.023 GHz continuum intensity is still used in these cases. The estimated values of T e for these relatively low-density H II regions are still very accurate, as in the cases for hyper-compact H II regions. This suggests that a believable estimate of electron temperature can be obtained by using this estimation method.
The LTE temperatures T * estimated with a single line-tocontinuum ratio under the LTE assumption for the corresponding cases of H II regions are also given in Tables 2 and 3. The uncertainty of T * is approximately proportional to 0.87 times the uncertainties of the corresponding line-to-continuum ratio because the LTE temperature is about T * ∝ ( I LTE ν,L dν/I ν,C ) −0.87 (Gordon & Sorochenko 2002). In general, the deviation between the LTE temperature and the actual temperature is mainly affected by the difference between the frequency-integrated line intensities under non-LTE and LTE conditions. If the non-LTE Hnα line intensity is significantly different (> 15%) from that under LTE, the LTE approximation should not be used. Additionally, the systematic deviation of the non-LTE method using multiple line-tocontinuum ratios is very slight in estimating electron temperature. This is different from the LTE method. Therefore, even if the difference between the line intensities under non-LTE and LTE conditions is not great (< 15%), the method using multiple line-to-continuum ratios is still preferable when a high precision of estimated electron temperature is required.
Moreover, the estimated values of the electron density n e and the EM are also displayed in Tables 2 and 3. The value of the optically thin continuum emission is very sensitive to EM but relatively insensitive to T e and n e . This makes the estimated values of EM very accurate if the continuum optical depth is thin. In addition, by using the multiple line-to-continuum ratios, the estimated value of the EM can still be accurate even if the continuum optical depth is thick (τ ν,C ∼ 10), although the uncertainty of the estimated EM may be a little bigger. The estimation of the electron density n e is sensitive to the departures of line-to-continuum ratios from their LTE values. This departure increases with the EM and decreases with the electron density n e . The ratios of the frequency-integrated line intensity ( I ν,L dν) to the line intensity calculated under the LTE assumption ( I LTE ν,L dν) for the Hnα lines are also listed in Tables 2 and 3. These ratios are useful to evaluate the importance of stimulated emission. When stimulated emission is not important, the line-to-continuum ratios are close to their values in LTE. These values can lead to inaccurate estimates of n e since the line-to-continuum ratio is not sensitive to n e under LTE conditions. On the contrary, when stimulated emission is important, the line-to-continuum ratios significantly depart from the LTE values. Then the estimated values of n e can be very close to the actual values. In the case of n e = 10 5 cm −3 and EM= 10 9 cm −6 pc, the estimated n e values using different combinations of Hnα lines are given in Table 2 and 3. Comparing the different estimated n e , it shows that choosing hydrogen recombination lines with larger amounts of stimulated emission helps to accurately estimate electron density.
In Tables B.1, B.2, and B.3 the total optical depths τ ν at the centers of the hydrogen recombination lines for different temperatures, densities, and EMs are listed. The line optical depths τ ν,L for different properties are given in Table B.4, B.5, and B.6. The optical depths can help us to speculate whether or which Hnα lines show maser emission from the known properties of ionized gas. The line-to-continuum ratios are presented in Table B.7, B.8, and B.9. These values are useful to estimate the electron temperature, density, and EM of ionized gas by using multiple line-to-continuum ratios.

Summary and conclusions
In this work the departure coefficients b n and the amplification coefficient β n,n+1 are calculated by using an nl-model with the effects of line and continuum radiation. The effects of radiation fields, electron temperature, and density, and the velocity field on the departure coefficients, the amplification coefficients, and the Hnα lines are investigated. The results show that the population inversion (β n,n+1 < 0) often occurs in hydrogen atoms in the ionized gas that emits hydrogen RRLs. The effect of stimulated emission on the Hnα line widths is also studied, and we find the powerful stimulation effect can significantly narrow the line widths of the Hnα lines, even down to less than 10 km s −1 under certain conditions, although this effect is not important for the line widths when the EM< 3 × 10 7 cm −6 pc. We assess the reliability of the method of using multiple hydrogen line-tocontinuum ratios to estimate T e , n e , and EM of the ionized gas. We find this method is helpful to obtain the accurate values of T e and EM. The accuracy of the estimated n e is determined by the stimulation effect on the Hnα lines. The other details of our conclusions are summarized as follows: 1. The saturation intensity J s introduced by Strelnitski et al. (1996) is a rough criterion for evaluating the influence of the radiation fields on b n and β n,n+1 , but may underestimate the influence especially for the high energy level n. Not only could the saturated higher frequency masing lines cause adjacent lower frequency lines to exhibit masing, but the saturated lower frequency masing lines may also lead to adjacent higher frequency masing lines.
2. The Hnα line emissions could be overestimated considerably if the radiation fields are not considered in calculating b n and β n,n+1 . Strong radiation fields could broaden the range of the population inversion β n,n+1 < 0 in the principal quantum number n.
3. The stimulation effect of the hydrogen recombination lines can be weakened by violent velocity fields. Steep velocity gradients can lead to considerable broadening of the line profile that reduces the absolute value of the negative optical depth. The narrower line profile function due to lower electron temperatures can increase the stimulation effect.
4. The maser effect of the Hnα lines is mainly determined by the line optical depth, and can occur with considerably negative line optical depth even if the total optical depth τ ν > 0. In addition, the overheating and inversion of the populations can also produce amplification of the Hnα lines, although the total optical depth and the continuum optical depth are both very thick. 5. For uniform H II regions without strong background radio emission, most of the centimeter Hnα lines are appropriate for the LTE approximation when EM< 10 6 cm −6 pc. However, when there is strong background emission (e.g., a hyper-or ultracompact H II region), stimulated emission could also be important for the centimeter Hnα lines even if EM≤ 10 5 cm −6 pc.
6. The electron temperature estimated using a hydrogen RRL to free-free continuum ratio under the LTE assumption can be more than 50% different from the actual electron temperature.

H40α
T * H60α cm −6 pc K 10 6 cm −3 10 9 cm −6 pc K 10 6 cm −3 10 9 cm −6 pc K K K 1.0 × 10 9 10018 ± 179 1.14 ± 0. Notes. The values and standard deviations of T e , n e , and EM estimated by using the line-to-continuum ratios ( I ν,L dν/I ν,C ) of the H30α, H40α, and H60α lines and the continuum emission at 99.023 GHz from ionized gas with different electron densities and EMs. The actual electron temperature is 10000 K. The relative uncertainties σ/µ of the line-to-continuum ratio are assumed to be 3% and 10%, and the corresponding relative uncertainties of the 99.023 GHz continuum is 3%. The ratios of the frequency-integrated intensity ( I ν,L dν) to the intensity calculated under the LTE assumption ( I LTE ν,L dν) for the H30α, H40α, and H60α lines are given in the three columns below the heading I ν,L dν/ I LTE ν,L dν. The LTE temperatures estimated by using a single line-to-continuum ratio of one of the three Hnα lines to the continuum emission at corresponding frequency are given in the three right-most columns. Table 3. Estimated values and standard deviations of T e , n e , and EM for ultra-compact, compact, and extended H II regions. σ/µ 3% 10% I ν,L dν/ I LTE ν,L dν LTE temperature n e = 10 3 cm −3 n e = 10 3 cm −3 n e = 10 3 cm −3 n e = 10 3 cm −3 EMTn eÊ MTn eÊ M H40α H80α H120α T *

H80α
T * H120α cm −6 pc K 10 3 cm −3 10 5 cm −6 pc K 10 3 cm −3 10 5 cm −6 pc Notes. The values and standard deviations of T e , n e , and EM estimated using the line-to-continuum ratios ( I ν,L dν/I ν,C ) of the H40α, H80α, and H120α lines and the continuum emission at 99.023 GHz from ionized gas with different electron densities and EMs. The actual electron temperature is 10000 K. The relative uncertainties σ/µ of the line-to-continuum ratio are assumed to be 3% and 10%, and the corresponding relative uncertainties of the 99.023 GHz continuum is 3%. The ratios of the frequency-integrated intensity ( I ν,L dν) to the intensity calculated under the LTE assumption ( I LTE ν,L dν) for the H40α, H80α, and H120α lines are given in the three columns below the heading I ν,L dν/ I LTE ν,L dν. The LTE temperatures estimated by using a single line-to-continuum ratio of one of the three Hnα lines to the continuum emission at corresponding frequency are given in the three right-most columns.
In these conclusions, the influence of powerful radiation fields on level populations and hydrogen RRLs, the variation of stimulated emission with line width, and the deviation from the LTE approximation for RRLs are shown. They are helpful to estimate the significance of non-LTE conditions in observations of RRLs.  EM=1 10 5 cm -6 pc n e =5 10 3 cm -3 EM=1 10 7 cm -6 pc n e =1 10 4 cm -3 EM=5 10 7 cm -6 pc Fig. 9. Ratios of non-LTE frequency-integrated line intensities to LTE values ( I ν,L dν/ I LTE ν,L dν) in typical ultra-compact (n e = 10 4 cm −3 and EM= 5 × 10 7 cm −6 pc), compact (n e = 5 × 10 3 cm −3 and EM= 10 7 cm −6 pc), and extended (n e = 1 × 10 2 cm −3 and EM= 10 5 cm −6 pc) H II regions for T e = 10000 K. The values of n e are 10 6 , 10 5 , and 10 2 cm −3 for the hyper-compact, ultracompact, and extended H II regions, respectively, and the corresponding EMs are 10 8 , 5 × 10 7 , and 10 5 cm −6 pc. The electron temperature is T e = 10000 K.  lehurst 1971), collisional excitations and de-excitations, collisional ionization, three-body recombination (Vriens & Smeets 1980), and angular momentum changing collisions (Pengelly & Seaton 1964;Guzmán et al. 2016). The methods of calculating the rate coefficients of these processes are similar to those used in Prozesky & Smits (2018). In the previous work, we used the iterative method to calculate the departure coefficients. The nmodel was solved first under the assumption of b nl = b n , and the nl-model was used to calculate b n and b nl with n less than the critical level n crit (Hummer & Storey 1987;Storey & Hummer 1995;Salgado et al. 2017). However, it was found that our results are closer to those in Storey & Hummer (1995) than to the values in Prozesky & Smits (2018), although the rate coefficients of bound-bound collisional transitions used in Storey & Hummer (1995) are different. In this work we replaced the iterative method with a direct solver, as done by Prozesky & Smits (2018) with error estimates ∼ 3 × 10 −5 , but we find our results are still consistent with those in Storey & Hummer (1995) after the stopping criterion was improved.
As an example, the values of b n , b nl , and β n,n+1 for T e = 10 4 K and n e = 10 5 cm −3 calculated by our model are compared with those provided by Storey & Hummer (1995) and Prozesky & Smits (2018) in Fig. A.1. The values of the departure coefficients in the tables provided by Storey & Hummer (1995) and Prozesky & Smits (2018) have four significant digits. This leads to the zigzags in the β n,n+1 lines in the bottom panel. The differences in amplification coefficients β n,n+1 and partial departure coefficients between Storey & Hummer (1995) and Prozesky & Smits (2018) are not non-neglibile. It is clear that our results are consistent with those in Storey & Hummer (1995) since the small difference can be explained by the different rate coefficients of collisional excitations and de-excitations. Although the cause leading to the difference from the values of Prozesky & Smits (2018) is still unknown, we suggest that the departure coefficients calculated by us and Storey & Hummer (1995) are more accurate. And our nl-model should be reliable.