1 Introduction

Any observable difference in the coronal structure with a timescale varying from a few minutes to several hours, associated with a new, discrete bright feature propagating outwards in a coronagraph field of view (FOV) is called a coronal mass ejection (CME) (Hundhausen et al., 1984). The occurrence frequency of these events varies from one per day during solar minimum to several times a day during solar maximum. The first observation of CMEs from space was made in 1971 (Hansen et al., 1971) with a white-light coronagraph that had an FOV from \(3~\mbox{R}_{\odot}\) to \(10~\mbox{R}_{\odot}\) on board the Orbiting Solar Observatory-7 (Koomen et al., 1975). Several other coronagraphs were later sent into space. The first statistical survey of CMEs was made with data obtained from the coronagraph on board Skylab (MacQueen et al., 1974), which has an FOV from \(1.5~\mbox{R}_{\odot}\) to \(6~\mbox{R}_{\odot}\). The white-light coronagraph with an FOV from \(2.6~\mbox{R}_{\odot}\) to \(10~\mbox{R}_{\odot}\) on board Solwind (Michels et al., 1980) recorded a halo CME for the first time. The white-light coronagraph with an FOV from \(1.5~\mbox{R}_{\odot}\) to \(6~\mbox{R}_{\odot}\) and a spatial resolution of 10 arcsec on board the Solar Maximum Mission (MacQueen et al., 1980) studied over 1000 CMEs in its lifetime. The classic three-part CME was also identified during its course of operation. The coronagraph on board Spartan 201 (Guhathakurta and Fisher, 1993) with an FOV \(1.25~\mbox{R}_{\odot}\) to \(6~\mbox{R}_{\odot}\) flew five times between April 1993 and November 1998 and maintained the continuity of coronal data. The Large Angle Spectroscopic COronagraph (LASCO) C2 and C3 on board the Solar and Heliospheric Observatory (SOHO) (Brueckner et al., 1995), launched in 1995, has continuously provided data for over two solar cycles with an FOV from \(2~\mbox{R}_{\odot}\) to \(30~\mbox{R}_{\odot}\). Most of our understanding about CMEs and the variation in their characteristics in different phases of the solar cycle has come from the analysis of data obtained from LASCO over the years. The Sun Earth Connection Coronal and Heliospheric Investigation (SECCHI) (Howard et al., 2002) on board the Solar Terrestrial Relations Observatory (STEREO) is a pair of white-light coronagraphs with an FOV \(1.5~\mbox{R}_{\odot}\) to \(16~\mbox{R}_{\odot}\). They provide coronal observations from two different vantage points. The only coronagraph to have an FOV close to the solar limb was LASCO C1 (\(1.1~\mbox{R}_{\odot}\) to \(3~\mbox{R}_{\odot}\)), which stopped operation two years after launch in 1998. Although the launches of these coronagraphs in space have increased our knowledge of the solar corona and coronal transients, the inner corona has not been explored in great detail.

The Visible Emission Line Coronagraph (VELC) (Singh et al., 2011; Singh, Bayanna, and Sankarasubramanian, 2013; Raghavendra Prasad et al., 2017) on board ADITYA-L1 (Seetha and Megala, 2017) has an FOV ranging from \(1.05~\mbox{R}_{\odot}\) to \(3~\mbox{R}_{\odot}\). It will provide a unique opportunity to probe the inner corona. VELC will take images of the corona with a high resolution of \(2.51~\mbox{arcsec}\,\mbox{pixel}^{-1}\) at the wavelength of 5000 Å with a cadence that can reach 1 s. Combined with spectroscopy and spectropolarimetric capabilities, this will allow us to understand the origin of CMEs and their behavior in the inner corona.

CMEs have been visually inspected and cataloged with their measured properties (apparent central position angle, average angular width, and height as a function of time) using the continuous data obtained from the LASCO coronagraph. One of the earliest CME catalogs was made by Yashiro et al. (2004) and Gopalswamy et al. (2009) and is based on visual inspection of the LASCO data. It is available online.Footnote 1 In the past few years, the amount of data generated from space-based coronagraphs has increased tremendously. Moreover, the visual inspection process is labor intensive and subjective, therefore several ground-based automated CME detection algorithms were developed. The Computer-Aided CME Tracking (CACTus) was the first of such techniques. It uses the Hough transform to detect CMEs automatically without human intervention in polar transformed running-difference coronagraph images (Robbrecht and Berghmans, 2004; Pant et al., 2016). Initially, it was applied to LASCO C2 and C3 images, but its application was later extended to Heliospheric Imager-1 images (Pant et al., 2016). The Solar Eruptive Events Detection System (SEEDS) developed by Olmedo et al. (2008) automatically detects CMEs in polar transformed running-difference images of LASCO and STEREO/COR-2 using the threshold-segmentation technique to extract the appropriate shape of the leading edge of CMEs. Another such algorithm developed for the automated detection of CMEs in the LASCO images was the Automatic Recognition of Transient Events and Marseille Inventory from Synoptic maps (ARTEMIS) (Boursier et al., 2009). It detects CMEs automatically in synoptic maps using adaptive filtering and segmentation techniques. The Coronal Image Processing (CORIMP) algorithm for automated CME detection is based on separation of quiescent and dynamic structures in coronagraph images using deconvolution followed by a multi-scale edge detection method to detect and track CMEs in LASCO and STEREO/COR-2 images (Morgan, Byrne, and Habbal, 2012; Byrne et al., 2012). Goussies et al. (2010) used the texture of CMEs in white-light images for CME detection and tracking. Machine-learning algorithms have also been used to detect and track CMEs based on multiple features (Qu et al., 2006; Zhang et al., 2016, 2017). CMEs in the heliosphere are identified manually as well as automatically in STEREO/HI-1 images and have been cataloged as part of the Heliospheric Cataloging Analysis and Techniques Service (HELCATS)Footnote 2 project (Harrison et al., 2018). The first multi-viewpoint CME catalogFootnote 3 by visually inspecting SECCHI/COR-2 total-brightness images has been compiled by Vourlidas et al. (2017).

