Solar Demon – an approach to detecting flares , dimmings , and EUV waves on SDO / AIA images

Flares, dimmings, and extreme ultraviolet (EUV) waves are three types of eruptive phenomena on the Sun, which are main drivers of space weather. Fast and reliable detection of these phenomena helps augment space weather predictions. In the current paper, we introduce Solar Demon, the first software that detects all three phenomena, using a modular design to exploit synergies. While Solar Demon runs in near real-time on SDO/AIA synoptic quick-look images to provide fast detections of flares, dimmings, and EUV waves for space weather purposes, it also processes new Atmospheric Imaging Assembly (AIA) synoptic science images on a regular basis to build dedicated science quality catalogs. An overview of Solar Demon is given, with a focus on the algorithms for EUV wave detection and characterization. Several first results, such as flare and dimming butterfly diagrams for the rising part of Solar Cycle 24, are presented. The main advantages, challenges, and future prospects for Solar Demon are outlined in the Section 5.


Introduction
The volume of data from current solar imagers such as the Atmospheric Imaging Assembly (AIA; Lemen et al. 2012) on board the Solar Dynamics Observatory (SDO; Pesnell et al. 2012) illustrates the necessity for the development of automatic detection methods for various types of solar activity.The development and implementation of automated detection and extraction algorithms removes visual observer bias, however unintentional, from the determination of physical quantities such as spatial location, area, and volume, and ensures reproducible, quantifiable results, which can be mined from very large data sets (SDO produces ~1.5 TB of data per day).
In the present paper, we describe Solar Demon, a recently developed suite of algorithms that automatically detects flares and dimmings, and currently detects EUV (extreme ultraviolet) waves in a semi-automatic way.Solar Demon was developed at the Royal Observatory of Belgium, as a collaboration between the EU FP7 projects AFFECTS 1 and COMESEP. 2  The focus of the present paper is on the algorithms behind Solar Demon, and especially its EUV wave detection and characterization.Solar Demon is described in Section 2, while Section 3 focuses on the EUV wave detection and characterization algorithm.Some first results are presented in Sections 4 and 5 discusse the main advantages, challenges, and future prospects for Solar Demon.

Flares
A solar flare is a sudden brightening observed over the Sun's surface, first observed by Carrington in 1859.Flares occur when magnetic energy that has been accumulating in the solar atmosphere is suddenly released.Flares are one of the three major components of space weather -next to coronal mass ejections (CMEs) and solar energetic particles (SEPs) -and pose significant threats to satellites, radio communication, and navigation by Global Navigation Satellite Systems.
Several algorithms for the automatic detection of flares have been developed over the last two decades.These automatic algorithms can typically be divided in detections based on time series data (e.g., GOES, RHESSI, Fermi), and those based on image data (e.g., EUV or Ha images).The resulting flare catalogs can provide a basis for substantial original work, for example, Ryan et al. (2012) used GOES X-ray flare detection lists to create an extensive catalog of the solar flare thermal properties.As Solar Demon operates on image data, we provide an overview of image-based flare detection techniques below.
Neural networks (Fernandez Borda et al. 2002) and support vector machines (Qu et al. 2003) have proven their merit for the automatic detection of flares in Ha images.
Automatic detection of flares in Hinode/XRT (Golub et al. 2007) images was realized by Kano et al. (2008) by measuring the increase over time of X-ray intensity per macropixel, and thresholding the relative difference between an image and its reference image (the latter based on a weighted average of the previous images).Intensity changes in macropixels were also exploited for the detection of flares in EUV images (Grigis et al. 2010;Bonte et al. 2013).
Other approaches to automatic flare detection in EUV images include global-thresholding methods combined with fuzzy methods (Aranda & Caballero 2010), and Global Thresholding based on the Geometry of the Histogram (Caballero & Aranda 2014).
Flares are usually characterized by sudden creation of >10 million Kelvin plasma, making their manifestations typically more dramatic in X-ray data than in most EUV data, except those that contain e.g., Fe XVIII (9.4 nm) or Fe XXI (13.1 nm) lines.In order to detect flares, Solar Demon employs a region-based paradigm, tracking increases in pixel intensity in 9.4 nm SDO/AIA images within regions rather than macropixels, yielding a more precise location of the flare.This results in spatially resolved detection and morphological characterization of flares.

