MIGHTEE-HI: HI galaxy properties in the large scale structure environment at z~0.37 from a stacking experiment

We present the first measurement of HI mass of star-forming galaxies in different large scale structure environments from a blind survey at $z\sim 0.37$. In particular, we carry out a spectral line stacking analysis considering $2875$ spectra of colour-selected star-forming galaxies undetected in HI at $0.23<z<0.49$ in the COSMOS field, extracted from the MIGHTEE-HI Early Science datacubes, acquired with the MeerKAT radio telescope. We stack galaxies belonging to different subsamples depending on three different definitions of large scale structure environment: local galaxy overdensity, position inside the host dark matter halo (central, satellite, or isolated), and cosmic web type (field, filament, or knot). We first stack the full star-forming galaxy sample and find a robust HI detection yielding an average galaxy HI mass of $M_{\rm HI}=(8.12\pm 0.75)\times 10^9\, {\rm M}_\odot$ at $\sim 11.8\sigma$. Next, we investigate the different subsamples finding a negligible difference in $M_{\rm HI}$ as a function of the galaxy overdensity. We report an HI excess compared to the full sample in satellite galaxies ($M_{\rm HI}=(11.31\pm1.22)\times 10^9$, at $\sim 10.2 \sigma$) and in filaments ($M_{\rm HI}=(11.62\pm 0.90)\times 10^9$. Conversely, we report non-detections for the central and knot galaxies subsamples, which appear to be HI-deficient. We find the same qualitative results also when stacking in units of HI fraction ($f_{\rm HI}$). We conclude that the HI amount in star-forming galaxies at the studied redshifts correlates with the large scale structure environment.


INTRODUCTION
The evolution of galaxies, including mass assembly, star formation and morphological transformations of galaxies, is known to be strongly connected to the availability of fresh molecular Hydrogen (H2) supporting the star formation process.Star-forming H2 clumps arise via gravitational instability and collapse out of large diffuse HI clouds, whose existence represents therefore the necessary condition to trigger the formation of new stars.While part of the galactic HI can be produced by either recombination of ionized Hydrogen (HII) or other reprocessing mechanisms of the internal gas, hydrogen accretion on galaxies from the circumgalactic and intergalactic media plays a fundamental role to ensure the availability of HI reservoirs.
In this context, the environment surrounding a galaxy and its physical conditions may assume a primary importance in regulating gas accretion and removal, galaxy interactions, and other relevant evolutionary phenomena.In fact, galaxy surveys have measured the position of millions of galaxies and demonstrated that at cosmological scales smaller than a few hundred Mpc, matter is no longer uniformly distributed, but forms a filamentary pattern called cosmic web (e.g.Bond et al. 1996), which is constituted by filaments interconnecting massive knots and surrounding large voids.In the standard inflationary ΛCDM scenario, the cosmic web naturally emerges from gravitational instability and growth of cosmic structures (e.g.Zel'dovich 1970;Bond et al. 1996), happening as a result of the presence of small inhomogeneities in the primordial matter field.While driven by dark matter, the formation of the cosmic web also involves baryons.As a result, gas exhibits different properties (temperature, rotation and dispersion velocities, ionization state, among others) depending on the environment it lives in (e.g.Martizzi et al. 2019;Galárraga-Espinosa et al. 2020;Sinigaglia et al. 2021, and references therein), and therefore it may impact the evolution of the galaxies it feeds in a different way.The large scale structure has been shown to correlate with several galaxy properties, for instance star formation history and quenching ⋆ Email: francesco.sinigaglia@phd.unipd.it(e.g.Darvish et al. 2014;Vulcani et al. 2019;Kraljic et al. 2020;Malavasi et al. 2022, and references therein), colour (e.g.Chen et al. 2017;Pandey & Sarkar 2020), stellar mass and its assembly (e.g.Alpaslan et al. 2016;Chen et al. 2017;Malavasi et al. 2017;Kraljic et al. 2020), angular momentum magnitude and alignment (e.g.Libeskind et al. 2012;Tempel & Libeskind 2013;Krolewski et al. 2019;Barsanti et al. 2022), and the stellar mass -gas metallicity relation (Donnan et al. 2022), among others.
In this picture, the role of HI has been investigated only in the nearby universe at z < 0.1 (e.g.Kleiner et al. 2017;Crone Odekon et al. 2018;Tudorache et al. 2022;Cortese et al. 2021), while it has remained unexplored at higher redshift due to the difficulty in detecting the 21-cm emission line and the general lack of deep complete spectroscopic surveys covering volumes large enough to reconstruct the cosmological largescale environment.
Statistical approaches such as spectral line stacking (Zwaan et al. 2001) can be adopted to exploit the property of Gaussianity of the noise and to extract a global mean HI signal out of the investigated population, at the expense of the information about the HI content of the individual galaxies constituting the sample.The spectral line stacking technique has been widely used in the last decades to probe the HI content in galaxies at different redshift, and in particular to unveil correlations such as the presence and abundance of HI in galaxy clusters (Zwaan 2000;Chengalur et al. 2001;Lah et al. 2009;Healy et al. 2021), HI galaxy scaling relations (Fabello et al. 2011a;Geréb et al. 2015;Brown et al. 2017;Sinigaglia et al. 2022c;Bera et al. 2022;Chowdhury et al. 2022c;Bera et al. 2023;Pan et al. 2023), the HI mass function (Pan et al. 2020;Bera et al. 2022), the MHI content of AGN host galaxies (Fabello et al. 2011a;Geréb et al. 2013Geréb et al. , 2015)), the baryonic Tully-Fisher relation (Meyer et al. 2016), the HI cosmic density evolution with redshift (Lah et al. 2007;Delhaize et al. 2013;Kanekar et al. 2016;Rhee et al. 2018;Bera et al. 2019;Chowdhury et al. 2020;Chen et al. 2021;Chowdhury et al. 2021Chowdhury et al. , 2022a,b,c),b,c), the HI content of galaxy groups and the MHI-M halo relation (Guo et al. 2020;Chauhan et al. 2021;Roychowdhury et al. 2022;Dev et al. 2023), among others.Spectral line stacking has been successfully applied to other spectral lines as well, such as CO and CII lines (e.g.Decarli et al. 2018;Bischetti et al. 2019;Jolly et al. 2021;Romano et al. 2022).
The problem of the lack of a deep complete spectroscopic coverage on large sky areas can be alleviated in the case where multi-wavelength photometric observations can provide an accurate photometric redshift estimation.In this case, photometric redshifts can be used to perform tomographic analysis on the sky in thick redshift slices.In the COSMOS field -studied in this work -the exceptional amount of work over the past decades has made it possible to collect an incredibly large dataset, with photometry ranging from the X-ray to the radio domain (see e.g.Laigle et al. 2016;Weaver et al. 2022).
In this work we perform a systematic investigation of the correlations between the content of HI in galaxies and different definitions of the large scale structure environment at a median redshift z ∼ 0.37, then compare to reference results at z ∼ 0. We perform a HI stacking experiment and measure the amount of HI in different environments, based on subsamples defined from galaxies located in low-/highdensity environments, in field/filaments/knots, or being central/satellite/isolated inside their host dark matter halo.
This paper is organized as follows.In §2 we present the details of the MIGHTEE survey and of the HI data we make use of.In §3 we summarize the large-scale computations and definitions used throughout the work.§4 defines the global galaxy sample we analyze and §5 introduces our stacking procedure.In §6 we present the results we obtain and in §7 we provide a discussion and contextualization of them.We conclude in §8.
Throughout the paper, we assume a cosmology as reported from the most recent results from the Planck satellite, with Ωm = 0.311, h = 0.677, Ω k = 0 (TT,TE,EE+lowE+lensing+BAO, Planck Collaboration et al. 2020).
The MeerKAT International GigaHertz Tiered Extragalactic Exploration Large Survey Program (MIGHTEE, Jarvis et al. 2016) is a survey, conducted with the MeerKAT radio interferometer (e.g.Jonas & MeerKAT Team 2016).MIGH-TEE is targeting at L-and S-bands four deep, extragalactic fields (COSMOS, XMM-LSS, CDFS, ELAIS-S1), characterized by a wealth of multi-wavelength data made available by past and ongoing observational efforts.
The MIGHTEE data are acquired in spectral and full Stokes mode, thereby making MIGHTEE a spectral line, continuum and polarization survey.In this paper, we make use of the Early Science HI spectral line data from MIGHTEE, presented in Maddox et al. (2021).The observations were conducted between mid-2018 and mid-2019 and targeted ∼ 3.5 deg 2 in the XMM-LSS field and ∼ 1.5 deg 2 in the COS-MOS field.These observations were performed with the full array (64 dishes) in L-band, using the 4k correlator mode (209 kHz, corresponding to 52 km s −1 at z = 0.23 and 56 km s −1 at z = 0.49).Our analysis is limited to the redshift The MIGHTEE-HI Early Science visibilities were processed with the ProcessMeerKAT calibration pipeline 1 .The pipeline is CASA-based and performs standard calibration routines and strategies for the spectral line data such as flagging, bandpass and complex gain calibration.The continuum subtraction was done in both the visibility and image domain using standard CASA routines uvsub and uvcontsub.Residual visibilities after continuum subtraction were imaged using CASA's task tclean with Briggs' weighting (robust=0.5).Median filtering was applied to the resulting datacubes to reduce the impact of errors due to continuum subtraction.

