# A systematic study of inverting overlappograms : MaGIXS - A case study

P. S. Athiray Center for Space Plasma and Aeronomic Research, University of
Alabama Huntsville, Huntsville, AL, 35812, USA  NASA Marshall Space Flight
Center, Huntsville, AL 35812, USA  Arthur Hochedez  Center for Space Plasma
and Aeronomic Research, University of Alabama Huntsville, Huntsville, AL,
35812, USA  École des Mines de Paris, 60 Bd Saint-Michel, 75272 Paris, France
Amy R. Winebarger NASA Marshall Space Flight Center, Huntsville, AL 35812, USA
Dyana Beabout  NASA Marshall Space Flight Center, Huntsville, AL 35812, USA

###### Abstract

Slitless (or wide field) imaging spectroscopy provides simultaneous imaging
and spectral information from a wide field of view, which allows for rapid
spectroscopic data collection of extended sources. Depending on the size of
the extended source combined with the spatial resolution and spectral
dispersion of the instrument, there may be locations in the focal plane where
spectral lines from different spatial locations overlap on the detector. An
unfolding method has been successfully developed and demonstrated on the
recent rocket flight of the Marshall Grazing Incidence X-ray Spectrometer
(MaGIXS), which observed several strong emission lines in the 8 to 30 Å
wavelength range from two X-ray bright points and a portion of an active
region. In this paper, we present a systematic investigation of the parameters
that control and optimize the inversion method to unfold slitless spectrograph
data.

##  1 Introduction

For the past four decades, the majority of solar imaging spectrographs have
obtained, at any given time, spectral information from a narrow slit and
spatial information only along the slit. The position of the slit on the Sun
is often moved, called ‘rastering’, to generate spectral information over a
wide field of view. However, rastering can be a slow process and the resulting
2-D information is a convolution of both spatial morphological changes and
temporal evolution. Slitless or wide field imaging spectrographs can
simultaneously obtain detailed spatial and spectral information of an extended
object. (Note we use the term slitless and wide field interchangeably and that
some wide field imaging spectrographs may use a wide slot in place of the
slit.) The data from such instruments, called ‘spectroheliograms’ or
‘overlappograms’, contain spectral information from different spatial
locations on the Sun that can overlap in the dispersive direction. Because of
these overlaps, an unfolding routine may be required to appropriately analyze
the data.

The study of the solar corona via slitless imaging spectroscopy has a long
history. The first overlappograms routinely obtained were from the Naval
Research Laboratory (NRL) experiment, S-082A spectroheliograph, onboard Skylab
(Tousey et al., 1973). This instrument observed dispersed spectral images of
the Sun in the 150 - 625 Å EUV wavelength range, and demonstrated the richness
of the spectral signatures for different solar features. The Res-C instrument
onboard the Russian CORONAS-I mission (Kuzin et al., 1997; Zhitnik et al.,
1998) included 51 lines in the spectral region of 18.0 - 21.0 nm. This
instrument was designed to achieve high spectral resolution at the expense of
spatial resolution in the dispersive direction. The Extreme-ultraviolet (EUV)
Imaging Spectrometer (EIS; Culhane et al. 2007) onboard the Hinode satellite
has two wide slots (40″ and 266″ wide) that can also yield overlappogram data.
Most recently, the Marshall Grazing Incidence X-ray Spectrometer (MaGIXS)
sounding rocket experiment demonstrated successful observation of several
solar coronal structures using high temperature diagnostic emission lines in
the soft-X-ray wavelength range via simultaneous wide field imaging and
spectroscopy (Champey et al., 2022; Savage et al., 2022).

Additionally, two computed tomography imaging spectrographs (CTIS) have been
flown on sounding rockets. A CTIS is an imaging spectrograph (or multiple
imaging spectrographs) that captures a scene with different angles of
dispersion or in different orders of light. The Multi-Order Solar EUV
Spectrograph (MOSES), a novel objective grating telescope that simultaneously
captured three spectral orders of the strong He II 30.4 nm line over a field-
of-view of 10′ ${\times}20$′, was designed, built and successfully flown on a
sounding rocket platform (Fox et al., 2010). This instrument captured the
spatial information in the zeroth order, and the spectral and spatial
information in the plus and minus one orders. This instrument design also
allows detection of Doppler shifts, as the spectral displacements for the plus
and minus one orders are in opposite directions. The EUV Snapshot Imaging
Spectrometer (ESIS) instrument is a CTIS that captured a quiet Sun scene in
the He I 584 Å and O V 630 Å lines with different angles of dispersion and an
11′ wide octagonal field of view. ESIS was built and launched on a sounding
rocket on September 30th, 2019 (Parker et al., 2022).

Significant efforts have been made to develop robust unfolding methods to
analyze and better interpret these data (see examples in Fox et al. 2010;
Harra et al. 2017; Davila et al. 2019; Parker et al. 2022; Cheung et al. 2019;
Winebarger et al. 2019).

The MaGIXS flight data has been inverted with the ElasticNet inversion
routine, a standard Python inversion routine that minimizes the least squares,
as well as the L1 and L2 norms of the solution (Savage et al., 2022; Athiray &
Winebarger, 2024). The method relies on several parameters that control how
much penalty is added to the solution and the relative importance of the L1
and L2 norms.

