Galaxies decomposition with spiral arms -- II: A multiwavelength case study of M 51

Spiral structure can contribute significantly to a galaxy's luminosity. However, only rarely are proper photometric models of spiral arms used in decompositions. As we show in the previous work, including the spirals as a separate component in a photometric model of a galaxy would both allow to obtain their structural parameters, and reduce the systematic errors in estimating the parameters of other components. Doing so in different wavebands, one can explore how their properties vary with the wavelength. In this paper, second in this series, we perform decomposition of M 51 in 17 bands, from the far UV to far IR, using imaging from the DustPedia project. We use the same 2D photometric model of spiral structure where each arm is modelled independently. The complex and asymmetric spiral structure in M 51 is reproduced relatively well with our model. We analyze the differences between models with and without spiral arms, and investigate how the fit parameters change with wavelength. In particular, we find that the spiral arms demonstrate the largest width in the optical, whereas their contribution to the galaxy luminosity is most significant in the UV. The disk central intensity drops by a factor of 1.25--3 and its exponential scale changes by 5--10\% when spiral arms are included, depending on wavelength. Taking into account the full light distribution across the arms, we do not observe the signs of a long-lived density wave in the spiral pattern of M 51 as a whole.


INTRODUCTION
Galaxies are composed of many individual subsystems, which can each have distinct kinematics, spatial properties, stellar population ages, metallicities, and other properties.These observed differences are believed to be driven by various mechanisms which govern how galaxies form and evolve.By increasing our understanding of these subsystems, one can shed light on the role of major and minor merging, cold gas accretion, angular momentum transfer, bar formation, gravitational instabilities, and other local and secular processes (Somerville & Davé 2015).
Decomposition is the process of highlighting, separating, and measuring parameters of galactic subsystems.It is usually done by modeling a galaxy with some functions and fitting the function parameters to best agree with models and observations.For example, one can use a 1D photometric cut, an azimuthally-averaged profile, or a 2D distribution of signal on image (Erwin 2015;Méndez-Abreu et al. 2017).The two most prominent subsystems in spiral galaxies are the central concentration component, called the bulge, and a large ★ E-mail: a.a.marchuk@gmail.commostly flat component, called the galactic disk.Usually, a de Vaucouleurs or more general Sérsic profile is adopted for the bulge, and an exponential profile is adopted for the disk.The bulge-disk type of decomposition is the most common and has been carried out for the largest samples of galaxies (Simard et al. 2011;Lang et al. 2016;Bizyaev et al. 2014;Makarov et al. 2022).Such simple profiles allow one to do the decomposition conveniently and identify many physical relations, such as the connection between supermassive black hole and bulge properties (Vika et al. 2012), the dependence of the shape of the bulge intensity distribution on its luminosity (Noordermeer & van der Hulst 2007), the dependence of the bulge and disk properties on their environment (i.e.whether they are situated in a field or in a cluster, Barway et al. 2009), galaxy evolution (Weinzirl et al. 2009), and so on.However, galaxies often contain additional components aside from the disk and bulge, and thus demonstrate a more complicated light distribution.Therefore, various studies adopt more sophisticated photometric models.For example, for a central component of a galaxy it is often necessary to add a second Sérsic profile (D'Souza et al. 2014).Sometimes, active galactic nuclei are modeled as an unresolved point source (Gadotti 2008) or a nuclear disk (Gadotti et al. 2020).For edge-on galaxies, boxy or peanut-shaped (B/PS) bulges make frequent appearances (Smirnov & Savchenko 2020;Marchuk et al. 2022) along with the barlens component in galaxies viewed more face-on (Laurikainen et al. 2014;Laurikainen & Salo 2017;Athanassoula et al. 2015).Disk components are usually modified by breaks of different types (Laine et al. 2014), or a truncation of the inner part which is justified from bar presence or quenching (Papaderos et al. 2022).Additional thick or thin disk components and flaring can also be added (Mosenkov et al. 2021).
Despite the long list of aforementioned modifications, in some cases this too may not be enough to adequately represent a particular galaxy, since non-axisymmetric features may also be present (Peng et al. 2010).Bars and spirals are by far the two most common of these features, with more than half of all galaxies containing bars (Masters et al. 2011;Sheth et al. 2008;Marinova & Jogee 2007) or spiral arms (Conselice 2006;Willett et al. 2013).Despite a similar universal abundance of such non-axisymmetrical features, bars are commonly accounted for in decomposition (Gadotti 2009), whereas spirals are not.One reason for including bars but not spirals is the much higher relative contrast of bars, compared to typical spiral structures, and also the fact that bars extend through the central regions of galaxies thus their inclusion is crucial for obtaining the correct bulge parameters (Weinzirl et al. 2009;Salo et al. 2015;Gadotti 2009;Laurikainen et al. 2007Laurikainen et al. , 2006)).The other reason is that bars are relatively simple and could be modeled with a Ferrer's profile or a similar model (Williams & Evans 2017), but spiral arms are much more difficult to accurately model.
The spiral galaxies are usually divided into three classes following Elmegreen (1990): grand design galaxies which contain two main spiral arms, multi-armed spirals with more than two distinct arms, and flocculent galaxies with many short and fuzzy arms.Arms can be symmetric and may demonstrate a good fit using a logarithmic curve, but often they do not follow such simplistic shapes (Savchenko & Reshetnikov 2013).Spiral arms are probably among the largest visible features in galaxies, and can contain a large portion of the light budget, especially in grand design galaxies, where they can account for up to 40% of the total luminosity (Savchenko et al. 2020).Thus, it is natural to expect that such a bright component should affect the decomposition results, but it is not exactly clear how.This subject has been poorly investigated in the literature, and the results are quite controversial (Sonnenfeld 2022;Läsker et al. 2014;Gao & Ho 2017).
Spiral arms' influence on decomposition mostly accounted for artificial images of galaxies (Sonnenfeld 2022;Lingard et al. 2020;Davis et al. 2012).This approach is obviously flawed due of its simplicity and the unnatural appearance of modeled galaxies when compared to real objects.The only credible approach used for decomposition of observations with spiral arms that we are aware of is formulated in Peng et al. (2010).Here, spirals are modelled as Fourier and bending modes, modified by a rotation function of different forms.Although this approach works surprisingly well even for some complex spiral galaxies, it is challenging to implement and interpret, and is thus only used in a few works with a very limited number of objects (Läsker et al. 2014;Gao & Ho 2017).Moreover, the rotation function is smooth, and, hence, not able to model observed pitch angle changes (Savchenko & Reshetnikov 2013), where the pitch angle is the angle between the line tangent to the spiral arm and the line perpendicular to the radius-vector drawn from the centre of the galaxy.Also, the resultant spiral structure is symmetrical for each mode, which is not the case for many objects (Conselice 1997).Finally, the importance of spiral pattern accounting is not evident after these studies.
In our previous pivot study Chugunov et al. (2024), first in the series, we attempt to address these issues by introducing a new 2D photometric model where each spiral arm is modeled independently.In this model, the light distribution both along and across the arm and its overall shape can be varied significantly.For 29 galaxies we utilize 3.6μm-band images corresponding to the old stellar population from Salo et al. (2015), and analyze the differences between models with and without spiral arms.We find that spiral arms are modeled well, and neglecting them in decomposition causes errors in estimating the parameters of the disk, the bulge, and the bar.In addition, Chugunov et al. (2024) find that the pitch angle of spiral arms decreases with increasing bulge or bar fraction, and that the spiral-tototal ratio is higher for galaxies with more luminous disks and with higher bulge-to-total ratios.In the first study we also measure the widths of the spiral arms and the contribution of the spiral arms to the azimuthally-averaged brightness profile.Overall, we demonstrate that the approach, presented in Chugunov et al. (2024), produces reliable models and is useful for the analysis of spiral structure in observed galaxies.
Decomposition is rarely done for more than a few bands.In most cases only adjacent bands from the same survey are used, such as SDSS optical bands (Simard et al. 2011;Kruk et al. 2018;Méndez-Abreu et al. 2017),   from 2MASS (Ríos-López et al. 2021), or less frequently, Herschel far infrared 100-500 μm bands (Mosenkov et al. 2019).However, to model stellar populations of individual galaxy components and build their spectral energy distribution (SED), it is important to use the longest wavelength baseline.Using bands from different telescopes is difficult due to the additional processing required to account for different instrument resolution and other characteristics.For these reasons, studies with a wide wavelength range coverage from far ultraviolet (FUV) to far infrared (FIR) are scarce (see Buzzo et al. 2021 andRobotham et al. 2022 as examples).There also exists an approach to do decomposition of images in different wavelengths simultaneously, i.e. to make single, wavelength-dependent model which fits images in all bands (Vika et al. 2014;Häußler et al. 2013), but so far it has only been applied to a limited number of bands.
In this paper, we decompose images of the well-known Messier 51 (M 51) galaxy taking into account not only bulge and disk, but also its spiral arms, using a modified analytical model from Chugunov et al. (2024) for this purpose.The images span a wavelength range from the FUV to FIR and encompass different sources of radiation, such as both young and old stars, and dust and polycyclic aromatic hydrocarbon (PAH) emission.Thus, we aim to (i) demonstrate that our model can fit a nuanced galaxy with non-symmetrical and complex arms, and (ii) do this for a wide set of photometric bands.
The galaxy M 51 (NGC 5194, Whirlpool Galaxy) is an iconic and well-known object in astronomy as it was the first nebula with a detected spiral structure (Rosse 1850).The term M 51 is often used to describe both NGC 5194 (M 51a) and its companion galaxy NGC 5195 (M 51b) as an interacting system, but we will use it as a shorthand for the main galaxy only.The system is a famous example of an Sbc galaxy with grand design arms, and a close lenticular companion NGC 5195 is attached to the tip of the northern spiral arm.This apparent connection is actually a visual coincidence, since NGC 5195 is located at 20-50 kpc behind M 51 (Dobbs et al. 2010;Salo & Laurikainen 2000;Toomre & Toomre 1972).There is no full consensus about number and time of interactions between galaxies.Numerical models predict two interactions (Salo & Laurikainen 2000;Dobbs et al. 2010) or a single flyby event about 100 Myr ago (Toomre & Toomre 1972).In any case, the signs of recent interaction are clearly visible both in deep and Hi images as a tidal bridge that connects the galaxies, and as a large tail.Both galaxies host weak active galactic nuclei (Terashima & Wilson 2001).The distance  = 8.9 Mpc to M 51 was derived using several SNii events (Dessart et al. 2008), which gives the scale 43 pc/arcsec.We adopt an inclination angle  = 32.6 • following Nersesian et al. (2020), who reuse the results presented in Mosenkov et al. (2019).
We consider M 51 in this study because it is close, so its various aspects are very well studied, and in as an homage to its historical importance in astrophysics.It was also an aim of decomposition processes in many previous works, namely Salo et al. (2015); Fisher & Drory (2008); Peng et al. (2010); Baggett et al. (1998); Casasola et al. (2017); Heyer et al. (2022), which make it possible to compare the obtained parameters with previous estimations for models without spiral structure considered as separate components.Essential for this study is that M 51 has a huge and contrasting grand design spiral pattern.Moreover, these spiral arms exhibit clear asymmetry and pitch angle change.Together with an overall complex morphology, this makes M 51 an interesting and difficult target.
Our paper is organised as follows.In Sect. 2 we describe the galaxy and sample of images used.In Sect. 3 we present the model of spiral arm.In Sect. 4 we provide the details about decomposition and in Sect. 5 validate our models in different bands.In Sect.6 we present main results of our study along with the discussion.We summarize the work and give conclusions in Sect.7.

