Probing the physical properties of the intergalactic medium using gamma-ray bursts

We use Gamma-ray burst (GRB) spectra total continuum absorption to estimate the key intergalactic medium (IGM) properties of hydrogen column density ($\mathit{N}\textsc{hxigm}$), metallicity, temperature and ionisation parameter over a redshift range of $1.6 \leq z \leq 6.3$, using photo-ionisation (PIE) and collisional ionisation equilibrium (CIE) models for the ionised plasma. We use more realistic host metallicity, dust corrected where available, in generating the host absorption model, assuming that the host intrinsic hydrogen column density is equal to the measured ionisation corrected intrinsic neutral column from UV spectra ($\textit{N}\textsc{h}\/\ \textsc{i,ic}$). We find that the IGM property results are similar, regardless of whether the model assumes all PIE or CIE. The $\mathit{N}\textsc{hxigm}$ scales as $(1 + z)^{1.0\/\ -\/\ 1.9}$, with equivalent hydrogen mean density at $z = 0$ of $n_0 = 1.8^{+1.5}_{-1.2} \times 10^{-7}$ cm$^{-3}$. The metallicity ranges from $\sim0.1Z\sun$ at $z \sim 2$ to $\sim0.001Z\sun$ at redshift $z>4$. The PIE model implies a less rapid decline in average metallicity with redshift compared to CIE. Under CIE, the temperature ranges between $5.0<$ log$(T/$K$)<\/\ 7.1$. For PIE the ionisation parameter ranges between $0.1<$ log$(\xi)<2.9$. Using our model, we conclude that the IGM contributes substantially to the total absorption seen in GRB spectra and that this contribution rises with redshift, explaining why the hydrogen column density inferred from X-rays is substantially in excess of the intrinsic host contribution measured in UV.