In this paper, we present a systematic investigation of the ElasticNet
inversion method, with a primary goal to assess the optimization of inversion
parameters and validate the robustness of the inversion. In addition, we also
demonstrate the inclusion of weights in the inversion, which helps to improve
the inversion and overcome minor artifacts arising due to spatio-spectral
confusion. We use the X-ray bright points observation from the first MaGIXS
flight data (here after MaGIXS-1) as our test case for this evaluation
exercise. This paper is organized as follows. An overview of MaGIXS-1 flight
and data used for this work are presented in Section 2. In Section 3, we
introduce the inversion method and describe the implementation of adding
weights to the inversion. Optimization of parameters for the inversion using
statistical metrics are described in Section 4. Results of the inversion and
summary are presented in Section 5.

##  2 MaGIXS-1 flight overview

Here we present a summary of MaGIXS-1 observations and describe the flight
data, which is used for studying the parameters of the inversion. Additional
details of MaGIXS-1 instrument can be found in Athiray et al. (2021) and
Champey et al. (2022) and the MaGIXS-1 mission, including the standard data
processing techniques, in Savage et al. (2022).

Figure 1: (Top) Time averaged AIA cutout images of the X-ray bright points
corresponding to MaGIXS-1 observations, degraded to match MaGIXS-1 resolution
including the vignetting function. (Bottom) MaGIXS-1 overlappogram data that
shows spectrally dispersed emission lines from the X-ray bright points, with
strong lines identified.

MaGIXS-1 is an X-ray imaging spectrograph designed to fly on a NASA sounding
rocket to observe the Sun in the 8 to 30 Å wavelength range. The primary
science objective of MaGIXS-1 was to observationally determine the frequency
of heating events in solar active region structures using several high
temperature diagnostic emission lines in soft X-rays (Athiray et al., 2019).
The effective field of view observed in MaGIXS-1 is roughly ${\sim}$ 9.25 ′
${\times}$ 25 ′, defined by both a slot at an intermediate focus position and
the instrument vignetting function (Champey et al., 2022). The successful
launch of MaGIXS-1 occurred on 30 July 2021 with data collection occurring
from 18:21 to 18:26 UT. The observed targets included two X-ray bright points
on the northern hemisphere of the solar disk and a portion of an active region
on the southern hemisphere of the disk. After initial pointing maneuvers,
MaGIXS-1 observed the targets for about 296 seconds with 2 second cadence
during stable pointing. In this study, we use the time averaged data collected
over stable pointing. We also note that MaGIXS-1 flight data are modulated by
the instrument vignetting function, which peaks at the center of the field of
view (FOV) and decreases on either side of the field.

Figure 1 (top panel) shows the time averaged cutout images of the Atmospheric
Imaging Assembly (AIA; Lemen et al. 2012) that have been degraded to MaGIXS-1
resolution, including applying the appropriate vignetting function. Spectrally
dispersed X-ray emission from these two coronal spatial structures are
observed in the MaGIXS-1 flight data, shown in Figure 1 (bottom panel) with
key spectral lines identified. The MaGIXS-1 Level 1.5 data of these two bright
points will be utilized for this study.

##  3 MaGIXS-1 Inversion

The inversion method adopts the general framework of spectral decomposition
described in Cheung et al. (2019) and Winebarger et al. (2019). The problem is
first written as a set of linear equations, namely

$y=Mx$ (1)

where $y$ is a one-dimensional array that contains a single row of the
MaGIXS-1 flight data (2048 elements), $x$ is a one-dimensional array of
emission measures at different solar locations (or field angles) and
temperatures that can contribute to the flight data ($n_{free}$), and $M$ is
the response matrix that contains how emission measure from each solar
location and temperature map into electrons at specific pixels on the detector
($n_{free}{\times}2048)$. Here we define the term ‘field angle’ to represent
distance in the dispersion direction measured from the optical axis. Figure 2
shows a graphical representation of the MaGIXS-1 instrument axis. MaGIXS-1,
was rolled relative to solar north (23 ∘counter clockwise) and pointed at a
location near the limb. The field angles are analogous to solar-X, but
measured from the optical axis of the instrument. We refer to this direction
as MaGIXS-X. Further, we refer to distances in the cross-dispersion as
MaGIXS-Y.

