X-ray spectroscopy in the microcalorimeter era 4: Optical depth effects on the soft X-rays studied with CLOUDY

In this paper, we discuss atomic processes modifying the soft X-ray spectra in from optical depth effects like photoelectric absorption and electron scattering suppressing the soft X-ray lines. We also show the enhancement in soft X-ray line intensities in a photoionized environment via continuum pumping. We quantify the suppression/enhancement by introducing a"line modification factor ($f_{\rm mod}$)."If 0 $\leq$ $f_{\rm mod}$ $\leq$ 1, the line is suppressed, which could be the case in both collisionally-ionized and photoionized systems. If $f_{\rm mod}$ $\geq$ 1, the line is enhanced, which occurs in photoionized systems. Hybrid astrophysical sources are also very common, where the environment is partly photoionized and partly collisionally-ionized. Such a system is V1223 Sgr, an intermediate polar binary. We show the application of our theory by fitting the first-order Chandra MEG spectrum of V1223 Sgr with a combination of \textsc{Cloudy}-simulated additive cooling-flow and photoionized models. In particular, we account for the excess flux for O~VII, O~VIII, Ne~IX, Ne~X, and Mg~XI lines in the spectrum found in a recent study, which could not be explained with an absorbed cooling-flow model.


INTRODUCTION
The strongest emission lines observed in the soft X-ray spectra of astrophysical plasmas are H-like and He-like lines from elements between carbon and sulfur, and Fe L-shell lines. Such X-ray emitting plasmas can be collisionallyionized or photoionized. In collisionally-ionized plasma, ionization or excitation events mainly occur due to electron-ion collisions. In photoionized plasma, ionization is dominated by the interaction between photons and ions/atoms. A hybrid of the two types of plasma is also possible, where the cloud is partly collisionally-ionized and partly photoionized.
Line intensity in observed X-ray spectra can be enhanced or suppressed depending on the following factors. If photoionized, lines may be a) enhanced when electrons bound to the ions absorb photons of appropriate wavelength transitioning to higher energy states followed by radiative cascades, also known as continuum pumping, b) suppressed due to optical depth effects. If collisionally-ionized, only optical depth effects suppress lines in the X-ray spectra. In the soft X-ray regime, the optical depth effects leading to line suppression mainly come from photoelectric absorption of line photons or scattering by electrons. Section 2 and Section 3 present more detailed discussion.
The effects of continuum pumping on the optically thin line intensities, the so-called "Case C", was introduced by  and later discussed by Chamberlain (1953) and Ferland (1999). Their study was later extended to describe "Case D" (Luridiana et al. 2009;Peimbert et al. 2016), the optically thick counterpart of Case C. Recently, Chakraborty et al. (2021) discussed Case C and Case D in view of the future microcalorimeter missions line XRISM and Athena, focusing on line emission from H-and He-like iron.
Optical depth effects on soft X-ray spectra have been previously investigated by Storey & Hummer (1988) and Hummer & Storey (1992), who calculated the recombination line intensities of H-like carbon, nitrogen, and oxygen assuming "Case B"  and discussed the effects of finite optical depth and dust on H-like ions. Such effects have also been observed in soft X-ray emission spectra. For instance, recent analysis of soft X-ray spectra from Reflection Grating Spectrometer (RGS) onboard XMM-Newton and High Energy Transmission Grating Spectrometer (HETGS) onboard Chandra explored several optically-thick astrophysical sources like cataclysmic variables, novae, ultraluminous X-ray sources, Seyfert galaxies, elliptical galaxies, X-ray binaries, etc (Ramsay & Cropper 2002;Rauch et al. 2005;Okada et al. 2008;Pintore & Zampieri 2011;de Plaa et al. 2012;Matzeu et al. 2020;Amato et al. 2021).
As previously mentioned, there have been extensive studies separately discussing the effects of continuum pumping and optical depth effects on X-ray line intensities. The current need is to develop a comprehensive theory that will account for all the atomic processes changing the soft X-ray spectra. This paper aims to present a framework for interpreting the soft X-ray spectra from photoionized and collisionally-ionized plasma using the spectral synthesis code Cloudy (Ferland et al. 2017). A cooling-flow model has been introduced to treat the multi-phase collisionally-ionized systems.
We also show the application of our model on V1223 Sgr, a member of the cataclysmic variable binary star systems called Intermediate Polars. We address the lack of emission from several lower atomic number H-and He-like ions, as mentioned in Islam & Mukai (2021), with additive cooling-flow and photoionized models. However, our model will be applicable for any optically thick 1 source with/without a radiation source.
This paper is the fourth of the series "X-ray spectroscopy in the microcalorimeter era". The first three papers discussed the atomic processes in a collisionally excited and photoionized astrophysical plasma for H-and He-like iron for a wide range of column densities. Chakraborty et al. (2020a) explored the effects of Li-like iron on the line intensities of four members of the Fe XXV Kα complex -x(2 3 P 2 → 1 1 S), y(2 3 P 1 → 1 1 S), z(2 3 S → 1 1 S), and w(2 1 P → 1 1 S) through Resonant Auger Destruction (RAD, Ross et al. 1978;Band et al. 1990;Ross et al. 1996;Liedahl 2005) and line broadening effects by electron scattering. Chakraborty et al. (2020b) introduced a novel method of measuring column density from Case A to B (optically thin to thick) transition by comparing the observed spectra by Hitomi with spectra simulated with Cloudy. Chakraborty et al. (2021) established four asymptotic limits-Cases A, B, C, and D for describing the line formation processes in H-and He-like iron emitting in the X-rays. This paper is a continuation of the framework discussed in the first three papers to study the atomic processes affecting the soft X-ray spectrum.