DATA
The source of images used in this study is the DustPedia Archive1 .Introduced in Clark et al. (2018), DustPedia is a multiwavelength catalogue with photometry across 42 bands for the 875 galaxies in the local Universe.Based on objects observed by Herschel Space Observatory (Pilbratt et al. 2010), it also includes images from the GALaxy Evolution eXplorer (GALEX, Morrissey et al. 2007), the Sloan Digital Sky Survey (SDSS, York et al. 2000), the Digitized Sky Survey (DSS2 ), the 2 Micron All-Sky Survey (2MASS, Skrutskie et al. 2006), the Wide-field Infrared Survey Explorer (WISE, Wright et al. 2010), the Spitzer Space Telescope (Werner et al. 2004), overall covering a huge part of the spectrum from FUV to FIR and submillimetre waves, spanning over five orders of magnitude in .All those observations were not only collected, but also processed for doing consistent mosaic co-addition, foreground star removal, aperturematched photometry, noise reduction, unit conversion, and removing foreground emission.This enormous amount of work resulted in a convenient and effective tool to study multiwavelength imagery of galaxies without the burden of doing data reduction.Dustpedia is dedicated to study the dust role in extragalactic processes.It not only boosts that part of science (Bianchi et al. 2018;Mosenkov et al. 2019;De Vis et al. 2019;Nersesian et al. 2019;Clark et al. 2019;Trčka et al. 2020;Nersesian et al. 2021), but could also be used for entirely different domains of astrophysics, such as galactic dynamics studies.
We downloaded images for M 51 from the DustPedia Archive in 17 different bands, listed in Table 1.All images are in units of Jy/pix.We decided to not use DSS and WISE images due to their lower resolution and pixel width when compared to their close analogues, which are SDSS in the optical and Spitzer in the IR bands.To properly compare the properties of the spirals in the images obtained using different telescopes and to ensure that obtained insights are not introduced by differences between the instruments, we need to reduce all the images to the same resolution and point spread function (PSF).Therefore, optimal resolution and depth are crucial for our analysis.We decide to not use bands beyond SPIRE 250 μm, because near this wavelength, image resolution begins to deteriorate quickly.However, the 250 μm band is located close to the peak of the SED in its FIR part where the emission from cold dust is not contaminated by the emission from warm dust, thus the inclusion of this band allows studying the properties of the cold dust in M 51.
Reducing all the images to the lowest resolution is methodologically correct, but has its price.The degradation of resolution could significantly affect the results, altering the smallest details and introducing a PSF-related bias (e.g.Marchuk et al. 2021).To address this issue, we also perform decomposition of two additional samples of data.The first sample consists of images with the original resolution and PSF.These are listed in the last column of Table 1.We do not use all bands to reduce the computational workload, but try to cover as wide  range as possible.The second sample consists of 14 images from the GALEX FUV to Spitzer 24 μm, reduced to the same resolution.The choice of the 24 μm limit is based on the fact that we deliberately do not want to omit the UV part of the spectra, but maximally improve the resolution.Since the largest pixel size is now for the GALEX data, this allows us to improve the resolution by a factor of two, and by a factor of three for the PSF FWHM.The inclusion of these two additional samples strengthens the results, presented throughout the paper, and provides a tool to catch the resolutionrelated effects as mentioned in Sect.6.1.Note, however, that these datasets should be treated as auxiliary data only, because for them we do not estimate decomposition uncertainties using bootstrapping as described in Sec. 4 due to the computational burden of such a task.
Most of the necessary image preparation routines have already been completed thanks to the DustPedia Collaboration, but we still need to mention several of our methodological choices.Firstly, we note that the sky background in 2MASS images are very inhomo- geneous, so we use data downloaded directly from 2MASS Atlas (Skrutskie et al. 2006) instead.These images' bands, , ,   , were converted to Jy/pix and then used as is.Additionally, we note that some images in DustPedia demonstrate non-zero background emission, but it is still rather constant through the image and was thus subtracted.We do not de-project images into a face-on orientation using the same constant inclination value during decomposition, see Sec. 4 for details.We mask the foreground stars, the companion galaxy NGC 5195, and the tidal tail where they were visible, manually and independently in each image.Secondly, we need to choose the band with the largest PSF full width at half maximum (FWHM), which is SPIRE 250 μm in our case, and convolve the rest of the images with appropriate transition kernels such that after this convolution, the resulting images would have the same PSF FWHM.Thus, all images were resampled to the pixel width and FWHM of 250 μm, which are 6 arcsec and 18 arcsec accordingly (for comparison, M 51's angular size in optical bands is about 10 arcmin).In order to estimate these transition kernels, we use information about PSFs published in Aniano et al. (2011) and then apply the PSF matching tool from PHOTUTILS (Bradley et al. 2020).For the subsample limited by 24 μm band we do exactly the same, but with the pixel scale and FWHM being 3.2 arcsec and 6 arcsec, respectively.The resulting PSF is very close to the PSF in the original 250 μm image, including the PSF tail.In all cases, we resample the PSF to the same pixel size as in an image.We conducted some experiments with oversampled PSF and concluded that using an oversampled PSF has no influence on any results of decomposition.