LARGE SCALE STRUCTURE DEFINITION
In this section we summarize the procedure used to construct the density field and to compute the large-scale scale properties in the COSMOS field, as derived by Darvish et al. (2015).For more details, we refer the reader to Darvish et al. (2015).

Construction of the density field
In absence of a complete spectroscopic coverage over the full ∼ 2 deg 2 of the COSMOS field, the density field is constructed from the photometric COSMOS2015 catalogue (Laigle et al. 2016).The redshift uncertainty associated with photometric redshifts (photo-zs hereafter) is too large to accurately unveil redshift-space distorsions effects.Nonetheless, an accurate photo-z determination (∆z/(1 + z) ≲ 0.01) can still enable a robust density field construction, sufficient to study statistical relations between galaxy properties and the surrounding large-scale environment.Following Darvish et al. (2015), a cut in M * is applied at log 10 (M * /M⊙) ≳ 9.6, to ensure that the photometric sample is 90% complete in M * .This guarantees that our sample is volume-limited, and hence, we do not expect biases arising from an evolving mass cut across redshift.We will use this fact later in the paper.
The photo-z estimation for the COSMOS2015 catalogue was performed by means of the spectral energy density fitting technique, over > 30 photometric bands from the near-UV to the near-IR domains.When compared to the spectroscopic sample from the zCOSMOS survey (Lilly et al. 2009), the photometric COSMOS sample turns out to have a median accuracy ∆z/(1 + z) median ∼ 0.007, and to have accuracy ∆z/(1 + z) ≲ 0.01 out to z ∼ 1.2 (see Fig. 1 in Darvish et al. (2015)).
The density field is constructed in adjacent redshift slices of variable width, and each galaxy is associated with a weight corresponding to the fraction of the photo-z probability distribution of the galaxy lying inside each z-slice, i.e. the likelihood of a galaxy having redshift included in that redshift interval.A galaxy is used to construct the density field only in the z-slices where their weight is ≥ 10%.
After having assigned weights to galaxies, Darvish et al. (2015) employed the weighted adaptative kernel smoothing technique (with weights corresponding to the ones discussed above) to estimate the density field, employing a 2D Gaussian kernel with variable variance depending on the local galaxy density.The adopted global smoothing scale is s = 0.5 Mpc, roughly the virial radius of galaxy clusters in the COSMOS field (e.g.Finoguenov et al. 2007).
The density field is estimated via interpolation at the galaxy positions, using RA and DEC as angular coordinates and the maximum-likelihood redshift slice as spectral coordinate.
Fig. 1 shows the projected density field, colour-coded from blue to red at increasing density.Even though we perform analysis at 0.23 < zspec < 0.49, in this plot we consider 0.1 < z phot < 0.6, i.e. a larger redshift interval, to take into account the uncertainty in photometric redshift estimation of the galaxies with z phot at the edges of the spectroscopic redshift interval (z phot ∼ 0.23 and z phot ∼ 0.49).One can visually identify overdense regions with spherical or ellipsoidal shapes (knots) and with elongated one-dimensional shapes (filaments), and underdense regions (field).

Cosmic web environments definition
The classification of the large-scale cosmic web environment performed by Darvish et al. (2015) consists in the 2D version of the Multi-scale Morphology Filter algorithm (Aragón-Calvo et al. 2007;Darvish et al. 2014).In particular, this algorithm relies on the computation of the local curvature of the density field and the shape of structures, i.e. on geometrical arguments.The local curvature and shape are computed from the eigenvalues λi of the rank-2 Hessian matrix (with derivatives computed along the angular coordinates) H = ∂i∂jδz(x) of the density field δ, at coordinates x and redshift z.Defining λ1,2 such that |λ2| ≥ |λ1|, one defines cosmic web type masks ϵ k and ϵ f at coordinates x as: • ϵ k = 1 if λ1 ≤ 0 and λ2 ≤ 0, 0 otherwise, for knots;  Projected density field, colour-coded from blue to red at increasing density.The plot has been generated by first binning galaxy positions (RA and DEC) of all galaxies in the catalogue with photometric redshift 0.1 < z phot < 0.6 in pixels of size d ∼ 10 ′′ , then applying a two-dimensional Gaussian smoothing with standard deviation σ = 30 ′′ , and eventually applying a bilinear interpolation.The colorbar is reported in units of log 10 (1 + n gal ), where n gal is the galaxy number counts per pixel.One can visually identify overdense regions with spherical or ellipsoidal shapes (knots) and with elongated one-dimensional shapes (filaments), as well as underdense regions (field).

