# Methods to derive the magnetopause from soft X-ray images by the SMILE mission – Geoscience Letters

#### ByChi Wang and Tianran Sun

Aug 23, 2022

Solar wind charge exchange (SWCX) occurs when highly ionized species in the solar wind interact with neutral atoms such as the exospheric (geocoronal) hydrogen. SWCX was first proposed by Cravens (1997) to explain observations of X-ray emissions from the comet. An electron from the neutrals is transferred to the ion initially in a highly excited state, for example O(^{6+}), O(^{7+}), C(^{5+}), etc. On relaxation to the ground state one or more photons are emitted, producing soft X-ray of 0.5–2.0 keV band. These highly ionized solar wind ions originate in the solar atmosphere, and, for the most part, do not enter the magnetospheric cavity (magnetosphere) and thus are mainly present in the magnetosheath and cusps. Earth’s atmosphere does not contain highly ionized ions due to its lower temperature. Therefore, soft X-ray emissions mainly come from outside of the magnetopause, and rarely from the inside of the magnetopause, creating a sharp boundary.

The SMILE SXI is a widefield lobster-eye telescope equipped with CCD detectors, developed by the University of Leicester, UK. The latest design of the SXI has a field of view of 16(^o) by 27(^o). It will perform soft X-ray observations of the subsolar magnetopause and cusps. The soft X-ray flux is given by the integral of (P = alpha _{cx} n_H n_{sw} V_{rel}) along the line of sight, where (alpha _{cx}) is an efficiency factor dependent on the ion abundance, interaction cross-sections, branching ratios, etc. Typical value for (alpha _{cx}) is about (6 times 10^{-16}) to (6 times 10^{-15}) (Cravens 2000). (n_H) is the density of neutral particles, usually estimated as (25 (text{cm}^{-3})(10(R_E)/r)^3) (Cravens et al. 2001). (n_{sw}) is the density of solar wind protons with typical values as 5–12 (text{cm}^{-3}) (Wilson et al. 2021), and (V_{relv}) is their relative velocities typically several hundred km/s. The SXI will basically take 2D soft X-ray image of the intended target, with its FOV keeping changing as the spacecraft moves along orbit. It is essential to identify the exact location of the magnetopause, and will be a challenging task to to reconstruct the 3-dimensional surface of the magnetopause from 2-dimensional images.

So far, four approaches have been developed to derive the 3-D magnetopause position from X-ray images, namely the tangential direction approach (TDA), boundary fitting approach (BFA), tangent fitting approach (TFA), and computerized tomography approach (CTA). They will be introduced in the following sub-sections.

### Tangential direction approach (TDA)

The tangent vector plays a central role in differential geometry, which can be used to define global geometry of the magnetopause. Under a broad range of conditions, the peak soft X-ray emission corresponds to the tangent to the boundary surface such as magnetopause, the so-called limb brightening phenomenon (Collier et al. 2014). The viewing angle that touches the edge of the magnetopause has the longest path length through the emission region in the magnetosheath (Collier and Connor 2018). More emission occurs along this direction, producing a bright edge.

To determine the validity of the assumption that the local peaks in the observed SWCX soft X-ray flux coincide with the line-of-sight tangents to the magnetopause, Collier and Connor (2018) performed MHD simulations using OpenGGCM (e.g., Raeder et al. 2008). The MHD models were run and then line-of-sight integrations were calculated to determine the total soft X-ray flux observed in that direction due to the solar wind SWCX with exospheric neural hydrogen. Figure 2 shows an example of the results from MHD simulation for a southward interplanetary magnetic field (IMF) of 5 nT, a solar wind density of 10 cm(^{-3}), and a flow speed of 400 km s(^{-1}). In this case, the spacecraft was orbiting in the geocentric solar ecliptic (GSE) YZ plane (GSE X = 0). The top left panel in Fig. 2 shows the local soft X-ray emission at each point in this plane, and the top right panel shows the plasma density. Although densities peak in the outermost magnetosheath, emissions peak in the inner magnetosheath, since the total observed soft X-ray intensity depends not only on plasma density, but also on the exospheric neutral density and effective velocity. The lines in these two panels originate at the spacecraft location and show both the direction of the local peak in the soft X-ray emission (black) and the direction of the tangent to the magnetopause location (red). The lower panel in Fig. 2 shows that the direction of the peak emission ((theta _{XR})) and the direction tangent to the magnetopause ((theta _text{MP})) coincide to each other with an accuracy higher than one degree by plotting the line-of-sight integrated emission versus the line-of-sight angle. As expected, the difference between the two angles increases as the observation point gets closer to Earth. This appears to be a general property, namely, that a local peak in the observed soft X-ray flux occurs coincident with the geometric tangent line of sight to the surface.

