NGC 5474 X-1: a neutron star ULX in an old stellar cluster?

We present the optical and X-ray study of the ultraluminous X-ray source (ULX) NGC 5474 X-1. The X-ray spectrum taken during the bright state of the source ($L_X \sim 2\times10^{40}$ egs/s) shows signatures of a broad absorption line at $\simeq 8$ keV which may be a cyclotron resonant scattering feature. This implies that this system may host a neutron star with a magnetic field $\sim 10^{12}$ G. The first observation of this area with the Hubble Space Telescope (HST) carried out 14 months later revealed that the source was bright in the optical range as well. The subsequent observations have shown that the source faded in both ranges (more than $2.8^m$ in the U band and by a factor of 50-100 in X-rays) and has never become bright again. Deeper HST observations made it possible to impose constraints on the donor star spectral class and mass ($<\,7$ M$_\odot$), as well as to identify a stellar cluster of about 1 Gyr, the centre of which is located at a projected distance of $\simeq 2$ pc from NGC 5474 X-1. The ULX can be a member of this old cluster, however, the presence of stars with ages of $\sim10$ Myr within 300 pc around the ULX does not completely exclude the possibility that it is just an accidental projection.


INTRODUCTION
Ultraluminous X-ray sources are defined as extragalactic, offnuclear, point-like objects with X-ray luminosity exceeding ∼ 2 × 10 39 erg/s, the Eddington luminosity for a typical black hole in the Milky Way (Fabrika et al. 2021;King et al. 2023).Modern catalogues of ULX candidates include about a thousand sources (Kovlakas et al. 2020;Walton et al. 2022;Tranin et al. 2023) and this number is still growing.Since the discovery, several scenarios were proposed to explain the nature of ULXs.Firstly, it was suggested that such objects could be accreting intermediate-mass black holes with masses 10 2 -10 5 M⊙ (Colbert & Mushotzky 1999).The alternative scenario proposed supercritical accretion onto stellar mass black holes (Fabrika & Mescheryakov 2001;King et al. 2001;Poutanen et al. 2007) or magnetized neutron stars (Mushtukov et al. 2015;Kawashima et al. 2016;King & Lasota 2016;Chashkina et al. 2019) to explain such high X-ray luminosities of the ULXs.Also, it was shown that young rotation-powered pulsars may theoretically reach sufficiently high luminosities (Perna & Stella 2004;Medvedev & Poutanen 2013).
It is now clear that at least part of ULXs are accreting neutron stars (NS-ULXs).Most of them were revealed by the detection of coherent pulsations of their X-ray fluxes (ultraluminous X-ray pulsars, hereafter ULXP, Bachetti et al. ⋆ E-mail: vinokurov@sao.ru2014; Fürst et al. 2016;Israel et al. 2017a,b;Carpano et al. 2018;Sathyaprakash et al. 2019;Rodríguez Castillo et al. 2020;Townsend et al. 2017;Chandra et al. 2020;Vasilopoulos et al. 2020;Quintin et al. 2021).However in the case of M51 ULX-8 the presence of a neutron star follows from the discovery of a cyclotron resonant scattering feature (CRSF) in its X-ray spectrum (Brightman et al. 2018), the absorption line that appears due to transitions of charged particles between Landau levels.The observed line energy ≈ 4.5 keV corresponds to the magnetic field strength of either 10 12 G or 10 15 G depending on electron or proton nature of the line (Brightman et al. 2018;Middleton et al. 2019).Despite such a strong magnetic field and high accretion rate, this source does not demonstrate pulsations.Nevertheless, M51 ULX-8 may still be analogue to ULXPs, with pulsations invisible for the Earth observer due to geometric factors (King & Lasota 2020).Also, a CRSF at ∼ 13 keV has been suspected in the confirmed ultraluminous pulsar NGC 300 ULX1 (Walton et al. 2018b) and at ≈ 8.5 keV in the hyperluminous source in the NGC 4045 galaxy (Brightman et al. 2022).
Besides the pulsations, ULXPs demonstrate hard spectra (with spectral index Γ ∼ 1, Pintore et al. 2017;Walton et al. 2018a) and very strong variability.For example, M82 X-2, NGC 7793 P13, and NGC 5907 X-1 show 'off' states in which their fluxes drop by factors of ∼ 100 (Motch et al. 2014;Walton et al. 2015;Brightman et al. 2016).It was proposed that such off-states may be caused by transitions into the propeller regime in which the magnetic field pressure begins to suppress accretion (Tsygankov et al. 2016).
In the optical range, ultraluminous X-ray sources have a wide variety of observational properties.The absolute magnitudes of the ULX optical counterparts lie in the range MV = −3 ÷ −8 (Tao et al. 2011;Vinokurov et al. 2018Vinokurov et al. , 2020a)).The most bright counterparts mainly have blue, power-law spectral energy distributions (SEDs), whereas the less bright sources show SEDs consistent with spectra of A-G class stars (Avdan et al. 2016(Avdan et al. , 2019)).This may suggest that the spectra of the brightest counterparts are fully dominated by optical emission of the supercritical accretion disc but as the disc contribution decreases, the donor emission becomes more prominent (Vinokurov et al. 2018).Most of the ULXs that are not strongly variable in X-rays show a modest variability in the optical range as well (within 0.2 mag in the V band, Tao et al. 2011).In contrast to them, the transient ULXs along with the confirmed ULXPs show the optical variability ≳ 1 mag in the visual bands which has been found to correlate with the X-ray flux in some cases (Soria et al. 2012;Motch et al. 2014;Villar et al. 2016;Vinokurov et al. 2020b).
The optical spectroscopy also gave many important results.It has been shown that there are powerful outflows in the ULX binary systems in a form of relatively slow winds (500-1600 km/s) which more likely come from the surface of the supercritical accretion disc (Fabrika et al. 2015).However, this outflows seem to differ from the ultrafast outflows discovered in X-rays (Pinto et al. 2016(Pinto et al. , 2017;;Kosec et al. 2018) in both the velocities and the outflow rates (Kostenkov et al. 2020).Another important result of the optical spectroscopy is the detection of spectral lines of donor stars.The first identified donor was the Wolf-Rayet star in M101 ULX-1 discovered by Liu et al. (2013).Then the signatures of a B9 Ia star (the Balmer jump together with the absorption lines of hydrogen, helium and some other elements) were found in the spectra of the ultraluminous pulsar NGC 7793 P13 (Motch et al. 2014).Currently, the most common type of ULX donors is a red supergiant (6 systems, Heida et al. 2015Heida et al. , 2016Heida et al. , 2019;;López et al. 2020).
Much of useful information can be obtained from the study of the ULX environment.Many of optically studied sources are surrounded by shock-ionized bubbles with sizes from a few to hundreds parsecs (Pakull & Mirioni 2003;Lehmann et al. 2005;Grisé et al. 2012).These bubbles are thought to be excited by the interaction of the ULX winds (and also may be in some cases jets) with surrounding gas, as well as by ionisation with X-ray and UV emission (Abolmasov et al. 2007).Many ULXs residing in star-forming galaxies are associated with compact stellar clusters or super-star clusters and should have a physical relation to them.Such a relation has been firmly proven by Poutanen et al. (2013) on the example of the ULX population of the galaxies NGC4038/NGC4039.Nevertheless, even in galaxies with high star-formation rate, there are ULXs that are located far from young stars, as, for example, the ULX in M83 (Soria et al. 2012).Moreover, it has been shown that in elliptical galaxies ULXs may even be inside globular clusters (Irwin et al. 2004).However, the luminosities of such old objects usually do not exceed 2-3×10 39 erg/s (Sarazin et al. 2000;Kim & Fabbiano 2010).
In this work, we report possible detection of a broad absorption line, which may be a CRSF, in the X-ray spectrum of NGC 5474 X-1.This source located in a dwarf spiral galaxy at 6.8 Mpc (Drozdovsky & Karachentsev 2000) was marked as ULX by Swartz et al. (2011) and studied by Avdan et al. (2016) who identified its possible optical counterpart.Our more careful analysis of the archival data revealed an optical outburst of the ULX which allowed us to refine the source position and to make the conclusion that the counterpart by Avdan et al. (2016) is actually the host (or background) stellar cluster of this ULX.Using additional Hubble Space Telescope (HST ) observations, we determined the age of the cluster and provided new constraints to the spectral class and the mass of the ULX donor star.The paper is organised as follows.In section 2 we describe available X-ray observations and present the spectra and the long-term light curve.Since the most accumulated spectrum is affected by pile-up, we involved Bayesian methods to choose between different spectral models.The section 3 is devoted to the optical data.Here we carried out the photometry of the ULX counterpart, the stellar cluster and their surrounding stars and then fitted the obtained spectral energy distributions (SEDs) with different models.In section 4 we discuss our results.

X-RAY DATA
In X-rays, the source was observed twice with the Chandra X-ray observatory and 20 times with the Neil Gehrels Swift observatory.The Chandra observations were carried out on 2006 September 10 (ObsID 7086, MJD = 53988) and 2007 December 3 (ObsID 9546, MJD = 54437); their exposure times are 1.7 ks and 30 ks, respectively.Both observations are taken in the 'faint' mode with the target placed at the nominal aimpoint on the S3 chip.The Swift observations of the NGC 5474 galaxy were taken between April 2011 and January 2023 but most of them fall on the autumn of 2012, a total exposure time is ≃ 25 ks.Our preliminary investigation of the data has shown that the source was at ULX luminosities only in the two Chandra observations.By the Swift epoch, it became much fainter and has never returned to the bright state (see Sec. 2.2).
The reduction of the Chandra data was done using the ciao 4.13 package with CALDB 4.9.6.We created new level-2 event files with the repro script following the standard procedure recommended by the Chandra X-ray Center.The Swift/XRT event files were reprocessed with the task xrtpipeline (version 0.13.5) of heasoft 6.28.A spectral analysis was performed with xspec 12.11.1 (Arnaud 1996).

Spectral analysis
We found that both Chandra observations of NGC 5474 X-1 are affected by the pile-up effect.Pile-up occurs when two or more photons fall in a single detector cell between two consecutive frame readouts (see "The Chandra ABC Guide to Pileup"1 , hereafter the pile-up guide).The detector cannot resolve such photons and records them as a single event of higher energy.This distorts an observed spectrum making it harder and also leads to underestimation of a source flux.This occurs, among other things, because some part of the piled events generates bad grades even if they are produced by valid Figure 1.Unfolded spectra from the Chandra/ACIS observation ObsID 9546 suffering from moderate pile-up.Left: the spectrum extracted from the annular aperture that excludes most of piled events, fitted by an absorbed power law with a Gaussian absorption line model.Right: the spectrum from a circular aperture fitted by an absorbed power law with (red) and without (blue) the Gaussian absorption component, convolved with the pileup model (solid lines).The same models with pile-up components disabled for illustrative purpose are shown by the dashed lines.Pile-up redistributes soft photons to higher energies which produces a sharp rise above 6 keV in the observed spectrum and hides the absorption line.Although the line is not visible directly, its presence is essential to fit the data (see text).The spectra were fitted with the Cash statistic and rebinned only for visual clarity.
X-ray photons (so-called 'grade migration').Such bad graded events are indistinguishable from true bad events produced by charged particles, so they are doomed to be filtered out at stages of the primary data reduction.The pile-up fraction depends on the count rate and may be high if the source is too bright for the chosen CCD readout speed.
To estimate the pile-up fraction in our observations, we used the ciao tool pileup map which converts the image to the units of the average number of counts per ACIS frame.We found that the brightest pixel of X-1 in ObsID 9546 has 0.46 counts/frame which corresponds to the pile-up fraction of ∼ 20% according to the blue curve in Fig. 3 of the pileup guide (for the grade migration parameter α = 0.5).The pile-up fraction of ObsID 7086 having 0.3 counts/frame in the brightest pixel is estimated as ∼ 10%.In both cases the pile-up may be considered as moderate.
There are two common approaches to deal with observations suffering from pile-up.First of all, one can exclude the core region of the PSF by using an annular aperture.This rejects most of piled events preventing the distortion of the spectrum but also significantly reduces the number of good events available for analysis.Alternatively, one can extract the spectrum from a full (circular) aperture and modify the fitting model by a special convolution model component to account for spectral distortions produced by pile-up.Such a convolution model for the Chandra CCD detectors is developed by Davis (2001).Below we tried both approaches.
For the longer observation ObsID 9546, using the specextract task, we extracted a spectrum from a circular aperture of 3 ′′ radius and a number of spectra from annular apertures with an outer radius of 3 ′′ and an inner radius varied from 1.0 ′′ to 2.0 ′′ .All the apertures were centred at the (same) position of the PSF centroid calculated with the dmstat tool in ds9.The background was extracted from a big annulus around X-1 free of other sources.Then all the spectra were grouped to have a minimum of 1 count per bin to use the C-statistic (Cash 1979).Events outside the energy range 0.3-10 keV were ignored.Fig. 1a shows the spectrum from the annular aperture with the inner radius 1.3 ′′ which gave the maximal signal-to-noise ratio with almost absent piled events.The spectrum demonstrates a deepening near 7 keV.We fitted this spectrum with the xspec model tbabs*gabs*powerlaw consisting of a Gaussian absorption line and a power-law continuum modified for interstellar absorption.The hydrogen column density of the absorption component was restricted to vary to be above the Galactic value 1.9 × 10 20 cm −2 estimated via the web tool Nh 2 based on HI4PI map (Ben Bekhti et al. 2016).The best-fitting model parameter are: the hydrogen column density NH ≈ 2 × 10 20 cm −2 , the power-law spectral index Γ = 1.05 ± 0.11, the line centroid energy LE ≈ 7 keV, the width Lσ ≈ 0.9 keV and the line strength Lst ≈ 2.8; the fit statistic is C = 127.3for 176 degrees of freedom (d.o.f).Due to low counting statistics of this spectrum it was possible to determine only the lower boundaries of the 1-σ confidence intervals for the line parameters: LE > 6 keV, Lσ > 0.4 keV and Lst > 0.8.
The spectrum from the circular aperture was fitted by the same model with the pileup component appended.The pileup model (Davis 2001) has a number of parameters two of which the user can leave free to vary: the grade migration parameter α and the PSF fraction F .The first one represents the probability for piled events to produce good grades and ranges from 0 to 1.The pile-up guide states that the preferred value of α is unknown, however, values near the extremes should be considered as unrealistic, and there are some observational hints on α ≳ 0.5.The second one is the fraction of accumulated events which will be treated by the pile-up model.Assuming that pile-up affects mainly the central 3 × 3 pix region of a PSF, Davis (2001) estimated F as about 95% for a point on-axis source.In our case, using the ecf calc tool, we found that the circumcircle of the 3 × 3 pix region gather ≈ 93% of total counts accu-  mulated by the 3 ′′ aperture.Therefore, we restricted F to be 0.9 or above.The parameters of the Gaussian absorption, power law and α were allowed to vary within their default ranges.Fitting the model to the spectrum from the circular aperture, we obtained C/d.o.f.= 534.6/509and the following parameters (1-σ errors): NH3 = 1.9 +0.6 −l × 10 20 cm −2 , Γ = 1.09 ± 0.07, LE = 7.3 +1.7 −0.5 keV, Lσ = 1.5 +0.6 −0.3 keV, Lst = 7.7 +6.6  −2.6 , α = 0.56 ± 0.25 and F = 0.91 +0.03 −l . Thus, both spectra, from the circle and from the annulus, give similar line parameters and power-law indices (Fig. 1).The parameters of the pile-up model also lie in the expected range.The unabsorbed source flux in the 0.3-10.0keV range measured using the cflux model corresponds to the luminosity (1.76 ± 0.18) × 10 40 erg s −1 (assuming the distance 6.8 Mpc, Drozdovsky & Karachentsev 2000).
In order to estimate the significance of the detected line, we refitted the spectrum without the gabs component.This yielded C/d.o.f = 595.7/512with similar Γ ≈ 1.2 but much different α ≈ 0.24 and F stopped at the limiting value 0.9.Then we repeated the analysis without restrictions for F .This improved the fit (583.1/512)but resulted in an unrealistic value of F ≈ 0.84 with α ≈ 0.13 and Γ ≈ 1.0.Thus, the addition of a Gaussian absorption to the power-law model improves the fit statistic by at least ∆C = 48.4 with only 3 d.o.f difference.This allows us to suspect high significance of the detected absorption feature, however, more stringent estimates will be obtained below, where we will employ a Bayesian approach.
The shorter observation ObsID 7086 with an exposure time ≈ 2 ks has no source counts above 5.7 keV.Therefore it was not possible to check for the presence of the absorption line in this observation.We fitted the spectrum extracted from a 2 ′′ circular aperture with the pileup*tbabs*cflux*powerlaw model just to measure the source luminosity.The obtained model parameters are NH < 4.7 × 10 20 cm −2 , Γ = 1.75 ± 0.25 and α ≈ 0.5 with C/d.o.f.= 100.40/110,and the 0.3-10.0keV luminosity is (7.2 ± 1.2) × 10 39 erg s −1 .The addition of the absorption feature with the same parameters as in the longer observation decreases the luminosity by 10%.
In the Swift observations, as was mentioned above, the source has become much fainter: only 27 counts were accumulated by the standard 30 ′′ source aperture during the total exposure time ≃ 25 ks, so we combined all the event files to obtain the average spectrum.The source spectrum and counts for the temporal analysis (see below) were extracted from a 30 ′′ aperture centred at the ULX coordinates.The background was taken from a large region of about 10 square arcmin area which was a combination of a half-annulus around NGC 5474 X-1 and a rectangular region south in order to not comprise bright sources norths of the ULX.Such a large region was chosen to diminish uncertainty of the background level for a subsequent temporal analysis.Fitting the spectrum with an absorbed power law model, we estimated the ULX unabsorbed luminosity as (1.7 ± 0.6) × 10 38 erg s −1 , which is 50-100 times lower than was in the Chandra observations.The power spectral index and the fit statistic are Γ = 1.7 +0.8 −0.3 and C/d.o.f.= 19.7/19.

Bayesian model comparison
It is known that standard approaches to model comparison like F-test or Likelihood-ratio test are inappropriate for feature-detection problems (Protassov et al. 2002).However, this task can be naturally solved in Bayesian framework.
To perform Bayesian calculations, we used the bxa package (Buchner et al. 2014) which adapts the numerical library UltraNest for xspec.The models were compared using the Bayes factors.For the observed data y and i-th model Mi with a parameter vector θi, the Bayes factor is Bij = Zi/Zj, where Zi = p(y|Mi) = p(y|θi)p(θi)dθi is called the evidence.The first term in the integral is the likelihood which is p(y|θi) = exp − 1 2 C(y, θi) in the case of the C-statistic; the second one is the prior distribution of the model parameters.Thus, the Bayes factors are similar to the likelihood ratios but they also take into account parameter uncertainties, while the likelihood ratios compare models only at their best fitting values.Therefore, the conclusion made based on Bayes factors does not depend on a particular set of parameter values.One more advantage of the Bayesian approach is that it includes a penalty for overcomplicated models with an excessive number of parameters.There is a convention to assume a Bayes factor of B12 ⩾ 10 (or log Z1 − log Z2 ⩾ 1.0) as a sufficiently strong reason to prefer the first model to the second (Jeffreys 1961;Buchner et al. 2014).
The Bayesian analysis was done for the ObsID 9546 spectrum.Besides the two models considered above (a power-law continuum with and without line) we also tested more complicated models: a cut-off power law, a multi-coloured disc blackbody (MCD) and a combination of power-law and multicoloured disc components, all with and without the absorption line and modified for pile-up and interstellar absorption.Non-informative priors were used for all free parameters; the log-uniform for the normalizations of the continuum components and the uniform distribution on some reasonable interval for the remaining parameters.The intervals were 0.1-12.0keV for the line position, 0.0-5.0keV for the line width and 0-3 for Γ.The NH and F parameters were restricted in the same way as described above.Using bxa, we obtained the posterior distributions of parameters and calculated the log-evidence for each model.
The results are shown in Table 1, where the models are listed in descending order of their log-evidence.Only three models should be considered as acceptable, all of them require an absorption line at LE ≈ 8 keV.The models with a power-law continuum and with a combination of powerlaw and disc blackbody continua are almost equally preferred (the disc component contributes about 10% to the total 0.3-10.0keV flux), the model with a cut-off power law is a little worse.These three models have shown different spectral indexes Γ (still consistent within uncertainties), but the line parameters are about the same.A completely different line energy LE ∼ 2 keV is demonstrated by the 'disc with line' model, but anyway, this model has to be rejected as well as the models without the absorption line.
In Fig. 3 we present the posterior distributions for the 'power law with line' model.It is seen that most of the parameters have a Gaussian-like distribution with a clear maximum which implies that the parameter has an unambiguous bestfitting value.The exception is the line strength whose distribution becomes approximately flat at Lst > 10 and also shows positive correlations with LE and Lσ (see 2D-distribution in Fig. 3).This is related to the fact that the line is located near the boundary of the Chandra spectral range, so, the more line's blue wing goes outside the range, the deeper and wider the line can be.Besides the posterior distributions, bxa also provides the point in the parameter space where the likelihood maximum is reached.The corresponding line parameters LE ≈ 7.3 keV, Lσ ≈ 1.5 keV and Lst ≈ 8 are very close to those obtained by the conventional fitting in the previous subsection.
As for the models without the absorption line, the best result with ∆ log Z ≈ −1.4 is demonstrated by the 'PL + Disc' model.However, its very steep power-law component with Γ ∼ 3 tries to fit the soft part of the spectrum.The restriction Γ ⩽ 2 in order to make it dominating at high energies significantly decreases the model evidence to ∆ log Z ≈ −2.5.It is interesting that the models without the absorption feature included have nevertheless attempted to reproduce it by placing either the Wien tail of the disc blackbody or the exponential cut-off of cutoffpl at the corresponding energy.So, the pure power-law model, which is completely unable to reproduce any local decline, has shown the worst result.This may be considered as an additional argument in favour of that the absorption feature really exists.

Long-term variability
Using the flux estimates obtained from the spectral fits (Sec.2.1) we have constructed the light curve of NGC 5474 X-1.To measure the net ('background sub- tracted') count rate in the Swift data, we employed the Bayesian approach proposed by Loredo (1992).Due to the faintness of the source and the shortness of the Swift observations, the individual Swift data sets have accumulated only 2-3 counts in the source aperture or even less, so the direct subtraction of the background level may yield wrong negative values of the net count rate.The Bayesian approach dealing directly with probability distributions helps to avoid this problem.Thus, the posterior distributions of the net count rates were calculated using eq.( 12.18) from Loredo (1992) which describes the case of Poisson distributed data with (a priori) unknown background, where we took into account that the source and background measurements have the same exposure time (being obtained from the same images) but different aperture sizes.The results are presented in Fig. 2 and Table 2, where we list our estimates of the net count rate in the form of the modes of its posterior distributions and together with the narrowest 68.3% credible intervals.The measured count rates were converted to fluxes using a factor of 5.03 × 10 −11 erg s −1 cm −2 per 1 cnt/s obtained from the spectroscopy.It is seen in the light curve (Fig. 2) that when the source was observed for the first time in 2006 it had a luminosity of ∼ 7 × 10 39 erg s −1 .A year later it was caught at the state about twice brighter.Then, after a break of 3.5 years, Swift alpha = 0.55 +0.20 0.16 0 .9 2 0 .9 4 0 .9 6 0 .9 8 found the source to be just above its detection threshold.
Although the ULX shows some variability in the Swift data, its luminosity has never exceeded a few times 10 38 erg s −1 again4 .Moreover, this value should be considered only as an upper limit because the Swift data are contaminated by a nearby source (more likely a background AGN, see Sec. 3.1), which is located 5.2 ′′ away from NGC 5474 X-1 and cannot be resolved by Swift.We have fitted its spectrum from the longer Chandra observation and obtained Γ = 1.7 ± 0.5 with the unabsorbed flux ≈ 1.6×10 −14 erg s −1 cm −2 (corresponding to 7.5×10 37 erg s −1 being brought to the distance of NGC 5474).This is only twice as low as the mean flux measured by Swift, so if the AGN is variable, the observed flux in the Swift data, in principle, can be totally provided by it.Even so, most of the photons seem to concentrate closer to the ULX position.
Also, we have searched the longest Chandra observation for pulsations.Using the Python package stingray 1.1.2.4 (Huppenkothen et al. 2019a;Huppenkothen et al. 2019b;Bachetti et al. 2023) for the timing analysis, we calculated Z 2 1 and Z 2 2 statistics for periods from 1000 s to T /N ph ≈ 5.6 s where T is the observation duration and N ph is the number of accumulated photons (the frequency resolution was ∆f = 1/T ≈ 3.3 × 10 −5 Hz).In both cases we have found no evidences for pulsation.Additionally, we estimated the 3σ upper limit on the pulsed fraction 5 of potentially present periodic signal -we obtained 21% for the highest peak in the Z 2 1 spectrum.

OPTICAL DATA
A possible optical counterpart of NGC 5474 X-1 was identified in our previous work (Avdan et al. 2016) using images from the HST and Chandra.In that paper, to obtain shifts between optical and X-ray images, we involved 6 reference sources clearly seen in both bands.As a result, it became possible to reach a very high accuracy of the X-1 position in the HST images (0.16"), which allowed us to unequivocally select a single object.The source was weak (mV ≃ 24.7), its (V − I)0 colour corresponded to a cold F-G type star.However, the source turned out to be slightly extended, about twice larger than surrounding stars, and that became a surprise to us.While in the paper Avdan et al. (2016) we checked only two images (ACS/WFC/F606W and ACS/WFC/F814W), in the current work we analyse all the available HST observations of the region around NGC 5474 X-1.It was observed 5 Defined as 2a/(m + a) for the signal with the HST once using the Wide Field and Planetary Camera 2 (WFPC2), once with the Wide Field Channel of the Advanced Camera for Surveys (ACS/WFC), and three times with the UVIS channel of the Wide Field Camera 3 (WFC3/UVIS).The log of the HST observations is listed in Table 3.Since the object is located in a relatively crowded region (neighbouring more bright stars are only about 0.4-0.5 ′′ away from the ULX counterpart), the data from groundbased telescopes cannot be used.
In the oldest observation taken with WFPC2 in the F336W filter on 2009 February 9 (MJD = 54871), we discovered a bright point source inside the 0.16 ′′ error circle.The source is clearly seen in each of four sub-exposures obtained during this observation, but it disappeared in the following HST observations.Comparing images from the WFPC2 and ACS, we have revealed that the point source overlays with the extended object found by Avdan et al. (2016), but their centres do not coincide (at the confidence level of 2σ); the point source is located on the wing of the extended one.The results of the relative astrometry between the WFPC2 and ACS or WFC3 data is presented in Fig. 4 where we show four HST images with marked positions of the point source and the 0.16 ′′ circle from Avdan et al. (2016).To apply astrometric corrections we used 3-4 bright isolated reference stars around the object.After accounting for possible shifts, rotation and scaling, the derived standard deviation of the difference between the measured and calculated positions of reference stars became less than 0.3 pixel (∼ 0.01 ′′ ) for all the WFC3 images and less than 0.2 pixel (also ∼ 0.01 ′′ ) for the ACS images.The resultant uncertainty of the point source position is about 0.05 ′′ at 90% confidence level, where the main part of this quantity is contributed by the error of the source position on the WFPC2 image (the source is located on the WF4 chip having angular resolution of about 0.18 ′′ and detected with a signal-to-noise  ratio ≈ 9).Thus, we can suppose that it is the point source that is the true counterpart of NGC 5474 X-1 caught during its optical outburst, while the extended source is more likely an old stellar cluster (see Sec. 3.1).This idea is also supported by the fact that the HST data set, where the point source is clearly seen in the visual band, is the closest to the Chandra observation in which X-1 was bright in X-rays.Therefore, hereafter saying 'the optical counterpart', we will mean the discovered point source.
To measure the brightness of the NGC 5474 X-1 optical counterpart in the oldest observation, we performed a pointspread function (PSF) photometry.We analysed the c0f images using hstphot v1.1, which outputs VEGA magnitudes in an infinite aperture corrected for the charge transfer efficiency (CTE).The reddening correction was done in the synphot package using the extinction value AV = 0.03, estimated from the observed Balmer decrement of the nebula surrounding the object (see Avdan et al. 2016 for more details).
For the second observation carried out on the same date with the narrow-band filter WFPC2/F656N, we obtained only an upper 3σ limit to the source magnitude.The results are given in Table 3.
For the other observations where the counterpart did not stand out over the extended object, we estimated upper limits to its magnitudes performing an aperture photometry with a very small aperture size to decrease contamination from the extended object.The photometry was performed on the drizzled, CTE-corrected (drc) images using the apphot package in iraf.The apertures were centred at the astrometrically corrected positions of the X-1 counterpart in each image; their size was 1.5 pix.To determine corresponding aperture corrections we used from three to eleven bright isolated stars.The background was measured in a concentric annulus around the objects.The annulus for the WFC3 data was chosen to have an inner radius of 12.5 pixels (0.5 ′′ ) and an outer radius of 25 pixels (1.0 ′′ ); for the ACS data, the region had an inner radius of 10 pixels (0.5 ′′ ) and an outer radius of 20 pixels (1.0 ′′ ).The results are summarised in Table 3 and Fig. 5.If the measured flux corrected to the infinite aperture appeared to be less than the 3σ detection threshold in a particular observation, we provided in the table the 3σ value as an upper limit to the object brightness.We note that the measurements in the most far UV filter F218W gave very high upper limits, significantly higher than the other broadband filters gave.We do not use the flux upper limits from this filter in the subsequent analysis because they are unable to provide any additional constraints that would help to clarify the nature of the source.
It is seen (Fig. 5) that NGC 5474 X-1 is a highly variable source in the optical range, as well: the F336W filter flux has changed by a factor more than 13 between the observations obtained on two different dates.Since the observations of the remaining dates were conducted with a different filter set (Table 3), we converted the WFPC2/F336W, WFC3/F438W, WFC3/F547M and ACS/F606W magnitudes to the Johnson B band using synphot, in order to be able to construct the source light curve.The B band was chosen because it is intermediate for our set of filters, which allowed us to diminish extrapolation errors.To perform such a conversion one needs to know the shape of the spectrum.For observations of the bright state of the counterpart, we approximated fluxes in the F336W and F656N filters by a power law F λ ∝ λ α , where λ is the pivot wavelength of a filter, and obtained α ≃ −0.1.However, since we have only the upper limit to the F656N flux (Table 3), the derived value of α should be considered as the upper boundary of the possible spectral slopes; the true spectrum could be steeper.Thus, Tao et al. (2011) have found that most ULXs have power-law optical spectra with spectral indices of −3÷−4.Therefore, for the lower boundary, we chose α = −4 (Rayleigh-Jeans law).Depending on the spectral slope, extrapolation of the WFPC2/F336W flux to the B band yields the range of magnitudes mB = [24.73, 23.63].
The F438W filter is close to the B band, so for this filter we obtained that the converted magnitude weakly depends on the chosen slope varying within 0.1 mag.When converting the upper limits from the F547M and F606W filters, we used the Rayleigh-Jeans law to get the most conservative estimates of mB.The magnitudes converted to the B band are also shown in Table 3 and in the light curve in Fig. 2. Also, we have tested the images for possible instrumental variation.To do this, we selected five test stars and obtained their B magnitudes by the same way as we did it for the X-1 counterpart.The spectral slope of each star was determined individually from photometry.In all the cases variations of fluxes of the test stars can be considered as negligible.
It can be assumed that the optical radiation of the ULX in the low luminosity state comes mainly from the donor star since the star must be a much more persistent source than the accretion disc which produces its optical radiation by reprocessing of X-rays (Vinokurov et al. 2013).Therefore, it should be possible to constrain the donor parameters by fitting the observed spectral energy distribution (SED) of the low state with stellar models.We used the ATLAS9 Kurucz models (Castelli & Kurucz 2003) with metallicity [M/H]= −0.5 that approximately corresponds to the metallicity of the galaxy (z = 0.004, Sabbi et al. 2018).The luminosity classes were restricted to satisfy the absolute magnitudes MV > −3.6 derived from the observed F547M magnitude with assuming the distance to be 6.8 Mpc.The absolute magnitudes for different classes of stars were taken from Straizys & Kuriliene (1981).As a result, we found possible spectral classes of the donor star: it can be a main sequence star starting from the B3 class and colder, a star of the III or IV luminosity class from B5 and colder, or a bright giant (II class) from A2 to M0 (Fig. 5).This range of possible classes is not narrow because we have only upper limits to the optical flux in the low luminosity state, but, nevertheless, this analysis has confidently shown that the donor mass must be less than 7M⊙.

The nature of the extended object around the ULX
The centre of the extended object is offset from the ULX position by about 0.06 ′′ .The object is asymmetric, its FWHM size is about 0.23 ′′ × 0.16 ′′ and slightly decreases from the WFC3/F438W to ACS/F606W and F814W images (surrounding stars have sizes of 0.08 ′′ and 0.10 ′′ in the WFC3 and ACS images, respectively).This corresponds to a linear size of approximately 7×5 pc at the galaxy distance 6.8 Mpc.
In the other filters, the object is much fainter or completely invisible which makes it impossible to investigate its structure.
Although above we referred to the extended source as a stellar cluster possible hosting the ULX, actually it could also be a nebula or a background galaxy.The presence of four galaxies in the area around the ULX (see the colour HST image, Fig. 6) prompted us to check the nature of the object more carefully.Some of these galaxies (at least G1 and G4 in Fig. 6) look distorted by tidal forces, which suggests that all these galaxies may belong to a single group.The galaxy nearest to X-1 designated as G1 was studied by Avdan et al. (2016).The authors have identified in its optical spectrum the [O II] λ3727 emission line, absorption lines Fe i λλ3734,3746, Ca ii K and Balmer lines from H11 to Hδ; this allowed them to measure the redshift z = 0.359.
The bright nucleus-like source in the centre of the G2 galaxy well coincides with the X-ray source that considered in Sec. 2 as a possible AGN.The remaining residuals between the positions of this X-ray source and the G2 nucleus after applying astrometric corrections does not exceed 0.12 ′′ , which is within the uncertainty of the source position in the Chandra image.For the distance z=0.359, the X-ray flux from this source corresponds to a typical AGN luminosity of 6 × 10 42 egs/s.The derived X-ray to optical flux ratio is also quite normal for AGN, we found log (FX /FV ) = 0.446 while usually observed values are in the range from -1 to 1.7 (Maccacaro et al. 1988;Aird et al. 2010).
To clarify the nature of the extended object, we performed surface photometry with the apphot package on those WFC3 and ACS drc images where the X-1 optical counterpart was not in outburst.We used a circular aperture of 0.175 ′′ radius (4.4 and 3.5 pixels for the WFC3 and ACS images, respectively) in order to avoid contamination from the nearest relatively faint star at a distance of 0.3 ′′ .Since the object is extremely weak in some filters, it was decided to center the aperture by coordinates applying astrometric corrections to each image.The original object coordinates were obtained from the F606W image where the source was detected with the highest signal-to-noise ratio (S/N ≃ 25); corrections for other images with respect to the F606W were determined using three bright isolated stars.Since the studied object resides in a quite crowded field, significant variations of the background level can take place.So, to take into account additional uncertainties related to the background subtraction procedure, we have measured the background from three concentric annuli around the object (for the images with relatively good S/N: F438W, F547M, F606W and F814W) with an inner and an outer radii of 0.24 ′′ and 0.5 ′′ , 0.5 ′′ and 1.0 ′′ , 1.0 ′′ and 1.5 ′′ , respectively.The differences between the background levels in these annuli appeared to be minor, they were included into the final errors of the measured magnitudes.For the F336W and F657N images with worse S/N ∼ 4, we used only the largest annulus.For the F275W and F218W images where the source is not visible, we estimated a 3σ threshold for the source magnitude in the 0.175 ′′ aperture.The result- . HST colour image of the X-1 region (blue: WFC3/F336W; green: WFC3/F438W; red: ACS/F606W).Two squares of 8 ′′ and the square of 3 ′′ delineate the C1 and C2 groups of young stars and the stars closest to X-1, respectively.Background galaxies at z=0.356 are denoted by G1, G2, G3 and G4 (see text for details).North is up.ing magnitudes corrected for the reddening (AV = 0.03) with synphot are presented in Table 4.
The source shows a SED (Fig. 7) with a strong rollover below 4000 Å.The absence of an excess in the F657N filter whose range covers the Hα λ6563 and [N ii] λλ6548, 6583 lines, rules out a nebula as a possible explanation of the source nature.In order to choose between galaxy and star cluster, we have fitted the source SED with the magphys (Multi-wavelength Analysis of Galaxy Physical Properties, da Cunha et al. 2008), the LePhare (Arnouts et al. 1999;Ilbert et al. 2006) and the starburst99 (Leitherer et al. 1999;Vázquez & Leitherer 2005) codes.
The magphys code constructs spectra of galaxies in a wide range of wavelengths using stellar population synthesis models combined with self-consistent models of the dust emission, dust absorption, and the PAH (polycyclic aromatic hydrocarbons) emission.It forms a grid of synthetic models for each The best-fitting model spectrum of a 1.0 Gyr age cluster is shown in black, while the spectra for the ages of 0.8, 0.9 and 1.1 Gyr in grey.
observed SED and fit them to the data, which allows to reproduce spectral distributions of many types of galaxies (e.g. Brown et al. 2014).Unfortunately, magphys does not include nebular emission lines, however, we have found that the flux in the F657N filter indicates the absence of emission lines.We involved only wide-band filters in our analysis.The magphys contains a large library of throughput curves of filters of various telescopes, including all the wide-band filters used in this work excepting WFC3/UVIS/F438W.Therefore, we converted the flux in this filter into the available band ACS/WFC/F435W.Since the difference between the throughputs of these two filters is not very large, the recalculated flux has changed very little and practically does not depend on the particular value of spectral slope used to perform the conversion.Also, magphys requires to assign a redshift to fit the data.We assumed that the object may have the same redshift z = 0.359 as the galaxy studied by Avdan et al. (2016).
The obtained agreement between the observed SED and the best fitting model produced by magphys for the adopted redshift appeared to be very poor (Fig. 7).The model follows the measured fluxes only in two red filters, while the fluxes in the remaining three filters and the rollover below 4000 Å cannot be reproduced.The achieved fit statistic is χ 2 = 27 for five data points and five main model parameters.This gives a formal number of degrees of freedom equalled to zero which does not allow to use the reduced χ 2 as a goodness-of-fit test.However, it has been shown (Andrae, Schulze-Hartung & Melchior 2010) that the number of degrees of freedom is not strictly defined for complicated nonlinear models: it always lies in the range from 0 to N-1 (where N is the number of data points) and may change during the fitting procedure.So, even in the case of 4 degrees, the obtained χ 2 value corresponds to the p-value of ≈ 2 × 10 −6 which completely rejects the model.As one of the possible alternatives to the reduced χ 2 , Andrae et al. (2010) propose to perform a Kolmogorov-Smirnov (KS) test to assess the goodness of fit, since the normalised residuals '(data-model)/error' have to follow the normal distribution with zero mean and unity variance if the model is true.We performed this test and obtained the value of a KS-statistics of 0.55 which corresponds to the p-value of 0.058.
LePhare has been developed for measuring the redshifts of objects of unknown nature by fitting spectra of galaxies, quasars, stars, etc. to the observed SED.Besides the models, the code also contains a large number of observed spectra of galaxies and active galactic nuclei.Using LePhare we found that our SED (five wide-band filters) could be well fitted by the model of either an active galaxy at z = 2.68 (the code did not provide the error for this model) or a non-active galaxy at z= 2.56 ± 0.08; the fit statistics are χ 2 = 1.92 and 2.86, respectively.These models interpreted the rollover between the F336W and F438W filters as the Lyman break.For these models we also calculated the KS-statistics, the obtained pvalues are 0.31 and 0.97.Such a relatively bad p-value in combination with a low χ 2 in the case of the AGN model seemingly indicates significant overfitting.
To check whether the extended object can be a stellar cluster, we used starburst99.For chosen evolution tracks, this code produces model spectra of continuum emission of a stellar cluster as functions of the cluster age and metallicity (the total mass of the member stars is considered only as a normalisation constant and fixed at 10 6 M⊙, by default).We employed the Padova tracks with AGB (asymptotic giant branch) for the metallicity Z = 0.004 (Sabbi et al. 2018).The initial mass function (IMF) was specified by a Kroupa law with the indices 1.3 for stars of 0.1-0.5 M⊙ and 2.3 for 0.5-100 M⊙.We computed a grid of models for cluster ages ranging from 1 Myr to 2 Gyr with a step 10 Myr.Then, convolving each model with the filters throughputs and tuning the normalisation, we calculated both the χ 2 and the KS statistics.We found that the best agreement has been reached by the model with an age of 1.0 +0.15 −0.25 Gyr (1σ errors) and a total stellar mass ∼ 3000 M⊙.The age is mainly constrained by the appearing of the Balmer jump in spectra of old clusters which well fits the observed rollover below 4000 Å.The χ 2 statistics is 4.3 for five filters and two free model parameters; the p-value of the KS-statistics is 0.98.The best-fitting model spectrum of a 1.0 Gyr age cluster (black curve) and spectra for ages of 0.8, 0.9 and 1.1 Gyr (gray curves) are shown in the lower panel of Fig. 7.
starburst99 assumes that the individual properties of the member stars have to be smeared out due to a large number of members and, therefore, the spectral shape does not depend on the total mass.It could be not true for our relatively small cluster.So we decided to conduct an additional test using web-based software cmd7 v3.3 (Bressan et al. 2012) which simulates a randomised stellar population of a certain age and a certain number of members for the chosen IMF.
Besides the parameters of each simulated star, the code can also provide isochrones and photometry in filters of the most popular photometric systems including the HST/ACS and HST/WFC3.Since the population is randomised, the outputs slightly change from one run to another.We used the same canonical two-part power-law IMF as for starburst99 and the stellar mass fixed at 3000 M⊙.Since the outputs include magnitudes separately for each star, we converted all the magnitudes to fluxes and summed them to obtain the total spectrum of the cluster.Eventually, cmd gave a slightly wider spread of acceptable ages than starburst99, from 0.5 to 1.2 Gyr.
So we obtained that the modelling is unable to draw a clear conclusion about the nature of the extended object.Both models: an old cluster of 1.0 Gyr age and a distant galaxy with redshift z ≈ 2.6 provide similar quality of the fit.However, the latter interpretation implies that the studied ULX and the background galaxy have coincided by chance.A probability of such a coincidence can be estimated using the Hubble Ultra Deep Field catalogue (UDF catalogue, Rafelski et al. 2015).We have counted about 1000 galaxies in the catalogue with redshifts z = 2.3 ÷ 2.8 (the 3σ confidence interval of the redshift measured with LePhare) per the ACS field of view of 11.4 square arcmin.But only two of them have fluxes in the F606W filter equal (within 3σ errors) to that we obtained for the extended source and 9 galaxies have fluxes equal or greater.The resulting probability that the centre of such a galaxy falls within 0.06 ′′ circle around the ULX is 5 × 10 −7 or 2 × 10 −6 (for two and nine galaxies respectively), and it will become even less if one takes into account other parameters like the flux in the remaining filters and the colour of the extended source.Thus it is very unlikely that the extended source is a background galaxy; nevertheless, one needs additional observations to make an unequivocal conclusion.If the source is really a galaxy at z ≈ 2.6 then one should expect the Balmer jump near 13000 Å which can be revealed by infrared observation in the filters WFC/IR/F110W and F160W.
In summary, the stellar cluster model fits the observed SED much better than the model of a galaxy with z ≃ 0.36 and comparable with the models of a distant galaxy or an AGN with z ≃ 2.6.Accounting for the additional circumstances makes the galaxy interpretation doubtful.The rollover below 4000 Å in the observed SED is naturally reproduced by the Balmer jump in the spectrum of an old stellar cluster.The derived total stellar mass and the observed size of about 5 pc do not contradict typical parameters of well-studied low-mass stellar clusters of a few Gyr age residing in our Galaxy (Angelo et al. 2019).Thus, we can conclude that the extended object, which practically coincides with the position of the optical counterpart of NGC 5474 X-1, is most likely a stellar cluster, whose age is at least several hundred million years.

Young stars around NGC 5474 X-1
NGC 5474 X-1 is surrounded by many groups of young stars.Two the nearest big groups denoted as C1 and C2 in the HST colour image (Fig. 6) are located at distances ≃ 200 and ≃ 300 pc (about 6 ′′ and 10 ′′ ) from X-1, respectively.A small area around X-1 (3 ′′ square in Fig. 6) also contains some relatively bright blue stars, it is possible that they belong to one of the neighbouring groups.
To determine the ages of the stars in these groups we constructed colour-magnitude diagrams (CMDs).All the stars located within the squares (8 ′′ and 3 ′′ , Fig. 6) were assumed to belong to the corresponding group.The magnitudes of the stars were calculated using the PSF photometry, which was carried out on calibrated flt-images with the dolphot 2.0 software (Dolphin 2000) for WFC3.We employed only the data in blue filters (F336W, F438W and F547M), where the majority of old background stars like red giants are not seen.All the necessary tasks (wfc3mask, splitgroups, calcsky and wfc3fitdistort) were completed, and the parameters recommended in the user's guide were used to run the dolphot.The magnitudes were derived in the VEGAmag system.Theoretical isochrones for the NGC 5474 metallicity Z = 0.004 based on parsec v1.2S (Padova and Trieste Stellar Evolution Code, Bressan et al. 2012) were calculated with cmd 3.3 (Girardi et al. 2010) and the extinction AV = 0.03 (Avdan et al. 2016) was overlaid on them.
The resultant CMDs, F438W versus F336W-F438W and F547M versus F438W-F547M, are given in Fig. 8.It is seen that most of the stars concentrate to the upper isochrone, it is seen especially well in the left panel of the figure, F336W versus F438W-F336W.Thus, we can conclude that the youngest stars in these groups are as young as 10 Myr.

DISCUSSION
Above we have explored the observational properties of NGC 5474 X-1.This source demonstrated high variability with a peak X-ray luminosity ≃ 1.8 × 10 40 erg/s and a very hard spectrum with Γ ≈ 1.05 in the brightest state.Also, we have re-identified the optical counterpart of this ULX and found that it may be located inside a stellar cluster of about a billion years old (the lower age limit is 0.5 Gyr).Using results of the optical photometry, we applied some constraint on the donor star spectral class and have shown that its mass has to be less than 7 M⊙.
The most interesting result is the detection of signs of a rolloff at high energies, which is best described by a Gaussian absorption line with a centroid energy Ec ≈ 8.0 keV and a width σ ≃ 1.7 keV.We have shown that despite this line is not seen directly due to pile-up, it is still required to fit the data.Absorption lines of similar relative widths σ/Ec ∼ 0.2 are observed in some X-ray pulsars in Milky Way and Magellanic Clouds and thought to be cyclotron resonant scattering features produced by transitions of electrons between quantized Landau levels in strong magnetic fields in the vicinity of neutron stars (Heindl et al. 2004;Staubert et al. 2019).The centroid energy of a CRSF is directly proportional to the magnetic field strength Ec ≈ 11.6(1 + z) −1 (B/10 12 G) keV, where the gravitational redshift z is about 0.25 if the emission comes from the neutron star surface.So, the energy Ec ∼ 10 keV should correspond to the field strength of ∼ 10 12 G in the region of the line formation.
In the case of ULXs, the cyclotron features have been suspected in three sources: NGC 300 ULX1 (Walton et al. 2018b), M51 ULX-8 (Brightman et al. 2018) and NGC 4045 ULX (Brightman et al. 2022).However, the latter two sources have the relative line widths much smaller than it is observed in the Galactic pulsars.Thus, for M51 ULX-8, Brightman et al. (2018) obtained σ/Ec ∼ 0.02 with Ec ≈ 4.5 keV and interpreted this line as a CRSF produced by proton transitions.Protons being more massive than electrons have lower thermal velocities, but the proton nature of the line also implies three orders of magnitude stronger magnetic fields for the same Ec.On the other hand, Middleton et al. ( 2019) using a more sophisticated spectral analysis method have shown that the wider absorption feature with σ/Ec ≃ 0.2 still cannot be completely ruled out.In the spectrum of NGC 4045 ULX, an absorption line of σ ∼ 0.1 keV is seen at ≈ 8.6 keV (Brightman et al. 2022).Because of the high luminosity of the source LX > 10 41 erg/s, the authors preferred the idea that the absorption feature has an atomic nature (produced by high-level ions of iron blueshifted by ∼ 0.25c), but a proton CRSF is also considered as possible.
It is important to note that the detected absorption lines in all the three ULXs does not show any harmonics, whose presence would clearly prove the CRSF nature of those lines.
The relative line width obtained by us more closely matches that of NGC 300 ULX1.Walton et al. (2018b), fitting the cut-off power-law model often used to describe the spectra of pulsar accretion columns to the combined Chandra+NuStar spectrum (0.3-30 keV) of the pulsed emission of this ULXP, obtained residuals indicating the presence of a highly significant absorption line with Ec ≃ 13 keV and σ ≃ 3 keV.Koliopanos et al. (2019) have confirmed this result for the same cut-off power-law model, but they also tried another physically motivated model of continuum, 'a power law plus two multicolour disc components', for which the addition of the Gaussian absorption line at high energies did not give an improvement of the fit.The latter model, may be more relevant to ULXPs, is based on the assumption that the accretion flow moving along magnetic field lines being captured by magnetic field at the magnetosphere radius Rm has to form an optically thick envelope (so-called 'accretion curtain', Mushtukov et al. 2017Mushtukov et al. , 2019) ) at accretion rates typical of ULXs; the accretion column seen in regular pulsars is thought to be hidden from an observer by this envelope in this case.Thus, the first more cold diskbb component in the composite model tested by Koliopanos et al. (2019) represented the accretion disc truncated at Rm, the second diskbb was used as a surrogate for the multicolour accretion curtain inside Rm, for which there is no specific spectral model in xspec, and the power law (dominating above 15 keV) described the spectrum of the photons Comptonized in the envelope matter.Koliopanos et al. (2019) have shown that the accretion curtain model is statistically more preferable to the accretion column model, and it does not require the absorption line to describe the NGC 300 ULX1 spectrum.In our paper, we did not try such a complicated model 8 since we have only the Chandra data, which is limited to 10 keV and affected by pile-up, therefore we cannot be completely sure whether the line is really required for our data.
The presence of a CRSF in the NGC 5474 X-1 spectrum implies that the accretor in this ULX must be a highly magnetised neutron star.We have not detected pulsation in the Chandra data whose temporal resolution is limited to 3.2 s, so this source can potentially be a ULXP with a shorter pulsation period.Actually, the longer periods of tens of seconds (as it is observed in NGC 300 ULX1, Carpano et al. 2018) also cannot be excluded yet because even the confirmed ULXPs show pulsations only episodically (Bachetti et al. 2014(Bachetti et al. , 2020)).Alternatively, the object might be a 'nonpulsing pulsar' where pulsations are invisible for the observer due to, for example, mutual orientation of the magnetic axis, the rotational axis and the line of sight (King & Lasota 2020).This scenario is possibly realised in M51 ULX-8 (Brightman et al. 2018;Middleton et al. 2019) which has a strong magnetic field but does not display pulsations.
The indirect signs like the observed high variability amplitude and hard X-ray spectrum also argue in favour of the NS nature of NGC 5474 X-1.It is known that the most hard spectra among ULXs belong to ultraluminous pulsars (Pintore et al. 2017).Thus, M82 X-2 shows the spectral index Γ ≲ 1.3 at LX > 10 40 erg/s, however, the spectrum softens as the source becomes less luminous (Brightman et al. 2016).The other ULXPs: NGC 7793 P13, NGC 5907 ULX, NGC 300 ULX1, etc. have indices Γ ≃ 1.1 ÷ 1.5 in the brightest states (Motch et al. 2014;Israel et al. 2017b,a;Carpano et al. 2018).At the same time, ULXs with no pulsations ever detected show Γ ≳ 1.4 (the hardest of them are Holmberg IX X-1 and IC 342 X-1, Sutton et al. 2013;Pintore et al. 2017), but at least part of them can actually also be neutron stars.
Variability amplitude of two orders of magnitude and more, similar to that we have found in NGC 5474 X-1, is observed in ULXPs: M 82 X-2 (Brightman et al. 2016), NGC 5907 ULX (Israel et al. 2017a), NGC 300 ULX1 (Binder et al. 2016).It has been proposed (Tsygankov et al. 2016) that such a type of variability of ultraluminous pulsars may be related to transitions of the source to the propeller regime in which the magnetic field starts acting as a barrier and blocks the accretion flow if the accretion rate becomes lower than some threshold value (Illarionov & Sunyaev 1975).However, this mechanism requires magnetar-like magnetic fields (∼ 10 15 G, Tsygankov et al. 2016;Bachetti et al. 2020) which is, apparently, not the case for NGC 5474 X-1.Other possible mechanisms capable of producing variability of high amplitude are: dramatic changes in the accretion rate, for example, due to the motion of the donor star orbit in an elliptical orbit; changes in visibility conditions due to precession of the accretion disc, especially if the emission is highly collimated; instabilities in the accretion disc (Hameury 2020;Hameury & Lasota 2020), etc.
If NGC 5474 X-1 is indeed a highly magnetised neutron star, its residence in an old stellar cluster of about one billion years old may seem unusual because magnetic fields with B ∼ 10 12 G are typical of regular radio pulsars which are supposed to be relatively young objects (see, for example, the Gaussian absorption line has improved the fit for all the tested models, including 'diskbb+powerlaw'. reviews Kaspi & Kramer 2016;Igoshev et al. 2021).Moreover, the vast majority of really old neutron stars with ages of billion years belong to the class of milliseconds pulsars which have magnetic fields of B ∼ 10 8 ÷ 10 10 G. Actually, such a low field strengths that milliseconds pulsars have are thought to be related to the accretion regime of close binaries at which a low-rate accretion lasts most of their lives and quenches the magnetic field (Kaspi & Kramer 2016).If a neutron star is isolated or resides in a wide binary system, its magnetic field is subjected only to the 'natural' decay.The rate of this decay strongly depends on the internal structure of a neutron star and is still under debate.Some models (for example, Kiel et al. 2008) predict that the field weakens by no more than one order of magnitude in the first billion years.Thus, NGC 5474 X-1 might be a binary system, which was non-interacting from the moment of the NS birth until the companion star left the main sequence, and where the accretion began very recently, when the companion filled its Roche lobe.The population synthesis calculation conducted by Wiktorowicz et al. (2017) yielded this scenario as one of the possible evolutionary channels of the ULX formation.It implies that the initial mass of the companion star is 1.3M⊙, and the system enters the ULX phase when the donor become either a star of the Hertzsprung gap (400-800 Myr) or a red giant (1200-4300 Myr).The age of the stellar cluster and the upper limit to the donor star mass obtained by us are in a good agreement with this scenario.
Another possibility: the neutron star can actually be young even being a member of an old cluster.Currently, there is known a handful of radio pulsars which show all the signs of their youth (fields ∼ 10 12 G and periods typical of a regular radio pulsars) but, at the same time, they are located in globular clusters (Lyne et al. 1996;Ransom 2008).The most plausible explanation of this phenomenon states that these neutron stars are indeed formed recently, via accretioninduced collapse of a massive white dwarf (Lyne et al. 1996;Ruiter et al. 2019).
Finally, NGC 5474 X-1 may be a young object just occasionally projected on the old stellar cluster.Above we have shown that the area around the cluster (including the closest 3 ′′ x 3 ′′ region, Fig. 6) is full of stars with ages starting from ≈ 10 Myr (Fig. 8), so the ULX might be one of them.If the donor star has already left the main sequence, the upper limit to its mass obtained from the photometry ≃ 7 M⊙ suggests that the system is not younger than ≈ 40 Myr.If the donor mass is less than 3 M⊙ then the system age is consistent with the age of the old cluster.

Transient ULXs associated with old population
Not only ultraluminous pulsars exhibit variability amplitudes of several orders of magnitude among ULXs.At present, about two dozens of ULX transients are known (Sivakoff et al. 2008;Middleton et al. 2012;Pintore et al. 2018;Liu et al. 2019;Earnshaw et al. 2019Earnshaw et al. , 2020;;Brightman et al. 2020;Dage et al. 2021;Walton et al. 2021), most of which are less luminous sources that only briefly reach luminosities of ≳ 2 × 10 39 erg/s during outbursts.In connection with the possible resident of NGC 5474 X-1 in an old stellar cluster, of particular interest are three ULX transients that were reported to likely be associated with old population: M83 ULX-1 (Soria et al. 2012, 2015), M86 tULX-1 (van Haaften et al. 2019) and 2SXPS J235825.7-323609(Brightman et al. 2023).
M83 ULX-1 was discovered in the Chandra images taken in December 2010, in which the source was caught at a luminosity close to its maximum (reached in March 2011) of 5 × 10 39 erg/s (Soria et al. 2012).Since the ULX is not seen neither in previous Chandra images of this area nor in earlier observations by other missions dating back to 1979, it can be concluded that the variability amplitude of this source is of a factor ∼ 3000 or more (Soria et al. 2012).In 2014, the source was found to be two times fainter (Soria et al. 2015), and later, according to the light curve 9 in the Living Swift-XRT Point Source catalogue (Evans et al. 2023), it slowly decreased its brightness by another three times; the last firm detection occurred in March 2022.X-ray spectra of M83 ULX-1 are more curved than NGC 5474 X-1 has, with a maximum in the range 2-4 keV (Soria et al. 2015).
As in the case of NGC 5474 X-1, the X-ray outburst of M83 ULX-1 was accompanied by a brightening in the optical range, which allowed identify its optical counterpart (Soria et al. 2012).It arose as a blue point source with MV = −4.9standing out against red emission of surrounding stars.The fact that the HST images taken before the outburst do not contain this blue source suggests that it should be a result of reprocessing of X-rays in our parts of the accretion disc (Soria et al. 2012).Analysis of these early HST images allowed to constrain possible types of the donor star -the obtained absolute magnitude MV ≳ −2.1 and photometric colours correspond to an old (≳ 500 Myr) low-mass (M ≲ 4M⊙) red donor, more likely a red giant or an AGB star (Soria et al. 2012).This behaviour is quite similar to that we found for NGC 5474 X-1, where the optical counterpart also was blue and had MB = −5.5 ÷ −4.4 during the outburst (the scatter is due to uncertainty of the spectral slope, Sec. 3) and MB > −3.1 in the off-state.
The other two sources, 2SXPS J235825.7-323609 and M86 tULX-1, were bright for a much shorter period of time and have no detected optical counterparts.The first one is located at the same area as the pulsar NGC 7793 P13 which is frequently observed with Swift.The source was firstly detected at its maximum luminosity ∼ 3×10 39 erg/s (Brightman et al. 2023) but then the flux started falling, and about 180 days later the source became no longer visible by Swift.The XMM-Newton observation carried out ≃ 210 days after the initial detection by Swift gave a luminosity ≈ 8 × 10 37 erg/s.All the HST images of this area were obtained during the off-state, so Brightman et al. (2023) have not identified any possible optical counterpart to this ULX down to mF814W ≃ 26.The weakness of the donor star, along with the fact that the system is located on the galaxy periphery populated by old red giants (Radburn-Smith et al. 2012), indicates that it should be also old.M86 tULX-1 was seen only once, in the Chandra image taken in July 2013, where it had a luminosity of 5 × 10 39 erg/s (van Haaften et al. 2019).The next image of this area was obtained in May 2016 but the source had already faded away.The optical counterpart was not identified, mainly because the galaxy is relatively distant (16.83 Mpc), so the type of the donor is not constrained.The old age of this object was suspected based on that it is located in a giant 9 https://www.swift.ac.uk/LSXPS/LSXPSJ133705.1-295207 elliptical galaxy in an area without young stars (van Haaften et al. 2019).There is some possibility for these two objects that they are background/foreground sources, however, their spectra look quite usual for ULXs (van Haaften et al. 2019;Brightman et al. 2023).
It is seen that NGC 5474 X-1 indeed shows a great similarity with transient ULXs in old stellar populations, however, their number is too limited to draw the final conclusion.Further studies of such objects will show how well NGC 5474 X-1 fits into the overall picture.

SUMMARY AND CONCLUSION
We have studied the source NGC 5474 X-1 whose peak X-ray luminosity reached ≃ 1.8 × 10 40 erg/s.The ULX was bright in two Chandra observation separated by 15 months but the subsequent Swift observations (started 3.5 years later) found it near the Swift/XRT sensitivity limit, i. e. fainter by a factor of 50-100 or even more (the Swift data are contaminated by a neighbouring source).Analysing the only good-accumulated X-ray spectrum, we found the signatures of a broad absorption line.We applied a Bayesian approach and have shown that, despite the suffering of the spectrum from pile-up, any tested spectral model requires a Gaussian absorption line component at Ec ≈ 8 keV to fit the data.
In the optical range, the X-ray source coincides with a red extended object about twice larger than surrounding stars.Analysis of the first HST observation taken about one year after the last observation by Chandra revealed a bright, blue, point-like source within the extended one.We proposed that the blue point source is the true counterpart of the ULX caught during the outburst that lasted at least 29 months (covering both the Chandra and the first HST observations).Then this point source disappeared.The SED of the extended source can be fitted by the spectrum of either an old stellar cluster of ≳ 500 Myr with a prominent Balmer jump or a distant galaxy at z ≈ 2.5, however, the latter option we have considered implausible because of the low probability of X-1 be projected on a background galaxy with such z.Studying the off-state optical data we derived limits to the possible stellar classes of the donor star: it may be a B3 or colder star of the main sequence, a B5 or colder star of III and IV luminosity classes, or a bright giant (II class) from A2 to M0.In all the cases the star mass must be ≲ 7 M⊙ which does not contradict the age of the parent cluster.
It the absorption line real, it might be a cyclotron resonant feature, which implies that this ULX hosts a neutron star with a magnetic field ∼ 10 12 G.The hardness of the X-ray spectrum and high variability amplitude, which are the distinctive features of ultraluminous pulsars, support this possibility.In this regard, the fact of the residence of this ULX in an old stellar cluster looks curious, but also an accidental projection of the ULX onto the old cluster cannot be ruled out.
' and 'Line' refer to the diskbb, powerlaw, cutoffpl and gabs xspec models.a Grade migration parameter of the pileup model.b Strength of the absorption line.c Log-evidence of the model relative the best one.The models below the horizontal line should be ruled out.The shown parameter values represent the mean and 1-σ credible interval of the corresponding posterior distribution.

Figure 2 .
Figure 2. Light curve of NGC 5474 X-1 in X-ray 0.3-10 keV band (top) and visual B-band (bottom).The Chandra and Swift observations are marked by diamonds and squared, respectively.Since the source was very faint in the Swift epoch, we applied the Bayesian technique to obtain the net source count rate in these data (see text).Unfilled squares with error bars denote individual Swift pointings with at least one photon registered, the position of each square marks the mode of the posterior probability distribution of the net flux.Bars mark the shortest 68.3% credible intervals.If the lower boundary of the credible interval went to zero, we showed it by arrow.For observations with no source photons detected, we estimated 68.3% upper limits of the net flux and showed them by notches with arrows.Filled black square marks an average of 12 Swift observations carried out in August-November 2012.Inset shows these observations individually.The details of the optical data see in Sec. 3.
Figure 3. One-and two-dimensional posterior probability distributions for the parameters of the pileup*tbabs*gabs*powerlaw model.

Figure 4 .
Figure 4. Position of the X-1 optical counterpart in different HST images.The big (0.16 ′′ ) and the small (0.05 ′′ ) circles indicate the corrected Chandra position of the ULX from Avdan et al. (2016) and the position of the point source measured during its outburst in the WFPC2/F336W image, respectively.

Figure 5 .
Figure 5. Observed flux of the X-1 optical counterpart in the WFPC2/F336W filter and upper limits to the fluxes in the other filters (for the bright and faint states of the source).The model spectra of a B3 main sequence star, an A2 and an M0 bright giants are shown with lines.

Figure 7 .
Figure7.Spectral energy distribution of the extended source together with the magphys best fitting model of a galaxy at z=0.359 (top panel) and the starburst99 models of star clusters (bottom panel).The best-fitting model spectrum of a 1.0 Gyr age cluster is shown in black, while the spectra for the ages of 0.8, 0.9 and 1.1 Gyr in grey.

Figure 8 .
Figure 8. Color-magnitude diagrams for the stars of two nearest to NGC 5474 X-1 groups C1 (triangles) and C2 (squares) from Fig. 6.Black circles indicate the positions on CMD of the stars from the small 3" area around X-1. Isochrones of 10, 15, 20, and 30 Myr are shown by lines.

Table 1 .
Results of the Bayesian analysis of the Chandra ObsID 9546 spectrum of NGC 5474 X-1.

Table 2 .
Swift/XRT observations of NGC 5474 X-1.Notes.a GTI corrected exposure time.b Number of total (source+background) counts accumulated in 30" source aperture.c Number of counts accumulated in the background region and rescaled to the source aperture.d Net source count rate obtained via Bayesian analysis (see text), the mode of the posterior distribution is provided.e Boundaries of the shortest 68.3% credible interval of the net count rate.

Table 3 .
HST observations, magnitudes and fluxes of the NGC 5474 X-1 optical counterpart.All magnitudes are given in the VEGAmag system.

Table 4 .
VEGA magnitudes and fluxes of the extended source corrected for reddening.