Many advanced ground-based solar telescopes improve the spatial resolution of observation images using an adaptive optics (AO) system. As any AO correction remains only partial, it is necessary to use post-processing image reconstruction techniques such as speckle masking or shift-and-add (SAA) to reconstruct a high-spatial-resolution image from atmospherically degraded solar images. In the New Vacuum Solar Telescope (NVST), the spatial resolution in solar images is improved by frame selection and SAA. In order to overcome the burden of massive speckle data processing, we investigate the possibility of using the speckle reconstruction program in a real-time application at the telescope site. The code has been written in the C programming language and optimized for parallel processing in a multi-processor environment. We analyze the scalability of the code to identify possible bottlenecks, and we conclude that the presented code is capable of being run in real-time reconstruction applications at NVST and future large aperture solar telescopes if care is taken that the multi-processor environment has low latencies between the computation nodes.
It has been known for a long time that Earth’s atmosphere degrades the spatial resolution of large aperture telescopes to a fraction of their theoretical diffraction limit. Many techniques have been developed since to overcome this limitation of ground-based telescopes, such as real-time correcting solar adaptive optics (AO) systems installed in the optical path of the telescope (Rimmele et al. 2004; Von der L¨uhe et al. 2003; Marino et al. 2010), or post-processing reconstruction techniques like speckle masking (Knox et al. 1974; Weigelt 1977; Wöger et al. 2008) and shift-and-add (SAA) (Liu et al. 1998; Ribak et al. 1988; Hunt et al. 1983; Baba et al. 1999; Sudo et al. 2006).
A 1m New Vacuum Solar Telescope (NVST) has been installed at the Fuxian Solar Observatory (FSO) of the Yunnan observatories. Multi-channel high resolution imaging systems have been installed and are in use at NVST. Over the course of a single day’s observation (lasting several hours), the telescope acquires several terabytes of unreduced data. This image data is processed using two reconstruction methods: speckle masking and SAA. Using an IDL implementa- Corresponding Author: X. B. Li tion, SAA reconstruction of a single day’s data takes at least four days on an IntelCore 3.40 GHz computer. Speckle masking takes even longer. It is obvious that there is a need for real-time - or at least near real-time - processing as the speckle data is observed at high data rates: a single “speckle burst” is normally made up of approximately 100 images observed at a frame rate of around 10 images per second. The rapid development of computer technology, particularly in the field of multi-core processors, makes it possible to reconstruct massive speckle data in real-time on site when postprocessing techniques like speckle masking or SAA are considered for image reconstruction. Some aspects of using post-processing algorithms to reconstruct speckle image in near real-time have already been researched by Denker et al. (2001), Wöger et al. (2008) andWöger et al. (2010).
In this article, we report on a parallelized implementation of frame selection and SAA algorithms. The program was implemented in a multi-processor, multinode environment using the Message Passing Interface (MPI). In Section 2, we present an overview of the implementation. In Section 3, reconstruction results using frame selection and SAA are presented and the scalability of the code with increasing number of computation nodes is analyzed followed by conclusions in Section 4.
The use of MPI to implement code for parallel reconstruction has certain implications for the entire design of a program. In general terms, the root process is responsible for the distribution of the tasks to other processes that perform the actual calculations.
shows the flow diagram of the frame selection and SAA parallel reconstruction. In what follows, we will discuss the individual reconstruction steps in detail.
— The flowchart of the Frame Selection and SAA parallel reconstruction, assuming a burst of 100 images of 1024×1024 pixels.
- 2.1 Preprocessing and Correlation Tracking
In a first step, 100 processes are forked to execute the program in parallel. The root process distributes the average flatfield and darkfield images to other processes, assuming the data prepared for preprocessing. 100 processes read a burst of 100 images from disk, and perform flatfield and darkfield processing respectively, for specifications of dust on the optical components near the focal plane, such as the CCD itself, and dark current from the CCD.
During the correlation tracking, the root processes broadcasts the first preprocessed subimage from a burst of 100 images as the reference image to other processes to compensate for image motion. The processes compute the image shifts using a two-dimensional crosscorrelation algorithm concurrently, and subsequently shift the images. The cross-correlation algorithm can be shown in the following form:
are a reference image and observed image of a burst of 100 images respectively. After the calculations of the cross-correlation between the reference image and observed image at different positions are finished, the position (
) is maximum can be obtained.
- 2.2 Spectral Ratio
In general, the processing of the image is better described in the Fourier domain. Using the following incoherent, space-invariant imaging equation, a speckle burst consisting of N images is obtained
is the two-dimensional spatial frequency.
) represent the Fourier transform of the
observed image and the object respectively. The term
) represents the ith transfer function incorporating aberrations due to both atmosphere and telescope, which is generally a complex function. When solar data is reconstructed, the most common way to estimate the value of Fried’s parameter
is to compute the spectral ratio from the observed data itself. The spectral ratio in two dimensions is defined by Von der Lühe (1984) as
where < · >
represents the average over the N observed subimages that contain information of atmospheric distortion correction. | <
is the power of average short exposure speckle image, whereas < |
is generally referred to as the speckle transfer function (STF). The processes compute the power of
observed subimages, and the spectral ratio ε(
) is calculated by the root process, then the estimation of
and STF can be obtained. The ε(
) is also used in frame selection (see Section 2.3).
- 2.3 Frame Selection
Frame selection is an important technique in image post-processing, resulting in much higher resolution and signal-to-noise ratio (Mackay et al. 2004; Roggemann et al. 1994). Two kinds of frame selections have been used in data processing at NVST. The first frame selection is relatively simple according to image shift and image brightness, whereas the second frame selection is very complex, which excludes the Sun information and only includes information concerning atmospheric turbulence and the telescope. In the second frame selection, an image quality parameter 𝛿 defined by Liu et al. (2013) as
is used, where (𝜌, 𝜃) represents the polar coordination on the spatial frequency domain. The range of integration, 𝜌
, is a function of average value of Fried’s parameter
of the data set. The aim of integration is to improve the signal-to-noise ratio.
- 2.4 Filtering
To improve the image quality, a special filter is constructed based on the estimate for
(Section 2.2), and then the shift-and-added image is filtered (Liu 2003; Liu et al. 1998). During filtering, in order to achieve loading balancing and to increase computing speed, the parallel Fast Fourier Transform in the West (FFTW; Frigo & Johnson 2012) routines supporting MPI were adopted. The shift-and-added image is partitioned into several portions by the number of processes. Several portions are transformed using FFTW’s MPI routines and filtered independently and in parallel, and finally synthesized into one reconstructed image.
The observations were made with the NVST at FSO on 30 April, 2013. An Hα filter (λ=656.3nm) was used for solar filament observations. We employed a highspeed CCD camera with 16-bit digitization as a detector.
shows the frame selection and SAA parallel reconstruction image. The field of view is 160×160
(0.156 arcsec/pixel), and the number of pixels is 1024×1024.
shows the best-shot image with the same field of view. In the frame selection and SAA parallel reconstruction, we used 100 data frames, and the resulting image reveals high-contrasted features of solar filament compared with
. The reconstructed data can be downloaded from the website (http://fso.ynao.ac.cn/). Such reconstructed data can be directly used for the study of science under favorable seeing conditions. When seeing is bad, the frame selection and SAA method does not result in good reconstruction, however, we can determine whether there is need to use speckle masking method to reconstruct image by observing the movie made of frame selection and SAA parallel reconstructed data.
— (a)The frame selection and SAA reconstructed image. (b) The best-shot image over 100 images. The field of view is 160×160 arcsec2.
The image reconstruction program for the frame selection and SAA was originally developed in the IDL by Research Systems, Inc. Due to the interpreted nature of IDL, the program does not run very efficiently, e.g., on a computer equipped with Intel Core(TM) CPU i7- 3770 with 3.40GHz clock speed and 32GB of random access memory (RAM), it takes about 60 seconds to reconstruct a 1024×1024 pixel image out of 100 short exposure images.
The parallel image reconstruction program has been tested on a cluster with 45 computation nodes installed at the Yunnan Observatories, demonstrating its scalability with an increasing number of computation nodes. The system runs a Linux distribution, and the computation nodes are connected via Infiniband fibers. Each of the 45 nodes is equipped with Intel Xeon CPU E5- 2650 with 2.00GHz clock speed and 64GB of random access memory (RAM). For the tests, we used a data burst with 100 images consisting of 1024×1024 pixels. The number of computation nodes was increased upto the maximum and the time taken to perform the reconstruction was recorded.
shows that the computation time varies inversely with the number of CPU cores employed - saturating at a minimum of around 2.3s.
— Time used for one reconstruction versus number of employed CPU cores of computation nodes.
The saturation is a significant issue that needs to be addressed when devising a platform that is supposed to achieve real-time or near real-time reconstruction performance. The saturation is due to latency between the processors - be it because of restricted interconnect bandwidth between the computation nodes or because of a slow processor speed. Another reason for saturation is the overhead in the program that distributes the data to the computation nodes. Consequently, a desired system would provide several multi-core processors connected with a fast system bus, which is the current trend in processor development and high performance computing. In any case, already today a system such as the one tested above would provide near real-time performance for a camera that reads out and stores a 1024×1024 pixel frame at an effective rate of 10 frames per second.
We have presented some details of the programpackage for image reconstruction using frame selection and SAA in solar application. The code was written for parallel processing using MPI, the necessary processing steps were detailed, and the C implementation shows a definite speed increase as compared to the IDL implementation. The spatial resolution of frame selection and SAA reconstructed image can be improved obviously compared to that of original image. The program is optimized to be executed in a multi-processor environment to take advantage of parallel computing ability. We conclude that using this program, on a high performance computing cluster, one can achieve near real-time reconstruction. Real-time post-processing image reconstruction like frame selection and SAA will be valuable for NVST and future large aperture solar telescopes as the storage capacity needed for speckle data are tremendous and can be reduced if the data are reconstructed on-site in real-time.
The authors thank the anonymous referee for her/his careful reading of the manuscript and constructive comments that improved the original version, and thank the NVST team for the support they have given this project.
Shift-and-Add Reconstruction of Solar Granulation Images
Near Real- Time Image Reconstruction
Johnson S. G.
Hunt B. R.
Fright W. R.
Bates R. H. T.
Analysis of the Shift-and-Add Method for Imaging Through Turbulent Media
Knox K. T.
Recovery of Images from Atmospherically Degraded Short- Exposure Photographs
Liu C. Y.
Xiang Y. Y.
Jin Z. Y.
The Frame Selection Processing of H-a Solar Images
Astronomical Research & Technology
Research on High-Resolution Image Reconstruction and Spatial Characteristics of Astronomical Images, Ph.D. Thesis
Yunnan Observatories, Chinese Academy of Sciences
Qiu Y. H.
Lu R. W.
Reconstruction of Video Images Through Turbulent Atmosphere
High Resolution Imaging in the Visible from the Ground without Adaptive Optics: New Techniques and Results
Analysis of Adaptive Optics Control for the Advanced Technology Solar Telescope, 77363E-1
Hege E. K.
Strobel N. V.
Shiftand- Add for Astronomical Imaging
Rimmele T. R.
First Results from the NSO/NJIT Solar Adaptive Optics System
Roggemann M. C.
Stoudt C. A.
Welsh B. M.
Image-Spectrum Signal-to-Noise-Ratio Improvements by Statistical Frame Selection for Adaptive-Optics Imaging Through Atmospheric Turbulence
Application of Self-Deconvolution Method to Shift-and-Add Solar Imaging
Von der Lühe O.
Estimating Fried’s Parameter from a Time Series of an Arbitrary Resolved Object Imaged Through Atmospheric Turbulence
Von der Lühe O.
KAOS: Adaptive Optics System for the Vacuum Tower Telescope at Teide Observatory
Weigelt G. P.
Modified Astronomical Speckle Interferometry ‘Speckle Masking’
The ATST Visible Broadband Imager: A Case Study For Real-Time Image Reconstruction and Optimal Data Handling
Von der Lühe O.
KISIP: A Software Package for Speckle Interferometry of Adaptive Optics Corrected Solar Data, 70191E-1
Von der Lühe O.
Speckle Interferometry with Adaptive Optics Corrected Solar Data