To derive the general formula for reconstruction of the magnetopause from the spacecraft position, (vec {s}), parameterized by tangent angle (theta ), Fig. 3 illustrates the geometry. The point O is an arbitrary origin, (vec {r}) is the line-of-sight tangent direction unit vector, (vec {s}) is the vector define the spacecraft (for example, SMILE) location relative to O, (theta ) is the observed angle between the line-of-sight tangent and the positive x direction. As derived by Collier and Connor (2018), the general formula is:

begin{aligned} vec {p} = |frac{dvec {s}}{dtheta }cdot hat{theta }|vec {r}+vec {s}. end{aligned}

(1)

The magnetopause location can then be determined by the derivative of the spacecraft position with respect to the angle of the tangent direction.

Figure 4 shows the application of the reconstruction algorithm to a case in which the spacecraft executes a circular orbit in the GSE YZ plane of 20 Re radius (black). The top panel shows the relationship between the spacecraft location, and the angle at which the maximum soft X-ray flux is observed ((theta )). The middle panel shows (|ds/dtheta |), the derivative of the spacecraft position with respect to the observation angle of peak soft X-ray intensity. The bottom panel shows the magnetopause reconstruction resulting from the soft X-ray emission simulation (red, blue, and green) using equation 1 superimposed on the MHD plasma density results (shading). The black and yellow lines indicate the spacecraft orbit and the magnetopause locations calculated from the MHD model, respectively. The algorithm reconstructs the magnetopause location with reasonable accuracy. The root-mean-square (rms) difference between the position of the magnetopause based on the MHD simulation and the position calculated from the reconstruction algorithm is about 0.18 Re. In fact, the reconstruction algorithm manages to even reproduce the outer cusp shape viewing from satellite positions in the XZ plane (not shown here).

There are, however, limitations inherent in this reconstruction approach, for example, the assumption of time stationarity and the offset between the peak density gradient and the maximum soft X-ray emission. The first limitation could be alleviated by orbit binning the data according the desired solar wind conditions and then reconstructing the magnetopause from the data subsets corresponding to these conditions.

### Boundary fitting approach (BFA)

Jorgensen et al. (2019a) developed an method to extract the large-scale structures such as the magnetopause, and the bow shock from the soft X-ray images by fitting parameterized models to the images, so we called it boundary fitting approach (BFA). The models consist of a boundary model used for the magnetopause and the bow shock and a emission model used for the regions between the boundaries. The boundary model is a generalization of the model by Shue et al. (1997) and has the following form:

begin{aligned} r(theta ,phi )=frac{r_y(theta )r_z(theta )}{sqrt{[r_z(theta )cosphi ]^2+[r_y(theta )sinphi ]^2}}, end{aligned}

(2)

where in accordance with Shue et al. (1997),

begin{aligned} r_y(theta )=r_0(frac{2}{1+costheta })^{alpha _y}, end{aligned}

(3)

and

begin{aligned} r_z(theta )=r_0(frac{2}{1+costheta })^{alpha _z}, end{aligned}

(4)

where (theta ) is the angle to the X-axis and (phi ) is the azimuthal angle in a right-hand sense around the X-axis starting from the Y-axis.

The emissions model consists of three regions separated by the magnetopause and bow shock, both represented by the above equation with different parameters (r_0), (alpha _y), and (alpha _z) for each. The three regions are the solar wind region sunward (+X) of the bow shock boundary; the magnetosheath between the bow shock and the magnetopause, and the magnetosphere inside the magnetopause. The model is as follows:

begin{aligned} F(vec {r})={ begin{array}{ll} 0 &{} text {inside MP} \ (A_1+Bsin^8theta )(frac{r}{r_{ref}})^{-(alpha +beta sin^2theta )} &{} text {between MP and BS}\ A_2(frac{r}{r_{ref}})^{-3} &{} text {outside BS}. end{array} end{aligned}

(5)

The images used in the fit are then computed from the analytical model based on Eq. 5 for the soft X-ray emissions and Eq. 2 for each of the magnetopause and bow shock. The cost function is the mean-absolute deviation

begin{aligned} e=frac{1}{N}sum _{i=1}^{N}|f_{i,model}-f_{i,data}|, end{aligned}

(6)

because it typically produces better results (in the sense that it looks like a better fit to the eye) than the least-squares fit when the model and data are not exact matches. For finding the cost-function minimum, the the simplex approach by Nelder and Mead (1965) has been used. Since it is not a global minimization algorithm, the starting point for the minimizer should be carefully picked. The 11 parameters ((A_1, B, alpha ,beta ,A_2, r_0^{mp},alpha _y^{mp},alpha _z^{mp},r_0^{bs},alpha _y^{bs}), and (alpha _z^{bs})) are varied until an optimal match with a minimum cost function has been reached.

In the same way as above, we simulate the SWCX soft X-ray emissions by running the global MHD model, namely PPMLR (Hu et al. 2007; Wang et al. 2013). Figure 5a shows a simulated noise-free image, whereas Fig. 5b–d shows the same image with average pixel count rates of 1, 0.1, and 0.01 counts, assuming Poisson statics. The simulated image can be used to mimic the soft X-ray observations from SMILE. The fitted images from the boundary model and emission model are shown in Fig. 6. Comparing the images in Fig. 6 with those in Fig. 5 suggests that this is a close fit for the region imaged.

Jorgensen et al. (2019a, b) also discussed the effect of photon noise and model-fitting noise when extracting the 3D structures from 2D images by applying this boundary fitting approach. It is found that the reconstruction accuracy depends on pixel counts as expected. At lower count rates, the uncertainty becomes higher. The uncertainties obtained depend on viewing geometries. Generally, the more of a boundary that is contained in the image, the smaller the uncertainty on the parameters of that boundary. The fitted model parameters do not vary much with the viewing geometry except when the FOV misses essential elements such as the subsolar point of the magnetopause and bow shock.

In future work, it is worthwhile to consider other functional forms for the boundaries as well as the emission distribution in the magnetosheath and to a less extend the emission distribution in the solar wind. The emission from the cusps should be also taken into account.

### Tangent fitting approach (TFA)

Combining the advantages of TDA and DFA, Sun et al. (2020) developed a new method to derive the 3D magnetopause from a single X-ray image. The basic idea is similar to BFA in Jorgensen et al. (2019a, b) as introduced above, which compares the information provided by the X-ray image as well as a parameterized magnetospheric system in order to find the best match. However, instead of comparing the X-ray intensity at each pixel inside the FOV, TFA compares the tangent directions of the magnetopause. Specifically, as the first step, tangent directions of the magnetopause are derived by finding the location with maximum intensity of the X-ray image (Collier and Connor 2018). For the second step, a parameterized functional form for the magnetopause has been assumed, providing a set of reasonable magnetopause profiles. For each profile, the tangent directions can be calculated numerically. Finally, the magnetopause is reconstructed by finding the best match of the tangent directions analyzed from the soft X-ray image and the magnetopause function. In the second step, the functional form of magnetopause used by Sun et al. (2020) is also the modified Shue et al. (1997) model, shown by Eqs. (2)–(4). By changing (r_0), (alpha _y), and (alpha _z) within reasonable ranges, a set of magnetopause profiles can be obtained.

TFA has also been validated by using PPMLR-MHD simulation. Figure 7a is the simulated soft X-ray image ’observed’ by a hypothetical X-ray telescope, with a typical viewing geometry designed for SMILE. By searching for the maximum intensity, the black curve is derived and marked to show the tangent directions of the magnetopause. The tangent directions are also calculated for each possible magnetopause profile, by allowing the three parameters ((r_0), (alpha _y), and (alpha _z)) in the magnetopause function to float within reasonable ranges. Then the optimum match with the black curve has been found and plotted as the red curve. The parameters corresponding to the red curve are: (r_0) = 8.0 (R_E), (alpha _y) = 0.8 and (alpha _z) = 0.2, which help to portray the reconstructed magnetopause in Fig. 7c. To better evaluate the TFA result, 2D views of the reconstructed magnetopause are marked in Fig. 7(b1)–(b4) by the red curves, in comparison with the original MHD boundary shown by the white curves. The reconstruction result is in good accordance with the MHD boundary.

TFA is further validated with different viewing geometries on a candidate SMILE orbit. It is concluded that there is no apparent orbital bias while utilizing TFA to derive the 3D magnetopause position, as all the three variables show reasonable agreement with the MHD result. Nevertheless, the fitting error tends to increase while the satellite gets closer to the magnetopause boundary as expected. Since it is not able to obtain tangent directions from a point inside the magnetopause, TFA becomes invalid after the satellite enters the magnetosphere.

Based on TFA, we are able to derive the 3D magnetopause position from a single X-ray image, and therefore, TFA is applicable to events under fast solar wind variations. TFA only requires the assumption of the magnetopause function, and thus the number of free variables is apparently reduced compared to that in BFA, which has 11 parameters from the magnetopause, bow shock and magnetosheath emissivity models. Therefore, TFA tends to avoid possible false minima caused by inaccurate initial guess of the parameters. The application of TFA does not rely on simultaneous solar wind observations, which is used to provide well evaluated initial conditions.

### Computerized tomography approach (CTA)

Tomography refers to the cross-sectional imaging of an object from either transmission or reflection data collected by illuminating the object from many different directions. The impact of this technique in diagnostic medicine has been revolutionary. Computed tomography (CT) allows physicians to view internal organs non-invasively and scientists to evaluate compound materials non-destructively (Kak and Slaney 1987). The fundamental principle of X-ray CT is to reconstruct an object from its known line integrals or projection. CT image reconstruction algorithms have been extensively studied (see e.g., Kak and Slaney 1987 for a book description). In the field of space research, CT technique was first applied to image the electron density distribution in the ionosphere (Austen et al. 1988). Li et al. (2009) proposed using this method to reconstruct the global density of Earth plasmasphere from the line integrals of the EUV radiation. SMILE will record a large enough number of images from different viewing geometries, so the CT technique may be applicable if the magnetosphere remains unchanging which requires constant solar wind conditions. This is rare in the real situations. However, we could take superposed-epoch approach using images widely spaced in time but for similar solar wind conditions and dipole tilts.

Jorgensen et al. (2022) conducted a theoretical study of the tomographic reconstruction of the magnetosheath X-ray emissions, with (0.125 R_E) spatial resolution. Generally,

begin{aligned} A bar{u} = bar{p}, end{aligned}

(7)

where (bar{u}) of length n represents the real soft X-ray emission, (bar{p}) of length m is the imaged soft X-ray data, denoting all of the pixels in all of the images, and A is the system matrix with m rows and n columns which may be determined by the data collection geometry of the X-ray sensor. Tomographic reconstruction then solves the inverse problem of determining (bar{u}) from (bar{p}) given a known geometry matrix A. One of the earliest and simplest reconstruction techniques is the Algebraic Reconstruction Technique (ART) (Gordon et al. 1970). The main idea of ART is to make the estimated image satisfy one equation at a time. At each iteration, k, cycling through the rays, (i in [1;m]) and the next emissions distribution, (bar{u}^{k+1}) is computed as:

begin{aligned} bar{u}^{k+1}=bar{u}^{k}+lambda _{k}frac{p_i – overline{A}_{i} cdot bar{u}^{k}}{parallel overline{A_i} parallel ^2} overline{A}_{i}^{T}, end{aligned}

(8)

where (overline{A}_{i}) is now i of A. (p_i) is the measured data from the ith soft X-ray image. (bar{u}^k) is the estimation of the image by the kth iteration.

For many practical cases the ART procedure is nonetheless capable of producing an adequate reconstruction of the original volume distribution, with 180(^circ ) full coverage. However, for more complex volume distributions, when there is noise present in the images, or to improve the accuracy of the reconstruction with partial angular coverage, additional constraints can be introduced. Jorgensen et al. (2022) employs a denoising algorithm called total variation (TV) minimization which can reduce the total pixel-to-pixel variation in the image (Rudin et al. 1992). The TV algorithm is run after every pixel in every image has been visited in the ART algorithm.

In the same way as described above, the MHD simulation results are used to mimic the realistic soft X-ray emissions for a nominal designed orbit of SMILE. Figure 8 shows examples of images for a modeled apogee pass of the SMILE spacecraft not long after launch. Figure 9 shows the reconstruction using 100 images with ART and TV. The magnetosheath is reconstructed and that a portion of the cusp is reconstructed as well. As expected, the resulting reconstruction show much less pixel-to-pixel variation with more times TV iteration. Jorgensen et al. (2022) also compared the reconstruction with 10 images and 1000 images, and concluded that 100 images is sufficient for proper reconstruction.