LINE SUPPRESSION DUE TO PHOTOELECTRIC AND ELECTRON OPACITY
Photoelectric absorption of line photons or scattering by electrons can significantly suppress line intensities. Here we present Cloudy calculations of the net emission, demonstrate line suppression due to absorption and scattering, and give simple analytical estimates of the physical processes which suppress the line emission.
Cloudy actually determines the line emission by solving a fully coupled system of equations giving radiative transitions between levels, as originally described in Section III of Rees et al. (1989). The numerical results can be understood by considering the following approximations to the line transfer.
The fraction of photons that survives (which we call f mod or the "line modification factor") after N scatterings that is subject to photoelectric absorption and electron scattering is determined by the following equation: where N is the mean number of scatterings experienced by a line photon with a line-center optical depth τ before escaping an optically thick cloud (Ferland & Netzer 1979): N = 1.11τ 1.071 1 + (logτ /5.5) 5 (2) P photoelectric is the probability of photoelectric absorption per scattering, and is given by the following ratio of opacities: P scattering is the probability per scattering that a line photon will be scattered off free electrons due to the very large Doppler shift they receive and be removed from the Doppler core of the line (refer to section 7.1 in Chakraborty et al. (2020a) for a detailed discussion): where the total opacity is given by For the most part, f mod gives an estimate for the fraction of photons surviving after photoelectric absorption and electron scattering. Figure 1 shows photoelectric absorption opacities (κ photoelectric ) for temperatures between log T(Kelvin) = 6.2 and log T(Kelvin) = 6.8 and the electron scattering opacity (κ scattering ), assuming a thermal collisional equilibrium at T. A hydrogen density (n(H)) of 1 cm −3 was assumed, corresponding to an electron density of ∼ 1.2 cm −3 , hydrogen and helium being the two most abundant elements in the Universe. The electron scattering opacity was evaluated by multiplying the electron scattering cross section (6.65 × 10 −25 cm 2 ) with its density. Scattering is more important at the longer wavelengths and higher temperatures, while absorption is more important at the shorter wavelengths and lower temperatures. Electron scattering opacity has been estimated Absorption, Log T= 6.2 Absorption, Log T= 6.4 Absorption, Log T= 6.6 Absorption, Log T= 6. Continuum opacities plotted as a function of wavelength for a cloud with NH =10 23 cm −2 . Red, green, yellow and blue solid lines show the absorption opacities (photoelectric) for log T=6.2, 6.4, 6.6, and 6.8, respectively. The black solid line shows the electron scattering opacity. The opacity is in units of cm −1 , the unit of opacity appearing in Kirchhoff-Planck law is cm −1 .
Other optical depth effects such as the Case A to B transition and Resonant Auger Destruction can suppress/amplify selected line intensities too (Chakraborty et al. 2020a,b). Numerical Cloudy simulations on optical depth effects shown in this paper include all the atomic processes that can change line intensities. However, we found these effects insignificant compared to photoelectric absorption and electron scattering in the soft X-ray regime. The discussion on the optical depth effects on soft X-ray emission continues in Section 4 for the collisionally-ionized and photoionized cases.
Note that equation 1 applies in collisionally-ionized environments, where there is no external radiation source. In irradiated photoionized environments, f mod will also have contributions from radiative cascades prompted by absorption of line photons from the external radiation source, also known as "continuum pumping". This is further elaborated in Section 3 and Section 4.2.

