Sunspot Rotation in High- and Low-Flaring Active Regions

Sunspot rotations are closely linked with flaring activity. They are thought to contribute to the accumulation of helicity in magnetic flux tubes and to triggering magnetic reconnection in large solar flares. This link to solar flares has led to sunspot rotations being used as a parameter in solar flare prediction methods, but analysis for long-period observations of rotations in the literature is scarce. In this study, the rotation profiles of sunspots in a selection of six active regions are studied over time periods of 5 – 10 days to measure how sunspot rotation varies as active regions develop. The active regions are divided into two categories: high-flaring groups, which produced at least one X-class flare, and low-flaring regions that had little flaring activity. Comparison of the rotation profiles in these regions showed that young complex sunspot groups exhibit faster angular velocities and more frequent changes in rotation than older single-spot groups and, although the most rotating groups were also the most flare-productive, sudden changes in rotation were found to not definitively indicate an imminent eruption.


Introduction
Sunspot rotation has long been identified as a key feature of flaring active regions (Gopasyuk and Moreton, 1967;Brown et al., 2003;Yan and Qu, 2007;Zhang, Liu, and Zhang, 2008;Min and Chae, 2009;Green et al., 2018). Many of the studies into sunspot rotation examine the phenomenon in the context of a significant solar flare (Ruan et al., 2014;Wang et al., 2014Wang et al., , 2016Yan et al., 2018) rather than as a component of the evolution of the active region as a whole. Common to all these studies is the appearance of a sudden change in the rotational velocity of part or all of the sunspot umbra, typically of the order of 2 to 50 • hr −1  for a period of minutes to hours after the flare, and in some cases reversing the rotation direction of the spot (Bi et al., 2016). In Liu et al. (2016), high spatial and temporal resolution instruments were used to observe the rotation of a small sunspot occurring in the wake of a passing flare ribbon. This provided a direct observation of a sunspot rotating in response to a passing flare ribbon, lending support to the idea that the large angular velocities seen during solar flares are caused by a back-reaction from the magnetic reconnection triggering the flare.
However, sunspots are also seen to rotate for many hours before large eruptions, leading to the suggestion that the sustained, slow rotations contribute to the occurrence of flaring activity (Stenflo, 1969;Brown et al., 2003;Yan and Qu, 2007). Studies have shown that the amount of energy injected into the overlying magnetic fields via the twisting of the photospheric field is of the correct order of magnitude to supply such flares (Li and Liu, 2015;Wang et al., 2016), implying that there is a direct relationship between rotations and the triggering of solar flares. If such a direct link exists, this would provide an observable feature that could be used in solar flare prediction algorithms. A statistical study by Yan, Qu, and Kong (2008) classified 186 active regions into 60 categories based on the rotation pattern of the magnetic polarities in an attempt to identify the configurations most susceptible for producing flares. The study found some configurations, such as those with opposite polarities rotating in the same direction, produced more flares than others, however, the study stopped short of using these classifications to predict flares.
For sunspot rotation to be a reliable parameter used in flare prediction models, there must be a reliable method of determining the rotational velocity of sunspot umbrae that can be applied automatically to large data sets (such as those from the Helioseismic and Magnetic Imager (HMI) on board the Solar Dynamics Observatory (SDO)), and can also handle complex configurations of sunspot umbrae. It is also essential to develop an understanding of how the rotational behaviour of sunspot groups changes over time in the absence of flaring activity.
In this study, sunspot rotation is measured using an ellipse fitting technique, which offers fast computation times for sunspot angles and is easily automated for application to large data sets. Ellipse fitting has been shown to be effective at identifying rotations in small timescale events (Bi et al., 2016;Grimes, Pintér, and Morgan, 2020) which, if transferable to longer timescales, offers a fast alternative to other rotation detection methods for the development of automated rotation detection software. The rotation profile of sunspots in six active regions is studied over a period of 5 -10 days to establish how their rotation changes over time. The spots in low-and high-flaring active regions are then compared to identify common features and behaviours. It is expected that the high-flaring regions will show a greater magnitude of rotation, particularly in the few days before large flares, when compared with the low-flaring regions.