With the advancement of technology, the quality of high-resolution imaging with high cadence has improved. However, because the download bandwidth from deep space is limited, the telemetry load needs to be reduced. This can be overcome by the onboard detection of CMEs and by sending images to the ground station that contain only CMEs. Although these ground-based automated CME detection methods are very robust, they are too memory intensive to be applied in onboard electronics. For the upcoming solar missions, automated CME detection has been developed by Bemporad et al. (2014) for CME detection in Multi Element Telescope for Imaging and Spectroscopy (METIS) on board the Solar Orbiter (Fineschi et al., 2012). This algorithm is based on the intensity thresholding applied on the running-difference images rebinned to a lower resolution. The METIS will take images of the solar corona at different polarization angles. Thus small variations in white-light intensity during CMEs can be detected by this algorithm.

Since VELC is designed to take high-resolution (\({\approx}\,2.51~\mbox{arcsec}\,\mbox{pixel}^{-1}\)) images of the corona with 1 s cadence, the amount of data generated will exceed 1 TB per day for the continuum channel. Therefore, a simple algorithm that can be implemented in onboard electronics is developed to reduce the telemetry load. The algorithm is based on intensity thresholding in running-difference coronagraph images to bring out the dynamic coronal features such as CMEs from the background, which is followed by an area thresholding in order to capture CMEs and discard any artifacts that could have been detected as CMEs by intensity thresholding.

In this paper, we first describe the synthesis of the background corona for the VELC FOV in Section 2. Coronagraph images for VELC after inclusion of noise and scattered intensity along with the addition of CMEs of different types are also presented in this section. The onboard detection algorithm is explained in Section 3. Its application on data of existing coronagraphs, STEREO COR-1A and K-Cor, is illustrated in Section 4, while the application on simulated data is presented in Section 5. Finally, conclusions are drawn in Section 6.

2 Synthetic Corona and CMEs

VELC has an FOV extending from \(1.05~\mbox{R}_{\odot}\) to \(3~\mbox{R}_{\odot}\). No other existing space-based coronagraph takes images of the corona in white light at this height. The Association of Spacecraft for Polarimetric and Imaging Investigation of the Corona of the Sun (ASPIICS) onboard PROBA-3 (Renotte et al., 2014) has an FOV from \(1.08~\mbox{R}_{\odot}\) to \(3~\mbox{R}_{\odot}\), which is similar to that of VELC, and it might be launched at about the same time as VELC. Although the FOV of the K-Cor coronagraph is similar to that of VELC, the images obtained from K-Cor have large contributions from scattered intensity because of the atmosphere. We tested our algorithm on these images, but it suffers from a high rate of false detections and is discussed in Section 4.1. This led to the need for creating synthetic images of the corona for the VELC FOV and adding CMEs of different properties for the purpose of testing the performance of the onboard automated CME detection algorithm.

2.1 Preparation of Synthetic Coronal Images

The Hulst model of the solar corona (van de Hulst, 1950) for the minimum phase of the solar cycle was used to create the synthetic coronal images because the VELC will observe the solar corona during solar minima. This model separates the coronal intensities into equatorial and polar regions with radial variations as given by Equations 1 and 2, respectively:

$$\begin{aligned} B(x) =& \bigl(200.00x^{-17} + 114.86x^{-7} + 5.38x^{-2.5}\bigr)\times10^{-8}~\mbox{B}_{\odot}, \end{aligned}$$
(1)
$$\begin{aligned} B(x) =& \bigl(191.00x^{-17} + 27.45x^{-7} + 4.99x^{-2.5}\bigr)\times10^{-8}~\mbox{B}_{\odot}, \end{aligned}$$
(2)

where \(x\) is the distance in units of solar radius, and \(\mbox{B}_{\odot}\) is the mean solar disk brightness.

The size of the image is taken as \(2160\times2560\) which is same as the size of the detector to be used in VELC. The pixel scale of the VELC continuum channel is \(2.51~\mbox{arcsec}\,\mbox{pixel}^{-1}\). Since the detector is rectangular in shape, the shorter side will cover a 1080 pixel radius, which is equivalent to \(2.81~\mbox{R}_{\odot}\). The images are simulated for \(2560\times2560\) and cropped based on the orientation of the detector to choose the shorter side along equator or pole.

van de Hulst (1950) reported that the K corona mostly dominates up to \(2~\mbox{R}_{\odot}\). It has also been observed that during the period of maximum activity of the solar cycle, the white-light corona (\(\mbox{K}+\mbox{F}\)) is almost uniformly distributed around the solar limb, while during minimum activity period, it is mostly confined to the equatorial regions. This means that the shape looks nearly elliptical in white-light images (Marzouk, Stoeva, and Stoev, 2016). In order to incorporate this shape, a synthetic coronal image was first made using Equation 1 with circularly symmetric intensity (\(B\)). Next, \(B\) was modulated with latitude variation in coronal intensity as given by

$$ B_{1}(q,z) = \frac{5\cos{\frac{\theta}{2}}}{\sin{\frac{\theta}{2}}+0.5} + \exp\bigl(- \pi\sin^{2}\theta\bigr) + \frac{1}{8 \pi \sigma^{2}} \exp\biggl( \frac{-\pi\sin^{2}\theta}{4k\sigma^{2}}\biggr)B(q,z), $$
(3)

where \(1 \leq q,z \leq2560\) and \(\theta= \tan^{-1}(\frac {q-cx}{z-cy})\). The angle \(\theta\) is with respect to the horizontal axis.