Figure 2: Pictorial representation (not drawn to scale) to define field angles
for MaGIXS-1. Green rectangle box defines MaGIXS-1 field of view (9.25 ′in the
dispersion direction and 25 ′in the cross-dispersion directions, marked with
arrows. Field angles are measured in the dispersion direction relative to the
optical axis. The field angles are analogous to helio-centric coordinates but
measured from the instrument optic axis.

The response matrix is generated by first calculating a set of isothermal
spectra at different temperatures at a unit emission measure
($1{\times}10^{26}$ cm-5) using CHIANTI atomic database (Dere et al., 2023).
We included the newly added atomic calculations for the satellite lines of Fe
xvi (Del Zanna et al., 2024). These isothermal spectra are then convolved with
the effective area measured from MaGIXS-1 ground calibration (Athiray et al.,
2020, 2021). Finally, the response from each unique field angle is mapped into
the detector using the wavelength calibration determined from flight data
(Savage et al., 2022). Each column of the response matrix, then, corresponds
to the unique signal expected from a unit emission measure at a single
temperature and field angle.

When generating the isothermal spectra, several assumptions must be made
concerning the atomic parameters, including the elemental abundances,
ionization state, plasma density, electron speed distribution, and ionization
balance. The inversion can be performed with different response functions that
vary these assumptions to see which best match the observations. For all the
analysis presented in this paper, we used the response function generated with
coronal abundances, Maxwellian electron distribution, and an assumption of
ionization equilibrium. These assumptions were found to be the best match of
the flight data in Savage et al. (2022).

Figure 3: A graphical representation of the inputs and outputs to the
inversion. Inputs are the flight data and response matrix. The direct output
is the emission measure as a function of temperature and field angle. Each row
of the data is inverted separately, then the emission measures are combined to
make emission measure maps. From the emission measure maps, we calculate the
predicted data, spectrally pure maps, and spectrum at each spatial location.

Additionally, when generating the response function, we establish the
temperature and spatial grid on which the solution is calculated. Ostensibly,
the range of temperatures (minimum, maximum, and temperature step size in
logarithmic scale) and range of field angles (minimum, maximum, and field
angle grid size) are all free parameters. However, they are all informed by
the available constraints in the data. For instance, the wavelength range of
MaGIXS-1 includes spectral lines formed at temperature above Log T = 5.9.
Though it is possible to include smaller values of Log T in the response
function, there are no adequate constraints for those values. Their inclusion
would imply the inversion would take longer to complete and the results in
those temperature bins would not be well constrained (see for instance Athiray
& Winebarger 2024). Although MaGIXS-1 is sensitive to measure high temperature
emission lines with Log T $>$ 7.0, the bright points under study are
relatively cool and did not show significant Fe XVIII emission. Therefore, we
considered the maximum temperature for inversion to be Log T = 7.0.

Similarly, MaGIXS-1 has an effective slot size of 9.25′ (${\pm}4.6$ ′from the
optical axis) in the dispersion direction. There is no information on
locations outside of this field of view, so the minimum and maximum field
angles considered in this study are ${\pm}4.6$′. The field angle grid size,
${\delta}{\theta}$, of the response function (and resulting spatial resolution
of the emission measure array) is more difficult to quantize. The spatial
resolution of the inversion should not be less than the plate scale of the
observations. In the cross-dispersion direction, MaGIXS-1 has a plate scale of
2.8″/pixel, but in the dispersion direction, the plate scale ranges from
${\sim}$ 5.5″ to 9″. However, the point spread function of the instrument is
27″ (Champey et al., 2022), and there is limited information at spatial scales
smaller than this value in the flight data.

For this study, we select the spatial resolution of the response matrix to be
8.4″. We revisit this decision in the Discussion Section (see Section 5). The
ranges and resolution of the response matrix are given in Table 1. The number
of free parameters, then, is $n_{free}$ = 796.

Table 1: Range and Resolution of Response Function

Parameter | Minimum, Maximum, Resolution
---|---
Log T | 5.9, 7.0, 0.1
Field Angles∗ | -4.6′, 4.6′, 8.4″

∗ Measured from the center of the MaGIXS-1 optical axis.

The inversion is then completed using the ElasticNet regularization technique
(Zou & Hastie, 2005), a commonly used algorithm available in Scikit-learn via
Python library. It combines two types of regularization, namely the sparsity
and smoothness, while finding convergence to the best solution, which is
defined by the equation:

$x^{\\#}=\frac{1}{2n_{data}}argmin\left[W(||(y-Mx)||^{2}_{2}+{\alpha}{\rho}||x||_{1}+0.5{\alpha}(1-{\rho})||x||^{2}_{2})\right].$
(2)

The first term in Equation 2 denotes the standard weighted least squares that
minimizes the deviation between the observations ($y$) and the predicted
values ($Mx$). The weights applied, $W$, are discussed in detail below. The
second term is the $L_{1}$ regularization term, minimizing this term favors a
sparse solution. The third term is the $L_{2}$ regularization term, minimizing
this term favors a smooth solution. There are two free parameters in Equation
2; ${\alpha}$ controls the degree of penalty to apply to the L1 and L2 terms
and ${\rho}$ controls the trade-off between the L1 and L2 regularization.

Figure 3 shows a graphical representation of the inversion method. The inputs
to the inversion are the MaGIXS-1 overlappogram data and the response matrix.
The inversion is run on each row of MaGIXS-1 data separately, which
corresponds to a single MaGIXS-Y value. The output of the inversion is an
array of emission measures as a function of field angles and Log T. By
completing the inversion on each row, we build up the emission measure in the
MaGIXS-Y direction. After these emission measure cubes are calculated, we then
generate spectrally pure maps in different spectral lines as well as the
predicted data ($Mx$). We can further calculate additional data products, such
as the spectrum at each location.

We highlight that weights are now included in the inversion to incorporate
realistic pixel uncertainties; weights were not included in Savage et al.
(2022). We implement weights derived from the uncertainty in the number of
electrons observed in each pixel. The number of incident solar photons, the
CCD read noise, and the noise from scattered light contributes to he
uncertainty. We estimate photon uncertainty, that is, shot noise
${\sigma}^{pix}_{shot}$, in each pixel by converting electrons to photons
using on-axis pixel wavelengths. The measured read noise ${\sigma}_{read}$ of
MaGIXS-1 CCD is 7.3 e-rms/readout. We estimated scattered photon noise from
flight data, ${\sigma}_{sc}$ = ${\sim}$ 5 e- rms/readout, using pixels that do
not contain bright coronal structures, and that are beyond the solar limb in
the MaGIXS-1 flight data. In Equation 2, $W$ is a vector, where the values are
$1/{\sigma}^{pix}$. ${\sigma}^{pix}$ is the quadrature sum of read, photon,
and systematic noise, calculated as :

$\displaystyle w^{pix}$ $\displaystyle=$
$\displaystyle\frac{1}{{\sigma}^{pix}}$ (3) $\displaystyle{\sigma}^{pix}$
$\displaystyle=$
$\displaystyle\sqrt{({\sigma}^{pix}_{shot})^{2}+{\sigma}_{read}^{2}+{\sigma}_{sc}^{2}}$
(4)

Adding weights to the inversion results in subtle but important changes in the
solution. In Figure 4 we perform an example inversion with and without weights
and compare the predicted data to the flight data around the location on the
detector where the O vii triplet spectral lines at 21.601, 21.802 and 22.101 Å
appear. The inset shows a cropped section of the flight data including the
bright points in the 20.2 Å to 23 Å wavelength range. The flight spectra
summed between the two horizontal lines in the inset image is shown in black
line in Figure 4 (Left), marked as A. Overplotted are the corresponding
predicted data calculated from inversions completed with weights (red) and
without weights (green). The bottom panel, marked as B, shows the ratio of
flight-to-predicted data for both the cases. When weights are not included,
the inversion prioritizes matching the brightest pixels on each row and can
put additional emission in dimmer locations. This can result in ‘ghost spatial
features’ highlighted with the arrows in Figure 4; the solution with weights
suppresses this excess emission.

The images in the right panel of Figure 4, marked as C, compare the spectrally
pure maps of O vii determined using the inverted EM cube with and without
weights. The ghost spatial features in the inversion, denoted by white arrows,
can be seen at the edges of the spectrally pure O vii images. From Figure 4 we
infer that addition of weights to the inversion better matches the
observations overall so all pixels are matched within their errors, and
minimizes spatial-spectral confusion artifacts.

Figure 4: Left top panel, labeled A, shows the comparison of summed MaGIXS-1
flight data (between two yellow horizontal lines in the inset image) with the
corresponding predicted data with weights (red) and without weights (green).
The bottom panel, labeled B, shows the ratio between flight data and the
predicted data denoted by the respective colors. Right panel, labeled C,
compare the spectrally pure images of O vii determined from the inversion with
and without weights. The white arrow indicate pixels where the artifact of
ghost spatial features appear in the image when inverted without weights.

##  4 Parameter Optimization

In this section, we present the methodology adopted to determine the best
values for the parameters for the inversion. It is essential to benchmark the
influence of these parameters on the inverted solution to understand the
robustness of the solution. There are two parameters involved in the
inversion, the L1 and L2 regularization coefficients, ${\alpha}$ and ${\rho}$,
introduced in Equation 2.

###  4.1 Criteria for evaluating the free parameters

Before we investigate the impact of the free parameters on the inversion, we
first set criteria for what we anticipate would be acceptable solutions.
First, we expect every row of the inversion to converge with a reasonable
number of maximum iterations. For this study, we set the maximum number of
iterations to $10^{5}$. Second, we expect the predicted data ($Mx$) to well
match the observed data ($y$). As discussed in detail below, we use the
centered root mean square error (RMSE) between the observed and predicted
data, Pearson’s correlation coefficient, and the standard deviation of the
observed and predicted data to evaluate how well the inversion matches the
observations. Finally, we expect the spatial structures in the returned
spectrally pure maps to be smooth, at least to the scale of the point spread
function of the instrument.

###  4.2 Establishing the Parameter Space

The value of the penalty term, ${\alpha}$, can be any positive number.
Practically, large ${\alpha}$ does not provide a solution that matches the
observations well, as the penalty terms in Equation 2 become more important
than minimizing $y-Mx$. We set the maximum ${\alpha}$ for this study to 0.05.
As ${\alpha}$ goes to 0, the inversion not only takes longer, but has rows
that do not converge. We choose the minimum value of ${\alpha}$ to be
$5{\times}10^{-5}$ to avoid non-convergence. The allowed range of ${\rho}$ is
from 0 to 1, but we find ${\rho}=0$ also has rows that do not converge. Hence,
we explore values of ${\rho}$ of 0.1 - 1. Table 2 lists the values of
${\alpha}$ and ${\rho}$ explored in this investigation. For each combination
of ${\alpha}$ and ${\rho}$, we perform an inversion and evaluate the results.
There are a total of 24 inversions considered in this study.

Table 2: List of free parameters values investigated. Parameter | Values
---|---
${\alpha}$ | 0.05, 5 ${\times}10^{-3}$, 5 ${\times}10^{-4}$, 5 ${\times}10^{-5}$
${\rho}$ | 0.1, 0.3, 0.5, 0.8, 0.9, 1
Total number of parameter combinations | 24
Figure 5: Comparison of flight data with predicted data for inversions with
different parameter values for ${\alpha}$ and ${\rho}$. (Top) Cropped portion
of MaGIXS-1 flight data including strong emission lines of Fe xvii, O viii and
O vii from the X-ray bright points. (Bottom) Grid of corresponding predicted
data from the inversion with different combination of ${\alpha}$ and ${\rho}$
values. This plot portrays that inversion with high ${\alpha}$ (high penalty)
do not match the intensity across all emission lines in the flight data.
Further, high ${\alpha}$ combined with high ${\rho}$ show the effect of
sparseness in the predicted data resulting in apparently a relatively compact
spatial structure. We also point out the effect of the change in ${\rho}$
affecting the spatial distribution is evident at high ${\alpha}$.

###  4.3 Comparing Predicted and Flight Observations

Each predicted spectroheliogram is systematically compared against the flight
data to evaluate the performance of the inversion with the set of parameters.
Figure 5 shows a sample comparison of flight data with several inverted
solutions for different ${\alpha}$ and ${\rho}$ values. The top panel in
Figure 5 shows the cropped portion of the flight data that includes the strong
emission lines from the X-ray bright points. The bottom panels show a sample
of predicted data obtained from inversion with different ${\alpha}$ and
${\rho}$ combinations. This figure demonstrates that the inversions completed
with low ${\alpha}$ values match both the spatial features at different
emission lines as well as spectral intensities qualitatively.

An inversion run with an acceptable set of parameters is expected to minimize
the overall deviation between the predicted and flight data. To assess the
whether this is achieved, we generate a statistical summary of how well each
of the predicted data match the flight data.

We employ Taylor’s diagram (Taylor, 2001) to present statistical comparison of
flight data against all the predicted data. The Taylor diagram was designed as
a useful graphical summary of how closely different models matches
observations represented through a polar plot. It characterizes the
statistical relationship between a reference observation and test model data,
and compare them in terms of their correlation, variability, and bias. These
diagrams are very helpful in evaluating multiple aspects of complex models and
offer relative skill scores to eliminate outlier models and identify closely
matching models. Each point in a Taylor diagram represent three different
statistics simultaneously, namely the centered RMSE, Pearson’s correlation
coefficient, and the standard deviation (see Taylor 2001 for further details).

Similarly, we calculate these three values for each set of free parameters and
plot them on a Taylor’s diagram. By this method, we can compare different
inversions with several combinations of ${\alpha}$ and ${\rho}$ and trace the
impact. The left panel in Figure 6 shows these metrics for different values of
${\alpha}$ and ${\rho}$. The standard deviation of the predicted data is
plotted radially, while the solid cyan line is the standard deviation of the
observed data. The Pearson correlation coefficient is plotted in the theta
direction. A value of 1 would imply perfect correlation with the data. The
cyan square on the radial axis indicates this correlation. Finally, the
concentric circles centered on this X indicates the centered RMSE. If the
predicted data point falls within the closest concentric circle, the RMS
difference is $<1$. Any set of parameters that have predicted data that fall
within this circle acceptably matches the observed data by all three metrics.
This Taylor’s diagram shows that predicted data with
${\alpha}=5{\times}10^{-2}$ do not match the observations, while
$5{\times}10^{-5}$ very closely match the observation. An ${\alpha}$ value
less than $5{\times}10^{-3}$ produces acceptable metrics for some values of
${\rho}$, while other values do not.

Figure 6: (Left) Taylor diagram representing a summary of different validation
metrics, including the standard deviation, RMS difference, and Pearson
correlation coefficient. This plot compares the predictive capabilities of
models with different ${\alpha}$ (varying shapes) and ${\rho}$ (varying shape)
values, with the measured MaGIXS-1 data. (Right) Contour map of Taylor Skill
Score varying as a function of ${\alpha}$ and ${\rho}$, with the color bar
denotes the score.

For each set of free parameters, we also calculate the Taylor skill score,
$S$, which is defined as

$S=\frac{4(1+R)}{(\hat{{\sigma}_{n}}+1/\hat{{\sigma}_{n}})^{2}(1+R_{0})}$ (5)

where $\hat{{\sigma}_{n}}$ is the ratio of standard deviations of the
predicted and observed data, $R$ is the correlation coefficient, and $R_{0}$
is the maximum correlation expected (here set to 1). It is evident that when
model variance approaches observed variance, and $R$ is equal to $R_{0}$, the
score ($S$) goes to 1.

We show the Taylor skill score as a function of ${\alpha}$ and ${\rho}$ in the
right panel of Figure 6. The color bar shows the skill score. This plot
demonstrates that ${\alpha}=5{\times}10^{-5}$ and $5{\times}10^{-4}$ for all
values of ${\rho}$ have a skill score $>0.9$. For ${\alpha}=5{\times}10^{-3}$,
${\rho}=1$ has a better skill score than smaller ${\rho}$.

###  4.4 Spatial Resolution of the Inversion Results

The final criteria to select appropriate parameters is that the the spatial
structures in the returned spectrally pure maps to be smooth on the expected
scales by the point spread function of the instrument. From Figure 6, we
observe that low ${\alpha}$ yields high Taylor score irrespective of ${\rho}$
value. However, ${\rho}$ controls the smoothness and sparseness of the
inverted solution, so not all values of ${\rho}$ will necessarily produce the
required smoothness spectrally pure maps.

Figure 7 (Top) shows the comparison of O viii spectrally pure maps inverted
using ${\rho}$ = 0.1, 0.5, and 1. For high ${\rho}$, the inversion favours a
sparser solution, wherein it puts large amount of emission in alternate pixels
leaving the intermediate pixels with low emission. This creates intensity
fluctuations in adjacent pixels, which is merely an artifact from the
inversion and therefore should not be interpreted as real fluctuations on the
coronal structure. Figure 7 (bottom left) compares the intensity distribution
across the bright points (marked by white horizontal line in top panels),

Additionally, we performed Fourier analysis on the inverted spectrally pure
images with different ${\rho}$ values by choosing some spatial regions
encompassing the X-ray bright points, denoted by the white square in Figure 7
(top panels).

The bottom right panel of Figure 7 is a log–log plot of such spectra for
several elements of the image. The plot conveys that inversion with different
${\rho}$’s agree well in matching high frequency spatial structures greater
than the PSF of MaGIXS-1. While at lower spatial frequencies higher ${\rho}$’s
$>$ 0.5 introduce additional noise (artifacts) in the inverted image. We also
report that 0.1 $<$ ${\rho}$ $<$ 0.5 result in similar solutions in terms of
both photon intensity and spatial distribution.

Figure 7: (Top) Comparison of O viii maps inverted with low ${\rho}$ (smooth)
and high ${\rho}$ (sparse) for a fixed ${\alpha}$ = 0.05. Inversion with high
${\rho}$ puts large amount of emission in alternate pixels and leave
intermediate pixels with low emission, resulting in a ragged intensity
distribution (bottom left) across the coronal structure, plotted with 1
${\sigma}$ Poisson uncertainty shown as filled colors. The bottom right panel
compares the power spectrum obtained from the selected region of interest,
white square in the spectrally pure images (top panel), which shows large
${\rho}$ values result in high frequency spatial structures.

###  4.5 Optimal Parameters

Based on this study, we conclude that ${\alpha}<5{\times}10^{-3}$ and 0.1 $<$
${\rho}$ $<$ 0.5 produce solutions with no discernible differences. Because
smaller ${\alpha}$ require a longer run time to converge, we opt for using the
largest acceptable ${\alpha}$ possible, so ${\alpha}=5{\times}10^{-4}$.
Additionally, we choose ${\rho}=0.5$ as the optimal ${\rho}$ value.

##  5 Discussion and Conclusions

Slitless or wide field spectroscopy offers the exciting capability of
capturing spectral information over large fields of view at a rapid cadence.
However, the cost of this advancement is the need to unfold the data to remove
spatial-spectral confusions. Care must be given to select the appropriate
inversion technique and parameters and to understand the impact of those
choices on the resulting scientific conclusions.

In this paper, we have completed a systematic study of the weighted ElasticNet
inversion method used for unfolding spatial-spectral overlaps from the
spectroheliogram data observed by the MaGIXS-1 sounding rocket mission. In
particular, we have focused our investigation on the inversion of X-ray bright
points observed in MaGIXS-1 data. Unlike Savage et al. (2022), we have
included weights in the inversion in this study (also shown in Athiray &
Winebarger, 2024). We found that the addition of uncertainties to each pixel
as weights helps the inversion to mitigate the artifact of ‘ghost spatial
features’. This artifact arises when bright and dim spectral pixels are
weighted equally in the inversion. We showed that introducing pixel weights,
as determined from estimated photon noise, read noise, and scattered photon
noise, significantly reduces the presence of these features and better matches
the data in dim regions. Inclusion of pixel weights also enable a more
powerful combined inversion of overlappogram data with imaging data, which are
an order of magnitude brighter than the spectral lines in overlappogram data
(see for instance Athiray & Winebarger, 2024).

We have carried out inversions of the MaGIXS-1 data with a range of parameters
and statistically evaluated their performance by comparing the results to
three criteria: 1) the inversion must converge with less than 105 iterations,
2) the predicted data must match the flight data to within the uncertainties,
and 3) the smoothness of the returned spectrally pure maps must be consistent
with the instrumental point spread function.

