This paper was converted on www.awesomepapers.org from LaTeX by an anonymous user.
Want to know more? Visit the Converter page.

11institutetext: Southwest Research Institute, Boulder, CO 80302, USA11email: [email protected] 22institutetext: Université Paris-Saclay, CNRS, Institut d’Astrophysique Spatiale, F-91405, Orsay, France 33institutetext: Max-Planck-Institut für Sonnensystemforschung, Göttingen, Germany 44institutetext: RAL Space, UKRI STFC Rutherford Appleton Laboratory, Didcot, Oxfordshire, OX11 0QX, UK 55institutetext: Institute of Theoretical Astrophysics, University of Oslo, Oslo, Norway

SPICE PSF Correction: General Framework and Capability Demonstration

J. E. Plowman SPICE PSF Correction: General Framework and Capability DemonstrationSPICE PSF Correction: General Framework and Capability Demonstration    F. Auchère SPICE PSF Correction: General Framework and Capability DemonstrationSPICE PSF Correction: General Framework and Capability Demonstration    R. Aznar Cuadrado SPICE PSF Correction: General Framework and Capability DemonstrationSPICE PSF Correction: General Framework and Capability Demonstration    A. Fludra SPICE PSF Correction: General Framework and Capability DemonstrationSPICE PSF Correction: General Framework and Capability Demonstration    T. Fredvik SPICE PSF Correction: General Framework and Capability DemonstrationSPICE PSF Correction: General Framework and Capability Demonstration    D. M. Hassler SPICE PSF Correction: General Framework and Capability DemonstrationSPICE PSF Correction: General Framework and Capability Demonstration    S. Mandal SPICE PSF Correction: General Framework and Capability DemonstrationSPICE PSF Correction: General Framework and Capability Demonstration    H. Peter SPICE PSF Correction: General Framework and Capability DemonstrationSPICE PSF Correction: General Framework and Capability Demonstration
(arXiv Preprint)

We present a new method of removing PSF artifacts and improving the resolution of multidimensional data sources including imagers and spectrographs. Rather than deconvolution, which is translationally invariant, this method is based on sparse matrix solvers. This allows it to be applied to spatially varying PSFs and also to combining observations from instruments with radically different spatial, spectral, or thermal response functions (e.g., SDO/AIA and RHESSI). It was developed to correct PSF artifacts in Solar Orbiter SPICE, so the motivation, presentation of the method, and the results revolve around that application. However, it can also be used as a more robust (e.g., WRT a varying PSFs) alternative to deconvolution of 2D image data and similar problems, and is relevant to more general linear inversion problems.

Key Words.:
¡ line: profiles - techniques: imaging spectroscopy - instrumentation: spectrographs - techniques: high angular resolution - Sun: abundances - Sun: corona ¿

1 Introduction

SPICE (Spectral Imaging of the Coronal Environment, Spice Consortium et al., 2020) is an EUV slit scanning spectrograph on board the Solar Orbiter spacecraft (García Marirrodriga et al., 2021). It has a 1.1\sim 1.1 arcsecond per pixel spatial plate scale along the slit and several slit widths ranging from 2 to 30 arcseconds, while the spectral plate scale is 0.009\sim 0.009 nm per pixel. The focal plane has two detector arrays of 1024×10241024\times 1024 pixels each, covering two spectral bands – one from 70.4 to 79.0 nm and the other from 97.3 to 104.9 nm. The slit scanning mechanism can cover up to 16 arcminutes, while the slit covers 14 arcminutes on the detector plane. The overall raster image dimensions are up to 960×840960\times 840 arcseconds. SPICE’s observing distance varies between about 0.3 and 1.0 AU, which must be considered when comparing these numbers with Earth-based instruments.

A primary design objective of SPICE is tracing the connectedness of the photosphere and low corona out to the heliosphere – primarily by connecting abundances observed in situ by various spacecraft with those sensed remotely by SPICE. This relies on accurate identification of particular emission lines at a variety of temperatures; lines which have varying susceptibility to ionization (the FIP, or First Ionization Potential, effect) (see Spice Consortium et al., 2020, for more detail). An additional important feature of SPICE for diagnosing connectedness is the use of the Doppler effect to discriminate upflows from downflows and to identify potential solar wind outflow regions deep in the corona and transition region.

Although SPICE is not a high resolution instrument by design, these and other observables, along with their driving science objectives, require reasonable resolution within the limits of its design (given the mission’s nominal requirements; see Spice Consortium et al., 2020); degraded resolution beyond the design limits will impact the ability to achieve SPICE’s science goals. This paper reports on some issues that degrade SPICE’s resolution, and a novel data processing methodology which will remove the degradation.

We will be using a set of coordinated SPICE and high spectral and spatial resolution IRIS (Interface Region Imaging Spectrograph De Pontieu et al., 2014) data for the examples and demonstrations in this paper, with IRIS data used as ‘ground truth’ to assess the quality of the deconvolution and constrain the effective SPICE PSF. The observations were taken on March 7, 2022, when SPICE’s orbit placed it on the Earth-Sun line, with the same perspective as IRIS. We will compare the SPICE C III 977 Å observations with IRIS Si IV 1394 Å observations; These two lines form very close in terms of temperature, at log T [K] of 4.78 and 4.81 in ionisation equilibrium (e.g., Table 1 of Peter et al., 2006). An image showing the larger context of this region is shown in Figure 1.

Refer to caption
Figure 1: Context image of the SPICE-IRIS coordinated observation data (a, left). This is made from one of the full-size SPICE rasters; It is a spectral sum over the C III 977 Å window. The detailed comparisons in this paper will focus on the smaller region outlined in this image; spectral line fit amplitude images of this smaller region are shown in right panels, from both IRIS (upper right, b) and SPICE (lower right, c).

2 Overview of SPICE PSF Problem and Possible Solution

2.1 PSF Issues and need for correction

Since SPICE is a scanning slit spectrograph, its observables are in three dimensions – spectral (λ\lambda), slit-aligned (yy), and slit-perpendicular (xx, the scanning direction; actually, there is a fourth time dimension but we do not consider this here because we assume the source and PSF do not change with time). The SPICE PSF is similarly three-dimensional, extending in all three of these directions. The issue this paper addresses is caused by a PSF that is both elongated and rotated with respect to these axes, rather than being aligned with them. We have observed that the SPICE PSF is rotated both within the slit plane (i.e., yλy-\lambda) and in some cases in the scanning plane as well. This is shown for an example slit plane by Figure 2; this slit plane passes through the middle of the green circled region in Figure 1. A rotation on the detector (i.e., yλy-\lambda) plane of 15\sim 15^{\circ} is evident (this angle will appear different if the pixels are not square, and can vary with the different slit width; this paper focuses on the 2 arcsecond slit). We believe this issue is caused by a combination of astigmatism on the primary mirror and defocus.

Refer to caption
Figure 2: Spectra from a particular slit position in the SPICE and IRIS data. This slit position is chosen to have good agreement between SPICE and IRIS and passes through the middle of the green circled region in Figure 1. On the left (a) is the IRIS spectra, second from left (b) shows the proposed SPICE PSF with SPICE pixelization, third from left (c) is the IRIS data (‘synthetic SPICE’) with this PSF and pixelization, and finally (d) we show the actual observed SPICE data. The elongation and apparent rotation of the PSF are evident, as is the agreement between (synthetic) IRIS and SPICE.

