Nonlinear ForceFree Magnetic Field Fitting to
Coronal Loops with and without Stereoscopy
^{1}
Abstract
We developed a new nonlinear forcefree magnetic field (NLFFF) forwardfitting algorithm based on an analytical approximation of forcefree and divergencefree NLFFF solutions, which requires as input a lineofsight magnetogram and traced 2D loop coordinates of coronal loops only, in contrast to stereoscopically triangulated 3D loop coordinates used in previous studies. Test results of simulated magnetic configurations and from four active regions observed with STEREO demonstrate that NLFFF solutions can be fitted with equal accuracy with or without stereoscopy, which relinquishes the necessity of STEREO data for magnetic modeling of active regions (on the solar disk). The 2D loop tracing method achieves a 2D misalignment of between the model field lines and observed loops, and an accuracy of for the magnetic energy or free magnetic energy ratio. The three times higher spatial resolution of TRACE or SDO/AIA (compared with STEREO) yields also a proportionally smaller misalignment angle between model fit and observations. Visual/manual loop tracings are found to produce more accurate magnetic model fits than automated tracing algorithms. The computation time of the new forwardfitting code amounts to a few minutes per active region.
1 Introduction
The success or failure of magnetic field modeling of the solar corona depends on both the choice of the theoretical model, as well as on the choice of the used data sets. The simplest method is potential field modeling, which requires only a lineofsight magnetogram , but only few solar active regions match a potential field model. Also linear forcefree field (LFFF) models are generally considered as unrealistic, where a single constant value for the forcefree parameter represents the multicurrent system of an entire active region in the solar corona. The stateoftheart is the nonlinear forcefree field (NLFFF) model, which can accomodate for an arbitrary configuration of current systems, described by a spatially varying parameter distribution in an active region. The next strategic decision is the choice of data sets to constrain the theoretical model. NLFFF models generally require vector magnetograph data, , which are used as a lower boundary constraint and are extrapolated into the corona. However, a fundamental problem that has been identified is that the zone in the photosphere and lower chromosphere is not forcefree (Metcalf et al., 1995), which spoils the extrapolation into coronal heights and leads to a substantial mismatch between the extrapolated field lines and observed coronal loops, typically amounting to a 3D misalignment angle of (DeRosa et al., 2009; Sandman et al., 2009). Obviously, this fundamental problem can only be circumvented by using additional constraints from coronal data, since the corona above the transition region is generally forcefree, except when the plasma parameter is larger than unity (e.g., in filaments) or when the equilibrium brakes down (e.g., during filament eruptions, flares, and coronal mass ejections).
The problem amounts now how to implement coronal data into a theoretical magnetic field model, such as coronal loops, which are believed to be reliable tracers of the coronal magnetic field. A feasible approach is the method of stereoscopic triangulation, which can be applied by using the solar rotation or stereoscopic observations from dual spacecraft, as provided by the STEREO mission (for reviews of solar stereoscopy see, e.g., Inhester 2006; Wiegelmann et al., 2009; Aschwanden 2011). Stereoscopically triangulated coronal loop coordinates (as a function of the curvilinear abscissa ) have been used to constrain: (i) potential field models in terms of buried unipolar magnetic charges (Aschwanden and Sandman 2010) or buried dipoles (Sandman and Aschwanden 2011), (ii) linear forcefree fields (Feng et al., 2007; Inhester et al., 2008; Conlon and Gallagher 2010), and (iii) nonlinear forcefree fields (Aschwanden et al., 2012a). The proof of concept to fit NLFFF codes to prescribed field lines was also demonstrated with artificial (nonsolar) loop data, fitting either 3D field line coordinates , or 2D projections (Malanushenko et al., 2009, 2012). The method of Malanushenko et al., (2012) employs a GradRubin type NLFFF code (Grad and Rubin, 1958) that fits a LFFF with a local value to each coronal loop and then iteratively relaxes to the closest NLFFF solution, while the method of Aschwanden et al., (2012a) uses an approximative analytical solution of a forcefree and divergencefree field, parameterized by a number of buried magnetic charges that have a variable twist around their vertical axis, and is forwardfitted to observed loop coordinates. The latter method is numerically quite efficient and achieves a factor of two better agreement in the misalignment angle () than standard NLFFF codes using magnetic vector data. However, the major limitation of the latter method is the availability of solar stereoscopic data, which restricts the method to the beginning of the STEREO mission (i.e., the year of 2007), when STEREO had a small spacecraft separation angle that is suitable for stereoscopy (Aschwanden et al., 2012b).
Hence, the application of NLFFF magnetic modeling using coronal constraints could be considerably enhanced, if the methodical restriction to coronal 3D data, as it can be provided only by true stereoscopic measurements, could be relaxed to 2D data, which could be furnished by any highresolution EUV imager, such as from the SoHO/EIT, TRACE, and SDO/AIA missions. This generalization is exactly the purpose of the present study. We develop a modified code that requires only a lineofsight magnetogram and a highresolution EUV image, where we trace 2D loop coordinates to constrain the forwardfitting of the analytical NLFFF code described in Aschwanden (2012a), and compare the results with those obtained from stereoscopically triangulated 3D loop coordinates (described in Aschwanden et al., 2012a). Furthermore we test also magnetic forwardfitting to automatically traced 2D loop data, and compare the results with manually traced 2D loop data. The latter effort brings us closer to the ultimate goal of fully automated (NLFFF) magnetic field modeling with widely accessible input data.
The content of the paper is a follows: the theory of the analytical NLFFF forwardfitting code is briefly summarized in Section 2, the numerical code is described in Section 3, tests of NLFFF forwardfitting to simulated data are presented in Section 4, and to stereoscopic and singleimage data in Section 5, while a discussion of the application is given in Section 6, with a summary of the conclusions provided in Section 7.
2 Analytical Theory
A nonlinear forcefree field (NLFFF) is implicitly defined by Maxwell’s forcefree and divergencefree conditions,
(1) 
(2) 
where is a scalar function that varies in space, but is constant along a given field line, and the current density is coaligned and proportional to the magnetic field . A general solution of Equations (1)(2) is not available, but numerical solutions are computed (see review by Wiegelmann and Sakurai 2012) using (i) forcefree and divergencefree optimization algorithms (Wheatland et al., 2000; Wiegelmann 2004), (ii) evolutionary magnetofrictional methods (Yang et al., 1986; Valori et al., 2007), or GradRubinstyle (Grad and Rubin, 1958) currentfield iteration methods (Amari et al., 1999, 2006; Wheatland 2006; Wheatland and Regnier 2009; Malanushenko et al., 2009). Numerical NLFFF solutions bear two major problems: (i) every method based on extrapolation of forcefree magnetic field lines from photospheric boundary conditions suffers from the inconsistency of the photospheric boundary conditions with the forcefree assumption (Metcalf et al.1995), and (ii) the calculation of a single NLFFF solution with conventional numerical codes is so computingintensive that forwardfitting to additional constraints (requiring many iteration steps) is unfeasible. Hence an explicit analytical solution of Equations (1)(2) would be extremely useful, which could be computed much faster and be forwardfitted to coronal loops in forcefree domains circumventing the nonforcefree (photospheric) boundary condition.
An approximate analytical solution of Equations (1)(2) was recently calculated (Aschwanden 2012a) that can be expressed by a superposition of an arbitrary number of magnetic field components , ,
(3) 
where each magnetic field component can be decomposed into a radial and an azimuthal field component ,
(4) 
(5) 
(6) 
(7) 
where () are the spherical coordinates of a magnetic field component system ( with a unipolar magnetic charge that is buried at position (, has a depth , a vertical twist , and is the distance of an arbitrary coronal position to the subphotospheric location of the buried magnetic charge. The forcefree parameter can also be expressed in terms of the parameter (Equation 7), which quantifies the number of full twist turns over a (loop) length ,
(8) 
This analytical approximation is divergencefree and forcefree to secondorder accuracy in the parameter , which is proportional to the forcefree parameter as defined by Equation (7). This approximate NLFFF solution is very appropriate for cases with small vertical twist, but may break down for highly nonpotential cases with large twist or magnetic field domains with strong horizontal twist, such as nearhorizontal filaments or a GoldHoyle flux rope (Gold and Hoyle 1960; Aschwanden 2012a, Appendix A). In the limit of vanishing vertical twist ( or ), the azimuthal component vanishes, , and the radial component degenerates to the potentialfield solution of a unipolar magnetic charge, , which is simply a radial field that points away from the buried charge and decreases with the square of the distance. A numerical code that fits this analytical approximation to a given 3D magnetic field is described and tested in Aschwanden and Malanushenko (2012) using analytical models. Applications to real solar data using stereoscopically triangulated coronal loops from the STEREO mission, which supposedly outline forcefree magnetic field lines in the solar corona, are presented in Aschwanden et al., (2012a).
3 Numerical ForwardFitting
The numeric code that fits the approximative analytical NLFFF solution (Equations 37) to a lineofsight magnetogram plus coronal loop coordinates for an ensemble of stereoscopically triangulated loops in a solar active region is described in detail and tested in Aschwanden and Malanushenko (2012). We are using a cartesian coordinate system with the origin in the center of the Sun and the planeofthesky is in the plane, while the zaxis is the lineofsight. This allows us to take the curvature of the solar surface into full account, in contrast to some other NLFFF codes that approximate the solar surface with a flat plane.
The forwardfitting part of the code consists of two major parts, (i) the decomposition of buried unipolar magnetic charges from a lineofsight magnetogram (see Appendix A of Aschwanden et al., 2012a), and (ii) iterative optimization of the nonlinear forcefree parameters by minimizing the misalignment angles between the loop data and the fitted NLFFF model. The new approach in this work is the generalization of the forwardfitting code from 3D loop coordinates (using stereoscopic measurements before) to 2D loop coordinates only, which can simply be provided from any highresolution EUV image without requiring stereoscopic views.
The two different methods are juxtaposed in Fig. 1. In the 3D forwardfitting method, the 3D misalignment angle is computed for a number of loop segment positions and coronal loops, defined by the scalar product that calculates the angle between the 3D vectors of the loop direction and the magnetic field direction at a given loop position ,
(9) 
This is illustrated in Figure (1), where the loop directions (black arrows) and magnetic field directions (red arrows) are depicted at three loop segment positions, for two orthogonal projections (Figure 1 left panels). The rootmeansquare value of all misalignment angles for each loop segment and loop is then minimized in the forwardfitting procedure to find the best NLFFF approximation,
(10) 
In addition to the 3D misalignment angle , we can also define a 2D misalignment angle with the same Equations (9) and (10), except that the magnetic field vectors and loop vectors are a function of twodimensional space coordinates , as they are seen in the 2D projection into the plane (Figure 1, bottom right panel).
If we have only 2D loop coordinates available (in the case without stereoscopy), we can only forwardfit the field lines parameterized with a NLFFF code by minimizing the 2D misalignment angle , because the third space variable is not available. Our strategy here is to calculate the 2D misalignment angle in each position for an array of altitudes, , that covers a limited altitude range or search volume in which we expect coronal loops to be detectable (Figure 1, top right panel). For EUV images, loops are generally detectable within one density scale height, for which we use a height range of solar radii here. This yields multiple misalignment angles for each 2D loop position , which are shown in the plane (Fig. 1 top right panel) and plane (Fig. 1 bottom right panel). Our strategy is then to estimate the unknown third coordinate in each 2D position from that height that shows the smallest 2D misalignment angle , and can then proceed with the forwardfitting procedure like in the case of 3D stereoscopic data , which is described in detail in Aschwanden and Malanushenko (2012).
A sideeffect of the generalized 2D method is that the parameter space is enlarged by an additional dimension, i.e., the unknown or coordinate of the altitude of each loop position , which in principle increases the computation time by a linear factor of the number of altitude levels. However, we optimized the code by vectorization and by organizing the optimization of the altitude variables (for each loop segment and loop ) and the parameter variables (for each magnetic charge ) in an interleaved mode, so that the computation time reduced by 12 orders of magnitude compared with earlier versions of the code (Aschwanden and Malanushenko 2012; Aschwanden et al., 2012a), without loss of accuracy.
When comparing 3D with 2D misalignment angles, we have to be aware that the unknown third dimension at every loop position is handled differently in the two methods. In our new 2D method we optimize the third coordinate by minimizing the 2D misalignment angle independently at every loop segment position , interleaved with the optimization of the nonlinear forcefree parameter. In the (stereoscopic) 3D method the third coordinate is used as a fixed constraint like the observables . However, we can calculate the median 2D misalignment angle with both methods, while the 3D misalignment angle is only defined for the (stereoscopic) 3Dfit method, but not for the (looptracing) 2Dfit method.
4 Test Runs With Simulated Data
In order to test the numerical convergence behavior, the uniqueness of the solutions, and the accuracy of the method in terms of misalignment angles we test our code first with simulated data. We simulate six cases that correspond to the same six nonpotential cases presented in Aschwanden and Malanushenko (2012; cases # 712), consisting of a unipolar case (N7; Figure 2 top), a dipolar case (N8; Figure 2 middle), a quadrupolar case (N9; Figure 2 bottom), and three decapolar cases with 10 randomly buried magnetic charges each (N10, N11, N12; Figure 3). In each case we run both the 3Dfitting code (mimicking the availability of stereoscopic loop data), as well as the 2Dfitting code (corresponding to loop tracings from a single EUV image without stereoscopic information). Thus, in the 3Dfitting code the target loops are parameterized with 3D data , while we ignore the third coordinate in the 2Dfitting code and fit only the 2D coordinates of the target loops. The results are shown in Figures 2 and 3, with the 2D fits in the lefthand panels, and the 3D fits in the righthand panels.
The convergence of the 2Dcode can be judged by comparing with the previously tested 3Dcode (Aschwanden and Malanushenko 2012). We list a summary of the results in Table 1. The 3Dfits achieve a mean 3D misalignment angle of and a 2D misalignment angle of . This is reasonable and slightly better than the results of an earlier version of the 3Dcode ( in Table 4 of Aschwanden and Malanushenko 2012). In comparison, our new 2Dfitting code achieves an even better agreement with for the 2Dmisalignment angle , while the 3Dmisalignment angle is not defined for the 2D code (due to the lack of lineofsight coordinates ). The better performance of the 2D code is due to the smaller number of constraints (i.e., 200 constrains for 2Dloop coordinates of 10 loops with 10 segments, compared with 300 constraints for the 3Dfit method). The smaller number of free parameters generally improves the accuracy of the solution. The uniqueness of the solution can be best expressed by the mean misalignment angle . Strictly speaking, a NLFFF solution would only be unique if the number of free parameters (i.e., the number of magnetic charges in our case) matches the number of constraints (i.e., the number of fitting positions (i.e., the product of the number of loops times the number of fitted segment positions , i.e., in our case). Moreover, the LOS magnetogram is approximated by a number of magnetic charges that neglects weak magnetic sources, and there are residuals in the decomposition of magnetic charges that contribute to the noise or uncertainty and nonuniqueness of the solutions. Therefore, the uniqueness of a NLFFF solution can best be specified by an uncertainty measure for each field line, which can be quantified either by the misalignment angle or by a maximum transverse displacement of a field line, i.e, for a particular field line with full length .
We show in Table 1 also the ratios of the nonpotential to the potential energies for the 3D and 2D fit methods, which agree within an accuracy of order . Note, that the simulated data have 1, 2, 4, and 10 magnetic charges, which corresponds to the number of free parameters in the fit, while we used the double number of magnetic charges in the decomposition of the simulated LOS magnetogram, in order to make the parameterization of the fitted model somewhat different from the target model. Nevertheless, although the 2D solutions have a high accuracy (with a mean misalignment of ), we have to be aware that the simulated data and the forwardfitting code use the same parameterization of nonlinear parameters, which warrants a higher accurcay in forwardfitting than real data with a unknown parameterization. Hence, we test the code with real solar data in the following section.
5 Observations and Results
5.1 Observations
For testing the feasibility, fidelity, and accuracy of the new analytical NLFFF forwardfitting code based on 2D tracing of loops (rather than 3D stereoscopy) we are using the same observations for which either stereoscopic 3D reconstruction has been attempted earlier (Aschwanden et al., 2008b,c, 2009, 2012a; Sandman et al., 2009; DeRosa et al., 2009; Aschwanden and Sandman 2010; Sandman and Aschwanden 2011; Aschwanden 2012a), such as for active regions observed with STEREO on 2007 April 30, May 9, May 19, and December 11, or where 2D loop tracing was performed and documented, such as for an active region observed on 1998 May 19 with TRACE (Aschwanden et al., 2008a). The active region numbers, observing times, spacecraft separation angles, number of traced loops, and maximum magnetic field strengths of these observations are listed in Table 2. In all cases we used lineofsight magnetograms from the Michelson Doppler Imager (MDI; Scherrer et al., 1995) on board the Solar and Heliospheric Observatory (SOHO), while EUV images were used either from the Transition Region And Coronal Explorer (TRACE; Handy et al., 1999), or from the Extreme Ultraviolet Imager (EUVI; Wülser et al., 2004) onboard the STEREO spacecraft A(head) and B(ehind).
We show the results of the NLFFF forwardfitting of the six active regions in Figures 4 to 9, all in the same format, which includes the decomposed lineofsight magnetogram of SoHO/MDI (grey scale in center of Figures 4 to 9), the stereoscopically triangulated or visually traced loops (blue curves in Figures 4 to 9), and the bestfit magnetic field lines (red curves for the segments covered by the observed loops, and in orange color for complementary loops parts (although truncated at a height of 0.15 solar radii). The orthogonal projections of the bestfit magnetic field lines are also shown in the righthand and top panels of Figures 4 to 9, as well as the histograms of 2D and 3D () misalignment angles (in bottom panels of Figures 4 to 9). The median misalignment angles and are also listed in Table 3, for both the previous stereoscopic reconstructions (Aschwanden et al., 2012a; Aschwanden 2012b), marked with ”STEREO” in Table 3, and based on 2D loop tracing in the present study, marked with ”Tracing” in Table 3.
The active region A (2007 April 30; Figure 4) shows a lack of stereoscopically triangulated loops in the core of the active region (due to the high level of confusion for loop tracing over the “mossy” regions), where the highest shear and degree of nonpotentiality is expected, and thus deprives us from measuring the largest amount of free magnetic energy, while standard NLFFF codes have stronger constraints in these core regions. In all 5 active regions we see sunspots with strong magnetic fields, but since we limit our NLFFF solutions to an altitude range of solar radii, we cannot see whether the diverging field lines above the sunspots are open or closed field lines. In principle we could display our NLFFF solutions to larger altitudes to diagnose where open and closed field regions are, but the accuracy of reconstructed field lines is expected to decrease with height with our method, especially because of the secondorder approximation that can represent helical twist well for vertical segments of loops (near the surface), but not so well for horizontal segments of loops (in large altitudes).
5.2 Misalignment Angle Statistics
We see in Table 3 that the 3D misalignment angles have a mean value of for the stereoscopy method. If we compare the 2D misalignment angles between the two methods in Table 3, we see that the STEREO method has a somewhat larger mean, , than the 2D loop tracing method, with . This is an effect of the optimization of the 2D misalignment angles in the 2D loop tracing method, where the third coordinate is a free variable and thus has a larger flexibility to find an appropriate model field line with a small 2D misalignment angle, in contrast to the stereoscopic method, where the third coordinate of every observed loop is entirely fixed and leaves less room in the minimization of the misalignment angles between observed loops and theoretical field models. Ideally, if stereoscopy would work perfectly, the third coordinate should be sufficiently accurate so that the best field solution can be found easier with fewer free parameters. However, reality apparently reveals that there is a significant stereoscopic error that hinders optimum field fitting, which is nonexistent in the 2D forwardfitting situation. Actually, from the two stereoscopic misalignment angles we can estimate the stereoscopic error , assuming isotropic errors. Thus, defining the 2D misalignment angle as , and the 3D misalignment angle as , with isotropic errors , we expect
(11) 
which yields a stereoscopic error of . This is somewhat larger than estimated earlier from the parallelity of stereoscopically triangulated loops with close spatial proximity, which amounted to (Aschwanden and Sandman 2010). Thus both estimates assess a substantial value to the stereoscopic error that exceeds the accuracy of the bestfit NLFFF solution based on 2D loop tracing () by far. Nevertheless, both bestfit misalignment angles are consistent with each other for the two forwardfitting methods. This forwardfitting experiment thus demonstrates that we obtain equally accurate NLFFF fits to coronal data with or without stereoscopy, and thus makes the new method extremely useful.
5.3 Spatial Resolution of Instruments
For the 2D loop tracing method of stereoscopic data (cases A, B, C, and D in Table 1) we just ignored information on the coordinate of loops in the 2D forwardfitting algorithm. For cases E and F, we compare visual tracing of loops (case E) with automated loop tracing (case F). Interestingly, we find the most accurate forwardfit for case E, which has a 2D misalignment error of only (Figure 8), which may have resulted from the higher spatial resolution of loop tracing using TRACE data (with a pixel size of ) in case E, compared with the three times lower resolution of STEREO (with a pixel size of ) in the cases A, B, C, and D.
5.4 Visual versus Automated Loop Detection
Comparing visually traced (Figure 8) versus automatically traced loops (Figure 9), we note that the automated tracing leads to a less accurate NLFFF fit, with versus for visual tracing. Apparently, the automated loop tracing method (Aschwanden et al., 2008a) can easily be misguided or sidetracked by about onto nearcospatial loops with similar coherent large curvature. Comparing individual field lines in Figure 8 with Figure 9, we see also that the automated loop tracing algorithm produces a number of short loop segments with large misalignment angles, which are obviously a weakness of the automated tracing code, resulting into a larger misalignment error for the fitted NLFFF solution (which is a factor of larger in the average for this case).
5.5 Magnetic Field Strengths
In Figure 10 we show scatterplots of the magnetic field strengths retrieved at the photospheric level for the stereoscopic 3D method versus the field strength obtained from the 2D loop tracing method. The analytical NLFFF forwardfitting algorithm starts first a decomposition of pointlike buried magnetic charges from the lineofsight component , but has no constraints for the transverse components and , except for the coronal loop coordinates. Thus, the directions of coronal loops near the footpoints will determine the transverse components and in the photosphere. The scatterplots of versus in Figure 10 show that the smallest scatter between the two methods appears for active region B, which is the one closest to a potential field (although we are not able to trace and triangulate loops in the core of the active region, where supposedly the highest level of nonpotentiality occurs). The linear regression fits show a good correspondence in the order of between the two methods, which results from different fitting criteria of the nonpotential field components. A ratio of in the azimuthal field (or nonpotential) field component (Equation 5) with respect to the potential field component (Equation 4) would result into a change of in the magnetic field strength.
5.6 Magnetic Energies
The free magnetic energy, which is the difference between the nonpotential and the potential field energy, integrated over the spatial volume of an active region, has been calculated for the stereoscopic forwardfitting method in Aschwanden 2012b (Table 1 therein). Here we calculate these quantities also for the 2D loop tracing method, both methods being juxtaposed in Table 3 and in Figure 11. The absolute values of the potential field energy agree within a factor of between the two methods, while the free energies show differences of 1%2% of the potential energy. If we consider the difference in the free energy between two methods as a measure of a systematic error, we assess an uncertainty of , or about .
6 Discussion
6.1 Assessment of Various NLFFF Methods
Quantitative comparisons of various nonlinear forcefree field (NLFFF) calculation methods applied to coronal volumes that encompass an active region included optimizational, magnetofrictional, GradRubin based, and Green’s function based models (Schrijver et al., 2006; 2008; DeRosa et al., 2009). A critical assessment of 11 NLFFF methods revealed significant differences in the nonpotential magnetic energy and in the degree of misalignment () with respect to stereoscopically triangulated coronal loops. The chief problem responsible for these discrepancies were identified in terms of the nonforcefreeness of the lower (photospheric) boundary, too small boundary areas, and uncertainties of the boundary data (DeRosa et al., 2009). Obviously, the nonforcefreeness of the photosphere can only be circumvented by incorporating coronal magnetic field geometries into NLFFF extrapolations, such as the information from stereoscopically triangulated loops.
Implementation of coronal magnetic field data into NLFFF codes is not straightforward, because most of the conventional NLFFF codes are designed to extrapolate from a lower boundary in upward direction, and thus the volumefilling coronal information cannot be treated as a boundary problem. A natural method to match arbitrary constraints that are not necessarily a boundary problem is a forwardfitting approach, which however, requires a parameterization of a magnetic field model. Since NLFFF models are implicitly defined by the two differential equations of forcefreeness and divergencefreeness, an explicit parameterization of a magnetic field is not trivial. There are essentially three approaches that have been attempted so far: (i) Preprocessing of magnetic boundary data by minimizing the Lorentz force at multiple spatial scales (Wiegelmann 2004; Jing et al., 2009); (ii) linear forcefree fitting with subsequent relaxation to a nonlinear forcefree field (Malanushenko et al., 2009, 2012); and (iii) magnetic field parameterization with buried magnetic charges and forwardfitting of an approximative analytical NLFFF solution (Aschwanden 2012a,b; Aschwanden and Malanushenko 2012). The third method requires stereoscopically triangulated 3D coordinates of coronal loops, which have been successfully modeled in four different active regions, improving the misalignment angles between the observed loops and a potential field () by a factor of about two, when fitted with the analytical NLFFF solution (; Aschwanden et al., 2012a). However, although this method provides a more realistic NLFFF model, the main restriction is the availability of STEREO data, as well as the inferior spatial resolution of STEREO/EUVI compared with other EUV imagers (e.g., TRACE, or SDO/AIA). In order to circumvent this restriction we developed a generalized code in this study that requires only a highresolution EUV image, from which a sufficient large number of coronal loops can be traced in two dimensions, plus a lineofsight magnetogram, which were essentially always available since the lauch of the SOHO mission in 1995. A fortunate outcome of this study is that the reduction of 3D information from coronal loops to 2D coordinates does not handicap the accuracy of a NLFFF forwardfitting method, as we demonstrated here. One potential limitation of forwardfitting of analytical NLFFF approximations may be the accuracy for strong nonpotential cases (say near flaring times), since our analytical NLFFF approximation is only accurate to second order of the forcefree parameter. Another caveat may be the universality of the analytical NLFFF parameterization. Our approximation is designed to model azimuthal (rotational) twist around a vertical axis with respect to the solar surface, which corresponds to electric currents flowing in vertical direction. This geometry may not be appropriate for horizontally twisted structures, such as horizontally extended filaments. For such cases, a more general NLFFF solution could be desirable. In this respect, more general NLFFF solutions such as currently developed by Malanushenko et al., (2009; 2012) may provide new tools, after they will be generalized for a spherical solar surface and optimized for computational speed. Nevertheless, our analytical NLFFF forwardfitting algorithm can always be used to find a quick first approximation of a NLFFF solution, which then could be refined by alternative (more timeconsuming) NLFFF codes.
6.2 Computational speed
Note that our forwardfitting code calculates one trial magnetic field configuration in about 0.01 s, while some iterations are needed for the convergence of an approximate NLFFF solution, accumulating to a few minutes total computation time. Our forwardfitting code computes a solution to an active region with an average computation time of minutes (see CPU times in Table 3) on a Mac OS X, 2 3.2 GHz QuadCore Intel Xeon, 32 GB memory, 800 MHz DDR2 FBDIMM computer. Simple cases that can be represented with magnetic charges, require only computation times of order s (see CPU times in Table 1).
7 Conclusions
We developed an analytical NLFFF forwardfitting code that requires only the input of a lineofsight magnetogram and a set of 2D loop tracing coordinates that can be obtained from any highresolution EUV image. This is the first attempt to measure the coronal magnetic field based on directly observed 2D images alone, while we needed stereoscopically triangulated 3D loop coordinates from STEREO in previous studies. There exists only one other study (to our knowledge) that heads into the same direction of forwardfitting a NLFFF model to 2D data (Malanushenko et al., 2012), using simulated 2D data based on analytical NLFFF solutions (from Low and Lou 1990) or previous NLFFF modeling (from Schrijver et al., 2008).
We forwardfitted analytical NLFFF approximations to four active regions (cases A, B, C, D) using 2D loop tracings only and compared them with previous NLFFF fits using (stereoscopic) 3D loop coordinates. Furthermore we forwardfitted analytical NLFFF approximations to another active region using visual 2D loop tracings (case E) or automatically traced 2D loop coordinates (case F). Our findings of these exercises are the following:

Our forwardfitting experiment with two different methods demonstrated that a nonlinear forcefree magnetic field (NLFFF) solution can be obtained with equal accuracy with or without stereoscopy. This result relinquishes the necessity of STEREO data for future magnetic modeling of active regions on the solar disk, but the availability of suitable STEREO data was crucial to establish this result.

The accuracy of a forwardfitted NLFFF approximation that includes vertical currents (with twisted azimuthal magnetic field components) matches coronal loops observed in EUV with a median 2D misalignment angle of , while stereoscopic 3D data exhibit a commensurable 2D misalignment angle, but a substantially larger 3D misalignment angle (), which implies stereoscopic measurement errors in the order of . These substantial stereoscopic measurement errors lead to less accurate NLFFF fits than 2D loop tracings with unconstrained lineofsight positions.

2D loop tracings in high resolution images (i.e., pixels with TRACE) lead to more accurate NLFFF fits (with a misalignment angle of in case E) than images with lower spatial resolution (i.e., pixels with STEREO), yielding for the cases A, B, C, and D.

Visually (or manually) traced 2D loop coordinates appear to be still superior to the best automated loop tracing algorithms, yielding a misalignment angle of (in case E) versus (in case F).

Magnetic field strengths of bestfit NLFFF approximations are retrieved with an accuracy of , comparing the 2D loop tracing method with the stereoscopic 3D triangulation method.

Magnetic energies differ by a factor of between the two methods, while the free energy has a systematic error of (of the total magnetic energy) between the two methods, which is about an order of magnitude smaller than found between other (standard) NLFFF codes.

The computational speed of our NLFFF code allows the computation of a spacefilling magnetic field configuration of an active region in about 0.01 s, while forwardfitting to a set of coronal loops is feasible with about iterations, requiring a total computation time of a few minutes.
These results demonstrate clearly that we can perform accurate NLFFF magnetic modeling based on 2D loop tracings, which will relinquish the need of STEREO data in future, at least for active regions near the solar disk center. The analyzed active regions extended up to 0.65 solar radii away from disk center, so in principle we can perform NLFFF modeling for at least half of the number of active regions observed on the solar disk, especially since the parameterization of our analytical NLFFF approximation takes the sphericity of the solar surface fully into account (which is not the case in most other NLFFF codes). For future developments we expect that other NLFFF codes could implement minimization of the misalignment angle with coronal loops in parallel to the optimization of forcefreeness and divergencefreeness, rather than by preprocessing of vector boundary data. Further improvements in automated 2D loop tracings could replace visual/manual tracing methods and this way render NLFFF modeling with coronal constraints in a fully automated way.
Data set  CPU (s)  STEREO  STEREO  Tracing  STEREO  Tracing 

N7  0.3  1.009  1.034  
N8  2.1  1.010  1.009  
N9  3.0  1.016  1.015  
N10  16.5  1.055  1.054  
N11  12.5  1.066  1.050  
N12  17.8  1.140  1.094  
Mean 
Case  Active  Observing  Observing  Observing  Spacecraft  Number  Magnetic 

Region  date  time EUV  time MDI  separation  of EUVI  field strength  
(UT)  (UT)  angle (deg)  loops  B(G)  
A  10953 (S05E20)  2007Apr30  23:0023:20  22:24  STEREO 6.0  200  [3134,+1425] 
B  10955 (S09E24)  2007May9  20:3020:50  20:47  STEREO 7.1  70  [2396,+1926] 
C  10953 (N03W03)  2007May19  12:4013:00  12:47  STEREO 8.6  100  [2056,+2307] 
D  10978 (S09E06)  2007Dec11  16:3016:50  14:23  STEREO 42.7  87  [2270,+2037] 
E  8222 (N22W30)  1998May19  22:2122:22  20:48  TRACE (manu)  201  [1787,+1200] 
F  8222 (N22W30)  1998May19  22:2122:22  20:48  TRACE (auto)  222  [1787,+1200] 
Data set  CPU (s)  STEREO  STEREO  Tracing  STEREO  Tracing 

A) 2007Apr30  1103  1.006  1.007  
B) 2007May9  208  1.023  1.009  
C) 2007May19  415  1.085  1.053  
D) 2007Dec11  390  1.044  1.026  
E) 1998May19 (manu)  631  
F) 1998May19 (auto)  915  
(AF) Mean 
Footnotes
 Manuscript version, 2012Nov15
