Scaling relations of z~0.25-1.5 galaxies in various environments from the morpho-kinematic analysis of the MAGIC sample

The evolution of galaxies is influenced by many physical processes which may vary depending on their environment. We combine Hubble Space Telescope (HST) and Multi-Unit Spectroscopic Explorer (MUSE) data of galaxies at 0.25<z<1.5 to probe the impact of environment on the size-mass relation, the Main Sequence (MS) and the Tully-Fisher relation (TFR). We perform a morpho-kinematic modelling of 593 [Oii] emitters in various environments in the COSMOS area from the MUSE-gAlaxy Groups In Cosmos (MAGIC) survey. The HST F814W images are modelled with a bulge-disk decomposition to estimate their bulge-disk ratio, effective radius and disk inclination. We use the [Oii]{\lambda}{\lambda}3727, 3729 doublet to extract the ionised gas kinematic maps from the MUSE cubes, and we model them for a sample of 146 [Oii] emitters, with bulge and disk components constrained from morphology and a dark matter halo. We find an offset of 0.03 dex on the size-mass relation zero point between the field and the large structure subsamples, with a richness threshold of N=10 to separate between small and large structures, and of 0.06 dex with N=20. Similarly, we find a 0.1 dex difference on the MS with N=10 and 0.15 dex with N=20. These results suggest that galaxies in massive structures are smaller by 14% and have star formation rates reduced by a factor of 1.3-1.5 with respect to field galaxies at z=0.7. Finally, we do not find any impact of the environment on the TFR, except when using N=20 with an offset of 0.04 dex. We discard the effect of quenching for the largest structures that would lead to an offset in the opposite direction. We find that, at z=0.7, if quenching impacts the mass budget of galaxies in structures, these galaxies would have been affected quite recently, for roughly 0.7-1.5 Gyr. This result holds when including the gas mass, but vanishes once we include the asymmetric drift correction.


Introduction
The evolution of galaxies is not a trivial process as numerous physical mechanisms are at play, acting on different physical and time scales, and with different amplitudes. From an observational point of view, our understanding of galaxy evolution has greatly improved throughout roughly the last 25 years. First, from extended multi-band imaging and spectroscopic surveys of Tables F.1 is only available in electronic form at the CDS via anonymous ftp to cdsarc.u-strasbg.fr (130.79.128.5) or via http://cdsweb.ustrasbg.fr/cgi-bin/qcat?J/A+A/ e-mail: wilfried.mercier@irap.omp.eu the local Universe (e.g. SDSS, 2dFGRS). Then, followed the advent of the Huble Space Telescope (HST) associated with 8-10m class telescopes (e.g. VLT, Keck) which allowed to probe and study galaxies in the more distant Universe by combining extremely deep images (e.g. HUDF, COSMOS) with large spectroscopic surveys (e.g. VVDS, zCOSMOS). And finally, to the development and continuous improvement of 3D spectrographs (e.g. SINFONI, KMOS, MUSE), whose data have allowed to study distant galaxies in even more detail. The current paradigm for galaxy evolution is that galaxies must have first formed their Dark Matter (DM) haloes in the early stages of the Universe, and only later started assembling their baryonic mass either by continuous accretion via the Circum Galactic Medium (CGM) of mainly cold gas from filaments located in the cosmic web (Kereš et al. 2005;Ocvirk et al. 2008;Bouché et al. 2013;Zabl et al. 2019), by galactic wind recycling (Davé 2009 Schroetter et al. 2019), and through galaxy mergers (López-Sanjuan et al. 2012;Ventou et al. 2017;Mantha et al. 2018;Duncan et al. 2019;Ventou et al. 2019). In particular, this scenario is favoured in order to explain the large star formation rates (SFR) measured in the past billion years which would have rapidly depleted the galaxies gas content and would have led the galaxies to an early quenching phase unless their gas reservoir was continuously replenished throughout cosmic time. Thus, the mass assembly of the galaxies baryonic components must be tightly linked to the evolution of their DM content. This picture is further supported by the fact that high redshift galaxies appear to be quite different from their local counterparts, indicative that they must have radically evolved in order to populate the Hubble sequence that we see today. Studies comparing the global properties between high and low redshift galaxies have indeed shown that the former tend to be on average smaller (Trujillo et al. 2007;van der Wel et al. 2014b;Mowla et al. 2019) and less massive (Ilbert et al. 2010;Muzzin et al. 2013) than the latter. At the same time, galaxies have shown a rise of their mean SFR throughout cosmic time up to a peak of star formation at a redshift z ∼ 2 before declining to the typical value of roughly 0.01 M yr −1 Mpc −3 measured today (Hopkins & Beacom 2006), and their molecular gas fraction is also found to be larger at high redshift (Tacconi et al. 2018;Freundlich et al. 2019;Walter et al. 2020). In addition to their global properties, galaxies also show clear signs of morphological and kinematic evolution. Several studies have indeed highlighted the fact that the proportion of triaxial systems and thick disks increases as we go to higher redshifts, with low mass galaxies having a larger tendency to be triaxial (van der Wel et al. 2014a;Zhang et al. 2019). This would suggest a trend for star-forming galaxies to flatten as they evolve, going from prolate to oblate shapes. At the same time, intermediate to high redshift galaxies are found to have on average more complex and perturbed gas kinematics with a larger velocity dispersion than their local counterparts (Flores et al. 2006;Yang et al. 2008;Epinat et al. 2010). While understanding the evolution of the different galaxy populations in their intricate details is a particularly tedious task to accomplish, it has become clear that there must exist a finite set of physical mechanisms at play which drives the bulk of the evolution in order to explain the various scaling relations first discovered in the local Universe, but which have been shown to hold at intermediate and high redshift. Among these we can cite the Schmidt-Kennicut relation (e.g. Schmidt 1959;Kennicutt 1998a), mass-size relation (e.g. Shen et al. 2003;Mowla et al. 2019), Main Sequence, hereafter MS, (e.g. Noeske et al. 2007;Whitaker et al. 2014), Tully-Fisher relation, hereafter TFR, (e.g. Tully & Fisher 1977;Contini et al. 2016;Tiley et al. 2019;Abril-Melgarejo et al. 2021) or massmetalicity relation (e.g. Tremonti et al. 2004;Erb et al. 2006).
As to now, one of the key questions is whether the transition seen from high to low redshift between morphologically disturbed, particularly active galaxies to mostly relaxed, low SF massive systems is mainly driven by in-situ physical phenomena such as supernovae-driven galactic super winds and Active Galactic Nucleii (AGN) feedback or, on the contrary, is driven by the environment within which these galaxies lie. This question has led discussions about the impact of galaxy clusters onto the physical properties, morphology, and kinematic of their constituent galaxies. The two main mechanisms which can affect star formation in galaxies located in clusters with respect to those in the lowest density environments (hereafter field) are bursts of star formation and quenching (e.g. see Peng et al. 2010, for an analysis of environment and mass quenching in the local Universe). While the latter is not specifically inherent to galaxy clusters, these massive structures tend to accelerate its effect either through hydrodynamical mechanisms such as ram-pressure stripping (e.g. Gunn & Gott 1972;Boselli et al. 2019) or thermal evaporation (e.g. Cowie & McKee 1977;Cowie & Songaila 1977), or through gravitational mechanisms such as galaxy harassment (e.g. Cortese et al. 2021).
Until quite recently, few studies tried to investigate the well known scaling relations as a function of the galaxies environment, except for the MS. Indeed, the MS is probably one of the most studied scaling relations as a function of environment as it can be used to directly probe the impact of quenching on the evolution of galaxies. Following the recent data release announcement of the GOGREEN and GCLASS surveys (Balogh et al. 2020), aimed at probing the impact of dense environments on intermediate redshift (0.8 < z < 1.5) galaxies properties, Old et al. (2020a,b) explored the environmental dependence of the star forming MS between massive clusters and field galaxies. Using the [O ii] doublet flux as a proxy for the SFR, they found the cluster galaxies SFR to be on average 1.4 times lower than that of their field sample, the difference being more pronounced for low stellar masses. Alternatively, Erfanianfar et al. (2016), using data from the COSMOS, AEGIS, ECDFS, and CDFN fields, could not find any difference in the MS between field galaxies and those in structures in the redshift range 0.5 < z < 1.1, but a similar trend to that of Old et al. (2020b) in the lowest redshift regime (0.15 < z < 0.5). On the other hand, Nantais et al. (2020) could not find any significant difference between field and SpARCS (Muzzin et al. 2009) cluster galaxies at a redshift z ∼ 1.6, which they explained either by the fact that galaxies might have been accreted too recently to show signs of quenching, or that the clusters might be not mature enough yet at this redshift to produce measurable environmental effects on these galaxies.
The environmental impact on the size-mass relation began to be studied only in the last decade by Maltby et al. (2010). Using galaxies from the STAGES survey (Gray et al. 2009), they found no difference in the size-mass relation for massive galaxies (M > 10 10 M ) and a significant offset for intermediate to low mass galaxies, consistent with field spiral galaxies being about 15% larger than those in clusters at z ∼ 0.16. Alternatively, Kuchner et al. (2017) found a similar relation at high mass rather than at low mass for late-type galaxies at z = 0.44 where cluster galaxies were smaller than their field counterparts, and Matharu et al. (2019) also found the same trend when comparing the size-mass relation between field and cluster galaxies at z ∼ 1. However, Kelkar et al. (2015), using data from the ESO Distant Cluster Survey, could not find any difference between field and cluster galaxies in the redshift range 0.4 < z < 0.8.
Finally, regarding the TFR, Pelliccia et al. (2019) searched for differences between two samples of galaxies in groups and clusters from the ORELSE sample (Lubin et al. 2009), using long-slit spectroscopy data to derive the galaxies kinematic. Their conclusion was that they could not find any significant difference between the two TFR and therefore claimed for no impact of the environment. More recently, Abril-Melgarejo et al. (2021) analysed a sample of z ∼ 0.7 galaxies located in galaxy groups from the MAGIC survey (Epinat et al., in prep.) using MUSE and HST data. By comparing their TFR with that from the KMOS3D (Übler et al. 2017), KROSS (Tiley et al. 2019), and ORELSE (Pelliccia et al. 2019) samples, they found a significant offset in the TFR zero point which they attributed to a possible impact of the environment since these samples targetted different populations of galaxies (galaxies in groups and clusters versus galaxies in clusters and in the field). This result led them to two different interpretations of this offset: (i) a quenching of star formation visible in the massive structures which led to a decrease in stellar mass with respect to the field, (ii) a baryon contraction phase for the galaxies in groups and clusters which led to an increase in circular velocity for these galaxies. However, they also indicated that comparing samples from different datasets, with physical quantities derived from different tools, methods, and models, and with different selection functions leads to many uncertainties which might compromise the interpretation. Thus, they argued that, in order to study in a robust way the impact of the environment on the TFR, one would need to apply in a selfconsistent manner the same methodology and models on galaxies located in various environments (field, groups, and clusters), which is the goal of this paper.
Indeed, in this paper, we push beyond the previous analysis performed by Abril-Melgarejo et al. (2021) and investigate differences in three main scaling relations (size-mass, MS, and TFR) when using samples targetting different environments, with HST and MUSE data from the MAGIC (MUSE gAlaxy Groups In Cosmos) survey. Because this survey targets galaxies located in galaxy groups and clusters, as well as foreground and background galaxies in a similar redshift range without prior selection, by applying the same procedure to model the morphology with HST images and the kinematic with MUSE cubes using the [O ii] doublet, we expect to probe in detail and with reduced uncertainties the impact of the environment on these relations. This paper is structured as follows. In Sect. 2, we present the HST and MUSE data. In Sect. 3, we introduce the initial MAGIC sample, the structure identification, and we explain how we derived the galaxies global properties (stellar mass and SFR). In Sect. 4, we present the morphological modelling performed with Galfit on the entire [O ii] emitter sample with reliable redshifts, the aperture correction applied for the stellar mass, and the prescription we applied to derive an average disk thickness as a function of redshift. In Sect. 5, we describe the kinematic modelling using the [O ii] doublet as a kinematic tracer, as well as the mass models used to constrain the kinematic from the stellar distribution. In Sect. 6, we discuss the selection criteria applied to select samples to study the size-mass, MS, and TFR. Finally, we focus in Sect. 7 on the analysis of the three scaling relations as a function of environment. Throughout the paper, we assume a ΛCDM cosmology with H 0 = 70 km s −1 Mpc −1 , Ω M = 0.3 and Ω Λ = 0.7.