INTRODUCTION
The main objective of this paper is to estimate the key IGM parameters of column density, metallicity, temperature and ionisation, using the latest models for ionised absorbers on the line of sight (LOS) to GRBs. We examine past observations and simulations to set the parameters ranges and priors for our models. Our hypothesis is that the bulk of the excess in observed hydrogen column density in GRB spectra, inferred from X-rays over the intrinsic host contribution measured in the UV, is due to absorption in the IGM, and that this IGM column density increases with redshift.
Most baryonic matter resides in the IGM and in particular, the regions between galaxies. In the early universe, the fraction of baryons in the IGM was even higher, as less material had coalesced gravitationally from it (McQuinn 2016, hereafter M16). IGM temperature varies widely over redshift and phase. Recent simulations predict that up to 50% of the baryons by mass have been shock-heated into a warm-hot phase (WHIM) at low redshift z < 2 with T = 10 5 − 10 7 K and n b = 10 −6 − 10 −4 cm −3 where n b is the baryon density (e.g Cen & Ostriker 1999, 2006Davé & Oppenheimer 2007;Schaye et al. 2015). Martizzi et al. (2019, hereafter M19), using the Il-E-mail:tonydalton@live.ie lustrisTNG simulations 1 (Piattella 2018), estimated that the cool diffuse IGM constitutes ∼ 39% and the WHIM ∼ 46% of the baryons at redshift z = 0. Observations of the cool diffuse IGM and WHIM are essential for effective tracing of matter across time and to validate the simulations (Danforth et al. 2016). We adopt the common temperature naming convention for IGM plasma: cool is log(T /K)< 5 and Warm-Hot, log(T /K) ∼ 5 to 7 (M19). Though we concentrate on the very low density IGM, where relevant we use the common names for systems of different column densities: strong Lyα forest systems (SLFSs): 15 < logN H i < 16.2 2 ; partial Lyman Limit Systems (pLLSs) 16.2 < logN H i < 17.2; Lyman Limit Systems (LLSs): 17.2 < logN H i < 19 ; super-LLSs (sLLSs) : 19.0 <logN H i < 20.3; and Damped Lyα Systems (DLAs) logN H i >20.3 (Fumagalli 2014, hereafter F14).
Over the last several decades, observations of redshifted Lyα absorption in the spectra of quasars has provided a highly sensitive probe of the cool IGM (e.g. Morris et al. 1991;York et al. 2000;Harris et al. 2016;Fumagalli et al. 2020). In the cool phases of the IGM including voids, 40 − 60% of the universe by mass has [O/H] > −3 while, by volume, only 20% 1 http://www.tng-pro ject.org/ 2 Throughout this paper, logarithmic column densities are expressed in units of cm −2 of the overdense universe has a metallicity [C/H] > −3 (F14 and references therein). Both Schaye et al. (2003, hereafter S03) and Aguirre et al. (2008, hereafter A08) found virtually no evidence for metallicity evolution in the cool IGM in the range z = 1.8 − 4.1, but metallicity did have a strong dependency on density. S03 confirmed that collisional ionisation did not apply to the phases they studied.
A significant fraction of the cool gas probed by SLFSs, pLLSs, and LLSs has been associated with galaxy haloes and the circum-galactic medium (CGM) (Pieri et al. 2014;Fumagalli et al. 2013Fumagalli et al. , 2016. As we move from the diffuse IGM to virialised luminous matter, the metallicity rises from the very low values of [X/H] ∼ −3 to −2, to approximate values of −1.47 for SLFS, −1.3 for pLLSs, ≤ −2 for LLSs and > −1.5 for DLAs (Wotta et al. 2019, L19, F16). F16 noted considerable evolution in LLS metallicity. However, these systems contribute only ∼ 4% to the cosmic metal density budget (L19). The intracluster medium (ICM) mean metallicity in the range 0 ≤ z ≤ 1.5 is Z = 0.23 ± 0.01Z (S12; McDonald et al. 2016). At the outer ICM, the metallicity falls to < 0.01 Z (Mernier et al. 2017), which is the start of the true IGM. Temperature in the ICM are typically log(T /K)> 7. However, the ICM only contains ∼ 4% of cosmic metals (Shull et al. 2012, M16).
At higher temperatures, for some time since the first prediction of substantial baryons at low redshift, the expected baryons were not observed in the WHIM, giving rise to the "missing" baryon problem (Danforth & Shull 2005Shull et al. 2012Shull et al. , 2014. Recent literature points to the CGM as reservoir for at least a fraction of this missing matter (Tumlinson et al. 2011Werk et al. 2013;Lehner et al. 2016). Other claims to have detected the WHIM include possible detection of O vii lines, excess dispersion measure over our Galaxy and the host galaxy in Fast Rasio Bursts (FRB), and stacked X-ray emission from cosmic web filaments using the thermal Sunyaev Zelodovich effect (e.g. Nicastro et al. 2018;Macquart et al. 2020;Tanimura et al. 2020).
Detection of the WHIM is extremely challenging, as its emission is very weak, it lacks sufficient neutral hydrogen to be seen via Lyα absorption in spectra of distant quasars, and the X-ray absorption signal expected from the WHIM is extremely weak (Nicastro et al. 2018;Khabibullin & Churazov 2019). There appears to be a consensus that, at least for z < 2, the predicted mean metallicity of the WHIM from simulations and O vi absorption studies is ∼ 0.1 Z (e.g. Wiersma et al. 2011;Danforth et al. 2016;Pratt et al. 2018, S12).
Post reionisation, the vast majority of hydrogen and helium is ionized in the IGM. Therefore, the observation of metals is essential for parameterising the IGM properties including density, temperature and metallicity. Huge work has been completed on individual systems from absorption-line studies that use the ionization states of abundant heavy elements (e.g. Shull et al. 2014;Raghunathan et al. 2016;Selsing et al. 2016;Lusso et al. 2015). While these surveys have been very successful, most very highly ionised metals are not observed in optical to UV. High resolution X-ray observations are required as they are sensitive to a broad range of cross-sections over the full integrated LOS. However, tracing individual features of the IGM metals in X-ray with current instruments is very limited. Athena, the proposed European Space Agency X-ray observatory, aims to study the IGM through detailed observations of O vii (E = 573 eV) and O viii (E = 674 eV) absorption features (Walsh et al. 2020).
While we await this future mission, GRBs are currently one of the most effective observational methods to study the IGM as their X-ray absorption yields information on the total absorbing column density of the matter between the observer and the source (e.g. Galama & Wijers 2001;Watson et al. 2007;Watson 2011;Wang 2013;Schady 2017). GRBs are among the most powerful explosions known in the universe. GRBs exist over an extensive range of redshifts and distances, and have high luminosities combined with a broad energy range of observed emissions. Any element that is not fully ionized contributes to the absorption of X-rays. Though Thomson scattering is essentially energy independent, scattering by electrons only becomes important at energies above 10keV (Wilms et al. 2000, hereafter W00).
Although the X-ray absorption cross-section is mostly dominated by metals, with hydrogen and helium contribution being minimal but not nil ( Fig.1 W00), it is typically reported as an equivalent hydrogen column density (hereafter Nhx). Nhx consists of contributions from the local GRB environment, the IGM, and our own Galactic medium. With current instruments, GRB X-ray absorption cannot generally reveal the redshift of the matter in the column due to a lack of signal to noise and spectral resolution.
The two main results of earlier studies of the IGM using GRBs are the apparent increase in Nhx with redshift, and that Nhx exceeds the host intrinsic neutral hydrogen column density (Nh i) in GRB, often by over an order of magnitude (e.g. Behar et al. 2011;Watson 2011;Campana et al. 2012). Nh i is generally obtained from observations of strong individual absorbers in the GRB host system. The cause of an Nhxigm excess over Nh i, and the Nhxigm rise with redshift seen in GRBs has been the source of much debate over the last two decades. One school of thought argues that the GRB host accounts for all the excess and evolution e.g. dense Helium (He ii) regions close to the GRB (Watson et al. 2013), ultraionised gas in the environment of the GRB (Schady et al. 2011), a dense environment near the burst location (Campana et al. 2012), dust extinction bias (Watson & Jakobsson 2012), and/or a host galaxy mass Nhxigm relation (Buchner et al. 2017). The other school of thought argues that the IGM is the cause of excess absorption and redshift relation e.g. Arcodia et al. 2016;Rahin & Behar 2019). While we acknowledge that the GRB host may contribute to the excess absorption, it is the IGM that is the focus of this paper.
The convention in prior work using GRB was to use solar metallicity as a device used to place all of the absorbing column density measurements on a comparable scale. These works all noted that the resulting column densities were, therefore, lower limits as GRB typically have much lower metallicities. Dalton & Morris (2020, hereafter D20) used realistic GRB host metallicities to generate improved estimates of Nhx. They confirmed the Nhx redshift relation and that the revised Nhx showed an even greater excess over Nh i.
As the bulk of matter in the IGM is ionised and exists outside of gravitationally bound structures, in this paper we use a homogeneity assumption. We will use tracer objects that have LOS orders of magnitude greater than the large scale structure.
The sections that follow are: Section 2 describes the data selection and methodology; Section 3 covers the models for the IGM LOS including key assumptions and plausible value ranges for key parameters; Section 4 gives the results of GRB spectra fitting using collisional and photoionisation IGM models with free IGM key parameters; we discuss the results and compare with other studies in Section 5; and Section 6 gives our conclusions. Appendix A covers model comparisons and investigating the robustness of the IGM model fits. We suggest for readers interested in the key findings on IGM parameters from fittings only, read Sections 4, 5 and 6. Readers interested in detailed spectra fitting methodology and model assumptions should also read Sections 2 and 3. Finally, for readers interested in more detailed examination of key IGM parameters, plus software model comparisons, read Appendix A.

DATA SELECTION AND METHODOLOGY
We used the D20 data for Nhx which consisted of all observed GRBs with spectroscopic redshift available up to 31 July 2019 from the UK Swift Science Data Centre 3 repository (hereafter Swift; Burrows et al. 2005). Spectra from the Swift repository were taken from the Photon Counting Late Time mode. D20 investigated the plausibility of assuming that the host intrinsic hydrogen column density is equal to the measured ionisation corrected intrinsic neutral column from UV spectra. D20 used ionisation corrections from F16 who report on the values of the neutral fraction as a function of NHI. We follow their method for GRB host hydrogen column density.
The GRB Nh i sample is taken from Tanvir et al. (2019). Our sample criteria was that the GRB has detections with quantified uncertainties for Nhx, Nh i, and spectroscopic redshift. The selection criteria resulted in a total GRB sample of 61. We selected the best S/N sample representative of the range from 1.6 < z < 6.32. D20 examined if a S/N limited sample would cause a bias by plotting log(Nhx) versus both log of total error in Nhx and total error/Nhx for all detections. The scatter appeared random so any selection by total error/Nhx should not result in a bias in Nhx. The total final data sample consists therefore of 32 GRB, details are available in the online supplementary material. We refitted the GRB spectra using xspec v12.10.1 (Arnaud 1996, hereafter A96), assuming an underlying power law in the X-ray band from 0.3 -10.0 keV, which is suitable for the vast majority of GRB and again is consistent with the Swift repository , hereafter S13). The Galactic component is fixed to Swift values based on (Willingale et al. 2013, hereafter W13). Asplund et al. (2009) is generally regarded as providing the most accurate solar abundances. However, we used the solar abundances from W00 which take into account dust and H 2 in the interstellar medium in galaxies.
Most works on the WHIM use absorption line observations focusing on oxygen, carbon, nitrogen and neon because of their relatively high abundance, and because the strongest resonance lines in He and H-like ions are in a relatively 'clean' wavelength band, compared to typical X-ray spectra resolutions. Due to the small Doppler broadening, ignoring tur-bulence, the lines rapidly saturate. The challenge for X-ray spectroscopy in the IGM is to detect small equivalent widths (Richter et al. 2008, hereafter R08), which is only possible currently in the UV. Accordingly, we chose to base our work on total absorption by the ionised IGM as opposed to fitting individual line absorption, avoiding misidentifation of absorption features (Gatuzz & Churazov 2018, hereafter G15).
When fitting models to spectra, chi-squared (χ 2 ) is the generally used statistical method. However, deep field X-ray sources such as our sample from Swift, only have a small number of photon counts, well into the Poisson regime. The χ 2 regression approach is inappropriate in this circumstance (Buchner et al. 2014). The common practice of rebinning data to use a χ 2 statistic results in loss of energy resolution. The maximum likelihood C-statistic (Cash 1979), based on the Poisson likelihood, does not suffer from these issues. For a spectrum with many counts per bin the C-statistic → χ 2 , but where the number of counts per bin is small, the value for C-statistic can be substantially smaller than the χ 2 value (Kaastra 2017). Accordingly, we use the C-statistic (Cstat in xspec) with no rebinning.
Typically, when using xspec to fit models to spectra, local optimisation algorithms like the Levenberg-Marquardt algorithm are employed to iteratively explore the space from a starting point. However, given we are studying the IGM with X-ray spectra, we can expect some degeneracies between the parameters. Therefore, there may be multiple, separate, adequate solutions, i.e. local probability maxima. In these circumstances, these algorithms cannot identify them or jump from one local maximum to the other. The steppar function in xspec allows the forcing of parameters to specific ranges. This can overcome the local maximum problem to some degree. Markov chain Monte Carlo (MCMC) is a commonly employed integration method for Bayesian parameter estimation. However, MCMC also has difficulty finding and jumping between well-separated maxima (Buchner et al. 2014). Given the issues of goodness of fit and getting out of local probability maxima, we use a combination of the steppar function and confirmation with MCMC to validate our fitting and to provide confidence intervals on Cstat. We prefer this approach over alternatives such as the Akaike Information Criterion (AIC). The AIC, popular in astrophysics is AIC = χ 2 + 2k where k is the number of parameters of the model. However, as it is based on χ 2 , it suffers from the same problems i.e. based on a Gaussian assumption for errors and requirung a high bin count.
We follow a similar MCMC methodology as Foreman-Mackey et al. (2013) for the number of walkers (× 10 free parameters), chain length and burn-in period. We use Goodman Weare MCMC (Goodman & Weare 2010).