We have carried out a detailed parameter search to determine optimum values
for the inversion parameters ${\alpha}$ and ${\rho}$. We performed inversion
of MaGIXS-1 data with a range of parameter values listed in Table 2; the
ranges of these free parameters are chosen to eliminate non-convergences. We
then compared the predicted data from each set of parameters with the flight
data in terms of their correlation, their centered root-mean-square
difference, and the ratio of their variances via Taylor diagram. We also
calculated the Taylor skill score to determine optimum inversion parameters.
We found that the choice of ${\alpha}$ significantly impacts the ability for
the predicted data to well match flight data, and determined
${\alpha}=5{\times}10^{-4}$ is the best choice to invert MaGIXS-1 data.
Finally, we assessed the smoothness of the spectrally pure maps resulting from
each set of parameters and determined that 0.1 ${\leq}$ ${\rho}$ ${\leq}$ 0.5,
yield similar results within uncertainty limits. We choose ${\rho}=0.5$ to be
the optimum value. Ultimately, we determine the inversion and results are
insensitive to these free parameters within these specified ranges.

When establishing the response matrix, we chose the ranges and resolutions of
Log T and MaGIXS-X that would be included in the inversion. The choices for
Log T are straight forward. The coolest line MaGIXS-1 observed forms at Log T
$>$ 5.9, which sets the lower limit of temperature for the inversion. Non-
flaring active regions are not expected to have temperatures greater than
$10^{7}$ K, so that established the maximum temperature included in the
inversion. The shape of the emissivity functions of the spectral lines are
smooth and vary on temperatures scales $>$ 0.1 in Log T, which set the
resolution of temperature. Similarly, the effective field of the view of the
instrument established the minimum and maximum MaGIXS-X considered, as
MaGIXS-1 only sees ${\pm}$ 4.6′ from the optical axis.