The motivation of using this relation was to obtain a nearly elliptical shape of the white-light corona in synthetic images. The first and second term in Equation 3 governs the extent and spread of the increased brightness at the equator, and the third term adds the gradual variation in the brightness while moving from the equator to poles. Here, \(\sigma\) combined with \(k\) defines the sharpness in the asymmetry. The shape and the amount of asymmetry can be changed by changing the values of \(\sigma\) and \(k\). Very low values of \(\sigma\) and \(k\) lead to a very sharp intensity increase in the equatorial region. We note that increasing the values of \(\sigma\) and \(k\) increases the circular symmetry of the intensity of the corona. After some trials, \(\sigma\) and \(k\) were chosen as 0.15 and 12, respectively, to match the observed coronal intensities. \(B(q,z)\) is the intensity value at the \([q,z]\) pixel position of the circular symmetric image, \(B_{1}(q,z)\) is the modified intensity after introducing asymmetry. The image \(B_{1}\) was then combined with the original image \(B\) using Equation 4 such that the resulting image had a gradual variation in intensity from the equator to poles:

$$ \mathrm{BG}= \frac{1}{4}(2.05B + 0.05B_{1}), $$
(4)

where BG is the final synthetic coronal image for the VELC FOV. The coefficients of \(B\) and \(B_{1}\) were obtained after a few trials in order to obtain intensity values that would be closer to the observed values.

Figure 1 shows a synthetic coronal image for the VELC FOV taking \(\sigma=0.15\) and \(k= 12\). It should be noted that the image is of size \(2160 \times2560\) and the equator is along the horizontal axis.

Figure 1
figure 1

Synthetic coronal image for the VELC FOV taking \(\sigma =0.15\) and \(k=12\). The axes are represented in solar radii. The equator is along the horizontal axis.

Since VELC will start observing the solar corona during the rising phase of Solar Cycle 25, we compared our corona model with the LASCO C2 images taken during the similar phase of Solar Cycle 24. Figure 2 shows the comparison of intensities of the synthetic corona image prepared by our corona model, with the 11-day minimum background intensity observed by LASCO C2 and theoretical models developed by Hulst and Saito. An 11-day minimum background image was prepared from total-brightness images taken by LASCO C2 from 1 January 2009 to 11 January 2009. The minimum background corona was calculated by taking the minimum of the intensity values of the pixels spanning 11 days. This method removes static and quasi-static coronal features such as streamers and approximately constructs a coronal background (DeForest, Howard, and Tappin, 2011; DeForest, Howard, and McComas, 2014). Average intensities along the radial direction at the equator and poles were obtained by taking the mean intensity of the width of three pixels. This was compared with the average intensity at the equator and poles of the synthetic image simulated with our model. The coronal intensity values given by the theoretical models of Hulst and Saito were also compared for the equatorial and polar region intensities. The intensities obtained with our model for the synthetic image match the existing theoretical models and also the observed background intensity values well. The deviation of the curves near the inner edge of the FOV may be accounting for the high scattered intensities and diffraction pattern in the inner corona, which contaminates the corona signal.

Figure 2
figure 2

Comparison of coronal intensities calculated by our modified Hulst model represented by BG with a LASCO C2 image taken on 01-01-2009 and theoretical corona model intensities given by Hulst and Saito. Left: Coronal intensities at the equator. Right: Coronal intensities at the poles. The solid black line corresponds to the corona intensity as obtained with the modified Hulst model, the solid blue and dashed brown line represent the intensities for LASCO C2, the dotted line represents the coronal intensities given by Hulst, and those given by Saito are marked by diamonds.

The left panel in Figure 3 shows an image of the intensity contour of the 11-day minimum background image obtained from C2 images taken from 1 January 2009 to 11 January 2009 followed by the synthetic coronal image generated for the C2 FOV in the middle panel. The difference image of the two is shown in the right panel of Figure 3. Except for the bright coronal features (due to streamers), the difference in the intensities from the observed data and synthetic corona model is minimal. The mean intensity of the residual image on the order of \(10^{-10}~\mbox{B}_{\odot}\). This further validates the model we used to generate the synthetic coronal images for the VELC FOV.

Figure 3
figure 3

Left: Intensity contour of the 11-day minimum background image obtained from LASCO C2 images taken from 01/01/2009 to 11/01/2009. Center: Synthetic corona image generated for the C2 FOV using our model. Right: Residual intensity obtained by subtracting the synthetic coronal image generated for the C2 FOV and the 11-day minimum background image.

The synthetic coronal images generated thus have intensity values in units of brightness (\(\mbox{W}\,\mbox{m}^{-2}\,\mbox{sr}^{-1}\,\mbox{nm}^{-1}\)). However, the data recorded onboard will be in terms of data numbers (DN). Therefore, the intensity was converted into photoelectrons that are further converted to DN before we applied the CME detection algorithm. The conversion was made using Planck’s blackbody radiation relation to determine the mean brightness recorded in each pixel and then converting into DN by taking 15 electrons per DN for the VELC CMOS detector. Assuming the efficiency of continuum channel is 25% for 5000 Å, the relation is given by

$$ n = 3.863\times10^{10} I, $$
(5)

where \(I\) is obtained from the coronal intensity with the radial variation curve and is on order \(10^{-6}\) with units of photoelectrons \(\mbox{pixel}^{-1}\) s−1.

Since the coronagraph images have a significant contribution from the instrument scattered light, the scattered light needs to be accounted for in the synthetic coronal images. The study of scattered light for the VELC continuum channel was made in the Advanced System Analysis Program (ASAP), as reported in Venkata et al. (2017). The data are given in units of mean solar disk brightness with the radial variation within the VELC FOV. A two-dimensional image with an FOV similar to that of VELC was created using the scattered light data assuming a circular symmetry. This scattered intensity image was then added to the coronal background image.