MUSE observations and data reduction
Galaxies studied in this paper are part of the MAGIC survey. This survey targeted 14 galaxy groups located in the COSMOS area ) selected from the COSMOS group catalogue of Knobel et al. (2012) in the redshift range 0.5 < z < 0.8, and observed during Guaranteed Time Observations (GTO) as part of an observing program studying the effect of the environment on 8 Gyr of galaxy evolution (PI: T.Contini). Though more details will be given in the MAGIC survey paper (Epinat et al. in prep), we provide in what follows a summary of the data acquisition and reduction.
In total, 17 different MUSE fields were observed over seven periods. For each target, Observing Blocks (OB) of four 900 seconds exposures were combined, including a small dithering pattern, as well as a rotation of the field of 90°between each exposure. The final combined data cubes have total exposure times ranging between 1 and 10 hours. Because kinematic studies are quite sensitive to spatial resolution, we required observations to be carried out under good seeing conditions with a Point Spread Function (PSF) Full Width at Half Maximum (FWHM) lower than 0.8 , except in cases where the Adaptive Optics (AO) system was used.
The MUSE standard pipeline (Weilbacher et al. 2020) was used for the data reduction on each OB individually. Observations with AO used the v2.4 version, whereas the others used v1.6, except for the MUSE observations of COSMOS group CGr30 which used v1.2. Default sky subtraction was applied on each science exposure before aligning and combining them using stars located in the field. To improve sky subtraction, the Zurich Atmosphere Purge software (ZAP; Soto et al. 2016) was then applied onto the final combined data cube. The reduction leads to data and variance cubes with spatial and spectral sampling of 0.2 and 1.25 Å, respectively, in the spectral range 4750 − 9350 Å.
As shall be discussed in more detail in Sect. 5, the kinematic maps, which are extracted from the MUSE data cubes, serve as a basis for the kinematic modelling. Among those kinematic maps are the ionized gas velocity field and velocity dispersion maps which are both highly affected by the limited spectral (Line Spread Function -LSF) as well as spatial (PSF) resolutions of MUSE data through beam smearing. Because extracting reliable kinematic parameters depends on correctly taking into account the impact of the beam smearing in the kinematic models of the galaxies, it is therefore important to know the values of the MUSE PSF and LSF FWHM at the wavelength of observation. The MUSE LSF is modelled using the prescription from Bacon et al. (2017) and Guérou et al. (2017) who derived the wavelength dependence of the MUSE LSF FWHM in the Hubble Ultra Deep Field (HUDF) and Hubble Deep Field South (HDFS) as FWHM LSF = λ 2 × 5.866 × 10 −8 − λ × 9.187 × 10 −4 + 6.040, (1) where FWHM LSF and λ are both in Å.
Because of the atmospheric turbulence, we expect the PSF FWHM to be reduced with increasing wavelength. As was shown in Bacon et al. (2017), the change of the PSF with wavelength can be quite accurately modelled with a declining linear relation. To derive the slope and zero point of this relation in each MUSE field, we extracted as many stars as possible, only keeping those with a reliable MUSE redshift measurement of z ∼ 0. For each star, 100 sub-cubes of spatial dimension 10 × 10 pixels were extracted at regular intervals along the MUSE wavelength range and later collapsed into narrow band images using a fixed redshift slice depth of ∆z = 0.01, scaling with wavelength as ∆λ = ∆z × λ. Each narrow band image was modelled with Galfit (Peng et al. 2002a) using a symmetric (i) 2D Gaussian profile, (ii) Moffat profile with a free β index. We found consistent results between these two models, and therefore decided to use the Gaussian values in the following analysis. In order to remove small scale variations while keeping the global declining trend of interest in the wavelength dependence of the PSF FWHM, we applied a rolling average with a window of 5 data points for all the stars. For each MUSE field, the median wavelength dependence of the PSF FWHM of the stars in the field was fitted with a linear relation. We find a median value of 0.65 for the MUSE PSF FWHM and 2.55 Å for the LSF FWHM (roughly 50 kms −1 ). The values of the slope and zero point retrieved from the best-fit models were later used in the kinematic modelling (see Sect. 5).

HST data
In addition to using MUSE observations to extract the ionized gas kinematic, we also made use of Hubble Space Telescope Advanced Camera for Surveys (HST-ACS) images and photometry to model the morphology of the galaxies (see Sect. 4.1). For each galaxy we extracted stamps of dimension 4 × 4 in the F814W filter from the third public data release of the HST-ACS COSMOS observations (Koekemoer et al. 2007;Massey et al. 2010). These images have the best spatial resolution available ( 0.1 , that is ∼ 600 pc at z ∼ 0.7) for HST data in the COS-MOS field with a spatial sampling of 0.03 /pixel, as is required to extract precise morphological parameters, with an exposure time of 2028 s per HST tile. At the same time, this filter corresponds to the reddest band available (I-band) and therefore to the oldest stellar populations probed by HST data, being less affected by star forming clumps and with smoother stellar distributions.
As for MUSE data, a precise knowledge of the HST PSF in this filter is required to extract reliable morphological parameters. To model the HST PSF FWHM, a circular Moffat profile was fitted onto 27 non saturated stars located in our MUSE fields. The theoretical values of the HST PSF parameters, retrieved from the best-fit Moffat profile, used in the morphological modelling (see Sect. 4.1) correspond to the median values of the 27 best fit models parameters and are FWHM HST = 0.0852 and β = 1.9 respectively (Abril-Melgarejo et al. 2021).  Redshift distribution for the three initial sub-samples defined in Sect. 3.2. The field galaxies (grey area) and galaxies in small structures (dashed blue line) samples have relatively flat distributions. The peak of the distribution for galaxies in large structures (red line) is located at a redshift z ∼ 0.7 and is driven by the largest structures (40 N 100) found in the COSMOS area of the MAGIC sample.

Galaxies samples properties
Observations carried out for the MAGIC survey were targetting already known galaxy groups in the COSMOS field such that all the galaxies in these fields up to z ∼ 1.5 were already detected from previous broad band photometry and listed in the COSMOS2015 catalogue of  up to a 3σ limiting magnitude of 27 in z++ band. The spectroscopic redshift Notes: (1) Sample name, (2) selection criteria applied from Sect. 6.1, (3) number of galaxies, (4) SED-based stellar mass, (5) disk effective radius, (6) bulge-to-disk flux ratio at radius R eff , (7) (2017), a PSF weighted spectrum was extracted for each source and a robust redshift determination was obtained using the strongest absorption and emission lines. In each case, a redshift confidence flag was assigned ranging from CONFID = 1 (tentative redshift) to CONFID = 3 (high confidence). Initially, the catalogue contained 2730 objects, including stars in our Galaxy, intermediate, and high redshift (z ≥ 1.5) galaxies, 51% of which having reliable spectroscopic redshifts (CONFID > 1). As described in Sect. 5, the kinematic of the galaxies is extracted from the [O ii] doublet. Therefore, as a starting point, we decided to restrict the sample of galaxies to [O ii] emitters with reliable redshifts only, that is galaxies in the redshift range 0.25 z 1.5 with CONFID > 1. The main reason for considering [O ii] emitters only is that the bulk of galaxies located in the targeted groups is located at a redshift z ∼ 0.7 where the [O ii] doublet is redshifted into the MUSE wavelength range and happens to be among the brightest emission lines. Thus, using this emission line combines the advantages of having a high signal-to-noise ratio (S/N) extended ionised gas emission, while probing galaxies within a quite large redshift range roughly corresponding to 8 Gyr of galaxy evolution. Using the aforementioned criteria onto the initial MAGIC sample and without applying any further selection, the [O ii] emitters sample contains 1142 galaxies. The main physical properties of this sample, along with other samples defined later in the text are shown in Table 1.

Structures identification and characterisation
A crucial point when one wants to look at the effect of the environment on galaxies properties and evolution is to efficiently characterise the environment where galaxies lie. Galaxies are usually split into three main categories depending on their environment (i) field galaxies which do not belong to any structure, (ii) galaxies in groups which are gravitationally bound to a small number of other galaxies (iii) galaxies in clusters which are gravitationally bound to a large number of galaxies. Because there is no sharp transition between a galaxy group and a galaxy cluster, > 10 ≤ 10 Field Fig. 2. SFR-M diagram for galaxies from the kinematic sample (see Sect. 6.1). Galaxies are separated between the field (black points), small structures (blue triangles), and large structures (red circles). The typical stellar mass and SFR error is shown on the bottom right. The SFR was normalised to a redshift z 0 = 0.7. The SFR and mass distributions are shown as top and right histograms, respectively, with the median values for each sample represented as lines with similar colours. and also because it is not particularly relevant for this discussion to disentangle between these two cases, we will refer to both in the following parts as structures.
The characterisation of the galaxies environment and their potential membership to a structure was performed with a 3D Friends-of-Friends (FoF) algorithm. Structure membership assignment was performed galaxy per galaxy given that the sky projected and the line of sight velocity separations were both below two thresholds set to 450 kpc and 500 km/s, respectively, as was suggested by Knobel et al. (2009). We checked that varying the thresholds around the aforementioned values by small amounts did not change significantly the structure memberships (see MAGIC survey paper, Epinat et al. in prep for more details). As shown in Fig. 1, the bulk of the structures is located in the redshift range 0.6 < z < 0.8 since most of them belong to the COSMOS wall Iovino et al. 2016), a large scale filamentary structure located at a redshift z ≈ 0.72. Among these structures, those with at least 10 members were studied in a previous paper (Abril-Melgarejo et al. 2021). In order to probe in detail the environmental dependence on galaxies properties, we will use throughout the following sections three subsamples, (i) the field galaxies subsample which contains galaxies not assigned to any structure as well as galaxies belonging to structures with up to three members, (ii) the small structures subsample which is made of galaxies belonging to structures having between three and ten members, (iii) the large structures subsample containing galaxies in structures with more than ten members. Within the [O ii] emitters sample, 45% belong to the field, 20% are in small structures, and 35% are in the large structures subsample.

