Inferring magnetic helicity spectrum in spherical domains: the method and example applications

Obtaining observational constraints on the role of turbulent effects for the solar dynamo is a difficult, yet crucial, task. Without such knowledge, the full picture of the operation mechanism of the solar dynamo cannot be formed. The magnetic helicity spectrum provides important information about the $\alpha$ effect. Here we demonstrate a formalism in spherical geometry to infer magnetic helicity spectra directly from observations of the magnetic field, taking into account the sign change of magnetic helicity across the Sun's equator. Using an angular correlation function of the magnetic field, we develop a method to infer spectra for magnetic energy and helicity. The retrieval of the latter relies on a fundamental definition of helicity in terms of linkage of magnetic flux. We apply the two-scale approach, previously used in Cartesian geometry, to spherical geometry for systems where a sign reversal of helicity is expected across the equator at both small and large scales. We test the method by applying it to an analytical model of a fully helical field, and to magneto-hydrodynamic simulations of a turbulent dynamo. The helicity spectra computed from the vector potential available in the models are in excellent agreement to the spectra computed solely from the magnetic field using our method. In a next test, we use our method to obtain the helicity spectrum from a synoptic magnetic field map corresponding to a Carrington rotation. We observe clear signs of a bihelical spectrum of magnetic helicity. Our formalism makes it possible to infer magnetic helicity in spherical geometry, without the necessity of computing the magnetic vector potential. This has the advantage of being gauge invariant. It has many applications in solar and stellar observations, but can also be used to analyze global magnetoconvection models of stars and compare them with observations.