Figure 8: Comparison of O vii maps inverted with different ${\delta}{\theta}$
values for a fixed ${\alpha}$ = 5${\times}10^{-5}$ and ${\rho}$ = 0.1.
Inversion with ${\delta}{\theta}$ $<$ 5 (Top) shows two X-ray bright points
observed distinctly, while ${\delta}{\theta}$ = 1, 2 over resolve the spatial
structures, resulting in a ragged intensity distribution (bottom left),
plotted with 1 ${\sigma}$ Poisson uncertainty (color filled section). (Middle)
Inversion with ${\delta}{\theta}$ ${\geq}$ 5 indicate under resolving of
structures where the two bright points started to merge, resulting in a
smoothed intensity distribution (bottom right), plotted with 1 ${\sigma}$
Poisson uncertainty (color filled section).

The field angle grid size (${\delta}{\theta}$) on which to calculate the
inversion, however, is more difficult to discern. The instrument is defined by
a plate scale (size of a pixel in arcseconds) and a spatial resolution (size
of the instrumental point spread function). The spatial resolution must be at
least twice the plate scale, but can be much larger than the plate scale. In
the case of MaGIXS-1, there are multiple confounding factors. First, the plate
scale in the dispersion direction varies as a function of wavelength from 5.5″
to 9″ whereas the plate scale in cross-dispersion direction is 2.8″. Secondly,
the point spread function of MaGIXS-1 (${\sim}$ 27″) is significantly larger
than these plate scales. For the study described in this paper, we chose a
grid size ${\delta}{\theta}$ = 8.4″ but conceivably this value could have
chosen a smaller or larger value.

