Inspecting the Cepheid distance ladder: The Hubble Space Telescope distance to the SNIa host galaxy NGC 5584

The current tension between the direct and the early Universe measurements of the Hubble Constant, $H_0$, requires detailed scrutiny of all the data and methods used in the studies on both sides of the debate. The Cepheids in the type Ia supernova (SNIa) host galaxy NGC 5584 played a key role in the local measurement of $H_0$. The SH0ES project used the observations of this galaxy to derive a relation between Cepheids' periods and ratios of their amplitudes in different optical bands of the Hubble Space Telescope (HST), and used these relations to analyse the light curves of the Cepheids in around half of the current sample of local SNIa host galaxies. In this work, we present an independent detailed analysis of the Cepheids in NGC 5584. We employ different tools for our photometric analysis and a completely different method for our light curve analysis, and we do not find a systematic difference between our period and mean magnitude measurements compared to those reported by SH0ES. By adopting a period-luminosity relation calibrated by the Cepheids in the Milky Way, we measure a distance modulus $\mu=31.810\pm0.047$ (mag) which is in agreement with $\mu=31.786\pm0.046$ (mag) measured by SH0ES. In addition, the relations we find between periods and amplitude ratios of the Cepheids in NGC 5584 are significantly tighter than those of SH0ES and their potential impact on the direct $H_0$ measurement will be investigated in future studies.


INTRODUCTION
The current expansion rate of the Universe, known as the Hubble constant or H 0 , is one of the fundamental parameters of the standard model of cosmology and of any viable cosmological model. A few decades after the initial estimate of around 500 km s −1 Mpc −1 by Hubble (1929), H 0 became a place for debate with values either ≈ 100 km s −1 Mpc −1 (e.g. van den Bergh 1970;de Vaucouleurs 1972) or ≈ 50 km s −1 Mpc −1 (e.g. Sandage & Corresponding author: Behnam Javanmardi behnam.javanmardi@obspm.fr, behjava@gmail.com Tammann 1975). The debate was finally settled after the findings of the HST H 0 Key Project whose final results was H 0 = 72 ± 8 km s −1 Mpc −1 (Freedman et al. 2001). This value was found to be in agreement with the subsequent results from the observations of the Cosmic Microwave Background (CMB) by the Wilkinson Microwave Anisotropy Probe (WMAP, e.g. Spergel et al. 2003) based on the standard Lamda-Cold-Dark-Matter (ΛCDM) model. However, in the recent years and with the improved precision of the measurements of H 0 , a significant tension has again risen this time between the so called early-Universe cosmology-dependent approaches finding H 0 ≈ 67 km s −1 Mpc −1 and late-Universe direct measurements mostly finding H 0 ≈ 73 km s −1 Mpc −1 .
On the one hand, using the precise observations of the CMB from the Planck satellite, Planck Collaboration et al. (2018) concluded that the ΛCDM provides an excellent explanation of the CMB data and reported a model-dependent prediction of the Hubble constant H 0 = 67.4 ± 0.5 km s −1 Mpc −1 . This result is in good agreement with other early Universe measurements. For example, by combining baryon acoustic oscillation (BAO) and Big Bang nucleosynthesis (BBN) data, Addison et al. (2018) reported a CMBindependent value of H 0 = 66.98 ± 1.18 km s −1 Mpc −1 , and by combining BBN and BAO data with galaxy clustering and weak lensing data, the Dark Energy Survey reported H 0 = 67.4 +1.1 −1.2 km s −1 Mpc −1 (Abbott et al. 2018). In a recent study and based on new high resolution CMB observations from the Atacama Cosmology Telescope, Aiola et al. (2020) reported H 0 = 67.9 ± 1.5 km s −1 Mpc −1 , consistent with previous early Universe results. All these results are based on the ΛCDM model.
On the other hand, the SH0ES (Supernovae H 0 for the Equation of State) project, that uses the Cepheid calibrated SNeIa data, finds a significantly higher locally measured H 0 value. Cepheids are one of the most reliable distance indicators and, using more than a decade of observations(see e.g. Riess et al. 2005), the SH0ES project measures H 0 = 73.5 ± 1.4 km s −1 Mpc −1 for the Hubble constant Riess 2019). This is one of the most precise determinations of H 0 and is in more than 4σ tension with the early-Universe results.
Although some late Universe results are in agreement with those from early Universe approaches, the absolute majority of direct methods find H 0 values larger than the early Universe model-dependent methods, and currently different combinations of the late Universe measurements are in 4 to 6σ tension with the early Universe ΛCDM predictions (Verde et al. 2019;Riess 2019), and removing any one method does not appear to resolve the tension. In fact, the general consistency of the direct methods on the one hand, and of those of the early-Universe methods on the other hand, significantly reduces the possibility that systematics in one method, data, or analysis would solve this problem.
However, since the persistence of the H 0 tension would mean the failure of the base ΛCDM model, and given the generally understood success of the ΛCDM in explaining the CMB and the large-scale structure data, it is absolutely necessary to not only take different approaches for measuring H 0 , but also, as emphasized by Riess et al. (2020), to scrutinize in detail all the data, methods, and the studies that have led to this cosmic discordance.
The main three rungs of the Cepheid distance ladder are i) calibration of the period-luminosity relation using geometric distance measurements to nearby Cepheids, ii) calibration of the SNIa absolute magnitude using Cepheids in SNIa host galaxies out to around 40 Mpc, and iii) using SNIa out to redshift 0.15 to measure H 0 .
On the first rung, different studies (e.g. Nardetto 2018; Borgniet et al. 2019;Kervella et al. 2019b;Gallenne et al. 2019;Anderson 2019;Hocdé et al. 2020a,b;Musella et al. 2020) have focused on enhancing our understanding of the different properties of Cepheid variables, and in a recent study, Breuval et al. (2020) presented a new calibration of PL relation for Milky Way Cepheids using their companion parallaxes from Gaia (Kervella et al. 2019a). In addition, the high precision measurement of the distance to the Large Magellanic Cloud (LMC) by Pietrzyński et al. (2019) provides an accurate calibration of the Cepheid period-luminosity relation in this satellite galaxy of the Milky Way.
On the third rung, the impact of SNeIa environment (Roman et al. 2018) and in particular that of the star formation rate (Rigault et al. 2015) of their host galaxies on distance measurements has been investigated. Jones et al. (2018), however, concludes that the environmental dependency of SNeIa properties have negligible effect on the H 0 measurements. Dhawan et al. (2018) and Burns et al. (2018) used near-infrared observations, where SNeIa luminosity variations and extinction by dust are less than in the optical observations, and concluded that the H 0 tension is likely not caused by systematics like dust extinction or SNeIa host galaxy mass. Also, Hamuy et al. (2020) reported that different methods for standardization of SNeIa light curves yield consistent results with a small standard deviation, concluding that SNeIa are robust calibrators of the third rung.
In this study, we scrutinize the second rung, that is, the Cepheid calibration of SNeIa host galaxies. This intermediate rung plays the important role of connecting the geometric distance calibrations of the ladder to the cosmic scales. Therefore, it is vital to also investigate the observations and analysis involved in the second rung of the Cepheid distance ladder independently of SH0ES that has so far been the only program undertaking this effort. Riess et al. (2016, hereafter R16) used HST data to measure the Cepheid distances to 19 SNIa host galaxies for the calibration of the luminosity of larger distance SNIa. R16 presents the near-infrared (NIR) observations, whereas a companion paper by Hoffmann et al. (2016, hereafter H16) reports the complete optical observations of Cepheid variables in these SNIa host galaxies. Out of these 19 galaxies, 10 have been observed in the earlier stages of the SH0ES project (Riess et al. 2009) and with older HST instruments, i.e. NICMOS 1 and WFPC2 2 , using F555W (V), F814W (I), and F160W (H) bands for measuring mean magnitudes and periods of their Cepheid variables 3 . However, for 9 out of 19 of these galaxies, the photometric time series necessary for identifying the Cepheids, measuring their light curves and estimating their periods, have been obtained using the wide band HST F350LP filter available on WFC3/UVIS. The wavelength range of this so called "white light" filter covers those of V and I bands, hence is suitable for the detection of faint sources. The 9 galaxies mentioned above currently have much fewer random phase observations in V and I bands, not sufficient for light curve analysis. NGC 5584, however, has time series observations in all these three bands. Using the data of this galaxy, the SH0ES team obtained a relation between the periods of the Cepheids and the ratio of their amplitudes in V and I relative to those in F350LP band. Then, assuming that these relations derived from NGC 5584 also hold in other SNIa host galaxies, the SH0ES project correct for the effect of random phase observations of Cepheids in the galaxies with few V and I observations. Therefore, the Cepheids in the galaxy NGC 5584 played a key role in obtaining the periods and mean magnitudes of the Cepheids in almost half of the current SH0ES sample of SNeIa host galaxies, and in turn in the final measurement of H 0 .
For our inspection, we use the same observations of NGC 5584 that were used by SH0ES. Hence, this work is not a complete reproduction of the original experi-ment, since we do not repeat the observations themselves. However, where possible, we intentionally explore different numerical methods and tools than those used by SH0ES to provide an independent insight to the H 0 problem. The goal of this work is to inspect the foundations of the Cepheid distance scale, independently of any input on our analysis from the SH0ES team.
This paper is organized as follows. In Section 2, we briefly outline the method. Section 3 presents a full description of the data. We describe our analysis in Section 4, present our results in Section 5, and finally conclude in Section 6.