Dimmings
Coronal dimmings are usually observed as decreases in intensity in soft X-rays (Hudson et al. 1996;Sterling & Hudson 1997) and EUV data (Thompson et al. 1998) of a region of the Sun.It is likely that EUV images capture CME-related dimmings more unambiguously than X-ray images, because of smaller effects from solar flares and more pre-eruption coronal plasma around % 1.5 million Kelvin (instead of >3 million Kelvin for X-ray images).Dimmings appear relatively suddenly, on timescales of minutes.The cause of dimmings has been much debated in the literature, and there are two generally accepted possibilities: 1.The dimming may be due to a density depletion caused by an evacuation of plasma (Hudson et al. 1996), which in its turn may be caused by the eruption of the local magnetic field, leading to considerable expansion of magnetic loops into interplanetary space.The expansion creates a larger volume, i.e., a region of decreased plasma density.2. Although plasma evacuation is a widely accepted interpretation of the dimming signature, a decrease in intensity in coronal plasma may be caused by a change in temperature as well (Thompson et al. 1998;Chertok & Grechnev 2003).Differences observed between images in different emission lines suggest that some secondary temperature variations may also be responsible for the appearance of dimmings.However, Hudson et al. (1996) showed that the timescale of the dimming formation observed in Yohkoh/SXT (Tsuneta et al. 1991) data is much faster than corresponding conductive and radiative cooling times, which suggests that the dimmings are primarily a result of density depletion, rather than a temperature effect.
Dimmings are of particular interest to the scientific space weather community, as they are closely associated to CMEs.They are noted especially as a reliable indicator of front-side (halo) CMEs, which can be difficult to detect in white-light coronagraph data.Existing work clearly demonstrates that several properties derived from the analysis of dimmings can yield useful information about the associated CME (Thompson et al. 1998;Harrison & Lyons 2000;Thompson et al. 2000;Webb et al. 2000;Zhukov & Auchère 2004;Tian et al. 2012).
Several algorithms have been conceived in order to identify and/or characterize dimmings in coronal EUV images.Some of them, e.g.Reinard & Biesecker (2008), require external input to trigger detection, such as approximate time interval and location of events; other algorithms, such as those listed below, provide a fully automatic dimming detection and characterization.
A basic approach in dimming detection methods for EUV images is thresholding pixel intensity values in base difference images (Bewsher et al. 2008).Podladchikova & Berghmans (2005) combine this approach with minimal and maximal pixel maps for more accurate delineation of the dimming regions, and employ variance and kurtosis as indicators of significant perturbations to the statistical distribution of the pixels of running difference images, i.e., potential dimming events.Attrill & Wills-Davey (2010) took this one step further, enabling the detection of small dimming events by exploiting the augmented statistical signatures of such events in sub-images.Instead of using base difference images, Krista & Reinard (2013) employed the original, non-difference EUV images and the corresponding magnetograms for the detection and comprehensive study of dimming regions.
Feature-based classifiers have also been applied to the automated detection of small-scale EUV dimmings related to micro-flares (Alipour et al. 2012).
Solar Demon detects dimmings automatically without any prior indications of time interval or spatial location, employing both running and base difference images to detect events and extract masks of dimming regions from AIA 21.1 nm images.Both small-and large-scale dimmings are detected by Solar Demon as a result of this process.

EUV waves
EUV waves or Extreme ultraviolet Imaging Telescope (EIT) waves are large-scale disturbances that propagate across the solar atmosphere and are typically observed as moving fronts of increased coronal EUV emission, traveling at speeds of a few hundred km s À1 (Dere et al. 1997;Thompson et al. 1998Thompson et al. , 1999) ) up to ~1,500 km s À1 (Olmedo et al. 2012;Shen et al. 2013).
These disturbances can be weak, down to the limit of observability (<10% of pre-event emission), or they can be extremely bright, reaching a threefold increase in emission (Thompson et al. 2000).They are fairly large in scale (a few arcminutes in thickness, with angular spans ranging from a few arcminutes to over a solar radius), and can propagate across the entire observable disk of the Sun.
EUV waves have been interpreted as fast-mode magnetoacoustic waves (using the theory originally proposed by Uchida 1968Uchida , 1970)), solitons (Wills-Davey et al. 2007), or slow-mode MHD waves (Podladchikova et al. 2010).Observations of stationary bright fronts at coronal hole boundaries and low pulse speeds have led to the proposal of ''pseudo-wave'' theories.These interpretations see the disturbance not as a true wave, but as a bright feature produced by Joule heating at the boundary between the erupting CME and the background coronal magnetic field as the CME propagates into the heliosphere (Delannée 2000;Delannée et al. 2008).A third alternative, originally proposed by Chen & Shibata (2002), combines aspects of both the wave and pseudo-wave theories to interpret EUV waves as a hybrid of both.A detailed discussion of the various proposed theories and the evidence for and against them may be found in the recent reviews by Wills-Davey & Attrill (2009); Gallagher & Long (2011);Zhukov (2011).
Two main catalogs of EUV waves were compiled manually by Thompson & Myers (2009) on SOHO/EIT (Delaboudinière et al. 1995) data and by Nitta et al. (2013) on AIA data, respectively.Since both catalogs consist of manually identified events, however, their identification of EUV waves is entirely user-dependent.Podladchikova & Berghmans (2005) employed their automatic dimming detection algorithm NEMO as starting point for detecting and characterizing EUV waves, resulting in the NEMO EIT waves and eruptive dimmings catalog based on SOHO/EIT data from 25 March 1997 to 15 February 2010.
An alternative technique using Huygens tracking was proposed by Wills-Davey (2006).This approach employs percentage base difference images, with the pulse identified by finding the line of peak intensities corresponding to the peak of the Gaussian cross-section of the pulse.Long et al. (2011Long et al. ( , 2014) ) presented the semi-automated detection algorithm ''Coronal Pulse Identification and Tracking Algorithm'' (CorPITA) for the identification and analysis of coronal EUV waves.CorPITA uses ellipses fitted to the first three observations of the EUV wave in both 19.3 nm (AIA) and 19.5 nm (STEREO/EUVI; Wuelser et al. 2004) data, and employs an intensity-profile technique to identify the propagating pulse, tracking it throughout its evolution before returning estimates of its kinematics.
Whenever Solar Demon detects a flare, its starting location and time are used to initiate EUV wave detection and characterization, using percentage running difference images.The characterization procedure involves derotation, limb brightness correction, and divides the image into 24 sectors.A dedicated Hough transform scheme is used for identifying the EUV wave front in every sector.