Introduction
The solenoidal nature of magnetic fields enables us to examine them in terms of the topology of closed curves (Berger & Field 1984). Helicity integrals in general, and magnetic helicity in particular, (see Eq. (1)) have been demonstrated to be associated with the topological properties of field lines (Moffatt 1969(Moffatt , 1978. Magnetic helicity, which characterises the linkage of field lines, is a topological invariant. In ideal magnetohydrodynamics (MHD) magnetic helicity is conserved (Woltjer 1958), and is nearly conserved in the limit of large conductivity (Berger 1984). Thus, magnetic helicity imposes a crucial constraint on the evolution of magnetic fields.
In the case of the Sun, magnetic helicity is often invoked to investigate many facets of the solar magnetic field. To name a few examples, it is suggested as a possible proxy to quantify the eruptivity of solar active regions (ARs) (Pariat et al. 2017;Thalmann et al. 2019), or as a plausible predictor of the solar cycle (Hawkes & Berger 2018). The influence of magnetic helicity on coronal emission, to explain the observed enhancement in X-ray luminosity with increasing stellar rotation, has also been explored (Warnecke & Peter 2019). Arguably, magnetic helicity plays the most crucial part in dynamo theory, which is often called upon to explain the generation and maintenance of the so-lar magnetic field (Moffatt 1978;Brandenburg & Subramanian 2005;Brandenburg 2018;Rincon 2019). Specifically the α effect, occurring in systems with stratification and rotation, is expected to be an important inductive effect in the solar dynamo. Under isotropic and homogeneous conditions α is known to be related to the kinetic helicity of the flow and is a measure of the helical nature of turbulence within the Sun's convection zone. It has been shown that the α effect generates bihelical magnetic fields, that is, magnetic helicity at small and large scales of opposite signs, hence resulting in no net production of magnetic helicity (Seehafer 1996;Ji 1999;Yousef & Brandenburg 2003). For the Sun, another sign change of magnetic helicity is expected across the equator, due to the Coriolis force breaking reflectional symmetry. Thus we have a hemispheric sign rule (HSR, see Singh et al. 2018, for details). The HSR implies a positive (negative) sign of magnetic helicity at large (small) scales in the northern hemisphere and vice versa in southern hemisphere. Observational evidence for such a sign rule will be an indirect confirmation of the role played by the α effect in generating largescale solar magnetic fields.
Article number, page 1 of 10 arXiv:2104.07588v1 [astro-ph.SR] 15 Apr 2021 A&A proofs: manuscript no. main Magnetic helicity is defined in terms of A, the magnetic vector potential and the magnetic field, B, as (1) The first hurdle in infering magnetic helicity observationally arises due to the fact that A in Eq. (1) is not an observed quantity and secondly, the information about B is usually not known over the entire volume. Given these restrictions, prior efforts to study the magnetic helicity of ARs used current helicity H C = J · B V as a proxy, where J is the current density and the angle brackets denote volume averages. Additionally the simplifying assumption of a force-free magnetic field is made (Seehafer 1990;Pevtsov et al. 1995;Bao et al. 1999;Zhang et al. 2010). If in Eq. (1) B has a non-zero normal component at the boundary of the integration volume, then the volume integral cannot be determined in a gauge invariant manner. This is true for most astrophysical systems including the Sun. For such situations the concept of relative magnetic helicity can prove useful (Berger & Field 1984;Finn & Antonsen Jr 1985): in this approach, helicity is defined with respect to a reference field, usually a current-free one. Relative magnetic helicity is often used to analyse solar observations, as is demonstrated in a recent study by Thalmann et al. (2019). Using nonlinear forcefree field extrapolations as input, these approaches involve an explicit computation of A making suitable gauge choices. For a review of such and some other related methods see Valori et al. (2016). Using a toroidal-poloidal decomposition (Chandrasekhar 1961) of vector fields in spherical geometry, Pipin et al. (2019) compute the magnetic helicity from solar synoptic maps by reconstructing A, again making a particular gauge choice. In their analysis they separate the large and small scales relying on azimuthal averages, wherein the small-scale magnetic helicity density includes contributions from all scales except the axisymmetric mean field, including the large-scale non-axisymmetric contributions. Lund et al. (2020) also resort to such a decomposition, applying it on stellar data retrieved via Zeeman-Doppler imaging (ZDI, Semel 1989), although they report large-scale average magnetic helicity density on stellar surfaces. However, in these methods, the total value of magnetic helicity density does not provide us the distribution of helicity, specifically its sign, over scales.
To study the dynamo problem, for which the segregation of helicity over spatial scales is expected, methods focused on inferring spectral distribution of magnetic helicity from observations are better suited. Zhang et al. (2014Zhang et al. ( , 2016 inferred such a spectrum of magnetic helicity from local patches, invoking the two-point correlation tensor for magnetic field in Cartesian geometry. Brandenburg et al. (2017) extended this approach to inhomogeneous systems by using the two-scale analysis of Roberts & Soward (1975), applicable to cases where magnetic helicity varies slowly, on a scale somewhat smaller than the scale of the system. It is important to note that these methods avoid any issues with a gauge choice by transforming into Fourier space with the implicit assumption of periodicity. Recently Prior et al.
(2020) demonstrated a wavelet based multi-resolution analysis to infer magnetic helicity which is applicable for inhomogeneous systems with non-periodic boundaries. They also avoid computing the vector potential and thus avoid making a gauge choice by relying on a topologically meaningful definition of helicity in terms of B. The investigation of the helicity distribution on global scales, i.e. over the whole surface of the Sun or other stars, requires the use of a spherical geometry. To investigate the helicity distribution over scales on the surface of the Sun or other stars, the observations are available in spherical geometry. In this context Brandenburg et al. (2017) regarded their Cartesian approach as preliminary and highlighted the need to do an analogous analysis in spherical harmonics. Prior et al. (2020) also assume a Cartesian volume for their multi-resolution wavelet decomposition.
In this paper we rely on a similar topological definition of helicity in terms of linking of B, and adapt it to spherical geometry by using spherical harmonics. Here we extend the Cartesian approach of Brandenburg et al. (2017) and do a treatment of scales based on spherical harmonic degree in contrast to the approach of Pipin et al. (2019) which is based on azimuthal averaging. Our method is suited for solar and stellar observations, where photospheric magnetic field observations are available in spherical geometry via spectropolarimetric inversions or ZDI. Particularly for the Sun, it also enables access to higher cadence full disk magnetogram data. It is also readily applicable to solar/stellar dynamo models, where the induction equation is typically expressed in B and numerically integrated, to compute magnetic helicity from such models and compare them with observations, where A is not available.
This paper is organized as follows: In Sect. 2 we describe our present method for spherical geometry in the context of the existing Cartesian framework. In Sect. 3, we test this formalism against an analytical expression of a magnetic field on a spherical shell. Moreover, we also apply it to a three-dimensional turbulent dynamo simulation in spherical geometry. Finally we also apply a simple modification of our approach to synoptic maps of the Sun and compare it with previously obtained results. We discuss the scope of applicability of our formalism to observations in Sect. 4

Definitions
We begin by defining the spectra for magnetic energy and helicity on a spherical shell. In such situations it is convenient to use spherical harmonics, Y m (θ, φ), where represents the degree and m the azimuthal order. Thus we can define the spectra of magnetic energy as, , and the star symbol ( * ) denotes the complex conjugate of the coefficient. On such a spherical shell we have dΩ = 4π as the surface area of a unit sphere. Analogously, following Eq. (1), we can define a spectrum of magnetic helicity as These spectra can be directly related to the values of magnetic energy and helicity using Plancherel's theorem: As has been demonstrated in Moffatt (1969); Berger & Field (1984), for a given field B, we can define the magnetic helicity in terms of the linkage of its flux, thus using the Gauss linking formula : This definition is equivalent to that of Eq.

Cartesian geometry
(a) Homogeneous case: In this section we first reiterate the approach delineated in Moffatt (1978) that relates the correlation function of the magnetic field to its energy and helicity in homogeneous conditions. The magnetic energy spectrum, , which depends on the separation ξ between the two points. This tensor is assumed to be independent of the position vector x under homogeneous conditions; the brackets denote an ensemble average and k is the conjugate variable to x spanning the 2D Cartesian surface. The scaled magnetic helicity spectrum, (b) Inhomogeneous case: This formalism was extended to inhomogeneous conditions in Brandenburg et al. (2017). Under such conditions, for a given magnetic field B(x, t), with x being the position vector at a time t, its two-point correlation tensor in Fourier space takes the form of Here K is the conjugate variable to X = (x + x )/2, the slowly varying coordinate, and k the conjugate to x = x − x , the distance between the two points around X. For details see Roberts & Soward (1975); Brandenburg et al. (2017). For brevity we henceforth omit specifying explicitly the time dependence. Then the spectrum for magnetic energy and helicity are given by where dΩ = 2π. Therefore, the trace ofM i j gives the magnetic energy and its skew-symmetric part the magnetic helicity. Equation (9) is related to the definition of helicity in Eq. (6). The spectrum is thus computed by the product of magnetic fields that are shifted by a wavenumber corresponding to the large-scale modulation of the slowly varying coordinate. We will draw upon this idea in Sect. 3.2.

Spherical geometry
(a) Homogeneous case: For a quantity distributed on a sphere, the use of an angular correlation function to extract its power spectrum has been demonstrated by Peebles (1973) in the context of cosmology. Here we apply these principles to an angular correlation tensor of the total magnetic field vector on the observed surface of a star. For the magnetic field vector at two positions Ω 1 and Ω 2 on a unit sphere, the correlation function is of the form (see Appendix A for details), with Ω = (θ, φ), and θ and φ are the colatitude and azimuth respectively and χ 12 is the angle between the two directions Ω 1 and Ω 2 . Here we assume homogeneity, where M i j is assumed to depend only on the separation χ. The delta function ensures the product is evaluated at the angular separation and the denominator is needed for normalisation (Peebles 1973). Now, analogous to the Cartesian case, the spectrum of magnetic energy is given by the trace of the correlation tensor as (see Appendix B) and the scaled spectrum of magnetic helicity is given by its skewsymmetric part (see Appendix C), Here, ∇ ≡ ∂/∂θ 2 + (1/ sin θ 2 ) ∂/∂φ 2 acts on location Ω 2 (θ 2 , φ 2 ), and χ is the angular separation between Ω 1 and Ω 2 ; see Appendix C for a derivation and note that kR ≈ + 1/2 by the Jeans relation where R, taken here as unity, is the radius of the sphere. We use the general expression given in Eq. (C.4), which directly determines the linkages of magnetic field lines to yield the magnetic helicity, and is also applicable to the inhomogeneous case discussed below. Equation (12), as written above, may be obtained by first taking the ensemble average of Eq. (C.4) and then using the homogeneous form of M i j (χ) given in Eq. (10).
(b) Inhomogeneous case: We focus here on slow latitudinal variation of magnetic helicity which has opposite signs in the two hemispheres; see Singh et al. (2018) for the expected HSR of the Sun. As noted in Appendix C, the two-point correlation function M i j (Ω, χ) depends on both, the position on the sphere as well as the separation between the two points; Ω here represents a mean location that lies between the two points. In exact analogy to the Cartesian case discussed earlier in Section 2.2, we find that the inhomogeneous case corresponds simply to a shift in the spherical degree by, say, L, while determining the spherical transform of M i j ; see equations (7) and (9)  correspond to the two components of the magnetic field. We have chosen L = 1 in the present study where it corresponds to the large scale modulation of the magnetic helicity; as P 1 (cos θ) = cos θ, it naturally involves a sign change across the equator where θ = π/2. To show the spectrum of magnetic helicity in the sections below, we adopt a sign convention that corresponds to the northern hemisphere, where the large-scale fields have positive helicity.

Testing the method
To test whether our formalism allows us to infer the spatial distribution magnetic helicity over a sphere relying only on B, we subject it to cases where we know both A and B. In Sect. 3.1, we use an analytical expression of a fully helical magnetic field, and in Sect. 3.2 a simulated magnetic field generated by a turbulent dynamo. Finally, we apply it to synoptic vector magnetograms of the Sun in Sect. 3.3.

Fully helical field
Chandrasekhar & Kendall (1957) derived general solutions of the equation ∇ × B = αB, in the context of force-free magnetic fields for spherical geometry commonly known as Chandrasekhar-Kendall functions. Here we use these functions, T = ∇ × (φr) and S = ∇ × T/α, to define the vector potential on a unit sphere as A = T + S. We expand φ in spherical harmonics as φ = m c m Y m (Ω), assume axisymmetry and ignore the radial dependence of the coefficients c m while choosing their values in a random fashion. Thus we have the vector potential as, Here, L 2 is the angular part of the Laplace operator in spherical geometry such that L 2 Y m = − ( + 1)Y m and α = √ ( + 1). From this the magnetic field follows as B = ∇ × A = α(T + S).
To evaluate this numerically we use the Python interface of SHTOOLS (Wieczorek & Meschede 2018). Figure 1 shows the distribution of magnetic helicity obtained from such a configuration. We apply Eq. (12) only to the magnetic field and compare the magnetic helicity spectra thus obtained with the one that we have a ready access. Figure 2 shows that it is possible to retrieve the spherical magnetic helicity spectrum (SMHS) over all scales using the angular correlation function to a very high degree.

Magnetic helicity from simulations of a turbulent dynamo
Another suitable test case is a simulated magnetic field from a model, where dynamo action occurs in a turbulent fluid in a spherical domain (r, θ, φ). We employ 3D hydromagnetic simulations of an isothermal gas where turbulence is driven by forcing the momentum equation with a helical forcing function using the Pencil Code (Brandenburg et al. 2020). Along with the continuity and momentum equation, the Pencil Code solves the induction equation for A, where U is the velocity field, η is the magnetic resistivity, ψ is the electrostatic potential and µ 0 is the magnetic permeability. This formulation ensures the solenoidality of B, thus the vector potential is readily available with the Pencil Code. Here we use the resistive gauge, ψ = η∇ · A, for our simulations. The simulation domain spans 0.7R 0 ≤ r ≤ R 0 in radius, to mimic the convection zones of solar-like stars. Its extent in colatitude is 2π/5 ≤ θ ≤ 3π/5 and π/2 in the azimuthal direction, hence our simulation domain is wedge shaped. We use periodic boundary conditions in the azimuthal direction. For velocity, stress-free and impenetrable boundary conditions are used for both boundaries in the radial and latitudinal direction. For the magnetic vector potential, at both latitudinal boundaries and at the bottom, perfect conductor boundary conditions are used, whereas at the top boundary a radial field condition is used. These conditions allow for magnetic helicity fluxes out of the system.
A more detailed description of the model, including the forcing function, can be found in Warnecke et al. (2011), with a key difference being that we only have a single layer model in radius, implying that the forcing is applied at all radial locations. We limit the extent in θ and φ for computational reasons, and resolve our model with a grid of 128 × 256 × 256 points in radius, latitude and longitude, respectively. We apply the forcing at a length scale ten times smaller than the radial extent with maximally helical forcing. We produce two different models: in Run A we keep the sign of forcing the same for both hemispheres, corresponding to a negative kinetic helicity (U·ω with ω = ∇×U) over the entire domain, while in Run B we vary its sign with cos(θ), mimicking the hemispheric sign rule expected for the Sun.
The magnetic Reynolds number, Rm, a non-dimensional parameter quantifying the effects magnetic advection to diffusion, is 9.5 for Run A and 19.2 for Run B. The magnetic Prandtl number, Pr M = ν/η, for both runs is unity. Here ν is the kinematic viscosity. Figure 3a shows the φand time-averaged profiles of kinetic helicity at r 1 ≈ 0.81R 0 . For Run A it is negative over the entire domain, and for Run B, it changes sign across the equator from negative to positive from northern to southern hemisphere. For such helically forced dynamos, the magnetic helicity is expected to be dominated by large-scale fields and its sign is expected to be opposite to that of kinetic helicity (Brandenburg 2001). This behaviour is reflected in our simulations as seen in Fig. 3b for both Runs A and B.
At first we focus on Run A, which is homogeneously forced and thus our formalism in Sect. 2.3(a), assuming homogeneity, is applicable to it. Figure 4a shows the magnetic energy and scaled helicity spectra obtained directly from the simulation using the magnetic field and vector potential as input. We use equations (2) and (3) to compute these spectra. In contrast, the energy and scaled helicity spectra shown in Fig. 4b are obtained using only the magnetic field with equations (11) and (12). This shows that SMHS (Fig. 4b) computed using the angular correlation function of magnetic field recovers a bihelical spectrum with positive (negative) sign at large (small) scales, which is in very good agreement with the actual helicity spectrum of the simulation (Fig. 4a). All spectra are computed at a depth of r 1 at one instance in time, and then averaged over time after the large-scale field has saturated. We note that the realisability condition of |H M | ≤ 2r 1 E M /( + 1) (Moffatt 1978;Kahniashvili et al. 2013) is met. The energy spectrum shows an approximate −5/3 behaviour below the injection scale ( ≈ 42). Following Eq. (5), the ratio of magnetic helicity computed in real space to that of spectral space is ≈ 1.06 which points to a reasonable agreement. We note that the strong "dip" at ≈ 20, recovered by both methods, could indicate that in these models helicity fluxes out of the domain occur at these scales. This is allowed by the boundary conditions, but a thorough analysis of this phenomenon is out of the scope of the present study.
As mentioned above, this simulation was done with a choice of resistive gauge. Therefore, to test the robustness of our results against the gauge choice made, we performed an additional run identical to Run A but with a Weyl gauge, ψ = 0. Using the Weyl gauge, the SMHS (not shown here) retrieved using the angular correlation function of magnetic field is bihelical. And as above, the ratio of helicity computed in real space to spectral space is ≈ 1.03, thus highlighting the gauge-invariance of our approach.
For Run B, the inhomogeneous forcing results in magnetic helicity slowly changing sign as a function of colatitude at both large and small scales, where Fig. 3a reflects the opposite signs of helicity at large-scales in the two hemispheres. Such behaviour is expected in the Sun and other stars. For magnetic field extracted at r 1 from Run B, we applied the formalism presented in Sect. 2.3(b) and the spectra thus obtained are shown in Fig. 5. It indeed allows us to extract the bihelical spectrum of magnetic helicity with signs corresponding to that of the north hemisphere, even though the helicity changes sign as a function of latitude. As an additional confirmation, following Eq. (5) we computed the ratio of helicity in real space to spectral once again, but computing the magnetic helicity in real space over the north hemisphere only. We retrieve a value of ≈ 1.06 from the spectrum in Fig. 5 which is again proving the accuracy of our method.

Solar observations
As a final test of the applicability of the formalism put forth in Sect. 2.3(b) to inhomogeneous systems, we apply it on synoptic vector magnetograms of the Sun, where a change in sign of helicity depending on the hemisphere is expected. Singh et al. (2018) studied 74 synoptic Carrington rotations (CRs) maps, using the Cartesian two-scale formalism, based on Vector Spectromagnetograph (VSM) data of the SOLIS project (Keller et al. 2003;Balasubramaniam & Pevtsov 2011). They recovered a bihelical spectrum in a majority of cases studied. We choose here the CR 2156 of the same dataset, close the the maximum of the solar cycle 24. This CR was reported to show a clear bihelical spectrum, with the signs at large and small scales following the HSR, like the majority of other CRs during cycle 24. However, it was found to be peculiar in the sense that it shows higher power and a positive sign of helicity at intermediate scales, in comparison to the other CRs where a negative sign of helicity was prominent at these scales. Singh et al. (2018) interpreted this as a sign of the dominance of the large-scale magnetic field due to its "rejuvenation" close to the solar maximum.
Even though higher resolution data is available, we chose here to continue using SOLIS data to enable a better comparison. This way we avoid instrumental and data reduction related differences such as varying instrumental resolution and disambiguation methods needed for resolving the 180 • ambiguity of the transverse (perpendicular to line-of-sight) component of the magnetic field. Further details of the SOLIS synoptic map used here can be found in Singh et al. (2018).
In Fig. 6a, we reproduce Fig. 7 of Singh et al. (2018) for CR 2156 using the Cartesian two-scale formalism, that is equations (8) and (9). In panel b) of the same figure, we show the magnetic energy and SMHS of the same CR, computed using Eq. (11) and the steps described in Sect. 2.3(b) respectively. The spectra shown in these two panels are in very good agreement  Magnetic energy (solid) and scaled helicity spectra (dashed) obtained at a depth of r 1 for Run A. In panel a) the energy and helicity spectra are obtained using the magnetic field and vector potential directly from the simulation data, whereas in panel b), we use the angular correlation function given by Eq. (10) to evaluate the energy spectra and the SMHS using only the magnetic field data.  Magnetic energy (solid) and scaled helicity spectra (dashed) for Run B. Both spectra are obtained using the angular correlation function shown in Eq. (10). The energy spectrum is obtained using Eq. (11) and the SMHS with the formalism described in Sect. 2.3(b) and reveal the bihelical nature of the solar magnetic field. The magnetic helicity for this CR peaks at 209 − 300 Mm which is an even larger scale than the 160 Mm reported by Singh et al. (2018). This lends support to their rejuvenation argument. We note, however, that SMHS recovers somewhat less power and energy at the largest scales than the Cartesian approach, and, consequently, the spectral slope corresponding to lower k is steeper in the SMHS case, and no longer clearly consistent with the Kazantsev scaling, k 3/2 . At the higher wavenumbers, SMHS shows more power and energy and hence a less steep spectral slope is observed than in the Cartesian approach.
A contrasting interpretation of the same CR is reported by Pipin et al. (2019). They find this CR to be a violation of HSR since its small-scale magnetic helicity density in the southern hemisphere is negative. They attribute this to the emergence and long-term presence of a prominent active region (NOAA 12192) with negative helicity in the southern hemisphere. However, they separate small and large scales purely based on azimuthal averaging. As a result, their definition of small-scale magnetic he-licity density also includes large-scale non-axisymmetric contributions. We regard this definition as a possible source for the dissimilar interpretations: In the case of SMHS, the presence of a HSR-violating AR in this particular CR is seen as increased power at intermediate to large scales, with the sign agreeing with the low-k (large scale) part of the helicity spectrum. This highlights that categorising a CR as a violation of HSR or not is a delicate issue. SMHS offers a much richer picture, and hence can be regarded as a better-suited tool for such classification.

Discussion
Our aim with this study was to extend the Cartesian formalism for inferring spectral distributions of magnetic energy and helicity using the two-point correlation tensor to spherical geometry. The need for this was alluded to in Brandenburg (2018), since the analysis of Brandenburg et al. (2017) maps the magnetic field vector data from solar observations to a 2D Cartesian surface. Apart from loosening this restriction, going to spherical geometry additionally allows us to infer helicity spectra directly from full disk magnetograms, instead of waiting for the build-up of a synoptic map for one Carrington rotation. Analogously, using ZDI based magnetic field observations (for example Vidotto 2016) such spectra can also be retrieved for other stars limiting to lower spherical harmonic degree, similar to the study of Lund et al. (2020) who reported average magnetic helicity density using stellar ZDI data. It also enables comparison with state-of-theart dynamo models of the Sun or stars, which mostly solve the induction equation for B. Using our formalism one can readily compute magnetic helicity spectra without explicitly computing A. For most of the above mentioned observations and models, a change in sign of kinetic and magnetic helicity across the equator owing to the Coriolis force breaking reflectional symmetry is expected. Our formalism in Sect. 2.3(b) (also suggested by Brandenburg 2019) by correlating fields at spherical harmonic degrees shifted by one, is particularly suited for such cases. Our tests in Sects. 3.2 and 3.3 confirm its applicability to inhomogeneous systems. Thus we can confirm and extend findings of previous studies focusing on the HSR, reported, e.g., in Singh et al. (2018); Pipin et al. (2019).
Cross-helicity is also expected to play a role in generating large-scale magnetic fields (Yokoi 2013  determined cross helicity from observations (Zhang & Brandenburg 2018, and references therein) mostly with the line-of-sight component of the velocity field. However, information about the full velocity field vector can also be obtained for a significant portion of the full disk as demonstrated in Rincon et al. (2017). This velocity field vector can be used with our method to infer cross-helicity spectra (u · b).

Conclusions
In order to investigate mechanisms responsible for largescale magnetic fields present in the Sun and other stars, having a knowledge of magnetic helicity and specifically its distribution over scales is of importance. In this study, we demonstrate an extension of an existing Cartesian formalism, relying on the two-point correlation tensor of the magnetic field, to spherical geometry. This allows us access to magnetic helicity spectra in a gauge-invariant manner by appealing to a more fundamental definition of helicity in terms of the linkage of the magnetic field lines. We tested this approach on a variety of illustrative examples before demonstrating its application to the solar vector synoptic maps. This enables an extensive analysis of different datasets from different instruments, to vet the robustness of the bihelical nature of solar magnetic field against instrumental effects.
Our approach naturally captures the bihelicity of the magnetic field in each hemisphere, and also the slow modulation of the helicity as function of latitude. This is relevant for the Sun, where magnetic helicity at both, large and small scales, is expected to change sign across the equator. The true nature of the helicity distribution over the whole sphere is revealed, and a potential contamination of power and sign of the helicity from both hemispheres is avoided. Such a contamination could easily lead to an apparent violation of the HSR even when the rule is obeyed. The method discussed here remedies this, and it is expected to find applications in systems involving such rich distribution of magnetic helicity. M i j (χ) = B i (Ω 1 )B j (Ω 2 )δ(cos χ 12 − cos χ) dΩ 1 dΩ 2 δ(cos χ 12 − cos χ) dΩ 1 dΩ 2 , (A.1) where χ 12 is the angle between the directions Ω 1 = Ω 1 (θ 1 , φ 1 ) and Ω 2 = Ω 2 (θ 2 , φ 2 ) which are the position vectors of the two points on the spherical surface; θ's and φ's represent the colatitude and azimuth, respectively. The homogeneity is ensured by the delta function in Eq. (A.1) where the correlation function depends only on the angular separation χ, and the angular integrals yield an average over the sphere. The normalization in the denominator may be determined by expanding the delta function in Eq. (A.1) in terms of the Legendre Polynomials as δ(cos χ 12 − cos χ) = a P (cos χ 12 ) .