METHOD
A standard approach for distance measurements using the Cepheid variables (Leavitt & Pickering 1912) is to use reddening-free "Wesenheit" index (Madore 1982) in the H band defined by R16 as where H, V , and I are mean magnitude of the Cepheids in F160W, F555W, and F814W, respectively. In our analysis, we adopt R H = 0.386 which is derived from Cardelli et al. (1989) and Fitzpatrick (1999), and is also adopted by e.g. Riess et al. (2019), Bentz et al. (2019), andBreuval et al. (2020). The distance to a nearby SNIa host galaxy can be measured by obtaining the relation between the pulsation period and W H of its identified Cepheids, and by adopting a W H vs. period relation calibrated by the Cepheids in e.g. the Milky Way or the LMC. The observations of NGC 5584 for the measurements of periods and the mean magnitudes of its Cepheids in the above-mentioned bands are described in the next section. . 0.04 arcsec/pixel. The IR camera has a dimension of 1014 pix × 1014 pix with FOV 136×123 arcsec 2 , and a resolution of 0.13 arcsec/pixel. NGC 5584 has been observed in 13 epochs (in total 45540 sec) in F555W band, 6 of which also accompanied by F814W observations (in total 14400 sec). In twelve of these epochs, this galaxy has also been observed in the F350LP band (in total 15000 sec). In addition, NGC 5584 has also been observed with WFC3/IR channel with the F160W or the H band in 2 epochs (in total 4929 sec).

