AutoTAB: Automatic Tracking Algorithm for Bipolar Magnetic Regions

Bipolar magnetic regions (BMRs) provide crucial information about solar magnetism. They exhibit varying morphology and magnetic properties throughout their lifetime, and studying these properties can provide valuable insights into the workings of the solar dynamo. The majority of previous studies have counted every detected BMR as a new one and have not been able to study the full life history of each BMR. To address this issue, we have developed Automatic Tracking Algorithm for BMRs (AutoTAB) that tracks the BMRs for their entire lifetime or throughout their disk passage. AutoTAB uses the binary maps of detected BMRs and their overlapping criterion to automatically track the regions. In this first article of this project, we provide a detailed description of the working of the algorithm and evaluate its strengths and weaknesses by comparing it with existing algorithms. AutoTAB excels in tracking even for the small BMRs (with a flux of ∼1020 Mx), and it has successfully tracked 9152 BMRs over the last two solar cycles (1996–2020), providing a comprehensive data set that depicts the evolution of various properties for each BMR. The tracked BMRs exhibit the well-known butterfly diagram and 11 yr solar cycle variation, except for small BMRs, which appear at all phases of the solar cycle and show a weak latitudinal dependence. Finally, we discuss the possibility of adapting our algorithm to other data sets and expanding the technique to track other solar features in the future.


INTRODUCTION
Bipolar Magnetic Regions (BMRs) remain one of the most predominant signatures of solar magnetism as observed on the surface of the Sun.The number of such regions at a given time represents the solar activity that waxes and wanes cyclically over a period of 11 years (Schwabe 1844;Hathaway 2015).These BMRs are generally the source regions of solar eruptive events (Schrijver 2009), and hence they are crucial for the understanding of space weather conditions.BMRs are observed to be tilted by an angle with respect to the equator, which is found to increase statistically with latitude anubsreedevi.rs.phy20@itbhu.ac.in karak.phy@iitbhu.ac.in known as Joy's law (Hale et al. 1919).It is observed that the decay and dispersal of tilted BMRs produce the poloidal field in the Sun through Babcock-Leighton mechanism (Babcock 1961;Leighton 1964;Mordvinov et al. 2022).
Sunspot groups in white light observations, mimic the locations of large BMRs, and have been traditionally used for the study of BMR properties (e.g.,Howard 1991Howard , 1996;;Sivaraman et al. 2007;Dasi-Espuig et al. 2010) because of the unavailability of magnetogram data.Since the early 1970s, regular full-disk measurements of the Sun's magnetic field have been started, and now there exist vast archived data of solar magnetograms from the different ground-based (Synoptic Optical Long-term Investigations of the Sun (SOLIS; Keller et al. 2003), Global Oscillation Network Group (GONG; Harvey et al. 1996)) and space-based (Michel-son Doppler Image (MDI; Scherrer et al. 1995) and Helioseismic and Magnetic Imager (HMI;Scherrer et al. 2012)) observatories.To exploit such a large volume of data for the understanding of BMRs and solar magnetism, various automatic methods has been developed (Stenflo & Kosovichev 2012;Tlatov & Pevtsov 2014;Jha et al. 2020).In all these studies, each detection of BMRs has been treated as a new one (Stenflo & Kosovichev 2012;Jha et al. 2020).However, this approach may influence the analysis as bigger BMRs have a longer lifetime and thereby will have higher weightage in the analysis (van Driel-Gesztelyi & Green 2015).Furthermore, BMR properties, including its morphology, magnetic field strength, and tilt angle, evolve significantly over its lifetime (Ugarte-Urra et al. 2015;McClintock & Norton 2016;Getling & Buchnev 2019;Schunker et al. 2019Schunker et al. , 2020)).Hence, to overcome these limitations, it is essential to track the BMR to get insight into the physics of the formation and evolution of BMR.Moreover, the automatic detection and tracking of magnetic regions also become essential for monitoring solar activity and events (McAteer et al. 2005;LaBonte et al. 2007).Therefore, an enormous effort has been made to develop automatic algorithms to track the BMRs (Higgins et al. 2011;Muñoz-Jaramillo et al. 2016).
Solar Monitor Active Region Tracking (SMART; Higgins et al. 2011) was developed for the automatic detection and tracking of magnetic active regions in real-time for solar eruptive event prediction.Although SMART does a decent job in identifying and extracting various magnetic features, it tends to miss some quiet Sun magnetic regions.The Bipolar Active Region Detection (BARD; Muñoz-Jaramillo et al. 2016) is an another algorithm developed for the detection and tracking of BMRs.It uses similar techniques to detect BMRs as SMART but uses the dual-maximum flux-weighted overlap method for feature association.The BARD uses human supervision to correct any errors in detection and tracking.Furthermore, Space-Weather MDI Active Region Patches (SMARP; Bobra et al. 2021) and Space-Weather HMI Active Region Patches (SHARP; Bobra et al. 2014) are the data sets derived from MDI and HMI magnetograms, respectively which provide the tracked maps of active regions identified in the magnetic image of the Sun.We note that in SMARP and SHARP, active regions are not necessarily the BMRs, where a decent flux balance condition holds.
To the best of our knowledge, there is no existing catalog that can provide the properties of the individual BMRs throughout their lifetime or at least the course of their lifetimes.Therefore, we overcome the limitation of existing BMR tracking algorithms and develop a com-pletely automatic method to track the BMR, which can be implemented in all sets of magnetogram data.In Section 2, we present a detailed description of our tracking algorithm and its comparison with the existing one.In Section 3, we present some representative results based on our tracking algorithm, and finally, in Section 4, we conclude with our insight on this new algorithm.