LINE ENHANCEMENT DUE TO CONTINUUM PUMPING
In photoionized systems, emission lines are enhanced in the presence of external radiation fields due to continuum pumping. Chakraborty et al. (2021) discussed the concept of continuum pumping and its effects in enhancing the line emission from H-and He-like iron. Lines can be enhanced up to ∼ 30 times, and the degree of enhancement decreases with the increase in column density due to the optical depth effects, the so-called Case C to D transition. Refer to section 2 in their paper for the mathematical framework of continuum pumping and figure 1 for a simplified three level representation of Case C and Case D.
This work is an extension of the same concept for the soft X-ray regime. The observed spectra (photoionized) will have contributions from line enhancement due to continuum pumping and line suppression due to photoelectric absorption and electron scattering (further discussed in Section 4). Whether the lines are enhanced or suppressed depends on the interplay between these effects. The enhancement/suppression varies with column density/optical depth, ionization parameter (ξ), and shape of the incident radiation field. For most of our calculations, we assume a power-law SED: with α = −1, except for Section 5 where we let α to vary freely. The practical way to study the effect of optical depth on line intensities is to compute scaled line intensity ratios of a realistic model that includes all the optical depth effects and a simplistic model excluding optical depth effects. The line ratio stands for what fraction of line photons survive.
The realistic model includes absorption and scattering. By default, Cloudy models include absorption but do not include scattering. At X-ray temperatures, a fraction of the line photons gets largely Doppler-shifted from their line-center due to scattering off high-speed electrons. The following Cloudy command reports the line intensities excluding these Doppler-shifted photons:

no scattering intensity
Refer to Section 6 of Chakraborty et al. (2021) for a detailed discussion on no scattering intensity. In the simplistic model, absorption was switched off with the command:

no absorption escape
The smaller the ratio between the realistic and simplistic model, the larger the suppression. This ratio is the numerical equivalent of f mod , the line modification factor, studied in Section 2, which presented an analytical discussion on line suppression in optically thick clouds. Figure 2 shows this ratio for selected soft X-ray lines evaluated with Cloudy.
Temperature and column density are physical parameters that can notably change line emission from the collisionallyionized cloud. Thus, contour plots have been shown where temperature and column density is varied. Metallicity has been fixed at solar for simplicity. In principle, metallicity should not be taken as a free parameter, as optical depth is proportional to metallicity. This section aims to establish the framework using simplified parameters. In Section 5, we let metallicity vary as a free parameter along with other physical parameters to fit the observed spectrum from V1223 Sgr.
Four panels in the figure show the numerical line modification factor for C VI Ly-α (λ= 33.736Å), OVII K-α resonance line (w; λ=21.602Å), O VIII Ly-α (λ= 18.969Å), and Fe XVII (λ=15.015Å) as a function of the hydrogen column density and temperature for a hydrogen density (n(H)) of 1 cm −3 . There is significant suppression in carbon and oxygen lines and moderate suppression in the iron lines. For example, for CVI Ly-α line at the temperature of its peak emissivity, log T=6.2: at N H =10 23 cm −2 , the numerical line modification factor as shown in the top-left panel of the figure is ∼ 0.15. This implies, only 15 % of the CVI Ly-α line photons will make it out of the optically thick cloud at the mentioned temperature and column density 2 .
Numerical results in the figure account for the full physics and the variation of the physical conditions across the cloud. Analytically, equation 1 estimates the fraction of CVI Ly-α photons surviving after photoelectric absorption and electron scattering, the only two important sources of opacity in the soft X-ray limit.
At the same temperature and column density, τ ∼ 500 (calculated using the Cloudy command save line optical depth), κ photoelectric = 3.5× 10 −24 cm −1 , and κ scattering = 7.9× 10 −25 cm −1 (refer to Figure 1). Line opacity (κ line ) can be expressed as a product of ionic number density (n ion ), and absorption cross-section (α ν ) for the corresponding transition: Here and α ν is described by the following equation (see equation 5.23 in hazy2): A u,l is the transition probability for the transition from level u to level l, λ µm is the wavelength in micrometer, g u and g l are statistical weights of levels u and l, u Dop is the Doppler velocity, ϕ ν (x)=1 at line-center. At logT= 6.2, mC ∼ 47 km/s. Using equations 7, 8, and 9, we obtain κ line = 2.39× 10 −21 cm −1 , which implies κ total = 2.40× 10 −21 cm −1 , and f mod ∼ 0.2. Analytically, 20 % of the CVI Ly-α line photons will survive and make it out of the cloud.
Tables 1 and 2 list the numerical value of f mod at N H = 10 22 cm −2 , N H = 10 22.5 cm −2 , and N H = 10 23 cm −2 for log T = 6.4, and 6.8 for important lines in soft X-ray spectra. The listed f mod values are shown as example cases to demonstrate the effect of line modification for a range of astrophysical plasma. The users can generate f mod for the full parameter space shown in Figure 2 using the Cloudy command: save line intensity along with the Cloudy commands described earlier in Section 4.1. f mod gives the fraction of line photons that will be observed by high-resolution telescopes. Note that the emission lines from the lower-Z elements exhibit maximum emissivity at the lower temperatures, where the photoelectric absorption is significant (see Figure 1). This will lead to a larger suppression in the lines from lower-Z elements than those of the higher-Z elements.

Photoionized emission lines
Photoionized emission lines can be enhanced or suppressed, which is determined by the following two factors. -a) All Lyman like lines going to the ground state 3 are enhanced by induced radiative excitation of the atoms/ions by continuum photons in the SED. -b) Photoelectric absorption and electron scattering in line photons can suppress the line intensities.
The line ratio to be studied here is the scaled ratio of a realistic photoionized model that includes all the optical depth effects and continuum pumping, and a simplistic model excluding optical depth effects and continuum pumping. 2 We predict the line mean intensity 4πJ averaged over all directions 3 Originally  discussed the enhancement in the line emission from atomic hydrogen. Here we have studied emissions from both H-and He-like ions. All the Lyman resonance lines become significantly enhanced, forbidden lines are slightly enhanced. Table 1. Line modification factor (f mod ) in collisionally ionized cloud at NH = 10 22 cm −2 , NH = 10 22.5 cm −2 , and NH = 10 23 cm −2 and log T = 6.4 for important lines in soft X-ray spectra. Lines from lower atomic number elements are more suppressed than those of higher atomic number elements , as mentioned in Section 4. Section 4.1 listed the Cloudy commands for switching on/off scattering and absorption processes. The continuum pumping in the simplistic model was switched off using the Cloudy command:

no induced processes
This ratio between the realistic and simplistic model can be smaller or larger than 1 depending on whether the suppression due to optical thickness or the enhancement due to continuum pumping is dominating. Therefore, f mod can be smaller or larger than 1, unlike the collisionally-ionized case, where f mod can only be smaller than 1.
As mentioned in Section 3, we assumed a power-law SED with α =-1 for demonstration. Like the previous subsection, we adopt a solar metallicity. However, α has been considered a free parameter in Section 5 along with variable metallicity to fit the HETG spectrum of V1223 Sgr. Log of hydrogen column density and ionization parameter have been varied to make contour plots in Figure 3.
Four contour plots in the figure show the numerical modification factor for O VII K-α resonance (w) line (21.602 A), O VIII Ly-α (18.969Å), Ne IX K-α resonance (w) line (13.447Å), and Ne X Ly-α (12.134Å). The modification factor can be as large as ∼ 20 (enhanced about 20 times), or as small as ∼ 0.01 (suppressed about 100 times) for the OVII K-α (w) line depending on the values of N H and ξ. The OVIII Ly-α and Ne IX K-α emission lines can be enhanced ∼ 10 times, and suppressed ∼ 100 times. The Ne X Ly-α line can be enhanced ∼ 4 times, and suppressed ∼ 100 times. The line modification factor for important soft X-ray lines emitted from a photoionized cloud is listed in Tables 3 and 4 for N H = 10 21 cm −2 , N H = 10 22 cm −2 , and N H = 10 23 cm −2 for log ξ = 1 and 2.5. The f mod values for the full parameter space shown in Figure 3 can be estimated using the Cloudy command: save line intensity along with previously listed Cloudy commands in this section.

APPLICATION ON V1223 SGR
This section shows the application of the theory discussed in Sections 2, 3, and 4 with a slightly modified approach to treat the multi-phase plasma for the collisionally ionized case (refer to Section 5.2). We show the application on the Intermediate Polar V1223 Sgr, consisting of a white dwarf accreting material from a low mass secondary star. Table 2. Line modification factor (f mod ) in collisionally ionized cloud at NH = 10 22 cm −2 , NH = 10 22.5 cm −2 , and NH = 10 23 cm −2 and log T = 6.8 for important lines in soft X-ray spectra. Suppression is less than that listed in Table 1 as photoelectric absorption decreases with an increase in temperature. Lines from lower atomic number elements are more suppressed. The matter stripped from the secondary star is magnetically channeled onto a truncated accretion disk around the white dwarf (Patterson 1994). The X-rays from intermediate polars are generated when the infalling high-velocity (3000 -10,000 km/s) matter encounters a shock while falling onto the white dwarf surface. The infalling particles then decelerate further in a subsonic cooling column before hitting the surface of the white dwarf. The inner flow produces strong X-ray emission. As displayed in Figs 2 and 3, the optical depth effects are expected to modify the important lines in the soft X-ray spectra at high column densities (N H ≥ 10 22.5 cm −2 ). V1223 Sgr is an ideal candidate for applying our theory, as Islam & Mukai (2021) estimated that this intermediate polar has a fairly large column density (∼ 10 23 cm −2 ). They used a combination of a cooling flow model (containing emission lines from multi-temperature collisionally-ionized plasma, and bremsstrahlung), an ionized complex absorber model, and X-ray reflection to model the summed firstorder Chandra MEG spectrum of V1223 Sgr. They reported an excess flux from O VII, O VIII, Ne IX, Ne X, and Mg XI lines (see figure 3 in their paper) which could not be described with their model, and implied that these lines could have a photoionization origin. The photoionized emission in CV's likely generates in the pre-shock region that is ionized by the X-ray radiation emitted in the post-shock region (Luna et al. 2010). We have also fitted the same spectrum with Cloudy and the detailed models are described in Sections 5.2 and 5.3.