MODELS FOR THE GRB LOS
In this section we describe the motivation and expected physical conditions in the IGM that lead to our choice of CIE and PIE models, the priors and parameter ranges.
In our models, we use different xspec (A96) absorption sub-routines for the absorbers on the LOS. For Galaxy absorption (NhxGal), we use tbabs (W00) fixed to the values measured by W13. tbabs calculates the cross-section for Xray absorption by the ISM as the sum of the cross sections for the gas, grain and molecules in the ISM. For the GRB host galaxy absorption, we use tbvarabs which is the same as tbabs but with metallicity, dust and redshift as free variables. We follow D20 for the metallicity of the GRB host galaxy i.e. using dust corrected actual metallicity where available, and otherwise their average GRB host value of Z = 0.07Z . The Nhx for the GRB host is fixed to the Nh i,ic values, following the D20 method. By fixing Nhx for both our Galaxy and the GRB host, the excess absorption in the models is regarded as being produced by the IGM. W00 noted that the tbabs model does not include the effects of the warm phase or of the ionized phase of the ISM. We review the photoionisation (PIE) and collisional ionisation equilibrium (CIE) models available in xspec to determine which is best for our purposes of modelling the IGM. These are warmabs (Kallman et al. 2009, hereafter K09) for PIE, hotabs (K09), ioneq (G15) and absori (Done et al. 1992) for CIE. In earlier works on using tracers such as GRB and quasars for IGM absorption, absori was generally used (e.g. Behar et al. 2011;Starling et al. 2013). While absori was the best model available when it was developed in 1992, it is not self-consistent as it allows one to have both ionisation parameter and temperature as free parameters which would not occur in either PIE or CIE (Done et al. 1992). Other issues with absori are that it only uses ionisation edges with no line absorption. The metals included are limited to H, He, C, N, O Ne, Mg, Si, S and Fe, and only Fe is allowed as a free parameter. Accordingly, we do not use it for PIE, but do for CIE to compare with earlier studies in Appendix A.
We chose to use warmabs as a more sophisticated PIE model which is designed to determine the physical conditions in partially ionized gases. It calculates the absorption due to neutral and all ionized species of elements with atomic number Z ≤ 30. While warmabs does not account for selfshielding, this effect is negligible at high ionization parameters (K09). For CIE, we chose hotabs, a sophisticated code, similar to warmabs except that it has temperature as the free parameter as opposed to ionisation. An alternative CIE model is ioneq. It is similar to hotabs except that it allows metallicity to vary for O, Ne and Fe only (G15). warmabs, hotsabs and ioneq have turbulent velocity (vturb) as a free parameter. We examined varying vturb to assess impact on fittings. The broad range trialled (0 − 150 km s −1 ) showed minimal variation in column densities or other parameters. Thus, we set vturb = 0.
We model the IGM assuming a thin uniform plane parallel slab geometry in thermal and ionization equilibrium. This simplistic approximation is generally used to represent a LOS through a homogenous medium and is appropriate for our model (e.g. Savage et al. 2014;Nicastro et al. 2017;Khabibullin & Churazov 2019;Lehner et al. 2019). This slab is placed at half the GRB redshift as an approximation of the full LOS medium. We examined placing the slab at half the redshift equivalent distance integral as an approximation of distance, but it did not change our results.
Any LOS to a GRB is likely to encounter many different intervening phases of matter, density, temperature and photoionisation levels. Given the current quality of the GRB spectra, the most pragmatic approach is to define the parameters ranges and priors from the past measurements and observations. The slab fit results will then characterise 'typical' conditions integrated along the LOS. We now review the physical processes and key conditions to pin down the range of parameters and models that are best suited for our analysis.

Ionisation processes and equilibrium conditions
Generally, there are two processes that determine the ionisation state of plasma in the IGM i.e. photoionisation and collisional ionisation. Different physical processes are therefore involved and any assumptions regarding whether collisional, photoionisation or a combination dominates will impact any attempts to model the IGM.
The photoionisation rate, Γ H i depends on the ionising radiation field in the IGM provided by the cosmic ionising background (CIB). For photoionisation IGM modelling, the ionisation parameter ξ (the ratio of ionising photon density to electron density) is a key variable. We set the parameter range as 0 ≤ log(ξ) ≤ 3 for an ionised IGM . For IGM modelling with the collisional assumption for ionisation, temperature is a key variable. Collisions by thermal electrons ionise hydrogen to a high degree for gas temperatures > 1.5 × 10 4 K. Metals require higher temperatures or ionisation. Therefore, we set the parameter range as 4 ≤ log(T /K) ≤ 8.
We chose to use equilibrium based models. The relation between ionisation state or fraction and gas temperature and ionisation parameter explicitly assumes that the gas is in an ionisation equilibrium (R08). Opinions on the IGM equilibrium state differ greatly (e.g. Branchini et al. 2009;Nicastro et al. 2018). In non-equilibrium, the plasma remains overionised compared to CIE at any temperature, as recombination lags behind cooling (Gnat & Sternberg 2007). While there is still debate on the equilibrium state of the WHIM, it is likely that a substantial part of the baryons in the universe are in regions where extremely low densities and ionisation equilibrium conditions persist (M16). Importantly for IGM modelling, well outside the influence of galaxies and clusters, the radiation background becomes more important. Oppenheimer & Schaye (2013a) noted that non-equilibrium effects are smaller in the presence of the CIB, and are overestimated in CIE. However, they also showed that in the presence of AGN, a large fraction of the metal-enriched intergalactic medium may consist of non-equilibrium regions (Oppenheimer & Schaye 2013b).
In summary, for our IGM models we assume ionisation equilibrium, with the caveat that the equilibrium assumption could result in an underestimation of column density where the IGM plasma remains over ionised in non-equilibrium conditions.

Metallicity in the IGM phases
As we are using ionised metal absorption, we have to allow for a large range in the metallicity parameter as the LOS to the GRBs trace the various IGM phases. In our analysis, we include the highly ionised metals that dominate X-ray absorption given that H and He are relatively unimportant.  the main uncertainty of the IGM models (Branchini et al. 2009).
In Section 1, we noted that in the cool IGM phases, typical metallicity is observed to be at the very low range −4 < [X/H] < −2 (e.g. Simcoe et al. 2004, S03,A04). In the hotter phases including the WHIM, the metallicity has been observed to be [X/H] ∼ −1 (e.g. Danforth et al. 2016;Pratt et al. 2018, S12). As we are modelling the LOS through the cool, warm and hot diffuse IGM, but noting that some contribution will come from overdense phases, we will set the xspec metallicity parameter range as −4 < [X/H] < −0.7 (0.0001 < Z/Z < 0.2).