Figure 4 shows the radial variation in the rate of generation of the number of photoelectrons after incorporating the contribution of the instrumental scattered intensity to the synthetic coronal image. We find that more than 213,400 photoelectrons are generated every second at \(1.05~\mbox{R}_{\odot}\), where the intensity is maximum. The full-well capacity of the VELC continuum channel detector is 30,000 electrons. Thus the exposure time of the detector without saturation is estimated to be less than 140 ms. Therefore, the exposure time for this channel will be chosen as 100 ms. In order to build the coronal signal, subsequent frames are added for further processing, which is explained in Section 3. The exposure time can be reduced in case of detector saturation when a bright CME passes through a streamer.

Figure 4
figure 4

Variation in the number of photoelectrons per pixel per second in the radial direction in the VELC FOV after adding the scattered intensity.

After the scattered intensity is included in the simulated background corona, noise is added to the simulated images. Usually, the image sensor and the electronics related to it are the main sources of the noise that we did not consider for this analysis. Thus, two main sources of noise in the synthetic coronal images are shot or photon noise and Gaussian noise (McLean, 2008). Photon noise (\(p\)) due to the statistical fluctuation in the number of photons incident on the detector for a given exposure time is defined as the square root of the number of incident photons. The Gaussian noise, which is different at each pixel, is defined as the noise due to thermal excitation of electrons at room temperature. This comprises dark noise (\(D\)) and readout noise (\(R\)). Therefore, the total noise is given by

$$ (\mathrm{{noise}})^{2} = p^{2} + D^{2} + R^{2}. $$
(6)

The number of incident photons for photon noise is calculated by adding the incident photons of the coronal brightness and the scattered intensity. The efficiency of the continuum channel including the optics and detector is 25%. The RMS electrons for readout noise of the VELC CMOS detector is two electrons, whereas dark noise is less than 15 electrons. Considering all noise sources, the signal-to-noise ratio (S/N) can be calculated using

$$ \mathrm{{S/N}} = \frac{S}{\sqrt{p^{2} + D^{2} + R^{2}}}, $$
(7)

where \(S\) is the incident coronal signal. The variation in S/N with radial distance in the VELC FOV is shown in Figure 5. It can be inferred from Figure 5 that the S/N in VELC reduces to 4 from 150 while moving from inner FOV to the edge of the FOV.

Figure 5
figure 5

Variation in S/N with radial distance in the VELC FOV.

The synthetic coronal images obtained after including of scattered intensity and noise serve as the background image to which CMEs of different types are added for further analysis.

2.2 Simulation of CMEs in Coronal Images

CMEs in coronagraph images appear as bright structures moving outwards. Thus we simulated CMEs in synthetic coronal images by launching structures that were brighter by a few percent than the background coronal intensity. It is reported that the brightness of CMEs with respect to the background varies from a few percent to unity (Robbrecht and Berghmans, 2004), which is defined as the intensity enhancement factor (xfac). The angle from solar north at which a CME is launched (phi) and the type of CME, i.e. a normal CME, a narrow CME, or a halo CME, are also defined a priori. Since the average angular width of CMEs in the inner corona is around \(37^{\circ}\) (Cremades and Bothmer, 2004), we simulated normal CMEs with a width of \(40^{\circ}\) that expands as the CME propagates. We also simulated a symmetric halo CME with a source region at the center of the solar disk and an asymmetric halo CME with an off-center source in the disk. The xfac was taken to be in the range of 0.05 to 0.75 to account for the faintest and brightest CMEs in our simulation. The brightest CMEs can have xfac of unity, but we considered until 0.75 because CMEs brighter than this will surely be detected by our algorithm using the parameters discussed in Section 5. We assumed a self-similar expansion of CMEs and that the leading edge of CMEs propagates depending on the ratio (\(\kappa\)) of the minor radius of the flux rope to its major radius, which remains approximately constant with time (Subramanian et al., 2014). The value of \(\kappa\) was varied from 0.2 to 0.4 to simulate different types of CMEs. The average speed of the CMEs could be varied in our simulation by controlling the interval (\(N\)) between successive images. For an average speed of \({\approx}\,400~\mbox{km}\,\mbox{s}^{-1}\), the value of \(N\) was set to be 1. We generated CME images with an average speed of \({\approx}\,100~\mbox{km}\,\mbox{s}^{-1}\), \({\approx}\,400~\mbox{km}\,\mbox{s}^{-1}\), \({\approx}\,1600~\mbox{km}\,\mbox{s}^{-1}\), and \({\approx}\,2000~\mbox{km}\,\mbox{s}^{-1}\), which corresponds to slow, intermediate, and fast CMEs, respectively. The different types of CMEs were simulated with different intensities, angular widths, and average projected speeds (see Table 1).

Table 1 List of simulated CMEs.

Figure 6a shows a simulated normal type CME in the VELC FOV at \(270^{\circ}\) from solar north (measured anticlockwise), i.e. at the western limb, with a brightness enhancement of 50% with respect to the coronal brightness. Figure 6b shows a simulated narrow CME at the eastern solar limb with a brightness similar to that of a normal CME. Figure 6c shows an example of a symmetric halo CME, while Figure 6d shows an asymmetric halo CME. The symmetric and asymmetric halo CMEs have an intensity enhancement of 50% and 60%, respectively, with respect to the background.

Figure 6
figure 6

Examples of simulated CMEs in the VELC FOV. (a) Normal CME at the western solar limb, (b) narrow CME at the eastern solar limb, (c) symmetric halo CME, and (d) asymmetric halo CME, with 50%, 50%, 50%, and 60% enhanced intensity with respect to the background, respectively.

3 Detection Algorithm