Calibrations
In all cases, we obtain the calibrated cosmic-ray cleaned (i.e. the flc.fits files for WFC3/UVIS, and flt.fits files for the WFC3/IR observations) data provided by the MAST database. In the case of WFC3/UVIS, the flc.fits files are also corrected for the charge-transfer efficiency loss 5 . We list the full information regarding these observations in Appendix D. 5 WFC3/IR observations do not suffer from this loss.
Similar to H16, we use the TweakReg software 6 for image registration and alignment. For all the images of all the bands we achieve an alignment better than 0.1 pixels, the same precision is also reported by H16. We use the coordinates of the "local standard stars" provided by H16 (see section 3.3 for more details on these stars) in order to have the same absolute astrometry as theirs. This provides an exact identification of the Cepheids using the RA and DEC reported by H16.
Each observation epoch consists of multiple exposures. For example, 11 out of 13 epochs in F555W bands consist of six different exposures, and the other two, consist of four different exposures (see Appendix D). We use the AstroDrizzle software 6 to combine all the exposures of each epoch (and of the same filter) to obtain final distortion-corrected drizzled science images for the purpose of our analysis. Figure 1 shows examples of UVIS and IR images of the NGC 5584.

The Cepheids in NGC 5584
After performing Point-Spread Function (PSF) photometry for all the sources in the galaxy image, H16 uses the Welch & Stetson (1993) variability index to identify variable objects. This procedure requires comparing fluxes of each epochs with non-variable sources. A list of visually inspected such "local standard stars" is provided by H16 in their table 3. H16 fits all variable objects with Cepheid light curve templates from Yoachim et al. (2009), which have been generated for V and I bands and by a combination of Fourier decomposition and principal component analysis from a sample of Cepheids in the MW, the LMC, and the Small Magellanic Cloud. After template fitting, H16 visually inspects the six best solution for all the variables, and rejects the variables that are poorly fitted. The details on further criteria that H16 applied to get to their final Cepheid sample are presented in their section 4.2.
In this work, rather than redoing the Cepheid identification process, we use the same identified Cepheids provided and used by H16 and R16. This enables us to directly compare our photometry and light curve modeling results with those of SH0ES for each and all of the identified Cepheids in NGC 5584.

Photometry
Our precise alignment of the images using the local standard stars of H16 provides an exact identification of the Cepheids using the RA and DEC reported by H16. In the left panel of Figure 1, we mark the positions of the 199 optically identified Cepheids. Out of these, only 82 are identified in F160W and measured by R16. These are marked with red dots on both panels of Figure 1.

PSF Modelling
To measure the brightness of the Cepheids at each epoch, we use the PSF photometry routines of the Photutils package of Astropy (Bradley et al. 2019) that provides tools similar to, but also more general than, DAOPHOT (Stetson 1987) which is used by H16. For optical bands, we perform the PSF photometry on 100 pix × 100 pix (4 by 4 arcsec 2 ) portions of the image centered on each Cepheid for all the epochs. The background is locally estimated for each Cepheid and is automatically subtracted from the Cepheid flux. Similar to H16, we use the TinyTim package that provides PSF models for various cameras and different HST bands (Krist et al. 2011). We checked various fitting algorithms and background estimators and found that the choice has negligible effect on the flux measurement. Therefore, similar to R16, we use a Levenberg-Marquardt-based algorithm (provided by Astropy as LevMarLSQFitter) for determining the best-fit parameters which are the (x,y) position and the flux (plus their uncertainties) for the Cepheids, and MMMBackground routine which calculates the background using the DAOPHOT MMM algorithm (Stetson 1987).
For IR photometry, i.e. for the F160W band, our procedure is the same as in the optical analysis, except that (similar to R16) the (x,y) positions of the Cepheids are fixed to their best-fit values from the F814W band and that the PSF photometry is performed on 50 pix × 50 pix (around 6.5 by 6.5 arcsec 2 ) portions of the image centered on each Cepheid. The reason for fixing the (x,y) position is that the significantly lower resolution of IR images may lead the fitting algorithm to pick a wrong neighbouring source rather than the Cepheids if (x,y) are allowed to vary as free parameters.
Examples of our PSF photometry results are shown in Figure 2. We choose to show those Cepheids that are presented as representative by H16 (in their Figure 4).