This elongation and rotation of the SPICE spectro-spatial PSF impacts its ability to diagnose connectedness and other important instrument capabilities in a variety of ways. It reduces the definition with which SPICE can resolve boundaries of regions with differing connectedness – some of these can be rather small and in general small changes in the region identification can result in large impacts on the quality of the association with in situ observations. The degradation also hampers the ability to resolve the fainter spectral lines when there are neighboring bright spectral lines. This is especially critical because the selection of lines which adequately sample both abundance and temperature is very limited (the aforementioned spectral blends are a case in point).

Even more challenging is that the tilt of the PSF between that spatial and spectral directions causes a bright feature at one location to create the illusion of a neighboring dim feature, which is Doppler shifted relative to the true feature – i.e., bright features appear to have Doppler shift lobes next to them; Together with Doppler fitting, the elongated and rotated ‘effective PSF in the yλy-\lambda plane acts like an edge detection filter, causing bright features to be ‘aliased’ from intensity into Doppler (As previously mentioned, we believe this issue is ultimately caused by a combination of astigmatism on the primary mirror and defocus). This confounds attempts to understand connectedness and dynamics by looking at Doppler shifts, and we have seen this kind of feature in the SPICE data.

To illustrate the issue, we show (in the lower panels of Figure 3) the Doppler fits to the binned down IRIS data, the IRIS data degraded with the SPICE PSF, and the actual SPICE data, for the region of interest already highlighted by Figure 1. Strong Doppler features are evident in the IRIS data degraded with SPICE PSF and the SPICE data which are not present in the original IRIS data. We have circled three of the most prominent such features in the Doppler map. Each of these coincide with bright features (e.g., ridges) in intensity, as can be seenin the lower panels of Figure 3. The clear appearance of the same features in IRIS with the SPICE PSF, when they are absent from the original (plus down-binning) IRIS data, clearly implicates the PSF in creating these artifacts. A similar effect and artifacts have been previously noted for Hinode EIS (Culhane et al., 2007). This is primarily discussed in an online EIS SW note (Ugarte-Urra, 2016), but also alluded to in other papers such as Young et al. (2012).

Refer to caption
Refer to caption
Figure 3: Amplitude (upper row) and Doppler (lower row) fits to the IRIS (left column, a), IRIS with SPICE PSF and pixelization (‘IRIS synthetic SPICE’; center column, b), and SPICE (right column, c). Before fitting, the IRIS data on left were first binned down 2×22\times 2 to better match the SPICE pixel size. Both the ‘synthetic SPICE’ and real SPICE Doppler (b and c) show clear ridge artifacts which are absent from the IRIS Doppler (a). Some specific artifacts are highlighted; comparison with the amplitudes in the upper row shows that these are associated with bright features in intensity. The elongated, rotated effective yλy-\lambda PSF causes bright intensity features to alias into Doppler, as further discussed in the text.

2.2 Solution method: general linear (sparse) solvers and why we’re using them

These examples suffice to illustrate that this PSF effect seriously degrades the quality of Doppler data observed by SPICE. A means of removing it is highly desireable, and the objective of this work is to develop such a method which could ultimately be applied to all data at some level of its data pipeline. The conventional way of removing PSFs is via convolution (e.g., Poduval et al., 2013). Convolution in this context is the translationally invariant special case of the general linear transform, and usually also assumes that the input and output of the transform have the same dimensions (e.g., nxn_{x} by nyn_{y} pixels). Rather than treat the problem under this special case, however, we instead treat it as an example of the full general linear transform. There are a number of reasons for this choice, including:

  • Pragmatically, we expect these PSF artifacts to vary over the image plane, Which a convolution cannot represent;

  • The general transform provides a somewhat more straightforward framework for applying other constraints such as positivity and regularization, one where we have already had success in other contexts (Plowman & Caspi, 2020; Plowman, 2021).

  • The general full linear problem is far more broadly applicable than the (de)convolution problem. Once properly developed, the same tools used for this problem with SPICE can be applied to almost every other coronal remote sensing problem, to similarly good effect. See Plowman (2021) for an early example. We will return to this point at the end of the paper.

  • The tools for tackling the inverse part of this problem have already been extensively developed by the computer science communities, in the form of high performance sparse matrix solvers. All we need to do, therefore, is implement the forward transform in the appropriate fashion, i.e., as a sparse matrix.

We turn next to our implementation of this method. The derivation shown next presupposes a 3D PSF as a function of xx, yy, and λ\lambda (the most general case for SPICE). In practice, our understanding of the problem is that it can be represented by two PSFs. The first blurs in xx and yy but does not affect λ\lambda. Therefore, this PSF does not contribute to the Doppler artifacts we are trying to correct. The other ‘effective’ yλy-\lambda PSF is assumed to affect yy and λ\lambda but not xx. This is the PSF that is elongated in λ\lambda and rotated 15\sim 15^{\circ}, and which causes the Doppler artifacts. We have done a variety of tests with 2D and 3D PSFs, and found that correcting this effective PSF suffices to remove the Doppler artifacts, working as well as the 3D correction while being much faster. We leave the derivation presented here in 3D because it is more general and was already written that way. The code for doing the correction is written to be agnostic to the dimensionality of the problem, as the supplementary 1D and 2D examples demonstrate.

3 Introducing our solution method (Formalism)

3.1 SPICE PSF as instance of general linear forward problem

3.1.1 The SPICE forward problem

To begin, let us suppose SPICE observes some static (meaning it does not change over the time of observation) cube on the sky, with spectral radiance L(xs,ys,λs)L(x_{s},y_{s},\lambda_{s}) as a function of sky longitude and latitude (which we will write as xs,ysx_{s},y_{s}) and wavelength λs\lambda_{s}. These are projected onto the detector plane by the PSF, P(xd,yd,λd,xs,ys,λs)P(x_{d},y_{d},\lambda_{d},x_{s},y_{s},\lambda_{s}), which is a function of both sky coordinates (xs,ys,λsx_{s},y_{s},\lambda_{s}) and detector plane coordinates (xd,yd,λdx_{d},y_{d},\lambda_{d}). In reality, xdx_{d} and λd\lambda_{d} are time-multiplexed onto the same surface (although not necessarily the same axis) by the grating, slit, and scanning mechanism, but we will treat them as independent for clarity of demonstration. The flux density E(xd,yd,λd)E(x_{d},y_{d},\lambda_{d}) on the detector plane observed for this cube is the integral of the cube against the PSF over all sky angles:

E(xd,yd,λd)=P(xd,yd,λd,xs,ys,λs)L(xs,ys,λs)𝑑xs𝑑ys𝑑λsE(x_{d},y_{d},\lambda_{d})=\int P(x_{d},y_{d},\lambda_{d},x_{s},y_{s},\lambda_{s})L(x_{s},y_{s},\lambda_{s})dx_{s}dy_{s}d\lambda_{s} (1)

Where we have made the small angle approximation and placed the Sun at the equator of the coordinate system which allows us to set the cosys\cos y_{s} weight in the integral to one. The sensors divide the detector plane into pixels which we will index by i,j,i,j, and kk, each of which have weight functions (typically non-overlapping ‘bins’) θijk(xd,yd,λd)\theta_{ijk}(x_{d},y_{d},\lambda_{d}). The fluxes Φijk\Phi_{ijk} into each of these pixels are the integrals of the detector plane flux densities against each of these weight functions:

ϕijk=θijk(xd,yd,λd)E(xd,yd,λd)𝑑xd𝑑yd𝑑λd\phi_{ijk}=\int\theta_{ijk}(x_{d},y_{d},\lambda_{d})E(x_{d},y_{d},\lambda_{d})dx_{d}dy_{d}d\lambda_{d} (2)

At this point we point out what we call the overall response function of the {ijk}\{ijk\}th pixel of the instrument,

Rijk(xs,ys,λs)=θijk(xd,yd,λdP(xd,yd,λd,xs,ys,λs)dxddyddλdR_{ijk}(x_{s},y_{s},\lambda_{s})=\int\theta_{ijk}(x_{d},y_{d},\lambda_{d}P(x_{d},y_{d},\lambda_{d},x_{s},y_{s},\lambda_{s})dx_{d}dy_{d}d\lambda_{d} (3)

The name of the game is to find the spectral radiance, LL, which is an unknown continuous function and therefore has an infinite number of degrees of freedom. To limit the number of degrees of freedom we can without loss of generality (in practice if not in principal) define LL in terms of a linear combination of a set of appropriately chosen basis functions, Blmn(xs,ys,λs)B_{lmn}(x_{s},y_{s},\lambda_{s}):

L(xs,ys,λs)=lmnclmnBlmn(xs,ys,λs),L(x_{s},y_{s},\lambda_{s})=\sum_{lmn}c_{lmn}B_{lmn}(x_{s},y_{s},\lambda_{s}), (4)

where clmnc_{lmn} are the coefficients of the linear combination. The basis function set ought to be linearly independent (i.e., no basis function can be expressed as a linear combination of the others). It is useful for the present purpose if each one is spatially compact and does not overlap much (or at all) with the other basis functions. They should also cover the sky plane at least as well as the pixels cover the detector plane. A set of pixel like ‘bins’ in {xs,ys,λs}\{x_{s},y_{s},\lambda_{s}\} with equivalent (or denser) spacing to the pixels will suffice and is the choice we use in this paper. The indices {l,m,n}\{l,m,n\} are intended to reflect the identification of the bins with the coordinate axes. In terms of this, the pixel fluxes are

ϕijk=lmnclmnRijk(xs,ys,λs)Blmn(xs,ys,λs)𝑑xs𝑑ys𝑑λs.\phi_{ijk}=\sum_{lmn}c_{lmn}\int R_{ijk}(x_{s},y_{s},\lambda_{s})B_{lmn}(x_{s},y_{s},\lambda_{s})dx_{s}dy_{s}d\lambda_{s}. (5)

If we recognize an array of response coupling terms,

rijk,lmnRijk(xs,ys,λs)Blmn(xs,ys,λs)𝑑xs𝑑ys𝑑λs,r_{ijk,lmn}\equiv\int R_{ijk}(x_{s},y_{s},\lambda_{s})B_{lmn}(x_{s},y_{s},\lambda_{s})dx_{s}dy_{s}d\lambda_{s}, (6)

(the consituents of this are all known and computable, being composed of the basis functions and the in principal known instrument response functions) we are left with the following linear equation relating the unknowns (clmnc_{lmn}) to the knowns (ϕijk\phi_{ijk}):

ϕijk=lmnrijk,lmnclmn\phi_{ijk}=\sum_{lmn}r_{ijk,lmn}c_{lmn} (7)

We have used three indices each for the coefficients and the observables, but this is simply a notational convenience that allows us to identify each of the coordinate axes with its own index. Mathematically, we can ‘flatten’ all these indices down to a pair of indices (one for the coefficients, and one for the observables) by relabeling according to the following one-to-one correspondence:

injnk+jnk+kiin_{j}n_{k}+jn_{k}+k\rightarrow i (8)
lnmnn+mnn+njln_{m}n_{n}+mn_{n}+n\rightarrow j (9)

Our linear equation then becomes

ϕi=jFijcj,\phi_{i}=\sum_{j}F_{ij}c_{j}, (10)

Which we recognize as a familiar matrix equation, with the array of coupling terms becoming a forward response matrix. Any N-dimensional linear discrete or integral transform can be similarly treated, and nonlinear ones may be amenable to a linearization and iteration approach, so this can be a very powerful and general method for dealing with these problems.

3.1.2 1D and 2D Examples

At this point, a pair of lower dimensional examples may be illustrative. Consider the spectrum for a single pixel, i.e., a function only of (for example) wavelength. This is equivalent to the DEM problem as presented by Plowman & Caspi (2020), the only difference being that instead of the instrument temperature response functions found there, we have a combination of the wavelength PSF and pixel bin functions:

Ri(λd)=θi(λd)P(λd,λs)𝑑λdR_{i}(\lambda_{d})=\int\theta_{i}(\lambda_{d})P(\lambda_{d},\lambda_{s})d\lambda_{d} (11)

The forward matrix is

Fij=jθi(λd)P(λd,λs)𝑑λdBj(λs)𝑑λscjF_{ij}=\sum_{j}\int\int\theta_{i}(\lambda_{d})P(\lambda_{d},\lambda_{s})d\lambda_{d}B_{j}(\lambda_{s})d\lambda_{s}c_{j} (12)

This is illustrated graphically in Figures 4 and 5. The only difference between them is that in Figure 4, the individual steps are depicted, whereas Figure 5 combines all of these steps into the forward matrix – This is possible because all of the individual steps are linear operations.

Refer to caption
Figure 4: One-dimensional example of the linear process relating a source model to observations. The input to the model (a, first row, left) is a set of coefficients. These are multiplied by a set of basis functions at various wavelengths (one is shown at right on first row, b) and the result is added to produce a spectrum (second row on left, c). The spectrum in turn is multiplied by the PSF at each wavelength (d) and the result added to produce a detector plane spectrum (3rd row on left, e). Lastly, each of the sensor response functions (3rd row on right, f) are integrated against the detector plane spectrum to produce count rates in each detector element (4th row on right, g).
Refer to caption
Figure 5: The input (source coefficients, a at top left) and outputs (detector count rates, c at bottom right) in this figure are identical to Figure 6, but with all of the intermediate operations carried out by a single matrix (b). The vertical axis of this matrix is aligned with the source element index, while the horizontal axis is aligned with the detector element index.

Figures 6 and 7 are of the same format and show how the same treatment can be scaled up to two dimensions (spatial, in this example, although it makes no difference in the mathematical treatment). Essentially, the additional dimension in the source and the detector are simply multiplexed down to the one ‘input’ (conventionally the columns) and one ‘output’ dimension of the forward matrix. Mathematically, the only difference is the addition of a multiplexing (e.g. by ‘flattening’ in numpy or reforming to a 1D vector in IDL) step at the beginning and, if desired, a demultiplexing step at the end (e.g., by using reform in IDL or reshape in numpy) – But these are trivial 1-to-1 operations. This additional multiplexing step is shown in the top left and bottom center panels of Figure 7, which otherwise is identical in format to the one-dimensional figure (5). The output resolution of these examples differs from the input, because in general the resolution of solar sources differs than that of our detectors, to demonstrate that this framework can accomodate such resolution differences.

Refer to caption
Figure 6: Identical to Figure 4 except that in this case the source and observations are 2-Dimensional. The output resolution of these examples differs from the input, because in general the resolution of solar sources differs than that of our detectors, to demonstrate that this framework can accomodate such resolution differences.
Refer to caption
Figure 7: The input (source coefficient image, a at top left) and outputs (detector count rates image, e at bottom center) in this figure are identical to Figure 6, but with all of the intermediate operations carried out by a single matrix (shown as an image at top right, c). The vertical axis of this matrix is aligned with the source element index, while the horizontal axis is aligned with the detector element index. This is equivalent to the 1D example, except that there is a multiplexing step that ‘flattens’ the 2D input to 1D (top center, b) prior to multiplication by the forward matrix (top right). The result of this multiplication (bottom right, d) can then be demultiplexed to produce the output image (e).

The SPICE forward problem for the effective (yλy-\lambda) PSF is equivalent to this 2D correction, while the full forward problem follows the same trend from 1D to 2D to 3D – the same multiplexing and demultiplexing operations suffice to convert the problem into matrix form. The practical implementation of this can be conceptually thorny, but we have developed a general N-Dimensional, coordinate aware framework in Python for computing these matrices. This will be described in more detail in Section 3.4, and the framework is also available for download (see Section 3.4).

3.1.3 Sparse Matrix Algorithms

It is clear from the examples provided above that the forward matrix is very large, even for images of modest size. However, only detector elements within PSF range of the source elements have non-zero entries, and the PSF is much smaller than the overall image. Therefore, this matrix is sparse. A wide variety of specialized sparse matrix algorithms exist to work with such matrices and they drastically reduce the real-world memory and processing requirements of working with these matrices. Standard examples can be found in, for instance, Press et al. (2002). Additionally, solving linear problems based on sparse matrices is well developed field in computer science, and by casting the problem in this form we can avail ourselves of the tools that have been developed. Our framework for computing the forward matrices is built on these algorithms, specifically making use of the scipy.sparse sparse matrix package.

3.2 Solving the SPICE forward problem

The fundamentals of this solution method have also been recently discussed in Plowman & Caspi (2020); Plowman (2021), but we will also cover them here to show how they apply to this case. We begin by considering the forward problem in the linear least squares framework (Press et al., 2002):

We seek to find the ‘best fit’ coefficient vector (cjc_{j} in Equation 10) that minimizes the sum of squares (hence, the ‘least squares’) of the deviation of our model prediction for the data – Φi\Phi_{i} from Equation 10 – with the data, did_{i}. These squared deviations are weighted by the inverse of the square of the errors in the data, σi\sigma_{i}. This weighted sum is also known as a χ2\chi^{2} statistic:

χ2=i(ϕidi)2σi2\chi^{2}=\sum_{i}\frac{(\phi_{i}-d_{i})^{2}}{\sigma_{i}^{2}} (13)

The above assumes that the errors in the data are normally distributed, which can be seen by noting that in that case the log likelihood is χ2-\chi^{2}. Because this merit function is convex, it has only one minimum which occurs where the gradient of χ2\chi^{2} with respect to the coefficient vector is zero. Better yet, because χ2\chi^{2} is quadratic, its derivative is linear. The best fit coefficient vector is therefore found by solving the following matrix equation (cf. the chapter in Press et al., 2002, on Linear Least Squares):

AT𝐛=ATA𝐜,orA^{T}\cdot{\bf b}=A^{T}\cdot A\cdot{\bf c},\quad\mathrm{or} (14)

Where

Ajk=Fjkσj,andbj=djσj.A_{jk}=\frac{F_{jk}}{\sigma_{j}},\quad\mathrm{and}\quad b_{j}=\frac{d_{j}}{\sigma_{j}}. (15)

This is the standard form for matrix problems in linear algebra, and in principle the linear least squares best fit solution is

𝐜=[ATA]1AT𝐛{\bf c}={[A^{T}A]}^{-1}\cdot{A^{T}\cdot{\bf b}} (16)

Reality is never quite so simple, of course – we need to apply some additional constraints to ensure a well-posed solution, which we discuss next.

3.3 Positivity Constraint and Regularization

The ATAA^{T}A matrix is likely to be poorly conditioned even if it is not outright singular. The blurring caused by the PSF means that details we would like to resolve are degraded by the forward transform – it loses information – even if the number of data points is equal to the number of coefficients; in this case, ATAA^{T}A will be poorly conditioned, and detector noise will lead to instabilities in the reconstruction. If the number of data points is less than the number of coefficients, then ATAA^{T}A will be singular and simply inverting Equation 14 will not be possible. To resolve this issue, we apply a positivity constraint and regularization.

3.3.1 Regularization

Regularization typically takes the form of an additional term to minimize which is added to χ2\chi^{2}. In this derivation, we will take this to be of the form

λijciXijcj.\lambda\sum_{ij}c_{i}X_{ij}c_{j}. (17)

In other words, instead of minimizing χ2\chi^{2} by itself, we seek to minimize the merit function

Mχ2+λijciXijcj,M\equiv\chi^{2}+\lambda\sum_{ij}c_{i}X_{ij}c_{j}, (18)

Where 𝐗\mathbf{X} is a matrix specifying the regularization. This can be as simple as the identity matrix, in which case the regularization makes the solver prefer solutions with a smaller l2l^{2} norm (i.e., 𝐜𝐜{\bf c}\cdot{\bf c}). Exactly how much smaller depends on the size of the λ\lambda parameter, which tunes the strength of the regularization. In Plowman & Caspi (2020), the operator was composed of the derivatives (WRT temperature, in that case) of the basis functions integrated against each of the other basis functions. This results in a regularization operator that makes the solver prefer solutions with the smaller derivatives – specifically the log of the derivative in that case.

The addition of the regularization term changes the matrix equation we wish to solve from Equation 14 to

AT𝐛=ATA𝐜+λX𝐜.A^{T}\cdot{\bf b}=A^{T}\cdot A\cdot{\bf c}+\lambda X\cdot{\bf c}. (19)

In other words, the matrix that needs to be inverted simply has the regularization matrix times the tunable paramater (λX\lambda X) added to it.

For this class of problem, λ\lambda is often chosen to make each the residuals of the fit to be some number χ0\chi_{0} (typically equal to the number of data points, or ‘reduced’ χ2\chi^{2} of order unity). Noting that the residuals are 𝐛A𝐜{\bf b}-A\cdot{\bf c}, and with a slight rearrangment of Equation 19, this requirement is equivalent to

λjXijcjχ0jFjiσj=0.\lambda\sum_{j}X_{ij}c_{j}-\chi_{0}\sum_{j}\frac{F_{ji}}{\sigma_{j}}=0. (20)

We want to solve this for λ\lambda. But this is just one parameter and can’t satisfy each component of this vector equation. Instead, minimize the RMS of the LHS of this equation over lambda. The result is

λ=χ0i(jXijcj)(jFij/σj)i(jXijcj)2.\lambda=\chi_{0}\frac{\sum_{i}(\sum_{j}X_{ij}c_{j})(\sum_{j}F_{ij}/\sigma_{j})}{\sum_{i}(\sum_{j}X_{ij}c_{j})^{2}}. (21)

But we don’t know 𝐜{\bf c}, either. We therefore use an initial guess for 𝐜{\bf c} to determining our λ\lambda. We’ll need one later on when we introduce the positivity constraint, anyway.

It turns out that a simple initial guess can be formed using FT𝐝F^{T}\cdot{\bf d}. An analogy can be made to upscaling an image by an integer factor. More generally, the results of this procedure are roughly a model which has been subjected to the source response function twice. It will be much smoother, but features will be in the right place. This is desirable for regularization and it is more conservative and therefore avoids overfitting. It does result in an over-smoothed solution as well, however, the amount of which depends on how much sharper the source is than the results of the instrument resolution degradation. To mitigate this, we apply a final correction factor to λ\lambda. The SPICE sources are significantly sharper than the SPICE PSF, so the λ\lambda used is about 0.1.

The amplitude needs to be rescaled (since FF is not normalized). We choose this scaling factor to be the one that minimizes the χ2\chi^{2} of this initial guess compared with the data, resulting in the following initial guess for 𝐜{\bf c}:

𝐜0FT𝐝[𝐝AAT𝐝|AFT𝐝|2]{\bf c}^{0}\equiv F_{T}\cdot{\bf d}\Big{[}\frac{{\bf d}\cdot A\cdot A^{T}\cdot{\bf d}}{|A\cdot F^{T}\cdot{\bf d}|^{2}}\Big{]} (22)

The framework as currently constructed uses regularization based the l2l^{2} norm. The derivative-based regularization used in Plowman & Caspi (2020) could also be done here, but it would require constructing gradient operator matrices with respect to image position and wavelength, which is doable but too involved to include in the present publication. It will be implemented in future work, however, which will open up a variety of possibilities for including more physical constraints on inversions using this framework, as well as some other intrinsic benefits.

3.3.2 Positivity Constraint: nonlinear mapping

One condition that the sources of these data must satisfy is positivity: spectral radiances cannot be negative. This is a nonlinear constraint, which can’t be directly captured by a linear formalism. Instead, we use the same nonlinear mapping on the coefficients as in Plowman & Caspi (2020). We express cjc_{j} in terms of a second set of parameters, sjs_{j}, such that

cj=g(sj).c_{j}=g(s_{j}). (23)

We then choose the mapping function, gg, to be one whose range is limited to the non-negative numbers. Two such examples are esje^{s_{j}} and sj2s_{j}^{2}; we use the former (exponential) mapping here, as it seems to produce better convergence properties. We then linearize and iterate beginning from an initial guess. The results of this are described in more detail in Plowman & Caspi (2020), and we will not repeat all of the steps of the derivation here although we have changed the notation somewhat in an attempt at better clarity. The one difference is that in Plowman & Caspi (2020) only the case where the regularization acts on the sjs_{j}, rather than the cjc_{j} was considered. If the regularization acts on the cjc_{j} instead, there are additional terms (shown below).

The result is the following matrix equation

jαijcj=βi,where\sum_{j}\alpha_{ij}c_{j}=\beta_{i},\quad\mathrm{where} (24)
αijg(si0)kFikFjkσi2g(sj0)+h(s0i)Xijh(s0j),\alpha_{ij}\equiv g^{\prime}(s_{i}^{0})\sum_{k}\frac{F_{ik}F_{jk}}{\sigma_{i}^{2}}g^{\prime}(s_{j}^{0})+h^{\prime}(s^{i}_{0})X_{ij}h^{\prime}(s^{j}_{0}), (25)

and

βi\displaystyle\beta_{i} \displaystyle\equiv jg(si0)Fjiσj2[djkFjk(g(sk0)sk0g(sk0))]\displaystyle\sum_{j}g^{\prime}(s_{i}^{0})\frac{F_{ji}}{\sigma_{j}^{2}}\big{[}d_{j}-\sum_{k}F_{jk}(g(s_{k}^{0})-s_{k}^{0}g^{\prime}(s_{k}^{0}))\big{]} (26)
h(si0)Xij[h(sj0)sj0h(sj0)]\displaystyle-h^{\prime}(s_{i}^{0})X_{ij}\big{[}h(s_{j}^{0})-s_{j}^{0}h^{\prime}(s_{j}^{0})\big{]}

where h(si)h(s_{i}) is the mapping function for the regularization. It is equal to g(si)g(s_{i}) if the regularization is with respect to 𝐜{\bf c} and h(si)=sih(s_{i})=s_{i} if it is with respect to 𝐬{\bf s}, and primes on gg or hh represent their derivatives with respect to their arguments. sj0s_{j}^{0} represents the coefficient parameters from the previous step of the iteration. There’s no reason the regularization couldn’t use some other mapping function of ss, but we do not further consider that possibility here; we use the same mapping for both χ2\chi^{2} and the regularization (h(x)=g(x)h(x)=g(x)). The regularization strength, λ\lambda, likewise changes to

λ=χ0i(h(si0)jXijh(sj0))(jg(si0)Fji/σj)i(h(si0)jXijh(sj0))2.\lambda=\chi_{0}\frac{\sum_{i}(h^{\prime}(s_{i}^{0})\sum_{j}X_{ij}h(s_{j}^{0}))(\sum_{j}g^{\prime}(s_{i}^{0})F_{ji}/\sigma_{j})}{\sum_{i}(h^{\prime}(s_{i}^{0})\sum_{j}X_{ij}h(s_{j}^{0}))^{2}}. (27)

These equations suffice to ensure positivity, which in addition to being required by the physics makes the solutions more well-posed in many situations. It does require an iteration, but the convergence is generally good provided the mapping functions are monotonic (this makes the overall optimization problem convex, so the figure of merit has a single global minimum).

3.3.3 Solvers: GMRes, Bicstab, etc

Since these matrices are very large, they require sparse solvers. These generally rely on some sort of iterative process in order to avoid dealing with the fully populated matrix. The code for applying these corrections is developed in Python, so we have been using the solver algorithms included in the sparse package of SciPy (Virtanen et al., 2020a). Specifically the stabilized biconjugate gradient (bicgstab van der Vorst, 1992) and lgmres (Baker et al., 2005) algorithms. Both of these algorithms have a long heritage – they are variants of algorithms mentioned in the 1992 edition of Press et al. (2002), namely the Biconjugate Gradient and Generalized Minimal Residual methods. We have tested both and found their convergence and performance to be comparable and more than acceptable for the problem at hand.

3.4 Implementation Details & Practical Considerations

To accompany this formalism, we have developed a flexible coordinate-aware Python framework which can compute basis functions, PSF, and response matrix for arbitrary source and detector dimensions. It contains the following components:

Basis functions

Rectilinear N-Dimensional ‘bin’ and ‘triangle’ functions are provided as examples, and others can easily be added.

Point Spread Functions

Functions specifying how an N-Dimensional detector plane is illuminated by a point source at a particular location. A Gaussian-based ‘boilerplate’ PSF is included as an example (see Section 3.4.1 below).

Coordinate Grids

These represent the standard notion of an N-Dimensional array of coordinate points indexed to a grid. They are defined in terms of a coordinate system and a transform from grid indices to a set of coordinate points. The transform may be defined in terms of an origin (the location of the center of the element with all indices zero), a set of sizes (Δx\Delta_{x}, Δy\Delta_{y}, etc), and the dimensions of the array, but more complex transforms are also possible. This transform must be one-to-one.

Source and Detector Element Grids

These represent the standard notion of a gridded array of elements, and can be either a set of source basis elements or detector elements (pixels). They are defined in terms of the coordinate grids and registered to it, but add code for returning the coordinates and amplitude of a particular basis element and for returning the response of all detector elements to a particular point source. Sources and detectors are independent and each have their own coordinate system.

Coordinate Transform

A transformation from the coordinate system of the source model to the coordinate system of the detector. This is build to interface with the coordinate grids, and is also setup with the astropy (Astropy Collaboration et al., 2013a, 2018a) and sunpy (The SunPy Community et al., 2020a) coordinate systems in mind, but for these examples we use a trivial identity transform, leaving the source defined in terms of detector units, and registered to the same grid. This transform does not need to be one-to-one – e.g., it can map from a set of 3D spatial points on the sky to a 2D detector plane.

This framework should be able to accommodate detectors whose elements are not gridded in the usual way – RHESSI (Lin et al., 2002) could be an example of this – but we do not further explore the possibility in this paper. Likewise, we will leave detailed description of the framework to its codebase and example usage software, which will be made available along with the published paper.

3.4.1 ‘Boilerplate’ PSF Model

For the work shown next, we use a ‘Boilerplate’ model of the PSF which consists of a two component, 2D Gaussian where each component can be raised by an additional exponent to weight it more toward its wings or its core. We found that setting this exponent to 1.5\sim 1.5 made for a closer match between the IRIS line profiles (with our PSF added) and the SPICE line profiles, although the effect on the corrected Doppler shifts was very small. The mathematical expression for these Gaussians is:

P(Δ𝐫)=exp[12(Δ𝐫TΣ1Δ𝐫)γ],P(\Delta\mathbf{r})=\exp\Big{[}-\frac{1}{2}\big{(}\Delta\mathbf{r}^{T}\Sigma^{-1}\Delta\mathbf{r}\big{)}^{\gamma}\Big{]}, (28)

where Δ𝐫\Delta\mathbf{r} is the difference between the coordinate vector of the source and the coordinate vector on the image plane, e.g., {xdxs,ydys,λdλs}\{x_{d}-x_{s},y_{d}-y_{s},\lambda_{d}-\lambda_{s}\} in equation 1. Σ\Sigma is the covariance matrix of the Gaussian, and γ\gamma is the exponent (an exponent of one is a standard Gaussian). We specify this in terms of a set of initial axis lengths (the uncertainties of the principal axes without rotation) and rotation angles, in which case one begins with a diagonal covariance matrix that has the principal axis uncertainties on the diagonals and then rotates the matrix to its final position with a succession of rotation matrice(s) – one in the 2D case, 3 in the 3D case – Our implementation includes an example implementation of this PSF that works in both 2D and 3D.

4 Testing & Application

To begin, we show the method applied to the one and two-dimensional examples shown earlier. Figure 8 shows reconstruction of the example shown in Figure 4, while Figure 9 shows reconstruction of the example in Figure 6. In both cases, the reconstruction recovers most of the features of the source which are not evident in the data, despite the presence of PSF, noise, and (in the 2D example) a lower pixel resolution. Apparent noise is amplified by this process, but this is an inevitable consequence of the flow of information in this problem: below some threshold, noise and features cannot be distinguished.

Refer to caption
Figure 8: Reconstruction of the one-dimensional example case previously shown in Figure 4 using our method. Left (a) is the original ‘source’ model, center (b) is the data corresponding to that model (including PSF, pixelization, and noise), right (c) is the reconstruction of the source model.
Refer to caption
Figure 9: Reconstruction of the two-dimensional example case previously shown in Figure 6 using our method. Left (a) is the original ‘source’ model, center (b) is the data corresponding to that model (including PSF, pixelization, and noise), right (c) is the reconstruction of the source model.

4.1 Application to SPICE data and comparison with coordinated IRIS data

We now show application to the example SPICE data shown earlier. As previously mentioned, we are treating the overall SPICE spatio-spectral response function as an xyx-y response function representing (primarily) the main (spatial focusing) mirror followed by a yλy-\lambda ‘effective’ response function representing the elements that contribute to the spectral PSF, including the grating, and final pixelization. To reduce the size of the inverse problem, this example incorporates the downsampling in yy, including a 2-pixel binning in that direction, into the xyx-y response function. This is not strictly required, although it does also help to increase the SNR. The λ\lambda resolution change, of course, all happens as part of the response function.

The correction uses the full IRIS resolution in λ\lambda; even though this is considerably higher than the SPICE resolution, it is necessary to properly resolve the spectral line – The combination of positivity constraint, regularization, and the fact that the MTF of the PSF doesn’t completely go to zero means that the correction can somewhat exceed the standard Airy/Nyquist criteria, especially since the spectral direction is mostly composed of near zero-amplitude signal. This super resolution can result in some ringing and overfitting features due to noise, however, so we apply a new forward matrix that applies a ‘nominal’-sized SPICE PSF and returns the pixel scale to that of the original data. The size of this ‘nominal’ PSF is based on the resolutions described in the SPICE instrument paper (Spice Consortium et al., 2020). The parameters of the PSF used are shown in Table 1, along with the slightly different parameters (just the PSF angle in this case) used for the correction of the region discussed in Section 4.1.1.

Parameter Region 1 Value Region 2 Value Description
Fy0,cF_{y0,c} 2.0 Arcseconds 2.0 Arcseconds PSF core y axis FWHM before rotation or any non-Gaussian exponentiation.
Fλ0,cF_{\lambda 0,c} 0.95 Å 0.95 Å PSF core λ\lambda axis FWHM before rotation or any non-Gaussian exponentiation.
θc\theta_{c} 1515^{\circ} 2020^{\circ} PSF core rotation angle in degrees.
γc\gamma_{c} 1.5 1.5 PSF core non-Gaussian exponent.
Fy0,wF_{y0,w} 10.0 Arcsrconds 10.0 Arcseconds PSF wing y axis FWHM before rotation or any non-Gaussian exponentiation.
Fλ0,wF_{\lambda 0,w} 2.5 Å 2.5 Å PSF wing λ\lambda axis FWHM before rotation or any non-Gaussian exponentiation.
γw\gamma_{w} 1.0 1.0 PSF wing non-Gaussian exponent (1 means Gaussian).
www_{w} 0.2 0.2 Wing weight (core weight is 1.0ww1.0-w_{w}).
Table 1: Parameters of the PSF used for the correction of the two regions; Region 2 is the second region, discussed in Section 4.1.1 (Region 1 is shown in Figures 1 and Region 2 in 13). PSF size parameters must be converted to natural detector plane units (microns) before the PSF is evaluated, else they’re dimensionally inconsistent. The conversion factors are 18/1.118/1.1 microns per arcsecond and 200 microns per Å (i.e., Å in wavelength).

Figure 10 shows the same slit position as what’s shown in Figure 2, with the higher spectral resolution, while Figure 11 shows our final correction with this nominal/ideal SPICE PSF and pixelization. Each figure shows correction of both the SPICE data and the IRIS based ‘synthetic’ SPICE data (IRIS with proposed SPICE PSF and pixelization). All show good removal of the rotation artifacts of the PSF, and the degraded then corrected IRIS data shows a good match to the originals (though not exact, which is to be expected considering the much lower resolution. The high res correction for SPICE (Figure 10) shows the ringing and noise features mentioned, but these are absent when the resolution is reduced back the nominal SPICE values (Figure 11).

Refer to caption
Figure 10: High-resolution ‘raw’ corrected spectra from the same slit position as is shown in 2. The IRIS data is at left (a), as before, while the SPICE data is now second from left (b). The correction applied to the degraded IRIS data is third from left (c), while the correction applied to SPICE is fourth from left (d). These last two are at higher spectral resolution than the input SPICE data; the higher resolution being necessary to resolve the spectral line. This over-resolution results in some noise-induced ringing and other ripples in the SPICE data, which we resolve by returning the image to SPICE pixel scale plus a ‘nominal’ PSF, shown in Figure 11. Otherwise, the original IRIS line width is recovered, while the elongation and tilt of the SPICE PSF is removed.
Refer to caption
Figure 11: Corrected spectra from the same slit position as is shown in 2. The IRIS data is at left (a), as before, while the SPICE data is now second from left (b). The correction applied to the degraded IRIS data is third from left (c), while the correction applied to SPICE is fourth from left (d). These last two have the same pixel scale as the input SPICE data, with a ‘nominal’ PSF applied as well; while the ‘raw’ corrected data (Figure 10) is at higher resolution, which is necessary to resolve the spectral line, this over-resolution results in some noise-induced ringing and other ripples in the SPICE data. This is resolved in this figure by returning the image to SPICE pixel scale plus a ‘nominal’ PSF. The original IRIS line width is recovered, while the elongation and tilt of the SPICE PSF is removed.

More importantly, the PSF correction does remove the Doppler artifacts, both in the degraded then corrected IRIS data and in the SPICE data. This is shown in Figure 12. This figure has the degraded then corrected IRIS Doppler on left, the degraded IRIS Doppler in center, and the corrected SPICE on right (for original IRIS and SPICE of this data, see Figure 3). The degraded then corrected IRIS is essentially identical to the original (plus binned down) IRIS data, and the SPICE is quite similar to the IRIS. The artifacts previously seen at the circled locations are no longer present. There is some extra coarseness in the SPICE data, due to noise. There are also some artifacts in low signal regions which are likely due to a combination of noise and the interpolation applied to the SPICE L2 data, which we have been using. The interpolation can be mitigated by use of a an intermediate data product (with dark correction and flat fielding but no interpolation), but the low noise limit can’t be – it results in a loss of information that can’t be recovered.

Refer to caption
Figure 12: Corrected Doppler shifts for both the degraded IRIS data and the SPICE data. Top left panel (a) shows the binned down IRIS data top center (b) shows original SPICE for comparison. The degraded, then corrected IRIS Doppler is shown at lower left (c), and is essentially identical to the original (with down-binning) IRIS data, which demonstrates that the correction is formally sound. The degraded, noise added, then corrected IRIS data is shown at lower center (d). Finally, the corrected SPICE data is shown at lower right (e), and looks very similar to the degraded with noise added IRIS data. while the corrected SPICE Doppler looks very similar to the corrected IRIS and unlike the original SPICE data (for the degraded IRIS data, without added noise, and original SPICE data see Figure 3). This demonstrates that the correction also works on the real SPICE data.

4.1.1 Correction applied to second region

Last, we show correction of a second part of the coordinated IRIS and SPICE observing campaign. This region is more quiet sun, with a couple of isolated bright features (The mean and brightest features are both about a factor of 4 dimmer in this region than in the first one). Removal of artifacts from these features is another good test of the correction of the PSF. A context image for these observations is shown in Figure 13, while Doppler images for the region are shown in Figure 14. The correction removes almost all the artifacts and results in a Doppler image similar to the IRIS data, although somewhat less so than before. A small relatively bright region (circled in blue) in the upper left of the region appears to still have some strong Doppler signals that are not present in IRIS, although they are reduced in magnitude. However, this region has a highly complex spectral structure and varies rapidly spatially and temporally in IRIS, so a close match between SPICE and IRIS isn’t expected here. The corrected ‘synthetic’ SPICE (IRIS degraded with noise added) do not show this artifact, so it would not seem to be an issue with the correction method itself. Nevertheless, it appears as if the ‘corrected’ SPICE data may not be fully corrected in that location. Other differences can be attributed to the lower signal in the region and possibly also to more dissimilarities between the region as seen by IRIS vs. SPICE (the intensities appear more different than in the previous region). We have also had to increase the rotation angle of the PSF from 1515^{\circ} to 2020^{\circ} to best remove the artifacts; the rotation angle does appear to change across the field (we tried a variety of PSF rotation angles for both region, and the ones which best reduced the Doppler artifacts are shown). The correction can account for per-pixel and/or field-wide variation in the PSF, however; it is just a (perhaps not so simple) matter of quantifying that variation.

Refer to caption
Figure 13: Context image (a) of the SPICE-IRIS coordinated observation data for the second region considered. This is made from one of the full-size SPICE rasters; It is a spectral sum over the C III 977 Å window. Detailed images of the line fit amplitudes in the region are shown at right (IRIS at top right, b, SPICE at lower right, c). Doppler fits are shown in Figure 14.
Refer to caption
Figure 14: Doppler shifts for a second region (see Figure 13 for context) of the coordinated SPICE and IRIS observations. IRIS is shown at left (a). SPICE is shown at center (b), corrected SPICE is shown at right (c). This region has lower signal than the previous one, and a small highly complex region (blue circle at top left of each image) that shows a strong, likely artifact, feature in SPICE but not in IRIS. Generally the correction removes the artifacts although the agreement with IRIS is less strong than in the previous region (Figure 12). See text for further discussion.

5 Conclusions

We have shown the presence of Doppler artifacts in the SPICE data and demonstrated that their likely cause is an elongated and rotated effective (i.e., yλy-\lambda) PSF. We have further demonstrated a novel method for correcting these artifacts, based on representing the forward transformation as a sparse matrix and then performing a regularized inversion of this matrix with a method based on χ2\chi^{2} minimization with L2L^{2} norm and positivity constraint.

The correction methods so described appears to work well. It reproduces the IRIS doppler shifts very well when applied to ‘synthetic’ data (IRIS data with SPICE-like PSF and pixelization applied), and quantitatively in most places when applied to real SPICE data. There are some regions where the SNR is too low to correct the PSF and the reconstruction fails for that reason. There are fundamental information limitations to the ability to recover a high-resolution source from a blurred signal, but they do not appear to preclude correction of the Doppler artifacts and restoration of SPICE’s nominal effective PSF. Other issues which presently affect the reconstruction include interpolation of the L2 data and uncertainty in the SPICE PSF, which we hope to rectify using modified data products and further coordinated observations with IRIS and Hinode EIS.

It is also interesting in its applicability to a variety of other problems. The positivity constraint and regularization affords a degree of super-resolution capability, especially when the data being inverted are high-contrast, and so may also be useful for improving the sharpness of high-resolution imagery; unlike many sharpening methods, this method returns a true improved resolution version of its source, maintaining photometry, because its inversion remains consistent with the forward problem and original data. It should also be capable of inverting data from multiple instruments simultaneously, even those with differing resolutions. We may investigate reapplying the method to the DEM problem, for example for doing DEMs using data from AIA and Hinode XRT (Golub et al., 2007) simultaneously. Plowman (2021) applies a similar method to 3D reconstruction of the corona, demonstrating its flexibility.

The corrections shown here were all done on a laptop computer with a 2.6 GHz 6 core Intel Core i7. Although the results shown have been reduced size, we have also carried out correction of full resolution data, on the same laptop. These took 2\sim 2 hours, considerably less than the average acquisition rate of SPICE data set as a whole. Therefore, the CPU load is easily within the capacity of a central server to reprocess the data, or of individual users to reprocess it on their own. Currently, the codebase has been provided to other members of the SPICE team for beta testing. Once this is finished, the code will be made publicly available. In the meantime, will be provided on request, pending approval of the SPICE team. The code are all written in Python, making use of Numpy (Harris et al., 2020), Astropy (Astropy Collaboration et al., 2013b, 2018b), SciPy (Virtanen et al., 2020b), and optionally SunPy (The SunPy Community et al., 2020b).

Acknowledgements.
This work was supported by NASA under Goddard Space Flight Center subcontract # 80GSFC20C0053 to Southwest Research Institute.

References

  • Astropy Collaboration et al. (2013a) Astropy Collaboration, Robitaille, T. P., Tollerud, E. J., et al. 2013a, A&A, 558, A33, doi: \hrefhttp://doi.org/10.1051/0004-6361/201322068\nolinkurl10.1051/0004-6361/201322068
  • Astropy Collaboration et al. (2013b) —. 2013b, A&A, 558, A33, doi: \hrefhttp://doi.org/10.1051/0004-6361/201322068\nolinkurl10.1051/0004-6361/201322068
  • Astropy Collaboration et al. (2018a) Astropy Collaboration, Price-Whelan, A. M., Sipőcz, B. M., et al. 2018a, AJ, 156, 123, doi: \hrefhttp://doi.org/10.3847/1538-3881/aabc4f\nolinkurl10.3847/1538-3881/aabc4f
  • Astropy Collaboration et al. (2018b) —. 2018b, AJ, 156, 123, doi: \hrefhttp://doi.org/10.3847/1538-3881/aabc4f\nolinkurl10.3847/1538-3881/aabc4f
  • Baker et al. (2005) Baker, A. H., Jessup, E. R., & Manteuffel, T. 2005, SIAM Journal on Matrix Analysis and Applications, 26, 962, doi: \hrefhttp://doi.org/10.1137/S0895479803422014\nolinkurl10.1137/S0895479803422014
  • Culhane et al. (2007) Culhane, J. L., Harra, L. K., James, A. M., et al. 2007, Sol. Phys., 243, 19, doi: \hrefhttp://doi.org/10.1007/s01007-007-0293-1\nolinkurl10.1007/s01007-007-0293-1
  • De Pontieu et al. (2014) De Pontieu, B., Title, A. M., Lemen, J. R., et al. 2014, Sol. Phys., 289, 2733, doi: \hrefhttp://doi.org/10.1007/s11207-014-0485-y\nolinkurl10.1007/s11207-014-0485-y
  • García Marirrodriga et al. (2021) García Marirrodriga, C., Pacros, A., Strandmoe, S., et al. 2021, A&A, 646, A121, doi: \hrefhttp://doi.org/10.1051/0004-6361/202038519\nolinkurl10.1051/0004-6361/202038519
  • Golub et al. (2007) Golub, L., Deluca, E., Austin, G., et al. 2007, Sol. Phys., 243, 63, doi: \hrefhttp://doi.org/10.1007/s11207-007-0182-1\nolinkurl10.1007/s11207-007-0182-1
  • Harris et al. (2020) Harris, C. R., Millman, K. J., van der Walt, S. J., et al. 2020, Nature, 585, 357, doi: \hrefhttp://doi.org/10.1038/s41586-020-2649-2\nolinkurl10.1038/s41586-020-2649-2
  • Lin et al. (2002) Lin, R. P., Dennis, B. R., Hurford, G. J., et al. 2002, Sol. Phys., 210, 3, doi: \hrefhttp://doi.org/10.1023/A:1022428818870\nolinkurl10.1023/A:1022428818870
  • Peter et al. (2006) Peter, H., Gudiksen, B. V., & Nordlund, Å. 2006, ApJ, 638, 1086, doi: \hrefhttp://doi.org/10.1086/499117\nolinkurl10.1086/499117
  • Plowman (2021) Plowman, J. 2021, arXiv e-prints, arXiv:2103.02028. \hrefhttps://arxiv.org/abs/2103.02028\nolinkurlhttps://arxiv.org/abs/2103.02028
  • Plowman & Caspi (2020) Plowman, J., & Caspi, A. 2020, ApJ, 905, 17, doi: \hrefhttp://doi.org/10.3847/1538-4357/abc260\nolinkurl10.3847/1538-4357/abc260
  • Poduval et al. (2013) Poduval, B., DeForest, C. E., Schmelz, J. T., & Pathak, S. 2013, ApJ, 765, 144, doi: \hrefhttp://doi.org/10.1088/0004-637X/765/2/144\nolinkurl10.1088/0004-637X/765/2/144
  • Press et al. (2002) Press, W., Teukolsky, S., Vetterling, W., & Flannery, B. 2002, Numerical recipes in C: the art of scientific computing (Cambridge University Press)
  • Spice Consortium et al. (2020) Spice Consortium, Anderson, M., Appourchaux, T., et al. 2020, A&A, 642, A14, doi: \hrefhttp://doi.org/10.1051/0004-6361/201935574\nolinkurl10.1051/0004-6361/201935574
  • The SunPy Community et al. (2020a) The SunPy Community, Barnes, W. T., Bobra, M. G., et al. 2020a, The Astrophysical Journal, 890, 68, doi: \hrefhttp://doi.org/10.3847/1538-4357/ab4f7a\nolinkurl10.3847/1538-4357/ab4f7a
  • The SunPy Community et al. (2020b) —. 2020b, The Astrophysical Journal, 890, 68, doi: \hrefhttp://doi.org/10.3847/1538-4357/ab4f7a\nolinkurl10.3847/1538-4357/ab4f7a
  • Ugarte-Urra (2016) Ugarte-Urra, I. 2016. https://sohoftp.nascom.nasa.gov/solarsoft/hinode/eis/doc/eis_notes/08_COMA/eis_swnote_08.pdf
  • van der Vorst (1992) van der Vorst, H. A. 1992, SIAM Journal on Scientific and Statistical Computing, 13, 631, doi: \hrefhttp://doi.org/10.1137/0913035\nolinkurl10.1137/0913035
  • Virtanen et al. (2020a) Virtanen, P., Gommers, R., Oliphant, T. E., et al. 2020a, Nature Methods, 17, 261, doi: \hrefhttp://doi.org/10.1038/s41592-019-0686-2\nolinkurl10.1038/s41592-019-0686-2
  • Virtanen et al. (2020b) —. 2020b, Nature Methods, 17, 261, doi: \hrefhttp://doi.org/10.1038/s41592-019-0686-2\nolinkurl10.1038/s41592-019-0686-2
  • Young et al. (2012) Young, P. R., O’Dwyer, B., & Mason, H. E. 2012, ApJ, 744, 14, doi: \hrefhttp://doi.org/10.1088/0004-637X/744/1/14\nolinkurl10.1088/0004-637X/744/1/14