ANALYTICAL MODEL
In this section, we describe decomposition components and their parameters.
We use the standard Sérsic function for the bulge component model (Sersic 1968): It is parameterized by three quantities, namely the Sérsic index , which describes the radial concentration of the bulge, the effective radius  eff , which encloses half of the light, and intensity at this radius  eff .The   value is a normalization coefficient.The disk component was described by a simple exponential distribution with two parameters, its central intensity  0 and exponential scale length ℎ.
We model each spiral arm independently with a function that has 26 free parameters.Almost the same model has been used in our first study devoted to the spiral structure of 29 galaxies from S 4 G survey (Chugunov et al. 2024), where it was shown that our model reproduces well the observed properties of spirals, their shape and light distribution.Here, we again describe the basic equations and parameters of our model and refer the reader to Chugunov et al. (2024) for a detailed discussion of the reasons for the particular choice of functional form.
The surface brightness distribution of an arm in polar coordinates (, ) has a following form: We now provide details about each function from Eq. 3.
Function  () describes the shape of the ridge-line of spiral in polar coordinates (, ), where  is galactocentric distance and  is the azimuthal angle.To define  (), we use two polynomial functions of order  = 4 with polynomial coefficients   and   .This is the only change of the model from Chugunov et al. (2024), where  () is described by a single polynomial.This change was done because the arms of M 51 demonstrate clearly visible sharp bends inside them, which cannot be modelled properly with smoothly varying pitch angle.The arm starts at a radius  0 and position angle  0 , and hereafter  is counted from  0 along the direction of spiral winding, clockwise or counterclockwise, which depends on one more parameter and is determined visually.Spiral arms bend at ( break ,  break ), where  break is determined from other parameters, including  break , to make both parts of the arm match.So  break is not an independent parameter in our model.Therefore,  () has a total of 12 parameters and is formally described as follows: The average pitch angle ⟨μ⟩ for any part of the arm can be easily found as the arctangent of the slope coefficient in a linear fit of the points of the spiral structure in the log-polar coordinates, i.e. log  = tan⟨μ⟩ ×  + log  0 .Pitch angle μ at azimuthal angle  can be expressed as following: For  ∥ , the region of growth ends at angle  max , reaching a maximum intensity.Exponential decline continues until  cutoff , and the cutoff region ends until  end .At  end , the flux reaches zero and the spiral arm ends.In exponential decrease regions, intensity falls with radius exponentially with scale ℎ  , and in cutoff regions, exponential decrease is also multiplied by a linear decrease between 0 and 1.Before  cutoff ,  ∥ defined by this formula of 4 parameters: where () = ( () −  0 )/ℎ  and Ī is a normalization constant to make the maximum of  ∥ equal to 1.The exact value of Ī is derived from the other parameters as Ī = ( ( max ) × ℎ  )  (  max ) exp(−( max )).As said above, at  cutoff ≤  ≤  end , the function is multiplied by factor of 1 For the profile across the arm we implement a modified Sérsic function.This profile is fitted independently for direction  toward (in) the galactic center and from it (out) relative to the arm peak, each with its own  in/out  and  in/out parameters (and  in/out  , which depend on  in/out ).The parameter  describes the widening of the arm towards the outer edge.The condition  > 0 means that the spiral arm's width increases when traveling towards the edge of the galaxy, and  is the same for both in and out directions.In total, the profile  ⊥ (, ) is described by 5 parameters and has the following form: A centre point  0 ,  0 , inclination , and positional angle PA are also amidst the parameters of each component.Centre point and inclination are usually the same for all components.When including these, the model for each spiral arm in M 51 has 26 parameters.All parameters, including those for the galaxy plane's orientation, bulge, and disk are listed in Tab. 2. The rather large number of parameters is justified, since spirals are complex structures that are tricky to fit with a simple form.The advantage of the proposed model is that it is arranged relatively simply into individual subcomponents, and most of the parameters can be reliably guessed from the image.For example, ℎ  can be guessed from the position of the spiral's end, which is equal to 3 − 5 ℎ  .Another benefit is that each arm is fitted separately, thus allowing for a fit even in non-symmetrical cases, which simpler models can not do.The model proposed in this Section can fit very difficult cases, including M 51 as demonstrated below, and 29 galaxies from Salo et al. (2015) work (Chugunov et al. 2024).

DECOMPOSITION
The model introduced in Sect. 3 was implemented as new function in the IMFIT package (Erwin 2015).We ran the fitting twice with the same parameters for each image.For the first run, we applied the bulge plus disk model (B+D), while for the second run we used the same model, but with two additional spiral arms (B+D+S).
An important sidenote is that M 51 contains an active galactic nucleus (AGN) at the center (Querejeta et al. 2016).Its presence is manifested in the optical and other bands as the narrow central peak in Fig. 4 for images with the original resolution.Its appearance is mostly important in these images and it has a negligible effect on all structural parameters except those of the bulge.We include AGN in decomposition as a separate component only for the images in original resolution for these bands where it is visible, namely all SDSS bands and Spitzer 3.6, 8.0 and 24 μm bands.We use a point source to model the AGN and find its contribution to the total luminosity of roughly 0.2% in the optical, and the highest value of 0.5% is achieved in the 24 μm band.
The main difficulty of approximating data with a complex model with many degrees of freedom lies in finding the proper initial values for the free parameters.To simplify fitting and speed up the optimization of the polynomial  (), we first traced the spiral arms' shapes manually, and then approximated the shape based on such measurements.Parameters describing the shape of arms were later used as initial guesses for fitting.We apply reasonable constraints to other parameters of spiral arms.For each image convolved to the 250 μm-band image resolution and pixel scale, the fitting takes approximately half an hour for each B+D+S type of decomposition, while B+D model fitting took less than a minute for one band, with all available cores of Intel Core i5-7200U CPU.We estimated the goodness of the fit through a visual comparison between real images and their models by analyzing residual images in Sect.5, and also via the bootstrapping procedure, described below.
Some of the images in DustPedia have related error maps that are specifically prepared to account for various factors like image coadding, dark noise, Poisson noise, etc.Unfortunately, such maps are not available for all bands.For example, the error maps are missing for the GALEX and SDSS bands.For these bands, we received error maps constructed by Nersesian et al. (2020) (private communication) where the authors used the same approach originally presented in Verstocken et al. (2020).These were created from estimating the pixel-to-pixel noise, the calibration uncertainty, and the Poisson noise in the original data.For other bands, we use error maps provided in the DustPedia archive; for the Spitzer images we use original maps from the IRSA database3 .These error maps are utilized in the  2 calculation and to estimate parametric uncertainties in a correct and uniform way for all models.
The orientation parameters, i.e. galaxy inclination  and position angle PA, were fixed during decomposition.However, the choice of inclination for our modelling is a nontrivial task because the estimates of  in the literature span a large range from 20 • (Abdeen et al. 2020;Sofue et al. 1999) up to more than 50 • (Daigle et al. 2006), and in some studies the inclination angle could not even be determined (Egusa et al. 2009).Such large inclination uncertainties are usually attributed to galaxies oriented close to face-on, but in the case of M 51, its inclination has a large uncertainty due to the perturbed shape of the galaxy.It is also interesting that we find a similar range of  uncertainty among individual bands if the orientation parameters are not fixed and we try to estimate them from fitting.To adopt a reasanoble inclination value for all bands under study, we decided not to choose it blindly from the literature and instead did the following procedure.We normalized the images in all 17 bands to the same intensity range, summed them up and performed  decomposition of the resulting "image" treating  and PA as free parameters.Although clearly unphysical, such a procedure produces the orientation parameters that work reasonably well for most of the images used:  = 46.2• and PA= 24.4 • , and that are supported by both kinematic (Daigle et al. 2006) and photometric studies (Sheth et al. 2010).We also tried to fit B+D models to all images with spiral arms masked off in the image, and the new measured orienta-tion parameters were always close to the previously estimated values ( = 48.1 • and PA= 18.5 • ).We adopt the former pair of estimates for the orientation parameters.
To estimate the uncertainties of the derived parameters and their stability, we apply a bootstrapping resampling procedure in IMFIT, running the decomposition many times.For each iteration, a new subsample of pixels is generated by sampling with the replacement from the original image and then fitted with the selected model.We ran 100, 500 and 10000 iterations in the FUV and near infrared (NIR) 2MASS  band to find out how the number of runs affects the estimated uncertainty.We found that after 500 iterations, the uncertainties under consideration change by less than 10% in both test bands.We thus consider this number of iterations for both models with and without spiral arms.Note that this was done only for images, convolved to 250 μm resolution.We compute a standard deviation of the results for individual runs as an estimation of uncertainty.All uncertainties presented in Figures and Tables throughout the paper were calculated as such.Note that errors produced by IMFIT are usually small, as can be seen from Table 3 and Table 4, and thus in some cases are almost invisible in the Figures.We also analyze the covariation matrix for different numbers of iterations, and do not find any significant unexpected degeneracy between parameters.

VALIDATION
We test the quality and validity of the obtained decomposition models in this Section.Observed spiral arms are hard to fully represent by a smooth model due to their spurs, feathers, and star-formation regions (La Vigne et al. 2006).Moreover, the number and prominence of such additional features change with .For example, bands with significant income of young stellar population, such as GALEX FUV, contain many local clusters of ongoing star formation, which are not modeled here and contribute to residuals.For this reason, we cannot directly compare the values of reduced  2 in various bands with each other.For example, the best photometric model of Peng et al. (2010) with non-axisymmetric Fourier-based modeling of spirals for M 51 provides  2 = 54.2 for the SDSS  band compared to  2 ≈ 23.4 provided by our model.This does not mean that our model is better, because the models use different images and different numbers of parameters.A reduction of residuals after taking spirals into account is more important.As seen in Fig. 1, for all three datasets in every case  2 became smaller when we add the spiral arm into our model.
In order to check whether this improvement justifies the inclusion of the additional 26 parameters for each spiral arm, we use the Bayesian Information Criterion (BIC, Schwarz 1978; Bailer-Jones 2017), which applies a penalty term for the number of free parameters.First, we use the general form of BIC, which is where  is the number of data points and  is the number of free parameters in the model.We find that BIC is distinctly lower for our model with spiral arms for all bands.However, in this criterion all data points are assumed to be independent, which is generally not true for astronomical images due to the PSF.The fact that BIC might depend on correlations between adjacent pixels was discussed in Simard et al. (2011) and Head et al. (2014): the authors suggest modifying the formula to where  PSF is the number of pixels in the PSF and  is the total number of pixels.We show  2 and the adjusted BIC in Fig. 1.We can see that all B+D+S models clearly demonstrate lower values than those without a spiral arms component.This justifies the increased complexity of our decomposition model.
After applying a reliable model to an observed image, the residual image should contain only minor sources (such as star forming regions) and noise, with the pixels symmetrically distributed around a nearly zero median.For example, the Milky Way model in IR bands from Mosenkov et al. (2021) demonstrates such properties for the residual image.In Fig. 2 we show distributions of the pixel values in the residual images for the models with and without spiral arms.It is not easy to show these distributions on the same scale due to the drastically different emissions at different wavelengths, thus we decided to normalize the distribution so that the interquartile range of B+D+S models (the red-colored box in Fig. 2) equals unity.It is obvious that most of the medians of the residuals are close to zero for all of the bands and both of the model versions, which is indicative of good approximations.As the various percentiles show, the distributions are nearly symmetrical too, as expected.The symmetry is greater and the dispersion of the residuals is lower when spiral arms are taken into account.This alignment with our expectations validates all presented models in a very direct way.
An important question to wonder about is, "How do we know that spiral arms are fully extracted?"For example, the model also will become better than disk plus bulge in terms of  2 when we use the same arm model, but with less bright spirals, e.g. with  0 intensity halved.Obviously, spiral arms will not be properly and fully attributed in such a situation.There are two pieces of evidence that show that we are doing it properly.Firstly, since the distributions of residual pixels shown in Fig. 2 are symmetrical and have peak values close to 0, all large-scale features, including spiral arms, should be properly subtracted.Otherwise, we would have seen that the distribution appeared skewed.Secondly, we could see that all "bumps" on radial profile images in Fig. 4 in all bands, which appear due to spiral presence, are properly and fully attributed.
Another validating and stabilizing test is that close photometric bands should generally demonstrate similar parameters obtained from the decomposition, i.e. galaxy in the  filter demonstrates intermediate properties between UV and optics.The Figures in the next sections show that this is indeed the case, and we thus consider this test to be passed.
Of course, decomposition of auxiliary images with a higher resolution, either original or convolved to the resolution of the 24 μm image, and the following comparison of the results throughout Sec.6 additionally allow us to validate the findings obtained in this work.
Lastly, another important confirmation of our analysis comes from the agreement between our decomposition results and the literature, demonstrated for the bulge in Sect.6.1 and for the disk in Sect.6.2.The work of Casasola et al. (2017) is of special interest here, because authors measure disk radial scales for M 51 in the same DustPedia bands, being careful to avoid the influence of spiral arms.A comparison of their results with ours in Sect.6.2 shows the reliability of our work.