Epoch-to-epoch offset
The observation condition varies from epoch to epoch and would affect the flux of the Cepheids. To correct for this, we use the local standard stars which were introduced earlier. For each band, we perform a PSF photometry of these non-variable stars and measure their average fluxes in all epochs,F all , and also for each epoch, The magnitude zero-point, ZP, for different HST bands are provided by Kalirai et al. (2009), Deustua et al. (2017, and on the STScI calibration pages 8 . These ZP values are based on WFC3 standard aperture radius of 0.4 arcsec. Therefore, the difference between this standard aperture and the PSF modeling should be measured and corrected for. A customary approach adopted also by H16 is to perform both PSF and aperture photometry on a sample of ideally isolated and relatively bright stars in the image and to obtain a statistical mean difference between the two. In this work, we take a rather different approach. Ideally, for a single isolated star the difference between the 7 Since we scale the Cepheid fluxes by the ratioF all  aperture and PSF photometry should be directly dependent on the aperture size and the PSF model, while the background should be the same. Here, given that the aperture size for the purpose of correction is fixed to 0.4 arcsec, the difference is basically caused by the extra light captured by the tails of the PSF model beyond 0.4 arcsec radius. Therefore, one way to directly obtain this difference is to measure the flux of the PSF model using a 0.4 arcsec radius aperture (10 pixels for UVIS and around 3 pixels for IR). The magnitude difference, hence the aperture correction (AP cor ), would then be AP cor = 2.5 log 10 [ F ap F PSF ] − 2.5 log 10 [EE(r = 10)], (2) where F ap is the fraction of the PSF flux inside the aperture, F PSF is the total flux of the PSF model, and EE(r) is the encircled energy for different aperture radius r (see Deustua et al. 2017, for further details). We compare the two methods of measuring the aperture correction in Appendix A. The ZP and AP cor values used in this study are listed in Table 1 for each band 9 .

Crowding Bias
At distances larger than ≈ 10 Mpc, despite the large luminosity of Cepheids, their light often cannot be separated from their stellar crowds ). The flux of the neighboring stars entering the same resolution element as the Cepheid alters the statistical estimation of the background, therefore biasing the Cepheid flux (Anderson & Riess 2018). This bias is one of the most significant challenges for Cepheid measurements at distances larger than 20 Mpc (Freedman et al. 2019). In particular for NGC 5584, at a distance of around 23 Mpc, each pixel of the WFC3/UVIS camera spans around 4 pc. Therefore, it is very likely that the pixel that contains a given Cepheid also encompasses other stellar sources either physically near the Cepheid, or along the line of sight. The pixel size of UVIS/IR is around three times larger than that of WFC3/UVIS, hence covering a larger physical size at the distance men-tioned above. The so called "crowding bias" can be statistically estimated at the location of each Cepheid and can be removed from the flux measurements. A typical method, which is also used by the SH0ES team, is to simulate and add artificial stars to the immediate surroundings of each Cepheid on an image, retrieve their flux using the same PSF photometry approach applied to the Cepheids, and measure the difference between the input and output fluxes. In a recent study, Riess et al. (2020) present a test of this approach using an independent method employing the Cepheids amplitudes, and report an statistical agreement between the two methods.
In this work, we use a similar approach as in R16 and H16. In the case of the optical bands, for each Cepheid we simulate (using TinyTim PSF models) 20 artificial stars per epoch and add them to the same image portions used for their PSF photometry (Section 4.1.1). In the case of the F160W band, because only two epochs are available, we use 50 artificial stars per epoch. The fluxes of these artificial stars are then measured using the same PSF approach explained in Section 4.1.1. Prior to obtaining a mean value for the magnitude differences, H16 directly removes the artificial stars that land within 2.5 pixels of another source that is up to 3.5 mag fainter. Instead of this direct removing approach, we apply a 2σ clipping which automatically rejects the artificial stars that are blended with another bright source. We then measure the mean magnitude difference as the crowding bias estimate for each Cepheid.
For the optical observations, the SH0ES team uses the mean value of crowding bias in a galaxy as a single bias value for all the Cepheids in that galaxy. By doing that, the local bias are over estimated for some Cepheids, and are underestimated for some others. Crowding is an environment dependent effect and, in principle, it should not be averaged over a galaxy. In our analysis, we take a different but accurate approach and apply the crowding bias estimated at the position of each Cepheid on the measured magnitudes of that Cepheid before template light curve fitting. We investigate the crowding bias in more detail in Appendix B where we derive a relation between crowding bias and local surface brightness and we also compare our results with those of SH0ES.

Light curve fitting using Templates from Galactic Cepheids
The data collected for each Cepheid consists of several epochs for different pass bands. From this data, we need to derive the pulsation period, as well as the mean magnitudes in each band. In H16, this was done using template light curves from Yoachim et al. (2009) work, we use different template light curves and fitting strategy so that all bands are analysed simultaneously. We derive synthetic light curves in the HST photometric bands for various known Galactic Cepheids, covering the instability strip (in effective temperature and period). The radius, effective temperature, and period of these Cepheids are shown in Figure 3. We then use a dimensionality reduction algorithm to parametrize any light curve using only a few parameters.

Data set for the templates
We choose to use observational data as basis for our templates, fitted with our modeling tool SPIPS (Mérand et al. 2015) which synthesizes photometric observations based on variations of the stellar radius and effective temperature. We collect high quality spectro-, photoand interferometric data for many Galactic Cepheids and fit their SPIPS models. It should be noted that the knowledge of the distance and/or the projection factor of these Galactic Cepheid does not play a role in building the light curve templates.
Our final sample comprises of 28 stars with periods ranging from 12 to ∼90 days (Breuval et al., in prep).    We do not include Cepheids with period shorter than 12 days because i) Cepheids observed in distant galaxies are biased towards the brightest ones, which results in an observational cut around ∼20 days and ii) Cepheids light curves change dramatically around 9-10 days, which has been long noticed ever since Fourier decomposition was applied to Cepheids' light curves (see e.g. Simon & Lee 1981). We do not apply any selection cut on radius and effective temperature, as our intent is to sample Cepheids in the instability strip.
The SPIPS models are based on radial and temperature variations enabling the synthesize of any photometric light curve using the filter band pass definition and atmospheric models. The advantage of this method is that it can accurately extrapolate light curves in pass bands for which we do not have data. We use the HST band passes and zero points defined at the Spanish Virtual Observatory's Filter Profile Service 10 .

Reduction of dimensions in templates
Our 28 Galactic Cepheids light curves contain a lot of information which needs to be reduced into parametrised templates. We reduce the dimensions of our template data set with a principal component analysis (PCA), using the scikit-learn Python library (Pedregosa et al. 2011). The training data set for PCA are 28 vectors composed of the concatenated light curves (one for each band) over a single pulsation cycle, centered around their means (see Figure 4). When it comes to choosing how many components to keep to fit our light curves, it is customary to consider the amount of variance reproduced by a given number of most significant components. In our dataset, at any given phase and for any bands, the standard deviation is never greater than 0.2 mag, with a total standard deviation of 0.13 mag (around the average light curve). Using enough PCA components to reproduce 95% of the variance should reproduce light curves within ∼0.03mag (on average), which we deemed enough for our application. Our main goal is to extract the average magnitude from sparse and irregularly sample time series: even if the light curve is reproduced within 0.03 mag, the average is likely estimated with much higher accuracy. Keeping 3 principal components covers 93.8% of our training set variance, whereas using 4 components leads to 97.1% of the variance being reproduced, which corresponds to a standard deviation of 0.022 mag. See Figures 5, and 6 for different information regarding the PCA components.