Several automated CME detection algorithms are available (e.g. CACTus, SEEDS, ARTEMIS, and CORIMP) that can detect CMEs in coronagraph images. However, these are ground-based algorithms that require a huge amount of memory. The automated CME detection algorithm of VELC is a simple algorithm that can be implemented in onboard electronics and is capable of detecting CMEs in coronagraph images by intensity thresholding followed by area thresholding that depends on the size of kernel used. The flowchart in Figure 7 shows a step-by-step application of the algorithm. The few free parameters in the algorithm are shown in bold and blue. The values of the free parameters can be changed post-launch for a reliable detection of CMEs, depending on the science requirements:

  1. i)

    Images are acquired at a rate of 10 frames per second (fps). The algorithm adds 10 images of 100 ms exposure to build the signal. Thus, one image will be produced every second.

  2. ii)

    Furthermore, to build the signal, 10 images of 1 s exposure are then averaged to obtain a single image.

  3. iii)

    The noise in the images obtained in the previous step is reduced by performing spatial binning. The bin size can be \(2\times2\), \(4\times4\), or \(8\times8\), which is kept as a free parameter for a reliable CME detection. Followed by the spatial binning, the median filtering in the temporal domain over three images at a time is performed.

  4. iv)

    Running-difference images are obtained by taking the difference of the coronagraph images that are 120 s apart, to remove the F corona, instrument scattered light, and less strongly variable K corona. The difference interval can range from 60 s (1 min) to 300 s (5 min) and is kept as a free parameter to detect CMEs of variable speeds.

  5. v)

    The images are then converted into binary images (\(I\)) by thresholding the intensity. The threshold value is chosen as mean + factor × (standard deviation). The intensity and morphology of a CME vary widely for different CMEs. Therefore, an adaptive thresholding is applied so that the threshold value does not remain a fixed number for all images. This factor is a free parameter with values ranging from 1 to 3.

  6. vi)

    The binary image obtained thus is then convolved with a kernel (k) of size \(5\times5\), \(10\times10\), or \(20\times20\) pixels depending on the size of the CME to be detected based on science requirements in future.

  7. vii)

    The intensity values of the convolved image are compared with a convolution threshold (th) that determines the presence of CMEs in an image. If the threshold is too low, it can lead to the detection of noise (false detection), whereas if the value is too high, only large and bright CMEs will be detected. Therefore, it is kept as a free parameter that can be tuned post-launch. If the maximum value in the convolved image is higher than the convolution threshold, then CME is said to be detected in the image, otherwise it halts the detection. A range of 0.4 – 1 is considered for the optimal detection.

  8. viii)

    If the difference image obtained in step iv) satisfies both intensity and convolution thresholds, then steps i) – vii) are applied to the successive images. If the algorithm detects CMEs in five consecutive images, the algorithm will start storing the images in the onboard memory until no CME is detected in the coronagraph images. This will avoid the false detection of CMEs due to noise. If there is no CME for three consecutive hours or until the next detection, whichever is earlier, the images are added to form one image.

Figure 7
figure 7

Flowchart of the automated CME detection algorithm developed for ADITYA-L1 VELC. The parameters shown in bold and blue are the free parameters.

This algorithm retains images containing CMEs while discarding the rest. The performance of this algorithm is discussed in Sections 4 and 5 using various datasets.

4 Application to Existing Coronagraph Images

The efficiency of the application of algorithm on different data sets is judged on the basis of the following quantities that have been calculated at each threshold:

  • Relative CME detection (RCD) is defined as the percentage for CME images that has been detected by the algorithm,

    $$ \mathrm{{RCD}} = \frac{\text{Number of detected CME images}}{\text{Total number of CME images}}\times100. $$
    (8)
  • Absolute CME detection (ACD) is calculated as the percentage of the total number of images in a day that contain CMEs and have been detected. This quantity is important to estimate the telemetry reduction,

    $$ \mathrm{{ACD}} = \frac{\text{Number of detected CME images}}{\text{Total number of images}}\times100. $$
    (9)
  • Extra detected (ED), which can also be called false detection, is defined as the percentage of the total number of images detected that do not contain CMEs,

    $$ \mathrm{{ED}} = \frac{\text{Number of images falsely detected}}{\text{Number of detected images}}\times100. $$
    (10)
  • Reduced telemetry (RT) is defined as the percentage of total images that are detected by the algorithm. These images comprise the images detected by the algorithm that may or may not (false) contain CMEs,

    $$ \mathrm{{RT}} = \frac{\text{Total detected images}}{\text{Total number of images}}\times100. $$
    (11)

4.1 Application to K-Cor Data

The K-Cor telescope (de Wijn et al., 2012) is one of the many instruments at the Mauna Loa Solar Observatory (MLSO). It is a coronagraph that has the same FOV as VELC, starting from \(1.05~\mbox{R}_{\odot}\) to \(3~\mbox{R}_{\odot}\). K-Cor takes images of the corona with a cadence of 15 s. The level 1 images were downloadedFootnote 4 and analyzed. Since it is a ground-based instrument, it suffers from atmospheric effects. We have tested our algorithm on some of the images of K-Cor, and the performance of the algorithm is tabulated in Table 2. We selected three bright CMEs in which the structure of the CMEs can be seen clearly. We also selected four faint CMEs that are affected by atmospheric effects. The images were binned by \(2\times2\) pixels, and median filtering was applied in the temporal domain by taking three images at a time to reduce the noise. The running difference of images 5 minutes apart was then taken, and a binary image of the difference image was made by choosing the factor as 1, 1.5, and 2. The resulting image was convolved with a kernel of size \(10\times10\) pixels. The CME was detected by comparing the maximum intensity value of the convolved image with a convolution threshold value of 0.6.

Table 2 Application of the algorithm to K-Cor data taking a kernel size of \(10\times10\) and a convolution threshold of 0.6.