Stellar mass and star formation rates
Since galaxies are located in the COSMOS area, we used the same 32 photometric bands as in Epinat et al. (2018) and Abril-Melgarejo et al. (2021) found in  (COS-MOS2015) catalogue to derive additional physical parameters such as stellar masses and Star Formation Rates (SFR). We used the Spectral Energy Distribution (SED) fitting code FAST (Kriek et al. 2009) with a synthetic library generated from the Stellar Population Synthesis (SPS) models of Conroy & Gunn (2010) using a Chabrier (2003) Initial Mass Function (IMF), an exponentially declining SFR, a Calzetti et al. (2000) extinction law, and fixing the redshift of the galaxy to the spectroscopic redshift derived from the MUSE spectrum. The SED output parameters, including the stellar mass, SFR, and stellar metallicity, as well as their 1σ error, correspond to the values retrieved from the bestfit model of the SED, using the photometric bands values from  catalogue, and integrated within a circular aperture of diameter 3 .
After performing a careful comparison between the stellar masses and SFR values computed with FAST and those given in the COSMOS2015 catalogue (computed using LePhare SED fitting code), we found consistent results for the stellar masses with, on average, a scatter of 0.2 − 0.3 dex. On the other hand, we found larger discrepancies between the SFR values, around 0.7 − 0.8 dex. Given that the origin of this discrepancy is unclear, and that SED-based SFR estimates usually have quite large uncertainties (e.g. Wuyts et al. 2011;Leja et al. 2018), we decided to use emission lines instead to compute the SFR. Ultimately, one would want to use Hα as tracer of star formation, but given the MUSE wavelength range, this would restrict the sample to z 0.4 galaxies. Instead, following Kennicutt (1998b) where SFR has not been normalised yet to account for the redshift evolution of the MS, ,corr is the [O ii] luminosity, with D L the luminosity distance, and F [O ii],corr the extinction corrected [O ii] flux, which must be corrected for intrinsic extinction at the rest-frame Hα wavelength (Kennicutt 1992(Kennicutt , 1998b, computed as  Cardelli et al. (1989) extinction law and R V = 3.1. In order to compute the intrinsic extinction, one needs to know the extinction in a given band or at a given wavelength, for instance in the V band. This value is provided by FAST but, similarly to the SFR, it usually comes with large uncertainties. Given that the extinction plays an important role when deriving the SFR, we decided not to rely on the values from FAST. Instead, we used the prescription from Gilbank et al. (2010Gilbank et al. ( , 2011, which parametrises the extinction for Hα using the galaxies stellar mass as for stellar masses M > 10 9 M , and as a constant value below. When using the [O ii]-based SFR in the analysis (Sect.7), we checked that using the SED-based extinction rather than the prescription from Gilbank et al. (2010) to correct for intrinsic extinction did not change our conclusions. The SFR-stellar mass plane for the kinematic sample (see Sect. 5.1), as well as the stellar mass and SFR distributions are shown in Fig. 2. In this figure and in what follows, we have taken out the zero point evolution of the MS by normalising the individual SFR values to a redshift z 0 = 0.7 using the prescription log 10 SFR z = log 10 SFR − α log 10 1 + z 1 + z 0 , where SFR and SFR z are the unnormalised and normalised SFR, respectively, and α is a scale factor. We used a value of α = 2.8 from Speagle et al. (2014), which is larger than the value of α = 1.74 derived and used in Boogaard et al. (2018) and Abril-Melgarejo et al. (2021). The main reason for normalising the redshift evolution with a larger slope is that the prescription from Boogaard et al. (2018) was derived on the low mass end (log 10 M /M 9) of the MS. However, most of our galaxies have stellar masses larger than this threshold where the redshift evolution of the MS is much steeper (e.g. Whitaker et al. 2014).

Morphological modelling
To recover the galaxies morphological parameters, we performed a multi-component decomposition using the modelling tool Galfit on HST-ACS images observed with the F814W filter. In order to have a fair comparison with previous findings from Abril-Melgarejo et al. (2021), we used the same methodology to model the morphology of galaxies. Therefore, we performed a multi-component decomposition with (i) a spherically symmetric de Vaucouleurs profile 1 aimed at modelling the central parts of the galaxies (hereafter bulge), (ii) a razor-thin exponential disk 2 describing an extended disk (hereafter disk). In most cases, we expect the disk component to dominate the overall flux budget, except within the central parts where the bulge is usually concentrated. In very rare cases where the galaxies do not show any bulge component, Galfit always converged towards a disk component only model. On the opposite, in the case of elliptically shaped galaxies, Galfit usually converges towards a single de Vaucouleurs component. We do not systematically try to model additional features which may appear in very few cases such as clumps, central bars or spiral arms. When clumps do appear, the multi-component decomposition is usually carried out without masking the clumps first. If the clumps seem to bias the morphological parameters of the main galaxy, a second run is done by either masking the clumps or adding other Sérsic profiles at their location. Unless there is no significant improvement in the robustness of the fitting process, the masked model is usually kept. Other cases may be galaxies in pairs or with small sky projected distances, which are modelled with an additional Sérsic profile at the second galaxy location, or out-of-stamps bright stars which can contaminate the light distribution of some galaxies, in which case it is usually modelled with an additional sky gradient.
The aforementioned procedure was applied on the [O ii] emitters sample. Among the 1142 galaxies, a few of them could not be reliably modelled with neither a bulge-disk decomposition, nor with a single disk or single bulge profile. Such galaxies turned out to be (i) low, or very low S/N objects for which the noise is contributing too much to the light distribution to extract reliable morphological parameters, (ii) very small galaxies for which the disk is barely resolved and the bulge not resolved at all. After removing those cases, we get a morphological sample of 890 galaxies (i.e. 77% of the [O ii] sample) which can be reliably modelled using this decomposition.

Morphological properties
The multi-component decomposition provides two scale parameters, the effective radius of the disk R eff,d , and that of the bulge R eff,b , but, in practice, we are more interested in the effective radius of the total distribution of light in the plane of the disk R eff . Even though there is no analytical formula linking R eff , R eff,d and R eff,b , it can be shown from the definition of these three parameters that finding R eff amounts to solving the following equation (see Appendix C for the derivation) where mag d and mag b stand for the disk and bulge apparent total magnitudes as provided by Galfit, respectively, b 1 ≈ 1.6783, b 4 ≈ 7.6692, Γ is the complete gamma function, and γ the lower incomplete gamma function. Equation 6 is solved for each galaxy using a zero search algorithm considering the two following additional arguments (i) it always admits a single solution, (ii) R eff must be located between R eff,d and R eff,b . To get an estimate of the error on the effective radius, we generate for each galaxy 1 000 realisations by perturbing the bulge and disk magnitudes and effective radii using the errors returned by Galfit . Impact of stellar mass correction as a function of the SED-based stellar mass for galaxies from the morphological sample. Overall, the correction lowers the stellar mass, reducing as much as by a factor of 1.5. We see that the smaller the disk radius R eff,d (or equivalently R 22 ), the larger the stellar mass reduction, consistent with the fact that the SED-based stellar mass computed in an aperture of 3 usually overestimates the real value, though in practice this effect can be compensated by sky projection and PSF effects. and assuming Gaussian distributions. For each realisation, we solve Eq. 6 and then compute the error as the 1σ dispersion around the median value. The majority of the galaxies in the morphological sample are disk dominated, 80% of them having a bulge-to-total flux ratio B/T (R eff ) < 0.5, with B/T as defined in Appendix C. As can be seen in Fig. 3, B/T distributions for galaxies from the morphological sample in the field, small, and large structure subsamples are mostly similar, with very few bulge dominated objects. There appears to be an excess of galaxies located in small structures with respect to field galaxies in the range 0.5 B/T 0.6 but, given the small number of galaxies in this bin (9), this excess may not be significant.

Stellar mass correction
As mentioned in Sect. 3.3, the galaxies stellar mass is retrieved from the SED fitting on the photometric bands in a circular aperture of 3 on the plane of the sky. On the other hand, the gas rotation velocity V 22 (see Sect. 7), is usually derived at R 22 = 2.2×R d , where R d = R eff,d /b 1 is the disk scale length defined as the efolding length with respect to the central value. This means that the SED-based stellar mass corresponds to the integrated mass within a cylinder of diameter 3 orthogonal to the plane of the sky, whereas the kinematic is derived from the contribution of the mass located within a sphere of radius R 22 . Therefore, directly comparing the kinematics with the SED-based stellar mass in scaling relations such as the TFR adds additional uncertainties due to projection effects (inclination), different sizes (R eff,d , R eff,b ), and different bulge and disk contributions (B/D). Thus, we decided to apply a correction to the SED-based stellar mass estimate in the following way, assuming a constant mass to light ratio across the galaxy where M and M ,corr are the uncorrected and corrected stellar masses measured in a 3 circular aperture on the plane of the sky and in a sphere of radius R 22 around the galaxy centre, respectively. In Eq. 7, F sph corresponds to the integrated flux in a sphere of radius R 22 , while F circ corresponds to the integrated flux in a 3 circular aperture on the plane of the sky. In order to compute the mass correction, a high resolution 2D model was generated for each galaxy, projected on the sky given the axis ratio returned by Galfit, and taking into account the impact of the MUSE PSF, whereas the flux in a sphere of radius R 22 was integrated without taking into account the impact of the inclination, nor convoluting the surface brightness profile with the PSF. Taking into account the impact of the inclination and the PSF is important for the sky-projected model since the flux is integrated in a fixed aperture. Indeed, a higher inclination will result in integrating the flux to larger distances along the minor axis, whereas higher PSF FWHM values will result in loosing flux since it will be spread further out. On the other hand, because the dynamical mass is derived in Sect. 5 from a forward model of the ionised gas kinematics taking into account the geometry of the galaxy and the impact of the PSF, the flux model integrated within a sphere of radius R 22 must be pristine of projection and instrumental effects (i.e. inclination and PSF).
The impact of the stellar mass correction is shown in Fig. 4. For most galaxies the correction reduces the stellar mass, reaching at its maximum a factor of roughly 1.5. The main reason is that for R 22 < 1.5 , the lower the disk effective radius, the more overestimated the SED-based stellar mass should be, though this argument must be mitigated by the fact that the inclination, the bulge contribution, and the PSF convolution can also play an important role in some cases, explaining why some galaxies have positive stellar mass corrections even with small disk effective radii.

Stellar disk inclination and thickness
In Sect. 4.1, we have assumed that the surface brightness of the stellar disk can be represented by a razor-thin exponential profile, but in practice we expect most disk components to have nonzero thickness. Not taking into account this finite thickness can bias morphological and kinematic measurements, especially in the central parts, and the circular velocity. In turn, this can bias the derived dynamical parameters such as the baryon fraction. This effect becomes even more relevant when considering that the stellar disks thickness is expected to evolve with redshift and mass. By modelling the q = b/a distribution, with a and b the apparent major and minor axes of the disk, respectively, for starforming z ≤ 2.5 galaxies in the CANDELS field and from the SDSS catalogue, van der Wel et al. (2014a) found that galaxy disks become thicker with increasing stellar mass and at larger redshift. Similarly, Zhang et al. (2019), by looking at the q−log a plane, reached a fairly similar conclusion. On top of that, galaxies exhibiting a combination of a blue thin and a red thick stellar disks are expected to have an observed thickness which varies with rest-frame wavelength. This effect can be observed in the catalogue of edge-on SDSS galaxies of Bizyaev et al. (2014), where the disk thickness of z 0.05 galaxies tends to almost systematically increase when measured in the g, r, and i bands, respectively. In order to get an estimate of the disk thickness in our sample of galaxies, we used the methodology described in Heidmann et al. (1972) and Bottinelli et al. (1983). If galaxies located at a given redshift z, with a fixed stellar mass M , and emitting at a fixed rest-frame wavelength λ have a typical nonzero thickness q 0 (λ, z, M ), then the observed axis ratio q for the Article number, page 7 of 32 A&A proofs: manuscript no. paper . Observed axis ratio q as a function of redshift for galaxies from the morphological sample (black points) after removing bulge dominated galaxies and those with small disk sizes. The median values for the six most edge-on galaxies in redshift bins of width ∆z = 0.15 are shown as red squares. The red line represents the thickness prescription which was applied. Independently of mass, galaxies tend to have thinner disks at larger redshifts which may be due to the fact that we probe younger stellar populations at higher redshifts when observing in a single band. . Distribution of disk inclination for galaxies from the morphological sample, after removing bulge dominated galaxies and those with small disk sizes. We show the distribution before correcting for the finite thickness of the disk (black line) and after the correction (red hatched area). The orange dashed line represents the binned theoretical distribution expected for randomly orientated disk galaxies. The correction tends to increase the fraction of edge-on galaxies. While being closer to the theoretical distribution at large inclinations, the corrected inclinations still do not match the distribution of randomly inclined galaxies. majority of the galaxies should reach a minimum value equal to q 0 for edge-on galaxies. In our case, because the morphology is derived at a fixed observed wavelength λ obs ≈ 8140 Å (F814W HST filter), this condition can be written as where λ obs is the observed wavelength. The distribution of the observed axis ratio as a function of redshift is shown in Fig. 5. We see that the minimum observed axis ratio (i.e. highest − log 10 q) seems to decrease with redshift up to z ≈ 0.8 − 0.9 and remains roughly constant afterwards. This trend, which seems inconsistent with the fact that the disk thickness has been previously observed to increase with redshift, can be explained by the fact that higher redshift galaxies are seen at a bluer rest-frame wavelength which probes younger stellar populations, and probably thinner disks. Due to the lack of edge-on galaxies in various mass bins, we do not observe a clear dependence of q on stellar mass, and therefore decided to model only the redshift dependence of q. In order to avoid placing too much weight on outliers which may have thinner disks than the typical thickness expected at a given redshift, we separated galaxies in eight redshift bins and computed the median thickness of the six most edge-on galaxies in each bin. The dependence of the stellar disk thickness with redshift is given by In the case of a razor-thin disk, the inclination i is related to the observed axis-ratio q through the relation cos i = q. However, for a disk with non-zero thickness, the relation between i and q will depend on the exact geometry of the disk. Assuming our disk galaxies can be well approximated by oblate spheroidal systems, we have (Bottinelli et al. 1983) In Fig. 6, we show the distribution of the disk inclination for galaxies from the morphological sample (see Sect. 5.1) assuming razor-thin disks (black line), and after applying the thickness correction using Eqs. 9 and 10 (red hatched area). As expected, correcting for the disk thickness significantly increases the number of edge-on galaxies. Nevertheless, compared to the theoretical distribution (orange line), none of the distributions are consistent with randomly inclined galaxies. We find that we have an excess of galaxies in the range 60° i 80°. The reason why we are still missing some edge-on galaxies (i > 80°) might be that we did not try to model the impact of the dust which is known to affect more severely edge-on galaxies. Nevertheless, the inclination distribution we get is quite similar to the distributions found in other studies where they also lack edge-on galaxies (Padilla et al. 2009;Foster et al. 2017).

Kinematic modelling
Following the analysis in Abril-Melgarejo et al. (2021), we derived the ionised gas kinematics from the [O ii] doublet only. For each galaxy, we extracted a sub-datacube with spatial dimensions 30×30 pixels around their centre and then performed a subresolution spatial smoothing using a 2D Gaussian kernel with a FWHM of 2 pixels in order to increase the S/N per pixel without  We also show the de-projected (but beam-smeared) observed rotation curves extracted along the major axis from the observed velocity field map (black crosses), from the best-fit velocity field flat model (green circles), and from the best-fit velocity field mass model (orange triangles). The largest difference between the flat and mass models is found in the inner parts where the beam smearing is the strongest. The total dynamical mass differs slightly between models, with the flat one being 4% higher than the mass model one.
worsening the datacube spatial resolution. From this smoothed version of the datacube, the [O ii] doublet was fitted spaxel by spaxel by two Gaussian profiles with rest-frame wavelengths of 3727 Å and 3729 Å respectively, assuming identical intrinsic velocity and velocity dispersion. Additionally, given the assumed photo-ionization mechanisms producing the [O ii] doublet (Osterbrock & Ferland 2006), we further constrained the flux ratio between the two lines as 0.
The aforementioned steps were performed with the emission line fitting python code Camel 3 , using a constant value to fit the continuum, and the MUSE variance cubes to weight the fit and estimate the noise. From this procedure, we recovered 2D maps for the following quantities: [O ii] fluxes, S/N, velocity field, and velocity dispersion, as well as their corresponding spaxel per spaxel error estimation from the fit. To avoid fitting any noise or sky residuals which might appear in the flux and kinematic maps, especially in the outer parts of the galaxies, we cleaned the 2D maps in two successive steps (i) through an automatic procedure, only keeping spaxels with S/N ≥ 5 and and FWHM LSF are the [O ii] spatial PSF and spectral LSF FWHM, respectively, (ii) by visually inspecting the automatically cleaned velocity fields and manually removing remaining isolated spaxels or those with large velocity discontinuities with respect to their neighbours.
This led to the removal of 293 galaxies from the morphological sample (around 30%), mainly because they did not show any velocity field in their cleaned maps due to too low S/N per pixel.
A&A proofs: manuscript no. paper the above description, the kinematic model requires the following parameters: (i) centre coordinates, (ii) inclination, (iii) kinematic PA, (iv) systemic redshift z s , (v) disk rotation curve parameters V RT,max , V corr,max , R d (see Appendix D.3), (vi) bulge rotation curve parameters V b,max , a (see Appendix D.6), (vii) DM halo rotation curve parameters V h,max and r s (see Appendix D.8), (viii) PSF size. However, there exists a strong degeneracy between the kinematic centre and z s on one side, and the inclination of the disk and V h,max on the other side, which is even stronger when the data is highly impacted by beam smearing. Therefore, to remove this degeneracy we fixed the kinematic centre and inclination assuming they are identical to their morphological counterparts. As previously stated, we also fix the parameters of the disk and bulge components since we assume they are entirely constrained from the morphology. Thus, the centre coordinates, the inclination, the disk and bulge rotation curve parameters (V RT,max , V corr,max , R d , V b,max and a) and the PSF model are fixed, whereas the kinematic PA, the systemic redshift and the DM halo rotation curve parameters (V h,max and r s ) are free.
The kinematic modelling described above was performed with the new kinematic fitting code MocKinG 5 using the python implementation of MultiNest (Feroz & Hobson 2008;Buchner et al. 2014). MultiNest is a bayesian tool using a multinodal nested sampling algorithm to explore parameter space and extract inferences, as well as posterior distributions and parameter error estimation. To check our results, we ran MocKinG a second time but using this time the Levenberg-Marquardt algorithm, with the python implementation cat_mpfit 6 of MP-FIT (Markwardt 2009). Kinematic parameters were compared between these two methods as well as with earlier results obtained with an IDL code used in several previous studies (Epinat et al. 2009;Epinat et al. 2010Epinat et al. , 2012Vergani et al. 2012;Contini et al. 2016;Abril-Melgarejo et al. 2021). A comparison of circular velocities obtained with MultiNest and MPFIT can be found in Fig. A.1. We find consistent results between the methods, with MultiNest providing more robust results. Thus, we use values from MultiNest in the following parts. In addition, we performed a similar kinematic modelling but using an ad-hoc flat model for the rotation curve as described in Abril-Melgarejo et al. (2021), in order to check the mass modelling and assess its reliability. After checking the morphological, kinematic, and mass models on the remaining galaxies, we decided to remove four additional objects: (i) 106-CGr84, 21-CGr114 and 101-CGr79 because they show signs of mergers in their morphology and kinematics, which may bias the measure of their dynamics, as well as their stellar mass estimate and thus their mass modelling, (ii) 13-CGr87 because it lies on the edge of the MUSE field with only half of its [O ii] flux map visible. Once these objects are removed, we get a kinematic sample of 593 galaxies with morphological and kinematic mass and flat models.
An example of a mass model with its corresponding flat model is shown in Fig. 7 for a disk-like galaxy with a nonzero (but weak) bulge contribution. The mass model rotation curve (orange dashed line) for the galaxy, which appears to be dark matter dominated, is consistent with the simpler flat model (green line), especially at R 22 where the rotation velocity is inferred. Examples of full morpho-kinematic models for four types of galaxies are shown in Fig. 8 with, on the top left corner, a galaxy with a close companion in its HST image and with a velocity field similar to that of a large fraction of galaxies in our sample, on the top right corner an edge-on galaxy, on the bottom left corner a large disk dominated galaxy with visible arms and clumps, and on the bottom right corner a small galaxy with a prominent bulge and a highly disturbed velocity field. These four examples give a decent overview of the types of galaxies, morphologies and kinematics we have to deal with in the MAGIC survey. As an example, we show the S/N limit used for a typical FWHM of 0.65 . Points are colour coded according to their bulge to disk ratio computed at one effective radius. The grey areas give an idea of the galaxies eliminated by the size and S/N selection criteria. We also show the ten galaxies eliminated by selection criterion v (orange crosses) and the three we decided to keep (orange circles).

Selection criteria
Before analysing morpho-kinematics scaling relations as a function of environment, and following the discussion in Abril-Melgarejo et al. (2021) (Sect. 3.6), we must first apply a few selection criteria on the kinematic sample depending on the scaling relation studied. The three relations analysed in this paper are the size-mass relation, MS, and TFR. Among the three, the TFR is the one which requires the most stringent criteria since we must ensure that we have good constraints on both the stellar mass and the kinematic measurements, which translates as having reliable constraints on the disk parameters (size, inclination), on the [O ii] S/N, and on the dynamical modelling. On the other hand, we only require to have disk-dominated MS galaxies to analyse the size-mass and MS relations. Thus, we define a common sample for both the size-mass and MS relations, named the MS sample, by applying the following selection criterion where B/D (R eff ) is the bulge-to-disk flux ratio computed at one effective radius. This criterion ensures that we only have disk-dominated galaxies in the sample. In Abril-Melgarejo et al.
(2021), we used a second selection criterion to remove red sequence galaxies located below the MS since we were only interested in star forming galaxies. For the kinematic sample, applying this criterion would only remove two additional galaxies, since most of the red sequence galaxies also tend to be bulge A&A proofs: manuscript no. paper dominated. Thus, we decided not to apply this criterion in the next parts. When applying the B/D selection, we end up with a MS sample of 447 galaxies.
Concerning the TFR, we must ensure that we have good constraints on the disk size, inclination, and [O ii] S/N, as well as on the dynamical modelling, since they can all have significant impact on the kinematics and the derived dynamical masses. To ensure the TFR is not impacted by poor constraints on any of these parameters, we apply the following additional criteria on top of the B/D selection where R eff,d is the disk effective radius and FWHM(z) the MUSE PSF FWHM computed at the [O ii] doublet wavelength at the redshift of the galaxy (see Sect. 2.1), both in arcsec. In criterion (iv), i is the inclination after correcting for the finite thickness of the stellar disk, and in (v), f = M ,corr /(M ,corr + M DM ) is the stellar fraction, with M ,corr and M DM the stellar and dark matter halo mass, respectively, both computed at R 22 . The uncertainty on the stellar fraction ∆ f is computed by propagating measurement and fit errors on both the stellar mass and the circular velocity. In (iii), the total S/N is computed as where F [O ii] (x, y) and S/N(x, y) correspond to the [O ii] flux and S/N cleaned maps, respectively (see Abril-Melgarejo et al. 2021). Criterion (ii) is used to remove unresolved galaxies, that is for which the stellar disk is smaller than the PSF, and criterion (iii) takes into account the dependence of the S/N on the effective radius, and is derived by assuming a constant surface brightness map, as well as a constant S/N map with a S/N per pixel of at least eight across one observed effective radius (R 2 obs = R 2 eff + (FWHM(z)/2) 2 ). As a consistency check, we also looked at how using a different threshold (S/N) tot ≥ 30 would impact the selection. This threshold adds 40 new galaxies, but the majority are either small with respect to their MUSE PSF FWHM or do not show clear velocity gradients. Thus, we decided to use the former criterion in the next parts. We show in Fig. 9, the galaxies distribution and selection in terms of S/N, R eff,d /FWHM, and B/D for galaxies from the kinematic sample. Criterion (iv) removes face-on and edge-on galaxies because, for the former, uncertainties are too large to reliably constrain the rotation of the ionised gas and, for the latter, the mass models used in the kinematic modelling are much more loosely constrained.
Finally, criterion (v) identifies galaxies whose dynamical modelling failed, that is for which we overestimated the contribution of baryons to the total rotation curve. This corresponds to 13 galaxies in the kinematic sample. Among them, we decided to remove ten galaxies, namely 85-CGr35, 28-CGr26, 257-CGr84, 113-CGr23, 83-CGr23, 38-CGr172, 130-CGr35, 110-CGr30, 105-CGr114 and 100-CGr172. These objects are shown as orange crosses in Fig. 9. Most of them tend to be quite small or with low S/N values even though they pass criteria (i) and (ii), but also have velocity fields with a quite low amplitude (∼ 30−40 km s −1 ). This means that any uncertainty on their morphological modelling and mass-to-light ratio will have a stronger impact on their dynamical modelling. In addition, galaxies 85-CGr35 and 28-CGr26 have disturbed morphologies and/or kinematics which may be due to past merger events or to a more complex morphology than the bulge-disk decomposition performed in Sect. 4.1. On the contrary, after carefully investigating their morphology and kinematics, we decided to keep galaxies 378-CGr32, 20-CGr84 and 19-CGr84 since they seemed to be intrinsically "baryon dominated". After applying criteria (i) to (v), we end up with a TFR sample of 146 galaxies.
In Sect. 7, we may apply two additional selection criteria when it is necessary to have comparable parameter distributions between different environments: (vi) log 10 M [M ] ≤ 10, (vii) 0.5 < z < 0.9. Criterion (vi) is used to have comparable samples in terms of stellar mass (see stellar mass distributions in Fig. B.4), whereas (vii) only keeps galaxies in a 1 Gyr interval around a redshift z ≈ 0.7 where most of the galaxies in the large structures are located. Thus, this criterion allows us to check that our results may not be impacted by a potential redshift evolution.

Summary of the different samples and subsamples
To clarify the difference between the various samples used in this paper, we provide below a summary of their characteristics. We also show in Table 1 the distribution of their main physical parameters represented by their median value, 16th and 84th percentiles.
( sample with reliable bulge-disk decomposition (3) Kinematic sample: 593 galaxies from the morphological sample with reliable kinematics (4) MS sample: 447 disk-dominated galaxies from the kinematic sample selected in B/D only. This sample is used to study the size-mass and MS relations. (5) TFR sample: 146 disk-dominated galaxies from the MS sample with selection criteria from (i) to (v) applied to only keep galaxies with well constrained kinematics. This sample is used to study the TFR.
We show in Table 2 the median properties for each environment-based subsample of galaxies from the MS sample later used in the analysis. Among these, we show the field, small, and large structure ones defined in Sect. 3.2. Alternatively, when analysing the TFR in Sect. 7.4, we will also split the entire sample into two subsamples only: a field/small structures subsample on the one hand, and a large structure subsample on the other hand. This separation is performed because using the previously defined subsamples would lead to too few galaxies in the small structures to reliably constrain their TFR. In the following and in Table 2, we will refer to these subsamples as Small-N and Large-N, where N corresponds to the richness threshold used to classify galaxies in either the field/small structure or large structure subsamples. We note that the terms small and large used to name the subsamples never refer to neither the size, nor the mass of the structures, but only to the number of galaxy members.
The main properties shown in Table 2 are the total number and the proportion of galaxies in each subsample, the stellar, gas, and dynamical masses computed within R 22 = 2.2R d , with R d the disk scale length, the extinction corrected [O ii]-based SFR, and the median disk effective radius R eff,d . All the subsamples have mostly similar gas mass and SFR distributions. However, the subsamples targetting the largest structures tend to have on average larger disk sizes and stellar masses. Their dynamical masses are slightly larger as well, though the difference between small and large structures at a fixed threshold is roughly 0.3-0.4 dex, similar to the difference seen in stellar masses, indicative that these massive structures do not host, on average, more massive DM haloes. Interestingly, when using the largest threshold values N = 15, 20, the large structure subsamples have larger stellar masses (∆ log 10 M ≈ 0.5 dex), but similar dynamical masses with respect to the small structure subsamples. One of the key difference visible in Fig. 2 is the stellar mass distribution. The large structure subsample is more extended than the field and the small structure subsamples towards larger stellar masses, so that almost all the galaxies beyond M > 10 10 M are located in the large structures. These massive galaxies also tend to have the largest SFR values, though their impact on the SFR distribution is not as clearly visible as in the stellar mass distribution.
The MAGIC catalogue containing the main morphokinematics and physical properties for galaxies from the MS sample is available at the CDS. We provide in Table F.1 a description of the columns appearing in the catalogue. Appendix G contains the morpho-kinematics maps as shown in Fig. 8 for all galaxies in the TFR sample.

Analysis
We focus the analysis on the size-mass relation, MS, and TFR. We consider the MS and TFR samples, and separate galaxies in three different subsamples targetting different environments. For the size-mass relation, we use the corrected stellar mass M ,corr which better traces the disk and bulge masses within a sphere of radius R 22 (see Sect. 4.3), and the disk scale length R d = R eff,d /b 1 for the size of our galaxies, where R eff,d is the disk effective radius and b 1 ≈ 1.6783. We also use M ,corr for the TFR, as well as the total circular velocity V 22 derived at R 22 from the bestfit mass and flat models for the velocity. This R 22 value corresponds to where the peak of rotation for the disk component is reached and is typically used in similar studies (Pelliccia et al. 2019;Abril-Melgarejo et al. 2021). Lastly, for the MS, we use the SED-based stellar mass M derived in an aperture of 3 and the extinction corrected and normalised [O ii] SFR as described in Sect. 3.3. Each scaling relation is fitted with the form log 10 y = β + α(log 10 x − p), where y is the dependent variable, x is the independent variable, and p is a pivot point equal to the median value of log 10 x when using the full samples (MS or TFR). For each relation, we decided to always use stellar mass as the independent variable, so that the pivot point is p = 9.2. As pointed out in Williams et al. (2010); Pelliccia et al. (2017), this is justified for the TFR as fitting the opposite relation yields a slope biased towards lower values, while for the size-mass and MS relations we find more robust fits and smaller dispersion. In order to have fits not biased by points with underestimated errors in x and y, we quadratically added an uncertainty on the error of both independent and dependent variables in each scaling relation. Based on Abril-Melgarejo et al. (2021), we decided to quadratically add an uncertainty of 0.2 dex on the stellar mass and the SFR, and of 20 km s −1 on the velocity, consistent with typical uncertainties and systematics found in the literature. For the size estimate, we added a slightly lower uncertainty of 0.065 dex, which corresponds to a relative error of roughly 15%, slightly below the more or less 30% scatter Kuchner et al. (2017) found when comparing size measurements between Subaru and HST data.
We used two different tools to perform the fits. The first one is LtsFit (Cappellari et al. 2013), a python implementation of the Least Trimmed Square regression technique from  Rousseeuw & Van Driessen (2006), and the second one is MP-FITEXY (Williams et al. 2010) IDL wrapper of MPFIT. Both methods take into account uncertainties on x and y, as well as the intrinsic scatter of each relation, but LtsFit implements a robust method to identify and remove outliers from the fit. However, it currently does not have an option to fix the slope. Therefore, whenever we needed to fix the slope, we used MPFITEXY, removing beforehand outliers found by LtsFit.

Impact of selection
We start by looking at how the aforementioned scaling relations are impacted by the different selection criteria used to select the MS and TFR samples. To do so, we fitted each scaling relation using the MS sample with LtsFit, letting the slope free, and we looked at the impact of the size (ii) and/or S/N (iii) criteria on the best-fit results. Additionally, since we also apply the inclination (iv) and the mass modelling uncertainty (v) selections on the TFR, we also consider their impact on the slope and zero point of this relation. The results for each scaling relation are shown in Table 3. We also show in Fig. 10 the population of galaxies removed by each selection criterion, as well as the galaxies removed when applying a redshift cut 0.5 < z < 0.9 (red upper triangles), and the remaining galaxies (black points). We find that the size-mass relation is mainly impacted by the size selection for both the slope and zero point, while the S/N criterion has a weaker effect. When removing small galaxies, the slope is biased towards lower values, and this effect is more important for field galaxies than for galaxies in other subsamples. Similarly, the MS is mainly affected by the size selection while the S/N selection has almost no impact. This result may seem surprising given that, as can be seen in Fig. 10, size-removed (blue lower triangles), and S/N-removed (oranges squares) galaxies tend to lie along the MS, but on opposite parts. However, the size selection has a stronger impact since it mainly removes low mass galaxies, biasing the slope to larger values driven by more massive galaxies. Finally, similarly to the size-mass and MS relations, the TFR is also mainly impacted by the size selection. Removing small . Black circles represent galaxies which remain when all the selection criteria are applied. Given that some selections remove similar galaxies, we show those removed by the S/N (orange square), size (blue lower triangles), and redshift criteria (red upper triangles), in this order. Additionally, we also show in the TFR galaxies removed by the inclination selection (green diamonds) before applying the redshift selection.
galaxies changes the slope to lower values, driven by more massive galaxies. However, when applying the size and S/N selections, both the slope and zero point values become close to the original ones. Because of the mass models used, the TFR is quite tight and those criteria tend to remove almost symmetrically galaxies with low and high circular velocity as can be seen in Fig. 10, so that the remaining galaxies fall along the original TFR without any bias. Important selection criteria for the TFR are the inclination and mass modelling uncertainty (iv and v). Among the two, criterion (v) has the weakest impact since it only removes a handful of galaxies, whereas the inclination selection (iv) tends to remove a significant fraction of galaxies with larger circular velocities than the bulk of galaxies with stellar masses beyond 10 9 M . These galaxies probably have overestimated circular velocities, so that including them in the fit of the TFR would lead to a slope biased towards larger values. Because the size and S/N selection criteria were defined to select galaxies with reliable morphology and kinematics for the mass modelling, and because they can bias the slope and zero point of the size-mass and MS relations, we decided not to apply them to select the MS sample, as described in Sect. 6.1. However, these criteria, in combination with the inclination (iv) and mass modelling uncertainty (v) selections, are important to have an unbiased fit of the TFR. Thus, we decided to apply selection criteria from (i) to (v) to select the TFR sample in Sect. 6.1.

Impact of the environment on the size-mass relation
We fit the subsamples targetting different environments fixing the best-fit slope to the value from LtsFit when considering the entire MS sample with the same selection criteria. We further apply two additional selection criteria: a mass cut M < 10 10 M  Fig. 11. Size-mass relation for galaxies from the MS sample with additional mass and redshift cuts applied (vi and vii). Symbols and colours are similar to Fig. 2, and orange stars represent galaxies identified as outliers from the fit done with LtsFit. As an indication, we also show as semi-transparent symbols galaxies removed by the mass and redshift cuts. Best-fit lines are shown when using a richness threshold N = 10 (full lines) and N = 20 (dashed lines). The black dashed line is not visible since field galaxies have the same best-fit line for N = 10 and N = 20. We do not show galaxies in the small structure subsample since there remain too few galaxies after applying selection criteria (vi) and (vii). We also provide on the top left the slope and best-fit zero point for each subsample (see Eq. 12 with y = R d and x = M ). On the bottom right is shown the typical uncertainty on stellar mass and disk size as a grey errorbar. After controlling for differences in mass and redshift, we find a 1σ significant difference of 0.03 dex between subsamples with N = 10, and a 2σ significant difference of 0.06 dex with N = 20. and a redshift cut 0.5 < z < 0.9, in order to reduce the impact of different mass and redshift distributions between subsamples on the best-fit zero points. We show in Table 4 the best-fit zero points as well as the slopes used for each fit, and in Fig. 11 the size-mass relation and its best-fit line when applying the mass (vi), and redshift cuts (vii). We also provide in Fig. B.1 the sizemass relation and its best-fit line when only applying the mass cut, and when applying neither mass nor redshift cuts.s We find a small offset in the zero point between subsamples. When applying both mass and redshift cuts, the difference amounts to 0.03 dex, which is at most 1σ significant 7 . Similarly, when applying only the mass cut, we get a 1σ significant difference between the field subsample and the small and large structure subsamples. However, if we apply neither cuts, we get a slightly larger offset of 0.04 dex between the field and the large structure one, and almost similar zero points between the field and the small structure one. In Fig. 11 and in Table 4, we used the disk size to fit the size-mass relation, whereas other studies (e.g. Maltby et al. 2010) usually use a global radius. To check whether the choice of radius might have an impact on our results we fitted the size-mass relation, but using the global effective radius derived in Sect. 4.2. Even when using the global radius, we get the same trend as before, with an offset of 0.02 dex (1σ significant). If we use instead a more stringent richness threshold of N = 20 to separate galaxies between small and large structures, we do find a larger offset of 0.06 dex (2σ significant) between the field and the large structure subsamples when using the disk 7 The term σ significant will always refer to the uncertainty on the zero point of the best-fit line. radius as a size proxy, and a similar offset of 0.02 dex when using the global effective radius. Table 4. Best-fit values for the size-mass and MS relations fitted on the MS sample. Optionally, we apply a mass cut M ≤ 10 10 M (vi) and a redshift cut 0.5 ≤ z ≤ 0.9 (vii). For each fit, the slope is fixed to the one from LtsFit on the entire MS sample using the same selection criteria. We do not show the small structures subsample when applying the redshift cut since there remain too few galaxies to reliably constrain its zero point. Bold values correspond to those shown in Fig. 11  Notes: (1) Subsample name, (2) Scaling relation fitted, (3) Selection criteria applied, (4) Number of galaxies in each subsample with outliers shown in parentheses, (5) Proportion of galaxies in each subsample (after removing outliers), (6) Fixed slope, (7) Best-fit zero point. Errors on fit parameters correspond to 1σ uncertainties.
Overall, if significant, the difference between the field and the largest structures when using N = 10 is quite small. We note that this result is different from what was found in previous studies such as Maltby et al. (2010) or Matharu et al. (2019). Indeed, such studies always found a weak but significant dependence of the size-mass relation with environment. For instance, Maltby et al. (2010) found spiral galaxies in the field to be about 15% larger than their cluster counterparts but, in our case, it would only amount to a size difference of roughly 7%. Instead, using the offset value with N = 20, we get a size difference of roughly 14%, consistent with previous findings from Maltby et al. (2010) that galaxies in the most massive structures are more compact than those in the field. Given the models used in the morphological analysis and because the bulge-to-disk ratio is fairly similar between subsamples, the zero point of the size-mass relation directly translates in terms of the galaxies central surface mass density of the disk component (i.e. extrapolated from the Sérsic profile at R = 0). Assuming the flux of the disk component dominates at R 22 , using a slope α = 0.34 and a zero point β sm , we get the following scaling relation for the disk component central surface mass density Σ M,d (0) as a function of stellar mass: where β sm = 0.26 ± 0.03 for the field subsample and β sm = 0.20 ± 0.03 for the large structure subsample when using a richness threshold of N = 20. A change in the zero point of the size mass relation does not impact the slope of Eq. 13 but only its zero point. Thus, the 0.06 dex offset measured between the field and the most massive structures results in a negative offset of −1.2 dex in Eq. 13. We note that this interpretation remains true as long as we can neglect the flux of the bulge at R 22 . However, when we cannot neglect it any more, then Eq. 13 would have an additional non-linear term which would be a function of the bulge central surface mass density and effective radius. In this case, the interpretation would be more complex as galaxies could have different bulge or disk physical properties as a function of environment but still align on the same size-mass relation. However, as is visible in Fig. C.1, the bulge contribution at R 22 is on average and independently of environment around 10% of the total flux, which amounts to a scatter in the size-mass relation of about 0.1 dex, which is sufficiently small to neglect at first order the bulge contribution in this relation.  Fig. 2, and orange stars represent galaxies identified as outliers from the fit done with LtsFit. As an indication, we also show as semi-transparent symbols galaxies removed by the mass and redshift cuts. Best-fit lines are shown when using a richness threshold N = 10 (full lines) and N = 20 (dashed lines). We do not show galaxies in the small structure subsample since there remain too few galaxies after applying selection criteria (vi) and (vii). The SFR is normalised to a redshift z 0 = 0.7 (see Sect. 3.3). We also provide on the top left the slope and best-fit zero point for each subsample (see Eq. 12 with y = SFR and x = M ). On the bottom right, the typical uncertainty on stellar mass and SFR is shown as a grey errorbar. Even after controlling for differences in mass and redshift, we find a 2σ significant difference of 0.10 dex between subsamples with N = 10, and a 3σ significant difference of 0.15 dex with N = 20.
To study the MS, we use the SED-based stellar mass and the [O ii] SFR corrected for extinction and normalised to a redshift z 0 = 0.7 as described in Sect. 3.3. For this relation, applying both a mass and a redshift cut is important. Indeed, as can be seen in Fig. A.3, the MS can be quite sensitive to redshift since there is still a small dichotomy between low and high redshift galaxies even after normalisation. The main reason for this effect is that the MAGIC survey is designed to blindly detect sources in a cone. The blind detection makes the survey flux-limited which means we are missing faint, low SFR galaxies in the highest redshift bin. Besides, we expect to see an excess of massive galaxies in the most massive structures with respect to the field which, in our sample, are all located at a redshift z ≈ 0.7. Thus, the survey design tends to create a dichotomy in mass, which is visible in SFR as well since we are focussing on star forming galaxies.
Nevertheless, as can be seen in Table 4, the redshift cut has a much smaller effect than the mass cut, especially on the slope value from the best-fit line.
We show in Fig. 12 the MS with both cuts applied for the field and large structure subsamples, as well as their best-fit lines and zero point values. We also provide in Fig. B.2 the MS and its best-fit line when only applying the mass cut, and when applying neither mass nor redshift cuts. Independently of whether we apply a mass and/or redshift cut or not, we find a more than 2σ significant difference in the zero point (∼ 0.1 dex) between the field and large structure subsamples. However, there is almost no difference in the zero point between the field and the small structure subsamples. Independently of the cut applied, the field galaxies always have a larger zero point than the galaxies in the large structures. If we interpret this difference in terms of a SFR offset between the field and the largest structures, this would lead to an average SFR for the galaxies in the large structures which is about 1.3 times lower than that in the field. This factor is quite close to the recent value found by Old et al. (2020a,b) using the GOGREEN and GCLASS surveys at redshift z ∼ 1. On the other hand, the reason why other studies such as Nantais et al. (2020) do not find any impact of the environment on the MS is still unclear. The effect of the redshift evolution of the MS might play a role, since Nantais et al. (2020) probe clusters at z ∼ 1.6 which is beyond the 0.5 < z < 0.9 redshift range we restricted our fit to. Similarly, the impact of the environment on the MS may be segregated between low and high mass galaxies. As was reported in Old et al. (2020a,b), the MS seems to be more impacted in the lowest mass regime. This explanation would be compatible with our result where we mainly probe low to intermediate mass galaxies since we remove massive galaxies not to bias the fit.
Similarly to Sect. 7.2, we performed the same fits but using a more stringent richness threshold of N = 20 to separate between structures. When using this threshold combined with both mass and redshift cuts, we find a roughly 3σ significant difference of 0.15 dex (β MS = −0.22 ± 0.04 for field galaxies, β MS = −0.37 ± 0.05 for galaxies in the largest structures), consistent with our previous finding that galaxies in the largest structures have reduced SFR with respect to the field. With this offset, we get an average SFR in the most massive structures which is about 1.5 times lower than that in the field, still quite close to the value from Old et al. (2020a,b)

Impact of the environment on the TFR
We look at the TFR as a function of the environment using the TFR sample. Since there remain too few galaxies in the small structure subsample once all the selection criteria (i to v) are applied, we decided to focus this analysis on two subsamples only. We fit the TFR using different richness thresholds (N = 5, 10, 15 and 20) to separate galaxies into a field/small structure and a large structure subsamples. The best-fit zero points and the slopes values are shown in Table 5 and in Fig. 13. As a comparison, we also show on the bottom panel of Fig 13 the TFR obtained using a simpler flat model for the rotation curve as defined in Abril-Melgarejo et al. (2021). This model allows us to measure the galaxies circular velocity without any prior on the baryon distribution and is therefore not affected by our mass modelling.
We find a similar trend between the TFR from the mass models and that from the flat model. Overall, the tightness of the relation using either model makes the zero point values well constrained, with typical uncertainties around 0.03 dex. When we do W. Mercier et al.: Scaling relations of z ∼ 0.25 − 1.5 galaxies in various environments . Stellar mass TFR at R 22 for galaxies from the TFR sample with mass and redshift cuts applied (vi and vii). The top panel shows the TFR using the velocity computed from the mass models, and the bottom one shows the TFR using the velocity from a flat model. Galaxies are split between field+small structure (black points) and large structure (red circles) subsamples using a richness threshold of N = 10. Orange stars represent galaxies identified as outliers from the fit done with LtsFit.
As an indication, we also show as semi-transparent symbols galaxies removed by the mass and redshift cuts. Best-fit linear relations for both subsamples are shown as full lines. We provide in the bottom part of each panel the slope and best-fit zero points (see Eq. 12 with y = V 22 and x = M ,corr ). The typical uncertainty on stellar mass and velocity is shown as a grey errorbar. After controlling for differences in mass and redshift, we do not find any impact of the environment on the zero point of both TFR. not apply any mass or redshift cut, the large structure subsample tends to systematically have a lower zero point between 0.02 dex and 0.04 dex with respect to the field subsample depending on the richness threshold used 8 . This is shown in Table 5, as well as in Fig B.3. However, when adding a mass and/or a redshift cut, this offset tends to disappear independently of the model and richness threshold used, as is shown in Fig. 13. When using N = 20, we nevertheless get a small 1σ significant offset of roughly 0.04 dex in both TFR. This result suggests that the larger offset values found when applying no cut are certainly the consequence of having different stellar mass distributions between the two subsamples, or might be due to a small impact of the redshift evolution of the TFR. Table 5. Best-fit values for the TFR fitted on the TFR sample. Optionally, we also apply a mass cut M ≤ 10 10 M (vi) and a redshift cut 0.5 ≤ z ≤ 0.9 (vii). For each fit, the slope is fixed to the one from LtsFit on the entire kinematic sample using the same selection criteria. Bold values correspond to those shown in Fig. 13 Notes: (1) Subsample name (2) Additional selection criteria applied, (3) Number of galaxies in each subsample with outliers in parentheses, (4) Proportion of galaxies in each subsample (after removing outliers), (5) Fixed slope for the TFR using the velocity computed from the mass models, (6) Best-fit zero point (mass models), (7) Fixed slope using the velocity computed from a flat model, (8) Best-fit zero point (flat model). Errors on fit parameters correspond to 1σ uncertainties.
Given the disk, bulge and DM halo mass models used to derive the circular velocity (see Sect. 5 and D), and assuming a constant B/D value of 3% which is the median value found in the kinematic sample independently of environment, we can write the TFR as a function of the stellar mass M ,corr within R 22 , the stellar fraction f (R 22 ) = M ,corr /[M ,corr + M DM (R 22 )], with M DM the DM halo mass, both computed at R 22 , and R d as log 10 M ,corr M ≈ 2 log 10 V 22 km s −1 + log 10 R d kpc In Eq. 14, we see the size-mass relation. Thus, rewriting Eq. 14 to make the central surface mass density of the disk component appear, and then inserting Eq. 13, we get log 10 M ,corr M ≈ 3.03 log 10 V 22 km s −1 + 1.52 log 10 where β sm is the size-mass relation zero point which was found to vary with environment in Sect. 7.2. In Eq. 15, we see that only two terms can contribute to an offset on the TFR: (i) different zero points on the size-mass relation as a function of environment, (ii) an offset on the stellar fraction measured within R 22 between the field and the large structure subsamples.
If we interpret any offset on the TFR zero point as being an offset on stellar mass at fixed circular velocity, given Eq. 15 we have ∆ log 10 M ,corr [M ] = 1.52 ∆ log 10 f 1 + 0.15 f + ∆β sm , where ∆β sm is the offset on the zero point of the size-mass relation which is due to the contraction of baryons observed in the most massive structures. With a threshold N = 20 we have ∆β sm = 0.06 dex, and an offset on the TFR, that is in circular velocity at fixed stellar mass, of 0.04 dex and 0.05 dex for the mass and flat models, respectively. The corresponding offset in stellar mass at fixed circular velocity is given by −∆β TFR /α TFR = 0.11 dex for both models. For a typical galaxy in the kinematic sample with a stellar fraction of 20% this would give a difference between a galaxy in the field and one in the largest structures of roughly 4%. This result is quite close to the difference in stellar fraction (circles) seen in Fig 14 where we have plotted its evolution computed from the mass models in bins of stellar mass between galaxies in the field/small structures (black) and those in large structures (red). We see that the stellar fraction increases as we go towards more massive galaxies, both in the field and in large structures. However, the difference remains small compared to the uncertainty of roughly 10%. Besides, the distributions tend to be quite spread out, as is shown by the grey error bars, even though there is a significant offset of the stellar fraction distribution and of its dispersion as we go towards larger stellar masses. Contrary to what was found in Abril-Melgarejo et al. (2021), we cannot measure an impact of quenching on the TFR since our stellar mass offset is negative, meaning that galaxies in the largest structures would be on average more massive than those in the field. Nevertheless, the difference is quite small (∼ 0.05 dex) and may not be particularly significant. However, we do measure a significant offset in the MS, which means that quenching does take place somehow within at least some of the galaxies in the largest structures. One way to explain the apparent discrepancy is to look at the timescale over which the SFR we used in the MS is probed. Indeed, we measure the SFR from the [O ii] doublet which mainly probes recent star formation (∼ 10 Myr). On the other hand, if we consider that the field and large structure subsamples do not have zero points more different than at most their uncertainty (0.02 − 0.03 dex), we can compute an upper bound on the quenching timescale in the large structures using Eq. 16 of Abril-Melgarejo et al. (2021). This gives us timescales between roughly 700 Myr and 1.5 Gyr, significantly larger than the ∼ 10 Myr probed by the SFR from the [O ii] doublet. Hence, the galaxies in the largest structures at z ∼ 0.7 might have quite recently started being affected by their environment, and thus started being quenched, so that the impact on the TFR might not be visible yet with respect to the field galaxies.
Some authors also implement an asymmetric drift correction to take into account the impact of gas pressure on its dynamics (e.g. Meurer et al. 1996;Übler et al. 2017;Abril-Melgarejo et al. 2021;Bouché et al. 2021). Evaluated at R 22 , the gas pressured corrected circular velocity for a double exponential density profile with a constant thickness writes (Meurer et al. 1996;Bouché et al. 2021) where V 22 is the uncorrected circular velocity evaluated at R 22 and σ V is the velocity dispersion computed as the median value of the beam smearing and LSF corrected velocity dispersion map. Equation 17 is only an approximation of the real impact of gas pressure on the measured circular velocity since it only holds for turbulent gas disks with negligible thermal pressure.
In the kinematic sample, the median value of the intrinsic velocity dispersion is around 30 km s −1 independently of environment. Thus, the impact of the asymmetric drift correction is quite small on the TFR. However, we find that the velocity dispersion is not constant but is correlated with stellar mass such that more massive galaxies are more impacted by the correction than low mass ones. In turn, this tends to align high and low mass galaxies onto a line with roughly the same slope, but with a slightly larger scatter. Indeed, when implementing the asymmetric drift correction, we find virtually the same zero point between the small and large structure subsamples (β TFR ≈ 2.07 with the corrected velocity versus β TFR ≈ 2.02 with the uncorrected one), independently of the environment or the richness threshold used.

Stellar fraction Baryon fraction
Fig. 14. Evolution of the median stellar and baryon fractions for galaxies from the TFR sample in the field (black points) and in large structures (red circles) as a function of stellar mass in mass bins of 1 dex. Light gray error bars correspond to the 16th and 84th percentiles of the baryon fraction distributions. The typical uncertainty on stellar mass and baryon fraction is shown as a dark grey error bar on the bottom right. Because we removed galaxies whose mass models have large uncertainties, (selection criteria iv and v), the fractions we measure are probably slightly underestimated.
Additionally, we can also include the gas mass into the fit. We compute the gas mass using the Schmidt-Kennicut relation (Schmidt 1959;Kennicutt 1998a) assuming the gas is evenly distributed within a disk of radius R 22 : with M g the gas mass and SFR the unnormalised SFR (see Sect. 3.3). If we replace the size and SFR variables in Eq. 18 by the size-mass and SFR-mass relations found before, we get a correlation between gas and stellar masses such that more massive galaxies also have a higher gas mass. In particular, the offset on the zero point found for the TFR between the field and the large structure subsamples will also lead to a small offset in the gas mass-stellar mass relation. The impact of the gas mass on the mass budget is shown in Fig. 14. We compare the stellar fraction (circles) with the total baryon fraction (triangles) for the field and large structure subsamples. For most galaxies, the gas mass is non-negligible but has a small impact, leading to an offset between stellar and baryon fractions of roughly 5%. On the other hand, the gas mass has a slightly more significant impact on the lowest mass bin. While the impact is similar to other mass bins for the field sample (roughly 5%), the impact on the large structure subsample is stronger, reaching about 10%. This would suggest that the low mass galaxies are more gas rich in the large structures than in the field. However, only a handful of galaxies (∼ 10) are located in the lowest mass bin in the large structure subsample. Besides, as is shown by the light gray error bars in Fig. 14, the distribution for the baryon fraction is quite large so that the difference in gas mass is probably not that significant. Another explanation for this slightly larger difference found at low mass might be that these galaxies are experiencing bursts of star formation which would lead to overestimated gas masses, but this effect is not visible in the MS. When the gas mass is included, we get a tighter TFR, with low mass galaxies which tend to be aligned onto the same line as the high mass ones. In turn, this brings the best-fit slope to a value of α = 0.31 when applying the mass and redshift cuts, quite close to the α = 0.29 value found when fitting the stellar mass TFR without applying any cut (i.e. driven by massive galaxies). The zero point is almost always similar between the field/small structure and large structure subsamples (β TFR ≈ 1.99), independently of the richness threshold used to separate galaxies in the two subsamples. Similarly to the stellar mass TFR, only when using a threshold N = 20 do we find a slightly more significant difference in zero point between the field/small structure subsample (β TFR = 2.00±0.02) and the large structure subsample (β TFR = 1.98±0.02). However, once we further include the asymmetric drift correction from Eq. 17, the difference vanishes for any richness threshold used (β TFR ≈ 2.02).
Thus, if there is an impact on the TFR, it is mostly driven by differences in terms of stellar mass or redshift distributions rather than the environment itself. We note that this result is consistent with Pelliccia et al. (2019), where they could not find an impact of the environment on the TFR as well, but is contradictory to what was found in Abril-Melgarejo et al. (2021). By comparing their sample to others such as KMOS3D, KROSS and ORELSE they could find a significant offset in the TFR attributed to probing different environments. This offset was interpreted either as the effect of quenching which reduces the amount of stellar mass in the most massive structures at fixed circular velocity, or as the effect of baryon contraction which leads to an increase of circular velocity at fixed stellar mass. As discussed previously, baryon contraction and quenching are visible in our size-mass and MS relations, but not in the TFR. However, they noted that performing a consistent and reliable comparison between samples using different observing methods, models, tools and selection functions was a difficult task which can lead to multiple sources of uncertainty. These can directly arise from the morphological and kinematic modelling, but can also be driven by uncertainties on the SED-based stellar masses which, depending on the SED fitting code used and the assumptions made on the star formation history, can lead to systematics of the same order of magnitude as the offset found in Abril-Melgarejo et al. (2021). On the other hand, we argue that our result is quite robust since we have applied the same models, tools, assumptions and selection from the beginning to the end.

Conclusion
We have performed a morpho-kinematic modelling of 1142 [O ii] emitters from the MAGIC survey using combined HST and MUSE data in the redshift range 0.25 < z < 1.5. These galaxies are all located in the COSMOS field and have been attributed to structures of various richness (field, small and large structures) using a FoF algorithm. We derived their global properties, such as their stellar mass using the SED fitting code FAST and their SFR using the [O ii] doublet. Their morphological modelling was performed with Galfit on HST F814W images using a bulge and a disk decomposition. The best-fit models were later used to perform a mass modelling to constrain the impact of the baryons on the total rotation curve of the ionised gas. We included a mean prescription for the thickness of stellar disks as a function of redshift to correct for the impact of finite thickness on the mass and rotation curve of the disk component. The kinematic maps (line flux, velocity field, velocity dispersion, etc.) were extracted from the MUSE cubes using the [O ii] doublet as kinematic tracer, and the 2D kinematic modelling was performed by fitting the baryons mass models combined with a NFW profile to describe the DM halo directly onto the observed velocity field, while modelling the impact of the beam smearing to compute the intrinsic velocity dispersion.
Our kinematic sample was divided into subsamples targetting different environments and we decided to focus our analysis on three scaling relations, namely the size-mass relation, MS and the TFR. As a first step, we selected a sample of star forming disk-like galaxies and studied how using different additional selection criteria, in terms of size, S/N and/or redshift would impact the best-fit slope and zero point for each relation. We found that the redshift and mass selection criteria were important in order not to bias the zero point when comparing between environments since their redshift and mass distributions differ. Additionally, the TFR requires additional criteria, especially in terms of inclination to remove galaxies with poorly constrained kinematics.
We find a 1σ significant difference (0.03 dex) in the sizemass relation as a function of environment when using a richness threshold of N = 10 to separate between small and large structures, and a 2σ significant difference (0.06 dex) using N = 20. This result suggests that galaxies in the largest structures have, on average, smaller disks (∼ 14%) than their field counterparts at z ≈ 0.7, similar to what was found in the literature. Additionally, we get similar results when using the global effective radius rather than the disk effective radius for our disk sizes. Regarding the MS, we find a 2σ significant impact of the environment on the zero point of the MS (0.1 dex) when using N = 10 and a 3σ significant difference (0.15 dex) when using N = 20. These offsets are consistent with galaxies located in the large structures having reduced SFR by a factor 1.3 − 1.5 with respect to field galaxies at a similar redshift.
Finally, after applying mass and redshift cuts, we cannot find any difference in the zero point of the TFR between environments, except when using a richness threshold of N = 20 to separate between a field/small structure subsample and a large structure subsample. In this instance, we get an offset of 0.04 dex which is significant to at most 1σ significant. By interpreting this offset as being an offset in stellar mass at fixed circular velocity, and by including the contribution of the size-mass relation in the interpretation of the TFR, we find that there must be a small difference of roughly 4% in stellar fraction between field galaxies and those in the largest structures. Because we measure a negative stellar mass offset in the TFR between the field and the large structure subsamples (galaxies in the large structures are more massive than those in the field), we can rule out the effect of quenching as was suggested in Abril-Melgarejo et al. (2021) when using N = 20 . On the other hand, because there is no measured difference in zero point with N = 5, 10 and 15 we can compute upper bounds on the quenching timescale of the galaxies in the large structures using the typical uncertainty found on the TFR zero point. If quenching would indeed lead to a deficit in stellar mass in structures at z ≈ 0.7 with respect to the field, this would suggest that galaxies have been impacted by the largest structures for between at most 700 Myr and 1.5 Gyr. When including the contribution of the gas into the mass budget of the TFR, we find a similarly significant offset of 0.02 dex between the field and the large structures (using N = 20). However, as previously discussed, quenching is still ruled out since this leads to a negative mass offset. Nevertheless, we note that these small differences in zero point vanish once we include the contribution of gas pressure into the dynamics (asymmetric drift correction). The conclusion from our fully self-consistent study differs from that of Abril-Melgarejo et al. (2021), even though they investigated and took into account as much as possible methodological biases between the samples they compared. Such a difference might be due to uncontrolled biases when they compared the TFR between samples, or from a possible redshift evolution of the TFR since they could not control the redshift distribution of the various samples as much as we did in this analysis.
This outlines the importance of further reducing those biases by using similar datasets, selection functions as well as analysis methods for galaxies in both low-and high-density environment to measure its impact on galaxy evolution. MocKinG between MultiNest and MPFIT for galaxies from the MS sample. The rotation curve used was a flat model, and we removed galaxies whose circular velocity could not be reliably constrained (R 22 falls outside the range where there is sufficient S/N in the MUSE data cube to derive the kinematic). Red points correspond to galaxies visually classified as having no apparent velocity field in their kinematic maps, and red dashed lines correspond to a 50% difference between the two methods. The typical uncertainty is shown on the bottom right part of the plot. Overall, values are consistent within their error bars.  Distribution of effective radii for galaxies in the morphological sample. In grey (filled) is shown the total size, in red (hatched) the bulge size and in blue (hatched) the disk size. Disks are mostly found between roughly 1 kpc and 6 kpc, with very few galaxies with disk sizes beyond 10 kpc. The lack of disks below 1 kpc is due to the size selection criterion from Sect. 6.1. On the other hand, the majority of bulges are found below 2 kpc. The total size of galaxies is mainly driven by the disk component. Size-mass relation with and without applying the mass selection criterion (vi) on galaxies from the MS sample. The data points and best-fit lines are similar to Fig. 11. As an indication, we also show as semi-transparent symbols galaxies removed by the mass cut in the right panel. The typical uncertainty on stellar mass and disk size is shown on both panels as a grey errorbar. SFR-mass relation with and without applying the mass selection criterion (vi) on galaxies from the kinematic sample. The data points and best-fit lines are similar to Fig. 12. As an indication, we also show as semi-transparent symbols galaxies removed by the mass cut in the right panel. The typical uncertainty on stellar mass and SFR is shown on both panels as a grey errorbar. Fig. B.3. TFR with and without applying the mass selection criterion (vi) on galaxies from the TFR sample. The data points and best-fit lines are similar to Fig. 13. The first row shows the TFR using the velocity derived from the best-fit mass models, and the second row the TFR using the flat model. As an indication, we also show as semi-transparent symbols galaxies removed by the mass cut in the rightmost panels. The typical uncertainty on stellar mass and velocity is shown on each panel as a grey errorbar.
Article number, page 23 of 32  . Impact of selection criteria on the main parameters distributions for galaxies from the kinematic sample. Each row represents a different selection. The black full line corresponds to the field galaxies subsample, the blue dashed line to the small structures and the red thick line to the large structures (using a threshold of N = 10 to separate between structures). We also show the median values for each subsample as vertical lines. We do not show the small structure subsample in the last two rows since there remain too few galaxies. The areas correspond to the 1σ (dark gray) and 2σ (light gray) dispersions. The bulge component dominates the central parts of the galaxies whereas the disk takes over completely after roughly one effective radius. Even as far as 10R eff , we find a nearly constant non-zero B/T ≈ 0.2 indicative of a non-negligible bulge contribution to the overall flux budget. Figure C.1 represents the median value of the bulge-to-total flux ratio (B/T) for the morphological sample as a function of radius. We see that beyond one effective radius the disk dominates the flux budget. When computed near the centre, B/T is close to one, consistent with the bulge dominating the inner parts. Even though the disk dominates at large distances, B/T does not reach zero. This is a consequence of the chosen bulge-disk decomposition. Indeed, for a Sérsic profile with parameters (n, Σ eff , R eff ), the integrated flux up to radius r is given by F(< r) = 2πn Σ eff R 2 eff e b n γ 2n, b n r/R eff 1/n /b 2n n , (C.1)

Appendix C: Bulge-disk decomposition
where γ is the lower incomplete gamma function and where b n is the solution of the equation Γ (2n) = 2γ (2n, b n ) (Graham et al. 2005), with Γ the complete gamma function. Therefore, for a bulge-disk decomposition the total flux ratio between the two components is given by where (Σ eff,b , R eff,b ) and (Σ eff,d , R eff,d ) are the bulge and disk parameters, respectively. The only case for which Eq. C.2 vanishes is when the bulge contribution can be neglected with respect to the disk. Otherwise, when B/T(∞) is sufficiently larger than 0, this reflects a non-negligible contribution of the bulge to the overall flux budget. The fact that the median value for the morphological sample is around 0.2 is therefore a good indication of the relevance of performing a bulge-disk decomposition with respect to using a single disk model. The half-light radius of a multi-component decomposition involving only Sérsic models does not necessarily have to be computed through numerical integration but can also be derived by finding the single zero of a given function. Indeed, for a bulgedisk decomposition, from the definition of the global half-light radius (that is the radius which encloses half of the total flux), we have where F d (R eff ) and F b (R eff ) are the disk and bulge fluxes at the global effective radius R eff , and F tot,d , F tot,b are the disk and bulge total fluxes, respectively. Given Eq. C.1, one can rewrite Eq. C.3 as Furthermore, if one defines the total magnitude of a component i as mag i = −2.5 log 10 F tot,i + zpt, where zpt is a zero point which is the same for all the components, and normalises by the total flux, then Eq. C.4 simplifies to with the function f defined as .5 can be solved by searching for a zero in the range min R eff,d , R eff,b , max R eff,d , R eff,b . Indeed, if R eff > max R eff,d , R eff,b , the flux at R eff would be the sum of F d (R eff ) > F d,tot /2 and F b (R eff ) > F b,tot /2 such that it would be larger than the expected F tot /2 value. Thus R eff cannot be greater than max R eff,d , R eff,b , and the same argument can be given for the case R eff < min R eff,d , R eff,b .
Finally, there is only one zero which is solution of Eq. C.5, and this can be shown by noticing that f is a monotonously increasing function of x whose normalised form f (x)/ f (∞) is bounded between -1 for x = 0 and 1 for x = ∞.
we have assumed that the sky projected surface density of the stars can be described by a bulge-disk decomposition, where the surface density of stellar disk is represented by an exponential profile and the stellar bulge is assumed to be spherically symmetric with a surface density described by a de Vaucouleurs profile. If one can find 3D flux densities which, when projected onto the line of sight, become the corresponding surface densities, then one has found the corresponding mass densities up to a multiplicative factor which is the mass to light ratio Υ = (M/L) .

Appendix D.1: Theoretical background
For any mass density ρ M (r), we can derive the corresponding potential Φ from Poisson equation The observed velocity maps are derived from the ionised gas kinematics, which is assumed to be located within an infinitely thin disk, therefore we are only interested in the velocity of the gas within the plane of the galaxy disk. If we further assume that the mass distribution ρ M is in equilibrium within its gravitational potential, then the centrifugal acceleration caused by its rotation must balance the radial gradient of the potential Φ in the galaxy plane, that is with V circ the circular velocity, R the radial distance in the plane of the galaxy, and where we have assumed that the potential and circular velocity are independent of the azimuth because of the symmetry of the mass distributions used in the following. Since the mass distributions and therefore the potentials add up, the circular velocity can be simply written as where V circ,i is the circular velocity of the component i obeying Eq. D.2 for the corresponding potential well. In our case, the components which will contribute the most to the rotation curve are the stellar disk, stellar bulge and the dark matter halo to account for constant or slowly declining observed rotation curves at large radii. We do not model the contribution of the gas, which will therefore slightly contribute to the dark matter halo profile.
In the case of the stellar components, we transform from stellar light distributions ρ i to mass distributions ρ M,i using where we have further assumed that the mass to light ratio Υ is constant throughout the galaxy, and we compute it using the SED-based estimator of the stellar mass as where M is the SED-based mass computed in a circular aperture of diameter 3 , and F SP (1.5 ) is the flux integrated on the plane of the sky in the same aperture. In this analysis, we assume a similar Υ for both disk and bulge because it would require at least two HST bands to constrain efficiently the M/L for both components individually as done for instance in Dimauro et al. (2018).

Appendix D.2: Razor thin stellar disk
To begin with, we assume the stellar disk to be infinitely thin, so that the stellar light density can be written as where Σ RT represents the light distribution in the plane of the disk, with Σ RT (0) the central surface density, b 1 ≈ 1.6783, R eff,d the disk effective radius, and δ is the Dirac distribution. The rotation curve for such a distribution was computed for the first time by Freeman (1970) using the method described in Toomre (1963): with f (y) = I 0 (y)K 0 (y) − I 1 (y)K 1 (y) and y = R/(2R d ). The effective radius of the disk is related to the disk scale length appearing in Eq. D.8 through R eff,d = b 1 R d . The maximum circular velocity is reached at a radius R = 2.15R d and is equal to where G is the gravitational constant.

Appendix D.3: Thin stellar disk
To refine the mass modelling of the stellar disk, we consider a disk model with a finite thickness. Assuming the light distribution can be correctly represented by a double exponential profile, we have where h z is the disk scale height. It can be shown (Peng et al. 2002b) that the potential in the plane of the galaxy for such a density can be written as where S 0 (k) is the Hankel transform of order 0 of the surface density Σ d (R). For thin disks with small h z , an approximation of the circular velocity in the plane of the galaxy is given by 9 where V RT is the razor-thin circular velocity defined in Eq. D.8 and R d is the disk scale length. For typical values of h z /R d ≈ 0.2 − 0.3, this approximation gives a circular velocity which is different from numerical integration by less than 2% for most of the radial range, except near the central parts where the relative difference rises, though the absolute difference remains negligible in practice as the circular velocity quickly drops to zero near the centre. The maximum of the correction is reached at R d (see Fig. D.1) and is given by In the case of a razor-thin disk projected at an inclination i with respect to the line of sight, the apparent central surface density Σ RT,obs (0) and axis ratio q = b/a, with a and b the semi-major and semi-minor axes, respectively, scale with the inclination as Σ RT,obs (0) = Σ RT (0)/ cos i, (D.14) q = cos i.
(D.15) Writing Eq.D.14 is equivalent to saying that the total flux of the disk must be independent of its inclination on the sky, and Eq.D.15 comes from the fact that the isophotes of a projected razor-thin disk are ellipses. However, in the case of a disk with non-zero thickness the surface density profile gets more complicated, and must be computed as the integral of the inclined density distribution along the line of sight. We give in Appendix E a derivation of this integral in the general case. For the apparent central density, it simplifies to with q 0 = h z /R d the real axis ratio, R d the disk scale length, Σ RT (0) the central surface density if the galaxy was seen faceon, and i 0 the real inclination of the galaxy. We see that when the disk is infinitely thin (i.e. h z = 0) we recover Eq. D.14, as should be expected. For a perfectly edge-on galaxy, that is i = 90°, Eq. D.14 diverges, which is due to the fact that a razor-thin disk seen edge-on does not have its flux distributed onto a surface any more, but onto a line. For a disk with non-zero thickness, this is not the case, and therefore Eq. D.16 remains finite for an edge-on galaxy.
For a disk with finite thickness, there is no trivial way to relate the observed axis ratio q to the real one q 0 . In practice, the isophotes of a projected disk can be approximated by ellipses but with an ellipticity which depends on position, disk scale length, scale height and inclination. Still, we expect the observed axis ratio to be 1 for a face-on galaxy, and equal to q 0 for a perfectly edge-on galaxy. For an oblate system, we can relate the observed axis ratio to the intrinsic one and the galaxy inclination i 0 as (Bottinelli et al. 1983): cos 2 i 0 = (q 2 − q 2 0 )/(1 − q 2 0 ). (D.17) Technically, the isodensity surfaces of a double exponential profile are not oblate but have a biconical shape, which means that Eq. D.17 is only an approximation of the real dependence of the observed axis ratio on q 0 and inclination. In Sect. 4.1, we have fitted 2D profiles of galaxies using a bulge-disk decomposition, assuming that the disk is exponential with zero thickness. Its apparent central surface density is therefore given by Eq. D.14 with i the apparent inclination related to the observed axis ratio through Eq. D.15. If the stellar disk 3D distribution is actually described by a double exponential profile, then its apparent central surface density given by Eq. D.16 must match that of the fitted single exponential profile. Using Eq. D.17 to express the apparent inclination in terms of the real inclination i 0 and intrinsic axis ratio q 0 , we can derive the ratio r 0 of the central surface density computed using a double exponential profile against that computed from a single exponential fit as r 0 = q 0 sin i 0 + cos i 0 q 2 0 sin 2 i 0 + cos 2 i 0 . (D.18) The ratio of the central surface densities is plotted in Fig. D.2 as a function of the intrinsic axis ratio and real inclination. The central surface density derived in the case of a disk with non-zero thickness is always larger than its infinitely thin disk counterpart, the ratio reaching a maximum max i 0 r 0 = √ 2, (D.19) at i 0 = arctan(1/q 0 ). As is expected, when the disk becomes more and more flattened the ratio reaches unity. Similarly, when the galaxy is viewed face-on, the central surface densities for both models are equal.

Appendix D.5: Correction in the inner parts
The Bovy approximation to the rotation curve of a double exponential profile given by Eq. D.12 has the disadvantage to reach a null velocity as soon as the correction term on the right hand side becomes larger than the velocity of the razor-thin disk appearing in the equation, that is at R > 0. However, the real rotation curve would reach a null velocity at R = 0 if one integrates it numerically. The impact of using Eq. D.12 would be small since we lack the resolution in our MUSE data to model precisely the velocity in the inner parts and because beam-smearing strongly affects the velocity field near the centre. Nevertheless, it can be useful to slightly modify it in order to have a rotation curve that behaves more physically in the inner parts.
To do so, we decided to replace the rotation curve for the double exponential profile near the centre with the tangential line Bovy approximation which passes through R = 0. This means that the rotation curve will behave linearly in the inner parts until Ratio of the central density assuming a double exponential profile with that derived assuming a razor thin disk exponential fit as a function of the galaxy real inclination i 0 and intrinsic axis ratio q 0 = h z /R d , with R d the disk scale length. The maximum value is equal to √ 2 and is reached at i 0 = arctan(1/q 0 ). it reaches the tangential point where Bovy approximation will take over. Let us call R 0 the radius at which the corresponding tangential line passes through the point R = 0, then the tangent must obey the following equation where f is defined in Appendix D.2 and α = 4πGR d ΥΣ RT (0). Furthermore, the derivative of f 2 is given by d f 2 dy (y 0 ) = 2I 1 (y 0 )K 0 (y 0 ) + 2I 1 (y 0 )K 1 (y 0 )/y 0 − 2I 0 (y)K 1 (y 0 ).

(D.23)
Thus, combining everything together, the equation one needs to solve to find y 0 = R/R d as a function of the disk thickness q 0 is y 2 0 I 1 (y 0 )K 0 (y 0 ) − I 0 (y 0 )K 1 (y 0 ) +y 0 I 1 (y 0 )K 1 (y 0 )+ q 0 (y 0 + 0.5) e −2y 0 = 0. (D.24) Equation D.24 was solved numerically for a range of q 0 values and was then fitted by a polynomial function of degree five in order to get an analytical approximation of y 0 as function of q 0 . We found that the best polynomial fit is given by y 0 = 0.76679 + 0.86230q 0 − 0.13703q 2 0 − 0.02308q 3 0 + 0.00452q 4 0 + 0.00102q 5 0 , (D.25) and we show in Fig. D.3 the relative error on y 0 = R/R d between the analytical approximation given by Eq. D.25 and the numerical solution as a function of the disk thickness. Appendix D.6: Stellar bulge Galaxy bulges can be described by various 3D distributions such as Plummer or Jaffe profiles (Plummer 1911;Jaffe 1983), but the most interesting one remains the Hernquist profile (Hernquist 1990) ρ M (r) = M b 2π a r (r + a) −3 , (D.26) with M b the total bulge mass and a a scale radius related to the half-mass size r 1/2,M through the relation a = r 1/2,M / 1 + √ 2 .
In the case of a light distribution, the total bulge mass M b is replaced by the total bulge flux F b = M b /Υ. This profile has the advantage of being spherically symmetric, with analytical forms of its gravitational potential and circular velocity, while having a line of sight projected surface density close to a de Vaucouleurs profile, except towards the inner parts. Therefore describing the bulge 3D mass distribution as an Hernquist profile seems to be the most relevant choice. The circular velocity can be written as V b (r) = 2V b,max √ ar (a + r) −1 , (D.27) where V b,max = 0.5× √ GΥF b /a is the maximum circular velocity reached at a radius r = a. . From top to bottom, the Sérsic parameters are (Σ eff , R eff ) = (10 −3 , 0.5) (orange), (10 −3 , 6) (blue), (0.1, 0.5) (red) and (0.1, 6) (grey). Because the deviation of the projected Hernquist profile to the Sérsic one occurs mainly at large distances, where the surface brightness quickly drops, the overall fluxes are actually in quite good agreement.
Appendix G: Example of morpho-kinematics maps We show below an example of a morpho-kinematic map. The maps for all the galaxies in the MS sample are sorted according to their (RA2000, DEC2000) coordinates and can be found online.