Fitting strategy
For a given NGC 5584 Cepheid, we have a list of observations in various pass bands and at different dates. The initial period is estimated by a computed periodogramme on the F555W and F350LP data. Then, a full model is fitted to the data using the PCA light curves. Our model also includes reddening, using the formula contained in SPIPS and parametrised using the color excess E(B-V). We fix the reddening to E(B-V)=0.035, which we estimate using DUST 11 We iterate on the initial parameter by randomising the period (±5%) to account for the uncertainty of the periodogramme estimation. The PCA coefficients are initialised to their mean value from the analysis of the template stars. During the least square fit, a uniform prior constrains the coefficient to only evolve inside the range of values observed on the template stars. From the randomised starting periods, we keep the fit with the global lowest reduced χ 2 . Using the best fit parameters and covariance matrix, we can compute the domain of uncertainty for the synthetic light curves and derive the average magnitudes and amplitudes.
Our fitting method has several differences with the one presented in H16 using Yoachim et al. (2009). First of all, we fit all data at once. This is feasible since our model include realistic information about the offset between bands and the shape of the light curve. An example can be seen for star 347072 in Figure 7 (which we discuss further in Section 5). The F814W data of this Cepheid are very noisy and the fitted light curve is constrained mostly by the F555W and F350LP data, which are of much better quality. Even if the modeled light curve in F814W is systematically above the data points, it is the most realistic within our hypothesis and priors derived from Galactic Cepheids.

Light Curves, Mean Magnitudes, and Periods
Using the light curve template fitting explained in Section 4.3, we obtain the periods and the mean magnitudes for all the identified Cepheids in the four HST bands. Figure 7 presents our results for the light curves of the Cepheids we showed in Figure 2, they are chosen by H16 as the representative Cepheids of NGC 5584. Our light curves can be directly compared with those of H16 shown in their Figure 4. Most of the light curve models nicely represent the data. One exception among these is the Cepheid 347072, which as discussed earlier, has poor quality data points in F814W. This Cepheid is not detected in the F160W band and therefore is not included in the measurement of distance neither by SH0ES nor by us in this work. Figure 8 provides one-on-one comparisons of our results with those of SH0ES reported in H16 and R16. The top row provides comparisons for the mean magnitude measurements in V , I, and H bands, as well as the (V − I) color. For the H band, we only show the uncertainties on the Y axis (i.e. from our results), since R16 publishes only the so called total uncertainties (σ tot ) and not those of the mean magnitudes in the H band. A generally good agreement can be seen between the two results, especially for the H band and the V − I color both of which directly contribute to the distance measurement (see Equation 1).
The left-most panel on the bottom row of Figure 8 provides a comparison for period measurements. As can be seen, although we use a different approach for tem- plate fitting and hence the period measurements, the two results are in general agreement with only a few exceptions.
Regrettably, H16 does not provide mean magnitudes in F350LP band, we therefore cannot have a direct comparison for this quantity. However, we can compare amplitude measurements in F350LP band as discussed in the next sub-section.

Amplitude Measurements
We remind the reader that H16 uses the amplitude ratios vs. period relation of the Cepheids in NGC 5584 to correct the random-phase observations of other SNIa host galaxies in the V and I band. Therefore, an accurate and precise measurement of these relations can potentially impact the final H 0 measurements. The three panels (from the right) on the bottom row of For the H band, we only show the uncertainties on the Y axis (i.e. from our results), since R16 publishes only the so called total uncertainties (σtot) and not those of the mean magnitudes in the H band. PTP stands for peak-to-peak and is one of the methods of determining the pulsation amplitudes (see Section 5.2 for more details). The equality lines are plotted with solid black on all panels. different measurements of the amplitudes: 1) peak-topeak (PTP) which measures the magnitude difference between the maximum and minimum of the light curve model, and 2) the root-mean-square (RMS) which is the standard deviation of the light curve (regularly sampled) from their mean value. While the PTP results (which are the ones shown in Figure 8) are in general agreement with the amplitude measurements of SH0ES, it is not robustly estimated in our method. Our PCA-based fits allow variations in the shape of the model, especially between phase 0.8 an 1.0, which is where the amplitude is measured (see for example F350LP light curve of star 258671 in Figure 7). On the other hand, the amplitude is directly one of the template fitting parameter in the SH0ES analysis. While PTP and RMS differ by a factor of 2 √ 2 ≈ 2.83 for a pure sinusoidal wave, the value varies with the exact shape of the light curve. From our high definition template sample star, we find that PTP RMS I = 3.08 ± 0.12 and PTP RMS V = 3.14 ± 0.14. We are interested in ratios between bands, and the comparison with SH0ES' results. For the amplitude ratios we find that PTP I PTP V = 0.98 ± 0.03 RMS I RMS V . In other words, the ratio of amplitudes are almost independent of the amplitude measurement method and our amplitude ratios computed from RMS (which we use in our subsequent analysis) are comparable to those of SH0ES with a scatter of 6%.
In Figure 9, we compare our results and those of SH0ES for the amplitude ratio vs. period relation. The blue squares and red diamonds are our A V /A LP and A I /A LP , respectively. The grey plus and cross symbols are the same quantities as published by SH0ES in H16 and have significantly larger scatters. The dots and empty circles are, respectively, A V /A LP and A I /A LP for the Milky Way Cepheids. The blue solid line, and the red dashed line are our results of linear fits on A V /A LP and A I /A LP vs. log P . While for the linear fitting we only used the data from the Cepheids in NGC 5584, and while only 28 of the MW Cepheids with period>12 days were used for our template light curve building, the fitted line passes also through the Milky Way Cepheids data points even for those with small periods. The linear correlation coefficient measured for both of these relations are ≈ 0.3. From the linear fitting we find A V /A LP = 1.167 + 0.073(log P − 1.5), σ f it = 0.014,  . We also show the MW Cepheids as filled dots and empty circles, for AV /ALP and AI /ALP , respectively. We note that while for the linear fitting only the results from the Cepheids in NGC 5584 were used, and while only 28 of the MW Cepheids with period>12 days were used for our template light curve building, the fitted line passes also through the Milky Way Cepheids data points. Table 2 of H16). The small scatter in this relation means that our amplitude ratio measurement is less noisy and is indicative of a high quality light curve modelling approach. We note that in H16 the light curves of different bands are fitted separately (using Yoachim et al. (2009) templates), and then the amplitudes resulting from the different fits are divided to yield the amplitude ratios. This could be the reason for the large scatter in their amplitude ratios. On the other hand, in our approach, all the light curves (of all bands) are fitted simultaneously, hence the amplitudes are not estimated independently from one another, leading to a lower scatter.