Data reduction
We redo the Chandra/HETG data analysis of V1223 Sgr, previously done by Islam & Mukai (2021). The observational log of the spectrum is listed in Table 5. We obtained the first-order MEG spectrum with the corresponding response files from the TGCat archive (Huenemoerder et al. 2011(Huenemoerder et al. , 2013. Data processing was performed using CIAO Table 3. Line modification factor (f mod ) in a photoionized cloud at NH = 10 21 cm −2 , NH = 10 22 cm −2 , and NH = 10 23 cm −2 for log ξ = 1 for important lines in soft X-ray spectra. -4.13 (Fruscione et al. 2006) and CALDB version 4.9.4. All first-order spectra and associated responses for MEG were combined using the CIAO tool combine spectra. The combined spectrum was grouped using the CIAO tool dmgroup with at least 30 counts per bin. This particular lower limit has been set to maintain sufficient counts for the spectral fitting while preserving the resolution of the spectra. Black data points in Figure 4 represent the final spectrum 4

Modeling multi-phase plasma with cooling-flow Cloudy simulation
The atomic physics and the line modification factor described for collisionally-ionized plasma in Section 4.1 was done for a single-temperature static model for the purpose of demonstration. V1223 Sgr is a multi-phase system, which requires the consideration of the evolution of plasma cooling with time. Chatzikos et al. (2015) used Cloudy to compute the spectrum of a unit volume of gas in collisional ionization equilibrium cooling from ∼ 10 8 K to 10 4 K. We adopt a similar approach with a finite volume of gas and variable column density. The cooling-flow model used in our Cloudy simulation consists of a multi-phase plasma that cools from 4×10 8 K. The upper limit in temperature has been set following the previous studies with intermediate polars (Anzolin et al. 2008;Islam & Mukai 2021). We attempted to let the gas cool down to 10 4 K, but the solution was numerically unstable below 2 ×10 6 K, so we presented the result down to that temperature. The impact of neglecting the emission below 2 × 10 6 K has been discussed in Section 5.3. The observed spectrum was well fitted by the cooling-flow model except for the emission from O VII, O VIII, Ne IX, Ne X, and Mg XI, which is in agreement with Islam & Mukai (2021). We attempted to fit the excess emission from these lines with a photoionized model using the diffuse emission from the cooling-flow as the SED to photoionize the gas in the pre-shock region. The cooling-flow SED was extracted with the Cloudy command Table 4. Line modification factor (f mod ) in a photoionized cloud at NH = 10 21 cm −2 , NH = 10 22 cm −2 , and NH = 10 23 cm −2 for log ξ = 2.5 for important lines in soft X-ray spectra. save continuum. The following subsection further describes the parameters and grids employed in our cooling-flow simulation.

Cloudy models fitting the observed spectrum
We fit the observed spectrum with: (a) pure cooling-flow model; (b) cooling-flow + photoionized model; (c) pure photoionized model; and (d) cooling-flow + photoionized model without considering the optical depth and continuum pumping effects discussed in Sections 2, 3, and 4. The source of photoionizing radiation in the last three models is the diffuse radiation emitted by the cooling-flow plasma. The Cloudy commands to switch off optical depth effects and continuum pumping are: no absorption escape no induced processes We use the Cloudy/XSPEC interface (Porter et al. 2006) to import the models into XSPEC (Arnaud 1996). Galactic absorption was included using the XSPEC routine tbabs, with the absorbing hydrogen column density 5 set to 0.09×10 21 cm −2 towards V1223 Sgr. The complete models as imported to XSPEC are: (a) tbabs* atable(cooling-flow.fits) (b) tbabs* (atable(cooling-flow.fits) + atable(photoionized.fits)) (c) tbabs* atable(photoionized.fits) (d) tbabs*(atable(cooling-flow.fits) + atable(photoionized.fits)) enabling Cloudy commands stated in the previous paragraph.
A chi-square statistics was used to fit the spectrum. This is a straightforward approach for fitting the spectrum while considering all the atomic processes happening in the cloud, including absorption and scattering. The coolingflow model has grids on log of column density (N H coll ), and metallicity. The photoionized model has grids on log of column density (N H photo ), log of ionization parameter (ξ), and metallicity. For b) and d), we tie the metallicity of the cooling-flow and photoionized models, and let log N H coll , log N H photo , log ξ, and normalization of the models (N photo , N coll ) vary freely. A solar abundance table by Asplund et al. (2009) was used for all our calculations. An electron density of 10 14 cm −3 was assumed (Beuermann et al. 2004;Kuulkers et al. 2006) 6 The sample Cloudy scripts used for generating the XSPEC compatible .fits files are given in the appendix.
Note that spectral signatures of X-ray reflection from the surface of the WD have been discussed in a number of studies (Beardmore et al. 1995;Cropper et al. 1998;Beardmore et al. 2000;Hayashi et al. 2011;Mukai et al. 2015;Hayashi et al. 2021;Islam & Mukai 2021). X-ray reflection primarily produce two distinctive features: a compton reflection hump at ∼ 10-30 keV, and iron fluorescent Kα line at 6.4 keV. Cloudy simulations include these features by default. The MEG spectrum covers the energy range 0.4 -5.0 keV (31 -2.5Å), where there are fluorescence lines from lighter elements. In case of V1223 Sgr, they are much fainter than the iron fluorescence line, thus negligible. This is not always true. For example, emission spectrum from the High Mass X-ray Binary Vela X-1 exhibits fluorescent Si and S Kα lines Camilloni et al. 2021).
The complete Cloudy models have been overplotted with the observed spectrum in Figure 4. The red line represents our best-fit Cloudy model, and the black data points represent the observed spectrum. The top-left, top-right, bottomleft, and bottom-right panels show the best-fit Cloudy models using cooling-flow only, cooling-flow + photoionized, photoionized only, and cooling-flow + photoionized without considering the optical depth and continuum pumping.
(a) The cooling-flow only model fits the continuum well and contributes to the formation of Al XIII, Si XIII, Si XIV, S XVI, Ar XVII, and Ar XVIII lines. O VII, O VIII, Ne IX, Ne X, and Mg XI lines could not be fit with the cooling-flow model, which favors the findings of Islam & Mukai (2021).
(b) The cooling-flow + photoionized model produces a significantly better fit for O VII, O VIII, Ne IX, Ne X, and Mg XI lines than the cooling-flow only model. The ionization fraction for O 7+ , Ne 8+ , Ne 9+ , and Mg 10+ peaks at temperatures greater than 2 ×10 6 K, where we artificially stopped the cooling-flow Cloudy model. It is, therefore safe to infer that emission from O VIII, Ne IX, Ne X, and Mg XI lines mostly comes from photoionization. As the ionization fraction for O 6+ peaks at ∼ 8 ×10 5 K, we could not check if the cooling-flow model contributes to the O VII line emission and to what extent. Future papers will address the numerical instability issue of the cooling-flow model at lower temperatures.
(c) The pure photoionized model produces a poor fit to the spectrum in the lower wavelength region with missing Si XIII, Si XIV, S XVI, Ar XVII, and Ar XVIII lines.
(d) The cooling-flow + photoionized model with the optical depth effects and continuum pumping switched off produces a considerably worse fit to the observed spectrum than that including these atomic processes, especially the fit to the continuum and emission lines from O VII, O VIII, Ne IX, Ne X, Mg XI, and Si XIV. This shows the importance of taking into account the effects of optical depth and continuum excitation. Table 6 lists Cloudy model parameters fitting the observed spectrum for (a), (b), (c), and (d) at a 90% confidence interval. The best fit is obtained for model (b), with all the other fits being substantially worse.