RESULTS AND DISCUSSION
In this Section we present the results of the fitting, a comparison with classical B+D models, and the effect that including spiral arms in M 51 has on its components.Original images, fitted models, and the residuals for several bands are presented in Fig. 3.We do not show images for all 17 bands in the main sample, but the presented ones are selected from various parts of the spectrum spaced across the  range.Firstly, it is easy to see that the appearance of the M 51 -NGC 5195 pair in the original images depends on wavelength, i.e. more flocculent with massive clumps in UV and FIR bands.Secondly, the disk and bulge sizes are slightly different.In the residual images for classical B+D models, the large unsubtracted spiral arms are easily distinguishable from the background.On the other side of    There is still plenty of emission left, especially in the UV and FIR images, but the remaining features are remarkably smaller and relate mostly to "knots" of star formation and arms' feathers.Finally, and most importantly, it is also easy to notice the good similarities between B+D+S models and the original image in all filters, and that properties of arms, including visible "bends", are fully and properly modeled.
To get an intuition for how 1D profiles of spiral arms look in these models, we show slices along the major axis in Fig. 4. We show slices for all three sets of models, but for visibility reasons some bands, which are similar to those displayed, are omitted."Bumps" on these profiles, which arise from spiral arms, have different amplitudes in different parts of the spectrum.Models follow the profiles nicely to the full extent, resulted not only in a good model of the spirals, but also for the disk and bulge regardless of the  considered.Since PA is fixed during the decomposition, each image in Fig. 4 shows a galaxy profile along the same photometric cut.Note that the left part of the profile is significantly affected by NGC 5195 presence even after masking, followed by a noticeable discrepancy between the model and data in this region.
We present the light budget distribution across the bulge, disk and spirals in Fig. 5.As this Figure states, different components occupy nearly the same level across considered wavelengths in the classical models.The disk component in B+D+S models share around 30-70% with maximum in the optical and NIR bands.This maximum is expected because these bands are less affected by star formation in spiral arms.The contribution of the bulge component is maximal in bands constituted by the light of mostly old population, and contains 10-20% of emission.This is similar to Nersesian et al. (2020) results, where old stellar populations in the bulge represent roughly 15% of the total emission.Peng et al. (2010) find a similar bulge fraction of 0.16 in their sophisticated model with a disk substituted of spiral arms, while Salo et al. (2015) find it as 0.13.We find that spiral arms are the most luminous part of M 51 system, containing up to 60% of light in UV bands and roughly half of the light in  > 4.5 μm parts of the spectrum.This is higher than a typical 20%-40% contribution of spiral arms of grand-design galaxies (Savchenko et al. 2020).This is not an unexpected result since M 51 is an outstanding example of a grand-design galaxy with spiral arms being the most distinct features.The spiral arm contribution in M 51 is maximal in the UV and IR due to the emission of young stars and re-emission by dust, respectively.Yu et al. ( 2018) use a large sample of 605 galaxies to measure spiral arms' strength in them using a discrete Fourier transformation, both in one and two dimensions in the   optical bands, finding that the mean arm strength is systematically stronger toward bluer bands.Kendall et al. (2015) perform a similar analysis and estimate that spirals' component amplitude is always lower in the  band than at 3.6 μm and 4.5 μm.
The contribution of spiral arms in the B+D+S versus B+D models is formed mainly due to the contribution of disk, while the contribution of bulge increases only slightly, as Fig. 5 states.If spirals are not included in model, disk must be brighter to account for the light that is actually part of the spiral arms.This should also be true for central parts, where spiral arms are not present but the bulge is, and some light from the bulge is attributed to the disk in B+D model.This is the reason why the bulge-to-total (/) fraction increases in B+D+S model for all datasets.A similar conclusion about the bulge fraction was made in Läsker et al. (2014) for NGC 2748.Moreover, the extreme example as M 51 clearly shows that if spiral arms are not included in decomposition, the obtained parameters, e.g.disk-tototal (/) ratio, will be incorrect in all parts of the spectrum since half of the light will be improperly attributed.Note, however, that this statement about / overestimation relates to the axisymmetric (Fourier mode  = 0) disk part only, because formal spirals emerge from the disk's material and should be considered as a piece of the disk, for example when estimating the / ratio.