References
 Amari, T., Boulmezaoud, T.Z. and Mikic,Z., 1999, A&A350, 1051.
 Amari, T., Boulmezaoud, T.Z., and Aly, J.J., 2006, A&A, 446, 691.
 Aschwanden,M.J., Lee,J.K., Gary,G.A., Smith,M., and Inhester,B. 2008a, Sol. Phys., 248, 359.
 Aschwanden, M.J., Wuelser, J.P., Nitta, N.V., and Lemen, J.R. 2008b, ApJ, 679, 827.
 Aschwanden, M.J., Nitta, N.V., Wuelser, J.P., and Lemen, J.R. 2008c, ApJ, 680, 1477.
 Aschwanden, M.J., Wuelser, J.P., Nitta, N., Lemen, J., and Sandman, A. 2009, ApJ, 695, 12.
 Aschwanden, M.J. and Sandman, A.W. 2010, Astronomical J. 140, 723.
 Aschwanden, M.J. 2011, Living Reviews in Solar Physics 8, 5.
 Aschwanden,M.J. 2012a, Sol. Phys., onlinefirst, DOI 10.1007/s1120701200697.
 Aschwanden,M.J. and Malanushenko, A. 2012, Sol. Phys., onlinefirst.
 Aschwanden, M.J., Wuelser, J.P., Nitta, N., Lemen, J., Schrijver, C.J. DeRosa, M., and Malanushenko, A., 2012a, ApJ, 756, 124.
 Aschwanden, M.J., 2012b, Sol. Phys., (in press).
 Aschwanden, M.J., Wuelser, J.P., Nitta, N.V., and Lemen, J.R., 2012b, Sol. Phys., 281, 101.
 Conlon, P.A. and Gallagher, P.T., 2010, ApJ, 715, 59.
 DeRosa, M.L., Schrijver, C.J., Barnes, G., Leka, K.D., Lites, B.W., Aschwanden, M.J., Amari, T., Canou, A., McTiernan, J.M., Regnier, S., Thalmann, J., Valori, G., Wheatland, M.S., Wiegelmann, T., Cheung, M.C.M., Conlon, P.A., Fuhrmann, M., Inhester, B., and Tadesse, T. 2009, ApJ, 696, 1780.
 Feng, L., Wiegelmann, T., Inhester, B., Solanki, S., Gan, W. Q., and Ruan, P., 2007, Sol. Phys., 241, 235.
 Gold, T. and Hoyle,F. 1960, MNRAS 120/2, 89.
 Grad, H., Rubin, H., 1958, Proc. 2nd UN Int. Conf. Peaceful Uses of Atomic Energy, 31, 190.
 Handy, B. et al., 1999, Sol. Phys., 187, 229.
 Inhester, B. 2006, ArXiv eprint: astroph/0612649.
 Inhester, B., Feng,L., and Wiegelmann,T., 2008, Sol. Phys., 248, 379.
 Jing, J., Tan,C., Yuan, Y., Wang, B., Wiegelmann, T., Xu,Y., Wang H., 2010, ApJ, 713, 440.
 Low, B.C., and Lou, Y.Q., 1990, ApJ, 408, 689.
 Malanushenko, A., Longcope, D.W., and McKenzie, D.E., 2009, ApJ, 707, 1044.
 Malanushenko, A., Schrijver, C.J., DeRosa, M.L., Wheatland, M.S., Gilchrist, S.A., 2012, ApJ, 756, 153.
 Metcalf, T.R., Jiao, L., Uitenbroek, H., McClymont, A.N., Canfield,R.C. 1995, ApJ, 439, 474.
 Sandman, A., Aschwanden, M.J., DeRosa, M., Wuelser, J.P. and Alexander, D. 2009, Sol. Phys., 259, 1.
 Sandman, A.W. and Aschwanden, M.J. 2011, Sol. Phys., 270, 503.
 Scherrer, P.H., et al., 1995, Sol. Phys., 162, 129.
 Schrijver, C.J., DeRosa, M., Metcalf, T.R., Liu, Y., McTiernan, J., Regnier, S., Valori, G., Wheatland, M.S., and Wiegelmann, T. 2006, Sol. Phys., 235, 161.
 Schrijver, C.J., DeRosa, M., Metcalf, T.R., Barnes, G., Lites, B., Tarbell, T., McTiernan, J., Valori, G., Wiegelmann, T., Wheatland, M.S., Amari, T., Aulanier, G., Demoulin, P., Fuhrmann, M., Kusano, K., Regnier, S., and Thalmann J.K., 2008, ApJ, 675, 1637.
 Valori, G., Kliem, B., and Fuhrmann, M., 2007, Sol. Phys., 245, 263.
 Wheatland, M.S., Sturrock, P.A., Roumeliotis, G. 2000, ApJ, 540, 1150.
 Wheatland, M.S., 2006, Sol. Phys., 238, 29.
 Wheatland, M.S. and Regnier, S., 2009, ApJ700, L88.
 Wiegelmann, T., 2004, Sol. Phys., 219, 87.
 Wiegelmann, T., Inhester, B., and Feng, L. 2009, Annales Geophysicae 27/7, 2925.
 Wiegelmann, T. and Sakurai T. 2012, Living Rev. Solar Phys., 9, 5.
 Wülser J.P. et al., 2004, SPIE, 5171, 111.
 Yang, W.H., Sturrock, P.A., and Antiochos, S.K., 1986, ApJ, 309, 383.