Field Filaments Knots
Figure 2. Distributions of field (blue), filaments (orange) and knots (green) galaxies as a function of galaxy overdensity (in units log 10 (1 + δ), to visually enhance the differences).As expected, the histograms clearly evidence that field galaxies mostly live in lowdensity regions, filaments cover the intermediate-density regime, while knots galaxies are preferentially found in high-density regions.
HI galaxy properties at z ∼ 0.37 in the LSS 5 ϵ = 1 conditions, one defines the functions: to evaluate the local resemblance of an identified structure to a knot and to a filament, respectively.This definition implies that, if |λ1| ∼ |λ2|, the slope of the density field has a rotationally-symmetric structure and the point belongs to a knot (D k ∼ 1).Instead, if |λ1| ≪ |λ2|, a structure is elongated in one dimension, and is identified as a filament (D f ∼ 1).The Hessian matrix of the density field has been used as an alternative to the widely-used cosmic web classification based on the Hessian matrix of the gravitational tidal tensor and has been shown to be important to parametrize the properties of large scale structure (see e.g.Heavens & Peacock 1988;Sinigaglia et al. 2021Sinigaglia et al. , 2022b)).Subsequently, to control the selection of knots and filaments, the functions D f and D k are non-linearly transformed into M k and M f , respectively, as: (2) where β is a parameter which regulates the criterion used to select features, set to β = 0.5 in Darvish et al. (2015).This transform has the effect of enhancing the differences between D k and D f , trying to discriminate more clearly between different cosmic web environments.The quantities M k and M f should then be seen as boosted knot and filament signals respectively, and represent auxiliary variables to be used later on in the computations.Eventually, to maximize the significance of the extracted large scale structure features and to best separate between such structures and the background, one can not only exploit the signs and the ratios between eigenvalues, but also their magnitude.In fact, the magnitude of eigenvalues will tend to be small for the background due to its fluctuating nature, while it will tend to be large for real structures.This fact can be accounted for by defining the norm of the Hessian as where c = 0.5 × max( λ2 1 + λ 2 2 ) at each z-slice (Frangi et al. 1998).
The knot and filament probability signals are then evaluated for each pixel on the set of maps obtained using different physical scales L as SL = ϵ×M ×I, and eventually the signal S is chosen to be the maximum among the different scales, i.e. S = maxL(SL).
At this point, a knot and filament signal (S k and S f respectively) are associated to each galaxy.To conclusively establish what environment a galaxy belongs to, Darvish et al. (2015) found the optimal signal cuts to be parametrized by t k = 0.0639×z +0.1142 and t f = 0.0253×z +0.0035 for knots and filaments, as the best trade-off that guarantees to have a sufficiently large sample and to minimize contamination.
Eventually, a galaxy is classified to belong to a knot, a filament, or to the field as follows: • field, otherwise.
To better understand which density regimes the three classes of cosmic web environment correspond to, Fig. 2 shows the distributions of field (blue), filaments (orange) and knots (green) galaxies as a function of galaxy overdensity 2 (in units log 10 (1+δ), to visually enhance the differences).As expected, the histograms clearly evidence that field galaxies mostly live in low-density regions, filaments cover the intermediatedensity regime, while knots galaxies are preferentially found in high-density regions.

Central, satellite, and isolated galaxies
To define whether each galaxy in the analyzed sample is a central or satellite in a dark matter halo, Darvish et al. (2017) first define a catalogue of galaxy groups and afterwards flag as central the most massive galaxy in a group and as satellite the remaining galaxies of the group.Isolated galaxies, which are found not to be associated with any group, have two possible interpretations.One is that they are central galaxies with too faint satellites to be detected.Alternatively, they can be regarded as satellite galaxies which have been ejected from their group, or as the product of an earlier merger of a galaxy pair.
Galaxy groups are determined via the application of a friends-of-friends algorithm (Huchra & Geller 1982), based on the ansatz that any pair of galaxies closer than a given critical distance (also called linking length) belongs to the same group.The definition of the linking length is therefore of primary importance to obtain a reliable galaxy group classification.The angular and redshift separation between two galaxies i and j are defined by Darvish et al. (2017) as where Dc(z) is the comoving distance and n(z) is the median number density of galaxies at redshift z, and bang and bz are free parameters set to bang = 1.3 and bz = 1.5.We refer to Darvish et al. (2017) for a thorough discussion of the results.

SAMPLE SELECTION
In this section we present the details about the sample selection.

Cross-match with spectroscopic catalogues
The galaxy sample we make use of in this work consists of star-forming galaxies at redshift 0.23 < z < 0.49 in the COS-MOS field (Scoville et al. 2007), with spectroscopic redshift available from public surveys.Compared to the one used in Sinigaglia et al. (2022c), the catalogue has been updated with 10 −2 10 −1 10 0 the addition of new sources.In particular, we cross-match all the galaxies contained in the catalogue compiled by Darvish et al. (2015Darvish et al. ( , 2017) ) (including both star-forming and passive galaxies) with the list of spectroscopic redshifts compiled by querying publicly-available catalogues from multiple surveys of the COSMOS field (Khostovan et al., in prep.), and keep only those galaxies for which we were able to identify a spectroscopic counterpart.As shown in Sinigaglia et al. (2022c), the spectroscopic counterpart sample of the COSMOS photometric catalogue is complete (in terms of representativity of the photometric sample) down to log 10 (M * ) ∼ 9.5, roughly the same mass limit used to define the catalogue used in this work.At this point, we select only star-forming galaxies from the resulting sample, based on a rest-frame colour-colour N U V − r/r − J plane selection, extracted directly from the 10 −2 10 −1 Laigle et al. ( 2016) catalogue 3 .In particular, according to this selection, quiescent galaxies are defined as those featur-

Galaxy number density
3 We notice that, even though a more recent COSMOS photometric catalogue has been made publicily available (Weaver et al. 2022), we prefer to stick to the Laigle et al. ( 2016) catalogue for consistency with the computations performed by Darvish et al. (2015Darvish et al. ( , 2017)).Also, at the probed redshift, the gain in NIR photometry -which is the main progress between the Laigle et al. ( 2016) and the Weaver et al. (2022) catalogues -is not significant.What drives the accuracy at this redshift are the medium bands, and they did not change from one catalogue to the other.
After applying these cuts, the resulting catalogue is found to contain 1835 more galaxies with respect to the catalogue employed in Sinigaglia et al. (2022c), uniformly spread over the probed redshift range (0.23 < z < 0.49).
Through a further cross-match with the radio-selected AGN catalogue built by Smolčić et al. (2017), we estimate the fraction of AGNs in our sample to be ∼ 3.5%.We do not exclude AGNs from our sample, and their impact on results from HI spectral stacking will be addressed in future publications of the MIGHTEE collaboration.Eventually, by rely-ing on the spectroscopic redshifts we also exclude from our sample all galaxies whose HI emission is expected at radio frequencies strongly affected by RFI.While we cross-checked that RFI does not have a major impact on our stacking results, we prefer to limit our sample to RFI-free regions to have a higher degree of control of systematics.
After the application of all the selection criteria described above, our final sample consists of 2875 galaxies, with a median redshift z ∼ 0.37.
Fig. 3 illustrates the log 10 (M * ) (left) and z (right) distributions of galaxies, for different values of the local overdensity field δ (δ ≤ 0, δ > 0; first row), position inside the host dark matter halo (central, satellite, or isolated; second row), and the cosmic web environment they belong to (field, filaments, or knots; third row).We also report average and median M * and z in Table 2.By visually inspecting these distributions, one can easily notice that there are similarities and differences between them.To quantify how similar these distribution are, we have run two-samples one-dimensional Kolmogorov-Smirnov tests comparing galaxy properties distributions in different environments.We report the results in Appendix A, showing the resulting p-values graphically in Figs. 12 and 13.In the case of the KS test comparing the M * distribution for different subsample, δ > 0, centrals and knots galaxies are the subsamples which tend to yield p < 0.05.In the case of the KS test comparing the z distributions, we can reject the null hypothesis in most of the cases.
Nonetheless, it may be misleading to conclude that there are selection biases.
In fact, the systematic differences occurring between highdensity and low-density environments (both in terms δ and of cosmic web types) are known effects in the literature.The stellar (luminosity) mass functions of star-forming galaxies in high-density environments feature an excess of probability in the high-mass (bright) end and, consequently, a dearth of probability towards low masses (luminosities) (see e.g.Bolzonella et al. 2010;Davidzon et al. 2016).Therefore, the differences between the M * distributions do not arise as a result of selection biases.Rather, they originate as a natural consequence of the diversity of physical processes shaping the mass assembly history in distinct environment.To minimize the impact of such systematic differences, we adopt as target quantity of our stacking not only MHI, but also the HI fraction fHI ≡ MHI/M * , as will be explained in more details in §5.
As for the z distributions, the Kolmogorov-Smirnov tests tell that we can reject the null hyphotesis in most of the cases.However, we also notice that the deviations between the z distributions of the different subsamples do not show systematic trends, but rather random fluctuations.
Fig. 4 shows the MNUV − Mr (left) and Mr − MJ (right) colour distributions, with the same scheme as Fig. 3.The distributions of different subsamples do not present evident differences, except for a cutoff of the knots galaxies at redder colours towards the bluer end.However, this latter fact is in part due to galaxies in such high overdensities naturally being redder -a well-known fact from the literaturebut it is also enhanced by the poor statistics of the knots sample and by the resulting larger statistical fluctuations.In any case, it regards only a tiny fraction of the knots galaxies subsample.This means that the comparison we are perform- ing relates subsamples with consistent underlying colour (and hence SFR) distributions.We therefore conclude that there are no obvious selection biases at this point.