DATA AND METHOD
In our study, we use the Line-of-Sight (LOS) magnetic field observation of the Sun usually referred as magnetogram, for the period of September 1996 to December 2019 (Cycles 23 and 24) from MDI (1996-2011;Scherrer et al. 1995) andHMI (2010-present;Scherrer et al. 2012) onboard the Solar and Heliospheric Observatory(SOHO) and Solar Dynamic Observatory (SDO), respectively.Here, we utilize all the magnetogram data from MDI, which comes with a cadence of 96 minutes in 1024×1024 resolution with a spatial resolution of 4 ′′ × 4 ′′ .Although HMI provides magnetogram with the cadence of 45 sec in 4096×4096 resolution with spatial resolution of 1 ′′ × 1 ′′ , for the ease of computation, we only use one image every 96 minutes as available for MDI, from HMI series "hmi.M 720s." The data sets used for the mentioned period contain 1,26,381 fits images (MDI: 56,384 HMI: 69,997).In addition to quality keyword, number of faulty pixels (identified as "Not a Number") on the solar disk region is also checked for every magnetogram.If the number of faulty pixels are found to be greater than 100, the magnetogram is considered defective and not included in the analysis.
The data in the magnetograms corresponds to the LOS component of the surface magnetic flux density, calculated across a spatial resolution window.These LOS magnetograms suffer from the projection effects, which is inversely proportional to the cosine of heliocentric angular distance (µ)1 .We correct the LOS component for this effect by assuming the magnetic field is normal to the solar surface and hence, dividing surface magnetic field density at each pixels by cos µ.Furthermore, as we approach to limb the projection effects become severe and hence, initially we restrict ourselves to less than 0.9 R ⊙ .

BMR Detection Algorithm
Algorithm developed to detect BMRs from the LOS magnetograms follows the prescription given in Stenflo & Kosovichev (2012), which was also used in Jha  Jha et al. (2020) has noted that the same method could be used for HMI data by multiplying the HMI magnetogram by the factor of 1.4, which comes from the comparison of MDI and HMI magnetogram in the overlapping period (Liu et al. 2012).To keep the consistency in the dataset, for HMI magnetograms, we re-binned the magnetogram from 4096×4096 pixels to 1024×1024 pixels to further reduce the computational time.By comparing the detected BMRs from the original and the binned data, we find that binning tends to miss the detection of small BMRs with the flux of ∼ 10 20 Mx, but the detection of other BMRs remains unaffected.One such example of identified regions from MDI is shown in Figure 1a.The BMR from both the data sets are stored in the form of a binary mask which acts as the starting point of our tracking algorithm.