Figure 8 shows the comparison of inverted spectrally pure images of O vii at
21.6 Å, for different ${\delta}{\theta}$ values ranging from 2.8″ to 42.0″).
For ${\delta}{\theta}$ ${\leq}$ 14.0″ (top panel) the two X-ray bright points
can be observed distinctly with less cross-talk between the structures
(indicated by the white arrow). For ${\delta}{\theta}$ $>$ 14.0″, the bright
point structures slowly start to merge (indicated by the white arrow), which
denotes under resolution. For ${\delta}{\theta}$ $<$ 8.4″, we observe high
frequency structures in the spectrally pure images, as seen in the ragged
intensity distribution (bottom left panel) across the structures marked by
horizontal white line in top panel. The intensity variations are beyond 1
${\sigma}$ Poisson statistics. The intensity distribution across the
structures show a very smoothed profile with reduced intensity, indicating
under-resolving of the structures, as seen in the bottom right panel. We find
the field angle grid size for MaGIXS-1 data that yield similar consistent
results is 5.6″ ${\leq}$ ${\delta}{\theta}$ ${\leq}$ 14″. This upper limit of
optimum ${\delta}{\theta}$ is very close to half the value of MaGIXS-1 point
spread function (27″). We report that by this exercise we do not find a single
optimal ${\delta}{\theta}$ value for the inversion. Instead, we offer the
guidance to choose a spatial resolution between the plate scale of the
instrument and the full width at half maximum (FWHM) of the PSF divided by 2.