Cosmic ionising background
The abundance of ionic species is partially dependent on the CIB. Many studies have been completed on the sources of the background radiation such as star forming galaxies and AGN with power laws in the range 1.4 − 2 (e.g. Haardt & Madau 1996, 2012De Luca & Molendi 2004;Luo et al. 2011;Moretti et al. 2012). To explore uncertainties in the UV background, Crighton et al. (2015) and Fumagalli et al. (2016) introduced a free parameter αUV to account for the AGNdominated (hard) to galaxy-dominated (soft) spectrum. A common practice is to adopt a fixed power law for the background radiation. This is a reasonable approach in calculating the ionisation balance.
absori is the only xspec model which allows the background CIB as a free parameter. In warmabs, hotabs and ioneq, the CIB photon index is set to 2 which is consistent with the work by Moretti et al. (2012). In many prior works on the IGM using absori, general practice has been to set CIB photon index to 1.4 following (De Luca & Molendi 2004). We examined the impact of different CIB indices on column density using absori on GRB120909A in Fig. 1.
A photon index of 2 results in the highest estimated column density at all redshift. The lowest column densities resulted from a CIB photon index of 0.5 at logarithmic difference ∼ Table 1. Upper and lower limits for the free parameters in the IGM models. Power law slope and normalisation for the GRB spectrum were also free parameters. The fixed parameters are Galactic and host log(Nhx), GRB redshift, the IGM slab at half the GRB redshift, and host metallicity at the observed dust corrected value, or Z = 0.07Z . IGM parameter equilibrium model range in xspec models 0.5 lower than when the index is 2. However, the difference in the commonly observed CIB range of 1.4 − 2 is minimal. Accordingly, we set the photon index at 2 for absori to allow comparison with the other models where it is fixed at 2.

Full models for the GRB LOS
Based on the extensive observations and simulations of the IGM to date, a combined CIE and PIE model for the IGM would be required for optimum fitting of the GRB spectra. However, given the quality of the spectra, we chose instead to examine the two extreme scenarios where all the IGM absorption is either in the CIE or PIE phase. As warmabs and hotabs are the most sophisticated PIE and CIE models, these are used for generating the final results of the IGM parameters of density, metallicity, temperature and ionisation parameter in Section 4. We then investigated robustness and validity of models and assumptions, together with a comparison of the various ionisation model results (Appendix A). The parameters ranges that were applied to the PIE and CIE models are summarised in Table 1. The full multiplicative models (*) which we trialled for the absorbers on the LOS and including the GRB spectra power law (po) in xspec terminology are: PIE: tbabs*warmabs*tbvarabs*po CIE: tbabs*hotabs*tbvarabs*po CIE: tbabs*ioneq*tbvarabs*po CIE: tbabs*absori*tbvarabs*po Fig. 2 shows an example of the model components for the full LOS absorption using hotabs for IGM CIE absorption. The model example is for a GRB at redshift z = 2, with [X/H] = 0.1 for the IGM. For our Galaxy and the GRB host, log(Nhx) = 21, and log(Nhxigm) = 22 (to represent the column density of the IGM LOS cumulatively to z = 2). The absorption by the GRB host is minimal compared to the ISM of our Galaxy and the IGM. This is because of the redshift z = 2 and low metallicity Z = 0.07Z of the GRB host. The sample transmission plots using hotabs and warmabs show the impact of different key parameters and redshift for both PIE and CIE models are available in the online supplementary material. Model components for the LOS absorption using hotabs for IGM CIE absorption in the energy range 0.3 -2.0keV (Swift GRB spectra extend to 10keV). The model example is for a GRB at redshift z = 2, with [X/H] = 0.1 for the IGM, log(Nhx) = 21 for our Galaxy and the GRB host. The IGM log(Nhxigm) = 22 approximates the total column density of the IGM LOS to z = 2. Most absorbtion is due to the IGM (grey) and our Galaxy (red). The GRB host has little contribution due to its redshift and low metallicity (magenta). The total absorption from all three components is the blue line.

RESULTS USING CIE AND PIE IGM MODELS WITH KEY PARAMETERS FREE
In Section 4, we firstly discuss the impact of using additional model components on a sub-sample in Section 4.1, then give the results for the full sample using the CIE IGM absorption model in Section 4.2 and using the PIE IGM model in Section 4.3.

GRB model improvement results
We started by fitting a sub-sample of GRB from our full sample, to examine the impact of adding additional model components leading to the full model including the ionised IGM. We show the fitting results in Fig. 3 for GRB150403A at redshift z = 2.06 as an example of typical results. We initially fitted with a simple model of power law and absorption only from our Galaxy. The top-left panel in Fig. 3 Fig. 3 bottom-left and right panels show the MCMC integrated probability results for N hxigm with temperature and metallicity respectively. The red, green and blue contours represent 68%, 95% and 99% ranges for the two parameters respectively. On the y-axis bottom-left panel, log(T4/K) means that 0 is log(T/K) = 4. All the fittings in the sub-sample for both CIE and PIE model components showed Ctat results as good as or better than the simple models where all the absorption in excess of our Galaxy was assumed to be at the GRB host redshift. Accordingly, we proceeded to fit the full GRB sample with our CIE and PIE models and give the results for the IGM parameters in Sections 4.2 and 4.3. In these scenarios, we use hotabs for CIE and warmabs for PIE with Nhx, metallicity and temperature or ionisation parameters all free. The error bars for all fits are reported with a 90% confidence interval. In the plots of Nhx and redshift, the green line is the mean hydrogen density of the IGM based on the simple model used in D20 and references therein.
where n 0 is the hydrogen density at redshift zero, taken as 1.7 × 10 −7 cm −3 (Behar et al. 2011). This value is based on 90% of the baryons being in the IGM. Values for this IGM fraction in the literature vary e.g. 0.5 − 0.7 (S12) and 0.84 (Zhang et al. 2020).

Results for IGM parameters using a CIE IGM component
We give the key detailed results for the IGM parameters from fitting our model CIE model to the GRB spectra in our sample.
Modelling the IGM using hotabs for CIE with parameters Nhx, Z and T free, results in Nhxigm showing similar values and correlation with redshift as the mean IGM density model in Fig. 4 (top left). A power law fit to the Nhxigm versus redshift trend scales as (1 + z) 1.9±0.2 . The reduced χ 2 = 0.34 indicates a good fit. The mean hydrogen density at z = 0 from the sample is n 0 = 1.8 +1.5 −1.2 × 10 −7 cm −3 , providing a good constraint on this important IGM parameter. Nearly all GRB fits are proximate to both the χ 2 fit and mean IGM density curve. However, there are a few notable outliers, especially the lowest redshift GRB140430A with z = 1.6. This fit has much higher Nhxigm than both the mean density curve and the χ 2 fit. This could be due to a strong absorber on the LOS. To test this, we removed the cap of Z = 0.2 Z as the there is covariance between column density and metallicity parameters i.e. a higher metallicity results in a lower column density. The best fit then for GRB140430A was with Z ≈ 0.4 Z with a much lower column density similar to the mean IGM model density at z = 1.6. At the highest redshift z > 6, the two GRB fits are well below the cosmic mean density and χ 2 fit. There is some dispersion in the GRB data points at z ≤ 2. This could indicate that at these redshifts, the GRB host contribution is dominant over the IGM absorption, while at higher redshifts, the host contribution becomes diluted by the IGM, therefore showing a smaller dispersion of results. It is notable that most of the GRB fits sit at the high end of the 90% confidence interval error bars. xspec failed to fit two GRB from sample of 32. This was either because the best fit was at the limit of the parameters or the error bars were at one or both parameter limits. This could be due to poor spectra resolution or that the parameter range was too narrow. There is a large range in the fitted temperature 5.0 < log(T /K) < 7.1, with substantial error bars in the Fig. 4 bottom-left panel. The mean temperature over the full redshift range is log(T /K) = 6.3 +0.6 −1.3 . These values are consistent with the generally accepted WHIM range. It is interesting to note that even at the highest redshifts z > 4, temperatures of log(T/K) > 5 appear to give good fits. Further, there is no apparent general decline in temperature with redshift. It should be noted, however, that the fits are for the integrated LOS and not representative of any individual absorber temperature.
In nearly all GRB fits, the Cstat was at least as good as, or better than simple fits with all absorption in addition to that in our Galaxy assumed to be at the GRB host. The MCMC integrated plots were consistent with the steppar results. In conclusion, with the caveats of low GRB X-ray resolution, small data sample and the slab model to represent to full LOS, there are reasonable grounds for arguing that the CIE model using hotabs is plausible for modelling the warm/hot component of the IGM at all redshifts. The results are consistent with a mean hydrogen density of n 0 = 1.7 × 10 −7 cm −3 , providing constraints on this IGM parameter of n 0 = 1.8 +1.5 −1.2 × 10 −7 cm −3 . However, cosmological simulations suggest that the fraction of mass contained in the warm-hot IGM phase is a strong function of redshift being ∼ 49% at z = 0, dropping by a factor of 20 by z = 4, while the diffuse cooler IGM becomes dominant (Martizzi et al. 2019). Our model indicates a decline in the average metallicity on the LOS, with a significant drop in metallicity at the highest redshifts. The temperature range of log(T /K) ∼ 5−7 and mean of 6.3 +0.6 −1.3 are consistent with the expected values from simulations for a warm/hot phase. We discuss the results further and compare with other studies in Section 6.

