Issue 
A&A
Volume 577, May 2015



Article Number  A125  
Number of page(s)  8  
Section  The Sun  
DOI  https://doi.org/10.1051/00046361/201423859  
Published online  13 May 2015 
Estimating the magnetic field strength from magnetograms
^{1} Instituto de Astrofísica de Canarias, 38205 La Laguna, Tenerife, Spain
email: aasensio@iac.es
^{2} Departamento de Astrofísica, Universidad de La Laguna, 38205 La Laguna, Tenerife, Spain
Received: 21 March 2014
Accepted: 25 March 2015
A properly calibrated longitudinal magnetograph is an instrument that measures circular polarization and gives an estimation of the magnetic flux density in each observed resolution element. This usually constitutes a lower bound of the field strength in the resolution element, given that it can be made arbitrarily large as long as it occupies a proportionally smaller area of the resolution element and/or becomes more transversal to the observer while still produce the same magnetic signal. However, we know that arbitrarily stronger fields are less likely – hG fields are more probable than kG fields, with fields above several kG virtually absent – and we may even have partial information about their angular distribution. Based on a set of sensible considerations, we derive simple formulae based on a Bayesian analysis to give an improved estimation of the magnetic field strength for magnetographs.
Key words: Sun: magnetic fields / methods: data analysis / methods: statistical
© ESO, 2015
1. Introduction
The activity of the Sun (and of a large percentage of other stars) is driven by the presence of magnetic fields. It was realized long ago that it is important to carry out systematic observations of the surface magnetism of the Sun if we ever want to understand its activity cycle and that of other stars. This possibility become a reality after the discovery of the Zeeman effect (Zeeman 1897) that a magnetic field produces on some spectral lines, which leads to a splitting in frequency of the σ and π components, and the discovery that this effect can be seen and measured on the Sun (Hale 1908).
A breakthrough occured when Babcock (1953) developed the longitudinal magnetograph, a device that measured the lineofsight (LOS) component of the magnetic field over an area of the surface of the Sun. In order to measure the magnetic field, this apparatus performs a measurement of the intensity I(λ) and circular polarization V(λ) of a magnetically sensitive spectral line in a certain narrow filter with transmission p(λ), and returns the following quantity (e.g., Landi Degl’Innocenti & Landolfi 2004): (1)The importance of this quantity resides in the fact that it can be easily related to the magnetic flux density (Φ) across the resolution element of the instrument (pixel)^{1}. To this end, a number of simplifying conditions have to be imposed, the most important of which is the assumption that the field is in the weakfield approximation (e.g., Landi Degl’Innocenti & Landolfi 2004). If this holds, the measured signal is simply given by (2)where C is a calibration constant that needs to be obtained from a proper modeling of the line formation mechanism and depends on the exact details of the filter p(λ) and the selected spectral line. Once the instrument is calibrated, Φ = S_{V}/C gives the estimated magnetic flux density. When the calibration is assumed to be perfectly known and the noise in S_{V} is Gaussian, Φ = S_{V}/C constitutes the unbiased maximum likelihood estimation of the magnetic flux density.
From its conception, many longitudinal magnetographs have been in routine operation around the globe and on space. One of the most used is the Michelson Doppler Imaging (MDI) onboard the Solar and Heliospheric Observatory (SoHO), which provided synoptic maps of magnetic flux density. Obviously, the fundamental drawback of any longitudinal magnetograph is that it only gives us partial information about the magnetic field in the observed region (Lites et al. 1999), giving a lower limit to the strength. In this paper we propose, using simple Bayesian inference, a way to probabilistically correct the measurements of longitudinal magnetographs in order to provide a better estimation of the magnetic field strength instead of just a lower limit. The correction relies on some sensible statistical a priori assumptions about the properties of the field in the observed resolution element that can be modified at will. This facilitates the adaptation of our suggested correction to any desired a priori assumption imposed by the researcher.
2. Bayesian analysis
2.1. Generative models
The first step in any Bayesian analysis is to write down an expression that describes how the observations are generated, the socalled generative model. If the field in the observed resolution element is resolved at the spatial resolution of the instrument (i.e., the magnetic field is assumed to be homogeneous and to fill the whole resolution element), then the magnetic flux density can be directly related to the magnetic field strength B in the weakfield limit (e.g., Landi Degl’Innocenti & Landolfi 2004). Without loss of generality, we assume that C = 1, so that our measurement is Φ = S_{V}. This avoids carrying the instrumentspecific constant C in all calculations. Therefore, the generative model for the resolved case is (3)where μ = cosθ is the cosine of the angle between the LOS and the magnetic field vector, while ϵ stands for the measurement noise, which we assume to have Gaussian statistics with variance . By only measuring Φ_{r}, a degeneracy between B and μ appears that cannot be resolved unless more information is added. We show in the following that the inclusion of priors helps to partially resolve this degeneracy.
When the field in the resolution element of our instrument is not resolved, it is useful to introduce the concept of a filling factor, f ∈ [0,1]. This quantity accounts for the fraction of the resolution element that is filled with a homogeneous magnetic field. The remaining 1 − f fraction is assumed to be fieldfree. Under the assumption that the presence of a magnetic field does not modify the thermodynamic conditions, the generative model for the nonresolved case is (4)It is possible to generalize these formulae for the case in which the thermodynamic conditions are different in the magnetic and the nonmagnetic regions (Landi Degl’Innocenti & Landolfi 2004), but we prefer to stick to these simple cases, although our analysis is fully generalizable to these cases.
2.2. Posterior distribution
Once the magnetic flux density Φ_{obs} is measured, all the information about the model parameters of interest is encoded in the posterior distribution. The posterior distribution for the generative model of Eq. (4) is, applying the Bayes rule, given by (5)where p(B,μ,f  Φ_{obs}) is the posterior for the model parameters, p(Φ_{obs}  B,μ,f) is the likelihood that encodes the ability of the model to reproduce the observations, and p(B,μ,f) is the prior distribution that summarizes all the a priori information we have about the parameters. Finally, p(Φ_{obs}) is the evidence, a normalization constant that is unimportant here because it does not depend on the model parameters and that we drop in the following.
According to the statistics of the noise proposed in the generative model, the likelihood is given by a Gaussian distribution with variance : (6)For the sake of simplicity, we assume that B, μ, and f are a priori statistically independent, so that the prior factorizes as (7)We note that this step is just a simplification and more complicated a priori information can be easily introduced. In particular, it is possible to easily introduce the fact that stronger fields tend to be more vertical by writing a combined prior p(B,μ) that takes this property into account.
Our state of knowledge about the magnetic field strength after carrying out the observation with the magnetograph is computed by integrating f and μ from the posterior distribution of Eq. (5). Assuming complete ignorance of f by using a flat prior in the interval [0,1], the ensuing marginal posterior is (8)Once the posterior distribution is computed, it is easy to estimate upper limits to the magnetic field strength at a certain credibility limit. We later calculate B_{68} and B_{95} as the 68% and 95% upper limits.
It is essential to understand that the posterior distribution for the magnetic field strength will change depending on the election of the specific prior. Although this is obviously always the case, it is of special relevance to our problem because of the presence of strong degeneracies. For this reason, it is advisable to consider several priors and see how the results change with them. The first prior we consider is a lognormal distribution, as pointed out by Vögler (2003) and Vögler et al. (2005) using magnetoconvection simulations, (9)where B_{0} and σ_{b} are free hyperparameters, which we choose to be B_{0} = 38 G and σ_{b} = 1.2, following the results of Domínguez Cerdeña et al. (2006). We note that the average of a lognormal random variable equals , which equals 78 G for the values of the parameters. Although this value is slightly below those estimated by Trujillo Bueno et al. (2004), Shchukina & Trujillo Bueno (2011), and Rempel (2014), it decreases more slowly towards large magnetic field strengths than the exponential distribution present in the simulations or assumed by Trujillo Bueno et al. (2004). Our second prior is an exponential distribution (10)with B_{0} = 130 G (Trujillo Bueno et al. 2004; Rempel 2014) or B_{0} = 60 G (Rempel 2014). Although the three considered priors are very different, the results are relatively robust to this election.
Fig. 1
Marginal posterior distributions from Eq. (8) (left panel) and their ensuing cumulative distributions (right panel) for a standard deviation of the noise of σ_{n} = 5 Mx cm^{2} and different values of the observed magnetic flux density. The actual values of Φ_{obs} are indicated in the legend. Flat priors for f and μ are used. Each row shows the calculations for the different priors: (top) a lognormal prior with B_{0} = 38 G and σ_{b} = 1.2, (middle) an exponential prior with B_{0} = 130 G, and (bottom) an exponential prior with B_{0} = 60 G. 
3. Results
3.1. Ignorance about the topology of the field
When we are completely ignorant about the topology of the field, a reasonable assumption is to consider it, a priori, isotropic. To this end, we consider a flat distribution in μ, which yields a vector field uniformly distributed in solid angle. Figure 1 presents the marginal posteriors for a fixed standard deviation of the noise of σ_{n} = 5 Mx cm^{2}, typical of modern longitudinal magnetographs^{2}. We show the marginal posteriors for different values of the observed magnetic flux density. The left panels show the marginal posterior, while the right panels show the cumulative distribution. The computation is made using a proper numerical quadrature in μ. Each row corresponds to different priors, as discussed above. We note that the effect of the specific prior is somehow marginal, except in the tails of the posteriors. It is obvious that the exponential prior with B_{0} = 60 G disfavors strong fields and the tails of the posterior become less important.
Fig. 2
Same as Fig. 1 for a fixed observed magnetic flux of Φ_{obs} = 40 Mx cm^{2} and different values of the standard deviation of the noise σ_{n}. 
The curves in Fig. 1 are conditioned on the actual measured value of Φ_{obs}. Consequently, consecutive measurements of exactly the same resolution element would lead to slightly different curves. In order to see the influence of the noise, we show in Fig. 2 the marginal posteriors for a fixed value of Φ_{obs} = 40 Mx cm^{2} and for different values of σ_{n} for the three considered priors. The figure shows that, when the noise level is small, values of B below Φ_{obs} have very small probability. When the standard deviation of the noise increases, values of B< Φ_{obs} gain some probability. This result clearly exposes that, when the standard deviation of the noise is of the order of the measured magnetic flux density, Φ_{obs} is no longer a lower bound of the magnetic field strength. The differences among the priors are not very large except in the tails. This shows the robustness of the inference to the specific chosen prior.
The marginal posteriors indicate that there is some available information about the magnetic field strength on a single measure of the magnetic flux density. In essence, small values of B are preferred with respect to large values. The peak of the marginal posterior p(B  Φ_{obs}), the socalled marginal maximum a posteriori (MMAP) value, for the magnetic field is shifted towards increasingly large values when the measured Φ_{obs} increases. We extracted the MMAP values of the magnetic field strength from these curves and we show them in the upper panels of Fig. 3 with respect to the measured magnetic flux density for different values of the noise and for the three considered priors. For the cases with standard deviations of the noise below 10 Mx cm^{2}, it follows a relatively linear trend. For the remaining cases, large variations are a consequence of the specific noise realization in the displayed posterior (it will change from realization to realization). We have presented a powerlaw fit to the curves. Our proposal is to use this value as an estimation of the most probable value of the magnetic field strength when the effect of the inclination and filling factor are considered. This MMAP value is very robust to the specific hyperparameters of the prior p(B).
Fig. 3
Marginal maximum a posteriori (upper panel), percentile 68 (middle panel) and 95 (lower panel) obtained from the marginal posteriors computed from Eq. (8). Each curve corresponds to a different value of the standard deviation of the noise. The dashed lines are the fits to the curves, a straight line for B_{MMAP} and a function of the type αΦ^{β} for B_{68} and B_{95}. 
Fig. 4
Same as Fig. 1 for σ_{n} = 5 Mx cm^{2} and Φ_{obs} = 40 Mx cm^{2} and different values of the anisotropic index of the prior for μ. 
A problem that arises with the MMAP value is that it is biased towards small values of the field strength, given that the posterior distribution is heavily skewed. More information can be extracted, however, from the cumulative distribution functions shown in the right panels of Figs. 1 and 2, which allow us to put strict upper limits to the magnetic field. From these curves we have extracted the percentiles 68 and 95, and they are shown in the second and third panels of Fig. 3. Again, when the noise is not too large, they approximately fulfil the power laws shown in each panel. These percentiles are also quite robust to the specific election of the prior and its hyperparameters, although slightly more sensitive than the MMAP value.
Fig. 5
Posterior distribution for the transversal component of the field for different values of Φ_{obs} and σ_{n}. The value of the upper limit transverse field at 95% credibility is shown in each panel. The bin size is optimally chosen for each case. 
3.2. Anisotropic field distributions
It has been argued in the literature, both observationally (Stenflo 2010) and from simulations (Schüssler & Vögler 2008), that the distribution of fields might be anisotropic. A simple way of imposing this a priori is by modifying the flat prior for μ to (11)where the parameter a controls the anisotropy (a = 0 is an isotropic distribution, a → ∞ corresponds to vectors aligned with the LOS, while a< 0 forces fields to be predominantly orthogonal to the LOS). Figure 4 displays the marginal posterior for different values of a for the lognormal prior. For increasing values of a, the tails of the marginal posterior become less and less important, converging in the limit a → ∞ to a Gaussian distribution with mean Φ_{obs} and variance , i.e., what one would obtain by carrying out the inference assuming that  μ  = 1. For not very anisotropic distributions, the MMAP value is very robust to the specific anisotropy of the field distribution, such that the corrections derived above can be reliably applied.
Fig. 6
Original (upper panels) and deconvolved (lower panels) inferred parameters for the IMaX data of the first flight. First column: magnetic flux density. Middle column: inferred magnetic field strength, obtained as . Last column: our inferred upper limit to the field strength at 95% credibility. 
3.3. Transversal component
The Bayesian analysis we have carried out also allows us to put some constraints on the transversal component of the magnetic field, B_{⊥}. This might look surprising, but it is obvious that putting limits on B automatically puts limits on B_{⊥}. Given that the transversal component is given as a change of variables by , it is not possible to carry out the computations analytically. For this reason, we consider a numerical solution to the problem by sampling from the full posterior of Eq. (5) using a Markov chain Monte Carlo method^{3} and we compute the marginal posterior from the samples. The results are shown in Fig. 5, where we consider different values of the observed magnetic flux density and standard deviation of the noise. Each panel also shows the estimated value of the transversal component of the field at 95% credibility.
It is obvious that the correct way to have an estimation of the transversal component of the field is by observing the linear polarization components of the Stokes parameter. However, the results of Fig. 5 provide an upper limit based on sensible assumptions and on the observation of the magnetic flux density alone. When linear polarization is available, it is necessary to augment the generative model to include this information, as done by Asensio Ramos (2011).
3.4. Application to real data
We apply the previous formalism to the data obtained with IMaX (Martínez Pillet et al. 2011) on board Sunrise (Solanki et al. 2010) on the first flight in June 2009. Although IMaX is a vectorial magnetograph, that measures the four Stokes parameters, we only make use of the inferred magnetic flux density Φ_{obs} in our estimation of the magnetic field strength. One of the particularities of the IMaX mission is that both the original maps and those reconstructed with the phasediversity post facto reconstruction algorithm were provided (Paxman et al. 1992; Vargas Domínguez 2009). The left column of Fig. 6 displays the maps of Φ_{obs} in the two cases, demonstrating that the magnetic structures in the reconstructed maps are more compact than in the original ones. To have a rough estimation of the magnetic field strength, we compute it as , where B_{∥} and B_{⊥} are obtained using the simple calibration curves of Martínez Pillet et al. (2011). This is an imprecise but probably conservative approximation for a filterbased instrument. This estimation is shown in the middle column. As noted by Martínez González et al. (2012), the maximumlikelihood estimation of B_{⊥} is biased in the presence of noise – because B_{⊥} is obtained from (Q^{2} + U^{2})^{1 / 2}, a positive definite quantity even in the absence of signal – which results in the appearance of a pattern that mimics inverse granulation. Finally, the right columns of Fig. 6 display the upper limit at 95% credibility using our estimations for an exponential prior with B_{0} = 130 G and a very small noise variance (see the bottom central panel in Fig. 3). The upper limit field is larger for the deconvolved data, a consequence of correcting for the spatial spread introduced by the instrument.
Fig. 7
Comparison of the histogram (upper panel) and cumulative histogram (lower panel) of the magnetic field strength computed using a standard inversion code and our Bayesian approach at 95% credibility. 
As a further check of our approach, we have compared the upper limit at 95% credibility for the magnetic field strength with the results of a standard inversion with the SIR code (Stokes Inversion based on Response function; Ruiz Cobo & del Toro Iniesta 1992) of the data (kindly provided by L. Bellot Rubio) using a simple model comparable to a MilneEddington atmosphere. Figure 7 presents the results in the form of histograms (upper panel) and cumulative histograms (lower panel). The results are very similar, even reproducing the position of the peak.
4. Conclusions
We have shown that the application of Bayesian inference to the data obtained with longitudinal magnetographs can give some information about the magnetic field strength. This information is a product of the presence of priors on the magnetic filling factor and the inclination of the field. Our calculations have been done with very uninformative priors on the angular distribution of the magnetic field and prior distributions for the magnetic field strength extracted from analysis of simulations and observations of the quiet Sun. We demonstrate that our results are relatively robust to the specific election of the prior.
The calculations can be repeated introducing more informative priors for f, μ, and B in Eq. (8). Irrespective of the chosen prior, Eq. (8) is easy to compute using any suitable numerical quadrature for twodimensional integrals.
Although the units Mx cm^{2} and G are equivalent, we follow Keller et al. (1994) and use the former for the magnetic flux density to make its observational character explicit.
The code to reproduce the figures can be found on https://github.com/aasensio/magnetographCorrection
We use the emcee package developed by ForemanMackey et al. (2013).
Acknowledgments
We thank I. Arregui for very insightful discussions and L. Bellot Rubio for providing the quantities used in Fig. 7. Financial support from the Spanish Ministry of Economy and Competitiveness through projects AYA2010–18029 (Solar Magnetism and Astrophysical Spectropolarimetry) and ConsoliderIngenio 2010 CSD200900038 are gratefully acknowledged. A.A.R. also acknowledges financial support through the Ramón y Cajal fellowships.
References
 Asensio Ramos, A. 2011, ApJ, 731, 27 [NASA ADS] [CrossRef] [Google Scholar]
 Babcock, H. W. 1953, ApJ, 118, 387 [Google Scholar]
 Domínguez Cerdeña, I., Sánchez Almeida, J., & Kneer, F. 2006, ApJ, 636, 496 [NASA ADS] [CrossRef] [Google Scholar]
 ForemanMackey, D., Hogg, D. W., Lang, D., & Goodman, J. 2013, PASP, 125, 306 [CrossRef] [Google Scholar]
 Hale, G. E. 1908, ApJ, 28, 315 [Google Scholar]
 Keller, C. U., Deubner, F., Egger, U., Fleck, B., & Povel, H. 1994, A&A, 286, 626 [NASA ADS] [Google Scholar]
 Landi Degl’Innocenti, E., & Landolfi, M. 2004, Polarization in Spectral Lines (Kluwer Academic Publishers) [Google Scholar]
 Lites, B. W., Rutten, R. J., & Berger, T. E. 1999, ApJ, 517, 1013 [NASA ADS] [CrossRef] [Google Scholar]
 Martínez González, M. J., Manso Sainz, R., Asensio Ramos, A., & Belluzzi, L. 2012, MNRAS, 419, 153 [NASA ADS] [CrossRef] [Google Scholar]
 Martínez Pillet, V., Del Toro Iniesta, J. C., ÁlvarezHerrero, A., et al. 2011, Sol. Phys., 268, 57 [NASA ADS] [CrossRef] [Google Scholar]
 Paxman, R. G., Schulz, T. J., & Fienup, J. R. 1992, J. Opt. Soc. Am. A, 9, 1072 [NASA ADS] [CrossRef] [Google Scholar]
 Rempel, M. 2014, ApJ, 789, 132 [NASA ADS] [CrossRef] [Google Scholar]
 Ruiz Cobo, B., & del Toro Iniesta, J. C. 1992, ApJ, 398, 375 [NASA ADS] [CrossRef] [Google Scholar]
 Schüssler, M., & Vögler, A. 2008, A&A, 481, L5 [NASA ADS] [CrossRef] [EDP Sciences] [Google Scholar]
 Shchukina, N., & Trujillo Bueno, J. 2011, ApJ, 731, L21 [NASA ADS] [CrossRef] [Google Scholar]
 Solanki, S. K., Barthol, P., Danilovic, S., et al. 2010, ApJ, 723, L127 [NASA ADS] [CrossRef] [Google Scholar]
 Stenflo, J. O. 2010, A&A, 517, A37 [NASA ADS] [CrossRef] [EDP Sciences] [Google Scholar]
 Trujillo Bueno, J., Shchukina, N., & Asensio Ramos, A. 2004, Nature, 430, 326 [Google Scholar]
 Vargas Domínguez, S. 2009, Ph.D. Thesis, Universidad de La Laguna, La Laguna [Google Scholar]
 Vögler, A. 2003, Ph.D. Thesis, Göttingen University [Google Scholar]
 Vögler, A., Shelyag, S., Schüssler, M., et al. 2005, A&A, 429, 335 [NASA ADS] [CrossRef] [EDP Sciences] [Google Scholar]
 Zeeman, P. 1897, Phil. Mag., 43, 226 [Google Scholar]