This paper serves as an outline for the methodology that must be completed for
each new mission or study including spectroheliogram data. In this paper, we
have determined the optimal values for ${\alpha}$ and ${\rho}$ for the
MaGIXS-1 flight data. However, we stress these choices are not universal and
must be re-determined for each new instrument that is flown. Similarly, the
choices for the ranges and resolutions of Log T and the field angles are
instrument dependent and must be evaluated based on each instrument’s
sensitivity to temperature and spatial information. The work presented in this
paper will be very helpful for next generation missions such as the Cubesat
Imaging X-ray Solar Spectrometer (CubIXSS; Caspi et al. 2021) and potential
small explorer (currently in Phase A) the EUV CME and Coronal Connectivity
Observatory (ECCCO; Reeves et al. 2022), which will carry overlappogram
instruments. To facilitate inversion of data from future instruments and aid
in instrument design, we have created an ‘overlappogram’ package and made it
publicly available in GitHub repository 111https://eccco-
mission.github.io/overlappogram/.

##  6 Acknowledgements

We acknowledge the Marshall Grazing Incidence X-ray Spectrometer (MaGIXS)
instrument team for making the data available through the 2014 NASA
Heliophysics Technology and Instrument Development for Science (HTIDS) Low
Cost Access to Space (LCAS) program, funded via grant NNM15AA15C. The authors
thank and acknowledge Drs. Dan Seaton and Katharine Reeves, for their
insightful comments.