Pre-processing of BMR Masks
In Jha et al. (2020), the identified BMRs are stored as rectangular region by binary masks (see Figure 1a), which include additional pixels which are not part of BMRs and may affect the tracking, particularly in the case of closely spaced BMRs during high activity period.Hence, to get rid of those extra pixels before we start the tracking, we go through the following pre-processing steps.
To get the exact morphology of the BMR in the rectangular regions of interest (ROI), we picked all the pixels with absolute magnetic field values greater than 100 G.This threshold not only leads to a few fragmented pixels in the ROI but also separates the poles of the BMR, as they do not always touch each other's boundaries (see Figure 1b).To eliminate the fragmented pixels, and connect isolated parts, we use a technique called morphological closing.It works by filling in the gaps or holes in the image using a kernel with a certain shape and size2 .In our case, we start with a circular kernel that has a initial radius of 6 pixels, followed by an area threshold of 50 pixels for filled regions.The radius of the kernel is systematically increased up to 9 pixels at the step of one pixel until the number of connected regions matches with the number of identified BMRs (i.e., the number of rectangular regions, see Figure 1a) in that magnetogram.Finally, the flux balance condition, as described previously, (Stenflo & Kosovichev 2012;Jha et al. 2020) is verified for each region to ensure that they are bipolar.In Figure 1c, we show the BMR regions after morphological closing operation.In Figure 1d, white contours represent the BMRs after the pre-processing steps.The information of detected BMRs after pre-processing is also stored as binary masks so that it can be used for tracking.

BMR Tracking Algorithm
Sequence-a  Now we come to the core of the work, and that is to develop an automatic algorithm to track all of the identified BMRs.Our tracking algorithm employs binary masks obtained from the last step of pre-processing to follow the interested regions over their lifetime/disk passage.The concept of the BMR tracking algorithm comes from the sunspot tracking algorithm developed in Jha et al. (2021), which is modified considerably to track the BMRs in the magnetograms.Now, we discuss the steps of our tracking algorithm as follows.
1.At the first step, a binary mask is selected from the archive (Figure 2a1).A BMR is selected from this mask and checked for tracking history stored in step 7.If the selected BMR is not tracked already (see the marked circle in Figure 2a1), it is isolated in a separate binary mask (Figure 2b1), and a unique BMR-ID (say 10001) is assigned to it.
2. Now, we calculate the maximum tracking period (T max ) i.e., the time it takes to reach the west limb, based on the heliographic latitude θ BMR and lon-gitude ϕ BMR of the BMR as, Here, Ω(θ BMR ) is the photospheric differential rotation rate (Howard et al. 1990) for given θ BMR .
3. In the next step, we take a sequence of binary masks (say Sequence-a, as shown in Figure 2a0 -a3) falling in the range of T max .
4. The binary mask of isolated BMR (Figure 2b1) is differentially rotated using the drot map.pro routine in IDL3 , to the time of observation of Sequence-a.For example, b0 is differentially rotated to the time of observation of a1 to obtain b1; similarly, b0 is differentially rotated to the time of a2 to obtain b2, and so on.This is represented by Sequence-b and is shown in 6.Now, we go through all the images in Sequencec (Figure 2c1 -c3) and check for the overlapping pixels (pixels with value 2).If the overlap is more than 150 pixels (600 arcsec 2 ), the BMR is marked as tracked (Figure 2c1 and Figure 2c2), otherwise not tracked (Figure 2c3).Furthermore, if the overlapping criteria are not met in the consecutive 30 binary masks (i.e., not enough overlap was detected for the next 48 hours), we increase the overlapping criteria to 250 pixels (1000 arcsec 2 ) for the next observation to ensure that the BMR tracked is the intended one and not a new one.
7. The same BMR-ID i.e., 10001, is assigned to all the tracked BMRs in Sequence-c.At this step, along with BMR-ID, we also store a few other parameters of the tracked BMR such as B max , B mean , total unsigned flux, area, and heliographic coordinates.The time and unique region index, which is assigned to each connected regions (pixels with value 2) in Sequence-c along with the BMR-ID are appended in the tracking history file, which will be used at step 1 to check for tracking history.
8. We repeat all the above steps for all the other detected BMRs within the chosen binary map from Step-1 (Figure 2a0).9. Once all the BMRs in the first selected observation are tracked, we go for the next observation and track only the new BMRs which are not tracked already.We do this by comparing BMR-ID with the existing information in the tracked history file updated in the previous step.