Cosmic variance assessment
For a robust analysis of correlations between the large scale structure and HI galaxy properties to be robust, we need to address the possible effect of cosmic variance.In fact, the universe starts to be homogeneous on scales ∼ hundreds of Mpc.If the volume is not large enough, the results may be biased by the fact that we are looking at a specific cosmic realization.
To address this and to take into account that the surveyed volume extends over a large radial distance, we compute the comoving volume probed by our observations.Given the assumed cosmology, the observed comoving area is ∆RA × ∆DEC = 24.2× 20.1 cMpc 2 at z = 0.23 and ∆RA × ∆DEC = 48.0× 40.1 cMpc 2 at z = 0.49, while the total observed comoving radial distance is d = 949.6 cMpc.Overall, the total volume is V = 1.07 × 10 6 cMpc 3 , equivalent to a cubic volume with side l ∼ 102.3 cMpc.We stress this volume corresponds to the volume spanned by the spectroscopic sample, not by the entire MIGHTEE datacube, the latter being in principle much larger.In fact, existing spectroscopic surveys in the COSMOS field beyond the nearby universe cover mostly the central part of the field, leaving the angular outskirt of the MIGHTEE data unprobed.
Even though the total volume is not large enough to host outlier rare cosmic structures such as super-clusters or supervoids, it encompasses a volume comparable to state-of-the-art cosmological hydrodynamic simulations.Therefore, we conclude that, while the probed volume is not very large in a cosmological sense and some cosmic variance effects may still be present, this should not constitute a major issue.
Throughout the paper, we adopt a standard spectral line stacking procedure (see e.g.Healy et al. 2019;Sinigaglia et al. 2022a).We start by extracting HI cubelets around the galaxies in our sample from the full datacubes, with aperture (3×FWHM of the beam major axis, 3×FWHM of the beam major axis, ±2000 km s −1 ) in (RA, DEC, velocity).We choose these apertures to ensure that the whole flux emitted by galaxies is included in the cubelets.The angular aperture corresponds to ∼ 130 physical kpc at z = 0.23 (i.e.minimum aperture), larger than the typical HI disk size (see e.g., Wang et al. 2016;Rajohnson et al. 2022, for the MHI − size relation at z = 0).This choice allows us to not underestimate the flux, which may happen if a smaller aperture is chosen instead, and leaves us only with the problem of subtracting the flux contamination by nearby sources.Optical coordinates and spectroscopic redshifts are used to define the center of the cubelets.
Afterwards, we integrate each cubelet over angular coordinates, obtaining a spectrum.Each spectrum at observed frequency ν obs is then de-redshifted to its rest-frame frequency ν rf through ν rf = ν obs (1+z) and converted to units of velocity as v = cz.As the frequency bin width is fixed throughout the cubes (∆ν = 209 kHz), velocity bins have different widths as a function of redshift.Therefore, to ensure that all the spectra are binned the same manner in the spectral direction, spectra are resampled to a reference spectral template, with velocity bin width ∆v = 100 km s −1 .
We convert spectra from units of flux to units of MHI (per velocity channel) (e.g.Zwaan et al. 2001): where DL is the luminosity distance of the galaxy in units Mpc, S(v) is the 21-cm spectral flux density in units Jy and (1 + z) −1 is a correction factor accounting for the flux reduction due to the expansion of the Universe.Lastly, we co-add all the spectra together.The stacked spectrum can then be expressed as where n gal is the number of co-added spectra, and fi and wi are the average primary beam transmission and the weight assigned to each source.This equation implements primary beam correction following the procedure detailed in Geréb et al. (2013).Eventually, we integrate the resulting stacked spectrum over MHI, in order to obtain an average MHI estimate.We fix the integration limits to v lim ± 500 km s −1 .Moreover, we perform our stacking experiments assuming as target quantity for the spectra not only MHI, but also fHI, as anticipated in §4.For the latter case, we divide each spectrum -given in units MHI -by the M * of the galaxy.In this way, from the final stacked spectrum we are able compute the average ⟨fHI⟩ = ⟨MHI/M * ⟩.
A customary choice for the weighting scheme is to weight each spectrum for some power of the inverse of its variance.I.e., one can weight the ith spectrum by wi = 1/σ γ i , where σi is the rms of the ith spectrum.The cases γ = 1 (Lah et al. 2007) and γ = 2 (Fabello et al. 2011b) have been widely employed and tested in the literature.Some authors have proposed to also weight each spectrum by distance (see e.g.Delhaize et al. 2013;Hu et al. 2019).Here we adopt the perspective of Hu et al. (2019) of leaving γ as a free parameter (the exponent was applied to distance in the case of Hu et al. (2019)), and study the evolution of the SNR and of MHI as a function of γ.We report the results of this test in Appendix B. It turns out that the choice γ = 1 maximises the SNR in all the studied subsamples.Therefore, we choose γ = 1.Since we are working with a volume-limited sample, this does not induce a selection bias due to the evolution of the M * with redshift.Furthermore, we observe that MHI slightly decreases with increasing γ.This latter effect is due to two different facts occurring simultaneously: • the root mean square (rms) per channel slowly increases towards to the lower frequency part of the covered band.As a result, weights display an anticorrelation with redshift.This can be clearly seen in the left panel of Fig. 15, where we plot the weights (assuming γ = 1) as a function of redshift as blue circles.The anticorrelation can be appreciated by looking at the orange dashed curve, representing the median of the weights in different redshift bins.The existing correlation between weights and redshift indicates that the larger γ the more the weighting scheme downweights galaxies at higher redshift; • MHI is found to undergo a significant evolution with redshift across the probed redshift range.To demonstrate this, we have subdivided the full redshift range into two redshift subsamples -a low-redshift subsample at 0.23 < z < 0.35 and a high-redshift subsamples at 0.35 < z < 0.49.In both cases we find robust detections, the former at ∼ 6.6σ, the latter at ∼ 9.9σ.The resulting average HI masses that we measure from the stacks are MHI ∼ (5.91 ± 0.90) × 10 9 M⊙ and MHI ∼ (11.64 ± 1.18) × 10 9 M⊙ for the low-z and high-z subsamples, respectively.I.e., the difference in MHI is a factor ∼ 2. These findings evidence a strikingly large evolution with redshift of MHI.It is hard to conclusively tell whether this difference is entirely due to actual redshift evolution, or whether some non-obvious selection or cosmic variance effects contribute to enlarge the difference.We will follow-up this aspect in future work.
The combination of these two effects causes a downweighting of the HI-rich galaxies at higher redshift when we apply a weighting scheme.
We notice that this effect probably has an irrelevant impact on low-z stacking experiments, where data typically are found to have a much more stable and weakly-evolving rms per channel as a function of frequency.However, this aspect becomes important in cases where a large bandwidth with and evolving noise level is surveyed, such as the present case.
Despite all the arguments we have laid down above, we notice that (i) the change from γ = 0 (unweighted case) to γ = 1 is relatively tiny, and (ii) the variation occurs coherently in all the subsamples.Therefore, while the dependence of MHI on the weighting scheme may induce a slight variation in the overall normalization, it does not change the relative differences in MHI (within reasonable fluctuations).This allows us to draw conclusions on the differences in MHI between the different subsamples without worrying about the choice of the weighting scheme.
To evaluate the uncertainty associated with our measurements, we rely on the baseline of the spectra as follows.The 1σ noise uncertainty (in units MHI) is evaluated by comput-ing the rms of the off-line noisy channels σrms of the stacked spectrum, i.e. those channels outside the spectral interval integrated to compute MHI.
To further confirm the legitimacy of our detection, we also generate a reference spectrum obtained by stacking noise spectra (one noise spectrum per galaxy) extracted at randomized positions.The positions of the noise spectra are obtained by adding a fixed angular offset to the centre of each galaxy cubelet in a random direction and defined over the same spectral range as the corresponding galaxy cubelet.The angular offset (100 ′′ ) is chosen to guarantee that the reference spectrum is extracted close to the galaxy spectrum, although without overlaps.Also, we double-check that the reference spectrum of each galaxy has no overlaps with other known optical galaxies, reject it and draw a new one if there is any overlap.
We compute the integrated signal-to-noise ratio of the final stacked spectrum as: where ⟨Si⟩ is the stacked spectrum, and N ch is the number of channels over which the integration is performed (e.g., Healy et al. 2019).
To mitigate the impact of RFI on our stacking results, we adopt the following procedure.We first identify frequency bands severely characterized by strong RFI by studying the variation of the rms per channel as a function of frequency.After identifying bad RFI frequency windows, we first exclude from the sample galaxies with central frequency falling within one of these frequency intervals.Eventually, because a spectrum considered as valid based on the previous criterion can still have some portions overlapping to RFI-affected channels, we mask those portions by setting the flux to zero.
Since this is the first time (to the knowledge of the authors) that this local masking procedure is applied to RFI-affected channels, we address its impact on the results by comparing the values of the average MHI obtained from stacking in the different subsamples before and after masking.We report the results of this test in Appendix C, Table 4.It turns out that such a masking do not induce a systematic effect in the probed subamples, but rather a stochastic deviation from the unmasked case.In addition, the magnitude of the deviation is typically tiny, with a maximum (in absolute value) of −9.2% for the δ > 0 subsample.However, as can be seen in Table 4, the SNR always increases after masking.This demonstrates that the off-line RFI masking is advantageous in terms of gain in SNR, and does not introduce systematics in the stacking procedure.We treat the random deviation introduced by the implementation of such a masking by adding a conservative 10% uncertainty in quadrature to the error coming from the measurement.
We address the problem of flux contamination due to source confusion using detailed MeerKAT-like simulated datacubes, built with the same setup as MIGHTEE-HI observations.In particular, we use the Obreschkow & Meyer (2014) flux-limited mock galaxy catalogue, based on the SKA Simulated Skies semi-analytic simulations (S 3 -SAX), and therefore on the physical models described in Obreschkow et al. (2009a,b,c), to inject galaxies with realistic HI masses and clustering into a blank synthetic datacube matching the same angular and spectral size as our observations (see also Elson et al. 2016Elson et al. , 2019)).Then, using the same methodology presented in Elson et al. (2016), we decomposed the spectrum extracted for each target galaxy into contributions from the actual target, and contributions from nearby contaminating galaxies.Following this procedure, we estimate the average level of contamination for the full sample to be ∼ 10%.As we are explicitly investigating environmental trends, which implies considering galaxies lying in regions with different clustering properties, we need to take into account that this fact will be translated into a different confusion contribution, depending on whether a galaxy lives e.g. in a low-density or in a high-density environment.While repeating the same computation performed by Darvish et al. (2015Darvish et al. ( , 2017) ) to define the large scale structure environments on the simulated datacubes goes beyond the scope of the paper, we handle the confusion correction by rescaling the average detected HI mass of each subsample by the ratio between the mean overdensity in the regions where galaxies in the subsample live and the mean overdensity of the full sample.I.e.: where ∆M HI,conf,i is the final confusion contribution to be subtracted to each subsample i, δi is the average overdensity at the position of each galaxy in the ith subsample, ∆M HI,conf,tot is the confusion contribution from the full sample (∆M HI,conf,tot ∼ 10%, obtained from simulations as described above), and δtot is the average overdensity at the position of each galaxy for the full sample.This computation is applied to all the subsamples investigated in this work (full, δ > 0/δ ≤ 0, central/satellites/isolated, field/filaments/knots), and the quantitative results are expressed in percentage and listed in Table 2.