All Figures
Fig. 1
Marginal posterior distributions from Eq. (8) (left panel) and their ensuing cumulative distributions (right panel) for a standard deviation of the noise of σ_{n} = 5 Mx cm^{2} and different values of the observed magnetic flux density. The actual values of Φ_{obs} are indicated in the legend. Flat priors for f and μ are used. Each row shows the calculations for the different priors: (top) a lognormal prior with B_{0} = 38 G and σ_{b} = 1.2, (middle) an exponential prior with B_{0} = 130 G, and (bottom) an exponential prior with B_{0} = 60 G. 

In the text 
Fig. 2
Same as Fig. 1 for a fixed observed magnetic flux of Φ_{obs} = 40 Mx cm^{2} and different values of the standard deviation of the noise σ_{n}. 

In the text 
Fig. 3
Marginal maximum a posteriori (upper panel), percentile 68 (middle panel) and 95 (lower panel) obtained from the marginal posteriors computed from Eq. (8). Each curve corresponds to a different value of the standard deviation of the noise. The dashed lines are the fits to the curves, a straight line for B_{MMAP} and a function of the type αΦ^{β} for B_{68} and B_{95}. 

In the text 
Fig. 4
Same as Fig. 1 for σ_{n} = 5 Mx cm^{2} and Φ_{obs} = 40 Mx cm^{2} and different values of the anisotropic index of the prior for μ. 

In the text 
Fig. 5
Posterior distribution for the transversal component of the field for different values of Φ_{obs} and σ_{n}. The value of the upper limit transverse field at 95% credibility is shown in each panel. The bin size is optimally chosen for each case. 

In the text 
Fig. 6
Original (upper panels) and deconvolved (lower panels) inferred parameters for the IMaX data of the first flight. First column: magnetic flux density. Middle column: inferred magnetic field strength, obtained as . Last column: our inferred upper limit to the field strength at 95% credibility. 

In the text 
Fig. 7
Comparison of the histogram (upper panel) and cumulative histogram (lower panel) of the magnetic field strength computed using a standard inversion code and our Bayesian approach at 95% credibility. 

In the text 
Current usage metrics show cumulative count of Article Views (fulltext article views including HTML views, PDF and ePub downloads, according to the available data) and Abstracts Views on Vision4Press platform.
Data correspond to usage on the plateform after 2015. The current usage metrics is available 4896 hours after online publication and is updated daily on week days.
Initial download of the metrics may take a while.