Representative Tracking Results
To demonstrate the result of our tracking algorithm, in Figure 3, we show the evolution of NOAA region AR9232 (AutoTAB-ID 11436) and AR11390 (AutoTAB-ID 11201), which have been observed in MDI and HMI, respectively.AR9232 was first identified near the East limb (25.2 • N, 49.3 • E) and has been tracked throughout its disk passage from 18-06-2000 03:11 to 24-06-2000 22:234 .Although our algorithm tracks the AR9232 in next 113 timesteps with 96 minute cadence, in Figure 3a, we only show one snapshot every day for 7 days.In Figure 3c, we also show the evolution of B max and absolute total flux for AR9232, and we note a systematic and continuous decrease (except small fluctuation due to fragmentation of the negative polarity) in both these quantities.This continuous decrease suggests that AutoTAB has been able to track the BMR properly, and it has been picked during its decaying phase, which is also inferred from Figure 3.In contrast with our algorithm, the SMART Algorithm (Higgins et al. 2011) tracks the same region from 15-11-2000 03:15 to 23-11-2000 20:48.In Figure 3b, we show the evolution of AR11390 observed in HMI in a similar way as for AR9232.This BMR has been first identified near the East limb (8.3 • N, 58.2 • E), and AutoTAB tracks it for 8 days (in 122 observations) till it reaches close to the West limb.The variation of total flux and B max (Figure 3d) once again show the continuous and systematic variation over the tracking period.Furthermore, in Figure 3d, we see that the B max as well as absolute total flux, show a small variation initially, and then they start increasing rapidly on day 5. Hence, we infer that this BMR has been tracked from its emergence to the time it crosses the West limb when AutoTAB loses track of it.
Apart from these two BMRs, in Appendix A, we also show the evolution of another tracked BMR which has been observed in both MDI and HMI (also see Figure 9).The comparison of B max and total flux of this BMR obtained from MDI and HMI confirms that the AutoTAB is working in the same way for both the data sets.Please note that we have scaled up the B max measured in HMI by 1.4 to bring both MDI and HMI at same level (Liu et al. 2012).
By selecting the BMRs randomly from the tracked data, we observe that similar kinds of variations are consistently present in all the tracked BMRs with a few exceptions.Therefore, based on these findings, we say that AutoTAB is very efficient in tracking the BMRs during their appearance on the near side of the Sun.Using our state-of-the-art algorithm, we have tracked 9232 BMRs in Cycle-23 and Cycle-24 for the years 1996 -2022.In the following section, we will discuss some of the statistical properties of these tracked BMRs.

Statistical Properties of BMRs
In Figure 4, we show the distribution of the lifetime/disk-passage time for all the tracked BMRs.From Figure 4, we note that BMRs exhibit a broad range of lifetimes, varying from several hours to over a week.Although AutoTAB is not able to track a BMR that goes into the far side, it has been tracked only in its evolutionary stage.Other than that, we also encountered a few cases in which the BMR is living for a sufficiently long time, but they have been detected for less than 5% of times, in the number of expected frames5 due to data gaps, corrupted data, or they have been missed during detection.Hence, after excluding such cases, based on how they were tracked i.e., either for the whole life or only in the evolutionary stage, we classified the BMRs into three classes, which are as follows.BMR (AutoTAB-ID 10399; NOAA AR08066) is shown in Figure 5c.
The snapshots of the evolution of all the three BMRs in Figure 5 can be found in the data repository 6 for AutoTAB.
The number of BMRs identified in each class is represented in the Table 1 for the period of 1996 -2020.Along with their numbers, we also calculated the mean of area, total flux, B max and B mean for all these classes, which are listed in Table 1.From this table, we note that all these quantities increases as we go from SL class to LT and DP classes.Hence, we find that the bigger BMRs have longer lifetimes, which is in agreement with the earlier findings from the sunspot (van Driel-Gesztelyi & Green 2015).
After discussing the various classes of BMRs and their time evolutions, we shall now discuss the collective behavior of the BMRs in the aforementioned three classes.