Bulge parameters
A proper bulge decomposition for M 51 is problematic because the size of the bulge is small 4 , and the bulge itself has a low Sérsic index .Furthermore, for our main set of images convolved to the 250 μm resolution, the size of the bulge is comparable to the size of the PSF.This greatly affects the estimates of the bulge parameters, as we demonstrate below in the discussion of our results for the Sérsic index.Gadotti (2008) found that the structural properties of the bulge can be reliably retrieved if  eff is larger than 0.8 times PSF HWHM (half of FWHM).Formally speaking, this criterion is fulfilled for the dataset considered here, and we should be able to estimate the bulge parameters without any issues.However, Gadotti (2008) obtained his criterion mainly for  ≳ 1, which is not valid for M 51 (at least for some bands).
Moreover, the bulge area appears differently in different bands even in the original (not resampled) images.Specifically, in GALEX FUV and NUV bands, the bulge has a clumpy structure with sharp edges (see radial profiles in Fig. 4, green lines), while the bulge radial profile is steep, but clearly shows gradual intensity decaying for longer wavelengths.However, same sharp edges also appear for Spitzer 8.0 and longer wavelengths.As we show below, bulges with sharp edges observed at short and long wavelengths have very low Sérsic indexes  (close to zero).We do not associate these unrealistically low indexes with either pixel resolution or PSF, but with the fact that we observe different structures or different parts of the same structure in such a wide range of wavelengths as we consider in the present work.We also note that the fact that two-component bulge+disc fits have complex degeneracies is well known (Lingard et al. 2020;Robotham et al. 2017), and it is indeed the case for M 51, where Inman et al. (2023) note that the bulge parameters are subject to significant uncertainty.In our study, we also note that the bulge parameters should be taken with caution, although some conclusions regarding the the bulge parameters can be considered reliable.
The results of the bulge fitting are presented in Fig. 6 and Table 3.As can be seen, the effective radius  eff is considerably larger for the B+D+S models in all cases.We link this to the fact that all the models without spiral arms suffer from an overestimation of disk brightness, as was discussed in Sec.6 concerning the difference of the / fraction in the B+D and B+D+S models.Therefore, one can expect that the bulge will shrink to the very central area in a B+D model because the outer parts of the bulge will be fitted with a disk, and  eff should decrease, accordingly.This is exactly what we see in Fig. 6 (right panel).
In general, the value of  eff lies within the 16-27 arcsec range, and is lower in the optical and NIR bands.Our estimates from Fig. 6 agree with those from the literature: Salo et al. (2015) obtain  eff = 21 arcsec at 3.6 μm, Nersesian et al. (2020) provide 15 arcsec for the old bulge, and Fisher & Drory (2008) measure  eff = 13.83 ± 1.95 arcsec in the  band.Note that Fisher & Drory (2008) also classify the bulge as a pseudobulge with nuclear spirals.The wavelength dependance of the bulge properties has been investigated only in the optical and NIR parts of the spectrum.In Vulcani et al. (2014), Psychogyios et al. (2020) and in other studies (see also table 3 in Kennedy et al. 2015), authors find that  eff decreases with wavelength, but only slightly.We do not find a similar trend.
The Sérsic parameter  is small in M 51 and could not be extracted reliably in the shortest and largest .In these bands, the model always has  ≈ 0, as Fig. 6 shows.Therefore, we conclude that  is poorly determined from our data in some images.There are several reasons for that.First, the light distribution of the bulge in these bands actually looks very uniform and has steep edges.Such a profile is consistent with the Sérsic law with a very small  < 0.25.The exact value of the Sérsic index is difficult to determine for such small values, since all bulges that have small  look similar.In the 8.0 μm band image in Fig. 4, one can even see a dip in the centre of the surface brightness profile.Second, we observe  ≲ 1.5 for all bands in the B+D+S model, and we find that  decreases for the B+D model in every case.This is due to the same reason as for the  eff : the overestimation of the disk makes the edges of the bulge model steeper and lowers  even more for the B+D models.Finally, the fact that we convert original resolutions and PSFs to those in the SPIRE 250 μm band has a huge impact on small structures such as the bulge in M 51, as we see from the comparison of the different resolution images.In Fig. 6, it is clearly seen that models built for lower-resolution images have significantly lower Sérsic index  than for those with a higher resolution.The issue with the bulge fitting can be at least partially attributed to the seeing problems: as was shown in Trujillo et al. (2001a), the parameters of the Sérsic function can be severely affected by the PSF image smearing when the effective radius is comparable with the seeing HWHM.This problem is especially acute for PSF with extended wings (Trujillo et al. 2001b), which we see in M 51.In the decomposition pipeline used, we take the PSF into account, but its impact can still be high for a Sérsic component whose effective radius is close to the image seeing (Gadotti 2008).This fact demonstrates that for some particular bands, the image parameters such as the PSF and resolution are crucial for accurate bulge fitting in M 51.
The  values obtained are broadly consistent with the literature, considering a large scatter between the datasets with different resolution.Thus, Prieto et al. (1992) notice that the bulge in M 51 is very small in the , , , , and  photometric filters.Salo et al. (2015) measure  = 0.995 in the 3.6 μm band (however they did not use any model to fit the AGN), Nersesian et al. ( 2020) also find  = 0.995 for the old bulge, and Fisher & Drory (2008) finds  = 0.55 ± 0.14 for the  band.As a rare glimpse into another part of the spectrum, Mosenkov et al. (2019) apply a single Sérsic fitting for 320 galaxies from Dustpedia in Herschel bands between 100-500 μm.They find that  is almost constant within these wavelengths.It is typically below 1 and for some galaxies is even lower than 0.5, as their fig.4 shows.This fact is also true for our analysis of M 51 as Fig. 6 states, but we note that it cannot be directly compared with Mosenkov et al. (2019) because they do not consider a disk component.Peng et al. (2010) performs decomposition of M 51 in  band with and without spiral arms and finds that the Sérsic models for bulge have  = 1.75 for a model without spirals and  = 0.67 for a model with spirals.It's curious that in our results  for a classical model resembles the value that Peng et al. (2010) and is definitely lower than  for the model with spirals.However, we note that they adopt two-Sérsic bulge for a model with spirals, with a secondary Sérsic model resembling AGN in its parameters, whereas they use only one-Sérsic bulge in a classical model, making  for the bulge overestimated.Also, they use a Sérsic profile for the disk with  much smaller than unity ( = 0.33 for classical model) and two-Sérsic profile with Fourier and bending modes for the disk in the model with spirals.This makes disk profile far from exponential and may cause the difference in estimated bulge parameters.Our considerations are supported by Läsker et al. (2014), who use the same spiral models and find that the derived bulge parameters are very sensitive to both the specific details and the number of components used in the models.Considering the overall variation of the bulge  with wavelength, Gong et al. (2023) found a qualitatively similar trend for the M 81 galaxy.At their figure 2, it's clearly seen that  is smallest in the UV bands, increasing with wavelength and approaching a maximum at a fewm.

Disk parameters
As Fig. 5 demonstrates, the disk lost a large part of its luminosity after we included the spiral arms as a separate component, and thus a measurable change in its parameters is expected.The results regarding disk parameters are presented in Fig. 7 and in Table 3. From   the left panel of the Figure, we see that the disk's central intensity  0 without spirals is larger than with spirals, as expected.In most cases, the changes are in a range from 25% to a factor of three.It changes more at the ends of the analyzed spectral range, because the spiral arms' relative light budget there is higher, see Fig. 5. Peng et al. (2010) finds the same effect of spiral arm inclusion in  band, but with a smaller magnitude.
The shape of the curve for the obtained disk scale is presented in Fig 7 .This includes both the UV and MIR/FIR parts of the spectrum, and closely resembles the curve obtained in Casasola et al. (2017); Mosenkov et al. (2019); Baes et al. (2020).In contrast to brightness, the disk exponential radial scale ℎ decreases from bluer optical bands to a minimum in NIR bands, which is 20% smaller than maximum.Similar trends for ℎ were previously found in both the optical and NIR bands for early-type (La Barbera et al. 2010) and late-type (Kelvin et al. 2012) galaxies, and were confirmed by Vulcani et al. (2014).We can see three ℎ peaks in both B+D and B+D+S models, which peaks are situated in the FUV, at 4.5 μm, and at 250 μm.This means that the youngest stars, oldest stars, and coldest dust respectively are distributed similarly throughout the interior of M 51.
Finally, the comparison shows that the exponential scales in the B+D+S models are systematically the in the FUV and FIR bands, and are similar in the optical and NIR.The results for other datasets demonstrate the same tendency.Even for such massive spirals as in M 51, the effect is small, and the increase in ℎ when the spirals are taken into account in a modelling is 5-10%.Curiously, the exponential scales for images with the original resolution are systematically higher, which can be related to the increase of the bulge Sérsic index mentioned in the previous Section.
In C17, the authors carefully investigated azimuthally-averaged radial profiles for these images, along with other DustPedia bands, in 18 face-on spiral galaxies including M 51.This is of special interest, since they use the same images we use.Their measurements are shown as green crosses in Fig. 7.We can see from the Figure that the radial scale ℎ is roughly the same between our data, except for optical filters.In C17, the authors do not fit the entire profile, but rather a small part of it, visible in their figure A.1.Most of the 18 galaxies in C17 demonstrate exponential scales in optical bands that are lower than in UV (their figure 5), which is in agreement with what we find.We suspect that in optical bands, the slope of a smaller part of an azimuthally-averaged profile is probably not the same as the slope of exponential profile in larger parts of the disk.To test this, we conducted an analysis which is similar to C17 by masking the full image, except the area 2-4 arcmin which is considered in C17, and then fit only the exponential disk.We obtain results very similar to those in C17, and that directly confirms the hypothesis, and explains the observed discrepancy.Another way to explain the disagreement is seen in Fig. 8, which shows the fraction of the modelled spirals to the observed emission in azimuthally-averaged profiles.We see that the range of radii used for fitting in C17 terminates in the middle of the second "bump", which is larger in optical and NIR bands, thus pushing the disk slope up and increasing ℎ.The different azimuthallyaveraged profile of spirals also explains the difference of the disk exponential scale between our B+D and B+D+S models, discussed above in this Section.This Figure also helps to understand another finding: in Fig. 7, we see that reference values from C17 better agree with the B+D model without spiral arms.The reason is that C17 estimates ℎ from part of an azimuthally-averaged profile, which is located exactly where the contribution of the spiral structure into the signal is greatest, as Fig. 8 shows.Thus, the derived ℎ estimation is largely affected by the presence of spiral arms, resulting in a disk where arms' influence is not subtracted, i.e.B+D model.
Comparing with other works, Peng et al. (2010) find that the disk size in M 51 with spiral arms as separate component becomes 25% larger in  band, which is larger than we measure, but consistent with the trend.Interestingly, in the Peng et al. (2010) model the disk's magnitude is different from ours by only 0.03 mag, which is strange taking into account that part of the disk light is in fact attributed to the spirals.The plausible reason for this is that they used a nonexponential model for the disk.Baggett et al. (1998) do a classical decomposition in the  band and estimate ℎ = 107 arcsec, which is larger than ours, but Fisher & Drory (2008) find a much more consistent ℎ = 86.8arcsec for that same filter.A precise decomposition at 3.6 μm in Salo et al. (2015) results in an estimation of ℎ ≈ 84 arcsec, which is close to ours, taking into account slightly different disk positional angle 39 • .Finally, it is important to note that spirals could also be responsible for necessitating a disk model change to broken form from a pure exponential (Watkins et al. 2019), but this is not the case in this study.

Spiral arms parameters
Since the introduced spiral arm model consists of three parts, it is natural to also present the decomposition results using them: the shape, the profile along the arm, and the profile across the arm.All parameters discussed below for both arms are also listed in Table 4 for the main dataset, and in Appendix for other models.It is important to mention that the arm pointed to the satellite galaxy NGC 5195, which we called Arm 2 hereafter, is harder to constrain because its end, which is most likely a material feature (Chandar et al. 2017), is located in a masked area and thus could vary a lot between images.