Description of Solar Demon
Solar Demon is a software package that detects and characterizes flares, dimmings, and EUV waves in AIA images.Detections are performed both in near real-time on quick-look data to provide early warnings for Earth directed CMEs, as well as on synoptic science data to generate event catalogs.The software consists of a combination of modules that retrieve and process images, and a website (http://www.solardemon.oma.be) that displays the detections.The modules and website communicate with each other via a database server.
Solar Demon uses AIA 9.4 nm images to detect flares and 21.1 nm images to detect dimmings and EUV waves.Synoptic level 1.5 quick-look data as well as level 1.5 synoptic science data, both with a resolution of 1,024 • 1,024 pixels, are used to, respectively, detect events in near real-time and create science-quality event catalogs.The Joint Science Operations Center (JSOC) Science Data Processing (SDP) website holds data products from SDO and other missions and instruments.Solar Demon input modules continuously check the JSOC database for new synoptic AIA images, and make the images locally available by downloading them and adding them to the Solar Demon database.
When a detection module notices that new data is available, the pixel values of the image are first divided by the exposure time (data numbers per second).This allows images to be compared even when AEC (Automatic Exposure Control) was activated by the AIA instrument, which means that the exposure times were reduced to compensate for the intense brightness of flares.Only the quick-look images can be affected by AEC (depending on the occurrence of a bright enough flare to trigger AEC), the synoptic science images always have a constant exposure time.The second step of each detector module is to check the quality of the images before deciding to use them for event detection.This greatly limits the occurrence of false detections caused by image artifacts.The image quality tests consist of both checking the AIA quality keyword, and additional tests that check for image misalignment, brightness changes, and image cadence issues.For the quick-look detectors, the additional image tests account for 10% and 22% for flares and dimmings, respectively, of the total number of images that were rejected.For the science detectors these numbers are lower: 6% and 3%.See Table 1 for more details.The lower number of rejected science images due to the additional image tests can be explained by the fact that the science images are not affected by AEC (i.e., there are no science images with an underexposed corona).
The modular nature of Solar Demon has the advantage that it is relatively easy to add new modules, because one can reuse (parts of) existing modules.The flare detection module for example was added after the dimming detection module and fully reuses the input module for the dimming detector images while partly employing the detection modules.Another advantage of using modules is that the system becomes more robust and easier to debug: if for whatever reason one module stops working, all other modules will continue to run.The Solar Demon input and detection modules are written in the general-purpose scientific computing language Python, which is widely used by multiple communities.Flare detection by Solar Demon is performed on AIA 9.4 nm images, which corresponds to Fe XVIII ions at temperatures of % 6 million Kelvin.This channel shows very hot flaring regions on the Sun, but it does not show other regions of the solar atmosphere, resulting in a high contrast and thus easier detection of flares.Another AIA channel that could be well suited for solar flare detection is 13.1 nm, which corresponds to emission from Fe VIII and Fe XXI ions, and shows even hotter plasma at temperatures greater than 10 million Kelvin.Even though the 13.1 nm channel shows hotter plasma and has higher average photon counts, this channel also shows the transition region of the solar atmosphere, effectively reducing the contrast between flares and ''everything else''.The time it takes to reach full well of the pixels is also shorter for larger flares in the 13.1 nm channel, making it difficult to measure the flare brightness because of saturated pixels.See Lemen et al. (2012) for a detailed overview of the AIA instrument and its EUV passbands.

Processing
Flare detection in Solar Demon is a two-stage process.The first stage consists of extracting and tracking areas around bright parts of the images.The second stage is the determination if such a group contains a flare or not based on (changing) intensity levels.The stages are explained in detail in the following two paragraphs.After a normalized image passed the quality tests, a mask is created of the bright active regions in the image by applying a fixed threshold of 150 DN s À1 .A flare intensity image (FII) is created by overlaying this mask with the original image.Connected components inside the mask with a size of less than 4 pixels are removed.The mask is expanded by dilating with a disk with a radius of 0.04 solar radii.This process results in one or more binary masks for groups of bright regions.These groups, each potentially containing one flare, are tracked from image to image.If any of these groups is within 0.1 solar radii of a group detected in the next processed image, as measured from the barycenter of each group when the mask is overlaid with the previously created FII, any flare that is found inside this group is considered to be the same flare as one in the previous group.
To extract the bright pixels that form a potential flare inside the group, each group mask is multiplied by the FII.If the sum of the pixels of this process is at least 10,000 DN s À1 , and suddenly increased (by 4,000 DN s À1 ) compared to that found in the previous image, the group of bright pixels is tracked until the summed brightness drops again to 90% of the initial brightness threshold.To allow for brief data gaps, for example caused by rejected images or noisy images affected by AEC, the tracking of a flare is only stopped after the next image has been processed.For each of the flare groups in which a flare was detected, the location (barycenter) and summed brightness (of the pixels masked by the group) are tracked from image to image and stored in a database.Occasionally, a detected flare does not drop down to 90% of the initial detection threshold before a significant increase in brightness occurs.In these cases, if the brightness increase is at least 10% with a minimum of 8,000 DN s À1 , the initial flare will no longer be tracked, and a new flare event is generated from the start of this brightness increase.

Output
The flare detections and their statistics can be tracked on the Solar Demon website, where also movies -centered on the initial flare location -are displayed.Synoptic quick-look and science images are processed as soon as they are available.The typical time delay from an image recorded by AIA to it being processed by Solar Demon is about 15 min for synoptic quicklook images.This is almost entirely due to the delay between image creation by AIA and image availability at JSOC; the processing of an image by Solar Demon on a typical personal computer takes just seconds.Results produced on the synoptic science images are available with a total delay of about 7 days.The website shows a summary of (recent) flares, providing for each event the estimated GOES X-ray flux (0.1-0.8 nm) value calculated from the brightness of the flare in the processed 9.4 nm image, the start, end, and peak time of the flare, the latitude and longitude of its barycenter, and details about the nearest active region, extracted from the NOAA Solar Region Summary (SRS).The estimated X-ray flux is calculated from the total flare brightness in DN s À1 (in 9.4 nm) multiplied by 3.33 • 10 À10 .For all estimated Solar Demon M and X-flares, compared to corresponding GOES flares (435 events, from May 2010 to November 2014), this results in an average overestimation of the X-ray flux values by a factor of 1.10.
If an associated dimming or EUV wave was detected, a link to the corresponding event is also provided.A dedicated movie and light curve in 9.4 nm are generated for every flare (see Fig. 1), as well as -for every image that the flare was detected in -the flare position in Stonyhurst heliographic and heliocentric Cartesian coordinates.This detailed positional information allows morphological characterization of flares.The list of flares displayed on the Solar Demon website can be filtered by flare intensity (minimum estimated flare class), and time.Typically, Solar Demon detects flares corresponding to a GOES X-ray flux value of approximately C1 and above.
The flare detector of Solar Demon is also used as an input module for the automated COMESEP alert system developed under the COMESEP project, see Crosby et al. (2012).The COMESEP alert system is an operational space weather alert system that runs without human intervention, and is triggered by solar phenomena such as CMEs and solar flares.Solar Demon provides a flare location for every flare that was estimated to have at least a GOES X-ray value of 5 • 10 À6 W m À2 , corresponding to a C5 flare.

Input
The dimming detector of Solar Demon is operating on 21.1 nm AIA images.This wavelength is emitted by Fe XIV at % 2 million Kelvin and shows active regions in the Sun's corona.Dimmings (and EUV waves) are typically observed in AIA 19.3 nm images (Fe XII at % 1 million Kelvin, and Fe XXIV at % 20 million Kelvin), however because of the better visibility of flares in 19.3 nm, the quick-look AIA 19.3 nm images are negatively impacted by AEC more than the 21.1 nm images.AEC effectively decreases the signal-to-noise ratio of the corona when bright flares are occurring, which is typically also when dimmings can occur.Because flares appear brighter in 19.3 nm images, the exposure times for 19.3 nm images are often reduced by AEC an order of magnitude more than for 21.1 nm images, causing the signal-to-noise ratio in the corona to be lower.For this reason we selected the AIA 21.1 nm channel instead.

Processing
To measure intensity changes from one image to the next, each image is derotated to compensate for the rotation of the Sun as seen from AIA. Off-limb features cannot be rotated and are left untouched to allow for dimmings to be detected there as well.
The derotation method takes into account the differential rotation of the Sun, where different parts move with different angular velocities at different latitudes p according to the following equation: where A = 14.713°/day,B = À2.396°/day,C = À1.787°/day as determined by Snodgrass & Ulrich (1990).
Because the corona of the Sun is optically thin, it appears brighter as we observe more of it in a line of sight.This causes a limb brightening effect that should be compensated for when applying (differential) derotation of the Sun, because a coronal feature near the edge can otherwise appear brighter or darker simply because it was originating from a region closer to the limb or further away from it, respectively, before it was derotated.In order to characterize the limb brightening effect, an intensity profile was obtained by measuring the normalized intensity over 21.1 nm images taken between July 2010 and March 2011 (see Fig. 2).For each daily image in this period, an intensity profile was generated by sampling median values from concentric rings starting at the center of the Sun ranging outwards toward the limb.By combining these daily intensity profiles using median stacking, a single smooth brightness profile is obtained that is unaffected by active regions.Limb brightening compensation is automatically applied during image derotation, using this median intensity profile.
Dimmings are detected using a combination of running difference images and percentage running difference images created from images taken 6 minutes apart, see the following equations: Figure 3 shows an example of running difference images.For quick-look data the dimming detector is operating at a cadence of 3 min, while for synoptic science data it is operating at a cadence of 2 min.By combining normal running difference images (showing absolute brightness changes) and percentage running difference images (showing brightness changes relative to the brightness of the original image) a detection mask is created that tracks regions on the Sun that lost intensity within 6 min.If the total intensity loss of the pixels defined by the detection mask is higher than a predefined intensity value, in other words, if an area was detected that sufficiently decreased in brightness, the detector will start the characterization of the dimming.The combination of running difference images and percentage running difference images results in a detector that is neither too sensitive for relatively small changes around active regions, caused by flaring activity or slow movements in bright coronal loops, nor too sensitive for relatively large changes in the quiet sun or off-limb areas of the images, caused by stray-light or other flare-related artifacts.Figure 4 shows an overview of this dimming detection process.
Dimming characterization starts by setting a pre-event reference image (base image) that will be used to characterize the dimming size and intensity, by comparing each image to this pre-event image in the form of base difference images.For each image after the pre-event image, a mask is created that tracks pixels that lost intensity compared to the pre-event image.This mask is applied to the base difference image to extract dimming characteristics such as location (using the barycenter of the dimming) and intensity changes over time.See Figure 5 for an overview.Due to the dynamic nature of the Sun, the dimming masks become increasingly more noisy over time, which makes it difficult to accurately track a dimming region over a long time.To reduce the number of false statistics caused by this, the dimming region is only tracked until half an hour after the dimming detector was last triggered (i.e., by a brightness decrease in the image).This tracking duration is thus also not dependent on the (potential increase of the) intensity of the dimming region over time.Each new detection within the dimming tracking duration will therefore result in the event being tracked longer.This results in tracking durations for dimming events between 30 min for the smallest dimming events, and several hours for large scale events.

Output
Just like the flare detector, the dimming detector produces near real-time output with a 15 min delay using synoptic quick-look data, and synoptic science output with a longer delay of 7 days.
The website shows a summary of (recent) dimmings (see Fig. 6), providing for each event the start, peak, and end time of the dimming, the latitude and longitude of its barycenter, the total intensity change over time, and details about the nearest active region, extracted from the NOAA Solar Region Summary (SRS).A dedicated movie and light curve in 21.1 nm are generated for every dimming.The list of dimmings on the Solar Demon website can be filtered by total dimming intensity, the dimming location (on-disk or off-disk), and time.By virtue of the way the dimming detector operates (detecting regions that appear darker), the catalog includes a broad range of event types including off-limb jets and also cooling loop structures.

Input
EUV waves were first discovered by the EIT instrument on board SOHO, and can be seen in a variety of EUV lines, notably in Fe XII around 19.5 nm at % 1.5 MK.Solar Demon however detects and characterizes EUV waves using the 21.1 nm line (Fe XIV at % 2 MK), as this channel is less affected by AEC than the 19.3 nm AIA channel (Fe XII), making it easier to detect faint coronal features during strong flares.Solar Demon detects EUV waves in both near real-time (using synoptic quick-look images) and on synoptic science images to produce event catalogs.

Processing
Because intensity enhancements in EUV images caused by an EUV wave are small, difference images are used to detect and characterize the bright fronts.Instead of base difference images (BDs), where each image taken during an event is compared to a pre-event image, running difference images (RDs) are used.The RDs show changes in intensity in a short interval as each image is compared to the one taken just before it.BDs show an increase in ''artifacts'' in the solar corona over time due to continuous relatively small changes (e.g., movements of coronal loops) in the solar corona, which makes it more difficult to detect especially the fainter EUV waves.RDs contain less artifacts as the interval is not increasing over time.A downside of using RDs is that it becomes difficult to estimate anything but the front of the EUV wave, as depending on the speed of the wave, the front side of a wave can overlap with the back side of that same wave in the next image causing an apparent (not real) reduction in the width of the EUV wave in the accompanying running difference image.It was found that using running difference images with the minimal delay between synoptic images -2 min for science images, and 3 min for  Fig. 4. Creating a dimming detection mask.Percentage running difference images (PRD) and normal RD images are binarized using both high and low thresholds.The resulting low threshold and high threshold masks are combined by keeping only the larger clusters from the low threshold mask that intersect with the high threshold mask.These RD and PRD masks are combined into a potential dimming mask (PDM) by only keeping those clusters from the RD mask that intersect with clusters in the PRD mask.Finally, to reduce the number of false detections this PDM is refined by discarding clusters that do not have an overlap with clusters in the previous PDM.This means that the dimming characterization process will only be triggered by events that last longer than one image.As an example, this procedure is illustrated here for October 23, 2012, 07:42 UTC.Fig. 5. Creating a dimming characterization mask.Base difference images (BD) and percentage base difference images (PBD) are transformed into dimming masks.First the BD and PBD images are thresholded and the intersection of these initial masks is obtained.Then only those clusters that overlap with the union of all previous PDMs (see Fig. 4) are kept, creating the total dimming mask.The largest dimming area is extracted and stored as the maximum dimming mask.Both masks are used to extract dimming characteristics by overlaying these with the original BDs.As an example, this procedure is shown for October 23, 2012, 08:28 UTC.quick-look images -provides the fewest artifacts in the difference images, and still allows the slower EUV waves to be detected.To further reduce the impact of changes in the very brightest regions of the images on the number of artifacts in RDs (for example caused by slowly moving bright loops or flares), the RDs are divided by the earlier of the two images creating percentage running difference images (PRDs) that show relative instead of absolute changes in brightness.
The EUV wave detector is dependent on an external detector providing a starting location and time of the EUV wave.The Solar Demon flare detector is currently used for this.For each flare detected by Solar Demon in 9.4 nm images, 21.1 nm images are selected from 10 min before the flare starts up to the detected end time of the flare, but with a minimum of 60 min of images after the flare start time.To be able to characterize the EUV wave in different directions, the solar images are derotated such that the eruption center is located at the center of the solar disk (see Fig. 7).This process also compensates for limb brightening effects.These derotated images are then used to calculate the PRDs, which are polar transformed around the eruption center.By combining (binning) sections of 15 degrees without overlap, for each time step, 24 sectors around the eruption center are extracted from the polar transformed images to form distance-time plots (see Fig. 8).Bright skew lines in the distance-time plots correspond to EUV waves and other bright features (visible in the PRD images) that move away from the eruption center.

Manual EUV wave speed estimation
For each flare detected by Solar Demon, both for the synoptic quick-look and science catalog, an EUV wave web page is  available that shows an overview of the distance-time plots for all sectors around the flare eruption center.By clicking on a distance-time plot with the mouse, a user can estimate the speed of bright features (see Fig. 9).Several animations in 21.1 nm, and derived (percentage) running difference animations, as well as polar transformed difference images are also available.

Automatic EUV wave speed estimation
By creating distance-time plots for different sectors around a flare eruption center, the task of detecting and characterizing EUV waves can be described as detecting and measuring bright lines in distance-time plots.By measuring the slope of the bright lines at different distances from the eruption center, it becomes possible to measure acceleration or deceleration of EUV waves.
A well-known technique for detecting straight lines in noisy data is the Hough transform.This technique is used, for example, in the CACTus software (Robbrecht & Berghmans 2004) that autonomously detects coronal mass ejections in image sequences from coronagraphs.In CACTus a Hough transform is applied on distance-time plots, created from running difference images, by integrating pixel intensities over different angles and start times.Here we propose a modified version of this technique for the Solar Demon EUV wave detector, by first cleaning up the distance-time plots -to make the faint bright features in the distance-time plots corresponding to EUV waves stand out more -and then integrating pixel intensities along short line segments for multiple distances from the eruption center.
The distance-time plots are cleaned up to remove bright (e.g., flaring) features that have a significant influence on the line integration during a standard Hough transform, and thus on an estimated EUV wave speed.The part of the distancetime plot corresponding to a distance smaller than 100 Mm from the wave origin (i.e., the flare) is ignored in all processing steps hereafter, because this part mostly shows flaring activity and related artifacts.An algorithm was developed that keeps only line segments that fall within an expected range of angles,3 and effectively filters out line segments in the distance-time plots that are too small to be EUV waves.By not relying on the integration of line segments, but instead applying a median-based line integration method, this filtering also takes into account the noisy nature of EUV waves.The linefiltering algorithm is described in detail in Algorithm 1 and its effect on distance-time plots can be seen in Figure 10.
After line filtering all 24 distance-time plots around the eruption centers, Hough transforms are applied at different intervals to determine the slope (and intensity) of the brightest remaining linear feature in the distance-time plots.The Hough transform is applied at fixed intervals of 150 Mm, starting at 100 Mm from the wave origin going up to 750 Mm in steps of 25 Mm (i.e.,. . .,.From the resulting Hough transformed images, the brightest region is extracted by selecting the top 0.2% brightest pixels, and keeping the largest connected cluster.The barycenter of this cluster corresponds to the brightest linear feature in the distance-time plot at that specific distance range with a specific angle (speed) and time.By using a brightest region  for each line in lines do 4: Initialize temp_image 5: for each location in image do 6: line_pixels = getPixelValues (image, line) .linepixels is now a list of pixel values centered on location (with a defined angle and length provided in line) 7: temp_image[loc] = median(line_pixels) 8: end for 9: filtered_image = maximum( filtered_image, temp_ image) 10: end for 11: return filtered_image 12: end procedure instead of the absolute maximum value, the speed determination process is more robust against single bright outliers in the Hough transformed images.Furthermore, this process also provides sub-pixel accuracy, thereby increasing the precision of the estimation of speed and time.See Figure 11 for a comparison of detected EUV wave speeds for filtered and unfiltered distance-time plots.
One of the problems inherent to all current EUV wave speed determination methods known to the authors, is that EUV waves are assumed to be traveling along the photosphere.In reality, they are three-dimensional structures the ''bulk'' of which is moving somewhere higher up in the corona.When the distance from the EUV wave to the photosphere is uncertain (and maybe changing over time, e.g., due to reflections), errors are introduced in the measured EUV wave speeds.This is especially true for events occurring close to the edge of the Sun, where for example a slow-moving EUV wave slightly higher up in the corona can produce very fast speed estimates simply due to incorrect projection assumptions. 4ear the center of the Sun, the estimated EUV wave speeds will be more accurate, because the events are seen almost face on.

Results
Solar Demon is a recent project, which means that the focus has been on optimizing the algorithm, data ingestion, and output, and not yet on scientific studies exploiting the potential of the software.Nevertheless, some preliminary results are presented, which, apart from being interesting in their own right, tend to indicate the consistency of the algorithm's results with existing knowledge.
The Solar Demon flare and dimming detectors have processed all AIA synoptic science data since the beginning of the SDO mission (May 2010), and have detected 6,450 flares (of which 12% are off-disk) and 3,697 dimming events (42% off-disk) during this rising phase of Solar Cycle 24.For this same interval, the NOAA Solar X-ray Flares list from the GOES satellite has detected 6,158 flares from C1 and above.
For 525 out of the 600 M-and X-class flares detected by GOES, there is a corresponding Solar Demon flare detection found within 30 min around the GOES flare peak time.Similarly, for 435 out of 452 flares that are of an estimated M-or Xclass detected by Solar Demon a corresponding GOES flare detection was found.The median peak time delay for flares detected by Solar Demon (in 9.4 nm) is 5 min when compared to the GOES X-ray flare peak time.
Figure 12 shows the cumulative counts of detected events for the on-disk events.While the event count number differs by more than a factor of 2 for dimmings and flares, both graphs show very similar trends, with activity in the southern hemisphere trailing that of the northern hemisphere.In late 2013, both the flaring and dimming activity in the southern hemisphere show a strong increase, and by early 2014, the cumulative count of both flares and dimmings is now greater in the southern hemisphere.This indicates that Solar Cycle 24 shows a double peak in activity, with the second peak -caused by the increase of southern hemispherical activity in late 2013 -being particularly strong.The relatively high number of off-limb detections for dimmings (compared to flares) illustrates that Solar Demon not only detects a broad range of dimming event types, including off-limb jets causing absorption and hence darkening, but also that dimmings are less localized to active regions, which means that some of the dimming events originating at the back side of the Sun can also partially be detected.
Figure 13 shows the location of all detected flares and dimmings in Stonyhurst heliographic coordinates.Both flares and dimmings are concentrated around two latitude bands on either side of the equator, but dimmings are more spread out over the solar disk (and off-limb) than the flares.This can be explained by the fact that flares are typically concentrated in the centers of active regions while (the barycenters of) dimmings are often more pronounced in one direction close to an active region.Dimmings are also extended phenomena -unlike flares, which are very much localized -causing an additional drift of the measured barycenter during the event.
By transforming the Stonyhurst longitudes into Carrington longitudes, defined by a Carrington rotation (with a synodic rotation period of 27.2753 days, roughly corresponding to features at a latitude of 26°), the location of flares and dimmings can be compared over a longer period of time.The results can be seen in Figures 14 and 15.For both flares and dimmings, two ''active'' longitudes can be seen around 100°and 220°.There is also a notable ''inactive'' longitude visible around 300°, particularly in the southern hemisphere.However, it remains difficult to interpret these data, because on the one hand only the rising phase of Solar Cycle 24 has been observed, and on the other hand single active regions can bias these findings when they happen to flare relatively often (even in a short amount of time).
The butterfly diagrams in Figure 16 show that both flares and (to a lesser extent) dimmings form in two latitudinal bands.These bands are first located at low mid-latitudes (most poleward border % 35°for flares and % 40-45°for dimmings) during solar minimum, then widen and move toward the equator as Solar Cycle 24 progresses.Such a behavior was to be expected, since both flares and dimmings most often take place in the vicinity of sunspots, which obey the famous Sporer's law (Maunder 1904) with the most poleward border of the bands starting at latitudes % 35°.The diagrams also show the sudden increase in activity at the southern hemisphere in late 2013.A color code was used to distinguish between flare classes, and to distinguish between dimming detection intensities (see Fig. 16).There does not seem to be a significant difference between the distribution in the butterfly diagrams of weak versus strong events.
Figure 17 shows the results of the Solar Demon EUV wave detector on four different events: June 12, 2010, February 13, 2011, February 15, 2011, and March 12, 2011.For each of these events the EUV wave was tracked in one selected sector    (2014).For example, the February 13 event was also studied by Long et al. (2014) who found an initial speed of 459 ± 75 km s À1 where Solar Demon found speeds of 457, 454, 457, and 429 km s À1 for the first 200-350 Mm away from the eruption center.

Conclusions
The Solar Demon software suite for automatic detection of flares, dimmings, and EUV waves was introduced.It is currently the only software that combines detection of flares, dimmings, and EUV waves.One instance of Solar Demon runs in near real-time on AIA synoptic quick-look images, providing fast5 detections of flares, dimmings, and EUV waves for space weather purposes.For each detected event, statistics such as start, end, and peak time, location, etc. are generated, along with light curves, original and detection mask images and movies.This kind of information is of great help to space weather forecasters.
A second Solar Demon instance regularly processes new AIA synoptic science images6 to build dedicated science quality catalogs, featuring the same kind of output as the near realtime version, but based on higher quality science input images at a cadence of 2 min rather than 3 min.The detection algorithms behind Solar Demon were explained and illustrated by examples in Sections 2 and 3, with a focus on the EUV wave algorithms in Section 3.
The automatic detections of Solar Demon allow to build large catalogs with quantifiable results on a reproducible basis.Between May 2010 and November 2014, more than 6,400 flares and 3,600 dimmings were detected.The dimming catalog includes a broad range of events, including off-limb jets causing absorption and hence darkening, but also cooling loop structures.However, dimmings that develop on a slow timescale (much longer than 6 min) may not be detected.Future work could involve further categorizing the ''dimming'' event types into real dimmings versus other event types causing darkening regions, and improving the detection for slow dimming events.The Solar Demon catalogs enable systematic statistical studies of the properties of flares, dimmings, and (in the near future) EUV waves.The examples presented in Section 4 (cumulative number of detected flares and dimmings during Solar Cycle 24; distribution of flares and dimmings in Stonyhurst and Carrington coordinates; flare and dimming butterfly diagrams; and EUV wave speed determination) are just some straightforward applications, and their agreement with previous knowledge corroborates the Solar Demon detections.
By virtue of the way in which the algorithms were conceived, very accurate representations of the flaring region or dimming region are obtained, on pixel rather than macropixel basis, which opens the way toward morphological studies.
Since Solar Demon is a recent project, its results were not yet compared to those of similar methods.Future work could involve the detailed comparison of both detection rates and actual parameters of flare detections, between Solar Demon and the methods outlined in Section 1, or a list of flares as observed in the GOES X-ray flux.Likewise, Solar Demon dimming detection rates and results could be compared to those of the dimming detection algorithms or studies described in Section 1.
At present, Solar Demon does not detect EUV waves automatically.Instead, it relies on its flare detection algorithm to indicate time intervals and locations when and where potential EUV waves may occur.For every detected flare, the EUV wave characterization procedure is started automatically.If an EUV wave occurred, Solar Demon will most probably have no problem determining its velocity and deceleration in several directions.What is still lacking, is a criterion to decide whether there really was an EUV wave or not near that time interval and location.One way to address this problem, is to set thresholds based on the brightness of the maximum region in the Hough transformed distance-time plots, and to combine the currently independent EUV wave speed estimates for each segment.This work is in progress.Hence, there is no extensive Solar Demon catalog of EUV waves yet.Addressing this challenge is one of the highest priorities for Solar Demon.Additionally, the Solar Demon dimming detector could be envisaged as an extra trigger for starting the EUV wave characterization procedure.
While Solar Demon currently employs an input image cadence of 2 min for the science detections, (non-synoptic) AIA science images are available at a cadence of 12 s.It will be interesting to verify whether the detections in general, and the estimation of EUV wave velocity and deceleration in specific, will benefit from using a cadence of 24 s (corresponding to skipping every other AIA science image to avoid the effects of AEC) rather than 2 min.Furthermore, as AEC affected images are excluded from the synoptic science data, it would be interesting to compare 21.1 nm and 19.3 nm results for EUV waves and dimmings using synoptic science data.
As pointed out in Section 3.4, the expected overestimation of EUV wave speeds near the edge of the Sun (EUV waves can never be seen below the photosphere, only higher up) can be quantified and maybe to a certain extent corrected for -when a sufficiently large EUV wave catalog has been created.
Another future project could be to extend Solar Demon detections to off-limb prominence eruptions.By virtue of the central role of tracking brightness changes in the Solar Demon paradigm, the authors expect that only slight modification of the algorithms will be required for this task.

Fig. 1 .
Fig. 1.For each flare the light curve is shown as an interactive graph on the Solar Demon website.Users can hover over the plot with the mouse to show the corresponding flare image.Flare movies can also be downloaded in various formats.The vertical axis of the light curve displays the summed flare brightness in 10 3 DN s À1 .The horizontal axis shows the evolution of the flare in discrete time steps corresponding to the image cadence.The absolute time and flare brightness are indicated below the plot and on the flare images as the user hovers over the light curve.

Fig. 2 .
Fig. 2. The brightness curve obtained from daily 21.1 nm AIA images between July 2010 and March 2011.This curve is used during derotation of images to correct for coronal features appearing brighter or darker because of image derotation and the limb brightening effect.

Fig. 3 .
Fig. 3.A running difference image (a) and a percentage running difference image (b) showing changes in brightness in 21.1 nm AIA images taken on December 12, 2014 at 03:36 UTC.One of the two 21.1 nm images used to create the difference images is shown at the (c).

Fig. 6 .
Fig. 6.Near real-time overview of detected dimmings displayed on the Solar Demon website.

Fig. 7 .
Fig. 7. Image in the 21.1 nm AIA channel rotated such that an M6.5 flare occurring on July 8, 2014 at 16:22 UTC is placed at the center of the disk.

Fig. 8 .
Fig. 8. Distance-time plots displayed on the Solar Demon website for an M6.5 flare occurring on July 8, 2014 around 16:10-17:32 UTC.The 24 plots show an EUV wave moving away from the eruption center in 15°non-overlapping sectors.

Fig. 9 .
Fig. 9. EUV wave speed estimated by calculating the slope of a drawn line on a distance-time plot on the Solar Demon website.The EUV wave event corresponds to an X2.3 flare occurring on February 15, 2011 at 01:48 UTC.

Fig. 10 .
Fig. 10.Artifacts are removed from distance-time plots by filtering on expected line segments (angles and length).This effectively increases the visibility of the EUV waves.The top row contains unfiltered distance-time plots, the bottom row shows the corresponding line-filtered results.

Fig. 11 .
Fig. 11.Applying a Hough transform on original (top row) and filtered (bottom row) distance-time plots shows a more accurate EUV wave speed estimation in the latter case.The first column shows the distance-time plots.The second column shows the result of a Hough transform of the distance time plots for the first 100-250 Mm.The third column shows the ''brightest'' EUV wave detected, corresponding to a vertical feature caused by ''flickering'' in running difference images due to flaring in the top panel, and the actual EUV wave in the bottom panel.The last column displays all detected EUV wave segments projected on the distance-time plots.

Fig. 12 .
Fig. 12. Cumulative count of flares (a) and dimmings (b) detected by Solar Demon in the northern and southern hemisphere for May 2010-November 2014.The northern hemisphere shows an increased flaring and dimming activity earlier than the southern hemisphere.Off-limb detections are excluded, because they have no longitude or latitude coordinates available.

Fig. 13 .
Fig. 13.An overview of all flares (a) and dimmings (b) detected by Solar Demon in Stonyhurst heliographic coordinates for May 2010-November 2014.Each event is depicted as a series of dots displaying the intensity-weighted barycenter of the flare or dimming throughout multiple images.

Fig. 16 .
Fig. 16.Butterfly diagrams displaying the solar latitude of all detected flares and dimmings from May 2010 till November 2014.The yellow colors in the flare diagram (a) represent estimated flare classes below C5, orange is from C5 to below M1, black is from M1 to below X1, and red is X1 and above.For the dimmings diagram (b) the yellow dots show dimmings exceeding the detection threshold less than 20 times, orange is from 20 to below 100 times, black is from 100 to below 500 times, and the red dots show the dimming events that exceeded the detection threshold 500 times or more.

Fig. 17 .
Fig. 17.EUV wave characterization by Solar Demon.The distance-time plots are scaled such that the EUV waves appear to be of comparable brightness; a uniform background in the distance-time plots corresponds to a more pronounced EUV wave.

Table 1 .
To reduce the number of false detections on data, caused by image artifacts, the image quality is tested before event detection.An overview of the number of SDO/AIA images that failed or passed these tests between January 1, 2014 and November 20, 2014 is provided in this table.