3D Radio and X-Ray Modeling and Data Analysis Software: Revealing Flare Complexity
Many problems in solar physics require analysis of imaging data obtained in multiple wavelength domains with differing spatial resolution, in a framework supplied by advanced 3D physical models. To facilitate this goal, we have undertaken a major enhancement of our IDL-based simulation tools developed earlier for modeling microwave and X-ray emission. The enhanced software architecture allows the user to (i) import photospheric magnetic field maps and perform magnetic field extrapolations to generate 3D magnetic field models, (ii) investigate the magnetic topology by interactively creating field lines and associated fluxtubes, (iii) populate the fluxtubes with user-defined nonuniform thermal plasma and anisotropic, nonuniform, nonthermal electron distributions; (iv) investigate the spatial and spectral properties of radio and X-ray emission calculated from the model, and (v) compare the model-derived images and spectra with observational data. The package integrates shared-object libraries containing fast gyrosynchrotron emission codes, IDL-based soft and hard X-ray codes, and potential and a linear force free field extrapolation routines. The package accepts user-defined radiation and magnetic field extrapolation plug-ins. We use this tool to analyze a relatively simple single-loop flare and use the model to constrain the magnetic 3D structure and spatial distribution of the fast electrons inside this loop. We iteratively compute multi-frequency microwave and multi-energy X-ray images from realistic magnetic fluxtubes obtained from pre-flare extrapolations, and compare them with imaging data obtained by SDO, NoRH, and RHESSI. We use this event to illustrate use of the tool for general interpretation of solar flares to address disparate problems in solar physics.
Subject headings:Sun: flares — Sun: radio radiation
Recent years have brought tremendous progress in solar observations. A fleet of space missions observes the Sun from different positions and at various spectral ranges—from long radio waves through optical and EUV to hard X-rays and gamma-rays, while numerous ground-based observatories provide daily records in the decimeter, microwave, and submillimeter radio ranges and in the optical. Although various measurements provide imaging and spectroscopy information related to different layers—photospheric, chromospheric, and various coronal levels—the observations provide only line-of-sight integrated 2D images and spectra, and the most common method of data analysis is through image comparison, i.e., analysis in a 2D domain. The 3D structure cannot be unambiguously revealed through observations alone, without considering physical models.
To remedy the situation we put forward an essentially new approach of observation-based 3D modeling, to create a realistic 3D model structure from which to calculate emission at various wavelengths, which can be adjusted to match the corresponding observed emission. In the context of solar flares, a key element of such modeling is the 3D coronal magnetic field, which currently is not accessible to direct measurement with the necessary precision. Until such measurements are available, we must rely on the photospheric/chromospheric measurements of the surface magnetic fields and fluid motions, from which various magnetic field models (e.g. potential, linear, or nonlinear force-free field extrapolations, or MHD models) are obtained. Having such a 3D magnetic data cube, one can fill a subregion (a magnetic loop, or a collection of loops) with prescribed plasma and nonthermal particle populations and predict escaping emission in any spectral range of interest.
Although this avenue is easy to outline, it is exceedingly complicated and time-consuming
to implement in practice and, for those few events where it has been attempted in the literature (Preka-Papadema & Alissandrakis, 1992; Kucera et al., 1993; Lee et al., 1994; Bastian et al., 1998; Simões & Costa, 2006; Tzatzakis et al., 2008; Fleishman et al., 2009; Simões & Costa, 2010; Fleishman et al., 2013; Gary et al., 2013; Costa et al., 2013; Kuznetsov & Kontar, 2014), a wide variety of methods have been used with varying level of sophistication.
To make such 3D modeling easier and more uniform, we have developed a flexible, easy-to-use modeling framework
in a form of an IDL-based widget tool, which we call GX Simulator, based on the latest, most sophisticated, and generally applicable codes. As more sophisticated codes become available, they can be easily added. The software is freely available for installation
via the solar software (SSW) distribution website111Solar software www.lmsal.com/solarsoft/. A detailed Help file is provided in the installation package, and a web version of it is accessible online with no need for prior installation of the package.222GX Simulator online documentation
In this paper, we outline the rationale, structure, and method of implementation of GX Simulator, as well as its main features and use. Further, we demonstrate its use and functionality for a well-observed solar flare. Our analysis of this solar flare concentrates on the 3D structure of the flaring loops, their lengths and heights determined from the modeling, 3D spatial relationships, and properties of the accelerated electron distribution (energy spectrum and 3D spatial distribution) needed to consistently interpret the available X-ray and radio data.
2. GX Simulator overview
As noted in the introduction, GX Simulator is designed to simplify the modeling of 3D magnetic field, plasma and energetic particle distributions in the solar atmosphere for use in comparative analysis of 2D spatial plus spectral observational data. The overall workflow of GX Simulator is presented in Figure 1.
The starting point of GX Simulator is the 3D magnetic field model in the corona (see section 3), which can be either loaded directly or modeled/extrapolated within GX Simulator. The simple hydrostatic background solar plasma model with uniform base pressure is automatically assumed. To this background plasma the user adds a model of the non-thermal electrons in a selected sub-region, e.g. along the magnetic field line of interest as described in Section 4. Using the prescribed properties of the magnetic field, plasma, non-thermal particles and selected field-of-view, GX Simulator calculates radio (section 5.1) and X-ray (section 5.2) imaging spectroscopy datacubes. These simulated images and spectra can be compared with the observed ones, and field line selection and particle distributions can be adjusted until an acceptable match is found.
Example: To demonstrate the capabilities of GX Simulator, throughout this paper we will refer by way of example to a well observed M9.3 solar flare that occurred on 4 Aug 2011. Figures 2 and 3 present an overview of data available for this solar flare from RHESSI (Lin et al., 2002), Fermi GBM (Meegan et al., 2009), Konus-Wind333A list of the Konus-Wind solar flare triggers and plots of their light curves are available at http://www.ioffe.ru/LEA/Solar/. (Pal’shin et al., 2014), NoRP (Nakajima et al., 1985), NoRH (Nakajima et al., 1994), and SDO(Pesnell et al., 2012). Specifically, we concentrate on the first flare episode bounded by two vertical dotted lines in Figure 2, primarily because RHESSI missed the main flare, but also because the radio emission is dominated by a single source during this period, but grows more complex during the later period when the flux levels are exceptionally large, which would complicate the analysis.
The X-ray and radio source morphology is consistent with the standard picture of a single flaring loop producing the coronal Soft X-Ray (SXR) and radio emission and accompanying footpoint Hard X-ray (HXR) emission from precipitating fast electrons (e.g. Holman et al., 2011; Kontar et al., 2011; White et al., 2011, as the recent reviews). Inspection of the photospheric magnetogram, however, is inconclusive for identification of the possible footpoint regions: although one of the HXR sources does project onto a region of enhanced magnetic field, the southern HXR source projects onto an area without strong magnetic field. To clarify the magnetic connectivity in the event, we employed the built-in capability of the GX Simulator to produce a potential (PFE) or linear force-free field extrapolation (LFFFE) from the photospheric boundary to the coronal volume (see Wiegelmann et al., 2005, for extrapolation discussions); the extrapolated datacubes are located in the SSW distribution folder. As will be shown in more detail in the following sections, in the case of a PFE magnetic model we were unable to identify any field line subset that could have corresponded to a flare loop with footpoints at the HXR source positions and a looptop at the SXR/radio source positions. Instead, the extrapolated magnetic field lines were found to be almost transverse to the ‘loop’ implied by the X-ray and radio morphology. However, the PFE magnetic connectivity was found to be in a good agreement with a subset of the EUV loops observed in the (SDO AIA; Lemen et al., 2012) data, Figure 3 right panel, with the ‘radio loop’ almost coinciding with one of fainter EUV loops. Nevertheless, using an alternative LFFFE magnetic model obtained by tuning the free parameter to a value of , we were able to produce a magnetic topology more consistent with the strong EUV emission observed in the SDO AIA background map, which appear to be more or less collocated with the neutral line of the active region.
3. Magnetic Field Models
3.1. Importing Magnetic Field Models
GX Simulator may import externally produced magnetic field models from a binary IDL sav file containing an arbitrarily named IDL structure that has a minimum set of mandatory and other optional
gx_simulator_help/scr/Magnetic%20Field%20Models.htm The mandatory tags are either a set of three dimensional arrays, , , and , holding the vector components (, , ) of the magnetic field in each volume element (voxel) of the 3D model, or a four dimensional array, where the fourth dimension indexes the cartesian components of the magnetic field. As detailed in the accompanying help file distributed with the GX Simulator installation package, other optional but highly recommended tags may include information related to the spatial resolution of the magnetic model (if different from the standard MDI resolution), location of the base map on the solar disk, as well as a set of reference IDL map structures or objects corresponding to the base field of view of the model. If at least one reference map is provided, and no specific date and location tags are provided, the date, time and location of the model are inherited from the corresponding tags present in the map structure.
Alternatively, as detailed below, one may create a magnetic field model from extrapolation of photospheric magnetic field measurements. For the example solar flare event, we used an SDO line-of-sight magnetogram obtained for 4-Aug-2011, 03:48:00 UT.
3.2. Creating Magnetic Field Models
The GX Simulator provides built-in capabilities for generating magnetic field extrapolation models based on input photospheric magnetic field maps imported from standard fits files or IDL save files that contain SolarSoft (SSW) map structures or objects. Currently the GX Simulator distribution package includes555Field extrapolation: http://web.njit.edu/~gnita/
Potential field extrapolation: this routine calls an external DLL based on an original FORTRAN code (Abramenko, 1986) developed by V. Abramenko and V. Yurchishin
Linear Force-Free Field extrapolation: extrapolation routine (Selhorst et al., 2005) developed in IDL by J. E. R. Costa and T. S. N. Pinto.
Standardized calling procedure for user-provided field extrapolation: provides hooks for use of alternative extrapolation methods.
The flexible IDL external-routine-calling protocol allows the user to replace the built-in extrapolation engines with any IDL-based or external code that outputs a magnetic datacube derived from an input LOS magnetogram or a three-dimensional array of map structures containing the input vector magnetogram.
The Extrapolation Project section of the GX Simulator also allows the user to import any number of additional reference maps that can be rotated and re-formatted to match the time of interest and the user-defined field of view and spatial resolution.
Example: Figure 4 illustrates the use of the GX Simulator Magnetic Field Extrapolation Project (MFEP) subsystem in the case of the 4 Aug 2011 flare. The left page of the MFEP user interface incorporates a customized SSW Plot Manager (Plotman) interactive display that allows flexible manipulation of the imported images, which may be optionally included in the list of reference maps listed on the right-hand panel. The field of view and spatial resolution of the reference maps are set using graphical controls or numerical input fields. Including reference maps in the project is optional, but the reference list must contain at least one photospheric LOS or vector magnetic field map as input to the extrapolation routine. In our case, we have imported images from SDO AIA, NoRH, and two RHESSI energies as reference maps, and used a LOS SDO HMI magnetogram taken on 4 Aug 2011 at 03:48:00 UT as the extrapolation source, rotated to the time of the RHESSI images produced for 03:45:28 UT. The IDL wrapper routine of the desired extrapolation engine is selected using a file upload control. This action exposes in a text field the header of the selected routine, which may be directly edited before its run-time compilation. The magnetic data cube output is displayed as a set of selectable, stacked 2D images on the bottom-right area of the project view. Once the MFEP output is accepted, the magnetic datacube model can be sent to the 3D-visualization subsystem of the GX Simulator, where the magnetic field topology may be inspected, and other properties or objects may be interactively added to the model, as described in the following section.
3.3. Inspection of the Magnetic Field Model Topology and Creation of Magnetic Flux Tubes
The next stage in preparing the model is to use GX Simulator tools to inspect the magnetic field topology and select a subset of magnetic field lines to serve as the locus of flare-accelerated particles. If no suitable magnetic field lines seem to match the topology implied by observations, it may be necessary to go back to the previous step to adjust the magnetic field extrapolation within allowed constraints.
Figure 5 illustrates the 3D visualization and manipulation capabilities of GX Simulator in the case of the PF extrapolation (left column) and LFFF extrapolation (right column). The top row of Figure 5 shows a set of field lines corresponding to the PFE (left panel) and LFFFE (right panel) magnetic models from a 3D perspective. GX Simulator allows the user to interactively create such field lines by mouse selection (clicking on locations on the photospheric magnetic field maps), or by numerical specification of any () coordinate within the 3D volume. The magnetic field line passing through the selected point is then drawn on the display, colored yellow if it leaves the volume through the side or top boundaries, and green if it closes within the volume at the bottom boundary. The middle row of Figure 5 shows the same field lines from a top view666When performing data to model comparison, it is essential to take into consideration the fact that the reference data emission maps, as well as the base magnetic field map used by GX Simulator to generate a PFE or LFFE magnetic cube model, are LOS images, even if the center of the rectangular field of view is not located at the disc center. Thus, forcing a top view perspective when generating the synthetic maps is needed in order to obtain the correct alignment of these maps with the perspective from which data were obtained. perspective against one of the available reference maps, a radio map for the PFE model, and an EUV map for the LFFFE model. From such a display, it is possible to visually identify one or more suitable field lines as the “spine” of a flaring loop. Using the GX Simulator tools one can then construct a flux tube structure as illustrated by the red central field line and adjacent green field lines in Figure 5. The bottom panels display the interactive input fields that GX Simulator dynamically creates in order to control the geometrical properties of a flux tube: the position along the central field line (sliding control) of a reference cross-section surface and its elliptical (left panel) or circular (right panel) cross-section defined in model grid units. A second slider control (bottom of the page) allows the user to select the longitudinal coordinate of the reference normal cross section from which all non-central flux tube field lines (green color) originate. When a new flux tube is created, the reference cross section coincides by default with the loop apex. The geometry control panel also displays information about the central field line characteristics such as length, loop-top position and magnetic field strength. The plot of the magnetic field strength relative to the reference values corresponding to the user defined coordinate is also displayed.
Example: In the case of the 4 Aug 2011 flare, we are able to reject the PF extrapolation result and refine the range of acceptable in the LFFF extrapolation based on comparison with observations. Although Figure 3 suggests a simple topology, Figure 5 reveals that the PFE magnetic field lines at the flare location are almost transverse to the ‘loop’ suggested by the combined X-ray, radio, and EUV morphology (although we note that the PFE magnetic connectivity was found to be in good agreement with other EUV loops observed elsewhere in the active region). At the same time, the alternative LFFFE magnetic model corresponding to provides a more sheared magnetic topology consistent with the shape of the strong EUV emission observed in the SDO background map, which appears to follow the neutral line of the active region. The value of was arrived at by trial-and-error comparison with the observed topology and is not claimed to be unique, but it is illustrative of the relative ease with which GX Simulator permits the use of observational data to constrain magnetic extrapolations.
4. Magnetic flux tube models: thermal plasma and non-thermal electrons
For each user-defined magnetic flux tube, GX Simulator dynamically creates a new Flux Tube control panel containing a series of tabbed pages that allow the user to interactively control the main physical properties of the corresponding magnetic flux tube model. These properties include, but are not limited to, thermal and nonthermal particle density distributions as well as distributions over energy and pitch-angle, as illustrated in the following sub-sections. These distributions are enhancements added to the background hydrostatic atmosphere mentioned earlier. The fully populated models employed in this paper are provided in the SSW distribution folder.
4.1. Thermal plasma
The thermal electron density distribution (e.g. that of a single-temperature “super-hot” component) is analytically defined as a product of a normalization factor , a unit-amplitude radial distribution and unit-amplitude vertical distribution ,
where and represent the flux tube cross-section cartesian coordinates and normalized by the ellipse semi-axes and of the reference cross-section intersecting the flux tube at the longitudinal coordinate , and represents the vertical coordinate corresponding to the normal cross-section containing the point , which intersects the central field line at the longitudinal coordinate . The solar radius also enters the vertical distribution expression as a spatial-scale normalization factor.
By default, GX Simulator uses the predefined generalized gaussian radial distribution
where () are adjustable dimensionless parameters; by default, and . The default vertical distribution is a simple hydrostatic formula adapted from § 3.1 of Aschwanden (2004),
where is an adjustable constant flux tube temperature.
Although the default analytical forms of these distributions were chosen to provide considerable flexibility, advanced users have the complete freedom to define their own analytical distributions. For this purpose, the functional forms of these distributions, the number of free parameters, and their values, may be edited at run-time using the textual and numerical input fields provided on their corresponding control tabs. The syntax is automatically checked for errors and a compiler message is generated if the user-defined syntax is not compliant with the IDL programming environment rules. The radial and longitudinal profiles of the user-defined thermal particle density distributions are plotted and automatically updated on the corresponding panel, as shown on the top row of Figure 6.
Example: The left-hand panels of Figure 6 present the Flux Tube panel (top) and 3D distribution (bottom) describing the thermal electron density distribution for the flux tube chosen for the LFFFE model for the 4 Aug 2011 flare. The single temperature is about 20 MK to match the thermal component of the hard X-ray spectrum, while the distributions across the loop are chosen to roughly match the soft-X-ray source shape. One can note that within the simple hydrostatic coronal plasma model the agreement between the observed and modeled SXR source is rather poor. However, we checked that this can be improved significantly by relaxing the assumption of the hydrostatic model; we do not show this improvement as we concentrate on the nonthermal emissions at the first place.
4.2. Nonthermal electrons
4.2.1 Nonthermal electrons: spatial distribution
In analogy to equation 1 for the thermal electron distribution, the nonthermal electron density spatial distribution associated with a given flux tube is defined as the product of a normalization factor , a unit-amplitude radial distribution () and a unit-amplitude longitudinal distribution along the central field line (),
where and are defined as above, and is the length of the central field line.
The default nonthermal radial distribution used by GX Simulator has the same functional form as the thermal radial distribution defined by equation (2), but to allow for confinement of the nonthermal distribution near an “injection” site (e.g. by turbulence) the default longitudinal distribution is defined as
where, beside the previously defined , and parameters, and are dimensionless scaling factors, and an adjustable location parameter that may be regarded as the injection point of the non-thermal particles, in case it is different from the loop apex point .
Again, all of these default analytical forms can be changed at run-time to any desired, user-defined expressions, which are checked for syntax upon entry, updated and plotted in the panel.
Example: The right-hand panels of Figure 6 present the nonthermal electron distribution panel (top) and 3D distribution (bottom) describing the nonthermal electron density distribution for the flux tube chosen for the LFFFE model for the 4 Aug 2011 flare. The rather narrow confinement of the electrons along the loop seems to be demanded by the NoRH 17GHz radio image, as well as radio and hard X-ray spectral parameters, as will be discussed later. For completeness, we attempted to fit all observations for the 4 Aug 2011 flare with both PFE-based and LFFFE-based models, which will be contrasted in the following. Table 1 lists the actual parameters assumed in the case of PFE (left column) and the LFFFE (right column) fluxtubes; in all cases we adopted .
|Thermal Density Distributions|
|Nonthermal Density Distributions|
4.2.2 Nonthermal electrons: energy distribution
In addition to the built-in energy distributions defined in Fleishman & Kuznetsov (2010), and implemented in the GS Simulator (Kuznetsov et al., 2011) application, GX Simulator introduces two new energy distributions, namely Thermal plus Power Law (TPL), and Thermal plus Double Power Law (TDL), which, as suggested by their names, consist of a thermal core and a single or double power law distribution over a limited energy range. The power law component is specified by low and high cutoff energies and power-law-index , as well as a break energy in the case of the double power law. The Flux Tube user interface of the GX Simulator contains an Electron Energy Distribution control tab that allows selection of the desired distribution type and, upon selection, exposes all input parameters relevant for the selected distribution. Note that the thermal component of TPL or TDL distributions777The difference of these two distributions compared with either single- or double power-law distributions is that the former takes the thermal electron contribution into account to compute the GS emissivity and absorption, while the latter does not. In all other respects the choice of TPL distribution is equivalent to PWL, and the choice of TDL is equivalent to DPL. The PWL or DPL computations are faster than, respectively, the TPL or TDL; thus, the use of PWL or DPL distributions is warranted when the contribution of the thermal plasma to the GS emissivity and opacity is small; otherwise, the TPL or TDL has to be used. is exactly the same thermal component specified in section 4.1.
Example: Choice of nonthermal energy distribution for the 4 Aug 2011 flare is based on the RHESSI photon spectrum, which shows a typical thermal plus power law shape. Figure 7 shows the selections made for both PFE and LFFFE models, for which, as will be shown in more detail below, the TPL distribution was required to provide enough degrees of freedom to allow a satisfactory match of the radio spectra recorded by NoRP.
4.2.3 Non-thermal electrons: pitch angle distribution
GX Simulator implements all electron distributions over pitch angle defined in Fleishman & Kuznetsov (2010), which include isotropic, exponential loss-cone, Gaussian loss-cone, Gaussian, and a generalized Gaussian.
Example: For the 4 Aug 2011 event, the simplest distribution (isotropic) has been assumed in both PFE and LFFFE models because the data did not offer any clear constraint on the angular distribution. However, if is known (Fleishman & Melnikov, 2003a, b) that pitch angle does significantly affect radio emission directionality, and it is possible that the spatial restriction of nonthermal electrons in Figure 6 could be relaxed by suitable choice of non-isotropic pitch angle distribution.
5. Escaping Radiation
Once a magnetic field model is customized and populated with plasma and non-thermal particles, GX Simulator can in principle calculate electromagnetic emission and radiation transfer for any radiation process. It currently calculates both radio and thin-target X-ray emissions. The user can choose any 3D orientation of the model for the observer LOS, as well as define the region of interest for which the escaping radiation will be computed.
GX Simulator provides a flexible plug-in standard that allows any user-defined radiation transfer code to be used in place of the default ones, provided that they adhere to the calling conventions detailed in the GX Simulator package help file. The radiation transfer engines use multi-dimensional LOS information provided by the general-purpose GX Simulator scanning engine, which slices the 3D model along the desired LOS direction.
5.1. Radio emission
GX Simulator computes radio emission based on the fast gyrosynchrotron algorithm developed by Fleishman & Kuznetsov (2010), implemented here in the form of external libraries optimized for the use within GX Simulator and callable from IDL. This code accounts for gyrosynchrotron and free-free radio emissions and absorption within the entire magnetic data cube; outside the cube the emission propagates as in vacuum.
The radio brightness map (the model emission intensity as a function of 2D coordinates and ) at a given frequency is calculated by numerical integration of the radiation transfer equation, which, in addition to the volume emissivity and absorption, also includes the linear mode conversion (mode coupling) and, for a given pixel, has a form
along all selected lines of sight, where and are the spectral intensities of the left- and right- elliptically polarized emission components, respectively, and are the corresponding emissivities, and are the absorption coefficients, and are the factors accounting for the frequency dependent mode conversion. The term accounts the fraction of the given wave modes that leaks into the other wave mode, while the term accounts for the fraction of the other wave mode that is converted to the given wave mode. If the line-of-sigh magnetic field component does not change the sign, the mode conversion is negligible in most cases; thus, we adopt in such cases, so radiation transfer equation simplifies to a more familiar form:
i.e., the emission components propagate independently until a quasitransverse (QT) magnetic field layer is met. In these QT layers the mode coupling takes place; its computation requires the magnetic field gradient, which is obtained from a linear interpolation of the magnetic field values between the two voxels in which the line-of-sight magnetic field direction changes; the solution for the QT layer has the form:
where the indices and refer to the current and previous voxels, respectively, and the coupling factor is computed with the exact equations of (Cohen, 1960; Zheleznyakov & Zlotnik, 1964) for the mode-coupling in a quasi-transverse magnetic field layer. We call this formalism the “exact coupling”. The account of the frequency-dependent mode coupling is an essential enhancement of the fast codes compared with earlier implementations described in (Fleishman & Kuznetsov, 2010; Kuznetsov et al., 2011), where only the extreme cases of the weak and strong couplings were implemented. GX Simulator uses by default the exact coupling mode, although the weak and strong coupling modes are also available for testing purpose and can be selected in the corresponding drop-down menu.
If the projection of the magnetic field vector on the line-of-sight is positive, then the right- and left- elliptically polarized components correspond to the X and O modes, respectively; otherwise (if the projection is negative), the correspondence is opposite. Note, that even though the emission escaping the data cube is elliptically (not circularly) polarized in a general case, it is implicitly assumed that it then propagates through a coronal plasma with declining values of both electron density and the magnetic field and so the polarization ellipse evolves towards circularity due to the effect of limiting polarization (see, e.g., Zheleznyakov, 1997; Fleishman & Toptygin, 2013); thus, the emission arriving at the observer is adopted as purely circularly polarized.
Another enhancement of the new implementation of the fast code is its ability to simultaneously solve the radiation transfer equations for many lines of sight (i.e., to simultaneously compute emission from many pixels) using parallel threads provided by modern multi-core processors. By default, the code determines the number of available threads of the processor and uses of them to compute emission, reserving one remaining thread for user interaction with the computer while computing emission; however, the user may change this allocation by explicitly typing the desired number of parallel tasks to the corresponding window of the GX Simulator interface. These libraries can be used both within GX Simulator and independent of it, so long as the simple calling conventions described in the GX Simulator documentation are observed.
By default GX Simulator computes and intensities and all possible combinations of them (total power, polarization, Stokes ) at one hundred logarithmically spaced frequencies between 1 and 100 GHz, but the range and logarithmic separation settings can be adjusted to different user needs. The nonthermal GS emission is often produced only in a fraction of the datacube designated to model the flaring loop(s), while in the remaining volume of the datacube the thermal free-free emission is produced. Importantly, the radiation transfer including mode coupling is considered along the entire line of sight, so the polarization can change well above the flaring loop. Typically, the time needed to compute the emission from all frequencies in all pixels is about one minute.
5.2. X-ray emission
For chosen electron spectrum and plasma properties, X-ray routines calculate observable flux of X-rays at 1 AU. The total flux from each voxel is the combination of thermal and non-thermal bremshtrahlung radiations. The current version of X-ray codes uses a simplified version of soft X-ray emission from plasma with temperature and electron () and proton () densities (e.g., Eq 2.3.14 in Aschwanden, 2004),
where is the photon flux spectrum [photons cm keV s], is the photon energy in keV, is the voxel volume. Similarly, the thin-target hard X-rays are calculated as described in (e.g. Holman et al., 2011; Kontar et al., 2011, as the recent RHESSI reviews)
where is 1AU distance, is the electron flux spectrum [photons cm keV s], is the bremsstrahlung cross-section. The angle-averaged bremsstrahlung cross-section by Haug (1997) is used for computations. The choice of cross-section is determined by the compatibility with RHESSI OSPEX software (Schwartz et al., 2002), where similar angle-averaged approximations are employed. The total X-ray flux spectrum (both Soft and Hard X-ray), logarithmically spaced between 3 and 300 keV, is determined as the sum along the line of sight for each pixel in X-ray maps. The user can see the resulting X-ray spectrum for each pixel of the map.
X-ray emission code is written as a separate module in IDL and allows further additions and improvements. Currently, X-ray code includes only electron-ion bremsstrahlung and does not account for Compton scattering or photoelectric absorption of X-rays in the solar atmosphere. The latter will produce a broad hump on the photon spectrum around 30-50 keV (Bai & Ramaty, 1978) and can be accounted for in RHESSI OSPEX software (see Kontar et al., 2006, for the details).
Example: In the case of the 4 Aug 2011 solar flare, we have employed the built-in fast gyrosynchrotron codes (Fleishman & Kuznetsov, 2010) for computing multiple radio maps at a set of microwave frequencies. The computed 17 GHz total intensity contours are displayed in the top row of Figure 8, for the PFE (left panel) and LFFFE (right panel) extrapolations, plotted on the corresponding NoRH 17GHz map. Using the built-in thin-target hard X-ray radiation transfer code, we also produced synthetic maps covering the observational range of the RHESSI instrument. The simulated 6-15 keV (middle row) and 25-50 keV (bottom row) contours derived from the PFE and LFFFE magnetic field models, are shown in the left and right panels, respectively, against the integrated 6-15 keV and 25-50 keV RHESSI maps. The white radio and X-ray contours in each panel were obtained by convolving the GX Simulator output with circular beams, and , respectively.
6. Model-data comparison
As indicated in Figure 1, an essential element of observation-based modeling is the comparison of the model results to the data, and associated iterative adjustment of the model (indicated by dashed lines in Figure 1). At present this is largely a manual exercise, but GX Simulator is designed to aid in the effort by allowing spatial overlays of model and data. This is accomplished by exporting the simulated data cube for a given type of emission to the built-in Plotman display, where Plotman’s powerful tools for overlaying images becomes available.
Example: Model-data comparison is facilitated by GX Simulator, as illustrated in Figure 9, where the simulated radio (red) and X-ray (blue) contours for the PFE and LFFFE models are displayed against the photospheric LOS magnetic field map (top row) and AIA 131 Å image (bottom row). These plots further support the conclusion that the LFFFE model (right column), which follows the neutral line of the active region, produces both radio and X-ray outputs that are in much better agreement with the observational data than the PFE model (left column), which is more confined and transverse to the neutral line. Note that, on close inspection, a subset of thermal EUV loops can be found in the AIA image that are transverse to the neutral line and nearly parallel to the PFE model flux tube, indicating that the magnetic topology is more complex than either the PFE or LFFFE models can capture alone. Nevertheless, the LFFFE model provides the larger source sizes and general orientation that better match the observed nonthermal sources.
Although spatial overlays are a powerful way to define the magnetic field topology and particle spatial distributions, once these are in rough agreement it is spectral comparisons that show where quantitative adjustments to parameters are needed. To this end, GX Simulator can export to Plotman any spatially resolved spectrum corresponding to a selected spatial location in the simulated image data cube, or the spectrum integrated over the entire field of view. The user can then compare the simulated spectra directly with observed spectra. The result of such analysis is illustrated in Figure 10, where the FOV integrated synthetic radio (left panel) and X-ray (right panel) spectra derived from the PFE (solid lines) and LFFFE (dashed lines) are compared with the spectra (symbols) observed by NoRH and RHESSI. On a first iteration, this spectral comparison is generally very poor, and only through adjustment of model parameters on subsequent iterations does this comparison begin to converge. By suitable adjustment, we were able to arrive at parameters (those given in Table 1) that reasonably reproduce the main features of the observed radio and X-ray spectra for both PFE and LFFFE models, though it may require additional fine tuning of the model parameters to fit a spectrum recorded at multiple time frames. Once the parameters are adjusted for the spectral fit, one can assess whether the required parameters are physically plausible.
Although we chose what initially appears to be a solar flare with simple geometry, our analysis has revealed a high level of complexity that cannot be fully captured by either PF () or LFFF (constant ) extrapolation models. One might expect a non-linear force-free field (NLFFF) extrapolation model based on vector magnetic field measurements to do a better job. This also can be handled by the GX Simulator tool, and we conclude our 4 Aug 2011 event study by presenting in Figure 11 a set of magnetic field lines provided by an externally performed 3D NLFFF extrapolation data cube provided by Ju Jing (private communication). The model was imported into GX Simulator in the normal way, and a subset of field lines was selected in the vicinity of the flare. These field lines are shown in a 3D perspective view against the base SDO LOS magnetic field map (top-left), and in a set of 2D views such as: against AIA 131 Å (top-right), RHESSI 6-15keV (middle-left) and 25-50keV (middle-right), NoRH 17GHz (bottom-left), and NoRH 34GHz (bottom-right) maps. Unfortunately, the new extrapolation fails to provide a clear single-loop magnetic topology that matches the observations, although it is possible to match the observed radio, EUV, and X-ray structures by considering a few distinct flux tubes. We have not attempted to further analyze this case, which would not fit the purpose and scope of this introductory study, but we point out that GX Simulator permits such more-detailed studies that could lead to stringent tests of NLFFFE methods in addition to further insights into the flaring process.
It is quite common to ask how unique the final model is in accounting for all of known observational constraints. It should be clear from the above that we cannot make any claim to uniqueness, and other combinations of parameters and geometry might equally well fit the observations, but the point of GX Simulator is to replace the often-used practice of hand-waving plausibility arguments with quantitatively testable, data-driven modeling. When more than one solution can fit the observations, one can always seek additional observations, which can provide additional constraints, in order to break the degeneracy and point to a more likely solution. After many iterations on many events, it is expected that use of GX Simulator will expose gaps in our physical understanding of flaring events, and eventually lead to a firmer foundation for observationally-driven flare models.
7. Other functionality and future development of the tool
Although we mentioned most of the currently available tool functions and capabilities, we demonstrated only a limited subset of them. Due to the intuitive nature of the interface, we believe the interested user will quickly become familiar with the functions of the tool, as currently available via the SSW distribution. GX Simulator will further be enhanced in the future and the upgrades will be added to the SSW. The next anticipated upgrades will have a number of new features including (i) numerically defined thermal models based on a realistic coronal heating model, (ii) ability to compute EUV emission, (iii) ability to compute active-region and quiet Sun models including gyroresonance and free-free emission from the thermal and quasi-thermal (e.g., -) distributions (Fleishman & Kuznetsov, 2014), (iv) a more realistic chromospheric model, (v) the ability to convolve the model images with the point-spread functions of various instruments, and (vi) ability to handle array-defined electron distributions determined from numerically solved particle transport equations, which will also allow to compute the thick-target hard X-ray emission.
We have described GX Simulator, and demonstrated its capabilities using a solar flare example. GX Simulator provides the framework for data-driven 3D modeling of flaring regions, with the scope of producing synthetic, multi-wavelength microwave and X-ray 2D imaging and spectroscopic data for comparison with observational data. The extendable, object-based architecture of GX Simulator encourages an open-source approach to this common problem in solar physics. The tool is easy to install and use on Windows, Unix and Mac platforms, and it is distributed along with a detailed Help file that contains Getting Started guidelines, as well as with a demo data set that may be used to reproduce the results presented in this paper. We have shown how the interactive graphical user interface allows the user to (i) import photospheric magnetic field maps and perform magnetic field extrapolations to almost instantly generate 3D magnetic field models, or alternatively to import field models generated externally, (ii) interactively explore the magnetic topology of these models by creating magnetic field lines and associated magnetic flux tubes, (iii) populate the flux tubes with user-defined nonuniform thermal plasma and anisotropic, nonuniform, nonthermal electron distributions; (iv) produce multi-wavelength images and spectra of radio and X-ray emission calculated from the model to investigate their spatial and spectral properties, and (v) compare the model-derived images and spectra with observational data. GX Simulator integrates shared-object libraries containing fast gyrosynchrotron emission codes developed in FORTRAN and C++, soft and hard X-ray codes developed in IDL, a FORTRAN-based potential-field extrapolation (PFE) routine and an IDL-based linear force free field extrapolation (LFFFE) routine. The extendable, interactive interface allows the addition of any user-defined IDL or externally-callable radiation code that follows our simple interface standards, as well as user-defined magnetic field extrapolation routines.
As an example, we have analyzed the 3D structure of an initial peak of a solar flare observed on 4 Aug 2011, using data from different spacecraft and ground-based observatories augmented by modeling using GX Simulator. This analysis has revealed a high level of complexity in the flaring volume and allowed us to quantify the main flaring loop producing the bulk of the nonthermal microwave and X-ray emission. This flaring magnetic loop is clearly non-potential (in the context of a linear force-free model, it requires a force-free parameter of order ). The length of the central field line forming the loop is cm; the magnetic field being G and G at the footpoints and G at the looptop; see Figure 5 for greater detail and the loop shape. The thermal plasma in the flaring loop has the density cm (which, given the flaring tube volume, yields the emission measure of cm) and MK and a gaussian transverse distribution with the parameters listed in Table 1, see Figure 6, left column for greater detail.
The fast electrons are concentrated at or near the looptop as often seen in flares (e.g., Melnikov et al., 2002). Both longitudinal and transverse distributions are well described by gaussian functions with the parameters listed in Table 1, see also Figure 6, right column. The number density of the fast electrons is cm between keV and MeV; the spectral index is . We emphasize that recovering the 3D distributions of the flaring loop physical parameters has been made possible by using the advancements of our powerful modeling tool, GX Simulator, which we have specifically developed for this purpose and made freely available via the SSW distribution888www.lmsal.com/solarsoft/ssw_packages_info.html.
We indicated by dashed lines in Figure 1 and mentioned in section 6 that a given model can be brought into better agreement with data through an iterative process of comparison of simulated images with the data, and subsequent adjustment of the model. A simple example of this has been seen here, where we first try and then reject the PFE magnetic model and turn to the LFFFE with multiple, iterative adjustments to ultimately find a suitable alpha. Ultimately, one can envision the development of more-sophisticated methods of quantitative comparison and model adjustment, which could lead to improved magnetic field extrapolation algorithms, particle acceleration models and so on.
In addition to the described functionality, the tool has other features (and more are planned to be added soon) including the ability to investigate spatially resolved spectra from a given pixel, which will be especially valuable when the imaging spectroscopy data has become available. Such data are anticipated from instruments like the Jansky Very Large Array (VLA), Expanded Owens Valley Solar Array (EOVSA), upgraded SSRT, CSRH, and eventually FASR.
- Abramenko (1986) Abramenko, V. I. 1986, Byulletin Solnechnye Dannye Akademie Nauk SSSR, 1986, 83
- Aschwanden (2004) Aschwanden, M. J. 2004, Physics of the Solar Corona. An Introduction (Praxis Publishing Ltd)
- Bai & Ramaty (1978) Bai, T., & Ramaty, R. 1978, ApJ, 219, 705
- Bastian et al. (1998) Bastian, T. S., Benz, A. O., & Gary, D. E. 1998, ARA&A, 36, 131
- Cohen (1960) Cohen, M. H. 1960, ApJ, 131, 664
- Costa et al. (2013) Costa, J. E. R., Simões, P. J. d. A., Pinto, T. S. N., & Melnikov, V. F. 2013, PASJ, 65, 5
- Fleishman et al. (2013) Fleishman, G. D., Kontar, E. P., Nita, G. M., & Gary, D. E. 2013, ApJ, 768, 190
- Fleishman & Kuznetsov (2010) Fleishman, G. D., & Kuznetsov, A. A. 2010, ApJ, 721, 1127
- Fleishman & Kuznetsov (2014) —. 2014, ApJ, 781, 77
- Fleishman & Melnikov (2003a) Fleishman, G. D., & Melnikov, V. F. 2003a, ApJ, 587, 823
- Fleishman & Melnikov (2003b) —. 2003b, ApJ, 584, 1071
- Fleishman et al. (2009) Fleishman, G. D., Nita, G. M., & Gary, D. E. 2009, ApJ, 698, L183
- Fleishman & Toptygin (2013) Fleishman, G. D., & Toptygin, I. N. 2013, Cosmic Electrodynamics (New York: Springer) 713 p.
- Gary et al. (2013) Gary, D. E., Fleishman, G. D., & Nita, G. M. 2013, Sol. Phys., 288, 549
- Haug (1997) Haug, E. 1997, A&A, 326, 417
- Holman et al. (2011) Holman, G. D., et al. 2011, Space Sci. Rev., 159, 107
- Kontar et al. (2006) Kontar, E. P., MacKinnon, A. L., Schwartz, R. A., & Brown, J. C. 2006, A&A, 446, 1157
- Kontar et al. (2011) Kontar, E. P., et al. 2011, Space Sci. Rev., 159, 301
- Kucera et al. (1993) Kucera, T. A., Dulk, G. A., Kiplinger, A. L., Winglee, R. M., Bastian, T. S., & Graeter, M. 1993, ApJ, 412, 853
- Kuznetsov & Kontar (2014) Kuznetsov, A. A., & Kontar, E. P. 2014, Sol. Phys.
- Kuznetsov et al. (2011) Kuznetsov, A. A., Nita, G. M., & Fleishman, G. D. 2011, ApJ, 742, 87
- Lee et al. (1994) Lee, J. W., Gary, D. E., & Zirin, H. 1994, Sol. Phys., 152, 409
- Lemen et al. (2012) Lemen, J. R., et al. 2012, Sol. Phys., 275, 17
- Lin et al. (2002) Lin, R. P., Dennis, B. R., Hurford, G. J., et al. 2002, Sol. Phys., 210, 3
- Meegan et al. (2009) Meegan, C., et al. 2009, ApJ, 702, 791
- Melnikov et al. (2002) Melnikov, V. F., Shibasaki, K., & Reznikova, V. E. 2002, ApJ, 580, L185
- Nakajima et al. (1985) Nakajima, H., Sekiguchi, H., Sawa, M., Kai, K., & Kawashima, S. 1985, PASJ, 37, 163
- Nakajima et al. (1994) Nakajima, H., et al. 1994, IEEE Proceedings, 82, 705
- Pal’shin et al. (2014) Pal’shin, V., et al. 2014, Geomagnetism and Aeronomy, 54, 943
- Pesnell et al. (2012) Pesnell, W. D., Thompson, B. J., & Chamberlin, P. C. 2012, Sol. Phys., 275, 3
- Preka-Papadema & Alissandrakis (1992) Preka-Papadema, P., & Alissandrakis, C. E. 1992, A&A, 257, 307
- Schwartz et al. (2002) Schwartz, R. A., Csillaghy, A., Tolbert, A. K., Hurford, G. J., Mc Tiernan, J., & Zarro, D. 2002, Sol. Phys., 210, 165
- Selhorst et al. (2005) Selhorst, C. L., Costa, J. E. R., & Silva, A. V. R. 2005, in ESA Special Publication, Vol. 600, The Dynamic Sun: Challenges for Theory and Observations
- Simões & Costa (2006) Simões, P. J. A., & Costa, J. E. R. 2006, A&A, 453, 729
- Simões & Costa (2010) —. 2010, Sol. Phys., 266, 109
- Tzatzakis et al. (2008) Tzatzakis, V., Nindos, A., & Alissandrakis, C. E. 2008, Sol. Phys., 253, 79
- White et al. (2011) White, S. M., et al. 2011, Space Sci. Rev., 159, 225
- Wiegelmann et al. (2005) Wiegelmann, T., Lagg, A., Solanki, S. K., Inhester, B., & Woch, J. 2005, A&A, 433, 701
- Zheleznyakov (1997) Zheleznyakov, V. V. 1997, Radiation in astrophysical plasmas [in Russian]; Original Russian Title — “Izlucheniye v astrofizicheskoy plasme” (Moscow: Yanus-K) 528 p.
- Zheleznyakov & Zlotnik (1964) Zheleznyakov, V. V., & Zlotnik, E. Y. 1964, Soviet Ast., 7, 485