## References

  * Athiray & Winebarger (2024) Athiray, P. S., & Winebarger, A. R. 2024, ApJ, 961, 181, doi: 10.3847/1538-4357/ad1837
  * Athiray et al. (2019) Athiray, P. S., Winebarger, A. R., Barnes, W. T., et al. 2019, ApJ, 884, 24, doi: 10.3847/1538-4357/ab3eb4
  * Athiray et al. (2020) Athiray, P. S., Winebarger, A. R., Champey, P., et al. 2020, ApJ, 905, 66, doi: 10.3847/1538-4357/abc268
  * Athiray et al. (2021) —. 2021, ApJ, 922, 65, doi: 10.3847/1538-4357/ac2367
  * Caspi et al. (2021) Caspi, A., Shih, A. Y., Panchapakesan, S., et al. 2021, in American Astronomical Society Meeting Abstracts, Vol. 53, American Astronomical Society Meeting Abstracts, 216.09
  * Champey et al. (2022) Champey, P. R., Winebarger, A. R., Kobayashi, K., et al. 2022, Journal of Astronomical Instrumentation, 11, 2250010, doi: 10.1142/S2251171722500106
  * Cheung et al. (2019) Cheung, M. C. M., De Pontieu, B., Martínez-Sykora, J., et al. 2019, ApJ, 882, 13, doi: 10.3847/1538-4357/ab263d
  * Culhane et al. (2007) Culhane, J. L., Harra, L. K., James, A. M., et al. 2007, Sol. Phys., 243, 19, doi: 10.1007/s01007-007-0293-1
  * Davila et al. (2019) Davila, J. M., Oktem, F. S., & Kamalabadi, F. 2019, ApJ, 883, 7, doi: 10.3847/1538-4357/ab372a
  * Del Zanna et al. (2024) Del Zanna, G., Badnell, N. R., & Storey, P. J. 2024, Monthly Notices of the Royal Astronomical Society, 532, 305, doi: 10.1093/mnras/stae1433
  * Dere et al. (2023) Dere, K. P., Del Zanna, G., Young, P. R., & Landi, E. 2023, ApJS, 268, 52, doi: 10.3847/1538-4365/acec79
  * Fox et al. (2010) Fox, J. L., Kankelborg, C. C., & Thomas, R. J. 2010, ApJ, 719, 1132, doi: 10.1088/0004-637X/719/2/1132
  * Harra et al. (2017) Harra, L. K., Hara, H., Doschek, G. A., et al. 2017, ApJ, 842, 58, doi: 10.3847/1538-4357/aa7411
  * Kuzin et al. (1997) Kuzin, S. V., Zhitnik, I. A., Pertsov, A. A., et al. 1997, Journal of X-Ray Science and Technology, 7, 233
  * Lemen et al. (2012) Lemen, J. R., Title, A. M., Akin, D. J., et al. 2012, Sol. Phys., 275, 17, doi: 10.1007/s11207-011-9776-8
  * Parker et al. (2022) Parker, J. D., Smart, R. T., Kankelborg, C., Winebarger, A., & Goldsworth, N. 2022, ApJ, 938, 116, doi: 10.3847/1538-4357/ac8eaa
  * Reeves et al. (2022) Reeves, K., Seaton, D. B., Golub, L., et al. 2022, in AGU Fall Meeting Abstracts, Vol. 2022, SH23A–06
  * Savage et al. (2022) Savage, S. L., Winebarger, A. R., Kobayashi, K., et al. 2022, Submitted to ApJ, arXiv:2212.00665.  https://arxiv.org/abs/2212.00665
  * Taylor (2001) Taylor, K. E. 2001, J. Geophys. Res., 106, 7183, doi: 10.1029/2000JD900719
  * Tousey et al. (1973) Tousey, R., Bartoe, J. D. F., Bohlin, J. D., et al. 1973, Sol. Phys., 33, 265, doi: 10.1007/BF00152418
  * Winebarger et al. (2019) Winebarger, A. R., Weber, M., Bethge, C., et al. 2019, ApJ, 882, 12, doi: 10.3847/1538-4357/ab21db
  * Zhitnik et al. (1998) Zhitnik, I. A., Kuzin, S. V., Oraevskii, V. N., et al. 1998, Astronomy Letters, 24, 819
  * Zou & Hastie (2005) Zou, H., & Hastie, T. 2005, Journal of the Royal Statistical Society Series B: Statistical Methodology, 67, 301, doi: 10.1111/j.1467-9868.2005.00503.x