Results for IGM parameters using a PIE IGM component
Modelling the IGM using warmabs for PIE with Nhxigm, Z and ξ as free parameters results in values for Nhxigm and correlation with redshift comparable to the mean IGM density model (the top-left panel of Fig. 5). The data points appear to show less dispersion and are marginally below the mean IGM density model at higher redshift z > 3, though with large error bars. A power law fit to the Nhxigm versus redshift trend scales as (1 + z) 1.0±0.3 , flatter than for CIE. The reduced χ 2 of 0.67 indicates a reasonable fit. Only 2 GRB failed to be fit in xspec out of our sample of 32. The mean hydrogen density at z = 0 from the sample is n 0 = 1.8 +1.4 −1.2 × 10 −7 cm −3 , providing a similar constraint on the IGM density parameter to our CIE model. It is notable that the lowest redshift GRB140430A z = 1.6 in our sample has a best fit Nhxigm again considerably higher than the mean density curve, similar to the CIE model. Again, this could indicate a higher metallicity absorber along the LOS. Fig. 5 top-right panel is a plot of [X/H] versus redshift with a trend scaling as (1 + z) −2.1±0.8 . The reduced χ 2 of 1.84 indicates a reasonable linear fit. The metallicity is approximately [X/H] ∼ −1.0 (0.1 Z ) at z ∼ 2 falling to [X/H] ∼ −2.4 (0.004 Z ) at z > 4. At higher redshift, the average LOS metallicity value appears to decline more rapidly, but with large error bars. This could suggest that there was very little higher metallicity aborption at those redshifts. However, there are very few high redshift GRB in the sample.
There is a large range in the fitted ionisation parameter 0.0 < log(ξ) < 2.9, with substantial error bars in Fig. 5 (bottom left). The mean ionisation parameter over the full redshift range is log(ξ) = 1.6 +0.9 −1.2 . We note that these values are the LOS average and not representative of any individual absorber or redshift.
As discussed in Section 2, we use Cstat minimization due to small number of photon counts, well into the Poisson regime. Thus, χ 2 and AIC are inappropriate. If the model improvement criteria is any improvement in Cstat when compared with the model with all excess absorption over Galactic assumed at the host redshift, then 26/30 CIE, 23/30 PIE, 27/30 combined show improvements. Approximating a χ 2 criterion, some authors consider fits to be significantly improved by the addition of a component if Cstat 2 > 2.71 for each extra free parameter e.g. (Ricci et al. 2017). Our IGM inclusive xspec models have 2 extra free parameters, so the test would be Cstat 2 > 5.42. Using this criterion, 12/30 for CIE and 9/30 are significantly improved, combined 15/30.
In conclusion, with the same caveats as for CIE, there are reasonable grounds for arguing that the PIE model using warmabs is plausible for modelling the cool diffuse IGM. The results are similar to the mean hydrogen density of n 0 = 1.7 × 10 −7 cm −3 . The PIE model results show a decline with redshift in the average metallicty values along the integrated LOS. The ionisation range and mean are consistent with the expected values from simulations. It is not possible to conclude whether PIE or CIE is the better single model for the IGM at all redshift. From the outset, it was noted that a combined model is likely but this requires better data. The results may indicate that we are seeing different IGM phases along the LOS, though we are examining the extremes of CIE an PIE models separately.