Solar Cycle Variation
The first property that we looked for is, does the number of newly emerging BMRs obeys the well-known solar cycle behavior.In contrast to the past studies (e.g., Stenflo & Kosovichev 2012;Jha et al. 2020), where the same BMR is counted multiple times during their appearance on the near side, instead here, we only count each tracked BMR once.Therefore, in Figure 6, we show the monthly number of newly emerging BMRs with time for all three classes, SL (Figure 6a), LT (Figure 6b) and DP (Figure 6c).The number of BMRs in LT and DP classes obediently follows the known solar cycle behavior based on the conventional sunspot number.Such behavior is not evident in the case of the SL class.A significant number of SL BMRs are also observed during the solar minima when the toroidal field of the Sun is weak and only a few large BMRs are produced.

Latitude-time Distribution
Another crucial property of sunspots is their latitudinal distribution (Hathaway 2015;Jha et al. 2022), the so-called 'butterfly diagram'.In Figure 7, we show the time-latitude distribution of identified BMRs for each classes.Here, each point represents a unique BMR.The latitude and time of all the BMRs are chosen at a time when they attain their maximum total flux (represented by the colors of the points) during the tracking period.We note that for the DP class, the maximum flux may not be the actual maximum flux of the BMR, as Au-toTAB only tracked them during a fraction of their life span.The interesting thing to note here is that although the BMR classes LT (Figure 7b) and DP (Figure 7c) follow the well-known butterfly diagram, the SL (Figure 7a) class is more scattered over the latitude (a small latitudinal dependency can still be seen) independent of the phase of the solar cycle.It could be that SL class BMRs that appears from the high latitude at the beginning of the cycle and continues till the end of the cycle at the solar minimum are part of the extended solar cycle (McIntosh et al. 2015) and they are formed through shredding and tangling of the large-scale magnetic field itself (Karak & Brandenburg 2016).However, Jha et al. (2020) have shown that the two classes of BMRs, namely the BMRs with spot and without spot in white-light images, follow the same latitude-time distribution based on their classification.Further study is required to dig deep into the detail, which will be done in the follow-up paper.Another point to note here is that although the total number of BMRs in Cycle 23 is less than in Cycle

Comparison with BARD
In this section, we evaluate the performance of Au-toTAB with other existing BMR tracking algorithm, BARD (Muñoz-Jaramillo et al. 2021;Muñoz-Jaramillo et al. 2021, 2016).To achieve this, we compute the count of newly emergent BMRs detected by both algorithms for the overlapping period, which is represented in  It can be seen from Figure 8a that AutoTAB detects more BMRs throughout the intersecting period, especially during Cycle 24.As BARD has limited the cadence of the observation to one magnetogram per day, any BMR detected and tracked by BARD cannot have a lifetime less than a single day.Moreover, BARD employs different magnetic threshold values for MDI and HMI, which can bring about the disparity observed in the detected number of BMRs.Taking these points into consideration and in order to maintain the consistency

Limitations of Tracking Algorithm
As with any algorithm, the AutoTAB also has some limitations, which are as follows.
(i) One of the biggest challenges that AutoTAB has to face is dealing with the multiple BMRs lying closely together.This issue is mostly carried forward from the detection and also affects the tracking, and occasionally multiple BMRs have been tracked as a single one.
(ii) Once BMR crosses the west limb, the AutoTAB loses track of it, but there are a few cases, particularly for long-living BMRs, the same BMR could appear in the East limb after coming back from the far side.In this case, the AutoTAB treats this BMR as a new one and gives the unique AutoTAB-ID to it even though they are the same.
(iii) The last but not least, the detection and preprocessing steps are strongly affected by the level of noise in the data while identifying the region of interest, and ultimately it also impacts the tracking.

