Data reduction pipeline for MOF-based synoptic telescopes

There are strong scientific cases and practical reasons for building ground-based solar synoptic telescopes. Some issues, like the study of solar dynamics and the forecasting of solar flares, benefit from the 3D reconstruction of the Sun’s atmosphere and magnetic field. Others, like the monitoring and prediction of space weather, require full disk observations, at the proper sampling rate, combining H-alpha images and Doppler velocity and magnetic field. The synoptic telescopes based on Magneto Optical Filters (MOF) using different lines are capable of measuring the line-of-sight Doppler velocity and magnetic field over the full solar disk at different ranges of height in the Sun’s photosphere and low chromosphere. Instruments like the MOTH (Magneto-Optical filters at Two Heights), using a dual-channel based on MOFs operating at 589.0 nm (Na D2 line) and 769.9 nm (K D1 line), the VAMOS instrument (Velocity And Magnetic Observations of the Sun), operating at 769.9 nm (K D1 line), and the future TSST (Tor Vergata Synoptic Solar Telescope), using a dual-channel telescope operating at 656.28 nm (H-alpha line) and at 769.9 nm (K D1 line), allow to face both aspects, the scientific and the operative related to Space Weather applications. The MOTH, VAMOS and TSST data enable a wide variety of studies of the Sun, from seismic probing of the solar interior (sound speed, rotation, details of the tachocline, sub-surface structure of active regions), to the dynamics and magnetic evolution of the lower part of the solar atmosphere (heating of the solar atmosphere, identification of the signatures of solar eruptive events, atmospheric gravity waves, etc.), to the 3D reconstruction of the solar atmosphere and flare locations. However, the use of MOF filters requires special care in calibrating the data for scientific or operational use. This work presents a systematic pipeline that derives from the decennial use of MOF’s technology. More in detail, the pipeline is based on data reduction procedures tested and validated on MOTH data acquired at Mees Solar Observatory of the University of Hawaii Haleakala Observatories and at South Pole Solar Observatory (SPSO), at the Amundsen-Scott South Pole Station in Antarctica, during Antarctica Summer Campaign 2016/17.