Pitch angles
The pitch angles μ are probably the easiest property of the spiral arm to measure, hence there broad usage in the literature related to this topic.However, there are several reasons for why its measurement is a harder task than it looks.Firstly, it is a relatively rare situation when μ is measured for individual arms instead of averaging for the whole pattern, which the most common Fourier-based technique does (Yu et al. 2018).Secondly, pitch angle is not constant along the arm (Kennicutt 1981;Savchenko & Reshetnikov 2013).This is easy to see for M 51 in Fig. 9 and directly in observational images, because both arms change their angle substantially.Hence, it is important to specify the range of measurement.Third, it is usually an ambiguous task to trace arm peaks to fit a logarithmic curve.To solve this issue, Tamburro et al. (2008) and other authors use cross-correlation to find a better motivated difference between arms in different , taking into account not only peaks, but the shape of the arm around the peak.Our approach to modelling the arm seems to be even more reasonable, because our pitch angle estimation takes into account the whole light distribution along the arm's body.
Galaxy M 51 has visibly asymmetrical arms with different shapes and pitch angles, shown in Fig. 9. Different μ values are presented in the literature.Puerari et al. (2014) determined in M 51 for Arm 2 μ = 19 • using 8 μm images (see also Martínez-García et al. 2023).In Ma (2001), the pitch angles were determined for each arm separately using DSS images, and the resulting values are 16.7 • and 15.8 • .Kennicutt & Hodge (1982) measured pitch angles in M 51 using Hii regions, estimating a range of 13 − 23 • .Honig & Reid (2015) also used positions of 800 Hii regions in M 51 and measured that the pitch lies in the range of 8 − 13 • .Hu et al. (2013) fitted logarithmic spirals in the arms of M 51 using the SDSS -band image and got a pitch angle slightly above 17 • .Shetty et al. (2007) used CO observations to determine a pitch angle of 21.1 • .Kendall et al. (2011Kendall et al. ( , 2015) ) measured 13 − 14 • for a range of NIR and optical images.For a subsample of galaxies visible in 3.6 μm, Díaz-García et al. ( 2019) measured pitch angles using the Fourier method and obtained 17.1 • for M 51.Finally, Abdeen et al. (2020) determined pitch angles which lie within the range from 9.6 • to 12.9 • for M 51 in a broad set of GALEX FUV,  band, 3.6 μm and 8 μm bands.
The quite significant dispersion of the pitch angle values, taken from the literature, and the lack of agreement among them show the difficulty associated with accurate pitch angle measurements, as mentioned previously in this Section.Obviously, many previously measured values lie between the range 8 • and 23 • for individual arms because commonly accepted techniques like the 2DFFT average the whole pattern.In Fig. 9, we show pitch angles, measured using the whole arm extent.We obtain μ ≈ 10 • − 12 • for both Arm 1 and Arm 2 that are consistent with those from other works.All data sets give similar values.Measured μ values are increases with wavelength slightly.The discrepancy of the literature estimates may be due to the fact that different parts of arm is used to measure μ in different studies.To show this, we also find μ for parts of the arms before the bending "knee" visible in Fig. 9, where the pitch angle value changes abruptly.For its estimation, we use part of each arm that occupies  roughly 200 • of azimuthal angle.It is easy to see that the resulting values are considerably higher than the pitch angle measured for the full extent of the arms, reaching up to 30 • .This fact explains why previously measured μ values could exceed 20 • if a different part of the arm is used for measuring the pitch angle.

Density wave presence
The problem whether or not M 51 posses long-lived density wave is still debated despite the obvious influence of the tidal forces.If the galaxy exhibits a long-lived density wave for the whole spiral pattern, the pitch angles in bands associated with newborn stars, e.g. at UV, 8 μm and 24 μm wavelengths, should be lower than angles associated with the main bulk of old stars at 3.6 μm and 4.5 μm (for example, see Yu & Ho 2018).The evidence for and against this picture in M 51 is numerous and is roughly divided in half (Vallée 2020).The fact that we do not observe such angles' inequalities in our models should count as an independent argument that M 51 does not maintain a long-lived density wave for the whole spiral pattern (Dobbs et al. 2010;Shabani et al. 2018;Kennicutt & Hodge 1982).It is important to note that, unlike previous studies, our finding is based on the total distribution of light across the arms.Since pitch angle measurements depend on where they are measured, as demonstrated in Fig. 9, we also estimate μ angles over the entire extent using eq. 5 and an additional window function approach previously used in Savchenko & Reshetnikov (2013).The conclusion remains the same, except probably for the tips of both arms, which are expected to be less constrained.
The natural question, given the limited resolution used, is whether the effect is measurable in principle.We could roughly estimate its magnitude.There is no clear consensus in the literature on the location of the corotation radius in M 51, which in some studies is found at 230 arcsec (McCall 1982) or at 300 arcsec (Oey et al. 2003) from the center, or it may even have several corotation radii (Meidt et al. 2008).However, in most works it is measured to be within 110-160 arcsec (Tamburro et al. 2008;Scarano & Lépine 2013;Elmegreen & Elmegreen 1995;Abdeen et al. 2020;Elmegreen et al. 1989;Salo & Laurikainen 2000).We assume that the pitch angle is 12 • , corotation radius is 2.5 arcmin, length of the spiral is 5 arcmin, and rotation velocity is constant  = 215 km s −1 (Vollmer & Leroy 2011).Then we explore how the pitch angle of an arm in different band changes if we assume time travel being Δ between those bands, e.g. between UV and 3.6 μm.For Δ = 20/50/100 Myr, the variation in pitch angle is μ > 1 • /3 • /4 • , accordingly.Therefore, for Δ > 50 Myr, the pitch angle change within the given assumptions is larger than the difference between μ for the arms and its errors.Hence, associated pitch change should be in principle detectable e.g. between UV bands, where most of the stars are approximately 100 Myr old, and 3.6 μm band, where stars substitute most of the mass.However, the question of which offsets between wavebands in spiral arms are expected and in which direction is more puzzling than it looks (Pour-Imani et al. 2016;Miller et al. 2019;Martínez-García et al. 2023).One should take this into account, along with the signs of different nature of the outer parts of the arms (Tully 1974) and limited knowledge of 'pixellation' and PSF influence (see, however, figures for M 51 in Martínez-García et al. 2023).Hence we conclude only that M 51 does not demonstrate signs of a longlived density wave for the spiral pattern as a whole.Nevertheless, the implemented approach of the arms modelling may yield more definitive results about the nature of spirals in other galaxies.

Profile along the arm
The profile along the spiral arm is described in Sect. 3 by several angles, including the position of the maximum, and by radial scale ℎ  .We notice that the beginning of the spiral  0 shifts towards the center of the galaxy at larger , becoming 0.5 kpc closer in the FIR bands than in the UV.Note that this is evident for the FUV image in Fig. 3 and Fig. 9, where the arms are visibly separated from the center.This may be explained by the fact that spiral arms are much more "patchy" in the UV, so  2 becomes better if we omit several star formation areas located close to the center.The angle  cutoff , defined as the location of change from the exponential to linear slope, is not constrained well enough.The same is true for the length of the linear segment.The reason for this is that the behavior of  ∥ () is close to a linear function for some parameters even before the cutoff point, thus allowing us to move the point in any direction without changing significantly the resulting profile.
The radial scales of the arm ℎ  roughly follow the same distribution as the arm width in Fig. 10, but for the Arm 2 it is significantly larger in most bands.This fact is partially noticeable in Fig. 3, where the flux of the arm connected with the companion NGC 5195 remains relatively the same, but rapidly decreases towards the disk's edge for the Arm 1.The ratio of the arm and disk scales ℎ  /ℎ also has the same shape for both arms, and its value lies in a range of 0.5-1.5, as shown in the left part of Fig. 10.This is a typical range of values for this parameter, as our study of the spiral arms in 29 galaxies at 3.6 μm demonstrates (Chugunov et al. 2024).In cases where the ℎ  /ℎ value is larger than unity, we should expect that the spiral arms' brightness relative amplitude increases towards the edge of the galaxy, which is observed in real galaxies, decomposed with the Fourier method (Kendall et al. 2011(Kendall et al. , 2015)).It is interesting to note that the values of ℎ  /ℎ drop in MIR bands, and this ratio rises then almost to the maximum level in the 250 μm band, which should somehow relate to the processes that govern the hot/cold dust distribution.All the mentioned properties of radial scales also closely resemble those in two auxiliary datasets of images.
In Fig. 8, we show which part of an azimuthally-averaged profile the spirals occupy.In all parts of the spectrum the picture is nearly the same: rise until 2 arcmin, then plateau with two noticeable peaks, until 4 arcmin, then decline with increased uncertainties.The spiralsto-total ratio in the plateau is equal to 0.5-0.8 and is greatest at the UV and IR ends of the spectral range used.The first and second peaks have nearly the same heights.These findings are supported by numerous works by other authors.For example, Kendall et al. (2011) fits in azimuthal profiles for M 51 in optical, 3.6 μm and 4.5 μm bands with a sine wave, obtaining spiral relative amplitudes.They clearly demonstrate a drop of luminosity between peaks, similar to our findings.Knapen et al. (1992) studied star formation efficiency in the spiral arms of M 51, and also clearly demonstrates two peaks on contrasting images for individual arms, as does Elmegreen et al. (1989) for images in  and  bands.Elmegreen et al. (1989) state that these modulations may be signs of interfered patterns.In Sheth et al. (2010) their figure 13 clearly shows similar picture for 3.6 μm image.Scheepmaker et al. (2009) and Chandar et al. (2017) studied the spatial distribution and ages of star clusters in M 51 relative to its spiral pattern.They identified two peaks in the profile of star formation and in the gas surface density in the radial direction, placed at 2.5 kpc and 5 kpc.The gap in the arms' luminosity is also clearly visible in the smoothed 2MASS H band image in figure 7 from Scheepmaker et al. (2009).Chandar et al. (2017) noticed that all of the clusters' distributions are located in the centre of the spiral arms, and that its peak height decreases with cluster age, which is qualitatively in agreement with Fig. 8.In Puerari et al. (2014), the authors study 8 μm images of M 51 and clearly show two peaks of arm amplitude for an  = 2 Fourier component in their figure 2. Vlahakis et al. (2013) rigorously study spiral structure in M 51 using CO, PAH and Hi maps.They manually selected spiral structures and investigated arm/interarm variations, showing the same clear peaks in the radial profiles for individual arms.Finally, Heyer et al. (2022) built a decomposition model using GALFIT, and clearly demonstrated the mentioned gap in luminosity in their fig.8.