DISCUSSION AND COMPARISON WITH OTHER STUDIES
In both CIE and PIE IGM scenarios, the IGM is highly ionised with either high temperatures or high ionisation parameters. We find that under both scenarios for the IGM, the average metallicity along the LOS declines with redshift, with the caveat that we are using a cumulative LOS absorption. The decline in average metallicity is less in the PIE model. It may be that at lower redshift regions of higher metallicity such as the WHIM may be dominant, while at higher redshift, the diffuse cool IGM becomes dominant, diluting the average metallicity, but we would require a combined CIE/ PIE model to establish this. Fixing metallicity to any value gave poor and unreliable results (see Appendix A). Most prior studies were based on simplistic assumptions of solar metallicity, and all absorption in excess of our Galaxy being at the host redshift(e.g. Behar et al. 2011;Campana et al. 2010Campana et al. , 2012. Further, the absorber was assumed to be neutral. Later studies used absori which has only 10 metals, and only Fe variable Campana et al. 2015). The use of solar metalicity leads to underestimate of column density, while the assumption of all excess absorption at the host redshift leads to overestimation of the column density.
Our analysis, using the more sophisticated models for PIE and CIE, shows that substantially higher metallicity is indicated at lower redshifts compared to higher redshifts. As noted in more detail in Sections 1 and 3, there is some consensus for the diffuse cool IGM metallicity with redshifts z = 2−4 at Z = 0.001 Z ([X/H] = −3), but with little or no observed evolution. However, these are either in Lyα forest regions or more dense systems such as LLSs or DLAs (e.g. S03, A08, F14, F16). At lower redshift z = 0 − 2, in the WHIM and the ICM, there is some consensus that the predicted mean metal-licity is Z ∼ 0.1Z (e.g. Wiersma et al. 2011;Danforth et al. 2016, S12), though it is unlikely that many GRB LOS pierce the ICM. Our CIE and PIE models in Section 4 show that regardless of the IGM model, both CIE and PIE are picking up substantial absorption by highly ionised absorbers. This use of sophisticated ionised absorber models for GRB has not been completed previously. Campana et al. (2015) completed simulations of IGM absorption using GRBs and quasars. For GRBs, their simulations indicated that the LOS does not contain any absorbers with over-density ∆ > 100, log(T/K) ∼ 5 − 7 and mean metallicity Z = 0.03Z . As we are tracing the full LOS and not any individual absorber, we cannot compare our results directly with Campana et al. (2015) in terms of overdensities. Their result for temperature range is consistent with ours for the CIE model. However, we find that a decline in metallicity is observed in both CIE and PIE scenarios for the IGM. In contrast, using AGNs, their simulations showed prevalence of absorption systems with large over-densities (∆ > 300) at z ∼ 0.5−1.2, temperature of ∼ (3−15)×10 6 K and mean metallicity in these regions of Z = 0.3 ± 0.1Z . We would agree with their speculation that it is unlikely that GRB trace different LOS to AGN through the diffuse IGM and that therefore, these large overdensities and high metallicity may be proximate to the AGNs, e.g. in their CGM. Behar et al. (2011) noted that in their GRB sample the observed opacity at low energies, while high at low redshift, tended toward an asymptotic value at z ∼ 2. They interpreted this as possible evidence for the detection of absorption by a diffuse, highly ionized intergalactic medium. This interpretation would solve the problems of the lack of correlation observed between the Nhx and Nh i in GRB afterglows, and the very low apparent dust-to-metals ratios. Rahin & Behar (2019) extended this earlier work to include all GRB up to 2019 and found very similar results.
There have been some claims in recent years to have found the missing baryons in the WHIM using different tracers. We now compare our work with some of these studies. Arcodia et al. (2018) used blazars as potential IGM absorption tracers. They modelled IGM absorption using igmabs in xspec. This is based on absori, with solar abundance and limited number of metals. Only 4 blazars were fitted. Their resulting average n 0 = 1.01 +0.53 −0.72 cm −3 is lower than our result. Their temperature log(T /K)= 6.45 +0.51 −2.12 and ionisation log(ξ) = 1.47 ± 0.27 (note log(ξ) was tied to n 0 ) are consistent with our results. They derived a value of Z IGM = 0.59 +0.31 −0.42 Z based on an average IGM density from their fittings, as compared to n 0 = 1.7×10 −7 cm −3 which is substantially higher than our results but they noted this should only be viewed as a consistency check. Macquart et al. (2020) used FRB dispersion measure (DM) to measure the total electron column density on the LOS to the FRB host. Their sample is limited to 5 FRB in the redshift range 0.12 to 0.52. To isolate the possible IGM component, they fix the Galactic DM to values measured by Cordes & Lazio (2002) with an additional fixed component to represent the Galactic halo of 50 pc cm −3 . They also assumed a fixed FRB host at DM host = 50/(1+z) pc cm −3 . They add that further analysis of their sample mildly favors a median host galaxy contribution of ∼ 100 pc cm −3 with a factor of two dispersion around this value. This is the conventional approach in FRB i.e. to fix the FRB host DM with the assumption that all excess DM is then due to the IGM. This is very different to the traditional GRB approach of assuming all absorption in excess of our Galaxy is at the host redshift. Their resulting baryon fraction is a median value of Ω b h 70 = 0.056 and a 68% confidence interval spanning [0.046, 0.066]. Based on this result they claim that their FRB DM measurements confirm the presence of baryons with the density estimated from the CMB and Big Bang Nucleosynthesis, and are consistent with all the missing baryons being present in the ionized intergalactic medium. Our median value for the baryon fraction for both CIE and PIE models is Ω b h 70 = 0.043 and a 90% confidence interval spanning [0.014, 0.079] (CIE) and [0.014, 0.077] (PIE) which is consistent with their results. Their approach to fixing the host DM component is also analogous to our approach with GRB. Nicastro et al. (2018) claim to have observed the WHIM in absorption. Only 1 to 2 strong O vii absorbers are predicted to exist per unit redshift. Nicastro et al. (2018) reported observations of two O vii systems. System 1 (z = 0.43) had T = 6.8 +9.9 −3.6 × 10 5 K, Nhxigm = 1.6 +0.8 −0.5 /(Z/Z ) × 10 19 cm −2 . System 2 (z = 0.36) had T = 5.4 +9.0 −1.7 × 10 5 K, Nhxigm = 0.9 +1.5 −0.9 /(Z/Z ) × 10 19 cm −2 . With Z = 0.1Z , and with an average of 1.5 systems per unit redshift, this gives Nhxigm ∼ 1.9 × 10 20 cm −2 for z ∼ 1. While the temperatures are consistent with our results, the column densities are an order of magnitude lower than our results and that of (Arcodia et al. 2018) and (Macquart et al. 2020) for blazars and FRB respectively. This could be interpreted as supporting the contribution of the IGM to absorption over and above individual strong WHIM absorbers.
It is not possible at present to detect the individual filaments using the thermal Sunyaev-Zeldovich (tSZ) effect as the signal is much smaller than both the noise in the latest CMB experiments, and compared to the sensitivity of Planck. Tanimura et al. (2020, hereafter T20) used gas filaments between the Luminous Red Galaxy (LRG) pairs relying on stacking the individual frequency maps for 88000 pairs in the low redshift range z < 0.4. The stacking removes the CMB component while the dust foreground becomes homogeneous. Their stacked tSQZ signal, with an assumed temperature of 5 × 10 6 K for the filaments, gives an electron overdensity of ∼ 13 , based on electron number density today to be n e0 = 2.2 × 10 −7 cm −3 . This is consistent with (Cen & Ostriker 2006) and M19 simulations for the WHIM. Our results for the mean density and temperature ranges in the CIE scenario are consistent with these results, with the caveat that the IGM slab in our model is placed at half the GRB redshift i.e. at much higher redshifts than the T20 sample.
While there are GRB at low redshift with high Nhx, the bulk of low redshift GRB are consistent with our work. The mean NHX (revised for Z = 0.07Z or actual metallicity, dustcorrected if available) for z < 1 taken from D20 is 5.3 × 10 21 cm −2 . GRB Nh i do not show any relation with redshift. The mean for a sample again from D20 with z < 2 is 4.9 × 10 21 cm −2 . Following our method of approximating the GRB host column density as equal to Nh i, this leaves only a small absorption difference 0.4 × 10 21 cm −2 . At z ∼ 0.5, the mean IGM from our work is ∼ 1.5 × 10 21 cm −2 . Some GRB at low redshift have very high X-ray absorption e.g. GRB190114C. The host-galaxy system of GRB190114C is composed of two galaxies, a close pair merger system (Postigo et al. 2020). Drawing from their observations, there are several possible factors which may explain the very high intrinsic Nhx in this low redshift GRB. The GRB exploded within the central cluster of the host galaxy, where the density is higher, at a projected distance of ∼ 170 pc from the core. The GRB location is indicative of a denser environment than typically observed for GRBs.The host system stellar mass is an order of magnitude higher than the median value of GRB hosts at 0 < z < 1 as measured for the BAT6 host sample. Finally,the GRB host has a much higher metallicity at 0.43 than the average GRB host at 0.07 from D20.
Our results show that substantial absorption probably occurs in the IGM in both the PIE and CIE scenarios. Most fits have consistently, if marginally better Cstat results compared to the simple model with all excess absorption occurring at the GRB host redshift. We would argue that while some excess absorption is attributable to the GRB host, and that better host models may identify this host excess absorption, the IGM contributes substantially to the total absorption seen in GRB spectra, and that it indeed rises with redshift. This IGM absorption at least partly explains why Nhxigm seen in GRB full LOS afterglow spectra is substantially in excess of the intrinsic Nh i in GRB hosts. However, the CGM in the GRB host may also contribute to the Nhxigm, and future models incorporating more advanced modelling for a warm/hot CGM component in GRB hosts are needed to explore the relative contribution of the IGM and the host CGM to the observed absorption.