Possible Application to Other Data
So far, we have only discussed and demonstrated the application of AutoTAB on MDI and HMI magnetogram datasets.Now the question is, will it be possible for AutoTAB to track the BMRs in other datasets?The answer is yes, but since our algorithm has three major parts (i) detection, (ii) pre-processing, and (iii) tracking, all of them will not work in the same way with different datasets.Although the pre-processing and tracking are expected to work with various datasets, our detection algorithm, which is only optimized for MDI (Stenflo & Kosovichev 2012) and HMI (Jha et al. 2020) magnetograms, may not work with other data sets.Thus, for a given binary mask of the region of interest, the tracking algorithm can be used, along with pre-processing technique.Here, we would like to emphasize that even for pre-processing and tracking, a few constants or thresholds, such as morph closing kernel size, overlapping area threshold, etc., need to be tuned according to the data.For example, for the case of HMI magnetogram data with the original resolution of 4096 × 4096, the initial appropriate radius of morph closing kernel size is 16 pixels.The radius is increased to 19 pixels in three different steps as mentioned in subsection 2.2.The area threshold mentioned in subsection 2.2 can be scaled by the resolution of the data, in the case of HMI, by a factor of 4. Furthermore, the AutoTAB tracking algorithm can also be used to track the other features in the solar atmosphere by optimizing these parameters.