SUMMARY
• The effects of optical depth have been discussed on soft X-ray emission lines. A cloud can be collisionally-ionized or photoionized. For a collisionally-ionized cloud, the atomic physical processes that contribute to the suppression in soft X-ray lines are photoelectric absorption of line photons and electron scattering. Photoelectric absorption is temperature dependent, electron scattering is not. The temperature dependence of photoelectric absorption opacity is shown on Figure 1. The line modification factor (f mod ) quantifies the fraction of photons surviving the absorption and scattering (see equation 1). Figure 2 shows the numerical equivalent of f mod as a function  of hydrogen column density and temperature for C VI Ly-α, O VII K-α (w), O VIII Ly-α, and Fe XVII lines. Tables 1 and 2 list f mod for important soft X-ray lines at N H = 10 22 cm −2 , N H = 10 22.5 cm −2 , and N H = 10 23 cm −2 and log T = 6.4 and 6.8.
For a collisionally-ionized cloud, 0 ≤ f mod ≤ 1. As shown in the tables, f mod is smaller for lower-Z elements like carbon, oxygen, and neon, but approaches 1 for higher-Z elements like magnesium, silicon, and sulfur. This implies that soft X-ray line intensities for the lower-Z elements can be significantly suppressed. • For the photoionized cloud, lines can be enhanced or suppressed. Continuum pumping can strengthen the Lyman lines in H-and He-like ions. Absorption and scattering can suppress the lines. Whether a line will be suppressed or enhanced is jointly determined by these two factors. Unlike the collisionally-ionized cloud, f mod can be greater or smaller than 1. Figure 3 shows the numerical equivalent of f mod as a function of hydrogen column density and ionization parameter for an α=-1 power-law SED for O VII K-α (w), O VIII Ly-α, Ne IX K-α (w), and Ne X Ly-α. Tables 3 and 4 show f mod for important soft X-ray photoionized lines for N H = 10 21 cm −2 , N H = 10 22 cm −2 , and N H = 10 23 cm −2 for log ξ = 1, and 2.5.
• A hybrid of collisional ionization and photoionization is also observed in many astronomical sources. One such example is illustrated in Section 5. We modeled the MEG spectrum from V1223 Sgr, an intermediate polar, using the Cloudy/XSPEC interface. This is the first application of this interface after the recent Cloudy developments for meeting the spectroscopic standards of the future microcalorimeter missions.
We used a combination of Cloudy-simulated cooling-flow (collisionally-ionized plasma cooling from 4×10 8 K to 2×10 6 K) and photoionized models to fit the spectrum. The photoionized model represents the emission from gas in the pre-shock region that has been ionized by the diffuse emission from the cooling-flow plasma. The lower limit in temperature for the cooling-flow model was set to be 2×10 6 K to avoid the numerical instability issues as described in Section 5.2. We found that the cooling-flow model dominates the shape of the continuum. Emissions from Al XIII, Si XIII, Si XIV, S XVI, Ar XVII, and Ar XVIII lines originate in the cooling-flow plasma. O VII, O VIII, Ne IX, Ne X, and Mg XI lines originate in the photoionized plasma. Islam & Mukai (2021) fitted the same spectrum of V1223 Sgr and reported excess emission from O VII, O VIII, Ne IX, Ne X, and Mg XI lines which could not be described with their absorbed cooling flow model. We fit these lines simply by adding the photoionized component to the standard cooling-flow component. Table 6 lists the best-fit parameters from our best-fit Cloudy model. The top-right panel of Figure 4 shows the best-fit Cloudy model overplotted with the observed spectrum.
On the contrary, the observed spectrum was ill-fitted using pure cooling-flow and pure photoionized Cloudy models, as shown in the top-left and bottom-left panels of Figure 4. We also show the consequences of switching off atomic physical processes like optical depth effects and continuum pumping in the bottom-right panel of the figure. The solid red line shows the fit after switching off the atomic physical processes. The fit is considerably worse than our best-fit model shown on the top-right panel, including all atomic processes. This shows the importance of incorporating optical depth effects and continuum pumping in the spectral simulation codes.