CONCLUSIONS
The main aim of this paper is to probe the key parameters of density, metallicity, temperature and photo-ionisation of the IGM using sophisticated software models for the ionised plasma. We use spectra from Swift for GRBs as our tracers with a redshift range of 1.6 ≤ z ≤ 6.3. We isolated the IGM LOS contribution to the total absorption for the GRBs by assuming that the GRB host absorption is equal to ionised corrected intrinsic neutral column Nh i,ic estimated from the Lyα host absorption. We use more realistic host metallicity, dust corrected where available in generating the host absorption model. We model the IGM assuming a thin uniform plane parallel slab geometry in thermal and ionization equilibrium to represent a LOS through a homogeneous isothermal medium. We use xspec fitting with steppar and MCMC to generate best fits to the GRB spectra. Our work uses the continuum total absorption to model plasma as opposed to fitting individual line absorption as the required resolution is not available currently in X-ray. We set the xspec metallicity parameter range as −4 < [X/H] < −0.7 (0.0001 < Z/Z < 0.2), with temperature for CIE at 4 < log(T/K)< 8 and ionisation parameter between 0 ≤ log(ξ) ≤ 3. The CIB photon index is fixed at 2.
Our main findings and conclusions are: (i) Modelling the IGM using hotabs for CIE with parameters Nhx, Z and T free appears to present plausible results for Nhxigm with an equivalent mean hydrogen density at z = 0 of n 0 = 1.8 +1.5 −1.2 × 10 −7 cm −3 . It shows similar values and correlation with redshift as the mean IGM density model, Fig. 4 top-left panel. A power law fit to the Nhxigm versus redshift trend scales as (1 + z) 1.9±0.2 .
(ii) A power law fit to the [X/H] and redshift trend for CIE scales as (1 + z) −5.2±1.0 , Fig. 4 top-right panel. Metallicity ranges from [X/H] = −1 (Z = 0.1Z ) at z ∼ 2 to [X/H] ∼ −3 (Z = 0.001Z ) at high redshift z > 4. This could suggest that at low redshift, the higher metallicity warm-hot phase is dominant with Z ∼ 0.1 Z , while at higher redshift the low metallicity IGM away from knots and filaments is dominant.
(iii) The CIE temperature range is 5.0 < log(T/K) < 7.1, Fig. 4 bottom-left panel indicating that very highly ionised metals are prominent absorbers over the LOS. The mean temperature over the full redshift range is log(T/K) = 6.3 +0.6 −1.3 . These values are consistent with the generally accepted WHIM range and with the latest simulations.
(iv) Modelling the IGM using warmabs for PIE with Nhxigm, Z and ξ as free parameters appears to present plausible results though with more scatter at lower redshift compared to our CIE model . The PIE Nhxigm shows values and rise with redshift comparable to the mean IGM hydrogen density model in Fig. 5 top-left panel. A power law fit to the Nhxigm versus redshift trend scales as (1+z) 1.0±0.3 , a much flatter power law than for CIE. The mean hydrogen density equivalent from this model at z = 0 is n 0 = 1.8 +1.4 −1.2 × 10 −7 cm −3 , very similar to the CIE result. (vi) The PIE ionisation parameter range from fits is 0.1 < log(ξ) < 2.9, Fig. 5 bottom-left panel. The mean ionisation parameter over the full redshift range is log(ξ) = 1.6 +0.9 −1.2 .
(vii) Regardless of the assumed ionisation state of the IGM, both models pick up considerable highly ionised absorption.
(viii) We compared our CIE model with absori in Appendix A which was generally used in prior studies using GRBs as IGM tracers. absori is limited with only 10 metals, all fixed to solar metallicity except Fe. Our CIE and PIE IGM models use software which include all metals and ionisation species up to Z ≤ 30, with variable metallicity. In conclusion, absori is no longer a preferred model for IGM absorption and the results of earlier studies using it for IGM modelling may not be reliable.
(ix) All our GRB spectra have fits as good as or better than the model with all excess absorption assumed to occur at the GRB host redshift. While some excess absorption may be attributable to the GRB host and its CGM, in our models the IGM contributes substantially to the total absorption seen in GRB spectra, and it rises with redshift. We provide clear evidence that a complete model should also account for a (possibly dominant) fraction of intervening IGM material.
This study is based on observations of GRB X-ray spectra, and provides results on the IGM parameters. The constraints will only be validated when observations are available from instruments with large effective area, high energy resolution, and a low energy threshold in the soft X-ray energy band e.g. Athena which will study the IGM through detailed observations of O vii and O viii absorption features with equivalent width > 0.13 eV and > 0.09 eV respectively.

SUPPORTING INFORMATION
Supplementary data containing the results for the IGM properties from fitting the GRB spectra with the PIE and CIE model components, and the transmission plots for the CIE and PIE models with different IGM parameter examples are available at MNRAS online. To test the selected PIE and CIE models, we conducted trials freezing one key parameter at a time. We limited the sample data size to 15 covering the full redshift range 1.6 − 6.3. For the first trial we froze the metallicity of the IGM to Z = 0.01Z as representative of the diffuse IGM. Most studies of the cooler PIE IGM in Lyα regions found virtually no evidence for metallicity evolution in the range z ∼ 2 − 4 (e.g. S03, A08) so it is reasonable to test this scenario. The green line for all models is the mean density of the IGM based on the simple model from eq. 1.

A1.1 warmabs (PIE)
In Fig. A1 left, the expected increase of Nhxigm with redshift does not arise with warmabs when the metallicity is frozen to Z = 0.01Z . The low redshift Nhxigm is substantially higher than the expected mean IGM density, while at higher redshifts it is below the IGM mean density. This could indicate that a fixed metallicity assumption is unrealistic, or the PIE model is not appropriate for the LOS to the GRB. In Fig. A1 middle panel, we see a wide range of ionisation parameters with substantial error bars at lower redshift. There appears to be a negative trend with redshift, though this may be due to the metallicity being fixed.
Fig. A1 right panel shows an example of the a MCMC integrated probability plot for the warmabs PIE Nhxigm and ξ. Most MCMC integrated probability plots are reasonably consistent with steppar, indicating a good fit with low Cstat, but some are not. In this example, there are a few islands of high probability. As for several of the GRB, its shows that the best fit could have occurred at the low or high end of the confidence range. In conclusion, primarily due to the result for column density, it is likely, that a fixed metallicity warmabs based PIE model for the IGM is not realistic.

A1.2 hotabs (CIE)
Similar to the warmabs PIE model, the expected increase of Nhxigm with redshift in Fig. A2 left panel does not arise with hotabs when the metallicity is frozen to Z = 0.01Z . This could indicate that a fixed metallicity assumption is unrealistic, or that the CIE model is not appropriate. Again, at low redshift, the Nhxigm is much greater than the mean density model, while at high redshift it is much lower. The error bars are very large. In Fig. A2 middle panel, we see a wide range of temperatures with substantial error bars. The best fit data points appear to favour either the high or low end of the 90% confidence range. Finally, Fig. A2 right panel shows an example of the MCMC integrated probability plot for the hotabs CIE Nhxigm and T. In this example, there is a characteristic S shape where, at high column density, a range of temperatures at a similar column density could fit, while at low temperature, there is a different range of column densities that could fit. There is a single high maximum but there are a couple of islands of 1 sigma probability.
In conclusion, it is likely, that a fixed metallicity hotabs based CIE model for the IGM is not realistic.

A1.3 ioneq (CIE)
Modelling the IGM using ioneq with a fixed metallicity appears to present plausible results for Nhxigm in Fig. A3 left panel, showing a similar rise with redshift as the mean IGM density model, except at very high redshift. A power law fit to the Nhxigm versus redshift trend scales as (1 + z) 1.8±0.5 . We note that all metals included in the ioneq model, except O, Ne and Fe, are fixed to the solar abundance, an unrealistic value for the diffuse IGM. ioneq is currently being updated to allow all metals as free parameters but was not available for this paper (Gatuzz, E., private communication). As with hotabs, the error bars on temperature with redshift in Fig.  A3 middle panel are substantial, but the best fits do not favour the high or low end of the confidence interval.
Most MCMC integrated probability plots for ioneq fittings show large degeneracy as seen in the example in Fig.  A3 right panel, with many local maxima. The Cstat fits to the GRB spectra are as good as for warmabs and hotabs.
In conclusion, the plots suggest that a CIE IGM model with fixed metallicity of Z = Z0.01 may be plausible. However, due to the MCMC showing substantial degeneracies, and the unrealistic solar metallicities, we have not used this model.