CONCLUSIONS
Observational study of the evolving properties of BMRs is crucial to understand the origin of solar magnetic field and cycle.However, due to the unavailability of a completely automatic and efficient BMR tracking algorithm, the study of the temporal evolutions of various properties of BMRs is limited.We have developed an automatic algorithm, AutoTAB for tracking the BMR from magnetograms.It works by taking the binary maps of the detected BMR as inputs.For detecting BMRs from magnetograms, we also build an algorithm following the idea of Stenflo & Kosovichev (2012) and Jha et al. (2020).Using our developed detection algorithm, we have produced the binary maps of the detected BMRs from HMI and MDI during the solar cycles 23 and 24.By feeding these binary maps in AutoTAB, we have produced a homogeneous and comprehensive data set for 9152 tracked BMRs.
AutoTAB is successful in tracking the identified BMRs through their life on the visible solar disk and in capturing their evolving magnetic and morphological properties.Representative examples of the dataset have been presented by showing the snapshots of the evolution of the BMRs at various stages of their life along with the progression of unsigned flux and B max .As AutoTAB works by checking for the overlap between consecutive binary maps, it remains independent of the dataset used and can work efficiently for tracking other solar features.A comparison between the number of new emergent BMRs in AutoTAB and the BARD catalog shows that AutoTAB consistently detects and tracks more BMRs through the past two solar cycles compared to BARD.As AutoTAB is fully automatic, multiple closely lying BMRs might have been identified as one, which remains one of the major challenges faced by AutoTAB which needs to be addressed in the future.
AutoTAB tracks the BMR in a wide range of its lifetime, from hours to days, which leaves us with a large volume of tracked information.Hence, the tracked BMRs have been classified into different groups, namely, Short Lived (lives for less than 8 hours), Lifetime (emerges and disperses in the visible surface), and Disk Passage (coming from/going to the farside of the Sun).The tracked BMRs show the usual signatures of solar cycle variation.We also observe that the Lifetime and Disk Passage BMRs follow familiar latitudinal and temporal distributions, as seen by the sunspot butterfly diagram.This distribution is not observed in the case of Short Lived BMRs as they are the small features that appear at all times on the Sun.In a follow-up publication, we shall further exploit the results of tracked BMRs to compute various properties of BMR, which will help us to identify the origin of BMR formation.The tracked information of the BMRs used in this study, along with the code of the algorithm, will be publicly accessible at https://github.com/sreedevi-anu/AutoTAB,soon after our follow-up article.
Authors would like to thank anonymous referee for critical comments which helped in improving the manuscript.
Authors also thank Lisa Upton for reviewing the manuscript.
AS sincerely express her gratitude to ARIES, Nainital for the warm hospitality extended during the project's initial phase.
BBK acknowledges the financial support from the Department of Science and Technology (SERB/DST), India, through the Ramanujan Fellowship (project no SB/S2/RJN-017/2018) and ISRO/RESPOND (project no ISRO/RES/2/430/19-20).The observational data, the LOS magnetograms from MDI and HMI, used in this article is obtained via JSOC, by the courtesy of NASA/SOHO and NASA/SDO science team.The BARD catalog of BMRs was downloaded from the solar dynamo dataverse (https://dataverse.harvard.edu/dataverse/solardynamo),maintained by Andrés Muñoz-Jaramillo.Sunspot data has been taken from the World Data Center SILSO, Royal Observatory of Belgium, Brussels.9 show the evolution of NOAA AR11068 from HMI and MDI, respectively.AutoTAB tracked this particular BMR for a total duration of 153 hours from 05-05-2010 19:10 to 12-05-2010 04:46, during its passage across the solar disk, with AutoTAB-ID 10349.As this BMR has been identified in the period when we have observations from both the instruments (HMI and MDI), we track it in both data sets for comparison.This BMR was tracked for an extra of 6 hours and more consistently by HMI (99 detections) than MDI with only 87 detections.Less detection in MDI is expected because of the relatively larger noise in the data as compared to HMI data.Nevertheless, upon closer examination of the evolution of total flux and B max throughout the lifespan of BMR (as shown in Figure 9c-d), we observe that the B max and absolute total flux show excellent agreement in both the data sets.For this particular BMR, the total flux consistently decreases over the lifetime of the BMR, while B max show a small increase in the first few hours and subsequently decreases.This small increase could be due to the uncertainty in the measurement of B max near the limb.

Figure 1 .
Figure 1.(a) Magnetogram from MDI for 15-11-2000 20:48 with the detected BMRs represented by white rectangular boxes.(b) Binary mask of detected BMRs from (a) but after applying the threshold of 100 G to the detected regions.(c) Same as (b) after the pre-processing (described in Section 2.2).(d) Identified regions after pre-processing depicted on the magnetogram.The solid blue and red dashed circles represent 1.0 R⊙ and 0.9 R⊙, respectively.et al. (2020) with slight modifications.A brief description of the detection algorithm is as follows.In the first step, a adaptive threshold, based on the average of absolute magnetic field inside the 0.9 R ⊙ is applied on the projection corrected magnetogram, to identify the regions of strong magnetic fields.This step is followed by applying a threshold of 200 G to identified regions and imposing a flux balance condition defined by (F + + F − )/(F + − F − ) < 0.4 on them to isolate the BMRs.Here, F + and F − represent the sum of all the positive and negative radial magnetic field values, respectively, that exceed 100 G for the identified regions (see Appendix of Stenflo & Kosovichev 2012, for detail description of the detection method).Stenflo & Kosovichev (2012) has only used this algorithm for MDI data set and it has been extended for HMI in Jha et al. (2020).Jha et al. (2020) has noted that the same method could be used for HMI data by multiplying the HMI magnetogram by the factor of 1.4, which comes from the comparison of MDI and HMI magnetogram in the overlapping period(Liu et al. 2012).To keep the consistency in the dataset, for HMI magnetograms, we re-binned the magnetogram from 4096×4096 pixels to 1024×1024 pixels to further reduce the computational time.By comparing the detected BMRs from the original and the binned data, we find that binning tends to miss the detection of small BMRs with the flux of ∼ 10 20 Mx, but the detection of other BMRs remains unaffected.One such example of identified regions from MDI is shown in Figure1a.The BMR from both the data sets are stored in the form of a binary mask which acts as the starting point of our tracking algorithm.

Figure 2 .
Figure 2. Representative example of the BMR Tracking Algorithm.The BMR intended to be tracked is marked by a circle.(a0), (a1), (a2) and (a3) represent the selected binary maps in Sequence-a.(b0), (b1), (b2) and (b3) represent Sequence-b, the isolated and differentially rotated binary masks of the BMR, corresponding to the time of observation in Sequence-a.(c1), (c2) and (c3) represent Sequence-c, obtained by adding Sequence-a and Sequence-b.The zoomed-in view of overlapping region is shown in the inset.

Figure 3 .
Figure 3. Panels (a) and (b) respectively show the snapshots of the tracked BMRs with AR9232 (AutoTAB-ID 11436) and AR11390 (AutoTAB-ID 11201) corresponding to each day during the tracking.Panels (c) and (d) show the evolution of absolute total flux and Bmax for these BMRs.The vertical lines in (c) and (d) represent the times corresponding to the time of snapshots shown in (a) and (b), respectively.

1.Figure 4 .Figure 5 .
Figure 4. Distribution of the lifetimes of the tracked BMRs of different classes shown by different colors.they mainly comprise small BMRs, which may include a few large ephemeral regions with the typical magnetic flux of ≈ 10 20 Mx.The distribution of the SL class appears in the left most of Figure 4.In Figure 5a, we show the evolution of total flux and B max of a typical BMR (AutoTAB-ID 10076) from this class.It is noted from this figure that the BMR shown here emerges with relatively low flux and B max and decays within a few hours.2. Lifetime (LT): Rest of the tracked BMRs, which have a lifetime of more than 8 hours and have emerged and decayed in the near side of the Sun, i.e., they have been tracked throughout their lifetime, are classified as Lifetime (LT) BMRs.The distribution of the LT class spans around a week which is shown in Figure 4.An example of the evolution of such BMR (AutoTAB-ID 10213) is shown in Figure 5b.3. Disk Passage (DP): This class of BMRs has not been tracked for their lifetime.Instead, they have only been tracked for a part of their life span on the visible solar disk, and we classed them as Disk Passage (DP).This class includes (i) BMRs that appear near the East limb (≤ 45 • E) and disappear on the near side, (ii) BMRs that appear on the near side of the Sun but cross the West limb (longitude ≥ 45 • W) and (iii) BMRs which appears on the East limb (≤ 45 • E) and crosses West limb (≥ 45 • W).Here we restrict ourselves between the longitudes of ±45 • , as the uncertainty in the magnetic field measurement increases towards the limb.Lifetime for this class is distributed all the way from a few hours to more than a week Figure 4.The evolution of flux and B max for one such

6Figure 6 .
Figure 6.Time series of the monthly number of unique BMRs for (a) SL, (b) LT, and (c) DP classes.The greyshaded region represent the international smoothed sunspot number (scaled to BMR counts for better representation) from WDC-SILSO, Royal Observatory of Belgium, Brussels.Here, vertical strips represent the data gaps in MDI magnetograms.

Figure 7 .
Figure 7. distribution (butterfly diagram) of the tracked BMRs of (a) SL (b) LT, and (c) DP classes.The color of the points represents the total flux of the BMR.The vertical strips represent the data gaps in MDI magnetograms.

Figure 8 .
Figure 8.(a) Comparison of the monthly number of newly emergent BMRs obtained from AutoTAB (our) and BARD, along with the traditional monthly sunspot number (grey shaded area enclosed by line).The sunspot number has been multiplied by a factor of 0.6 to bring it to the scale of the BMR count.The vertical strips on the figure represent the data gaps in MDI magnetograms.(b) Same as (a) but only including the BMRs from DP class which has a lifetime of greater than one day and 500 G threshold applied to BMRs from MDI in AutoTAB dataset.

APPENDIXA.
COMPARISON OF THE TRACKING RESULTS FROM MDI AND HMI MAGNETOGRAMS Panels (a) and (b) in Figure

Figure 9 .
Figure 9. Snapshot of a tracked BMR with NOAA AR11068 during its passage on the observable disk as observed in (a) HMI and (b) MDI.Panels (c) and (d) show the variations of the total flux and Bmax, respectively, obtained from both the data sets.Vertical lines in (c) and (d) represent the times corresponding to the snapshots shown in (a) and (b), respectively.

Table 1 .
Some key parameters of different classes of tracked BMRs.

Table 2 .
Comparison of the statistics of new emergent BMRs between AutoTAB and BARD for different cases.sets, initially, we exclude all BMRs from the SL class and any BMRs which live for less than a day from the AutoTAB data set.Nevertheless, AutoTAB still detects 28% more new BMRs in Cycle 23 and 85% in Cycle 24.Additionally by removing the LT class BMRs from the AutoTAB dataset and applying a 500 G magnetic threshold to the BMRs detected from MDI (Cycle 23), results in a close match of 13% of more new BMRs detected by AutoTAB in Cycle 23.But still, we observe that in Cycle 24 AutoTAB detects 42% of newer BMRs; see Figure 8b.This suggests that BARD competently detects BMRs with bigger areas and larger flux and tends to miss smaller bipolar regions.The number of uniquely identified BMRs from both AutoTAB and BARD, over both cycles are represented in Table 2.