Method and Data
Six NOAA active regions were selected and divided into sets: those, which had at least one associated X-class flare and those that showed little to no flaring activity. The selected active regions NOAA 11289, NOAA 11504, NOAA 11899 in low-flaring and NOAA 11158, NOAA 11166, NOAA 11944 in the high-flaring category were chosen to provide a mix of sunspot group configurations in both categories, though there still remains a skew towards complex groups in the high-flaring category and single spots in the low-flaring category. NOAA 11289, NOAA 11899, and NOAA 11944 are dominated by a single large umbra, whereas NOAA 11158, NOAA 11166, and NOAA 11504 consist of multiple umbrae of different magnetic polarities.
The flare occurrence and peak flux for each active region were obtained from the Heliophysics Events Knowledgebase (HEK) data via SolarMonitor (https://www.solarmonitor. org/). C-class flares and below are not included as spots small enough to be affected by these  flares are likely too small to be resolved well by HMI. Table 1 and Table 2 show the number of flares and their X-ray class for the low-flaring and high-flaring regions, respectively. Continuum intensity images from the HMI instrument on SDO are sampled at a cadence of one hour for the duration that the active regions were visible on the solar disc (ranging between 5 -10 days). The full-disc HMI images are subsequently de-rotated to remove projection effects using functions built-in to the SunPy library (see Brown and Walker (2021) for a description of the problem), and have limb-darkening removed.
Each active region is then analysed using the Multi-Layer Threshold (MLT) method outlined in Grimes, Pintér, and Morgan (2020), which applies multiple binary threshold operations to input images to build up a 2.5D representation of the sunspots in the active region. The thresholds are chosen in a range between 10% and 60% of the average quiet-Sun intensity (denoted as 0.10 -0.60 I qs ), to capture pixels from umbral centre out to the umbrapenumbra boundary. At each threshold layer the pixels belonging to umbrae are grouped together into clusters using the OPTICS (Ordering Points To Identify the Clustering Structure) clustering algorithm (Ankerst et al., 1999), and tracked across multiple images and threshold layers. For each of these clusters, a least-squares algebraic ellipse fitting algorithm based on the algorithm in Halir and Flusser (1998) is used to measure the rotation of each cluster at each layer. The angle of the major axis to the normal can then be used to measure the rotation rate of the spot. This technique is applied to all identified umbrae within the active region, however, when observing sunspot groups over long periods, not all umbrae maintain a stable perimeter for the entire data set. Thus, in the analysis of the six active regions, only umbrae that remain stable for at least half of the data set are considered. Furthermore, a box-car 5-point rolling average is applied to the angle data to reduce noise from small disruptions of the perimeter.
Even those clusters that remain stable for long periods of time experience occasional disruptions to their perimeter. This can be caused by spontaneous flux emergence or, more frequently, merges between spots. When observing over long time scales, such merges are inevitable and can cause significant disruption to the angle-time graphs, which might be confused for a sudden spike in rotation. In the presented results, the graphs have been shaded grey during times when a spot is seen to experience a merge or is in close proximity to another spot that disrupts its perimeter. These grey regions do not indicate that the data in Figure 1 (a -c) HMI continuum images of NOAA 11289 with cluster perimeter and the best-fitting ellipse from the 0.60 and 0.20 I qs layers superimposed. (d) and (e) show the major axis angle for clusters in Spot 0 (labelled C0) and 1 (labelled C1), respectively. The angle for each layer is colour coded according to the colour bars in (a -c). The black line is the mean average of all layers. The red and blue lines above each graph indicate the regions where the velocities were sampled. The grey shaded areas indicate the times when the spot is in close proximity to, or merging with, other spots. the period are unreliable, but merely that large jumps in rotation are known to be due to non-rotational phenomena.

Low-Flaring Spots
NOAA 11289 is a single-spot active region remnant that continues to decay throughout the observation (Figure 1a-c). The spot features a light-bridge dividing it into two separate umbral regions, which are treated as two distinct regions by the MLT process -identified as Spot 0 and Spot 1. Both of these regions show a steady anti-clockwise rotation over a period of 5 to 6 days with an average angular velocity of 0.34 and 0.28 • hr −1 , respectively (Figure 1d-e). These measurements describe the rotation of the spots around their centre point, as even the 0.60 I qs threshold eventually breaks the umbral region up into separate spots. To measure the rotation of the umbra as a whole, we can instead use the angle between the line bisecting the centres of both spots and the normal, i.e. measuring the rotation of one spot around the other. Using this method, the angular velocity of the spot is 0.45 • hr −1 . NOAA 11899 is a large single-spot active region remnant that dominates its local environment (Figure 2a-c). The spot does experience a merge with one of the smaller companion spots, however, this does not significantly affect the spot area or the shape of the perimeter at the time of merge. The spot is not visible for the majority of the lead up to the M1.0-class flare near the start of the data (peak flux marked by the dotted red line in Figure 2d), and experiences no further M-or X-class flares. During the first few hours of the data set, there is a disruption to the shape of the spot that causes a sudden jump in the angle graph, however, this is not a physical rotation. The spot does experience a small amount of rotation over the observation period, averaging an anti-clockwise rotation of 0.09 • hr −1 (11 degrees over 118 hours).
NOAA 11504 is a developing active region that goes through significant amount of flux emergence in the region between the main leading and trailing spots (Figure 3a-c). The leading and trailing spots frequently experience an influx of pores, disrupting the perimeter causing sudden changes in the angle graphs, particularly noticeable in the angle graph of Spot 0 (Figure 3d). Although the spot does not experience any X-class flares, there are five M-class flares associated with the active region, three of which occurred outside the observation window. The first observed flare was an M1.2 flare with a peak flux occurring at 13 June 2012 11:29 UT, and the second observed flare was an M1.9-class flare with a peak flux occurring at 14 June 2012 12:52 UT. Spot 0 was the only one of the two spots that experienced both flares, and there are clear changes in the rotation profile before and after the final M1.9 flare. Changes in the rotation of the spot before the first flare are difficult to determine as the large jumps in angle around 00:00 UT on 13 June 2012 are caused by merges with nearby pores disrupting the perimeter. However, a few hours before the peak of the first flare, the spot rotates clockwise at −2.2 • hr −1 and remains rotating at this speed unperturbed by the flare. Before the second flare, Spot 0 is again disrupted by a merge with a pore, which is captured at every threshold level, before continuing to rotate at −3.3 • hr −1 before the M1.9 flare. During this flare, a sudden reversal in rotation is seen, and the spot continues to rotate in this new anti-clockwise direction at a much slower average velocity of 0.76 • hr −1 for the rest of the data set.
Spot 1 is a much smaller spot for much of the data set, having formed a day later than Spot 0 and accreting many smaller pores in the time before the second flare. Because the disruptions to the shape of the spot occur at different rates and magnitudes at different layers, the average line produces a much smaller value for the average rotation (−0.86 • hr −1 ) than when the layers are examined individually (Figure 3e). The outer seven layers (0.55 to 0.35) show angular velocities of −2.2 • hr −1 , decreasing to −1.9 • hr −1 for clusters closer to the centre (0.25 to 0.30). The innermost layers (0.20 an 0.225) are too erratic in this period to get a reliable measurement. For approximately 8 hours before and after the second flare, the spot appears to almost stop rotating, before continuing to rotate again in the same direction and speed as before the flare for a short duration. Aside from a few jumps in the angle caused by the occasional merging or flux emergence, Spot 1 shows no measurable rotation after 15 June 2012 18:00 UT.

High-Flaring Spots
NOAA 11158 is a multi-spot group consisting of five distinct umbral regions at the time of the associated X2.2 flare (Figure 4a-c). The observations of this group were taken between 12 February 2011 00:00 UT and 18 February 2011 00:00 UT, shortly after the spot formed on the Earth-facing side of the Sun. The spot group consists of a leading (Spot 0) and trailing spot (Spot 3) with a δ-spot in the centre comprised of three other distinct umbrae (Spots 1,  2, 4). The photospheric motion of this spot has been extensively studied (Jiang et al., 2012;Wang et al., 2014;Li and Liu, 2015), all the works concluded that the rotational and shearing-motions of the sunspot umbrae had an effect on the resulting X2.2 flare.
The leading spot, Spot 0, rapidly develops in the first 8 hours and undergoes a substantial anti-clockwise rotation of 10.6 • hr −1 in this time (Figure 4d). This rotation is reversed soon after the spot reaches a stable size, and the spot then rotates clockwise at a rate of −3.9 • hr −1 , lasting from just before the first M-class flare and up until the X2.2 flare. Immediately after the flare, the rotation appears to reverse for a time, before coming to a halt approximately 12 hours later.
The small size and irregular shape of Spot 1 results in a lot of discontinuities in its angle graph (Figure 4e). In general, the spot shows very little rotation activity in the lead up to the flare. The discontinuity in the graph shortly after the flare is due to a change in the shape of the spot, likely as a result of the flare (potentially due to white-light contamination from the flare (Yan et al., 2018;Grimes, Pintér, and Morgan, 2020)). The most notable rotations in this spot occur after the last observed M-class flare, after which the spot begins rotating clockwise at a velocity of −2.2 • hr −1 for 23.5 hours. Although showing no rotation around its centre point, the shearing motion of the spot as it moves across the polarity inversion line is a contributing factor to the X-class flare.
There is a large amount of disagreement between the threshold layers in Spot 2 (Figure 4f), likely due to its small size and the difficulty of distinguishing it within the δ-spot over long periods of time. In the 36 hours before the X2.2 flare the spot averages 2.0 • hr −1 of rotation, then a period of little to no rotation is seen before the spot continues to rotate, now in the opposite direction. Between 15 February 2011 19:14 UT and 17 February 2011 08:12 UT, the spot rotates at an average velocity of −4.9 • hr −1 , seemingly undisturbed by the three successive M-class flares. During this time, the spot sees a lot of inflow from the pores near the delta spot, causing several disruptions to its perimeter.
The trailing spot, Spot 3, is one of the first umbrae to form (along with Spots 0 and 4) and shows a rapid anti-clockwise rotation of 4.6 • hr −1 from the start until shortly before the X-class flare (Figure 4g). Immediately following the flare, the spot is seen to almost completely stop rotating, slowing down to −0.72 • hr −1 as it rotates in the opposite direction (clockwise). As with the other spots, there is no apparent change in the rotation during the subsequent three M-class flares, however, shortly after these flares the spot completely decays.
Spot 4 initially shows an anti-clockwise rotation of 3.3 • hr −1 until 14 February 2011 02:55 UT, several hours after the first M-class flare, when the rotation direction is reversed (Figure 4h). The spot then begins rotating clockwise at −2.5 • hr −1 until 14 February 2011 19:43 UT, 5.7 hours before the X-class flare, when the spot yet again reverses direction rotating at 3.0 • hr −1 . The X2.2 flare does not have an impact on the rotational velocity of the spot, which only changes 7 hours after the flare, when the rotation appears to stop. Although the rotation graph is unaffected by the next three M-class flares, the spot quickly decays after the last flare.   the shape of the spot as it merges with a group of pores that formed nearby, causing several large jumps in the rotation profile leading up to the first M1.7 flare. Any effect that the M1.7 flare had on Spot 0 is not seen in this data due to the merges disrupting the perimeter during this time, though the spot continues to rotate anti-clockwise until the X1.5 flare. The spot experiences two more reversals in rotation direction, shortly after the X1.5 flare, resulting in a rotation of −1.0 • hr −1 for approximately 14 hours, and then again in the hour before the final M1.1 flare, resulting in an anti-clockwise rotation of 0.83 • hr −1 for 8 hours afterwards.
Spot 1 is identified 12 hours later than Spot 0, at which point it is seen to be rotating in the opposite direction (Figure 5e). In the first 20 hours the angular speed averages 3.5 • hr −1 , though this decreases to 0.80 • hr −1 for the next 29 hours as the spot merges with other pores in the lead up to the first M1.7 flare. In the time between the M1.7 and X1.5 flares the spot has reversed rotation direction (once again opposing the direction of Spot 0), averaging −1.0 • hr −1 . The spot changes rotation direction once again after the X1.5 flare, showing a much reduced angular velocity (now 0.62 • hr −1 ), but also seemingly unaffected by the final M1.1 flare. There is a sudden drop in the angle in the last 6 hours of the data set, during which the spot rapidly shrinks in size and begins to decay. NOAA 11944 is observed between 3 January 2014 00:00 UT and 12 January 2014 00:00 UT (Figure 6a-c). The active region consists of a large leading sunspot with a smaller companion spot already established when the active region rotates into view, and a trailing region of smaller pores. There are 4 M-and X-flares associated with this spot during the observation window, each of which has successively higher X-ray flux. Both of the main spots in this group have smaller companion spots that merge with the main spot during the observation window.
At the start of the data set Spot 0 (Figure 6d) rotates clockwise at a velocity of −1.9 • hr −1 until the start of the merge with its companion at 4 January 2014 01:00 UT, which causes the spot to change rotation direction and decrease speed (0.64 • hr −1 ). This anti-clockwise rotation persists for 36 hours until, some time later, the spot has completely merged at all layers. At 5 January 2014 14:00 UT the spot resumes rotating clockwise at a similar speed to when it was rotating at the start of the data set (−1.6 • hr −1 ). This rotation starts to slow down on 7 January 2014 05:00 UT showing almost no rotation in the hours before the X1.7 flare and for the rest of the data set.
Initially, Spot 1 ( Figure 6e) shows very little rotation, the first significant change in rotation angle is co-temporal with the first M-class flares associated with NOAA 11944, however, much of Spot 1 rotational behaviour is dominated by its interactions with companion spots. After the last M-class flare, there is some disruption to the shape of the umbra caused by the merging with its companion spots. The perimeter of the spot is stabilised at 7 January 2014 06:00 UT when it continues rotating anti-clockwise at an average of 0.57 • hr −1 before the X1.7 flare. The flare itself does not seem to have any immediate effect on the angular velocity, which remains at a very small anti-clockwise rotation until 8 January 2014 01:00 UT when it stops rotating. At 9 January 2014 11:00 UT, however, the spot is seen to suddenly start rotating anti-clockwise, averaging 1.58 • hr −1 until the end of the data set. No more flares are recorded after this point.

Conclusion
Across all of the active regions examined in this article, there are a number of commonalities observed in the rotational behaviour of sunspot groups. As expected, the higher-flaring regions show much higher average angular velocity values (e.g. −4.8 • hr −1 in NOAA 11166, 10.6 • hr −1 in NOAA 11158) than the older and least flare-producing spots (0.45 • hr −1 in NOAA 11289 and 0.13 • hr −1 in NOAA 11899). The speed of these rotations, however, does not appear to directly correlate with the strength or frequency of occurrence of the flares. In some cases, the peak angular velocities of the flaring regions occur early on in their life time during formation or interactions with nearby spots. In several instances, rotational velocities of the magnitude seen before some X-class flares do not produce such flares in other active regions (e.g. Spot 0 in NOAA 11166 rotated at −4.8 • hr −1 for 11 hours without producing an X-class flare until almost 4 days later). Thus, information on the angular velocity alone is not sufficient to predict the strength of a subsequent flare or the likelihood that one will occur.
Of the three low-flaring sunspot groups, two (NOAA 11289 and 11899) are older active region remnants which show little to no flux emergence, and are in the process of decaying. Conversely, the high-flaring regions are comprised of younger active regions, which show a significant amount of flux emergence during the observation time, with the initial formation of NOAA 11158 (containing some of the fastest rotating spots in the study) being well observed by HMI. The correlation between rotation rate and young spots has been noted before (Brown et al., 2003) and is further supported by the results in this work, however, it is not known why this is seen. The younger spots in this study also show more frequent changes in rotation direction than the older, single spot groups. This cannot be attributed to more frequent merges in groups with more spots and pores, as the changes also occur when spots are not merging. These differences in behaviour with age are likely influenced by several factors, such as the presence of other flux tubes, the stability of the flux tube below the surface, and how much twist exists in the initial rising flux tube.
From the results of the high-flaring regions, and the low-flaring region NOAA 11504, it is seen that large to moderate flares have an impact on the rotation of individual spots in the active region. In the case of X-class flares, this is seen as reversals in rotation direction of umbrae (which occur over longer periods of time than the short-period rotations believed to be the result of a back-reaction of magnetic reconnection (Fisher et al., 2012;Liu et al., 2016)), however, even in the smaller M1.9 flare of NOAA 11504 the rotation of the spot is slowed considerably in the time after the flare. In all but two cases, the rotation of sunspots is slowed down for several hours after an X-class flare, which would suggest that some of the energy in the rotating spots is being released in the flare as the overlying magnetic field is reconfigured. Estimations of the magnetic energy contributed by the sunspot rotations are of the same order of magnitude as the energies of subsequent flares, as noted by Li and Liu (2015), Liu et al. (2016), Sturrock et al. (2015), which could result in a decreased rotational velocity post-flare. Furthermore, the effect of the back-reaction from reconnection events on long-timescale rotations has not been established. A Lorentz force of sufficient magnitude and direction could cause a large enough counter-rotation that would lead to a reduction in rotation velocity on longer timescales, however, it is not known whether this would cause a sustained rotation in the new direction or if the sub-photospheric driving mechanism would restore the original rotation direction.
The results from the low-flaring region show that axial rotation can occur even in decaying and non-flaring active regions, albeit at much decreased velocities. This suggests that rotation is a more frequently occurring feature of sunspots than has been reported in previous statistical studies. The multi-spot active regions frequently showed the two largest spots rotating in opposite directions. In three cases, the spots were of opposite polarity (e.g. Spot 0 and Spot 3 in NOAA 11158, Spot 0 and Spot 1 in NOAA 11166), however, in NOAA 11944 the oppositely rotating spots were of the same polarity. This type of rotation, classified as a Type IIIc/d according to Yan, Qu, and Kong (2008), did not appear as a significantly common occurrence in their data set, but only occurred eight times in the 153 active regions classified, and only yielded two X-class flares. The significantly higher occurrence rate in this study is most likely due to the difference in methodology.
The ellipse fitting algorithm is a fast method for determining sunspot rotation and it has been shown to produce adequate results for long-period observations. The method does, however, encounter issues when the sunspot boundary suddenly changes shape due to merging with nearby pores. This is a problem encountered when measuring sunspot rotation using the umbral boundary over periods of time long enough for the spot to change shape. MLT mitigates this shortcoming by applying the algorithm to multiple layers, however, this problem will still exist for methods which assume a sunspot perimeter that is stable over long time frames. It is therefore important that other parameters, such as the motion of pores and frequently changing spot perimeters of newly emerging regions, are accounted for in future studies that aim to produce robust, fully-automated rotation detection methods. Funding R. Grimes is supported by an STFC studentship (ST/N503915/1) to Aberystwyth University.

Data Availability
The data in this work is provided courtesy of NASA/SDO and the HMI science teams, and is available from the JSOC database http://jsoc.stanford.edu/.

Code Availability
The source code for the MLT software is available at https://github.com/TheScienceotter/ sunspot_mlt under a Creative Commons Attribution-ShareAlike 4.0 International Public License.

Disclosure of Potential Conflicts of Interest
The authors declare that they have no conflict of interest.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.