Uncertainties on the Wesenheit H Magnitudes
In their section 2.2, R16 describe a σ tot as the total uncertainty on their Cepheid distance measurements. They refer to the uncertainty of the crowding bias in the H band as σ sky and that of the optical observations as σ ct and they add them as a single value for all the Cepheids in a given galaxy. Since we apply the crowding bias (in all bands) for each Cepheid before the template fitting, the values of mean magnitudes already include the effect of crowding bias and their uncertainties. In addition, our template light curve fitting method analyses all the data together, therefore, the uncertainty on the H band mean magnitudes, already includes the effect of limited phase coverage.
Therefore, for the total uncertainty on W H we have where σ int is the intrinsic dispersion due to the nonzero width of the instability strip. To estimate σ int , we follow the procedure of Riess et al. (2019).  Table 3. For W H , the intrinsic dispersion is estimated to be σ int = 0.069 mag.

The Period-Luminosity Relations
In addition to the PL relation in W H , we also present PL relations for all the bands F350LP, F555W, F814W, F160W, as well as for optical Wesenheit index, W I in Figure 10. The latter is defined as W I = I − R I (V − I) with R I = 1.3 ). The uncertainties on individual Cepheids in this figure also includes the contribution from the σ int explained in the previous section 12 . We note that the data points in the PL relations shown in Figure 6 of H16 appear to contain only the measurement uncertainties which are comparable in size to this work's results as shown in our Figure 8. The solid lines represent the results of fitting a linear relation of the form m = α log P + β, where m is the mean magnitude. We fix the slope α to the values given in Table 3 of Riess et al. (2019) (which lists the PL relations from Soszynski et al. (2008), Macri et al. (2015), and R16), and fit for the intercept with a 3σ clipping. The slightly larger scatter in our PL relations compared to those found by SH0ES for NGC 5584 is most probably due to our different treatment of the crowding bias. As stated earlier in the text, SH0ES add a single value of crowding bias for all the Cepheids in a galaxy which shifts the PL relation slightly towards fainter values. However, we add the crowding bias values estimated at the location of each Cepheid separately which introduces a somewhat larger scatter in the PL relation 13 .

