Abstract
The determination of the three-dimensional (3D) geometry of coronal features is important for understanding the magnetic structuring of the solar atmosphere. In this context, the length of a coronal loop, which is subject to standing transverse oscillations, is a crucial parameter in coronal seismology for the correct estimation of the phase speed of the wave and, consequently, of the Alfvén speed and coronal magnetic-field strength. Simultaneous space-based observations of the solar corona from different vantage points, e.g. one from the Solar Dynamics Observatory (SDO) and the second from the Solar TErrestrial RElations Observatory (STEREO), have permitted the reconstruction of the geometry of coronal loops. Nisticò, Verwichte, and Nakariakov (Entropy 15, 4520, 2013) proposed a method based on principal component analysis for fitting an ensemble of 3D points that sample a coronal loop. This method was shown to retrieve easily the main geometric parameters that define a loop, such as the loop axes and the loop plane. In this article, an extension of that work is presented that includes a Python tool for performing geometric triangulation of coronal features seen by two different observers.
Similar content being viewed by others
Avoid common mistakes on your manuscript.
1 Introduction
Coronal plasma is optically thin for EUV and X-ray emissions. Coronal structures observed at these wavelengths appear projected onto the plane of the sky. The determination of the three-dimensional (3D) shape of coronal structures is in general not trivial. Structuring, mainly in the form of flux tubes, reflects the topology of the local magnetic field, since the corona is an environment with low plasma-\(\beta \), that is the magnetic pressure dominates over the thermal one.
Coronal loops in active regions outline the local magnetic-field lines and are subject to transverse oscillations, which have been detected in the last decade under different forms of kink motion and damping (Goddard et al., 2016; Pascoe et al., 2016; Nechaeva et al., 2019). Understanding the geometry of coronal loops is important for various reasons: e.g. better determination of the magnetic-field structure, a more reliable discrimination between horizontal or vertical polarisation. Coronal loops, which can be approximated by the field of a virtual point-like dipole below the solar surface, can be considered as a simple circular or elliptical shape. For example, the magnetic-field lines of a dipole are plotted in Figure 1, and two horizontal dotted lines mark the hypothetical position of the photosphere. Above these lines, the curves may appear at a first approximation as circular or elliptic sections. Such a representation for coronal loops is certainly idealized. The magnetic field in the solar corona is non-potential: current flows affect the structure of the magnetic field and can twist loops and make them non-planar. Finding the shape of coronal loop is extremely relevant in the context of coronal seismology. Strong uncertainties in the loop length inevitably affect the estimate of the phase speed of a certain observed MHD wave mode.
Example of magnetic-field lines (continuous lines) from a dipole located at the origin, whose magnetic axis is directed perpendicular to the plane defined by the \(x\)- and \(z\)-axes. Length is given in arbitrary units. The dotted lines at \(z=0.5, 1.0\) represent the hypothetical photospheric level. Some field lines emerging from the photosphere can approximately be represented by an ellipse or a semi-circle (coloured dashed lines).
The reconstruction of loops or any other solar feature requires at least two distinct points of observations located in space in order to retrieve the position of a feature by geometric triangulation. When only one point of observation was available, as in the 1990s with the Solar and Heliospheric Observatory (SOHO), the technique of dynamic stereoscopy (Aschwanden et al., 1999) was adopted. The launch of the twin Solar TErrestrial RElations Observatory (STEREO) spacecraft in 2006 has permitted taking advantage of two simultaneous points of observations. Stereoscopy is used for retrieving information on the position of a structure in 3D space. The principles of stereoscopy and their relevance to the reconstruction of coronal loops are described in the context of the STEREO mission (which consists of two identical spacecraft observing the Sun) by Inhester (2006). Furthermore, different tools were developed for performing triangulation of corona features, e.g. scc_measure.pro or sunloop.pro, available in the SolarSoftWare (SSW) and written in the IDL language. On the other hand, analysis of scientific data in Python has recently caught the interest of the community and a distribution of software package devoted to the analysis of solar data named Sunpy has been released (Barnes et al., 2020). A package dedicated to 3D reconstruction seems to be missing.
In this work, we aim at presenting a first version of a tool for geometric triangulation developed in Python and fitting the geometry of coronal loops and other features by using the technique of principal component analysis (PCA). By the method of PCA, coronal loops are modelled and fitted to a planar section of a circle or an ellipse. Section 2 presents the concept of geometric triangulation and the Python routines, Section 3 presents the curve-fitting technique with the principal component analysis, and Section 4 lists some examples of applications and analysis of the 3D geometry of some coronal features. A discussion and conclusions are given in Section 5.
2 Geometric Triangulation
We developed a graphic tool in Python, triangulate.py, which allows for a user to perform geometric triangulation of solar features as an alternative to the IDL routine scc_measure.pro in SSW. The principles of geometric triangulation applied to simultaneous observations of a coronal structure are given by Inhester (2006). Aschwanden et al. (2008) applied geometric triangulation to reconstruct the profile of coronal loops observed with STEREO-A and -B by the Extreme UltraViolet Imager (EUVI), describing in detail all the necessary steps to apply to data for performing triangulation (e.g. rotation of the solar images to the same axis, scaling to the same pixel resolution). The tool written in the Python language is not a mere copy and translation from IDL of the algorithm scc_measure.pro, but a simple imitation of the basic operative steps based on the principles of epipolar geometry. We provide a description of these steps as follows.
First of all, we fixed the reference frame in which we want to express the 3D coordinates of a feature of interest, that is Heliocentric Earth EQuatorial (HEEQ) coordinates: the \(\hat{z}\)-axis is directed along the solar North rotation axis, the \(\hat{x}\)-axis points towards the intersection between the solar Equator and the central meridian as seen from Earth, and the third axis is found as \(\hat{\boldsymbol {y}} = \hat{\boldsymbol {z}} \times \hat{\boldsymbol {x}}\). Let OBS-1 refer to an arbitrary observer. We define a heliocentric reference frame for OBS-1 with the Cartesian axes defined as follows (we use upper case letters for the axes to distinguish them from the HEEQ coordinate system): the \(\hat{Z}_{1}\)-axis points from the Sun’s centre to OBS-1, the \(\hat{Y}_{1}\)-axis is perpendicular to \(\hat{Z}_{1}\) and in a plane containing both the \(\hat{Z}_{1}\) and the solar rotation axis. The \(\hat{X}_{1}\)-axis is perpendicular to \(\hat{Z}_{1}\) and \(\hat{Y}_{1}\) pointing towards solar West. When we identify a feature in a solar image, for example in the image given by OBS-1 in Figure 2, we get its helio-projective coordinates (HPC) in angular units, e.g. \(\zeta _{1}\) and \(\eta _{1}\). Given the HPC coordinates, we can trace the line-of-sight (LoS) in the heliocentric coordinate system relative to the observer \((\hat{X}_{1}, \hat{Y}_{1}, \hat{Z}_{1})\) and having the coordinates of the LoS \(X_{1}\) and \(Y_{1}\) as a function of \(Z_{1}\):
with \(d_{1}\) the distance of the observer from the Sun. \(Z_{1}\) moves along the Sun–observer line with the positive orientation towards the observer, and can range within a reasonable interval of values, for example \([-2~\mathrm{R_{\odot}}, 2~\mathrm{R_{\odot}}]\). We used 1001 points to define the LoS in OBS-1. Then we convert these points from the observer-oriented reference frame for OBS-1 to the HEEQ coordinate system (points of coordinates (\(x_{\mathrm{LOS}}, y_{\mathrm{LOS}}, z_{\mathrm{LOS}}\))). The conversion consists of a double rotation of the observer-oriented reference frame to the HEEQ one. This can be achieved by the following matrix operation:
with
and
with \(\theta _{1}\) and \(\phi _{1}\) the latitude and longitude of OBS-1 in the HEEQ reference frame, respectively.
Scheme showing the principle of triangulation with two observers 1 (left panels) and 2 (right panels). Top: The axes in black mark the HEEQ coordinate system. The red and blue axes identify the heliocentric reference frames of OBS-1 and OBS2, respectively. A feature of interest is located in the 3D space (green dot) having HEEQ coordinates \((x_{P},y_{P},z_{P})\). The projections onto the PoS of the observer result in HPC coordinates \((\zeta _{1}, \eta _{1})\) and \((\zeta _{2}, \eta _{2})\), respectively. The PoS, according to the locations of the observers, in general lies out of the solar-rotation axis (\(\hat{z}\)-axis). Bottom panels: view of the PoSs of the two observers perpendicularly to the observer–Sun line (continuous line). The resulting vertical image axis for OBS-1 is aligned with the projection of the solar-rotation axis \(\hat{z}\), whilst for OBS-2 it is tilted a few degrees.
Now, it is necessary to define where the LoS from OBS-1 crosses the solar feature under interest. For this we use the second view, that from OBS-2. The LoS is deprojected into the field of view of OBS-2 by converting its points, expressed in HEEQ coordinates, into the heliocentric reference frame for OBS-2. We use the inverse of Equation 3, that is:
with \(\theta _{2}\) and \(\phi _{2}\) the HEEQ latitude and longitude of OBS-2. Once the LoS has been de-projected into HPC coordinates \((\gamma , \delta )\) in the FoV of OBS-2, the choice of the second point is constrained at the location where the LoS crosses the solar feature under interest. The procedure to triangulate the selected points and compute the 3D coordinates \((x_{P} , y_{P} , z_{P} )\) is illustrated in Figure 3.
Scheme showing the LoS from an observer de-projected into the FoV of the other one. The LoS is defined by a grid of equispaced points between \([-2~\mathrm{R_{\odot}}, 2~\mathrm{R_{\odot}}]\). The distances and proportions here have been exaggerated in order to illustrate the procedure for determining the 3D heliocentric coordinates. Following the LoS, the user selects a point of coordinates \((\zeta _{2}, \eta _{2})\). This will not lie on the LoS, but it is between the two closest points \((\gamma _{A}, \delta _{A})\) and \((\gamma _{B}, \delta _{B})\). Given these, a projection of \((\zeta _{2}, \eta _{2})\) on the LoS is determinated \((\zeta _{2}', \eta _{2}')\) and a normalised distance \(\epsilon \) is computed. This factor \(\epsilon \) will then be used to determine the 3D Cartesian coordinates of the point by Equations 8, 9, 10.
The de-projected LoS in OBS-2 is defined on a discrete sequence of points (the black dots along the continuous line in Figure 3) (proportions are exaggerated to better present the procedure). When we select the point where the de-projected LoS crosses, the loop is manually located in the image as \((\zeta _{2}, \eta _{2})\). It may well miss the de-projected LoS by a small amount and we therefore project the manual tie-point onto the deprojected LoS (epipolar line) to obtain \((\zeta '_{2}, \eta '_{2})\), which will fall between the LoS points \((\gamma_{A}, \delta_{a})\) and \((\gamma_{B}, \delta_{B})\). The distance between \((\zeta _{2}, \eta _{2})\) and \((\zeta '_{2}, \eta '_{2})\) in the figure is exaggerated for clarity. Having these coordinates we can calculate the distance \(\epsilon \) from \((\gamma _{A}, \delta _{A})\) and express it as a fraction of the interval size where \((\zeta _{2}', \eta _{2}')\) falls, i.e.
The Cartesian triplet in HEEQ is then computed by assuming linearity when projecting the 3D LoS in the FoV of OBS-2. Specifically, having the 3D points \((x_{\mathrm{LoS},A}, y_{\mathrm{LoS},A}, z_{\mathrm{LoS},A})\) and \((x_{\mathrm{LoS},B}, y_{\mathrm{LoS},B}, z_{\mathrm{LoS},B})\) associated with the HPC points \((\gamma _{A}, \delta _{A})\) and \((\gamma _{B}, \delta _{B})\), we can find:
The triangulation procedure is analogous if the user inverts the observers, i.e. if they choose first a point in OBS-2 and then selects the second point along the LoS traced in the FoV of OBS-1.
3 Curve Fitting: Principal Component Analysis
After the user has collected an ensemble of data points sampling the shape of a coronal structure, for example a coronal loop, the next step is finding the best curve that fits the data. We adopt the principal component analysis (PCA), whose theoretical basis and applications are described in detail by Nisticò, Verwichte, and Nakariakov (2013). In this section, we give a summary of how to apply the technique and run it in Python. A Python module has been developed named stereoscopy.py, containing a set of functions aiming at performing the PCA computation and at plotting the results for the different projections.
3.1 The Principal Component Analysis
The PCA reduces the correlation in the data and returns the basic information. This is achieved by diagonalising the covariance matrix built from a set of data points. From a geometrical point of view, applying the PCA to an ensemble of points sampling for example a loop in a 3D heliocentric reference frame means to transform them into a natural coordinate system for the loop itself, which would be represented by the loop plane and the major and minor radii that determine the profile (circular or elliptical). On the other hand, PCA can be also applied to 1D features, such as streamers of jets. For better clarity, we provide a summary of the PCA technique in the case of a set of \({(x_{\mathrm{P},i}, y_{\mathrm{P},i}, z_{\mathrm{P},i})}\) coordinates defining a certain coronal loop. Before constructing the covariance matrix \(\mathbf{C}\), it is advised to refer the points to a midpoint \((x_{\mathrm{M}}, y_{\mathrm{M}}, z_{\mathrm{M}})\), which is determined as the half distance between the loop footpoints. After the definition of the midpoint, the relative coordinates are computed:
This operation is equivalent to translating the heliocentric reference frame from the Sun’s centre to the loop midpoint. The covariance matrix is defined as
and then diagonalised in order to maximise the variances (i.e. the elements on the diagonal) and minimise the elements off the diagonal by solving the associated eigenvalue problem: \(\mathrm{det}|\mathbf{C} - \lambda \mathbf{I}| = 0\). The eigenvalues and the corresponding eigenvectors are computed in Python with the function eig of the Numpy library (Harris et al., 2020). Once computed, the eigenvalues are sorted in ascending order. We name each eigenvalue \(\lambda _{n}\), \(\lambda _{a}\), \(\lambda _{b}\) and the corresponding eigenvectors: \(\boldsymbol{e}_{n}\), \(\boldsymbol{e}_{a}\), \(\boldsymbol{e}_{b}\). The result of diagonalisation can lead to different geometrical interpretations or models, according with the values of the eigenvalues that are obtained. In general, the eigenvectors have a precise geometrical meaning and represent the axes where the variances of the dataset are maximised. From a geometric point of view, the eigenvectors represent the axes of an ellipsoid, which can be reduced to a planar or linear distribution of points, depending on the largest values taken by the eigenvalues.
For example, in the case of curvi-linear and planar features, such as coronal loops, one dimension associated to the smallest eigenvalue [\(\lambda _{n}\)] is negligible with respect to the others. The eigenvector \(\boldsymbol{e}_{n}\) represents the vector normal to the loop plane, while the others two eigenvectors \(\boldsymbol{e}_{a}\) and \(\boldsymbol{e}_{b}\) identify the vectors along the minor and major radii of the loop, which have values \(r_{a} = \sqrt{2 \lambda _{a}}\) and \(r_{b} = \sqrt{2 \lambda _{b}}\). The dataset can be re-projected onto a new reference frame, which is rotated with respect to the original translated heliocentric reference frame. Such a re-projection consists in a coordinate transformation, whose matrix is defined by the components of the eigenvectors.
On the other hand, in the case of a quasi-straight-line data point distributions, PCA will result in only one large eigenvalue. The associated eigenvector will simply indicate the direction, in which the points are distributed in the original coordinate system. Some examples are given in the next sections.
4 Applications and Data Analysis
We apply the PCA fitting method to some observations. We focus on three observations as follows: a coronal loop observed in a quiet-Sun region on 21 January, 2013 and already studied by Nisticò, Verwichte, and Nakariakov (2013), Nisticò, Anfinogentov, and Nakariakov (2014), and Duckenfield et al. (2018) (Observation No. 1); some loops in the active region observed on 13 February, 2011, and listed in the catalog of Nechaeva et al. (2019) (Observation No. 2); a coronal jet (Observation No. 3) listed in the catalog from Nisticò et al. (2009). The principal component analysis results are presented in Table 1.
4.1 Observation No. 1
The 3D shape of the coronal loop has already been discussed by Nisticò, Verwichte, and Nakariakov (2013). It represents a good target for testing the Python script triangulate.py and comparing the outputs with the SSW routine scc_measure.pro. The loop is found in a quiet region and is made of several finer threads, which experience transverse oscillation. The loop was also studied by Duckenfield et al. (2018), who found the presence of multiple harmonics in the oscillations. In Figure 4 we present a one-time snapshot of the observations. The top panel of Figure 4 shows the graphical interface of the triangulate.py tool. It consists of two windows showing the region with the loop of interest as seen from the Atmospheric Imaging Assembly (AIA) of the Solar Dynamics Observatory (SDO) (left) and the Extreme UltraViolet Imager (EUVI) of STEREO-A (right). To increase the appearance of the loop in the FoV of the instruments, we subtracted from the images those taken five minutes before (because of the cadence of STEREO/EUVI). The graphical interface presents some buttons that can be used for interacting with the images and enable to activate the cursor of the mouse, picking a point (for example, the red point in the AIA FoV), and drawing the line-of-sight in the other FoV (the associated line-of-sight in white in the EUVI FoV). More details are provided in the Appendix. The ensemble of 3D points sampling the coronal loop is shown in the middle panels for three different orientation of the HEEQ coordinate system: in red, points obtained from the Python tool, in blue, those found with the SSW/IDL routine scc_measure.pro. Both distributions lie along the same path, indicating that the Python tool works well and returns similar results. The red dots are fitted by the PCA. First, the points are refered to a midpoint, which ideally lies on the loop base line. Since the loop is sampled for its entirety, we calculated the midpoint as the half distance of the two extreme points at the loop footpoints. The best-fitting curve is plotted as a red-dashed line, and it is found in the local reference frame of the loop after having determined the principal components. The blue and red arrows represent the axes of the ellipse: in blue the major and in red the minor radii. The green arrow represents the normal to the loop plane. The coronal loop in the local reference frame is plotted in the bottom panel of Figure 4. The best curve is found as:
with \(\theta =[0,2\pi ]\), and \((x_{l}, y_{l}, z_{l})\) coordinates of the points in the local reference frame. The best-fitting curve can be referred to the HEEQ reference frame by a simple change of basis and spatial translation as follows:
with \((x_{M}, y_{M}, z_{M})\) being the midpoint coordinates and the change of basis matrix defined as (please note the that components of the eigenvectors are in the HEEQ reference frame):
Analysis of Observation No. 1. Top: SDO/AIA (left) and STEREO/EUVI-A FoVs containing the observed coronal loop. Middle: data points sampling the shape of the coronal loop from the triangulate.py tool (in red) and from the scc_measure.pro procedure (in blue). The PCA is applied only to the red points. The eigenvectors are plotted in different colours. The dashed red line is the fitting curve. Bottom panels: the data points sampling the loop in the local reference frame. The continuous red line is the fitting curve.
4.2 Observations No. 2
The active region under interest was observed face-on from SDO/AIA and side-viewed from STEREO/EUVI-A (Figure 5) and was the site of a flare that triggered kink oscillations (Nechaeva et al., 2019). The loops of the active regions overlap in some parts. In general, the triangulation procedure is efficient when the same structure is clearly distinguishable by both observers, which in this case may be particularly difficult. The entire path of the loops is seen in the SDO/AIA perspective, while in STEREO/EUVI-A the loops are so squashed that it is difficult to clarify which leg lies in front of the other. However, by drawing the LoS of one observer onto the other, one could in principle guess the orientation of the loop and its height. For this case, a technique described by Verwichte, Foullon, and Van Doorsselaere (2010) would be more suitable considering the perspectives of the active regions from the observers. In any case, we applied the triangulation tool in order to retrieve the geometry of the large loop observed in the North of the active region. To increase the appearance of the loops, we processed the images by adopting a high-pass filtered image, which was obtained by subtracting from the normal intensity image the Gaussian smoothed one with \(\sigma = 2.0 \) pixels.
Analysis of Observation No. 2. Top: high-pass filtered images for the active region observed by SDO/AIA 193 (left) and STEREO/SECCHI/EUVI 195 (right). The tie-points are given in red and are numbered from 0 to 8, in order to associate the corresponding loop legs in both the FoV. The fitting loop from PCA is overplotted in blue. The loop footpoints are given as green triangles. In the left panel, the solar limb as viewed by STEREO is overplotted in red. Middle: 3D reconstructed loop in three different projection in the HEEQ coordinate system. Bottom: reconstructed loop in the local reference frame.
The loop is marked by a series of tie-points that were collected with the triangulate.py routine (Figure 5). When collecting the points, we identified the right loop leg viewed by SDO/AIA with the upper one in STEREO/EUVI-A. However, since the epipolar line drawn from the SDO FoV crosses both the legs of the loop in the STEREO-A image, the ambiguity about the location of the legs is still present. Therefore, we performed a second triangulation by reversing the position of the loop legs (Figure 6).
Analysis of Observation No. 2, but with a reverse orientation of the loop legs, with respect to what was shown in Figure 5. Top: high-pass filtered images for the active region observed by SDO/AIA 193 (left) and STEREO/SECCHI/EUVI 195 (right). The 3D tie-points are given as red dots and number from 0 to 8. The fitting loop from PCA is overplotted in blue. The loop footpoints are given as green triangles. In the left panel, the solar limb as viewed by STEREO is overplotted in red. Middle: 3D reconstructed loop in three different projections in the HEEQ coordinate system. Bottom: reconstructed loop in the local reference frame.
In both cases, we collected nine tie-points which sample the loop profiles. Each tie point is highlighted with a number in Figure 5 and 6, which help with the association of the loop legs observed with AIA and EUVI-A. The loop footpoints are only visible in the AIA FoV, and their identification also becomes difficult because of the presence of many overlapping loop threads. We got the coordinates in the helioprojective coordinate system: the eastern footpoint was chosen with coordinates (\(-80, -194\)) arcsec, while the western one having coordinates (\(9, -194\)) arcsec. The heliocentric position of the midpoint is determined by a simple average of the two footpoints coordinates and is given in Table 1. The PCA works well with a few points, and a nice elliptical shape is found in both cases, with the major radius of the ellipse about 2.5 times greater than the minor radius. However, the ambiguity about which reconstruction fits the loops is not solved. The 3D-reconstructed loops differs only in the orientation, determined by the azimuthal angle formed by the footpoint baseline. Furthermore, in both cases the footpoints of the reconstructed loops deviate from the locations were chosen, and which are plotted as green triangles in Figures 5 and 6. This particular case shows how geometric triangulation results can be difficult and the removal of any ambiguity in the loop shape can be tackled by adopting automatic tracing methods (Aschwanden, De Pontieu, and Katrukha, 2013; Gary, Hu, and Lee, 2014).
4.3 Observations No. 3
In this example, we demonstrate how to apply the principal component analysis to coronal features that are not curved, like coronal loops, but different such as coronal jets, which appear as narrow ejections of plasma. We can triangulate the shape of the jet with a series of points sampling its entire length. The advantage in using the PCA relies on the possibility to infer the direction of propagation of the ejected plasma. Indeed, since a coronal jet is a collimated column of plasma, the PCA applied to an ensemble of tie-points should return as usual three eigenvectors, but two of them, which are associated with very small eigenvalues, are representative of the cross-section of the jet; the third one, associated with the largest eigenvalue, defines the direction of propagation (i.e. the direction where there is the largest spread of the data points). In a more general context, 3D reconstruction of jets is useful for recovering the 3D kinematics (Patsourakos et al., 2008) or for understanding the eventual deflection due to magnetic field (Nisticò et al., 2015).
In the following case, we carried out geometric triangulation for a jet observed by STEREO and listed in the catalogue of Nisticò et al. (2009). The top panel of Figure 7 presents the jets as seen in the 171 Å channels of EUVI-B (left) and EUVI-A (right). We used normal intensity images: there was no need to apply any filtering since the jet emission was clearly seen. The red plus points are those determined with triangulate.py and sample the entire visible length of the jet. A further point is shown at the eastern leg of the jet base in STEREO-B and the associated LoS in STEREO-A for demonstrative purpose.
Before applying the PCA, we subtract the coordinates of a reference point, which is located at almost half the height of the jet, from the data. The PCA returns an eigenvector (the blue arrow in the bottom panels of Figure 7) directed in the same way as the points are distributed (given in magenta colour). The length of the eigenvector in green is intentionally exaggerated and does not reflect the true length determined by the corresponding eigenvalue. The direction of propagation of the jet can be compared to the radial direction. By considering a radial unit vector \(\hat{\boldsymbol{e}}_{r}\) from the midpoint of the data point distribution, we found that the angle formed with respect to the unit vector \(\hat{\boldsymbol{e}}_{b}\) is about 178.5 deg. The vector \(\hat{\boldsymbol{e}}_{b}\) is directed oppositely to the direction of the ejected plasma, hence the plasma jet moves almost radially away. It is worthwhile to mention some wiggles in the distribution of the data points as seen in the middle panels. Such a wiggle is not seen in the images (at the time of the observations, because of the small angle separation between the spacecraft, the plane-of-sky of the observers is close to that of the plane Y–Z of the HEEQ reference frame). The wavy shape is probably due to the uncertainties in picking the points that sample the jet. However, future analysis of other events may relate the wave-like structure of a jet to transverse oscillations, as already found in some jet observations (Cirtain et al., 2007) and theoretically described by Vasheghani Farahani et al. (2009). 3D reconstruction as a function of time will give more details on the evolution of kink oscillations in coronal jets.
5 Discussion and Conclusions
In this work, we present a graphic tool coded in Python named triangulate.py that allows performing geometric triangulation of coronal features observed from two different vantage points. The concept of the tool is equivalent to that of the SSW/IDL routine scc_measure.pro, based on manual tie-point reconstruction. The main purpose is to provide a software for non-IDL users, who mainly work with Python and the SunPy package for the analysis of solar image data. Furthermore, following Nisticò, Verwichte, and Nakariakov (2013), we have also defined some functions in Python, collected in a module stereoscopy.py, for i) performing the principal components analysis of a set of 3D coordinates sampling a certain coronal feature, and ii) plotting the reconstructed shape into different projections of the HEEQ coordinate system. We present the results of applying the triangulation routine to different observational targets: two coronal loops (Observations No. 1 and 2) and one jet (Observation No. 3). In Observation No. 1, we compared the outputs of the Python program triangulate.py with the SSW/IDL routine scc_measure.pro. Both algorithms give very similar results.
The PCA method is adopted for recovering the 3D shape of coronal structure. The tie-points that are sampled with triangulate.py form a cloud of points. The PCA defines a reference frame for which the cross correlations of the data-point components vanish. Three positive eigenvalues of different values are obtained from the covariance matrix of the tie points. In the case when one eigenvalue dominates all others, we have a nearly linear shape of the point cloud. In this case, the root mean square of the fitting can be represented by
which is the distance of the points from the line along the eigenvector \({\boldsymbol{e}}_{b}\). In the case when two eigenvalues dominate the smallest \(\lambda _{n}\), the cloud is distributed near a plane. Then \(\lambda _{n}\) is just the root-mean-square distance of the data points from the plane. We now interpret the two largest eigenvalue, \(\lambda _{a}\) and \(\lambda _{b}\), as the radii of the loop ellipse (or a circle in the case \(\lambda _{a} = \lambda _{b}\)). The loop shape is well reconstructed if the data points are distributed more or less regularly along the entire loop profile (Observation No. 1 is an example for such a case). The uncertainties associated with the eigenvectors and eigenvalues from the PCA are not straightforward to determine. Sonnerup and Scheible (1998) in the context of minimum and variance analysis of magnetic-field measurements (equivalent to the PCA) provide three different methods for evaluating uncertainties of the principal components, including the possibility of bootstrap techniques. When tracing coronal features, a major source of error is associated with the correct identification of the same structure in both the perspectives. In addition, the correct determination of the loop footpoints (hence the associated centre of the loop or midpoints) contributes to the goodness of the fit (for example, Observation No. 2). For simplicity, we propose that the uncertainties of the loop radii \(r_{a}\) and \(r_{b}\) are determined by the distance of the data point from the ellipse along the radial direction, i.e.:
with \(\cos \theta _{i} = x_{i}/\sqrt{x_{i}^{2}+y_{i}^{2}}\), and
with \(\sin \theta _{i} = y_{i}/\sqrt{x_{i}^{2}+y_{i}^{2}}\). The values of the uncertainties are reported in Table 1 for Observations No. 1 and 2.
Observation No. 2 is an example where the interpretation of two largest eigenvalues as the radii of the loop ellipse does not work optimally because the data points do not cover the entire loop profile. This leads to an overestimation of the major axis of the loop. In such a case, the data points projected into the plane normal to \({\boldsymbol{e}}_{n}\) may be better fitted directly to an ellipse; e.g. the least-square-fit proposed by Gander, Golub, and Strebel (1994) may then yield an elliptic loop shape with a smaller distance to the data points.
Three-dimensional reconstruction of coronal structures plays a relevant aspect with the recently launched Parker Solar Probe (PSP) and Solar Orbiter. The Wide-Field Imager (WISPR) instrument onboard PSP acquires off-Sun-centred observations in white light of the solar corona and inner heliosphere (Vourlidas et al., 2016). The problem of geometric triangulation with WISPR was presented by Liewer et al. (2019) and Nisticò et al. (2020). Remote-sensing instruments onboard Solar Orbiter such as the Metis coronagraph (Antonucci et al., 2020), the Extreme Ultraviolet Imager (EUI: Rochus et al., 2020), and the Heliospheric Imager (Howard et al., 2020) observe both in white light and ultra-violet wavelengths. For example, multi-instrument observations are fundamental for understanding the 3D evolution of coronal mass ejections. PCA could be helpful for retrieving the symmetry axes of CMEs that can be modelled as ellipsoids. In addition, Zhukov et al. (2021) have used geometric triangulation with SDO/AIA and the Solar Orbiter/EUI data to estimate the height of coronal EUV brightenings, also called as campfires.
Data Availability
Data are available from the STEREO and SDO data archives.
Code Availability
The Python code for the 3D geometric reconstruction is publicly available (Nisticò, 2023).
References
Antonucci, E., Romoli, M., Andretta, V., Fineschi, S., Heinzel, P., Moses, J.D., Naletto, G., Nicolini, G., Spadaro, D., Teriaca, L., Berlicki, A., Capobianco, G., Crescenzio, G., Da Deppo, V., Focardi, M., Frassetto, F., Heerlein, K., Landini, F., Magli, E., Marco Malvezzi, A., Massone, G., Melich, R., Nicolosi, P., Noci, G., Pancrazzi, M., Pelizzo, M.G., Poletto, L., Sasso, C., Schühle, U., Solanki, S.K., Strachan, L., Susino, R., Tondello, G., Uslenghi, M., Woch, J., Abbo, L., Bemporad, A., Casti, M., Dolei, S., Grimani, C., Messerotti, M., Ricci, M., Straus, T., Telloni, D., Zuppella, P., Auchère, F., Bruno, R., Ciaravella, A., Corso, A.J., Alvarez Copano, M., Aznar Cuadrado, R., D’Amicis, R., Enge, R., Gravina, A., Jejčič, S., Lamy, P., Lanzafame, A., Meierdierks, T., Papagiannaki, I., Peter, H., Fernandez Rico, G., Giday Sertsu, M., Staub, J., Tsinganos, K., Velli, M., Ventura, R., Verroi, E., Vial, J.-C., Vives, S., Volpicelli, A., Werner, S., Zerr, A., Negri, B., Castronuovo, M., Gabrielli, A., Bertacin, R., Carpentiero, R., Natalucci, S., Marliani, F., Cesa, M., Laget, P., Morea, D., Pieraccini, S., Radaelli, P., Sandri, P., Sarra, P., Cesare, S., Del Forno, F., Massa, E., Montabone, M., Mottini, S., Quattropani, D., Schillaci, T., Boccardo, R., Brando, R., Pandi, A., Baietto, C., Bertone, R., Alvarez-Herrero, A., García Parejo, P., Cebollero, M., Amoruso, M., Centonze, V.: 2020, Metis: the Solar Orbiter visible light and ultraviolet coronal imager. Astron. Astrophys. 642, A10. DOI. ADS.
Aschwanden, M., De Pontieu, B., Katrukha, E.: 2013, Optimization of curvilinear tracing applied to solar physics and biophysics. Entropy 15, 3007. DOI. ADS.
Aschwanden, M.J., Newmark, J.S., Delaboudinière, J.-P., Neupert, W.M., Klimchuk, J.A., Gary, G.A., Portier-Fozzani, F., Zucker, A.: 1999, Three-dimensional stereoscopic analysis of solar active region loops. I. SOHO/EIT observations at temperatures of \((1.0\,\text{--}\,1.5) \times 10^{6}~\text{K}\). Astrophys. J. 515, 842. DOI. ADS.
Aschwanden, M.J., Wülser, J.-P., Nitta, N.V., Lemen, J.R.: 2008, First three-dimensional reconstructions of coronal loops with the STEREO A and B spacecraft. I. Geometry. Astrophys. J. 679, 827. DOI. ADS.
Barnes, W.T., Bobra, M.G., Christe, S.D., Freij, N., Hayes, L.A., Ireland, J., Mumford, S., Perez-Suarez, D., Ryan, D.F., Shih, A.Y., Chanda, P., Glogowski, K., Hewett, R., Hughitt, V.K., Hill, A., Hiware, K., Inglis, A., Kirk, M.S.F., Konge, S., Mason, J.P., Maloney, S.A., Murray, S.A., Panda, A., Park, J., Pereira, T.M.D., Reardon, K., Savage, S., Sipőcz, B.M., Stansby, D., Jain, Y., Taylor, G., Yadav, T., Rajul, Dang, T.K. (SunPy Community): 2020, The SunPy project: open source development and status of the version 1.0 core package. Astrophys. J. 890, 68. DOI. ADS.
Cirtain, J.W., Golub, L., Lundquist, L., van Ballegooijen, A., Savcheva, A., Shimojo, M., DeLuca, E., Tsuneta, S., Sakao, T., Reeves, K., Weber, M., Kano, R., Narukage, N., Shibasaki, K.: 2007, Evidence for Alfvén waves in solar X-ray jets. Science 318, 1580. DOI. ADS.
Duckenfield, T., Anfinogentov, S.A., Pascoe, D.J., Nakariakov, V.M.: 2018, Detection of the second harmonic of decay-less kink oscillations in the solar corona. Astrophys. J. Lett. 854, L5. DOI. ADS.
Gander, W., Golub, G.H., Strebel, R.: 1994, Least-squares fitting of circles and ellipses. BIT Numer. Math. 34, 558. DOI.
Gary, G.A., Hu, Q., Lee, J.K.: 2014, A rapid, manual method to map coronal-loop structures of an active region using cubic Bézier curves and its applications to misalignment angle analysis. Solar Phys. 289, 847. DOI. ADS.
Goddard, C.R., Nisticò, G., Nakariakov, V.M., Zimovets, I.V.: 2016, A statistical study of decaying kink oscillations detected using SDO/AIA. Astron. Astrophys. 585, A137. DOI. ADS.
Harris, C.R., Millman, K.J., van der Walt, S.J., Gommers, R., Virtanen, P., Cournapeau, D., Wieser, E., Taylor, J., Berg, S., Smith, N.J., Kern, R., Picus, M., Hoyer, S., van Kerkwijk, M.H., Brett, M., Haldane, A., del Río, J.F., Wiebe, M., Peterson, P., Gérard-Marchant, P., Sheppard, K., Reddy, T., Weckesser, W., Abbasi, H., Gohlke, C., Oliphant, T.E.: 2020, Array programming with NumPy. Nature 585, 357. DOI. ADS.
Howard, R.A., Vourlidas, A., Colaninno, R.C., Korendyke, C.M., Plunkett, S.P., Carter, M.T., Wang, D., Rich, N., Lynch, S., Thurn, A., Socker, D.G., Thernisien, A.F., Chua, D., Linton, M.G., Koss, S., Tun-Beltran, S., Dennison, H., Stenborg, G., McMullin, D.R., Hunt, T., Baugh, R., Clifford, G., Keller, D., Janesick, J.R., Tower, J., Grygon, M., Farkas, R., Hagood, R., Eisenhauer, K., Uhl, A., Yerushalmi, S., Smith, L., Liewer, P.C., Velli, M.C., Linker, J., Bothmer, V., Rochus, P., Halain, J.-P., Lamy, P.L., Auchère, F., Harrison, R.A., Rouillard, A., Patsourakos, S., St. Cyr, O.C., Gilbert, H., Maldonado, H., Mariano, C., Cerullo, J.: 2020, The Solar Orbiter Heliospheric Imager (SoloHI). Astron. Astrophys. 642, A13. DOI. ADS.
Inhester, B.: 2006, Stereoscopy basics for the STEREO mission. DOI. ADS.
Liewer, P., Vourlidas, A., Thernisien, A., Qiu, J., Penteado, P., Nisticò, G., Howard, R., Bothmer, V.: 2019, Simulating white light images of coronal structures for WISPR/Parker Solar Probe: effects of the near-Sun elliptical orbit. Solar Phys. 294, 93. DOI. ADS.
Nechaeva, A., Zimovets, I.V., Nakariakov, V.M., Goddard, C.R.: 2019, Catalog of decaying kink oscillations of coronal loops in the 24th solar cycle. Astrophys. J. Suppl. 241, 31. DOI. ADS.
Nisticò, G.: 2023, Python tool for geometric triangulation and reconstruction of coronal features observed in solar images, Zenodo. DOI.
Nisticò, G., Anfinogentov, S., Nakariakov, V.M.: 2014, Dynamics of a multi-thermal loop in the solar corona. Astron. Astrophys. 570, A84. DOI. ADS.
Nisticò, G., Verwichte, E., Nakariakov, V.: 2013, 3D reconstruction of coronal loops by the principal component analysis. Entropy 15, 4520. DOI. ADS.
Nisticò, G., Bothmer, V., Patsourakos, S., Zimbardo, G.: 2009, Characteristics of EUV coronal jets observed with STEREO/SECCHI. Solar Phys. 259, 87. DOI. ADS.
Nisticò, G., Zimbardo, G., Patsourakos, S., Bothmer, V., Nakariakov, V.M.: 2015, North-south asymmetry in the magnetic deflection of polar coronal hole jets. Astron. Astrophys. 583, A127. DOI. ADS.
Nisticò, G., Bothmer, V., Vourlidas, A., Liewer, P.C., Thernisien, A.F., Stenborg, G., Howard, R.A.: 2020, Simulating white-light images of coronal structures for Parker Solar Probe/WISPR: study of the total brightness profiles. Solar Phys. 295, 63. DOI. ADS.
Pascoe, D.J., Goddard, C.R., Nisticò, G., Anfinogentov, S., Nakariakov, V.M.: 2016, Damping profile of standing kink oscillations observed by SDO/AIA. Astron. Astrophys. 585, L6. DOI. ADS.
Patsourakos, S., Pariat, E., Vourlidas, A., Antiochos, S.K., Wuelser, J.P.: 2008, STEREO SECCHI stereoscopic observations constraining the initiation of polar coronal jets. Astrophys. J. Lett. 680, L73. DOI. ADS.
Rochus, P., Auchère, F., Berghmans, D., Harra, L., Schmutz, W., Schühle, U., Addison, P., Appourchaux, T., Aznar Cuadrado, R., Baker, D., Barbay, J., Bates, D., BenMoussa, A., Bergmann, M., Beurthe, C., Borgo, B., Bonte, K., Bouzit, M., Bradley, L., Büchel, V., Buchlin, E., Büchner, J., Cabé, F., Cadiergues, L., Chaigneau, M., Chares, B., Choque Cortez, C., Coker, P., Condamin, M., Coumar, S., Curdt, W., Cutler, J., Davies, D., Davison, G., Defise, J.-M., Del Zanna, G., Delmotte, F., Delouille, V., Dolla, L., Dumesnil, C., Dürig, F., Enge, R., François, S., Fourmond, J.-J., Gillis, J.-M., Giordanengo, B., Gissot, S., Green, L.M., Guerreiro, N., Guilbaud, A., Gyo, M., Haberreiter, M., Hafiz, A., Hailey, M., Halain, J.-P., Hansotte, J., Hecquet, C., Heerlein, K., Hellin, M.-L., Hemsley, S., Hermans, A., Hervier, V., Hochedez, J.-F., Houbrechts, Y., Ihsan, K., Jacques, L., Jérôme, A., Jones, J., Kahle, M., Kennedy, T., Klaproth, M., Kolleck, M., Koller, S., Kotsialos, E., Kraaikamp, E., Langer, P., Lawrenson, A., Le Clech’, J.-C., Lenaerts, C., Liebecq, S., Linder, D., Long, D.M., Mampaey, B., Markiewicz-Innes, D., Marquet, B., Marsch, E., Matthews, S., Mazy, E., Mazzoli, A., Meining, S., Meltchakov, E., Mercier, R., Meyer, S., Monecke, M., Monfort, F., Morinaud, G., Moron, F., Mountney, L., Müller, R., Nicula, B., Parenti, S., Peter, H., Pfiffner, D., Philippon, A., Phillips, I., Plesseria, J.-Y., Pylyser, E., Rabecki, F., Ravet-Krill, M.-F., Rebellato, J., Renotte, E., Rodriguez, L., Roose, S., Rosin, J., Rossi, L., Roth, P., Rouesnel, F., Roulliay, M., Rousseau, A., Ruane, K., Scanlan, J., Schlatter, P., Seaton, D.B., Silliman, K., Smit, S., Smith, P.J., Solanki, S.K., Spescha, M., Spencer, A., Stegen, K., Stockman, Y., Szwec, N., Tamiatto, C., Tandy, J., Teriaca, L., Theobald, C., Tychon, I., van Driel-Gesztelyi, L., Verbeeck, C., Vial, J.-C., Werner, S., West, M.J., Westwood, D., Wiegelmann, T., Willis, G., Winter, B., Zerr, A., Zhang, X., Zhukov, A.N.: 2020, The Solar Orbiter EUI instrument: the Extreme Ultraviolet Imager. Astron. Astrophys. 642, A8. DOI. ADS.
Sonnerup, B.U.Ö., Scheible, M.: 1998, Minimum and maximum variance analysis. In: Paschmann, G., Daly, P. (eds.) Analysis Methods for Multi-Spacecraft Data, Scientific Reports Ser. 1, ISSI, Berne, 185. ADS.
Vasheghani Farahani, S., Van Doorsselaere, T., Verwichte, E., Nakariakov, V.M.: 2009, Propagating transverse waves in soft X-ray coronal jets. Astron. Astrophys. 498, L29. DOI. ADS.
Verwichte, E., Foullon, C., Van Doorsselaere, T.: 2010, Spatial seismology of a large coronal loop arcade from TRACE and EIT observations of its transverse oscillations. Astrophys. J. 717, 458. DOI. ADS.
Vourlidas, A., Howard, R.A., Plunkett, S.P., Korendyke, C.M., Thernisien, A.F.R., Wang, D., Rich, N., Carter, M.T., Chua, D.H., Socker, D.G., Linton, M.G., Morrill, J.S., Lynch, S., Thurn, A., Van Duyne, P., Hagood, R., Clifford, G., Grey, P.J., Velli, M., Liewer, P.C., Hall, J.R., DeJong, E.M., Mikic, Z., Rochus, P., Mazy, E., Bothmer, V., Rodmann, J.: 2016, The Wide-Field Imager for Solar Probe Plus (WISPR). Space Sci. Rev. 204, 83. DOI. ADS.
Zhukov, A.N., Mierla, M., Auchère, F., Gissot, S., Rodriguez, L., Soubrié, E., Thompson, W.T., Inhester, B., Nicula, B., Antolin, P., Parenti, S., Buchlin, É., Barczynski, K., Verbeeck, C., Kraaikamp, E., Smith, P.J., Stegen, K., Dolla, L., Harra, L., Long, D.M., Schühle, U., Podladchikova, O., Aznar Cuadrado, R., Teriaca, L., Haberreiter, M., Katsiyannis, A.C., Rochus, P., Halain, J.-P., Jacques, L., Berghmans, D.: 2021, Stereoscopy of extreme UV quiet Sun brightenings observed by Solar Orbiter/EUI. Astron. Astrophys. 656, A35. DOI. ADS.
Acknowledgements
Data are courtesy of the STEREO/SECCHI and SDO/AIA teams. G. Nisticò acknowledges the anonymous reviewers for their criticism and the helpful comments that have significantly contributed to the improvement of the manuscript.
Funding
Open access funding provided by Università della Calabria within the CRUI-CARE Agreement. This work is supported by the Rita Levi Montalcini 2017 grant funded by the Italian Ministry of University and Research.
Author information
Authors and Affiliations
Contributions
G. Nisticò wrote the manuscript text, prepared all the figure and reviewed the manuscript.
Corresponding author
Ethics declarations
Competing interests
The authors declare no competing interests.
Additional information
Publisher’s Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Supplementary Information
Below is the link to the electronic supplementary material.
Appendix
Appendix
The Python program for geometric triangulation is given as Supplementary Material. It is also made publicly available (Nisticò, 2023). We provide a very brief description and a step-by-step guide to the program.
1.1 A.1 The Routine triangulate.py
The graphical interface of the routine is presented in the top panels of Figures 4 and 7. triangulate.py has been tested in Python 3.8 and requires standard packages (e.g. Numpy, MatPlotLib) and needs Astropy and SunPy. We also provide two FITS files (contained in the folder data_example ) with the image data already processed for the analysis of Observation No. 1. The routine works by having as input the FITS files. If one would like to use any difference image or filtered image, it is convenient to process the data in advance and save them as FITS files with Sunpy. To run the program in the IPython shell, the following call must be used: run triangulate.py ’path/file_01.fits’ ’path/file_02.fits’ ’path/output.dat’ The graphic window contains two panels: the right one shows file_01.fits, the left one will plot file_02.fits. It is possible to set the contrast for the images by setting the min and max values of the intensity in the text boxes located above the panels (for image difference in EUV it is advised to use \(\mathsf{min} = -10\), \(\mathsf{max} = 10\)). Below the two panels, there are four buttons: Start, End, Save, Close. The user should follow these steps for a correct execution of the program.
![figure i](http://media.springernature.com/lw685/springer-static/image/art%3A10.1007%2Fs11207-023-02122-9/MediaObjects/11207_2023_2122_Figi_HTML.png)
-
i)
Run the program triangulate.py with the call mentioned above.
-
ii)
Once the window is open, set the intensity contrast in the text boxes above the panels. Focus on the region of interest by using one of the matplotlib functions shown in the graphical interface.
-
iii)
To start collecting tie points, click on the Start button.
-
iv)
Move with the cursor of the mouse to one of the panels and click on a feature with the left button of the mouse.
-
v)
The LoS will be drawn in the other panel. To select the tie point, click with the right button. If the left button is clicked, the tie-point will not be selected, but the LoS will be drawn in the other panel.
-
vi)
3D coordinates for the points will be calculated. To save them, click on the Save button. The button Save must be clicked any time after the selection of the tie-points and the determination of the corresponding 3D coordinates.
-
vii)
To disable temporarily the cursor of the mouse, click on the button End. To restart and enable the cursor of the mouse, click on Start.
-
viii)
To terminate the process, click on Close. The program will close and the saved 3D points coordinates will be written to the output.dat file.
We provide here a synthetic symbolic code for the routine triangulate.py, aiming at summarising all the already mentioned steps. We indicate with button.status the buttons in the widget that are clicked (Start, Close, Save, and End) and with mouse.status, the left and right clicks.
1.2 A.2 The Module stereoscopy.py
The module stereoscopy.py contains different functions for plotting the 3D data points in the HEEQ coordinate system and in the local reference frame, computing principal components, and plotting the results of the PCA.
The module can be imported in the IPython shell as: import stereoscopy as stereo In the data_example folder we provide a short Python program run_example_obs_1.py that executes some functions of the stereoscopy module and creates and saves the plots of Figure 4.
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.
About this article
Cite this article
Nisticò, G. Three-Dimensional Reconstruction of Coronal Features: A Python Tool for Geometric Triangulation. Sol Phys 298, 36 (2023). https://doi.org/10.1007/s11207-023-02122-9
Received:
Accepted:
Published:
DOI: https://doi.org/10.1007/s11207-023-02122-9