Characteristic widths
Arms' characteristic widths are presented in Fig. 10.We use the FWHM of radial slice of the spiral arm model as a measure of width.One should not interpret  in  +  out  in eq.7 as a perpendicular width itself, even if the arms do not widen ( = 0).In the Sérsic profile (eq.1), a radially symmetric 2D distribution of light is implied, and  eff is the radius enclosing half of light.The dependence between   and  is determined by this condition (Graham & Driver 2005).Eq. 7, where   is analogous to  eff , replicates the form of the Sérsic law, but Sérsic-like distribution of light here is only one-dimensional.Therefore,   cannot be considered as a half-light width, and we use the FWHM instead.This definition produces larger arm's width estimates than may be intuitively expected, in our case around 1.5-2 kpc.Fig. 10 shows a similar behaviour of both the arms, i.e. with a global maximum in optical/NIR bands and a second local peak in FIR bands.This dependence could be explained by the fact that the filters indicating narrower arms are associated with ongoing star formation, which can not propagate far enough from the place of birth.This explanation is supported by Pessa et al. (2023) where the authors note a clear increase in the width of the spiral arms with increasing age of the stellar populations.Other datasets used confirm these findings, but the images convolved to the 24 μm resolution can expose only the first peak.It is also important to mention that the arms' characteristic widths for the original resolution are 20% larger in the optical bands, as shown in Fig. 10.
There are only few arm width measurements available in the literature, particularly for M 51.Kennicutt & Hodge (1982) measured the arm width in M 51 using Hii regions and estimated a perpendicular width equal to 17 arcsec.Also using Hii data, Honig & Reid (2015) fit log-periodic models to segments of each arm in M 51 and measure width values up to 1 kpc.At the same time, spirals selected instead using photometric bands like in Foyle et al. (2010) look significantly wider than measured in Honig & Reid (2015) and Kennicutt & Hodge (1982), validating our result.There are two reasons why we obtain higher width values.Firstly, pitch angle is small, then values in Fig. 10 should be closer to perpendicular width, but slightly larger than it.Second, Hii regions, used in previous studies (Kennicutt & Hodge 1982;Honig & Reid 2015), are associated with ongoing star formation of only few Myr old, which can not travel far enough from spiral.However, UV band associated with much older stars of approximately 100 Myr age, hence resulting in a larger extent and explain the discrepancy.This explanation is supported by the observed width drop in 8−24 μm, where hot dust demonstrate the presence of young stars of ages ≤ 10 Myr.Savchenko et al. (2020) estimated average arm width to be (0.16±0.04)× 25 for grand design galaxies in the  band, see their figure 16.Taking an M 51 disk size to be 5.6 arcmin (de Vaucouleurs et al. 1995), the resultant average width from that formula will be approximately 50 arcsec, similar to what is obtained in this work if we assume that the measured width is close to the perpendicular one.
We do not note a noticeable arm width increase in the models toward the galaxy edge, i.e. we find  = 0 for every image and arm.Similarly, Honig & Reid (2015) found that the arm width increases towards the edge in M 51, but only slowly, which is almost unnoticeable in their images.As found in Savchenko et al. (2020), this slow increase of spirals' widths is typical among their sample of 155 galaxies.

Discussion and remarks
Indeed, previous authors tried to implement various models of spiral arms.Peng et al. (2010) introduce a new version of GALFIT with various non-axisymmetric models including spirals modeled by coordinate rotation mode.Among other objects, that work also contains an implementation for an M 51 model in figure 21, with a resultant  2 = 54.2 in  band.Despite the potential for fitting spirals with various forms, their model is more complex than used here; it has 103 free parameters in the best fit.Also, these parameters are difficult to interpret as it is, and their model could be difficult to implement.These are the reasons for why despite its power, such an approach is rarely used in practice.In one of such works, Läsker et al. (2014) used that approach for spiral arm models in 4 galaxies, which are modeled separately from the disk following Peng et al. (2010).They find examples of galaxies, where spiral arms, with or without other non-traditional components, are needed if one wants to describe the structure of bulges.In contrast, Gao & Ho (2017) also used models similar to Peng et al. (2010) for decomposition in the  band and obtained that spirals have a negligible effect on bulge parameters' estimation.Another common way to model spirals when working with radial profiles is to use Gaussians to fit "bumps" on profiles, produced by spiral arms, as Davis et al. (2019) and Popescu et al. (2011) do.However, this approach is only feasible for a 1D decomposition, and should not be considered rigorous spiral arm modeling.We are also aware of several other published analytical models of spiral arms (Cox & Gómez 2002;Fridman & Poltorak 2010), which, to the best of our knowledge, were not used in the decomposition of real objects.
Of course, there is also another numerical approach to take spirals into account in the decomposition process.One could use synthetic images with artificial arms of various forms, often logarithmic, to check how they affect the extracted parameters.Such an approach was used by Sonnenfeld (2022); Lingard et al. (2020); Davis et al. (2012) and others, and have the advantage of a priori knowledge about the components in the galaxy, but also bound to the exact form of the spirals model used.Since arms in real galaxies aren't smooth or symmetrical, and because we lack a broad piece of information on their observational properties, this strategy does not always produce correct results.
There are also plenty of works where authors try to fit spirals by manually constructed shapes without any analytical model.Spirals could be selected by simple rules like choosing 45% of the brightest pixels like Foyle et al. (2010) do.Savchenko et al. (2020) traced spiral arms in 155 SDSS galaxies using perpendicular cuts fitted by a two-sided Gaussian function.Lingard et al. (2020) and Masters et al. (2021) used so-called crowdsourced masks manually painted by volunteers.In Bekki (2021), the authors used Deep Learning to train a model which marks a spiral pattern.All these approaches are very promising because they could fit spirals with complex forms, but to our knowledge, so far they were not used in decomposition studies and should suffer from human bias, thus should be difficult to reproduce.
Besides accounting for the spiral arms in decomposition, another novelty of this work is the number of photometric bands we used for such a task, i.e. 17 bands from the UV part of the spectrum through to the FIR.The closest examples of such a multiband decomposition to our knowledge is the lenticular galaxy NGC 3115, decomposed in Buzzo et al. (2021) using 11 bands from the UV to 4.6 μm, and M 81 (NGC 3031) in Gong et al. (2023) where the authors use 20 bands from the UV to 5.8 μm.Both of these studies, however, cover a smaller part of the spectrum and use only traditional components in decomposition.Gong et al. (2023) actually try to mask out spirals and estimate their influence on decomposition, and found little or no effect, which is curious considering how big the mask is, see their figure 15.In any case, this is a rare situation, usually only a few adjacent bands are utilized in decomposition.Most often these are all or some subset of the optical  filters for samples of various sizes (Bizyaev et al. 2014;Méndez-Abreu et al. 2017;Kruk et al. 2018;Casura et al. 2022), up to millions of galaxies in Simard et al. (2011).Several bands can also be used to make deep coadds and then decomposed, as in Bottrell et al. (2019).One of the biggest up-to-date decomposition projects uses images from DESI Legacy (Dey et al. 2019) in the optical  bands and the probabilistic software (Lang et al. 2016) to build models for all visible objects in ≈ 40000 square degrees of the sky.Such models are useful to discover faint components in galaxies (Marchuk et al. 2022).These models also reveals how often extended and bright spirals remain in residues, see e.g.predicted vote fractions in Walmsley et al. 2023.The amount of such cases directly highlight the importance of the presented work.
Outside of the optical part of the spectrum, only the NIR bands   are used frequently (Kennedy et al. 2015;Psychogyios et al. 2020;Ríos-López et al. 2021), while works where UV or MIR/FIR filters are used, such as Mosenkov et al. (2019) for Herschel 100-500 μm bands, are only occasional.It is important to mention an interesting approach to decompose several bands simultaneously, thus building a physically motivated and more robust fit, which was implemented in the MegaMorph package (Vika et al. 2014).In the series of works Häußler et al. (2013); Vulcani et al. (2014); Robotham et al. (2022), the authors apply this package to both optical and NIR bands, finding models of galaxies and their components using up to 9 filters simultaneously.
The lack of decomposition works, which cover images in the whole observed spectrum shows the difficulty to prepare such images, because a lot of untrivial processing and methodological issues should be solved.DustPedia project provides a unique opportunity for tasks such as the decomposition of M 51 here, because most of the preprocessing issues are already successfully solved and the data is ready to use.The importance of covering as much of the spectrum as possible in decomposition studies arises from the possibility of fitting individual components' SED and thus recover formation histories (e.g.Eufrasio et al. 2017) and physical properties for them.A successful example of an implementation of such an analysis is the previously mentioned galaxy, NGC 3115 (Buzzo et al. 2021), whose SED was individually recovered for a bulge, two disks, and bar.Similar work was done for M 81 separately for the bulge and the disk (Gong et al. 2023).Although the SED construction for different stellar populations (De Looze et al. 2014;Nersesian et al. 2020) and morphological components in the axisymmetric case (Inman et al. 2023) was already solved with radiative transfer codes for M 51, it is still vital for other galaxies.Moreover, we only start to understand the influence spiral arms have on construction of SEDs for classical components (Popescu et al. 2011), hence a lot of future work awaits in this direction.
There are several limitations and flaws in our analysis.Firstly, real spiral arms are not log-normal, not smooth, and are contaminated by spurs, feathers, locally enhanced star formation areas, dust lanes, and tidal features.It is unclear if these features could deform arm models and whether they should be taken into account during decomposition or not.Surely, they could influence the decomposition by "locking" the fitting in a local minimum, but most of them are unlikely to affect the global parameters, such as its pitch angle or characteristic width.Second, the choice of the exact form of analytical expression to fit an arm is arbitrary.There is no clear theoretical reason why it should be a good approximation.However, in previous paper Chugunov et al. (2024) we use the same model for spiral arms with substantially different appearance in 29 galaxies and find good fitness between the model and data, and similar parameters' systematics of bulge and disk as here.This fact could also be the answer for the next objection that we don't know how typical M 51 is, and hence whether we could generalize our obtained results or not.The mentioned work, first in this series, shed light to this question.Also, there could be potential limitations related to the fact that we used dust resolution for all images.Surely, it was shown many times (for example, Marchuk et al. 2021) that image resolution of the data and its PSF could affect the analysis.Indeed, we find that the adopted image quality of M 51 largely affects the estimation of the Sérsic parameter  for the bulge, as seen in Fig. 6.However, for other parameters we find the different angular resolution and PSF to be less of an issue.Finally, we conclude that this work, while not free from limitations, produces values which are consistent with other works and with results for two auxiliary datasets, and we believe these facts give enough credibility to it.