APPENDIX A
Cloudy script for generating XSPEC compatible cooling-flow model spectrum (where T 1 and T 2 are input parameters for temperature ): coronal T 1 K init time # Plasma starts cooling from T 1 K hden 13.92 no scattering intensity stop column density 20 vary grid 20 24 0.5 metal solar -1 log vary grid -1 0 0.2 abundances GASS10 iterate 3000 no molecules stop time when temperature falls below T 2 K # Plasma stops cooling at T 2 K stop temperature T 2 K save xspec atable total continuum "cooling-flow.fits" Cloudy script for generating XSPEC compatible photoionized model spectrum: table sed "cool.sed" xi -1 vary grid 0.5 2.5 0.5 hden 13.92 no scattering intensity stop column density 20 vary grid 20 24 0.5 metal solar -1 log vary grid -1 0 0.2 abundances GASS10 save xspec atable total continuum "photoionized.fits"

APPENDIX B
Before version 17.03, Cloudy used Chianti atomic database (Dere et al. 1997;Landi et al. 2012) as described in Lykins et al. (2015) for Fe 16+ energy levels. With 17.03, we updated the masterlist to use the first 30 levels for Fe 16+ from the NIST atomic database (Kramida et al. 2018) by default, which improved the wavelength for the Fe XVII 3C † transition from 15.0130Å to 15.0150Å.