A1.4 absori
Fig. A4 left panel shows the results for Nhxigm using absori for the IGM absorption with metallicity fixed again at Z = 0.01Z . In absori, only Fe is affected as the other 9 metals in the model are fixed to solar. The ionisation parameter was fixed at ξ = 0, so only temperature was allowed to vary as a CIE model. The fits were very poor, errors could not be generated in xspec, and the MCMC runs failed to generate plausible results. No apparent redshift correlation can be seen, similar to warmabs and hotabs. Due to the poor fits, it cannot be said whether this is due to the absori model being limited to 10 metals, having all metals, except Fe at solar, edge absorption only or the model not being selfconsistent. Fig A4 right panel shows the IGM temperatures from the fittings. As with all models, it shows a large scatter.
In conclusion, absori is no longer an ideal model for IGM absorption.
In summary, warmabs and hotabs are the most sophisticated models, and the MCMC integrated probability plots were the most consistent with the steppar results and have plausible integrated probability plots. Most show a single deep maximun, but there is degeneracy with several possible parameter fit solutions. Accordingly, we decided to proceed only with warmabs and hotabs, and not ioneq nor absori for the remaining tests. However, the fixing of metallicity for both PIE and CIE IGM models with redshift is not appropriate for any model. Figure A1. Results for the IGM parameters using the PIE warmabs model with Z = 0.01Z . The error bars are reported with a 90% confidence interval. Left panel is Nhx and redshift. The green line is the simple IGM model using the mean IGM density. Middle panel is ionisation parameter versus redshift. Right panel is an example of an integrated MCMC plot. The red, green and blue contours represent 68%, 95% and 99% ranges for the two parameters respectively, with grey-scale showing increasing integrated probability from dark to light. On the y-axis rlogxi = log(ξ). Figure A2. Results for the IGM parameters using the CIE hotabs model with Z = 0.01 CIE Z=0.01. The error bars are reported with a 90% confidence interval. Left panel is Nhx and redshift. The green line is the simple IGM model using the mean IGM density. Middle panel is temperature versus redshift. Right panel is an example of an integrated MCMC plot. The red, green and blue contours represent 68%, 95% and 99% ranges for the two parameters respectively, with grey-scale showing increasing integrated probability from dark to light. On the y-axis in the bottom-left panel T4 means the log of the temperature is in units of 10 4 K. Figure A3. Results for the IGM parameters using the ioneq CIE model with IGM Z = 0.01 . The error bars are reported with a 90% confidence interval. Left panel is Nhx and redshift. The green line is the simple IGM model using the mean IGM density. Middle panel is temperature versus redshift. Right panel is an example of an integrated MCMC plot. The red, green and blue contours represent 68%, 95% and 99% ranges for the two parameters respectively, with grey-scale showing increasing integrated probability from dark to light.

A2 Forcing N HXIGM to equal the mean IGM density
The next approach investigated was to freeze the Nhxigm parameter at the value for mean IGM density integrated to the GRB redshift using eq.1 . Metallicity and ionisation parameters (PIE) or temperature (CIE) were free.
For both PIE and CIE, nearly all fits were consistent with steppar and showed good integrated probability plots. There is a requirement for strong metallicity evolution in both scenarios with power law fits to the [X/H] versus redshift trend scaling as (1 + z) −9.1±0.7 and (1 + z) −7.1±0.8 for PIE (Fig. A5 topleft panel) and CIE (Fig. A5 bottom-left panel) respectively. The 90% confidence range was much improved for the [X/H] fits as compared with the fixed metallicity scenario fits for Nhxigm. The ionisation parameter for the PIE fits varied widely between 0 < log(ξ) < 3 without any simple trend with redshift. The temperature parameter for the CIE fits also varied widely between 5 < log (T/K) < 7.5 without any simple trend with redshift. Fig. A6 shows two examples of MCMC integrated probability plots for the CIE scenario. Both show the patterns that most GRB showed in this scenario of Nhxigm fixed to the mean density where at high temperature, a range of metallicity could fit, while at low metallicity, there is a range of temperature that could fit.
In conclusion, if the scenario where the average density model of the IGM is valid for the GRB sight lines, it re- Figure A4. Results for the IGM parameters using the absori CIE model with the IGM Z = 0.01 . Left panel is Nhx and redshift. The green line is the simple IGM model using the mean IGM density. Right panel is temperature and redshift. No error bars could be generated by xpec. Figure A5. Results for the IGM parameters with Nhxigm fixed at the mean IGM density. The error bars are reported with a 90% confidence interval. Top-left panel is [X/H] versus redshift for the PIE model. Top-right panel is ionisation versus redshift for PIE. Bottom-left panel is the CIE model [X/H] versus redshift. Bottom-right panel is log(T/K) versus redshift for CIE. The orange line is the χ 2 fit. We do not include a χ 2 curve in the temperature-redshift plot (bottom-right) as the fit had very large uncertainties. Figure A6. Sample MCMC integrated probability plots with hotabs CIE IGM for two GRB with N hxigm equal to the mean density. The red, green and blue contours represent 68%, 95% and 99% ranges for the two parameters respectively, with grey-scale showing increasing integrated probability from dark to light. On the x-axis T4 means the log of the temperature is in units of 10 4 K. On the y-axis all metals are tied to the Z/Z for Carbon. quires strong metallicity evolution for both CIE and PIE. It is not possible to determine which scenario (CIE versus PIE) is more plausible from the fits apart from the fact that the high redshift z = 6.32 GRB140505 was well fitted with CIE but not with PIE. The results support the Section 4 free parameter fit model scenarios for both PIE snd CIE IGM and could be interpreted as validity check.

A3 Freezing temperature for CIE and ionisation parameter for PIE
The next test was to freeze temperature for CIE and ionisation parameter for PIE and leave Nhxigm and metallicity free. For temperature in the CIE hotabs model, we froze temperature at log(T /K) = 5 and 6 as representative of the cooler and hotter CIE phases. The fits for Nhxgm with temperature fixed at log(T/K) = 5, are much lower than the mean IGM model in Fig. A7 top-left panel, with considerable scatter. In Fig. A7 top-right panel with log(T/K) = 6, some fits are similar to the mean IGM model and show a suggestion of a rise with redshift with some outliers. However, several are well below the mean density. The metallicity plots for both fixed temperatures show no apparent relation with redshift. The higher temperature log(T/K) = 6 CIE model appears more realistic if the IGM mean density model is appropriate for the IGM. However, it is unlikely that a fixed average temperature approach is appropriate for our CIE IGM modelling.
For PIE, the ionisation parameter was frozen at log(ξ) = 1 and 2. At both log(ξ) = 1 and 2, there is a possible Nhxigm rise with redshift in Fig. A8 top-left and right panels. Further, the fits for both are similar to the mean density model, with log(ξ) = 2 being closer. There is a suggestion of metallicity evolution at log(ξ) = 2. It is not possible to say whether freezing ionisation parameter is a reasonable approach but the fits and overall results for log(ξ) = 2 are better, with lower Cstat.
In summary, freezing the ionisation parameter gives somewhat more plausible results in the PIE scenarios than the CIE scenarios with fixed temperatures. However, overall, the scenarios with such fixed parameters are not preferred and therefore, we suggest that our free parameter IGM scenarios are more realistic in Section 4.
The warmabs and hotabs models are more sophisticated than the current version of ioneq and absori, again supporting our model choices in Section 4.