Introduction
Multi-height observations of the Line-of-Sight (LoS) Doppler velocity and magnetic field signals over the full solar disk facilitate a wide range of studies of the Sun. These include the seismic probing of the solar interior through its sound speed (Nagashima et al., 2014;Elsworth et al., 2015), rotation of the deep solar interior, details of the tachocline, sub-surface structure of active regions (Rajaguru et al., 2013), dynamics and magnetic evolution of the lower part of the solar atmosphere (Del Moro et al., 2012;Wiśniewska et al., 2016;Stangalini et al., 2018a) including the heating of the solar atmosphere (Srivastava et al., 2018), identification of the signatures of solar eruptive events (Kumar et al., 2013;Wang et al., 2017), and the measurement of atmospheric gravity waves (Straus et al., 2008;Jefferies et al., 2019). All of these studies provide constraints to the current models describing the evolution of the solar surface and its structures. In addition, multi-height Doppler and magnetic field observations allow the possibility of integrating atmospheric seismology with global and local interior seismology, as well as facilitate the study of the omnipresent Magneto-Acoustic-Gravity (MAG) waves in the solar atmosphere (Vigeesh et al., 2017;Jefferies et al., 2019;Calchetti et al., 2021). Last, these data have relevance to space weather studies, since they may help us to gain a clearer understanding of the whole Sun, and to model the Sun's surface magnetic field, providing a deeper comprehension of explosive events and possibly the capability to forecast them.
Among the various techniques for probing different layers of the solar atmosphere, by Doppler and magnetic imaging, the development of instrumentation based on Magneto-Optical Filters (MOF) has played a key role in enhancing our capabilities (see e.g. Finsterle et al., 2004b;Jefferies et al., 2006Jefferies et al., , 2019. This technology is a valid alternative, at least in the case of small/medium synoptic telescopes, to more expensive and complex spectroscopic technologies such as the Fabry-Pérot interferometer (see e.g. Berrilli et al., 2011;Giovannelli et al., 2012aGiovannelli et al., , b, 2014a. The MOF concept, which is based on the magneto-optical effect (Cimino et al., 1968), was originally presented in Agnelli et al. (1975), and the first Dopplergrams of the Sun using a sodium (Na)-based MOF were obtained shortly after (Cacciani & Fofi, 1978). The latter authors also showed that MOF filters were very stable and provided an absolute and steady zero reference level. A further study using MOF Na cells Cacciani et al. (1990) demonstrated the possibility of simultaneous acquisition of full-disk magnetic and Doppler maps with no magnetic-velocity cross-talk.
An early example of a MOF-based instrument using potassium was an Instrument to Observe Low-Degree Solar Oscillations (LOWL) (Tomczyk et al., 1995). The authors provided an useful overview of possible technical constraints such as non-ideal MOF properties, thermal control, and noise sources. A similar observation of solar global oscillations was performed using a MOF-based instrument and sunlight reflected from the Moon, to reduce Earth atmosphere noise (Fussell et al., 1995). Another MOF-based instrument using potassium (K) is the VAMOS (Velocity And Magnetic Observations of the Sun), operating with the K D 1 line, developed at Osservatorio Astronomico di Capodimonte, Napoli (Italy), whose results and pipeline are presented in a series of papers by Cacciani et al. (1997), Moretti et al. (1997), Oliviero et al. (1998a, b), Vogt et al. (1999), Oliviero et al. (2011). In the framework of mutual collaboration between the Universities of Rome Tor Vergata and L'Aquila and the Osservatorio Astronomico di Capodimonte, the project of the TSST (Tor Vergata Synoptic Solar Telescope) has been started, a new synoptic telescope composed by two full-disk channelsan H-Alpha SR-127 0.4 A Daystar telescope and a MOF operating at 769.9 nm (K D 1 ) Viavattene et al., 2020;Giovannelli et al., 2020). More recently, Stangalini et al. (2018b) presented the SAMM (Solar Activity MOF Monitor) project.
An important application of MOFs is the multi-height telescope MOTH (Magneto-Optical filters at Two Heights, which consists of two telescopes of which one is equipped with a MOF operating at 589.0 nm (Na D 2 ) and the other one at 769.9 nm (K D 1 ). This instrument, described in the next Section, is used to test and validate the implemented calibration pipeline.
In addition to the ground-based experiments, MOF-based telescopes have also been considered for use as a piggyback instrument on larger solar missions. For example, DIMMI-2H (Moretti et al., 2010;Stangalini et al., 2011) was proposed as a double channel MOF imager candidate as an optional payload for the ASI space mission ADAHELI  and ESA proposal ADAHELI-PLUS (Greco et al., 2010;Berrilli et al., 2015).

The MOTH as a prototype of MOF-based telescope
The second generation of the MOTH instrumentation consists of two independent instrument boxes, one for observations in the D1 line of K at 769.9 nm and one for observations in the D2 line of Na at 589.0 nm. The optical and mechanical components in both boxes (channels) are identical, apart from the vapor cells, the quarter-and half-wave retarders, the custom dielectric coatings and the interference filters centered on the K or Na lines and of 1 nm and 0.5 nm FWHM, respectively. For this reason, in the following we will describe just one channel ( Fig. 1), showing a simplified optical scheme.
The spectropolarimetric response of the instrument (Tomczyk et al., 1995;Finsterle et al., 2004a) can be divided in three main sections: a polarization analyzer, a filter section, and a wing selector, highlighted with different colors in Figure 1.

The polarization analyzer section
The polarization analyzer section (outlined in red in Fig. 1) allows the selection of the two polarization states of the incoming solar light, necessary for the solar magnetic field observations. As a matter of fact, regions with magnetic field manifests an excess in the right-or left-handed circular polarization due to the LoS component of the magnetic field. The polarization analyzer section consists of a quarter-wave plate (k/4) and a polarization rotator (k/2). The quarter-wave plate introduces a retardance of 1/4 wave (or 90°) between the two components of the incoming light. As they emerge from the quarter-wave plate, the right and left circularly polarized components are transformed to linearly polarized components. These two perpendicular components have their polarization axis at +45°and À45°with respect to the k/4 plate axis.
They then pass through the polarization rotator: a half-wave retarder whose optical axis oscillates between 0°and 45°with respect to the quarter-wave plate axis. Switching this angle allows us to select which component of the polarized light passes through the magneto-optical filter. In fact, the linearly polarized light entering the polarization rotator along its axis, which forms the 45°angle with the k/4 axis, i.e. the initially right circularly polarized light, is rotated by 0°and then passes through to the entrance linear polarizer of the filter section (P1 in Fig. 1, whose axis is also at 45°with the k/4 axis). The other component, i.e. the initially left circularly polarized light, is stopped because it hits P1 as linearly polarized at 90°with respect to its axis.
Light going through the polarization rotator at 45°, that is when its axis is at 0°with respect to the k/4 axis, is rotated by 90°so that left and right components are changed with respect to each to other. Now, the left circularly polarized light passes through P1, while the right polarized light is stopped.

The filter section
The filter section (outlined in blue in Fig. 1) is composed by a (MOF) cell (Agnelli et al., 1975, Cacciani & Fofi, 1978 placed in between two crossed linear polarizers, P1 and P2, and embedded in a longitudinal magnetic field. The incoming light enters through the first linear polarizer P1, which is oriented to have its polarization axis forming a 45°angle with the first k/4 retarder axis. The light then passes through the first vapor cell and exits through the second linear polarizer P2, which has its transmission axis perpendicular to the first one and cuts off all the spectrum except for those wavelength where the polarization has been modified. This polarization change, due to the inverse Zeeman effect and the Faraday rotation inside the vapor cell, only takes place in a narrow pass-band on either side of the resonance line. The resulting transmission profile consists of two narrow peaks located on both sides of the corresponding absorption line, as shown in Figure 2. The separation between those peaks depends on the strength of the magnetic field and on the vapor density (set by the temperature of the cell).

The Wing Selector
The Wing Selector (WS) section (outlined in green in Fig. 1) consists of a second vapor cell, a quarter-wave retarder, and a PBS (polarizing beamsplitter). Its function is to split the beam into blue and red wings, diverting the light onto two separate paths. The same process as in the MOF cell, for inverse Zeeman effect, converts the linearly polarized light into circularly polarized light in opposite wings of the line and encodes the wavelength information into the circular polarization state: radiation in the blue wing is left-handed circularly polarized, radiation in the the red wing is right-handed circularly polarized. The quarter wave plate located after the WS converts circular polarizations into two orthogonal linear polarizations.
The final PBS performs the optical separation of the blue and red beams into the two cameras. The only difference between the two images is the reflection introduced by the PBS.
The optical path includes a hot mirror, a UV filter, and a narrowband interference filter to reduce the amount of heat inside the telescope, unwanted light and to select the narrow bandwidth around the MOF spectral passbands.
The set-up described allows the simultaneous acquisition of full disk solar images in the red and blue wings of Na or K absorption lines (Fig. 2). By operating the polarization analyzer, each image can be acquired in the right (r + ) or left (r À ) handed circular polarization of the incoming solar light. This results in the four image set shown in Figure 3 (as explained also in Cacciani et al., 1990) that can be used to compute full disk Dopplergrams and magnetograms of the solar atmosphere. All MOTH raw images (Level 0) are formatted into a data-cube I j (t), where t is the acquisition time, and j represents one of the four components of the image: Rr + , Rr À , Br + , Br À . Fig. 1. MOTH simplified optical scheme of one single channel. The polarization rotator k/2 is shown at 45°with respect to the k/4 retarder. The hot mirror, the UV filter and the narrowband interference filter, necessary to reduce the heat load on optical systems and to select the narrow bandwidth around the MOF spectral passbands, are present in the optical path but they are not shown in the figure. In this scheme we show CCD cameras, however, the latest version of the MOTH is equipped with CMOS cameras as discussed in Section 6.  3 The data reduction pipeline The MOTH data reduction pipeline is a MATLAB Ò software suite that automatically processes the Level 0 spectral images acquired by the four cameras. The pipeline makes use of ancillary data: dark frames, flat field frames (FF j ) and leakage frames (L j ). The pipeline has been designed and tailored to the MOTH instrument, to calibrate the data to match the scientific requirements of high sensitivity, stability and spatial resolution. It is worth noting that, apart from some modules specific to the MOTH implementation, the following procedure describes the common calibration needs and solutions of any MOF-based instrument.
The data reduction pipeline (see the overview in Fig. 4) is designed to accomplish four major calibration functions: (1) standard dark subtraction (SDS) and flat field correction (FFC); (2) corrections for atmospheric extinction and orbital trend (STOC); (3) leakage correction (LC), based on a distinct series of frames, acquired with the MOF filter turned off, necessary to correct for the parasitic light leaking through the non-ideal crossed polarizers; (4) rotation, resizing, alignment and cropping of the images acquired by the four CMOS cameras into a coherent final dataset. These procedures generate Level 1 data, i.e., data corrected for detector dark signal, atmospheric extinction, orbital trend and signal leakage, and Level 2 data, i.e., rotated, resized, and co-aligned K and Na blue and red images in the r + and r À states. Following along the procedure hierarchy, Level 2 images are properly combined to produce Level 3 scientific data (i.e., LoS magnetograms and Dopplergrams).

The calibration processing description
The Na and K data-cubes are calibrated separately applying the same data calibration pipeline. The first calibration task is the data quality control and system health check.
For the data quality control, the check consists of temporal data consistency, i.e., the presence of simultaneous images acquired on the K and Na blue and red images in the r þ and r À states, and a quick image statistical analysis to detect possible saturated pixels and verify image contrast. The system health check consists of the thermal control of subsystems Fig. 4. Overview of the Data Reduction Pipeline. The data reduction pipeline for the MOF-based synoptic telescopes consists of three modules, which, respectively: subtract the dark; compute and correct for the flat field frame FF c j . evaluate and correct for the atmospheric extinction and the orbital trend; compute and subtract the leak calibration frame L c j ; The registration module consists of other three modules,which, respectively: compute and apply the polarization registration (r + ,r À ), compute and apply the wings registration (B,R), compute and apply the channels registration (K, Na). The final module computes the K and Na line-of-sight magnetogram (B Ã LOS ) and Dopplergram (V Ã LOS ) synoptic maps.
R. Forte et al.: J. Space Weather Space Clim. 2020, 10, 63 performance, i.e. MOF operative temperatures and thermal drifts in the MOTH assembly aimed at maintaining working temperature requirements.
A graphical interface provides a simple visualization for inspecting systems performances and main data-cubes parameters. The same interface allows the visualization of the R and B scientific image profiles, whose shapes carry information about the status of the MOF cells, as mentioned in Magrì et al. (2005Magrì et al. ( , 2006Magrì et al. ( , 2008.

Standard dark subtraction and flat field correction
Dark images are usually acquired before and after a science run for the four components of the dataset: Rr + , Rr À , Br + , Br À . The first correction is the removal of the dark signal in Level 0 (SDS) data. This is because the dark signal is additive. The flat field images are acquired using a slab in front of the telescope and by moving the solar image randomly, if possible by means of a fast steering mirror with the telescope pointing at the Sun.
The first step of FFC is to compute the average flat field FF j by averaging all the acquired flat field images FF j . Then FF j is divided by a smoothed version of itself (convolution with a 4-pixel r Gaussian) to obtain FF c j . This sets the average value of FF c j to unity, and cancels out any large-scale inhomogeneity, such as a residual signature of the solar disk. Instead, the high frequency inhomogeneities and Pixel Response Non Uniformity are represented in FF c j and removed in the standard way: This procedure introduces some artifacts very close to the solar limb, thus slightly reducing the useful part of the solar disk in calibrated images. To cope with this effect, the outermost 10% region of the solar disk on FF c j is set to unity and it is not considered in the calibrated images.

Atmospheric extinction and orbital trend correction
A variable neutral extinction, due to changing airmass or thin clouds during the observation run, modifies the average intensity of the solar images. To correct for this effect we compute the time-dependent value I TOT (t) averaging the simultaneous four solar images (Rr + , Rr À , Br + , Br À ) over the whole observing time.
A typical example of I TOT (t) during a '5 h long observation run is shown in Figure 5. We remove the sky transparency variability by re-scaling the average intensity of each image set to the daily maximum value of I TOT (t). This procedure is necessary in order to correctly remove leakage effects (see Sect. 3.1.3). It's worth noting that this correction may affect the amplitudes of the lowest degree solar oscillation modes, therefore it should be skipped or taken into account for specific scientific applications (e.g., internal gravity waves detection; Finsterle et al., 2004a).
Earth's orbit and rotation change the line-of-sight velocity during the observing runs. This effect changes the sampled spectral points of observed lines and consequently introduces a spurious trend in the intensity values of the single spectral images. This effect is corrected by subtracting from the four intensity signals the corresponding first degree polynomial fit. This effect can be used for absolute velocity calibration, while the trend correction procedure can be eliminated when only relative changes in velocity are to be studied. It is worth noting that in the measured components of the image (Rr + , Rr À , Br + , Br À ), from the experimental MOTH setup when operating under nominal conditions, i.e., without temperature drift, this orbital velocity contribution is reversed in the B and R images. Therefore, the two pairs of curves for r + and r À show a symmetrical behavior and the correction does not affect the total frame intensity value. If this is the case, the STOC procedure does not affect the total frame intensity value which remain set by the sky transparency calibration.

Leakage correction
Among the working hypotheses of MOF-based instruments is that two crossed polarizers will block all the incoming intensity in the pass-band of the narrowband interference filter. Since the polarizers are not ideal, some unwanted signal leaks through the crossed polarizers and is added to the in-band signal. This spurious out-of-band signal is pixelwise proportional to the incoming solar intensity and, consequently, it depends on atmospheric extinction, if not properly corrected, and time, due to solar rotation and solar feature evolution. As a consequence, the LC module is more complex than the previous ones, since the leakage component on any spectral image can be considered the result of two components: 1. A large scale component, whose shape does not evolve in time, since it is related to the properties of the polarizers. The average value of this component is proportional to the incoming signal intensity and therefore evolves during the observation run; 2. A small scale component associated to the solar surface features (e.g., sunspots, plages, etc.) which evolve with the characteristic times of the solar activity and change position on the solar disk due to the differential rotation.
An experimental strategy to measure the leakage signal is acquiring a series of solar images with the MOF cell turned off, while the WS cell is on. With this experimental setup the signal is limited by the spectral passband due to the filters at the entrance of the instrument. Clearly, the above strategy is not able to take into account the possible presence and evolution of solar surface features. Therefore, the LC procedure is divided in two steps: i) evaluate the large scale component of the leakage contribution; ii) identify in each raw image the small scale components due to the solar features. Both these aspects have to be combined to subtract the correct leakage from spectral images.
In order to accomplish the first step we use the L j frames to compute L j and smooth it with a 3-pixel FWHM Gaussian on a 20 Â 20 pixels kernel. A two-dimensional fifth-degree polynomial surface fit is then applied on the smoothed L j to produce a L c j image. This procedure is very effective in filtering out the possible small scale contribution and retaining only the large scale component. The result of the fitting, L c j is the large scale correction frame which has to be subtracted from the spectral intensity images (we remark that all images have the same average intensity after correction for the sky transparency variations).
The second step requires the computation of a time dependent weighting mask W j (t) which has to be applied pixelwise to L c j . To compute the W j (t) a center-to-limb variation (CLV) is calculated by using a bi-dimensional cubic polynomial fit performed on the inner 90% of the solar disk. Figure 6 shows the different steps of the fitting and removal of the CLV. More in detail, the ratio between the observed intensity values and the CLV is reported in the right panel of Figure 6. The ratio values outside the fitted region are set to unity. In this ratio, the sunspots are clearly marked by values in the range [0,~0.9]. The corresponding ratio image is therefore suitable for the identification of the different solar intensity structures (e.g., sunspots).
In order to unambiguously separate the sunspots and the other solar features contributions (image segmentation) we apply the Otsu transform (Otsu, 1979) on the various ratio images. The Otsu multilevel image threshold method selects a number N of intensity optimum thresholds based on the intensity histogram of the studied image.
In detail, before calculating the Otsu transform we apply an adaptive local noise reduction filter to the ratio image. The noise reduction filter uses a 0.5 pixel-r Gaussian on a 5 Â 5 pixels kernel. Figure 7 shows an example of ratio image and thresholded pixels along a disk profile, as derived from the Otsu transform, resulting in N = 6 thresholds. We use them to identify solar intensity structures as follows: umbra (below the 3rd threshold),  R. Forte et al.: J. Space Weather Space Clim. 2020, 10, 63 penumbra (between the 3rd and the 4th thresholds), quiet (between the 4th and 6th thresholds), and plage (over the 6th threshold).
We may now proceed to define the weighting mask W j (t): 1. All the pixels in W j (t) whose intensity values are smaller than the 1st threshold are set to the ratio between the 1st and the 6th thresholds. 2. All the pixels in W j (t) whose intensity values are between the 1st and the 3rd thresholds, are set to the ratio between the 3st and the 6th thresholds. 3. All the remaining pixels are set to unity.
Last, W j (t) is smoothed by a 2 pixel-r Gaussian filter on a 5 Â 5 pixels kernel. Figure 8 shows the whole W j (t) creation procedure applied to a typical solar active region. In general, W j (t) values are equal to one everywhere, except in sunspots. The leak signal can be removed from each scientific image I j (t) according to: A sample image of L j , L c j and W j (t) obtained for a single component k for the K-channel is shown in Figure 9.

Registration
The registration procedure of the pipeline regards the automatic shift, rotation, flip and scaling of acquired images. As reported in Figure 4 the registration can be divided in three modules: i) registration of r À to the r + polarized images; ii) registration of the blue (B) to the red (R) wing images; iii) registration of the K channel to the Na channel images.
The following sections describe the different registration algorithms.

Registration of r À and r + images
A shift between the r + and r À images is introduced by the polarization rotator; for the MOTH instrument, this shift has been measured to be smaller than one pixel. The sub-pixel registration between simultaneous r + and r À images is achieved via a least-mean-square method. In more detail, we select a 20 pixels wide annular region around the solar limb and compute the merit function: where x and y are the pixel position (within the annular region), dx and dy are the sub-pixel shifts (varying in the range [À1, 1] with a 0.1 pixel step), I ff j þ and I ff j À are the r + and r À calibrated images, and the I ff j À ðx þ dx; y þ dyÞ values are obtained via linear interpolation.
The dx, dy shifts, that minimize v 2 j ðdx; dyÞ, are applied to register the r À image with respect to the r + . This procedure is applied separately on the two couples of simultaneous images, (Rr À , Rr + ) and (Br À , Br + ), because the shifts may be different in the two wavelengths. Usually, this procedure is applied to a few images and then extended to the whole sample.

Registration of B wing to R wing images
The R and B wing images are acquired on different CCD cameras, so the corresponding images are in principle shifted, rotated and scaled. This registration is necessary to stack the images in order to calculate Level 3 scientific images (see Fig. 4).
As a first step to register the B and R images, we flip the B images, to compensate for the presence of the polarizing beam splitter (PBS). Then we apply the FFT-based registration procedure by Reddy & Chatterji (1996) that uses the Fourier-Mellin transform to compute the geometric transformation matrix T :  However, the Fourier-Mellin transform usually does not achieve sub-pixel accuracy in the shift registration of the images. Therefore, we are forced to consider a further sub-pixel registration of dx, dy shifts similar to the registration described in Section 3.1.5. This procedure is applied to a sub-sample of images, distant in time in the dataset, to check for possible misalignment of the two telescopes during the acquisition of the dataset, and correct it accordingly.

Registration of the K channel to the Na channel images
The last registration algorithm applies to K and Na images. The K and Na optical channels of MOTH II present the same optical scheme and very similar telescopes mounted on the same equatorial plank. However, the acquired solar images present a different scale, orientation and relative shifts. Moreover, since the K and Na solar images refer to different layers of solar atmosphere and consequently present different magnetic structures, we cannot simply apply the Fourier-Mellin transform. The following part of this section provides a general overview describing the different steps of our registration strategy.
At the beginning, the position of the solar disk center and the solar disk diameter are calculated in K and Na images, respectively. The center of the disk is computed using an iterative procedure that evaluates the gradient of horizontal and vertical profiles of one of the four components of the intensity images. The same algorithm returns the diameter of the solar disk. The procedure computes the shifts and scaling between the two channels; the correction is then applied to the whole dataset after checking the consistency of the retrieved values at different times. The next step is to correct for the relative rotation angle a between the two channels; this is accomplished in two phases.  The first approximation a 0 is estimated via the Fourier-Mellin transform applied to the central part of Na and K images. The a estimate is then refined by minimizing the merit function: where H a is an operator that rotates I K by means of a nearest neighbor interpolation of the angle a in the range [a 0 -3°, a 0 + 3°] with 0.1°steps, where the adopted value is derived from an extended analysis of different MOTH observing campaigns. The whole K data-set is then rotated around the central pixel of the image (i.e., around the solar disk center) by the value a that minimizes v(a).

Magnetogram and Dopplergram synoptic maps
Once the data-cubes have been thoroughly calibrated and registered, it is possible to use the images to compute Level 3 scientific images (see Fig. 4), i.e., the solar K and Na Lineof-Sight (LOS) magnetogram (B Ã LOS ) and Dopplergram (V Ã LOS ) synoptic maps. The maps are calculated using the formulas (Cacciani et al., 1990): The B Ã LOS and V Ã LOS obtained with Equations (5) and (6) are proportional to the real solar B LOS and V LOS maps. The relative calibration factors can be computed with the procedure explained in Oliviero et al. (2010).
Samples of B Ã LOS magnetogram and V Ã LOS Dopplergram synoptic maps acquired with the MOTH instrument and computed with the data reduction pipeline are shown in Figure 10. We expect to reach the sensitivity of about 7 m/s for the line-of-sight velocity and of about 5 G for the magnetic fields, from 5-s integration time MOTH II images.

Antarctica summer campaign 2016/17
In this section we present the data set acquired during the MOTH Antarctica summer campaign 2016/17 at the South Pole Solar Observatory (SPSO). The SPSO was 4 kilometers away from the United States Amundsen-Scott South Pole Station in Antarctica.
We focus our analysis on the flaring AR12628 and the nonflaring AR12627 regions observed continuously for 6 h (07:00-13:00 UT) on January 21, 2017. During this run we reported for AR12628 multiple flare events. The first one was a C9 class flare at 07:14, after that a couple of C1 class flares  R. Forte et al.: J. Space Weather Space Clim. 2020, 10, 63 at 09:40 and at 10:19, respectively, and finally a C6 class flare at 10:59. In particular, the analysis was carried out in a region of interest, delimited by the red box in in Figure 11, which contains the two active regions.
For the multi-heights analysis we considered three heights above the photosphere of the Sun: the SDO/HMI instrument (Scherrer et al., 2012) uses the Fe I 617.3 nm line to sample the lower photosphere, while the MOTH instruments use the Na D 2 589.0 nm and K D 1 769.9 nm lines to sample the upper photosphere/lower chromosphere layer of the solar atmosphere. The ranges of formation heights for the three lines are: 140-180 km, 300-400 km, and 600-700 km, respectively (Jefferies et al., 2019). Being the original cadence of the MOTH equal to 5 s, we reduced the cadence of the MOTH to match the HMI cadence and have simultaneous time frames.
The power maps of the region of interest are obtained computing the power for each pixel on a 1-hour time window and then summing the maps for all the considered windows. The results are shown in Figure 12. Even if the HMI and MOTH data have the same pixels scale, it is clear that the MOTH maps have lower resolution with respect to HMI.
As expected, the maps at 7 mHz show a strong enhancement around the active regions in HMI and a region of suppressed power around it which corresponds to an increase in power in the sodium channel (Jefferies et al., 2019). This typical behaviour around active regions has been explained by Rijs et al. (2015) as downward travelling fast waves. Power maps in the potassium channel do not show any significant features at frequencies higher than 5 mHz and this reflects the low resolution of the instrument due to poor atmospheric conditions during the observation (clearly visible in the MOTH power spectra in Fig. 12). The same results can be obtained reducing the HMI maps to the MOTH resolution and computing the power map of this data cube.

Conclusions and future plans
The first complete version of the data reduction pipeline for a multi-channel MOF-based synoptic telescope, e.g., the MOTH instrument, has been released. The release includes the calibration and reduction software, as well as a graphic interface to reduce and display the data and interactively explore the MOTH status, the data log and scientific images.
The MOTH has been upgraded in 2016 to a new version, characterized by a new optics design and CMOS camera sensors of 3072 Â 3080 pixels, for a final 1.46 arc-seconds spatial resolution. This instrument has been deployed to the South Pole Solar Observatory (SPSO) for two observation campaigns (November 2016-January 2017 and December 2017-January 2018). The goals of the Antarctic project, sponsored by the National Science Foundation's Division of Polar Programs, were to detect and characterize internal gravity waves present in the solar atmosphere, recognize the role of these waves in transporting energy and momentum, and employ the properties of these waves to provide a mapping of the structure and dynamics of the Sun's atmosphere (Rijs et al., 2015).
Two more channels, based on MOF in Ca and He, are being built at Georgia State University in collaboration with the Jet Propulsion Laboratory and the Department of Physics of the University of Rome Tor Vergata. The final suite of this improved version of the MOTH instruments will allow us to Fig. 12. Power maps of the region of interest and diagnostic diagram. Each row corresponds to HMI (top), potassium MOTH channel (center) and sodium MOTH channel (bottom), the column on the right shows the power spectra of the region, whereas the other columns correspond to power maps at 4 mHz (left), 5 mHz (center) and 7 mHz (right). probe the solar atmosphere at four heights in total. When combined with HMI data, which probe the lower photosphere, the MOTH data set will allow us to obtain a 3D reconstruction of the LoS magnetic and velocity fields. A model built by merging all this information will reveal the dynamics of magneto-convection of the Sun with unprecedented temporal and vertical spatial resolutions.
A project for a MOF-based telescope on a stratospheric balloon experiment (SONETTO) has been proposed to Italian Space Agency. The SONETTO experiment is a synoptic imager of the Sun that is capable of delivering high cadence measurements of the magnetic and velocity fields at multiple heights of the solar atmosphere. Moreover, SONETTO is a pathfinder balloon mission that will demonstrate the scientific capability of magneto-optical filter-based Doppler/magnetographs. It will address key issues in preparation for future flight opportunities, such as the JPL developed Solar Atmospheric Imager (SAI)/ Solar Atmospheric Seismology (SAS) 6U-CubeSat missions. This mission puts severe constraints on the mass and volume available for instrumentation, and the ability to employ on-board data reduction and compression to significantly reduce the required data return bandwidth. Key capabilities to be demonstrated with SONETTO include: the capability for magneto-optical filter based instruments to generate high quality, high spatial-resolution data relevant to space weather research; the capability to carry out on-board processing to produce clean Doppler and magnetic images; the capability to apply significant (!10:1) data compression, while maintaining the scientific integrity of the data.
The team involved in the present work is engaged in the project of a network of robotic MOF-based synoptic telescopes deployed across multiple sites. The first nucleus of the network is based on three telescopes located in Europe and the United States. The goal of this network is to supply 24-7 LoS magnetogram and velocity synoptic maps to support the solar physics scientific community and space weather services.
Currently, MOTH data are stored in the SWERTO database (http://swerto.roma2.infn.it/). This database, financed by the Regione Lazio, supports data located at the Physics Department of the University of Rome Tor Vergata, is a Space Weather service, mainly based on data obtained from satellite-borne (e.g., PAMELA, ALTEA) and ground-based (e.g., MOTH) instruments. The service allows a registered user to access scientific data from instrumentation available to the Physics Department researchers, through national and international collaborations, and provides a graphical interface for the selection and visualization of such data.