Figure 8a shows an example of a good CME event captured with K-Cor on 2016-01-01 that was successfully detected by the algorithm. However, for most of the cases, the algorithm failed to detect the CME in the K-Cor images as the atmospheric effects contribute to the scattered intensities, which resulted in a false detection. An example of this is shown in Figure 8b. It was observed with K-Cor on 2014-05-28. Table 2 summarizes the results after the algorithm was applied to the K-Cor data. There are 501 images obtained on 09-02-2016 that contain CMEs and were detected. The value of RCD is 80.4%, which is the ratio of images detected containing CMEs excluding false events (501) and the number of images containing CMEs by visual inspection (623). ACD is the ratio of CME images detected excluding false events (501) to the total number of images observed on this day (1709). Out of the total detected images (1041), the number of falsely detected images is 540. This ratio gives the extra detection, which is 51.8% in this case. RT is calculated by taking the ratio of the detected images (including false detections; 1041) and the total number of images for that day (1709), which is 60.9%. The number of detected CME images and extra detected is not explicitly mentioned in the tables. All parameters for different cases are calculated in a similar way.

Figure 8
figure 8

Left: CME detection in a K-cor image of 2016-01-01. The bright leading edge and low atmospheric effects clearly show the detected CME. Right: False detection of a CME in a K-Cor image on 2014-05-28 on account of huge atmospheric contributions.

From Table 2 we note that:

  • CMEs that can be seen in difference images are detected with considerable efficiency. These include the events on 2016-02-09, 2016-01-01, and 2015-05-05.

  • Faint CMEs are hard to detect because of the atmospheric contamination. The maximum obtained value of the ACD for faint CMEs is found to be 1.5%.

  • There are two cases of very faint CMEs in which CMEs cannot be identified manually, but the algorithm showed the presence of CMEs in images on 2014-05-07 and 2014-04-03. After careful observation and comparison with the LASCO CME database, the position of the CMEs was identified. Although very faint propagating structures are visible, the large contribution of atmospheric scattered intensity was responsible for the false detection. Figure 8b shows an example of such a false detection.

  • Since K-Cor is a ground-based coronagraph, there is a high percentage of false detection. Almost half of the images detected do not contain CMEs.

  • The average telemetry for the cases with considerable CME detection is \({\approx}\,55\%\), \({\approx}\,30\%\), and \({\approx}\,15\%\), whereas for very faint cases, it is \({\approx}\,65\%\), \({\approx}\,41\%\), and \({\approx}\,20\%\) for factors of 1, 1.5, and 2, respectively.

4.2 Application to STEREO COR-1A Data

Among the existing space-based coronagraphs, the FOV of STEREO COR-1A is most similar to that of VELC. We therefore used this dataset to test the detection algorithm. STEREO COR-1A polarized brightness images are acquired in triplets with polarization angles of \(0^{\circ}\), \(120^{\circ}\), and \(240^{\circ}\) with respect to solar north. Each of these images is taken at an interval of 9 or 12 s, and every triplet has a difference in time of 5 minutes. Therefore, every day, 864 polarized images are acquired, which corresponds to 288 polarization triplets each day. These images are taken with an exposure time of \({\approx}\,1.7~\mbox{s}\) and are of dimension \(512\times512\) pixels. The STEREO COR-1A observation log specifies high-jitter data, while the other datasets can be treated as low-jitter data. For this work we selected the images obtained on 2011-09-22, 2011-05-14, 2011-05-15, 2012-04-17, 2012-04-19, 2013-10-26, 2013-10-27, and 2013-10-28, which contain high jitter and different types of CMEs. Images obtained on 2010-11-10, 2010-11-11, 2010-11-12, 2011-08-02, 2011-08-03, 2011-08-04, 2012-06-13, 2012-06-14, and 2012-06-15 were selected for low jitter and different types of CMEs. The standard routines in the SECCHI package provided in SolarSoftware were used to calibrate each image, and then each triplet of polarized images was combined to derive the total brightness (tB) image.

The algorithm was implemented on the total-brightness images. Median filtering was applied at each pixel of every three consecutive images to reduce noise. Then running-difference images were obtained from these consecutive median images. The factor for the intensity threshold was taken as 1.5. The binary image generated after the intensity threshold was then convolved with a kernel of size \(8\times8\). The convolution threshold was varied as 0.4, 0.5, and 0.6, and the performance of the algorithm was analyzed.

Figure 9 shows the result of applying the algorithm on COR-1A images obtained on 2013-10-28 and 2012-06-14. These two examples correspond to high-jitter and low-jitter cases, respectively. The greater part of the CMEs in both cases has been detected after the binary image was produced from running-difference images. The results of all test cases after applying the algorithm with different threshold values for high- and low-jitter cases are summarized in Tables 3 and 4, respectively.

Figure 9
figure 9

COR-1A images after applying the algorithm. The upper panel shows running-difference images, while the lower panel shows binary images in which CMEs are detected. The left column in both panels correspond to the high-jitter case on 2013-10-28, while the right column correspond to the low-jitter case on 2012-06-14.

Table 3 Application of the CME detection algorithm to COR-1A images for high jitter taking a kernel of size \(8\times8\) and a factor for the intensity threshold as 1.5.
Table 4 Application of the CME detection algorithm to COR-1A images for low jitter taking a kernel of size \(8\times8\) and a factor for the intensity threshold as 1.5.

4.2.1 High Jitter