RESULTS
We report on the results we obtain applying the methodology described in the previous sections, and discuss them in the light of previous findings presented in literature.Figs. 5 -8 report our resulting stacked spectra for the full sample, and for subsamples based on galaxy overdensity field, galaxy position inside the host dark matter halos, and cosmic web environment, respectively.In all cases, we display the stacked spectrum as a blue solid line, the stacked reference spectrum and its rms as an orange dashed line and a grey shaded area, respectively, and the two vertical lines marking the integration limits as green dotted lines.We report inside each panel the case each spectrum corresponds to, while we present in Table 2 the numerical findings, i.e. the number of stacked galaxies, the estimated average MHI and associated uncertainty as measured from the data and after correcting for source confusion and RFI-masking uncertainty, the confusion correction that we apply, the SNR, the average and median M * of each subsample, and the average and median redshift of each subsample, the median M * .
Overall, we find robust > 5σ HI detections in all the studied case, except for the central and knot galaxies subsamples, for which we find a non-detection.The resulting stacked spectra, after applying the careful RFI flagging described in §5, appear to be well-behaved, and do not display major anomalous features.2. Results from the stacking runs performed on different galaxy subsamples.The first column lists the investigated case, the second column reports the number of stacked galaxies for each case, the third column the (uncorrected, i.e. as measured from the data) resulting M HI and its associated uncertainties ( * stands for 3σ upper limit in the case of non-detection), the fourth column the SNR, the fifth column the percentage confusion correction that we apply to the mass measurement, the sixth column the corrected (by confusion and RFI-masking uncertainty) M HI measurements and their associated uncertainties, and the seventh column the

Isolated
Figure 7. M HI stacked spectrum obtained from the subsamples of central (left), satellite (centre), and isolated (right) galaxies, respectively.Symbols as in Fig. 5 In addition, we quantify the statistical significance of the deviation of the measured average MHI,X (average fHI,X) of a subsample X from the measured average MHI,Y (average fHI,X) of a subsample Y as: where σX and σY are the uncertainties on MHI (fHI) of subsamples X and Y, respectively.We graphically report the results in Figs. 9 and 10.
We show the results of our stacking experiments in the MHI − M * plane in Fig. 11.We plot the results differentiating between distinct definitions of environment: overdensity field (top), central/satellite/isolated (middle), field/filament/knot

Knots
Figure 8. M HI stacked spectrum obtained from the subsamples galaxies sitting in the field (left), in filaments (centre), or in voids (right).Symbols as in Fig. 5 Full δ ≤ 1 δ > 1 Cent.Sat.Iso.Field Fil.Knots Full Sat.
Iso.Since we are performing stacking, we adopt as estimate for the M * of each subsample its average M * (reported in Table 2).We start by commenting on the results as a function of the definition of environment based on the galaxy overdensity field.Here, high-(Fig.6, right panel) and low-density (Fig. 6, left panel) MHI measurements tell that galaxies sitting in high-density environments are slightly HI-richer than the ones living in low-density regions.Nonetheless, the measurements in the two subsamples are compatible within uncertainties with the MHI estimate obtained from the full sample (<∼ 0.5σ in both cases), and are compatible with one another (at ∼ 0.5σ).The same results qualitatively apply also in terms of fHI, with larger significance (∼ 1.5σ significance

Field
Iso. between the δ > 0 and the full sample, and ∼ 1.2σ between the δ > 0 and the δ ≤ 0 subsamples).Then, we analyze the results related to the definition of environment based on galaxy position inside the host dark matter halo.It turns out that:

Field
• isolated galaxies subsamples feature an average MHI extremely similar to the one measured from the full sample and compatible within statistical uncertainties with it.Nonetheless, here again when looking at fHI we find the isolated galaxies to be ∼ 1.4σ HI-richer than the full sample; • central galaxies yield a non-detection both for the MHI and the fHI spectra.In this case we place a 3σ upper limit on MHI and fHI.The former is found to be a factor ∼ 1.5 HI poorer than the full sample in MHI, corresponding to a ∼ 3.7σ deviation in MHI.Conversely, the upper limit for fHI actually exceeds the HI fraction of the full sample, which implies that we are not able to draw any conclusion in that sense; • satellite galaxies are found to be HI rich, exceeding both the MHI and the fHI of the full sample by a factor ∼ 1.4.This implies a deviation of ∼ 2.2σ in MHI and ∼ 2.5σ in fHI.Moreover, satellite galaxies are HI-richer than the upper limit for central galaxies by a factor ∼ 2.1 in MHI and a factor ∼ 1.3 in fHI, at ∼ 4.9σ and ∼ 2.3σ respectively.
Finally, we examine the MHI measurements obtained by splitting the full sample into subsamples depending on field, filaments, or knots membership.We find this definition of environment to be the one that correlates more with the MHI of galaxies.In this case: • field galaxies are found to be a factor ∼ 1.4 HI-poorer than the full sample in MHI and a factor ∼ 1.3 HI-poorer in fHI, at ∼ 1.5σ and ∼ 1.2σ, respectively; • filament galaxies are found to be a factor ∼ 1.4 HI-richer than the full sample in MHI and a factor ∼ 1.7 HI-richer in fHI, at ∼ 3σ and ∼ 3.7σ respectively; • knots galaxies yield a non-detection.Also in this case, we place a 3σ upper limit on MHI and fHI.Such an upper limit is a factor ∼ 2 HI-poorer than the full sample in MHI and a factor ∼ 1.4 HI-poorer in fHI, at ∼ 5.3σ and ∼ 3.2σ, respectively.Moreover, the difference between knot and filament galaxies (taking the upper limit as reference for knot galaxies) is a factor ∼ 2.8 in MHI and a factor ∼ 2.4 in fHI, at ∼ 8.3σ and ∼ 6σ, respectively As expected, the source confusion correction that we compute through Eq. §9 is larger the denser the environment, with a minimum of 4 − 5% for δ ≤ 0, isolated, and field galaxies, whereas the correction is as large as ∼ 36% in knots.We also notice that we do not actually apply the confusion correction to the non-detections, as it would be meaningless.

DISCUSSION
Overall, we report a tendency of intermediate-density cosmic web environments to host galaxies with larger MHI and satellite galaxies to be more HI-rich than central galaxies, the latter at (nearly) fixed stellar mass (but not at fixed halo mass).However, the MHI correlates more with the cosmic web environments rather than with local galaxy overdensity, suggesting that environment-specific processes are in act in shaping the HI content of galaxies sitting therein.

Central, satellite and isolated galaxies
As anticipated, our findings at z ∼ 0.37 suggest that satellite galaxies are HI-richer than central galaxies and isolated galaxies at fixed stellar mass log 10 (M * /M⊙) ∼ 10.2 (∼ 2.5σ).However, it is not straightforward to interpret these results, since we are here performing a comparison at (nearly) fixed stellar mass, and not at fixed halo mass.This implies that the subsample of satellite galaxies we are investigating here are likely to be, on average, satellite of more massive central galaxies.For instance, following Shuntov et al. (2022), at 0.2 < z < 0.5 central galaxies of stellar mass log 10 (M * /M⊙) ∼ 10.2 belong to haloes of mass log 10 (M h /M⊙) ∼ 12, while satellite galaxies belong to haloes of mass log 10 (M h /M⊙) ∼ 12.5 − 13 with characteristic central galaxy stellar mass log 10 (M * /M⊙) ∼ 10.7 − 11.Such a study was performed without splitting the sample into starforming and passive galaxies, so both centrals and satellites in our sample of star-forming galaxies are likely to belong to haloes of lower masses with respect to the figures quoted above.However, the result remains qualitatively the same.
To put our results into context, we compare them to previous findings presented in the literature.Using xGASS data (Catinella et al. 2018) at z ∼ 0, Janowiecki et al. (2017) find that for log 10 (M * /M⊙) < 10.2, central galaxies in groups feature a HI fraction comparable to the one of isolated galaxies at the same M * as the one probed in this work and even smaller HI fraction at larger M * .The same trend with M * is also mimicked by the SFR.It is important to notice that Janowiecki et al. (2017) analyze the full galaxy population (star-forming + quenched), while here we are focusing only on star-forming galaxies.By taking into account this difference and the fact that at z ∼ 0 star-forming galaxies are known to be HI-richer than passive galaxies, the results found in this work appear to agree with the ones of Janowiecki et al. (2017).
Our results appear to also be in contrast with the combination of the observational results by Guo et al. (2021) and Brown et al. (2017) and of the simulation-based results by Stevens et al. (2019), showing that at the fixed average M * studied in this work satellite galaxies at z ∼ 0 are HI-poorer than central galaxies (see also Cortese et al. 2021, for a review).However, again such studies investigate the full galaxy population, while we restrict our work to star-forming galaxies.Therefore, it is not possible to establish a fair comparison between those references and our results.

Galaxies in knots, filaments and in the field
Related to the HI distribution in the cosmic web, our analysis yields a significantly larger MHI in filaments than in knots and in the field.In this sense, we observe a significant increase in MHI from the field to filaments, i.e. from low-density to moderate/high-density environments, and then an even more significant decrease in MHI from filaments to knots.
While it is not trivial to establish a consistent comparison between our definition of large scale structure environment, inherited from Darvish et al. (2015Darvish et al. ( , 2017)), and the distinct definitions adopted in different works at z ∼ 0, several authors find large galaxy groups and galaxy clusters -broadly speaking corresponding to our knots -to be HI-deficient at z ∼ 0 (e.g.Giovanelli & Haynes 1985;Solanes et al. 2001;Gavazzi et al. 2013;Dénes et al. 2014;Odekon et al. 2016;Zabel et al. 2022).For instance, quantifying the HI deficiency as the logarithmic difference between the expected MHI from scaling relations and the observed one (Haynes & Giovanelli 1984): Odekon et al. ( 2016) study the slope of the HI def −M * relation for blue star-forming galaxies probed by ALFALFA (Haynes et al. 2011(Haynes et al. , 2018)), and find that at fixed M * the slope of such a relation rapidly increases with M200 4 .Therefore, this means that the bigger the galaxy groups, the less HI is likely to be found in galaxies in such groups at fixed M * .Furthermore, focusing on satellite galaxies only, Brown et al. (2017) perform a stacking-based analysis on the ALFALFA sample and report that more massive haloes tend to host satellite galaxies with lower HI-to-M * ratio, at fixed M * .
The decrease in MHI from filaments to knots indicates the presence of some gas removal or consumption mechanism.For instance, ram pressure stripping -well-known to be a major responsible for gas removal and ionization in clusters and in particular for HI stripping at z ∼ 0 (e.g.Wang et al. 2020;Kleiner et al. 2023) -may be removing HI from galaxies and determine the drop in HI amount from filaments to knots.In fact, ram-pressure stripping has been successfully observed to be in act in galaxy clusters up to the redshifts we are investigating (0.3 < z < 0.5, Moretti et al. 2022) and beyond (z ∼ 0.7, Boselli et al. 2019), suggesting that it may have been even more efficient in the past than in the present-day Universe (Moretti et al. 2022).
Despite the broad qualitative agreement with existing results at z ∼ 0, we highlight three facts to be taken into account when performing such a comparison.First, we reiterate that we are not including passive galaxies in our study.Second, knots and clusters are not defined the same way5 .As a results, knots may contain one or more clusters, but will typically encompass a larger volume, including clusters outskirts and regions beyond clusters.Third, the knot galaxies subsample is the most likely to be subject to cosmic variance among the different samples investigated here.These aspects make it difficult to perform a quantitative fair comparison with z ∼ 0 results.
Regarding the comparison between the HI content in filaments and in the field, it is worth mentioning that Kleiner et al. (2017) find no significant difference between galaxies in filaments and the control sample constituted by galaxies far away from the filament spines at z ∼ 0. However, therein filaments are defined in a different way than in this paper, hence it is again not straightfoward to perform an adequate comparison (see e.g.Libeskind et al. 2018, for a review of methods to quantitatively define the cosmic web).On the other hand, low-density enviroments such as cosmic voids are known to be HI-poorer than filaments in cosmological hydrodynamic simulations (e.g.Martizzi et al. 2019), supporting our findings.
Unfortunately, the limited statistics, as well as the lack of a complete spectroscopic coverage, makes it hard to perform a more detailed comparison between our definition of knots and the overdensities used in other works, as well as further investigating whether the bulk of HI sits in a specific region of knots -e.g. in the outskirt or towards the centre -or whether it is spread across the whole radial profile.We leave this investigation for future works relying on the full area (∼ 20 deg 2 ) covered by the MIGHTEE survey.Sinigaglia+22 (z ∼ 0.37) Figure 11.M HI results as obtained from our stacking analysis in different definitions of enviroment.We compare our results to the M HI − M * scaling relations presented in S22 at z ∼ 0.37 and C22 at z ∼ 1.We report the findings related to different definitions of environment in different rows: galaxy overdensity (top), central/satellite/isolated (mid), field/filaments/knots (bottom).We also always overplot the data point corresponding to the full sample, for comparison purposes.