The Distance to NGC 5584
In this section, we derive the distance modulus of NGC 5584, based on apparent Wesenheit magnitudes  2019) while they mention no uncertainty on the intercept. Therefore, we assume a conservative uncertainty of 0.02 mag error also for the intercept (the intercept uncertainties in Macri et al. (2015) are much smaller than 0.02 mag). We then subtract the LMC distance modulus as measured by Pietrzyński et al. (2019). For both PL relations, the individual distance moduli obtained for each Cepheid are represented in Figure 11. The Galactic PL relation yields a weighted mean distance modulus of 31.810±0.047 mag, while the LMC calibration results in 31.639±0.038 mag. The 1σ confidence regions of these weighted mean values are also shown in Figure 11. The distance modulus from the Galactic PL relation is in agreement with µ = 31.786 ± 0.046 (mag) measured by SH0ES in R16. The distance modulus from the LMC PL relation, however, is smaller though still in agreement within 2.5σ with SH0ES result.
It is not surprising to obtain different distances based on LMC and MW PL relations, given that LMC has a smaller metallicity compared to the MW (Romaniello et al. 2008), i.e. the larger distance inferred from LMC PL relation is consistent with its smaller metallicity. The difference in terms of distance modulus obtained with MW and LMC PL relations highlights the need for a metallicity correction which has been extensively studied (see e.g. Pietrzyński et al. 2004;Gieren et al. 2018;Groenewegen 2018;Ripepi et al. 2019, and Breuval et al. 2021, though yet with no clear consensus. However, NGC 5584 is a spiral galaxy with a structure similar to that of MW and, in fact, its metallicity gradient is very similar to that of the MW (see table 6 of Balser et al. 2011, and (Riess 2019) between the direct and the early Universe measurements of H 0 asks for detailed investigations in the different methods involved. NGC 5584 played a key role in the direct measurement of H 0 from the Cepheid distance ladder by the SH0ES team ). Observations of this galaxy was employed to derive a relation between the ratio of pulsation amplitude of Cepheids in V and I bands relative to the wide F350LP HST band and the period. The F350LP band has been used by the SH0ES team for detection and light curve measurement of Cepheids in around half of the current SNIa host galaxies used for H 0 measurements and the relation mentioned above has been used to obtain mean V and I magnitudes from the spars sampling of Cepheid light curves in these bands.
In this contribution, we provided an independent and detailed analysis of the HST data from NGC 5584. Where possible, we intentionally used methods and tools different from those used by SH0ES. This allowed the investigation of possible influence of these methods on distance measurements. The key parts of our detailed analysis can be listed as follows: • applying PSF photometry routines of Photutils package of Astropy ( Figure 11. Distance modulus µ measured from WH vs. period for Cepheids in NGC 5584 using two PL relations from MW (red squares) and LMC (blue circles) Cepheids. The horizontal filled rectangles show the 1σ confidence regions for measured distances. The uniformly red and the blue crosseddiagonal hatched regions represent our measurements based on the MW and LMC PL relations, respectively, and are the weighted means of the µ values measured for individual identified Cepheids. The black back-diagonal hatched region represent the estimated distance reported by R16.
• testing and finding negligible influence of the choice of PSF modelling and background subtraction algorithms, • applying a different aperture correction procedure for the PSF photometry, • adopting a slightly modified approach for crowding bias estimation (using a sigma-clipping approach on the artificial stars flux measurement rather than directly removing bright estimated sources done by SH0ES), • a different approach for applying the crowding bias compared to SH0ES (applying the bias separately for each Cepheid rather than averaging over the whole galaxy for the optical observations), and • employing a completely different approach for Cepheid light curve modelling for measurement of mean magnitudes, amplitudes, and periods.
And our main results can be summarised as follows: • Our measurements of Cepheids' mean magnitudes and period and those of SH0ES are in good agreement. In particular, we find no systematic difference in our H band mean magnitudes and (V-I) color, both of which directly influence the distance measurements, compared to SH0ES.
• We derived a significantly tighter amplitude ratio vs. period relation compared to the one derived by SH0ES.
• We measure two distance moduli for NGC 5584 using two different PL relations calibrated in MW and LMC. The result from the former is in agreement with the value from SHOES within 1σ, and the result from the latter is 0.147 ± 0.060 mag smaller than that of SH0ES, though still within 2.5σ.
We do not attempt at reporting a value for H 0 based on the distance to only one SNIa host galaxy, and we only note that a smaller distance to NGC 5584 points towards a higher H 0 value. However, we consider the MW PL relation to be more appropriate for distance measurements to NGC 5584, due to similar metallicity and structure of these two galaxies. Nevertheless, the effect of metallicity and its measurement methods (Bresolin et al. 2009;Kudritzki et al. 2012) on extragalactic Cepheid distances requires further investigations. The main conclusion of the current study is that our inspection of NGC 5584 Cepheids does not yield any systematic hints towards the resolution of the H 0 problem. However, it would be important to also independently inspect for systematics in the distance measurements to all the galaxies used for calibration of SNeIa absolute magnitude. For doing so, and until reasonably finesampled time series data of all SNeIa calibrators become available, it would certainly be better to use our precise amplitude ratio vs. period relations for light curve analysis of Cepheids in SNeIa hosts with limited time series data as they would potentially yield more accurate mean magnitudes in V and I bands. This would also provide an investigation into the potential statistical effect of these relations in H 0 measurements.
While it is important to continue the investigations on the H 0 measurements, the current findings seems to be pointing towards a non-trivial solution to this problem. This could mean that our current understanding of the local or early Universe may require modifications or a complete change of paradigm. In the local Universe, presence of a large local underdensity (which is incompatible with LCDM, Haslbauer et al. 2020) has been presented (Shanks et al. 2019;Haslbauer et al. 2020) as a possible cause of the H 0 discrepancy (but see also Riess et al. 2018a andShanks et al. 2018). In the early Universe, various scenarios such as non-standard recombination, dark matter/dark energy interaction, and selfinteracting neutrinos have been presented, however, so far no consensus has been reached (for reviews and summaries see Verde et al. 2019;Poulin 2020;Knox 2020).
While it is important to seek alternative ideas on the theoretical side, the improvement of current observational methods as well as the development of new independent ones are necessary for a progress towards a solution to the H 0 problem. For the Cepheid distance ladder, the number of SNeIa calibrators observed by the HST is soon to be doubled by the SH0ES program , hence the statistical uncertainty on H 0 measured by this method would be reduced. In addition to strong lensing, megamasers, and TRGB methods (see also Beaton et al. 2016;Kim et al. 2020) mentioned in the Introduction, other Cepheid-independent routes would also soon contribute to H 0 measurements. Huang et al. (2020) presents Mira variables for calibration of SNeIa absolute magnitudes. Also, using the advanced LIGO and Virgo gravitational wave detectors, The LIGO & Virgo Collaborations et al. (2019) have reported an H 0 measurement using standard sirens (see also Coughlin et al. 2020). As the number of detected standard sirens increases in future, the currently large statistical uncertainty in their resulting H 0 measurement would decrease, making them an important independent way of measuring the cosmic expansion rate (Feeney et al. 2019).
One of the most promising contributions to the accuracy of the cosmic distance scale in the near future would be from Gaia. The impact of the first (see, e.g., Casertano et al. 2017;Gaia Collaboration et al. 2017) and second (see, e.g., Groenewegen 2018;Riess et al. 2018b;Clementini et al. 2019;Breuval et al. 2020;Ripepi et al. 2020) data releases of Gaia on the calibration of the Cepheid PL relation is already considerable. It is however still limited by the persistently uncertain value of the instrumental parallax zero point (see, e.g., Arenou et al. 2018;Khan et al. 2019). The early Gaia data release 3 (EDR3) published on 4 December 2020 (Gaia Collaboration et al. 2020) significantly improved the accuracy of the measured MW Cepheid parallaxes of MW Cepheids. A mitigation of the uncertainty due to the instrumental parallax zero point through an ad hoc position-, color-and magnitude-dependent calibration is also presented by Lindegren et al. (2020). As discussed by Riess et al. (2021) (see also Breuval et al. 2021, in prep.), this improvement brings the calibration of Cepheids luminosities to a 1% level, which makes them the most accurate distance indicators available to date. As the number of measurement epochs and the understanding of the Gaia instrument increase, the DR3 and DR4 will eventually provide trigonometric reliable parallax measurements at a few percent level or better for hundreds of Milky Way Cepheids. Combined with accurate photometry and extinction corrections from 3D extinction maps (see, e.g., Chen et al. 2019;Hottier et al. 2020), this set of absolutely calibrated distances will result in a very tight set of Cepheid PL relations, calibrated for the solar metallicity. Our Galaxy therefore appears as a particularly appealing alternative to the Magellanic Clouds as the primary anchor for extragalactic Cepheid distances, thanks to the similarity of its metallicity with those of distant SNeIa host galaxies. Relying on Milky Way Cepheids presents the advantage of reducing the possible bias introduced by the metallicity correction. This will effectively bypass the metallicity correction, thus increasing the overall robustness of the SNeIa calibration.
As also noted in Riess (2019), precise measurement of H 0 provides a powerful end-to-end test of the LCDM standard model of cosmology. Future observational progress and inspections such as the current study would eventually conclude whether the H 0 tension is caused by a measurement error, or it means that the LCDM should be abandoned as a correct model of the Universe.

ACKNOWLEDGMENTS
We thank the anonymous referee for the constructive comments. The research leading to these results has received funding from the European Research Council (ERC) under the European Union's Horizon 2020 research and innovation program under grant agreement No 695099 (project CepBin). WG and GP gratefully acknowledge financial support for this work from the BASAL Centro de Astrofisica y Tecnologias Afines ( Here, we compare aperture correction using the aperture photometry of the PSF model with the approach using aperture and PSF photometry of stars in the image. For this purpose we compare the PSF and aperture photometry of thirteen uncrowded stars using the stacked version of all the F555W band images. For these stars we crop a 50 pixel × 50 pixel portion of the image and perform the PSF photometry in the same way as described in Section 4.1.1. All the sources except from the central star are removed using the PSF modelling prior to the aperture photometry with an aperture radius of 10 pixels. The difference is then measured using Equation 2 and we find a mean value of AP cor = 0.056 ± 0.024 mag for the F555W band. It is 1σ larger than the value obtained using aperture photometry of the PSF model. We expect a similar result for F814W band. For the F160W band, the AP cor we measure using the PSF model, i.e. 0.049 mag, is also around 1σ smaller than the 0.06 ± 0.01 measured by Huang et al. (2020) for F160W images of the SNIa host NGC 1559. The difference of these two methods is most probably due to imperfect subtraction of the background noise in the actual images and the absence of this noise in the PSF model. Therefore, by noting that the difference in the F160W band is most relevant for distance measurement (Equation 1), measuring AP cor using aperture photometry of the PSF model rather than using uncrowded stars in the image leads to around 0.01 ± 0.01 mag decrease in the distance modulus.

B. CROWDING BIAS
In Section 4.2 we explained our method of estimating the crowding bias at the location of each Cepheid. Here we investigate the environmental dependence of crowding bias in the F555W band. Figure 12 shows the distribution of crowding bias across the galaxy (right panel), bias vs. the projected angular distance d cen in degrees from the center of the galaxy (left panel), and bias vs. local surface brightness, µ local (middle panel). The Cepheids that are most affected by the crowding bias are statistically closer to the centre of the galaxy where the stellar density is generally higher. However, small bias values can also be found at smaller d cen and we measure a correlation coefficient of r = −0.24 between the absolute value of the crowding bias and d cen . The small correlation is possibly due to spiral structure of NGC 5584, i.e. even at small galactocentric distances, there are less crowded regions.
We also check the crowding bias vs. µ local . The latter is measured using the following three step method: i) we first measure the average sky background using around twenty 40×40 pixel square regions outside the parts of the image covered by NGC 5584, ii) we then used the same size squares at the location of each Cepheid (where we already estimated crowding bias) and measured the total flux inside them, iii) in the end, the average sky background is subtracted from the local total fluxes and the result is converted to surface brightness using the angular area in arcsec and the magnitude zero point. We measure a correlation coefficient of r = −0.40 between the crowding bias and µ local . This relatively larger correlation implies that the local surface brightness is a better proxy to crowding bias compared to galactocentric distance. Using a second order polynomial fit we find Bias = −0.013µ 2 local + 0.61µ local − 7.4 (B1) with the standard deviation of the model minus data being σ f it = 0.066. This relation may be used to estimate the crowding bias in the F555W band from the local surface brightness instead of the artificial star injection approach. It may be useful to note that in the regions with µ local 23 mag/arcsec 2 , the effect of crowding bias is negligible. To compare our crowding bias measurements with those of H16, we also show the bias as a function of period in Figure 13. This figure can be directly compared to Figure 14 of H16. Our results is (within 1σ) in agreement with those of the H16. In particular, as can be seen in the lowest panel, the effect of the crowding bias on the V-I color measurement is very small. We remind the reader that unlike the approach of SH0ES (averaging over the galaxy for the optical observations), we apply the crowding bias estimated for individual Cepheids on their photometric results before the template fitting.

C. CEPHEID PROPERTIES
Our results for the photometric properties of the identified Cepheids in NGC 5584 are listed in Table 2.   Table 2 continued  Table 2 continued

D. DATA FILES OBTAINED FROM MAST
We list the information about all the data files we retrieved from the MAST database in Table 3.