Inference of the chromospheric magnetic field orientation in the Ca ii 8542 Å line fibrils
^{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
^{3} Institute for Solar Physics, Dept. of Astronomy, Stockholm University, Albanova University Center, 10691 Stockholm, Sweden
Received: 20 September 2016
Accepted: 15 December 2016
Context. Solar chromospheric fibrils, as observed in the core of strong chromospheric spectral lines, extend from photospheric field concentrations suggesting that they trace magnetic field lines. These images have been historically used as proxies of magnetic fields for many purposes.
Aims. Use statistical analysis to test whether the association between fibrils and magnetic field lines is justified.
Methods. We use a Bayesian hierarchical model to analyze several tens of thousands of pixels in spectropolarimetric chromospheric images of penumbrae and chromospheric fibrils. We compare the alignment between the field azimuth inferred from the linear polarization signals through the transverse Zeeman effect and the direction of the fibrils in the image.
Results. We conclude that, in the analyzed fields of view, fibrils are often well aligned with the magnetic field azimuth. Despite this alignment, the analysis also shows that there is a nonnegligible dispersion. In penumbral filaments, we find a dispersion with a standard deviation of ~ 16°, while this dispersion goes up to ~ 34° in less magnetized regions.
Key words: Sun: chromosphere / Sun: magnetic fields / sunspots / polarization
© ESO, 2017
1. Introduction
The solar chromosphere can be observed in the core of strong lines with sufficient opacity to be sensitive to the physical conditions above the photosphere (e.g., Hα, Ca ii H & K, Ca ii infrared triplet, Mg ii h & k). It can also be observed in the He i D_{3} and λ10830 lines which are influenced by ultraviolet photons from the corona (Centeno et al. 2008). In active regions, these images at the core of strong lines show a conspicuous filamentary structure fanning out from photospheric magnetic field concentrations, suggesting that they trace the magnetic field lines. This makes fibrils a natural proxy for the magnetic field orientation. Similar fibrils are observed in the umbra, penumbra and superpenumbra of sunspots with a very dynamic behaviour (see Rouppe van der Voort & de la Cruz Rodríguez 2013; and Yurchyshyn et al. 2014).
The relation between fibrils and magnetic field lines is appealing and intuitive. However, to our knowledge, very few studies have tried to establish this assumption. The main reason is the low polarimetric noise of the spectropolarimetric observations required to obtain quantitative information of the magnetic field vector. This explains why the very few observational attempts to test this assumption have been performed in penumbrae and superpenumbrae of sunspots, where polarized signals are generally stronger. To this aim, de la Cruz Rodríguez & SocasNavarro (2011) used datasets in the Ca iiλ8542 line whereas Schad et al. (2013) and Schad et al. (2015) used He iλ10830 observations. The magnetic field vector inferred from these observations confirm, in most cases, the alignment between fibrils and the magnetic field, although de la Cruz Rodríguez & SocasNavarro (2011) found cases of considerable misalignment in their Ca ii data.
In particular, de la Cruz Rodríguez & SocasNavarro (2011) compared the visual orientation of fibrils with the inferred azimuth obtained from Zeemaninduced linear polarization measurements in the spectral line. The inherently noisy Stokes Q and U profiles (linear polarization appears at second order in the magnetic field in the Zeeman effect) forced them to average the Stokes parameters along a nonnegligible length of the fibrils to improve the signaltonoise ratio.
Leenaarts et al. (2015) studied the properties of fibrils using a 3D numerical simulation. The authors computed magnetic field lines starting at many seed points in the photosphere, and compared the orientation of the field with the 3D orientation of the fibrils where they found optical depth unity in the core of the Hα line. They concluded that fibrils in the simulation are mostly aligned with the horizontal component of the magnetic field, but not necessarily always aligned with the vertical component. More recently, MartínezSykora et al. (2016), using radiative magnetohydrodynamic simulations with a generalized Ohm’s law, have shown that the magnetic field is often not precisely aligned with chromospheric fibrils in places were the ambipolar diffusion is large. This is a consequence of the slip between the field lines and the neutral species produced by the decoupling between neutrals and ions.
Fig. 1 Left: clockwise the panels show Stokes I, Q, U and V images at Δλ = −140 mÅ from line center in the Ca ii 8542 line for the observation of the penumbra. The analysis has been carried out in the subfield indicated with a white rectangle. Right: fullStokes spectra corresponding to the pixel indicated with a red marker in the FOV. 

Open with DEXTER 
From an observational point of view, this work improves over that of de la Cruz Rodríguez & SocasNavarro (2011) by utilizing more advanced techniques and better observations that allow us to analyze all relevant pixels in the image, increasing the statistics to several tens of thousands pixels, thus avoiding any averaging. The first improvement is the application of the rolling Hough transform (Clark et al. 2014) to estimate the direction of the fibrils in all the pixels. The second improvement is the application of a fully Bayesian hierarchical model (Gelman & Hill 2007) for the estimation of the statistical properties of the misalignment distribution.
Fig. 2 Plage observations, marking the analyzed region with a rectangle. The left panel shows the images in the continuum (left column) and in the core of the Ca ii 8582 Å line. The right panel displays an artificial slit along the orange line for Plage 2. 

Open with DEXTER 
2. Polarimetric data
We consider spectropolarimetric observations of a penumbra and two plages around AR11793 recorded on July 19 and 22, 2013. The observations on July 19 started at 8:15 UT (plage) and 13:33 UT (penumbrae) at heliocentric distance μ = 0.91, while the observation at July 22 (plage 2) started at 08:33 UT at heliocentric distance μ = 0.90. Both datasets were obtained with the CRisp Imaging SpectroPolarimeter (CRISP, Scharmer et al. 2008), a dual FabryPerot interferometer mounted in telecentric configuration at the Swedish 1m Solar Telescope (SST, Scharmer et al. 2003). The spatial sampling is 0.059 arcsec/pixel. The data were processed using the CRISPRED package (de la Cruz Rodríguez et al. 2015). The seeing on July 19 was very good and no extra compensation for the atmospheric aberrations is applied. On the contrary, the MultiObject, MultiFrame BlindDeconvolution technique (MOMFBD; Löfdahl & Scharmer 1994; van Noort et al. 2005) is applied to the data of July 22. The MOMFBD technique can enhance the noise even though a spatial filtering is applied to reduce this effect. For this reason, we consider that it is advisable to use noncorrected data for a quantitative analysis of the Stokes profiles if they are expected to be very close or even below the noise level. The polarimetric calibration was performed independently for each pixel of the field of view (FOV) as proposed by van Noort & Rouppe van der Voort (2008). Finally, we selected observations very close to disk center for an easier identification of linear polarization signals with the real azimuth of the magnetic field (thus avoiding lineofsight effects).
The Ca iiλ8542 Å was sampled in the range ± 1.75 Å from the core of the line in 21 steps of different size: 70 mÅ close to the Doppler core of the line, 100 mÅ in the wings close to the core of the line, and 140 mÅ in the far wings. The sampling is thus almost a factor 2.3 better than that of the CRISP dataset used by de la Cruz Rodríguez & SocasNavarro (2011) and the exposure time is also twice as long (400 ms total integration time taking into account the 4 modulation states). The resulting noise level is in the range 4−6 × 10^{3} in units of the continuum intensity for Stokes Q, U and V. The upper left panel of Fig. 1 shows an example of the monochromatic image in the core of the line for the penumbra observation, where we clearly distinguish the fibrils that are assumed to be associated with magnetic field lines. In this study we have selected the limbside of the sunspot (indicated with a rectangle) because the Stokes Q and U signals are stronger there than in any other part of the FOV. The plage observations are summarized in Fig. 2. Because the signals are lower, in this case we show an artificial slit along the orange line to help the reader distinguish the presence of polarimetric signals. One can easily see Stokes V signals close to the footpoints, and linear polarization in between, something that is to be expected. This figure also shows that above the bright points the Stokes V signal appears in the photospheric wings (position 3′′ along the slit), but in general the polarization signals appear close to the chromospheric core of the line.
To interpret the polarimetric signals, we consider that the magnetic field strength is sufficiently weak that the Stokes parameters are formed in the socalled weakfield regime (Landi Degl’Innocenti & Landi Degl’Innocenti 1973). In this regime, the Zeeman splitting, Δλ_{B}, is much smaller than the Doppler broadening, Δλ_{D} (e.g., Landi Degl’Innocenti & Landolfi 2004). For a very broad line such as the infrared Ca ii 8542 Å line, this assumption is usually appropriate (de la Cruz Rodríguez et al. 2013), especially given that we are sensing the magnetic field in the chromosphere, which is expected to be weaker than in the photosphere. In this case, the weakfield approximation allows one to compute the magnetic field vector much faster than with a depthstratified nonLTE inversion where even the isotopic splitting of the Ca ii8542 line must be taken into account (SocasNavarro et al. 2000; Leenaarts et al. 2014). Although based on quite strong simplifying assumptions (Landi Degl’Innocenti & Landolfi 2004) a reasonably accurate magnetic field azimuth is still obtained. Under this approximation, the linear polarization profiles Q and U are given by the following expressions (where all the quantities are constant along the line of sight): (1)which are only valid on the wings of the line, as indicated with the subindex w. We choose the ranges [−350,−140] mÅ and [140,350] mÅ to compute these quantities, which are sufficiently far away from the line core but some Stokes Q and U signal is still measurable. Additionally, and according to Quintero Noda et al. (2016), these wing signals do still have a strong chromospheric contribution, with the response functions peaking very high in the atmosphere.
Fig. 3 Upper left panel: image at the core of the Ca ii line in units of the average continuum intensity in the quietest region of the map. Upper right panel: estimated fibril angle using the RHT in the considered pixels. Lower panels: maximumlikelihood estimation of the azimuth angle obtained from the Stokes Q and Stokes U signal using only wavelengths on the wings (left panel) or the full line profile (right panel). 

Open with DEXTER 
In the previous equations, is a constant that depends on the specific spectral line of interest, with the second order effective Landé factor for linear polarization (cf. Landi Degl’Innocenti & Landolfi 2004) and λ_{0} the central wavelength of the line. Additionally, B_{⊥} is the component of the magnetic field transverse to the lineofsight (LOS), φ is the azimuth of the field in the plane perpendicular to the LOS, λ is the wavelength and I(λ) is the Stokes I profile of the spectral line. Note that the numerical factor is valid if the field is measured in G and the wavelength in Å. The observed Stokes Q and U have been conveniently rotated so that the axis for which Stokes Q> 0 (defined by the projection of the axis of the polarimetric analyzer on the planeofthesky) lies along the vertical direction in the maps of Fig. 3.
One might also work with similar expressions that are valid on the entire line profile under more restrictive assumptions (see p. 407 of Landi Degl’Innocenti & Landolfi 2004). Such expressions are proportional to the second derivative of the intensity profile with respect to wavelength: (2)where now . All the subsequent calculations have been obtained using Eqs. (1), which gives less noisy results, as demonstrated in Fig. 3.
Using the formulation worked out by Martínez González et al. (2012), we estimated the maximumlikelihood value of the azimuth at each considered pixel. The results are displayed in the lower panels of Fig. 3. These results suggest an overall good alignment between azimuth angle and fibril direction but no information on the observational uncertainties has been considered in the analysis.
3. Detection of fibrils
To compare the field orientation inferred from the polarimetry to that from the fibrils, we need to have a reliable estimate of the fibril direction in all relevant pixels. To this end, we make use of the recently presented rolling Hough transform (RHT, Clark et al. 2014), developed for detecting fibrils and estimating their direction in images of the interstellar medium^{1}. The RHT is a generalization of the standard Hough transform and is obtained after the following steps:

A smoother version of the image is computed and thensubstracted from the original image. The smoothing is obtainedusing a tophat kernel of a certain widthD_{K}, which acts as a highpass filter to suppress large scales.

The resulting image is then thresholded and binarized to create a bitmask.

A disk of a certain diameter D_{W} is extracted at every point in the image and the standard Hough transform is computed in each disk.

Finally, the Hough transform for each disk is thresholded at a certain level Z to make sure that only obvious fibrils are detected as such.
As a consequence of its definition, the RHT is specially indicated to detect structures whose length is equal or longer than D_{W} and with a brightness contrast larger than the threshold Z. This is specially suitable for the relatively diffuse images of the core of the Ca ii line (see Clark et al. 2014, for more details).
The output of the rolling Hough transform is the discretized function R(θ,x,y), which is defined at each pixel position (x,y) and angle θ. This function describes, for each disk of diameter D_{W} centered at position (x,y), the angles of the dominant linear structures. A visualization of the linear structures can be obtained by computing the backprojection R(x,y), defined as: (3)Assuming that there is a preferential linear structure, the dominant azimuth at each pixel position is obtained by computing the circular statistics average at each pixel: (4)The upper right panel of Fig. 3 displays the angle of each linear structure in the penumbra as obtained applying the RHT to the image on the upper left panel of the same figure. We found that using D_{K} = 10, D_{W} = 55 and Z = 0.7 gives very good results but the results are not strongly dependent on small variations around these values. The reference angle is along the vertical direction. The umbra is removed from the azimuth map using a mask. In summary: we select dark structures in the map of the core brightness, we avoid the darkest regions in the continuum image to remove the umbra and we only choose points with a backprojection larger than 20% of the maximum (so that we only choose structures with a welldefined linear appearance). Once the dark filamentary structures are selected, the bright features are also trivially obtained as just the negative of the chosen mask (always discarding the umbra). We considered both the bright and dark structures in our analysis.
Fig. 4 Graphical model representing the conditional dependences among the variables of the statistical model. 

Open with DEXTER 
4. Inference of magnetic field azimuth
4.1. Bayesian hierarchical model
Under the presence of uncorrelated Gaussian noise, it is straightforward to write down the generative model used for explaining the linear polarization in the wings of the Ca ii line at the j = 1,...,N_{λ} sampled wavelengths and for a given pixel i = 1,...,N_{pix}. We modify Eqs. (1) to include the fibril angle estimated with the RHT and rechristen the azimuth to represent the misalignment between the magnetic field azimuth and the fibril direction: (5)where, for the sake of a simpler notation, we use , with the numerical derivatives being calculated using a quadratic Lagrangian interpolation. Note that, when φ_{i} = 0, one can safely state that the magnetic field is along the fibril direction.
We acknowledge that our treatment of noise is somehow simplified. We assume that the noise contributions, ϵ_{Q,ij} and ϵ_{U,ij}, are Gaussiandistributed random variables with zero mean and standard deviation σ_{n}. The standard deviation is estimated from the continuum wavelengths on the observations, where the linear polarization signal is expected to be zero. We find σ_{n} ~ 5−7 × 10^{3}I_{c}, where I_{c} is the continuum intensity. Under this framework, we are assuming that all sources of error (photon noise, uncertainty in the estimation of the fibril angle, fringes and any other systematic effect) are absorbed in these zero mean errors with variances empirically obtained from the data. Another particularity of our generative model is that it depends on an observed (and, consequently, noisy) quantity, . According to Asensio Ramos & Manso Sainz (2011), in such a case the noise variance should take this into account. For the moment, we neglect this second order effect in this work and we defer a more elaborate Bayesian treatment of all systematic and random uncertainties for a future publication.
If we analyze a single pixel i, the information about B_{⊥}_{i} and φ_{i} that can be extracted from the observations is summarized in the posterior distribution: (6)where is the likelihood associated to pixel i (with , Q_{i} and U_{i} vectors containing all the observed wavelengths for the pixel). Likewise, p(B_{⊥}_{i}) and p(φ_{i}) are priors that are assumed to be independent for all pixels. Applying this scheme to all pixels in the FOV, one may estimate the diversity in the misalignments by comparing their posteriors.
However, it is useful to make the assumption that all pixel share a common prior and use a hierarchical model to put together all the partial and uncertain information from each pixel to constrain this prior (e.g., Brewer & Elliott 2014). In other words, even though each pixel is characterized by B_{⊥}_{i} and φ_{i}, we put a common parametric prior that depends on the set of hyperparameters α_{φ} and α_{B}. These priors are shared by all pixels in the fieldofview (FOV). Using simple rules of probability calculus, it is easy to write the posterior distribution for all pixels simultaneously: (7)which is trivially inferred from the graphical model displayed in Fig. 4. In the previous equation, , Q and U contain all the observations for all pixels. As seen from the previous expression, the model includes a hierarchical prior for φ, which is made dependent on the set of hyperparameters α_{φ} (over which we set another prior to be consistent with the Bayesian framework). Given the assumption of uncorrelated noise in all pixels, the likelihood can be written as (see Appendix A): (8)with Given that our interest is to obtain statistical information about the azimuth in the whole FOV and we are not really interested in their specific values for individual pixels, we marginalize φ and B_{⊥} from the posterior distribution of Eq. (7): (9)
4.2. Priors and hyperpriors
The problem is fully defined once we set the parametric priors p(φ_{i}  α_{φ}) and p(B_{⊥}  α_{B}), and the hyperpriors p(α_{φ}) and p(α_{B}). Concerning the prior for the misalignment, we choose a vonMises distribution, which is naturally defined on the interval [−π,π] and is also naturally periodic. The vonMises distribution is one of the most used generalizations of the normal distribution for circular statistics and is quite flexible. Its functional form is: (10)which depends on the set of hyperparameters α_{φ} = (μ,κ). In the previous expression, I_{i}(κ) is the modified Bessel function of the first kind (Abramowitz & Stegun 1972). As κ increases, the vonMises distribution approaches a normal distribution with the same mean and standard deviation . To finalize, a suitable Jeffreys’type hyperprior p(μ,κ) is given by (Dowe et al. 1996): (11)with A(κ) = I_{1}(κ) /I_{0}(κ). However, we have checked that the more standard Jeffreys’ prior p(μ,κ) ∝ σ^{1} also works equivalently in our case (e.g., Gregory 2005). For computational reasons, we have used the almost equivalent inverse Gamma prior (12)which converges to the Jeffreys’ prior when α ≪ 1 and β ≪ 1.
To complete the problem, we choose a lognormal distribution for B_{⊥ ,i}: (13)which is parameterized by the location μ_{B} and scale σ_{B} parameters, α_{B} = (μ_{B},σ_{B}). Additionally, we set a standard Jeffreys’ prior through an inverse Gamma prior. The lognormal distribution naturally puts zero probability to B_{⊥ ,i} = 0, which arises naturally from a nonpathological vector field in three dimensions.
Fig. 5 The first and second columns show the marginal posterior for the hyperparameters of the vonMises prior for the misalignment (upper panels) and the lognormal prior for the perpendicular component of the magnetic field (lower panels) for the case of the penumbra. The plots show a histogram and a kernel density estimation using the samples. The rightmost column shows the Montecarlo estimate of the prior distribution for all considered pixels for both parameters. 

Open with DEXTER 
4.3. Variational method
The computation of the marginalization integral can be potentially carried out using Markov chain Monte Carlo techniques. However, given the large number of pixels we want to analyze, the integration becomes very time consuming. For this reason, we use an automatic variational approximation, as included in the Stan software (Kucukelbir et al. 2015). Variational inference relies on using a simpler parametric distribution to approximate the posterior distribution. In short, assume that our aim is to approximate the posterior distribution p(θ  X), where θ is the vector of parameters and X are the observations. If one considers the family q(θ  φ) of probability densities parameterized by the vector φ, it is possible to obtain an approximation to the posterior by computing the value of the parameters that give a smaller value of the KullbackLeibler divergence, D_{KL}, between the two distributions^{2} (e.g., Bishop 2006): (14)Since the KullbackLeibler divergence usually lacks a closed form, it is customary to maximize a slightly different problem, in which the evidence lower bound (L) appears: (15)where E_{q(θ)} [x] is the expectation value of x over the distribution q(θ). The variational approximation greatly simplifies the problem and allows it to scale very well when the number of observations and/or variables increases. We use the implementation of the variational approximation included in the Stan package (Carpenter et al. 2017)^{3}.
5. Results
Fig. 6 Same as Fig. 5 but for the two plages cases considered. 

Open with DEXTER 
Fig. 7 The upper row displays the fibril angle inferred from the bright structures in the images at the core of the line. The second, third and last rows display the 16, 50 and 84 percentiles of the distribution of inferred misalignments for each pixel. 

Open with DEXTER 
5.1. Penumbra
Our inference for the penumbra is based on a total of ~ 3 × 10^{4} pixels of the map, both for the bright and dark structures. The marginal distributions for the hyperparameters of the vonMises and lognormal distributions are displayed in the first and second columns of Fig. 5. Note that the marginal posteriors for the hyperparameters are very well defined for both the misalignment and the perpendicular component of the magnetic field. The distributions point to a slight statistical misalignment overall between the azimuth of the field and the fibril direction of less than ~ 1° for the bright structures, and less than ~ 6° for the dark ones. Although statistically relevant, it seems rather unimportant given that it is probably within the uncertainty in the determination of the fibril direction. Concerning the field, it points towards a median value for the perpendicular field of e^{μB} ~ 370 G, compatible in both cases. This suggests that bright and dark structures are located in regions of relatively smooth magnetic field.
Motivated by the wellconstrained values of the hyperparameters, it is advisable to use these samples to produce a Montecarlo estimate of the prior distribution over the whole FOV that we used. To this end, we compute the averaged distribution for the misalignment and field using: (16)where N is the number of samples obtained from the variational approximation. The results are shown in the rightmost column of Fig. 5. Given that the values of κ are large, the results are almost Gaussian. The dark structures show a mean of ~−6° and a standard deviation of ~ 23°, while the bright structures display a mean of ~−1° and a standard deviation of ~ 16°. In other words, we find that the probability of having a misalignment larger than 16° in the bright filaments is only 32%. Additionally, the probability of finding a misalignment larger than 32° goes down to 5%. A similar reasoning is applied to the dark structures. It is important to note, however, that these probabilities are all referred to the penumbra region observed here.
It is true that the results displayed in Fig. 5 depend on the number of pixel considered, with the distribution of hyperparameters slowly converging to a certain value when N_{pix} increases. The convergence of the means, μ and μ_{B}, go roughly as . This is the wellknown behavior of the convergence of the mean when adding many samples. However, the convergence of the hyperparameters related with the dispersion is much slower. The reason is that these are already secondorder statistics, and their uncertainty decreases as . As a consequence, combining 3 × 10^{4} pixels reduces the uncertainty in the mean by a factor ~ 170 with respect to the singlepixel case. Meanwhile, the uncertainty in the width of the distribution decreases only by a factor ~ 13. In other words, we can safely state that the mean value of the misalignment is close to zero, but our certainty in the dispersion is smaller. We have checked this experimentally by doing the analysis with several number of pixels from 1 to 3 × 10^{4} and verifying that the value of μ rapidly converges toward 0, while the value of κ is probably representative but not yet fully converged.
Using a common prior for all pixels introduces a shrinkage effect that pushes all inferred misalignments to share a common prior. This effect is seen in the leftmost column of Fig. 7, where we show the percentiles 16, 50 and 84 for the misalignment for all considered pixels, together with the map of fibril angles inferred with the RHT. The median value of the misaligmnent for all pixels is around zero for almost all fibrils, except in some specific locations. Additionally, the percentile 16 shows negative values almost all over the FOV, while the percentile 84 displays positive values. Of interest are the regions at (10′′, 9′′), (7′′, 6′′) and (8′′, 1′′), that display a negative misalignment in all percentiles. The misalignments can be real or they can be produced by an incorrect estimation of the geometrical alignment of the fibril. We note that all these cases are fibrils that are not strictly along the remaining penumbra filaments, but are linking two parallel fibrils. Finally, the smooth appearance of the maps of Fig. 7 suggest that the dispersion found in the distributions of misalignments of Fig. 5 is intrinsic, and not produced by nonconverged results for κ.
In other words, it is sure that the average misalignment is compatible with zero, but it is still unclear whether the dispersion found is produced by noise or it is real.
5.2. Plage
Although checking for the alignment of chromospheric fibrils and magnetic fields in penumbrae is interesting, it turns out to be even more important to check for this alignment in less magnetized regions. According to the recent simulations of MartínezSykora et al. (2016), ambipolar diffusion can often produce misalignments between the highdensity weakly ionized fibrils and the magnetic field. For this reason, we also analyze regions above plages, whose results are displayed in Fig. 6 for the two cases considered in this work. The first plage contains ~3 × 10^{4} pixels for the bright filaments, and ~5 × 10^{4} pixels for the dark ones, while in the second one we increased the number of points to ~6 × 10^{4} for the bright structures and ~5 × 10^{4} for the dark ones. The inferred hyperparameters indicate that the field is almost aligned with the bright and dark structures in the first case. On the contrary, it turns out to be slightly misaligned (~ 19.5° for bright structures and ~ 7.5° for dark ones) in the second case. Both share roughly the same uncertainty in the misalignment of ~ 34°. Given that the Stokes Q and U signals in these regions have lower amplitudes than in the penumbra, we cannot discard that the estimated uncertainty in the misalignment can be reduced by adding many more pixels because it is still dominated by the presence of noise. Concerning the magnetic field perpendicular to the lineofsight, the results consistently indicate that they are much smaller than in the penumbra, with median values equal to e^{μB} ~ 60 G.
The shrinkage effect of the hierarchical model is demonstrated for the plage case in the middle and right columns of Fig. 7. We find no relevant regions in the maps with a strong misalignment.
6. Discussion and conclusion
To put these results in the context of previous work, let us recall that de la Cruz Rodríguez & SocasNavarro (2011) obtained azimuths of the field (averaged along each fibril) that were, on average, well aligned with the direction of the fibrils. However, they also found a nonnegligible fraction of the tens of cases analyzed where strong misalignments were observed, in some cases close to 90°. Our results do not indicate the presence of such strong differences, at least statistically. The discrepancy might be due to the presence of noise (de la Cruz Rodríguez et al. 2012), which affects the maximum likelihood estimation of the azimuth used by de la Cruz Rodríguez & SocasNavarro (2011), or to the fact that the regions are different. Although less likely (but possible), the findings of Leenaarts et al. (2015) using 3D simulations seem to indicate that fibrils in Hα do not necessarily trace the vertical component of the magnetic field, at least not where τ_{λ0} = 1. Therefore misalignments may occur in observations close to the limb, where Stokes Q & U signals would originate from the vertical component of the field due to projection effects. One of the datasets used by de la Cruz Rodríguez & SocasNavarro (2011) is at heliocentric distance μ = 0.41. In the present work, the penumbra median misalignments could also produced by elevation effects along the fibrils. The potential misalignments that we find in this work (although the median value is very close to zero) might be compatible with the simulations of MartínezSykora et al. (2016). Therefore, observations with better signaltonoise ratio are needed to observationally quantitatively pin down the importance of ambipolar diffusion producing strong misalignments between fibrils and the magnetic field.
Our results are also in good agreement with the findings of Schad et al. (2013) who used the He iλ10830 line to measure the alignment of fibrils in the surrounding of a sunspot. Given that polarization in the Ca iiλ8542 line can be modeled in active regions using (only) the Zeeman effect (Manso Sainz & Trujillo Bueno 2010) and it does not suffer from extra ambiguities in the azimuth derived from the Hanle effect and scattering polarization, our results also reinforce the findings of Schad et al. (2013) but (in our case) using a diagnostic from a completely different formation mechanism both for the line (different atom, optically thick) and for the polarization (Zeeman induced).
We use the Python code publicly available at https://github.com/seclark/RHT
The Stan Version 2.10.0 package used in this paper can be found in http://mcstan.org and the Stan code used in this work can be found in http://github.com/aasensio/fibrilMisalignment
Acknowledgments
Financial support by the Spanish Ministry of Economy and Competitiveness through projects AYA201460476P ConsoliderIngenio 2010 CSD200900038 are gratefully acknowledged. A.A.R. also acknowledges financial support through the Ramón y Cajal fellowships. J.d.l.C.R. is supported by grants from the Swedish Research Council (201503994) and the Swedish National Space Board (128/15). The Swedish 1m Solar Telescope is operated on the island of La Palma by the Institute for Solar Physics of Stockholm University in the Spanish Observatorio del Roque de los Muchachos of the Instituto de Astrofísica de Canarias. This research has made use of NASA’s Astrophysics Data System Bibliographic Services. We acknowledge the community effort devoted to the development of the following opensource packages that were used in this work: numpy (numpy.org), matplotlib (matplotlib.org), seaborn (stanford.edu/[˜entity!#x20!]mwaskom/software/seaborn), daft (daftpgm.org) and Stan (https://mcstan.org).
References
 Abramowitz, M., & Stegun, I. A. 1972, Handbook of Mathematical Functions (New York: Dover) [Google Scholar]
 Asensio Ramos, A., & Manso Sainz, R. 2011, ApJ, 731, 125 [NASA ADS] [CrossRef] [Google Scholar]
 Bishop, C. M. 2006, Pattern Recognition and Machine Learning (New York: Spinger) [Google Scholar]
 Brewer, B. J., & Elliott, T. M. 2014, MNRAS, 439, L31 [NASA ADS] [CrossRef] [Google Scholar]
 Carpenter, B., Gelman, A., Hoffman, M., et al. 2017, J. Stat. Software, 76, 1 [CrossRef] [Google Scholar]
 Centeno, R., Trujillo Bueno, J., Uitenbroek, H., & Collados, M. 2008, ApJ, 677, 742 [NASA ADS] [CrossRef] [Google Scholar]
 Clark, S. E., Peek, J. E. G., & Putman, M. E. 2014, ApJ, 789, 82 [NASA ADS] [CrossRef] [Google Scholar]
 de la Cruz Rodríguez, J., & SocasNavarro, H. 2011, A&A, 527, L8 [NASA ADS] [CrossRef] [EDP Sciences] [Google Scholar]
 de la Cruz Rodríguez, J., SocasNavarro, H., Carlsson, M., & Leenaarts, J. 2012, A&A, 543, A34 [NASA ADS] [CrossRef] [EDP Sciences] [Google Scholar]
 de la Cruz Rodríguez, J., Rouppe van der Voort, L., SocasNavarro, H., & van Noort, M. 2013, A&A, 556, A115 [NASA ADS] [CrossRef] [EDP Sciences] [Google Scholar]
 de la Cruz Rodríguez, J., Löfdahl, M. G., Sütterlin, P., Hillberg, T., & Rouppe van der Voort, L. 2015, A&A, 573, A40 [NASA ADS] [CrossRef] [EDP Sciences] [Google Scholar]
 Dowe, D. L., Oliver, J. J., Baxter, R. A., & Wallace, C. S. 1996, in Proc. Fifteenth Int. Workshop, Maximum Entropy and Bayesian Methods, Santa Fe, New Mexico, USA, 1995, eds. K. M. Hanson, & R. N. Silver (Dordrecht: Springer Netherlands), 51 [Google Scholar]
 Gelman, A., & Hill, J. 2007, Data analysis using regression and multilevel/hierarchical models (New York: Cambridge University Press) [Google Scholar]
 Gregory, P. C. 2005, Bayesian Logical Data Analysis for the Physical Sciences (Cambridge: Cambridge University Press) [Google Scholar]
 Kucukelbir, A., Ranganath, R., Gelman, A., & Blei, D. M. 2015, in Advances in Neural Information Processing Systems 28: Annual Conf. on Neural Information Processing Systems 2015, December 7–12, 2015, Montreal, Quebec, Canada, 568 [Google Scholar]
 Landi Degl’Innocenti, E., & Landi Degl’Innocenti, M. 1973, Sol. Phys., 31, 299 [NASA ADS] [CrossRef] [Google Scholar]
 Landi Degl’Innocenti, E., & Landolfi, M. 2004, in a series of books on the recent developments of space science and of general geophysics and astrophysics, Polarization in Spectral Lines (Kluwer Academic Publishers: Springer), Astrophys. Space Sci. Lib., 307 [Google Scholar]
 Leenaarts, J., de la Cruz Rodríguez, J., Kochukhov, O., & Carlsson, M. 2014, ApJ, 784, L17 [NASA ADS] [CrossRef] [Google Scholar]
 Leenaarts, J., Carlsson, M., & Rouppe van der Voort, L. 2015, ApJ, 802, 136 [NASA ADS] [CrossRef] [Google Scholar]
 Löfdahl, M. G., & Scharmer, G. B. 1994, A&AS, 107 [Google Scholar]
 Manso Sainz, R., & Trujillo Bueno, J. 2010, ApJ, 722, 1416 [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ínezSykora, J., De Pontieu, B., Carlsson, M., & Hansteen, V. 2016, ApJ, 831, L1 [NASA ADS] [CrossRef] [Google Scholar]
 Quintero Noda, C., Shimizu, T., de la Cruz Rodríguez, J., et al. 2016, MNRAS, 459, 3363 [NASA ADS] [CrossRef] [Google Scholar]
 Rouppe van der Voort, L., & de la Cruz Rodríguez, J. 2013, ApJ, 776, 56 [NASA ADS] [CrossRef] [Google Scholar]
 Schad, T. A., Penn, M. J., & Lin, H. 2013, ApJ, 768, 111 [NASA ADS] [CrossRef] [Google Scholar]
 Schad, T. A., Penn, M. J., Lin, H., & Tritschler, A. 2015, Sol. Phys., 290, 1607 [NASA ADS] [CrossRef] [Google Scholar]
 Scharmer, G. B., Bjelksjo, K., Korhonen, T. K., Lindberg, B., & Petterson, B. 2003, in Innovative Telescopes and Instrumentation for Solar Astrophysics, eds. S. L. Keil, & S. V. Avakyan, Proc. SPIE, 4853, 341 [Google Scholar]
 Scharmer, G. B., Narayan, G., Hillberg, T., et al. 2008, ApJ, 689, L69 [NASA ADS] [CrossRef] [Google Scholar]
 SocasNavarro, H., Trujillo Bueno, J., & Ruiz Cobo, B. 2000, ApJ, 530, 977 [NASA ADS] [CrossRef] [Google Scholar]
 van Noort, M., Rouppe van der Voort, L., & Löfdahl, M. G. 2005, Sol. Phys., 228, 191 [NASA ADS] [CrossRef] [Google Scholar]
 van Noort, M., & Rouppe van der Voort, L. H. M. 2008, A&A, 489, 429 [NASA ADS] [CrossRef] [EDP Sciences] [Google Scholar]
 Yurchyshyn, V., Abramenko, V., Kosovichev, A., & Goode, P. 2014, ApJ, 787, 58 [NASA ADS] [CrossRef] [Google Scholar]
Appendix A: Likelihood
Because all observed pixels and wavelengths are assumed to be uncorrelated, we can factorize the likelihood as follows: (A.1)where the terms in the likelihood are given by the following normal distributions: We note that the product over wavelengths can be computed analytically, and the resulting likelihoods are still normal: where (A.6)
All Figures
Fig. 1 Left: clockwise the panels show Stokes I, Q, U and V images at Δλ = −140 mÅ from line center in the Ca ii 8542 line for the observation of the penumbra. The analysis has been carried out in the subfield indicated with a white rectangle. Right: fullStokes spectra corresponding to the pixel indicated with a red marker in the FOV. 

Open with DEXTER  
In the text 
Fig. 2 Plage observations, marking the analyzed region with a rectangle. The left panel shows the images in the continuum (left column) and in the core of the Ca ii 8582 Å line. The right panel displays an artificial slit along the orange line for Plage 2. 

Open with DEXTER  
In the text 
Fig. 3 Upper left panel: image at the core of the Ca ii line in units of the average continuum intensity in the quietest region of the map. Upper right panel: estimated fibril angle using the RHT in the considered pixels. Lower panels: maximumlikelihood estimation of the azimuth angle obtained from the Stokes Q and Stokes U signal using only wavelengths on the wings (left panel) or the full line profile (right panel). 

Open with DEXTER  
In the text 
Fig. 4 Graphical model representing the conditional dependences among the variables of the statistical model. 

Open with DEXTER  
In the text 
Fig. 5 The first and second columns show the marginal posterior for the hyperparameters of the vonMises prior for the misalignment (upper panels) and the lognormal prior for the perpendicular component of the magnetic field (lower panels) for the case of the penumbra. The plots show a histogram and a kernel density estimation using the samples. The rightmost column shows the Montecarlo estimate of the prior distribution for all considered pixels for both parameters. 

Open with DEXTER  
In the text 
Fig. 6 Same as Fig. 5 but for the two plages cases considered. 

Open with DEXTER  
In the text 
Fig. 7 The upper row displays the fibril angle inferred from the bright structures in the images at the core of the line. The second, third and last rows display the 16, 50 and 84 percentiles of the distribution of inferred misalignments for each pixel. 

Open with DEXTER  
In the text 