SUMMARY AND CONCLUSIONS
In this work we have presented the first study of the dependence of HI content in galaxies on the large scale structure, at a median redshift z ∼ 0.37.
In particular, we select a M * -complete star-forming galaxy sample (log 10 (M * /M⊙) > 9.6) in the COSMOS field (Scoville et al. 2007) based on a colour-colour selection ((MNUV − Mr > 3(Mr − MJ ) + 1, MNUV − Mr > 3.1), Laigle et al. 2016) and with measured spectroscopic redshift (Khostovan et al., in prep.)We extract individually-undetected HI galaxy spectra from HI datacubes delivered by the MIGHTEE survey, covering the full COSMOS field.We rely on a spectral line stacking approach to perform an average MHI detection out of the extracted spectra for each of the studied subsample.After a careful flagging and a detailed treatment of RFI, our full sample consists of 2875 galaxies.
We investigate the dependence of the HI content in galaxies on the large scale structure.We perform stacking on subsamples defined by restricting the parent full sample according to different definitions of the large-scale environment.In particular, we focus on the local galaxy overdensity field, the position inside the host dark matter halo (central, satellite, or isolated), and the cosmic web environment that galaxies live in (field, filaments, knots).These information are computed for each of the galaxies constituting our sample through a tomographic analysis based on photo-zs, and made available by Darvish et al. (2015Darvish et al. ( , 2017)).We stress that the evaluation of the cosmic web environment as done in Darvish et al. (2015), and hence, in this work, is quantitative and based on the curvature tensor.
Our findings can be summarized as follows: • We find a robust ∼ 11.8σ detection of MHI for the full sample.While such a result is not fully compatible with the S22 scaling relation, the galaxy sample used in this work is not the same as in S22, and the true uncertainty associated to the scaling relation is unknown.Furthermore, the evolution of MHI with redshift, as well as the impact of weighting scheme, makes the stacking result subject to variation depending on the reference frame one chooses.We will investigate impact of these aspects in a forthcoming paper (Bianchetti et al., in prep.)We point out that, because the sample is 90% complete in M * down to log 10 (M * /M⊙) ∼ 9.6, this MHI measurement can be exploited to compute the HI density parameter ΩHI.We leave the investigation of this aspect for future works.
• Isolated galaxies yield MHI and fHI measurements very similar to the one from the full sample.Central galaxies yield a non-detection and the 3σ upper limit we place corresponds to a MHI value which exceed by a factor ∼ 1.5 the one from the full sample (∼ 3.7σ deviation).Satellite galaxies are found to be HI-rich, exceeding both the MHI and the fHI of the full sample by a factor ∼ 1.4, at ∼ 2.2σ and ∼ 2.5σ respectively.Moreover, satellite galaxies are HI-richer than the upper limit for central galaxies by a factor ∼ 2.1 in MHI and by a factor ∼ 1.3 in fHI, at ∼ 4.9σ and ∼ 2.3σ respectively.
• Field galaxies are HI-poorer than the full sample by a factor ∼ 1.4 in MHI and by a factor ∼ 1.3 in fHI, at ∼ 1.5σ and ∼ 1.2σ, respectively.Filament galaxies are HI-richer than the full sample by a factor ∼ 1.4 in MHI and by a factor ∼ 1.7 in fHI, at ∼ 3σ and ∼ 3.7σ, respectively.Knot galaxies yield a non-detection and the upper limit we derive is HI-poorer than the the full sample by a factor ∼ 2 in MHI and by a factor ∼ 1.4 in fHI, at ∼ 5.3σ and ∼ 3.2σ, respectively.Moreover, such an upper limit is HI-poorer than the the filament galaxies sample by a factor ∼ 2.8 in MHI and by a factor ∼ 2.4 in fHI, at ∼ 8.3σ and ∼ 6σ, respectively • The interpretation of our results seem to indicate that there is a general tendency of the studied galaxy population to feature a larger MHI towards intermediate-density cosmic web environments and the outskirts of dark matter haloes (although at fixed stellar mass, and not fixed halo mass).
We point out that the studied volume may still feature some cosmic variance effects, especially regarding the results related to knots.We argue that future MIGHTEE-HI data beyond the Early Science dataset will allow us to significantly enlarge the probed volume at 0.23 < z < 0.49, from the ∼ 1.5 deg 2 of the COSMOS field used in this paper, to ∼ 20 deg 2 of the final data release.
Furthermore, we also notice once again that we are neglecting the contribution to the HI budget from red passive galaxies.We leave this aspect to be investigated in future works (Rodighiero et al., in prep.).
We conclude that this work paves the way to future investigations exploring the connection between the HI properties in galaxies at these redshifts, and the large scale structure environment.

APPENDIX A: KOLMOGOROV-SMIRNOV TESTS
We report here the results of the two-samples Kolmogorov-Smirnov (KS) tests we performed in order to further characterize the distributions of the galaxy properties displayed in Fig. 3.
Figs. 12 and 13 show the p-values for the 1D KS tests comparing M * (Fig. 12), and z (Fig. 13) distributions for different subsamples, obtained by applying distinct cuts depending on the definition of environment.Assuming as confidence threshold α = 0.05, we reject the null hypothesis that two samples come from the same distribution if p > α = 0.05.In the case of the KS test comparing the M * distribution for different subsample, δ > 0, centrals and knots galaxies are the subsamples which tend to yield p < 0.05.In the case of the KS test comparing the z distributions, we can reject the null hypothesis in most of the cases.This means that the majority of the subsamples do not come from the same underlying distribution of z.