We tested the algorithm on several very faint, faint, and bright CMEs for high-jitter data. The results of Table 3 are listed below:

  • All CMEs identified manually are also identified by the automated algorithm.

  • For very faint CMEs, the detection efficiency is found to be \({\approx}\,50\%\), \(25\%\), and \(12\%\) for convolution thresholds of 0.4, 0.5, and 0.6, respectively.

  • For faint events, the detection efficiency is \({\approx}\,90\%\), \(50\%\), and \(30\%\) for convolution thresholds of 0.4, 0.5, and 0.6, respectively, except for events that occurred on 2013-10-26,27 and 28. The reason is that the STEREO spacecraft suffered high jitter on 2013-10-26, 27, and 28, which caused spurious brightness in the FOV that is captured as CMEs by the algorithm.

  • For bright events, the detection efficiency is \({\approx}\,100\%\), \(81\%\), and \(81\%\) for convolution thresholds of 0.4, 0.5, and 0.6, respectively, except for events that occurred on 2013-10-26, 27, and 28.

  • The average data volume for a convolution threshold of 0.4, 0.5, and 0.6 is \({\approx}\,85\%\), \(35\%\), and \(17\%\), respectively. The data volume on 2013-10-26, 27, and 28 is \(99\%\), \(94\%\), and \(81\%\), respectively. This suggests that almost all the images were detected to contain CMEs because of spurious brightness in the FOV that was due to high jitter.

  • Again we find that except for very faint events, the threshold of 0.5 is good enough to capture the CMEs and at the same time is able to reduce the data volume to just \(20\%\).

  • We find that \({\approx}\,92\%\), 84%, and 73% of halo CME images are also efficiently detected by the algorithm with a reduced telemetry of \({\approx}\,30\%\) and better for convolution thresholds of 0.4, 0.5, and 0.6, respectively.

  • We also find that the algorithm is not affected much by low and high jitter, but for very high jitter, the algorithm is not robust because it depends on the brightness of the images. A further reduction of a factor of 2 can be achieved by Rice compression.

4.2.2 Low Jitter

Similar to high jitter, we tested the algorithm on several very faint, faint, and bright CMEs. The results of Table 4 are listed below:

  • All the CMEs that were visually identified were also identified by the automated algorithm.

  • The detection efficiency of images for a corresponding CME is lowest for faint CMEs. For very faint CMEs, the detection efficiency is found to be \({\approx}\,80\%\), \(14\%\), and \(3\%\) for convolution thresholds of 0.4, 0.5, and 0.6, respectively.

  • For faint events, the detection efficiency is \({\approx}\,90\%\), \(75\%\), and \(60\%\) for convolution thresholds of 0.4, 0.5, and 0.6, respectively.

  • For bright events, the detection efficiency is \({\approx}\,100\%\), 100%, and 90% for convolution thresholds of 0.4, 0.5, and 0.6, respectively.

  • It might seem that a convolution threshold of 0.4 detects CMEs with the highest efficiency. However, it should be noted that the data volume reduction is much lower for a convolution threshold of 0.4. Thus it is a trade-off between downloaded data and CME detection efficiency.

  • The average downloaded data volume for a convolution threshold of 0.4, 0.5, and 0.6 is \({\approx}\,80\%\), 20%, and 10%, respectively.

  • We find that except for very faint events, the threshold of 0.5 is good enough to capture the CMEs and at the same time is able to reduce the data volume to about 20%. A further reduction of a factor of 2 can be achieved by Rice compression. Thus total data volume will be reduced to 10% in case of low jitter.

Thus total data volume can be reduced to 10% and 17% for low and high jitter, respectively, in the images.

5 Application to Simulated Coronagraph Images for the VELC FOV

We tested the algorithm on simulated CME images that consist of CMEs of varying brightness and average speed. Figure 10a illustrates an example, obtained after averaging ten images of 1 s exposure time and then rebinning it by \(2\times2\) pixels. No features can be seen in these images because of the contribution of the scattered intensity. Next, a difference image was obtained by taking a difference of two images 120 s apart (Figure 10b). The CME in the difference images is clearly visible. The difference image was then converted into a binary image by taking an intensity threshold value as the mean + factor × (standard deviation), where the factor was taken as 1. The binary image thus obtained is shown in Figure 10c. The binary image was then convolved with a kernel of size \(10\times10\) pixels. The convolved image is shown in Figure 10d. The value of the convolution threshold, in this case, was taken as 0.8 and the maximum intensity value of the convolved image was compared with this value. When the maximum intensity value of the convolved image is greater than the threshold value, a CME is detected by the algorithm (see Figure 10e). On the other hand, when the CME has crossed the VELC FOV and merged with the background, the algorithm fails to detect the CME (see Figure 10f) and the detection stops.

Figure 10
figure 10

(a) Synthetic coronal image after addition of ten frames and spatial binning of \(2\times2\) pixels. (b) Difference image at an interval of 120 s. (c) Intensity threshold image with a factor 1. (d) Binary image convolved with a kernel of size \(10\times10\). (e) CME detected in the synthetic coronal image. (f) CME not detected in the synthetic coronal image as a CME almost merged with the background.

Since the running difference is performed on images of 10 s equivalent exposure time images, six images will be generated in 1 minute. Considering 24 hours of operation of the instrument, a total of 8640 images (\(24\times60\times6\)) will be generated every day. The results presented in Table 5 were computed considering the total number of images to be 8640. The detection efficiency mentioned here is the fraction of CME images that are detected by the algorithm, which is defined as RCD in previous cases. After performing the above steps, we find the following:

  • CMEs detected by visual inspection are also detected by the automated detection algorithm.

  • No false detection has been noted with the chosen parameters for simulated CMEs. This may be due to an absence of other features such as streamers, which will be there in real data and are sometimes responsible for a false detection.

  • Faint CMEs, both normal and with narrow width, were detected with an efficiency lower than 70%.

  • A slow CME (speed \({\approx}\,100~\mbox{km}\,\mbox{s}^{-1}\)) was detected with a maximum detection efficiency of \({\approx}\,69\%\) when the difference images were taken at an interval of 120 s. The same jumped to 95% when the interval was increased to 300 s.

  • The detection efficiency of very bright CMEs is higher than 90% with a factor of 1 and taking a convolution threshold of 0.8 for a kernel size of \(10\times10\). This detection efficiency of bright CMEs is seen for both fast CMEs (speed \({\approx}\,2000~\mbox{km}\,\mbox{s}^{-1}\)) and average-speed CMEs (speed \({\approx}\,400~\mbox{km}\,\mbox{s}^{-1}\)).

  • The running-difference interval of 120 s is ideal for fast CMEs. However, the detection efficiency of average-speed and slow CMEs increases with the increase in this interval to up to 300 s.

  • It is observed that increasing the value of the factor from 1 to 2.5 results in a decrease in the detection efficiency of CMEs in all cases.

  • Halo CMEs are detected with a lower efficiency except for the factor of 1. Since these CMEs cover most parts of the images, the difference images may not satisfy the higher threshold values for more images.

  • For this analysis, we assumed that VELC will produce 1 image every 10 s, so that a total of 8640 images will be generated in 24 hours of its operation. This means that even for the slow CMEs, considering a highest detection efficiency of 95%, the data volume reduces to \({\approx}\,15\%\), which is also close to 1300 images, assuming it to be the only CME in that 24 hours. For other cases for simulated CMEs, it will be even lower.