CONCLUSIONS
Galaxies with a prominent spiral pattern are ubiquitous in the known Universe, but spiral arms are rarely taken into account in photometric decomposition of galaxies.We have done the work on this topic, and achieved the following results: (i) For the first time, we fitted decomposition models, consisting of a bulge, disk, and spiral arms, to images of M 51 in 17 photometric bands from far UV to far IR.We found that models describe observations in all filters fairly well (Fig. 3 and 4).We have shown that models with spiral arms (B+D+S) provide significantly smaller residuals than bulge+disk (B+D) models (Fig. 1 and 2), which justifies the large number of parameters of our spiral arm's model.
(ii) We confirmed that spiral arms are the most luminous part of M 51 in UV and MIR/FIR bands.We measured spiral arms' contribution to the total luminosity, which is roughly equal to 60% in UV in FIR bands and ≥ 30% in other bands (Fig. 5).
(iii) We have compared B+D+S and B+D models and found how neglecting the spiral arms affects the estimation of parameters.After including the spiral arms in the model, disk scale ℎ increases by 5-10%, and its central intensity drops by a factor of 1.25-3 in most cases (Fig. 7).For the bulge, which is small in M 51 and severely affected by the image resolution used, obtained parameters should be taken with caution.WE find that separating the spiral arms into its own component allow one to resolve bulge properties in a larger number of bands.Thus, the Sérsic indices  increase in all bands in B+D+S models, however, staying below unity in most of them and increasing with the used image resolution (Fig. 6).Bulge-to-total ratio increases in all bands.
(iv) In the best-fitting models with spiral arms, we derive arm pitch angles for the first time using a full 2D light distribution within the arms (Fig. 9).The derived pitch angle estimates for different bands agree within their uncertainties, in contrast to what would be expected if a long-standing density wave existed for the whole spiral pattern in M 51.
(v) The arms' characteristic width in M 51 is relatively constant with wavelength till the NIR, significantly drops after it and increases to nearly the same level for  ≥ 70 μm (Fig. 10).The radial scales of the arm intensity roughly follow the same distribution as the width, but for the arm pointed towards the NGC 5195 it is significantly larger in most of the bands.The azimuthally-averaged spirals-to-total ratio demonstrates two peaks, expected from the literature, and contains from half to 80% of emission in them (Fig. 8).
Mutatis mutandis, where possible our findings in this study confirm the results of Chugunov et al. (2024) and other authors.Our studies may be the first step in a new area of spiral arm analysis and will therefore be continued.In the next papers, we will conduct the similar analysis for more distant galaxies and continue to study variations in spiral structure at different wavelengths.Further improvement of the arm model is also a possible direction for future work.For example, a complex fit of bright star forming areas along the arm should be successfully modelled by the probabilistic approach used in DESI Legacy (Dey et al. 2019;Lang et al. 2016).

Figure 1 .
Figure 1. 2 (lower and right subplots) and BIC (upper and left subplots) comparison for images, convolved to the resolution of the 250 μm image.The outside subplots show the comparison for the classical B+D versus B+D+S models, while the central subplots show the dependence on .The color of each marker represents its wavelength and it is the same among all Figures in this paper, where shown.

Figure 2 .
Figure 2. Distributions of the residuals for different models and bands, used in all three sets of images in this work.Each distribution is represented as a so-called boxplot, with the median, 25th, and 75th percentiles marked.For representation reasons, all residuals are normalizedin a way that interquartile range of B+D+S models (red-colored box, left model in each pair) equals to 1.

Figure 3 .
Figure 3. Original images (with the band marked), models and relative residuals for M 51 in four different bands.The masks are not shown for a better comparison between the image and the model.The line on the central image marks the position of the PA.

Figure 4 .
Figure 4. Radial profiles along major axis for B+D+S models in three datasets (a -convolved to 250 μm; b -convolved to 24 μm; c -original resolution).The blue colour is the observed flux in log coordinates with its uncertainty (the left peak of the observed profile is due to NGC5195), the red dashed line shows the B+D+S model profile, green lines show bulge profile, other lines show profiles of spiral arms.Each arm represents by line with its own linestyle and color.The disk components are omitted for clarity, except for the GALEX FUV in the upper left corner, whose disk and bulge profiles are shown as an example.All profiles are normalized to have the same height of the central peak.Each horizontal axis spans in 7.5 arcmin in each direction, and omitted for visibility reasons.In data set (c) all SDSS and 3.6 μm, 8.0 μm and 24 μm bands contains AGN as separate component, visible as an exceptionally narrow central peak.

Figure 5 .
Figure 5.Light fractions in different components relative to total flux.The left plot shows the dependence of bulge-to-total (/) and disk-to-total (/) on wavelength  for B+D model.The central plot represents the same for B+D+S model.In these plots, filled symbols represent images convolved to 250 μm, open colour symbols show images convolved to 24 μm, black symbols mark images with the original resolution.The right plot compares bulge and disk fractions between models for main dataset, solid line marks 1:1 relation.

Figure 6 .
Figure 6.Bulge parameters obtained in decomposition.Left plot shows a dependence of Sérsic index  on wavelength for both models.In the right plot, the effective radius  eff is compared between two models.

Figure 7 .
Figure7.Disk parameters obtained in decomposition.In the left plot, the central intensity  0 is compared between models without spiral arms (x-axis) and models with spiral arms (y-axis).The right plot shows the dependence of radial scale ℎ on wavelength for both models.Green crosses represent results obtained inCasasola et al. (2017).

Figure 8 .
Figure 8. Fraction of modelled spirals to observed emission for azimuthallyaveraged profiles.Vertical lines show limits used for disk scale fitting in Casasola et al. (2017).Shaded regions represent uncertainties and for visibility reasons are only shown for a few bands.

Figure 9 .
Figure9.The upper plot shows pitch angle measurements for both arms, and the bottom plot shows spiral arms in the log-polar coordinate system.Filled symbols are for the pitch angles measured in the main dataset using the arm's full extent, while smaller open symbols show pitch angle measured for the arm's part from the beginning till the "bend", marked in the bottom plot.Filled area mark pitch angle results for both arms in data convolved to 24 μm (blue) and with original resolution (grey).

Figure 10 .
Figure 10.Spirals' radial scales ℎ  and widths, obtained in decomposition.The left plot shows the radial scale ℎ  compared to the disk radial scale ℎ, dashed lines show 0.5, 1.0 and 2.0 dependencies.Down-pointing triangle mark Arm 1, and triangle mark Arm 2, models are colour-coded as those in Fig. 7.The right plot shows the dependence of spiral width on wavelength for both arms, coloured areas similar to those in Fig. 9.

Table 1 .
Photometric bands used.Horizontal lines demarcate different parts of the spectrum, which are shown with filled color in Figures throughout the paper.FWHM and pixel scales are given in arcseconds.The last column marks if M 51 was additionally decomposed in this band using an image with the original resolution.

Table 2 .
Parameters in decomposition model.

Table 3 .
Parameters of the bulge and disk in the B+D and B+D+S models for images reshaped for 250 μm resolution.Results for other two datasets listed in the Appendix.

Table 4 .
Parameters of spiral arms for images convolved to 250 μm resolution.