APPENDIX B: IMPACT OF THE WEIGHTING SCHEME
In this Section we test the impact of the weighting scheme on the average MHI that we measure from stacking.
As anticipated in §5, we define the weight corresponding to the ith spectrum as wi = 1/σ γ i , where σi is the rms of the ith spectrum.Subsequently, following a procedure similar in spirit to the one of Hu et al. (2019), we study the evolution of the SNR and of MHI as a function of γ.We report the results of the tests in Table 3 and in Fig. 14.We report the evolution of SNR (left panel) and of MHI (right panel) as a function of γ.For the sake of clarity of visualization, we report here the results related to the full sample and the filament and satellite galaxies subsamples, and the same we do also for the numerical results in Table 3.However, we stress that we have tested all the subsamples and the same conclusions hold for all of them.It turns out that the choice γ = 1 maximises the SNR in all the studied subsamples.Therefore, we choose γ = 1.Since we are working with a volume-limited sample, this does not induce a selection bias due to the evolution of the M * with redshift.Furthermore, we observe that MHI slightly decreases with increasing γ.
To investigate the origin of the aforementioned effects, we study possible correlations between the weights (assuming γ = 1) associated with the galaxies belonging to the full sample in the left panel and redshift.Also, we split the full sample into two redshift subsamples -a low-redshift subsample at 0.23 < z < 0.35 and a high-redshift subsample at 0.35 < z < 0.49 -and compare the resulting average MHI to one we compute from the full sample.We plot the weights as a function redshift in the left panel of Fig. 15, showing our data points as blue circles and the median of the weight distributions in different redshift bins as an orange dashed curve.Then, we display MHI as a function of redshift in the right panel of Fig. 15, where the blue circle stands for the full sample, the orange diamond for the low-redshift (0.23 < z < 0.35) subsample, and the green square for the high-redshift (0.35 < z < 0.49) subsample.We report an anticorrelation between weights and redshift and a positive correlation between MHI and redshift.
We discuss the implications of these findings in §5.

APPENDIX C: IMPACT OF RFI MASKING
In this section we address the effect of masking the RFIaffected channels of spectra which have been accepted in the selection procedure.This the case when the spectroscopic redshift of a galaxy -used to define the central frequency channel of the spectrum -does not fall within a frequency region affected by RFI, but some other channel(s) of the spectrum do.
In our methodology, the flux in such channels is set to zero.In what follows, we dub this procedure 'off-line' RFI masking.We perform the following experiment.For each subsample, we run the stacking pipeline both with and without off-line RFI masking.We report the results in Table 4. Therein, the first column lists the different investigated subsamples.The second and third columns report the average MHI with its associated uncertainty and the SNR, respectively, before RFI masking.The third and fourth columns report the average MHI with its associated uncertainty and the SNR, respectively, after RFI masking.The fifth column reports the (signed) percentage deviation ∆MHI = 100 × (M HI,w/ mask /M HI,wo/ mask − 1).The sixth, seventh, and eight columns report respectively the mean, average, and maximum percentage of channels which are masked in our procedure.3. Results of the tests on the impact of the weighting scheme from the stacking runs performed on the full sample (top), and the filament (middle) and satellite (bottom) galaxies subsamples.The first column lists the different tested values of γ, the second column the average M HI and its associated uncertainties measured from the data, the third column the SNR, and the fourth column the average weighted redshift.These results are graphically shown in Fig. 14.
We notice that (i) the off-line RFI masking always increases the SNR with respect to the unmasked case, and (ii) such a procedure does not seem to introduce a systematic effect in the final results, and (iii) the MHI after masking deviates < 10% in al the studied cases, and ≲ 5% in the majority of them.
This demonstrates that the off-line RFI masking is advantageous in terms of gain in SNR, and does not introduce systematics in the stacking procedure.We treat the random deviation introduced by the implementation of such a masking by adding a conservative 10% uncertainty in quadrature to the error coming from the measurement.
This paper has been typeset from a T E X/L A T E X file prepared by the author.
HI galaxy properties at z ∼ 0.37 in the LSS 19 Left: SNR as a function of the exponent γ, for the full sample (blue circles), the filament galaxies subsample (orange diamonds), and the the satellite galaxies subsample (green squares).Right: M HI as a function of γ, with the same colours scheme as the left panels.
The same data are tabulated Table 3.
Figure1.Projected density field, colour-coded from blue to red at increasing density.The plot has been generated by first binning galaxy positions (RA and DEC) of all galaxies in the catalogue with photometric redshift 0.1 < z phot < 0.6 in pixels of size d ∼ 10 ′′ , then applying a two-dimensional Gaussian smoothing with standard deviation σ = 30 ′′ , and eventually applying a bilinear interpolation.The colorbar is reported in units of log 10 (1 + n gal ), where n gal is the galaxy number counts per pixel.One can visually identify overdense regions with spherical or ellipsoidal shapes (knots) and with elongated one-dimensional shapes (filaments), as well as underdense regions (field).

FullFigure 3 .
Figure 3. log 10 (M * ) (left) and z (right) distributions of the full sample (green solid) and different subsamples investigated in this work.Top row: high-density δ > 0 (blue dashed) and low-density δ ≤ 0 (red dashed-dotted) galaxies.Mid row: central (yellow dotted), satellite (blue dashed), and isolated (red dashed-dotted) galaxies.Bottom row: field (yellow dotted), filaments (blue dashed), and knots (red dashed-dotted) galaxies.Poisson uncertainties are shown as shaded areas.In the right column, purple hatched areas indicate frequency intervals strongly affected by RFI, for which we adopt the RFI flagging and masking described in §5.

Figure 5 .
Figure5.M HI stacked spectrum obtained from the full sample.The blue solid line represents the stacked spectrum, the orange dashed line and the grey shaded area represent the stacked reference spectrum and its rms, respectively, and the green dotted vertical lines represent the mass integration limits.
Figure14.Left: SNR as a function of the exponent γ, for the full sample (blue circles), the filament galaxies subsample (orange diamonds), and the the satellite galaxies subsample (green squares).Right: M HI as a function of γ, with the same colours scheme as the left panels.The same data are tabulated Table3.

Figure 15 .
Figure15.Left: Weights (γ = 1) as a of redshift.The (orange dashed) evidences that there is redshift evolution in the weights distribution.Right: M HI as a function of redshift, for the full sample (blue circle), for the subsample at 0.23 < z < 0.35 (orange diamond), and for the 0.35 < z < 0.49 subsample (green square).

Table 1 .
Summary of the details of MIGHTEE-HI data presented in §2 and used in this paper.interval 0.23 < z < 0.49, excluding the spectral bands covering 0.09 < z < 0.23 and z > 0.49 from our analysis because of bad radio frequency interference (RFI) contamination.We use the MIGHTEE-HI data covering only the COSMOS field data because they are the only data currently available in the redshift range of interest (0.23 < z < 0.49) as part of the MIGHTEE Early Science data release.At the investigated redshifts, MIGHTEE-HI data have noise with well-behaved Gaussian properties.The median HI noise rms increases with decreasing frequency, ranging from 85 µJy beam −1 at ν ∼ 1050 MHz to 135 µJy beam −1 at ν ∼ 950 MHz.
Figure 9. Statistical significance of the deviation in the average M HI between different subsamples.The plot is color-coded from red to blue from the lowest to the highest significance values.
Figure10.Statistical significance of the deviation in the average HI fraction f HI between different subsamples.The plot is colorcoded from red to blue from the lowest to the highest significance values.
Full δ ≤ 0 δ > 0 Cent.Sat.Iso.Field Fil.Knots Figure 12. p-values resulting from Kolmogorov-Smirnov comparing M * distributions of different subsamples.The plot is color-coded from red to blue from the lowest to the highest significance values.
Figure 13.p-values resulting from Kolmogorov-Smirnov tests comparing z distributions of different subsamples.The plot is color-coded from red to blue from the lowest to the highest significance values.