Table 5 Application of the CME detection algorithm to simulated CME images at a convolution threshold of 0.8 and a kernel size of \(10\times10\).

6 Summary and Conclusions

We presented a novel onboard CME detection algorithm that can detect CMEs in coronagraph images. This will be one of the first algorithms to be implemented in onboard electronics. The detection algorithm is based on intensity thresholding and area thresholding and is kept simple so that it can be implemented in onboard electronics. The performance of this algorithm was tested on existing space- and ground-based coronagraph images, and on synthetic coronagraph images for different choices of free parameters. The analysis showed that this algorithm is capable of detecting CMEs with a detection efficiency as high as 100%, and it reduces the telemetry to 15% and better at the same time. As VELC is capable of taking images of the corona with high spatial (\({\approx}\,2.51~\mbox{arcsec}\,\mbox{pixel}^{-1}\)) and temporal resolution (1 s), more than 1 TB of data will be generated in a day from the continuum channel alone. This high data volume can be reduced by 85% and better by implementing this onboard automated CME detection algorithm. Moreover, the algorithm can enable us to take images with an even higher resolution with limited telemetry in the future.

We have applied the algorithm to existing data of STEREO COR-1A and tested it on the images with low and high jitter. The reduced telemetry for high-jitter cases varied from \({\approx}\,10\%\) to \({\approx}\,90\%\), while for low-jitter cases, it varied from \({\approx}\,10\%\) to \({\approx}\,80\%\). We applied this algorithm on a few images taken by K-Cor, which has the same FOV as VELC. The algorithm could not be applied to most of the dataset of K-Cor because the images are affected by atmospheric contamination, which resulted in false detections as high as \({\approx}\,90\%\). The noisy patterns in these images were too dominant to satisfy the intensity and convolution thresholds.

Since no other space-based coronagraph has an FOV similar to that of VELC, as an alternative test, we created synthetic coronal images. We modified the Hulst model of the solar corona such that the gradual variation in intensity from the equator to the poles was incorporated in a single equation, and we created synthetic corona images for the VELC FOV. CMEs of different intensities with respect to the background corona, speeds, and shapes were simulated on these simulated images. The algorithm was then tested on these simulated images.

We have illustrated that this algorithm can be easily implemented for CME detection as applied to observed data or simulated data by varying the free parameters in the algorithm. The value of the factor was varied from 1, 1.5, to 2 with a convolution threshold of 0.6 for a kernel size of \(10\times10\) pixels for its application to K-Cor images. For the application on COR-1A data, we varied the value of the convolution threshold from 0.4, 0.5, to 0.6, keeping the value of the factor at 1.5 and the size of the kernel as \(8\times8\) pixels. While applying the algorithm on simulated images, we varied the value of the factor by 1, 1.5, 2, and 2.5 with a convolution threshold of 0.8 for a kernel size of \(10\times10\) pixels. The algorithm does not count the number of CMEs occurring on a day, nor does it distinguish between narrow, normal, and halo CMEs. Its sole purpose is to detect the images containing single or multiple CMEs and to reduce the data volume, although we found that multiple CMEs can be detected by the algorithm when the thresholds are met.

Some loss of data of interest can occur when the CME, after reaching the end of the FOV of the coronagraph, fails to meet the threshold criteria. No combination of free parameters can always result in 100% detection of CMEs in images. Very faint CMEs had a detection efficiency of even less than 10%, whereas the bright CMEs were detected with an efficiency higher than 90% and sometimes even 100%. This also implies that the detection efficiency can vary with the solar cycle because bright CMEs are more prominent during solar maxima than minima. The CMEs detection efficiency increases when the interval at which the difference image is taken is increased for slow and average-speed CMEs. Moreover, the low detection efficiency in COR-1A images with faint CMEs is due to jitter in images, which restricts the lower limit of the parameter values to avoid detection of noise. Therefore, a compromise has to be made between the percentage of the detection and telemetry depending on the science requirements over different phases of the solar cycle. The values of the free parameters are therefore kept tunable so that they can be changed post-launch depending on the period of operation and noise levels recorded in the instrument. In the case of VELC, it has been proposed to store a few images even after the algorithm stops detecting CMEs, although this will increase the volume of the data somewhat, but it can reduce the loss of CME images that are missed in the onboard detection.

We should also point out that although the algorithm has been designed to detect CMEs in coronagraph images, it may also show false triggers due to surging material in coronal loops that may enter the VELC FOV, cosmic ray hits, a passing planet in the FOV, and various other sources that may satisfy the threshold conditions. The intensity threshold is accompanied by an area threshold to avoid most of these false detections, however, sometimes we may obtain images that may not contain CMEs but other bright sources, as described above. However, the chances of such detections are very low, but an analysis can be made using existing space-based coronagraph data with such bright sources (except for coronal loops material) in the future. The corona model can be further improved by introducing streamer-like structures that vary over time. The performance of this algorithm can be put to such test further. Moreover, the synthetic corona model can be further improved to take in to account the temporal variation in coronal intensity in different phases of the solar cycle.

The overall analysis shows that the data volume for onboard storage and subsequent download through limited telemetry is reduced, which is the main objective of this algorithm. With ADITYA launching in 2020, this algorithm will be the first onboard automated CME detection algorithm.