Exploring the photometric variability of ultra-cool dwarfs with TESS

We present a photometric characterization of 208 ultra-cool dwarfs (UCDs) with spectral types between M4 and L4, from 20-second and 2-minute cadence TESS light curves. We determine rotation periods for 87 objects (42 percent) and identify 778 flare events in 103 UCDs (49.5 percent). For 777 flaring events (corresponding to 102 objects), we derive bolometric energies between 2.1e30 and 1.1e34 erg , with 56 superflare events. No transiting planets or eclipsing binaries were identified. We find that the fraction of UCDs with rotation and flaring activity is, at least, 20 percent higher in M4-M6 spectral types than in later UCDs (M7-L4). For spectral types between M4 and L0, we measure the slope of the flare bolometric energy-duration correlation to be gamma = 0.497 +/- 0.058, which agrees with that found in previous studies for solar-type and M dwarfs. Moreover, we determine the slope of the flare frequency distribution to be alpha = -1.75 +/- 0.04 for M4-M5 dwarfs, alpha = -1.69 +/- 0.04 and alpha = -1.72 +/- 0.1 for M6-M7 and M8-L0 dwarfs, respectively, which are consistent with previous works that exclusively analysed UCDs. These results support the idea that independently of the physical mechanisms that produce magnetic activity, the characteristics of the rotational modulation and flares are similar for both fully-convective UCDs and partially-convective solar-type and early-M stars. Based on the measured UCD flare distributions, we find that UV radiation emitted from flares does not have the potential to start prebiotic chemistry.


INTRODUCTION
Ultra-cool dwarfs (UCDs) are objects with effective temperatures below 3000 K that include fully-convective very-low mass stars and brown dwarfs (e.g.Kirkpatrick et al. 1995;Bolmont et al. 2017).They are particularly interesting because it is easier and more likely to detect Earth-like planets in the habitable zone than around stars of any other spectral type (Scalo et al. 2007).However, a key aspect to assess whether (or not) planets orbiting UCDs would be able to sustain life on their surfaces, is to characterize the host's magnetic activity.In solar-type stars, magnetic activity is described by an  dynamo (Parker 1955;Charbonneau 2010) powered by the interaction between stellar rotation and convection.It is believed that the tachocline, i.e. the transition zone between the radiative core that rotates as a solid body and the convective envelope that presents differential rotation, is where the magnetic field organizes and amplifies and, hence, a fundamental element in the dynamo mechanism.Nevertheless, fully-convective stars do not possess this interface, but magnetic fields of the order of a few kiloGauss have been measured in these objects (see Kochukhov 2021, for a review).Moreover, in a recent study, Climent et al. (2023) reported spatially resolved radio observations of a brown dwarf, which were attributed ★ E-mail: romina.petrucci@unc.edu.ar to a dipole-ordered magnetic field with a radiation belt-like morphology.It means that these stars should also harbor a magnetic dynamo although different from that in solar-type stars.Several models have been proposed (e.g.Chabrier & Küker 2006;Browning 2008;Gastine et al. 2013), however, the underlying mechanism which creates and sustains the magnetic fields in fully-convective stars remains unknown.
In this scenario, it becomes important to determine if the signatures of this magnetic activity, such as rotation periods and flares, in fully-convective stars follow the same correlations and have similar characteristics than in stars with a radiative core.From an evolutionary point of view, during the pre-main sequence phase, both partially-and fully-convective stars are known to exhibit evidence of magnetic activity such as cool starspots (e.g.Bouvier 2007), energetic flares (e.g.Cody et al. 2022;Rebull et al. 2022), and high surface magnetic fields (e.g.Flores et al. 2019;López-Valdivia et al. 2023), powered by strong magnetic dynamos.In this context, several monitoring campaigns have been launched with the pursuit of exploring the periodic and non-periodic variability of stars of different masses in forming regions and young clusters (e.g.Bouvier 2007;Cody & Hillenbrand 2010;Serna et al. 2021;Getman et al. 2022Getman et al. , 2023)).These previous studies have revealed differences in the rotational properties of stars with distinct masses.Stars with spectral types earlier than M2.5, sometimes present a bimodal distribution with rotation periods predominantly at ∼ 2 and ∼ 10 days, whilst later type objects present a single-peak distribution with rotation periods between ∼ 1 and ∼ 3 days (Herbst et al. 2002;Lamm et al. 2005).During the main-sequence phase, it is well established that the equatorial rotation speed of FGK and early-M stars declines with the inverse square root of the star's age (Skumanich 1972) due to angular momentum loss driven by magnetized stellar winds (e.g.Angus et al. 2020;Metcalfe et al. 2023).Nonetheless, this seems not be the case for fully-convective low-mass stars (e.g.Tannock et al. 2021).
Moreover, one relevant parameter to understand the functioning of the magnetic dynamo on fully-convective stars is the slope of the flare frequency distribution, , which provides information about how flares yield the magnetic energy responsible for the heating of the corona (Parker 1955).In this sense, two recent works (Seli et al. 2021;Murray et al. 2022) that exclusively analyse UCDs obtained their flare frequency distributions and found slopes of  ∼ −2, consistent with the range observed for FGK and early-M stars (e.g.Tu et al. 2020;Günther et al. 2020;Jackman et al. 2021;Yang et al. 2023).Regarding stellar rotation-activity relationship, previous works (Wright et al. 2018;Newton et al. 2017;Medina et al. 2022) have shown no distinction between stars with and without tachocline.Additionally, some studies that quantified the correlation between duration and bolometric energy of flares in M stars (Silverberg et al. 2016;Yang et al. 2023), agree with the results obtained for solar-type stars.
In this context, the main purpose of this study is to provide some insight through the exploration of the photometric variability of a sample of mid-to-late M dwarfs with 2-minute cadence TESS data.The article is organized as follows.In section 2, we introduce the sample with their main properties and describe the observational data.The methodology applied to search for rotational modulation, flares and hints of planetary candidates is detailed in section 3.In section 4, we describe our results regarding the search for correlations between rotation and flare's parameters, the galactic kinematics of UCDs, the construction of the flare frequency distributions, and the identification of correlations between amplitude, duration, and energy of flares.Here, we also present our findings about superflares, and briefly assess the habitability around UCDs.Finally, we present our conclusions in section 5.

SAMPLE SELECTION AND OBSERVATIONS
Our sample comprises a total of 208 UCDs with spectral types from M4 to L4, extracted from the catalog of M and L dwarfs within 40 pc of Sebastian et al. (2021).For our sample selection, we first choose targets from 'programme 1' of the catalog, which consists of 365 latetype objects that are sufficiently small and close to allow a detailed atmospheric characterization of an hypotetical gravitationally-bounded transiting Earth-like planet with JWST (Gardner et al. 2006).Afterward, we performed a cross-match of these data with the TESS Input Catalog (Stassun et al. 2019, TICv8.2),taking as reference the scripts provided on the Mikulski Archive for Space Telescopes (MAST) server1 .As a result, from the original 'programme 1' list from Sebastian et al. (2021), we kept the 235 targets observed by the Transiting Exoplanet Survey Satellite (Ricker et al. 2015, TESS) with 2-minute cadence data available.Concretely, we analysed the Presearch Data Conditioning Simple Aperture Photometry (PDC-SAP), processed with the TESS Science Processing Operations Center (SPOC) pipeline (Jenkins et al. 2016) by the Lightkurve Python package (Lightkurve Collaboration et al. 2018).Then, given that some targets showed light curves with unphysical values of flux (i.e.negative values), we had to remove them from the list, reducing our final sample to 208 objects.For each of them, we used the 2-minute cadence data of all the TESS sectors accessible at the time of the analysis between sectors 1 and 53.In particular, for those UCDs in our sample with available 20-second light curves, we also used these short-cadence data for a comprehensive study of stellar flares.In summary, the number of targets per spectral type studied in this work is: 6 M4, 61 M5, 64 M6, 29 M7, 15 M8, 14 M9, 10 L0, 5 L1, 2 L2, 1 L3, and 1 L4.In Table 1, we present their TICv8.2names and main properties.In Fig. 1, we show a box plot of the TESS magnitude (T mag ) extracted from the TESS Input Catalog (Stassun et al. 2019, TICv8.2) as a function of spectral type for all the UCDs in the sample.The median T mag value for our full sample is 14.10, with T mag = 9.28 and T mag = 18.73 for the brightest and faintest objects, respectively.As expected, median T mag values increase from early to late spectral types.Sebastian et al. (2021).L bol was computed only for the flaring UCDs as the flare bolometric energy divided by the flare equivalent duration.For those stars with more than one flaring event, we adopted the mean value.
a For those UCDs with  TIC > 0.1, the flux contamination from nearby stars may dilute the true signal amplitude.Hence, these values must be taken as lower limits.
(This table is available in its entirety in machine-readable form)

Contamination Ratio ( 𝑓 TIC )
Given that the size of each TESS pixel is 21 arcsec × 21 arcsec , photometric apertures used to obtain the UCDs light curves may be contaminated by the flux from nearby stars.If the UCD light curve is contaminated, any photometric variability shown might be diluted and/or, even worse, a rotation period or flare could be mistakenly attributed to a target that truly arises from a nearby star.
The TESS Input Catalog (TICv8.2) provides an estimation that accounts for this 'contamination ratio' (  TIC ), as determined in Stassun et al. (2019).However, because only ∼ 65% of the UCDs analysed in this study have a reported  TIC , we used the publicly available code tic_contam.py(Paegert et al. 2021) to homogeneously calculate the contamination ratio of all the UCDs in the sample (seventh column in Table 1).Briefly, these authors identified all the point-sources with T mag ≲ 17 − 19 at a distance within 10 TESS pixels of the target.Then, they computed their fluxes based on pre-launch PSF measurements of the field center.The size and shape of the target's aperture were defined depending on the target's TESS magnitude.Finally,  TIC was calculated as the ratio of the flux from the objects that falls inside the aperture to the target's flux in the same aperture.
Here, it is important to notice that the contamination ratio estimated by TESS is indicative of other stars in the field, but not robust enough to correct the measured amplitudes.Hence, we caution that the absolute rotational amplitudes, and flare energies and amplitudes of UCDs with  TIC > 0.1 must be taken as lower limits since these objects are significantly affected by the flux contamination of nearby stars.

Rotation Period Measurement
Previous works (e.g.Schmidt et al. 2015;Anthony et al. 2022) revealed that most of the objects with spectral types between M4 and L4 show emission in the H line, which indicates that they are magnetically active.As a direct consequence, any observed photometric variability could be interpreted as the presence of magnetic spots on the stellar surface.In this section, we present the methodology used to search for rotation periods in the UCDs of our sample.
For all the targets analysed in this work, we applied two different tools to the light curves: the Lomb-Scargle periodogram (LS;Lomb 1976;Scargle 1982) and the Auto Correlation Function (ACF; Affer et al. 2012;McQuillan et al. 2013).In the case of LS, we searched for periodic modulations between a value near the Nyquist frequency and the full observation time span.We adopted as the detected period, P LS , the inverse of the frequency corresponding to the highest peak in the periodogram.The period uncertainty was calculated by propagating the frequency error, which is given by the width of the peak, computed as the inverse of the baseline of the observations, i.e. the time difference between the last and first observed data point.The photometric amplitude of the rotational signal was computed as √︃ A2 sin + A 2 cos , where A sin and A cos are the amplitudes of the sine and cosine terms of the best-fit model evaluated at the maximum frequency found by LS.The amplitude uncertainty was calculated through error propagation, where the uncertainties in A sin and A cos were estimated through the following procedure: first, we added to each flux value a random number between plus/minus its error; then, by keeping fixed the period to the value found by LS, we fitted the resulting light curve and obtained new A sin and A cos coefficients.We repeated these two steps 1000 times.Finally, we computed the standard deviation of the values determined for the sine and cosine amplitudes and adopted them as their uncertainties.
As a secondary verification method, we also ran the ACF to the entire light curve for each UCD.Basically, ACF assesses the degree of self-similarity of the light curve at a parameter that depends on the data cadence.It is expected to be more robust than LS in the detection of signals that change their amplitudes and phases.Once a period was detected by the ACF, we adopted as uncertainty the one calculated as in Eq. (3) of McQuillan et al. (2013).
In order to be confident that the measured period, after running both algorithms on the light curve, is real and not caused by instrumental systematics, it had to satisfy the following criteria: • False Alarm Probability (FAP) ≤ 0.01 2 .
• The standard deviation of the residuals after removing the periodic signal is smaller than or, at most, equal the standard deviation before removing the sinusoidal modulation.
• The period values identified by LS and ACF agree within their uncertainties.
• The majority of the available TESS sectors for a given target shows the period value identified by LS.
• The variability is clearly visible in the phase folded light curve.
• The value of the period found differs from the duration of a sector, the duration of half a sector, and the duration of the full light curve.
For further analysis, in those cases when more than one period was clearly visible in the light curve, we only considered the period with the smallest FAP value.

Flare Identification
We used the automated open-source code AltaiPony (Davenport 2016;Ilin et al. 2021) to search for flares on the TESS light curves of the 208 targets in our sample.AltaiPony identifies flare candidates as those with no less than three consecutive data points that positively deviate at least 3 sigma above the local scatter of the light curve and that, also, follow the criteria defined in Chang et al. (2015).For the detected candidates, the code provides as output: the times of start and end of each event, the amplitude or peak relative to the quiescent stellar flux, the equivalent duration (ED) that represents the time that would take the object to emit, in quiescent state, the same energy released during flaring state, the uncertainty in ED, and the flare's duration as the difference between the end and start times.
For the UCDs in our sample with both 2-minute and 20-second cadence light curves, we used the shortest cadence available to identify flaring events.These short-cadence data allow a better sampling and, hence, a more realistic description of the events, in particular for those with a very fast impulsive phase.Before searching for flares, we flattened the light curves.For those objects with detected rotational modulation (see Section 3.1), we subtracted the best-fit model evaluated at the maximum frequency found by LS from the light curve.For all targets, we applied a Savitzky-Golay filter to remove any remaining uncorrected systematics in the PDCSAP light curves.Then, after running AltaiPony, we inspected by eye all of the events identified by the code and kept those with the typical flare profile (i.e. a suddenly increase and exponential decay in flux) or a multi-flare shape (e.g.Günther et al. 2020).
To measure the bolometric energy of the detected flares, we followed the work of Howard (2022) and used the equation: Here, L TESS is the quiescent luminosity considering the TESS CCD response.This quantity was computed for each target through the luminosity-flux-distance relationship by adopting the flux of a star with TESS magnitude of zero derived by Sullivan et al. (2015), T mag from the TICv8.2, and the distance from the Gaia-DR3 catalog (Gaia Collaboration et al. 2016Collaboration et al. , 2023;;Katz et al. 2023).When the distance was not available in the Gaia-DR3 catalog, we extracted it from the TICv8.2.The constant 'c' is the correction factor for the TESS CCD response calculated by Howard & MacGregor (2022) assuming a flare with a continuum component characterized by a 9000 K blackbody.This constant has a value of c = 0.19 representing the energy fraction released in the TESS band during the flare.

Planetary Transit Search
According to the core accretion theory (Pollack et al. 1996), the small size and low-mass protoplanetary disks around late-type stars (Andrews et al. 2013;Pascucci et al. 2016) would create a favorable environment for the formation of small rocky planets around these objects (Raymond et al. 2007;Alibert & Benz 2017).Additionally, theoretical studies about planetary formation (e.g.Mulders et al. 2015), point out that the occurrence rate of terrestrial planets is higher for M stars compared to FGK stars.Hence, late-type objects are ideal candidates to host close-in, Earth-like planets.Furthermore, small planets orbiting UCDs produce deeper transits and larger RV semi-amplitudes than small planets around solar-type stars.Due to their low luminosities, the habitable zone is closer to the UCD host than FGK hosts, increasing the chances of detecting planets orbiting within (Irwin et al. 2009).Albeit these advantages, UCD planetary systems remained elusive for a long time due to their emission being predominantly at IR wavelengths.However, in the last decade, different projects emerged with the purpose of searching for planets around UCDs using ground based facilities, such as SAINT-EX (Gómez Maqueo Chew et al. 2023), SPECULOOS (Delrez et al. 2018), EXTRA (Bonfils et al. 2015), PINES (Tamburo et al. 2022), CARMENES (Quirrenbach et al. 2018), SPIRou (Donati et al. 2018).To date, a few planetary systems around UCDs were already confirmed (Gillon et al. 2016(Gillon et al. , 2017;;Anglada-Escudé et al. 2016;Zechmeister et al. 2019).
We searched for signs of planetary transits in the 2-minute cadence TESS light curves of the 208 targets of our sample.For those UCDs with detected rotational modulation, we first subtracted the best-fit model at the rotational period value from the PDCSAP light curve.Then, we executed a time-windowed slider algorithm based on Tukey's biweight provided by the open-source package wötan (Hippke et al. 2019) on the time-series of all the targets to remove any remaining systematics.The search for transit signals was carried out with the Transit Least Squares (TLS) algorithm (Hippke & Heller 2019), giving it as input the detrendend light curve and the quadratic limb-darkening coefficients of each target extracted from the TICv8.2.To validate the signal detected by the algorithm and mark the object as 'planet candidate', it had to satisfy the following conditions: • Signal Detection Efficiency (SDE) > 6.0.
• More than one transit detected in the light curve.
• Transit clearly visible in the phase folded light curve and the best-model found by TLS well-fitted to the data.
• Agreement between the measured depths of the detected transits, within errors.
None of the initially detected signals fulfilled all of these criteria.Only a few UCDs present signals that satisfy at least one of the criteria.However, after a more rigorous inspection and a reanalysis of the data, they were finally excluded as spurious.Hence, we did not identify any possible transiting planet (or eclipsing stellar companion) candidate orbiting around any UCD in our sample.

Measured Rotation Periods and Amplitudes
We found that 87 UCDs in our sample fulfill the criteria described in Section 3.1, indicating that ∼ 42% present a measurable rotational modulation in their TESS light curves.The measured periods span from 2.02 hours to 4.63 days, while their amplitudes range from 0.0009 to 0.1986 mag, as measured directly from the TESS light curves, in agreement with previous findings (Seli et al. 2021;Medina et al. 2022;Miles-Páez et al. 2023).In Table 1, we present the rotational periods and absolute amplitudes measured in this work, and Fig. 2 displays selected light curves with detected periodic photometric variability.The six UCDs shown in the figure have been selected such that the top three panels represent clearly sinusoidal rotational modulation and the bottom three show the lower-limit of rotational modulation, including non-sinusoidal modulation patterns.Figure 3 shows the distribution of objects as a function of spectral type, as well as the distribution of those with measured rotation period (pink and orange colours).

Active vs non-active UCDs
We grouped the targets analysed in this work into two categories: 'active' and 'non-active'.In the first one, we included objects for which we were able to detect rotational modulation or flares or both, and in the second category, those with neither rotational modulation nor flares detected.Out of 208 objects in our sample, we found that the 'active' UCDs are: • 31 (∼ 15 %) only show rotational modulation, • 47 (∼ 23 %) only present at least one flare, • 56 (∼ 27 %) have a detected rotational modulation and flares.This means that ∼ 64% of the UCDs in our sample (i.e.134 objects) are 'active' targets.In Figure 3, we show histograms of the number (left) and fraction (right) of objects per spectral type and highlight the UCDs that present some signature of activity.In general terms, the figure shows that earlier spectral type targets (M4-M6) tend to be more active than later-type ones (M7-L4).
Figure 4 shows in separate panels the proportion of UCDs per spectral type that have at least one identified flare (green), measured rotation period (pink), or both (orange), compared to the full UCD sample.Regarding the flaring activity (left panel), we found that earlier type objects (M4-M6) in our sample show a peak in the number of targets with detected flares with ∼60 to 80% UCDs in those spectral bins.The number of UCDs with detected flaring activity decreases toward later spectral types (M7-L4), with no flares detected for spectral types L1 through L4 in our sample.This is in agreement with previous photometric studies.For example, Medina et al. (2022) found that the fraction of stars with flares is maximum  2020) used independent photometric data (Kepler, ASAS, and TESS, respectively) and found that the fraction of stars with confirmed flares peaks at spectral type M4-M5.On the other hand, the results from Murray et al. (2022) show an increasing number of UCDs with flaring from M4 to M7 spectral types followed by a decline toward L0, with no flares detected in L1-L2 objects.Considering objects with detected rotation periods (middle and right panels), we found the same behaviour as for those that only flares, where the fraction of targets showing activity signatures is maximum around M4-M6, which also agrees with previous results (Günther et al. 2020).
Concerning the statistics, our results indicate that 42% of the UCDs in the sample have a measured rotation period, in agreement with Newton et al. (2016).These authors used ground-based observations from the MEarth Project (Nutzman & Charbonneau 2008) of 387 nearby, mid-to-late M dwarfs (∼ M3 and later) and measured rotational modulation on 47% of the targets.Meanwhile, Seli et al. (2021) analysed 30-minute cadence TESS data of 248 TRAPPIST-1like ultra-cool dwarfs (i.e.objects closer than 0.5 magnitudes to TRAPPIST-1 on the Gaia color-magnitude diagram at a distance up to 50 pc away) and found that only 17% (42/248) present periodic light curve modulation with 21 of these UCDs also showing flares.This could be a consequence of the relatively longer cadence of the TESS observations.On the other hand, the analysis by McQuillan et al. (2013) of more than 2400 main-sequence M stars observed by Kepler (Borucki et al. 2010) revealed that 63.2% of the objects in their sample have detected rotation periods ranging from 0.37 to ∼ 70 days.Raetz et al. (2020b) found rotation periods as long as 80 days for about 82% of all targets in their K7-M6 sample (56 objects in total) using K2 long-and short-cadence data.Similar statistics was found by Raetz et al. (2020a) through the analysis of 430 K8-M7 stars considering only K2 long-cadence data.In comparison, the lower percentage of UCDs with detected rotational modulation found in this study, might be a consequence of the time span (∼ 27 d for each TESS sector) of the analysed observations which makes finding periodicities larger than 5 days more challenging.This would imply that we might be biased against detecting modulation on those objects with longer-term photometric variability.
Additionally, we notice that the non uniformity in the number of the available TESS sectors in which each of the UCD analysed in this study was observed (from only one to 26 sectors in some objects) might introduce a bias in the detection of flare events and rotation periods towards UCDs with high flare rates and fast rotation.

No correlation between rotation parameters and stellar properties
We investigated possible trends between the parameters that characterize the rotational modulation (i.e.period and amplitude) and the effective temperature and spectral type of the UCDs in our sample.
In the left panel of Fig. 5, we show a plot of effective temperature (T eff ) from Sebastian et al. (2021) as a function of our measured period, P LS , for the 87 objects with detected rotational modulation.We note a higher dispersion in the measured periods found for effective temperatures of 2700 < T eff < 3000 K, compared to the rest of the sample.However, caution must be taken due to the scarce number of targets with T eff < 2700 K that have a measurable rotation in our sample.No clear trend is revealed when the rotational periods are analysed as a function of spectral type.A lack of correlation is also found if targets are separated in those with detected flares and without detected flares.Objects with spectral type M4, L3 and L4 are not shown because no rotational modulation was detected in the TESS light curves that were analysed.Additionally, in the right panel of Fig. 5, we show a plot of T eff as a function of rotation amplitude for the same objects presented in the left panel.No correlation is observed between the amplitude of the rotational modulation and the effective temperature or spectral type.Although UCDs in the 2200 ≤ T eff ≤ 2600 K range, i.e. spectral types M7.5 to L0, present a higher dispersion in the values of rotation amplitude, this seems to be an effect of the small number of targets in this group (only 36) compared to those with spectral types M5 and M6 (60 and 64 targets, respectively).All these results point toward a rotational modulation in the light curves that might depend on other factors, besides the difference in the energy transfer mechanism in fully and partially-convective objects.

No correlation between flare parameters and spectral type
Following the prescription indicated in section 3.2, we found a total of 778 flares in the TESS light curves of 103 objects, which represents ∼ 49.5% of the total sample.In Table 2, we present the main parameters of the 778 identified flares and, in Fig. 6, selected flaring events are shown.
We explored possible correlations between the parameters associated with flares (i.e.equivalent duration, flare amplitude, duration, and flare rate) and spectral type.In particular, we investigated if, compared with early-type UCDs, late-type objects present more energetic and longer lasting flaring events.In the left panel of Fig. 7, we present a box plot of the maximum equivalent duration per spectral type for the 103 targets with detected flares.For UCDs with more than one detected flare, the longest equivalent duration event was chosen.Objects with spectral types L1-L4 are not shown because none of them present flaring events.We can see that even though median values (marked with an horizontal black line inside each box) agree within the interquartile range, these seem to slightly increase from M7 to M8-L0 stars, where a peak is reached.A similar behaviour is observed for the median equivalent duration per spectral type.Here, the values of the median equivalent duration were computed considering all flares detected per object.Nonetheless, these results must be taken with caution because only 15 UCDs are M8-L0 compared with the 88 that have a spectral type between M4 and M7.Murray et al. (2022) also found a peak, but shifted at M7 targets and concluded that, in comparison, spectral types later than M7 show a real absence of high energetic events.However, in contrast with the study of Murray et al. (2022), we do observe the same behaviour for the maximum and median flare amplitude per spectral type, which is consistent with the positive correlation between equivalent duration (energy) and amplitude of flares found in previous studies (see Section 4.6).Additionally, in the right panel of Fig. 7, we show a box plot of flare's median duration in minutes for the 103 targets with detected flares.This median duration was calculated from the span of all flares detected per object.No clear trend is observed and median values are in agreement within the interquartile range.Events associated with M8 UCDs seem to last slightly longer than the rest.However, given that only 8 targets constitute this group, which is a small number compared with the size of the samples for the other spectral types, this trend must be taken with caution.Also, there is no evident correlation between flare rate, measured in number of events per day, per spectral type.

No correlation between flare and rotation parameters
For the 56 UCDs with detected rotational modulation and flare events, we searched for possible correlations between the two rotation parameters (period and amplitude) and equivalent duration (maximum and median value), and flare amplitude (maximum and median value), and correlations between amplitude of the rotational modulation and flare rate, and flares median duration.No correlations between these parameters were identified.We found a similar result after plotting the value of the rotation period against flare rate and flares median duration for all the 56 targets with detected rotational modulation and flares in the sample.Previous studies (Newton et al. 2017;Günther et al. 2020;Murray et al. 2022) found that very fast rotators have a higher likelihood of flaring than slow rotators.In our sample, we are unable to confirm these conclusions, given that the majority of our targets have detected rotation periods ≲ 2 days (and are thus considered fast rotators), whilst the aforementioned works expand the range of rotation periods to > 5 days.Finally, we found no correlation between rotation amplitude and rotation period for the UCDs in our sample, which confirms previous results from Newton et al.In the left panel, we note a peak in the number and fraction of flaring around early-type M4-M6 UCDs that decreases toward late spectral types (M7-L4).We find the same result in the mid and right panels, where the number and fraction of objects with detected rotation periods is maximum around M4-M6.Rotation Amplitude (mag) Figure 5. Left: Effective temperature versus rotation period for the 87 targets with measurable rotation in the sample.No clear correlation is observed between these parameters.We note that the high dispersion only observed in the periods between 2700 < T eff < 3000 K, may be a consequence of the small number of targets with T eff < 2700 K that have a measurable rotation in our sample.Right: Effective temperature versus rotation amplitude for the targets with measurable rotation shown in the left panel.Also in this case, there is no evident correlation between the measured rotational amplitude and the effective temperature.The high dispersion found in the values of rotational amplitude in the 2200 ≤ T eff ≤ 2600 K range may be an effect of the small number of targets in this group (only 36) compared to those in early-spectral types (60 and 64 targets, respectively).

Galactic Kinematics and Active UCDs
We cross-matched the coordinates from the TESS Input Catalog with the Gaia-DR3 catalog adopting a search radius of 15 arcsec.We considered this large search radius because the UCDs in our sample have high proper motions.When more than one object fell in the search area, we chose the one with the largest G RP − G BP color (i.e. the reddest one) and extracted its proper motion, parallax and radial velocity values.For those targets with no Gaia information, we searched catalogs available in the SIMBAD database for each object, that included the parameters mentioned above.Then, we computed the galactic velocity components U LSR , V LSR , W LSR with their errors for all the UCDs in our sample, following the methodology described in Johnson & Soderblom (1987).We adopted the solar velocity components relative to the Local Standard of Rest provided by Tian et al. (2015), (U e , V e , W e ) = (9.58,10.52, 7.01) km s −1 .Finally, we used the criteria employed in Reddy et al. (2006) to determine the membership probability of each UCD to the thin disk, thick disk or halo, including transition regions between the three Galactic populations.
We measured the U LSR , V LSR , W LSR values for 196 UCDs in our sample, of which we have: 186 (∼ 94.9%) from the thin disk, three (∼ 1.5%) from the thick disk, one (∼ 0.5%) from the halo, five (∼ 2.5%) that belong to the transition zone between the thin and the thick disk, and one (∼ 0.5%) from the transition zone between the thick disk and the halo.We were not be able to measure U LSR , V LSR , W LSR for 12 objects, given the lack of radial velocity measurements in the literature.These results are presented in Table 1.In Fig. 8, we show the location of the UCDs in a Toomre diagram and their galactic membership as a function of spectral type in Fig.  9.In Fig. 8, different symbols mark targets from different galactic components.The target that belongs to the halo is an L3.1V UCD and it is not shown for a better visualization of these plots, as it is located at (∼ 753km s −1 , ∼ 638km s −1 ).The halo UCD did not have a measured rotational modulation nor detected flares.In the left panel, we distinguish UCDs with measured rotation periods, P LS ≤ 1 d, and P LS > 1 d in green and purple, respectively, whilst those objects without a measured rotation period are marked in gray.It can be seen that UCDs with measured rotational modulation are found in almost all of the galactic populations, including the transition zones.A similar result is observed in the right panel.UCDs with and without detected flares (blue and gray coloured symbols, respectively) are spatially distributed around almost all Galactic components.Although median values agree within the interquartile range, we note a slight increase from M7 to M8-L0 stars, where a peak is reached.Nonetheless, it is worth noting that this trend can be due to the small number of M8-L0 UCDs (15 in total) compared with the 88 stars with M4-M7 spectral types.Right: Box plot of the flare median duration per spectral type for the 103 targets with detected flares.The median duration was estimated from the duration of all flares detected per object.No evident correlation is observed, and median values agree within the interquartile range.We note that events in M8 UCDs seem to last slightly longer than the rest.However, this may be a consequence of the small number of targets (only 8) that constitute this group.Here, targets that flare and have a detected rotation period are indicated in orange color, those that only flare in green, and in pink the summed targets of the other two.

Superflares
According to Schaefer et al. (2000), superflares are defined as flares with bolometric energies from 10 33 erg to as high as 10 38 erg .Following this definition, in the present study, we identified 56 superflares from 33 stars (27 M5, 21 M6, 2 M7, 4 M8, and 2 M9) with E bol between 1.0 × 10 33 and 1.1 × 10 34 erg.As a comparison, Howard & MacGregor (2022) explored the time-resolved properties of flares in a sample of 226 M stars using TESS 20-second cadence mode data and discovered 428 superflares, with 27 events showing energies > 10 35 erg .Additionally, Raetz et al. (2020b) found 91 superflares on 46 rotating M dwarfs observed with K2, while Murray et al. (2022) did not detect superflares in their sample of UCDs.In our work in particular, the most energetic flare of the entire sample, which released a bolometric energy of 1.15 × 10 34 erg over 1.66 hours, occurred on the UCD TIC 175241416, an M6 star in the North Hemisphere with a T mag = 13.326,observed in three TESS sectors.

Identifying correlations between flare energy, amplitude and duration
Following previous studies (Hawley et al. 2014;Silverberg et al. 2016;Yang et al. 2023), we searched for correlations between flares' bolometric energy, amplitude, and duration for 102 flaring objects.
In this analysis, we excluded the target TIC 318801864, an M9 UCD for which we were unable to estimate the bolometric energy of its unique flare event given that neither Gaia-DR3 nor TESS catalogs  report its distance.Flare energies, E bol , were calculated following Eq. 1. Duration was computed as the difference between the end and start times of the flare event as measured by AltaiPony.Table 3 shows the measured ranges per spectral type for each parameter.In Fig. 10, we present plots of flare bolometric energy versus flare amplitude in units of relative flux and flare duration in units of minutes, and flare amplitude against duration.Blue, pink, green, orange, cyan, brown, and gray circles indicate flares coming from UCDs with M4, M5, M6, M7, M8, M9, and L0 spectral types, respectively, while black crosses point out superflares.Regardless of spectral type, strong correlations between energy, amplitude and duration can be seen, showing that higher amplitude flares last longer, and more energetic events, peak higher and last longer than the less energetic ones.This is in agreement with the findings of previous studies.For example, as to the duration-amplitude relation, Hawley et al. (2014) and Silverberg et al. (2016) used Kepler data to measure durations and amplitudes of the flare events in GJ 1243, whilst Raetz et al. (2020b) did the same for 1644 flares corresponding to 46 K7-M6 stars with detectable rotation period from the K2 short-cadence data.All of them confirmed that flares with higher amplitudes also present longer durations, as found in our study.In contrast, in the recent work of Murray et al. (2022), the authors do not observe an amplitude-duration relationship for the flares of their M4-L0 targets, with observations taken from ground-based facilities.On the other hand, Raetz et al. (2020b) noted that the maximum relative flare amplitude increases for later spectral types.As shown in Table 3, we did not identify the trend from Raetz et al. (2020b), probably due to our sample focusing on UCDs and not earlier M-dwarf stars.Here, blue, pink, green, orange, cyan, brown, and gray circles indicate flares coming from UCDs with M4, M5, M6, M7, M8, M9, and L0 spectral types, respectively, while black crosses point out superflares.Solid lines show the best linear least-squares fit to the parameters of all the flares detected, whilst dashed lines represent the best linear least-squares fit but only considering superflares (E bol > 10 33 erg ).We note that regardless of spectral type, there are strong correlations between flare energy, amplitude, and duration, showing that higher amplitude flares last longer, and more energetic events, peak higher and last longer than the less energetic ones.

The energy-duration relation in UCDs is similar to that in partially-convective stars
Additionally, we quantified the relationships between flare parameters.For that purpose, we divided the flares into two groups: one that includes almost all detected flares, and a second group including only superflares (E bol > 10 33 erg ).In Fig. 10, we plot these two groups and the linear least-squares fits to the data.Solid and dashed lines show the best linear fits to the parameters of all the flares detected and to those of the superflares only, respectively.In particular, regarding the energy-duration relationship, Maehara et al. (2015) found a slope of  = 0.39 ± 0.03 for solar superflares, which can be explained by assuming magnetic reconnection as the responsible for these events.Silverberg et al. (2016) analysed Kepler short-cadence data of GJ 1243 and found  = 0.342 ± 0.003 and  = 0.363 ± 0.006 for classical and complex flares, respectively.Additionally, Yang et al. (2023) explored this same correlation for stars of different spectral types and evolutionary states through the analysis of TESS data from the first 30 sectors.Particularly, for M-type stars, they obtained a slope of 0.304 ± 0.003.In this study, we found  = 0.497 ± 0.058 if all the flares are considered and  = 0.610 ± 0.451 for all events with E bol > 10 33 erg .The agreement in the values of these slopes with those of previous findings might indicate that, although the physical process operating in fully-convective objects in principle differs from that in partially-convective stars, it generates flares of similar characteristics and behaviour than those produced by magnetic reconnection, as in solar-type and early-M stars.

Flare Frequency Distribution (FFD)
FFD indicates the rate at which a star produces flares above a certain energy.It is represented as a diagram of cumulative flare frequency as a function of flare energy and, it is typically modeled using the following power-law (Gershberg 1972;Lacy et al. 1976): where  represents the number of flares per time unit with energies above a minimum energy, E min , and  and  are constants.The value of  is of particular interest because it gives information about the main contributor to the total energy emitted by flares, and hence about the kinds of flares responsible for the coronal heating, during a specific observing window (Hudson 1991;Güdel et al. 2003;Gao et al. 2022).Specifically, if  > 2, low-energy flares supply the majority of the total energy, whilst  < 2, indicates that the highenergy flares have the largest contribution.
Given the scarce number of flares for M4, M7, and M8-L0 spectral types (31, 23, 36, 21 and 2, respectively) identified in this study, we categorized them in the following groups: one for M4-M5 targets, another for M6-M7, and the third one for M8-L0.We constructed the FFDs of all the groups by computing the flare frequency as the ratio of the total number of flares detected to the duration of the TESS sectors in which the objects were observed.Previous studies (e.g.Gershberg 2005;Silverberg et al. 2016;Paudel et al. 2018) have shown that, in some cases, FFDs are best fitted with a broken power-law, or a combination of functions, instead of a single power-law.In this work, however, also following former studies (e.g.Silverberg et al. 2016), in the M4-M5 group, we did not consider the contribution from flares with E bol > 4.6 × 10 33 erg that deviate the FFD from a single power-law.Meanwhile, in the M8-L0 group, we did not take into account the contribution of the star TIC 318801864 because we were unable to measure the bolometric energy of its only flare (see Section 4.6 for more details).
At the low-energy tail, the FFDs show a break in the powerlaw relationship due to the completeness limit of the sample, i.e. the minimum energy below which the search algorithm is not able to detect all flares, underestimating the frequency.Most previous studies applied one of two approaches to handle this issue.One possibility is to compute the minimum energy or the flare recovery rate through In the M4-M5 group, we did not consider the contribution from flares with E bol > 4.6 × 10 33 erg that deviate the FFD from a single power-law.Meanwhile, in the M8-L0 group, we did not take into account the flare from the star TIC 318801864 because we were unable to estimate its bolometric energy.Black solid lines are the best-fit to the data.Gray symbols indicate flares below the minimum energy value adopted for each spectral type, where the flare distribution is not expected to be complete.We found  = −1.754+0.043  −0.042 ,  = −1.695+0.048  −0.046 and  = −1.726+0.109 −0.100 for the M4-M5, M6-M7, and M8-L0 UCDs, respectively.These values are within the range of previous results and indicate that in the UCD regime, there are no changes in the power-law relationship as a function of spectral type.
artificial flare injection-recovery tests (see Seli et al. 2021;Medina et al. 2022;Murray et al. 2022) by employing, for example, the tools provided by Altaipony.Alternatively, as implemented in this work, we determined this limiting energy as the minimum energy value for which the slope of the power-law did not vary within the error of the least-squares fit to the data (e.g.Hawley et al. 2014;Silverberg et al. 2016).In the process, Poisson uncertainties were assigned to the cumulative frequencies to avoid high-energy flares skewing the fit.For M4-M5, M6-M7, and M8-L0 targets, we found E min = 4.6 × 10 31 , E min = 6.0 × 10 31 and 6.0 × 10 31 erg , respectively.We applied a Bayesian approach (Wheatland 2004) provided by AltaiPony to the flares with energies above E min , to determine  and  through a Markov Chain Monte Carlo method.We checked the robustness of the  value determined for the M8-L0 UCDs, given that it was calculated from a small number of flares (only 47).To do so, we recorded the values of the slopes resulting from fitting the FFD several times but removing one flare each time.We found that  remained constant within errors and, hence, the value of the determined slope is robust.For M4-M5 stars, we obtained  = −1.753+0.043  −0.042 ,  = −1.695+0.048 −0.046 for M6-M7 stars, and  = −1.726+0.109 −0.100 for M8-L0 UCDs.In all the cases, we used the Kolmogorov-Smirnov statistic (Maschberger & Kroupa 2009) to test if the assumption of the power-law hypothesis is correct.We found that the three best-fits are consistent, with a 95% significance, to a power-law relationship.The resulting FFDs are shown in Fig. 11.
Several previous works estimated  for UCD FFDs, providing a wide range of possible values.For example, Paudel et al. (2018) found  values in the range of 1.3-2.0 for 10 UCDs observed in shortcadence with K2.Additionally, Silverberg et al. (2016) obtained  ∼ 2 for the star GJ 1243 through 11 months of Kepler data, but noted a monthly variation of this coefficient from 1.592 to 2.389.Murray et al. (2022) detected flares from 78 low-mass stars observed with the SPECULOOS-Southern Observatory and determined  values of 1.88 ± 0.05, 1.72 ± 0.02, and 1.82 ± 0.02 for M4-M5, M6, and M7 spectral types, respectively.Also, Seli et al. (2021) analysed TESS full-frame images of TRAPPIST-1 like ultra-cool dwarfs and found  = 2.11.In comparison, our values of  for the three groups of UCDs place at the low tail of the distribution.A possible explanation is that the E min adopted in this work is smaller than the actual minimum limiting energy, producing a less pronounced slope.Nonetheless, more observations of flares with energies below E min are needed to support this possibility.However, our values are inside the range of previous findings.This agreement within errors in the  values found in this work for the M4-M5, M6-M7 and M8-L0 UCDs, confirms the findings by Murray et al. (2022), who demonstrated that there are no changes in the power-law relationship as a function of spectral type in the UCD regime.

Habitability Potential of M dwarfs hosts
The potential for habitability of planets around M dwarfs is actively discussed within the astrobiology community (e.g.Shields et al. 2016).The chromospheric activity of these stars may be harmful for habitability, X-ray and extreme UV blow off the planetary atmospheres necessary to retain liquid water at the planet's surface (do Amaral et al. 2022).UV radiation (100-350 nm) is deemed as harmful to life because it destroys DNA causing mutations and ultimately death, but at the emergence of life UV light was one of the energy sources available for initiating prebiotic chemistry (Segura 2018).
Recent work has evaluated such potential calculating the amount of UV energy required to drive prebiotic chemistry (Rimmer et al. 2018) and a sterilization zone where ozone depletion may result in a hostile environment for life at the planetary surface (Günther et al. 2020).
The ozone produced by O 2 photolysis protects living organisms from UV damage (Segura 2018).Ozone depletion predicted by Segura et al. (2010) and Tilley et al. (2019) as a result of the combined effect of particles and UV during flares, would happen if the planet atmosphere already had life producing O 2 .Another possible source of an O 2 dominated atmosphere is the catastrophic loss of water predicted for planets around M dwarfs, where the abundance of O 2 may exceed 100 bars (e.g.Luger & Barnes 2015).The atmospheric chemistry for such atmospheres has not been studied yet, but using the trends calculated in Kozakis et al. (2022) is likely to have more O 3 with more O 2 but its response to the UV from a flare has not been studied yet.Furthermore, the depletion of O 3 during flares is mostly caused by the production of NO by particles, which depends on the abundance of atmospheric N 2 , which is uncertain.Thus, we cannot make any prediction about the behavior of ozone for these extreme cases of oxygen abundance.In any case, as recognized by Günther et al. (2020), the lack of an ozone layer is not preventive for the presence of life, thus we do not consider such limits for this discussion.
The potential for UV to drive chemistry relevant for building RNA precursors was quantified in the 'abiogenesis zone' for planets around M dwarfs using their quiescent flux Rimmer et al. (2018).Later, this zone was adapted to consider the UV emitted by flares (Günther et al. 2020;Ducrot et al. 2020;Glazier et al. 2020) with the conclusion that neither the quiescent nor the flare UV flux could deliver enough energy to drive prebiotic chemistry, except for a few stars.In Fig. 12, we show the abiogenesis limits from Günther et al. (2020) applied to the results from the previous section.Here, orange, green, and blue circles indicate the FFDs of the M4-M5, M6-M7, and M8-L0 UCDs determined in section 4.7, but based on the UV energy, E U , calculated as 7.6% of the flare bolometric energy (Günther et al. 2020).Dashed, dashed-dot, solid, and dotted black lines mark the abiogenesis zones that were calculated using the stellar parameters of RR Cae (M4, T eff =3100 K, R=0.210 R ⊙ ), SDSS J0138-0016 (M5, T eff =3000 K, R=0.165 R ⊙ ), CSS 09704 (M6, T eff =2900 K, R=0.137 R ⊙ ), and SDSS J0857+0342 (M8, T eff =2600 K, R=0.104 R ⊙ ) from Parsons et al. (2018).As can be seen from this plot, and in agreement with previous works (e.g.Seli et al. 2021;Murray et al. 2022), UCDs do not emit enough UV from flares to drive the chemistry of RNA precursors in relevant quantities for the origins of life.Although, numerical calculations by Armas-Vázquez et al. (2023) for a known pathway from HCN to adenine -a nucleobase for DNA and RNAindicate that large flares produce fast photolysis reactions and the bottleneck to produce compounds relevant for prebiotic chemistry are the kinetic reactions.
The low UV fluxes from M dwarfs does not prevent their planets from having life, high-energy particles can drive prebiotic chemistry.For early Earth, experiments indicate that galactic cosmic rays and solar energetic particles may have been the most relevant energy source for molecules relevant for prebiotic chemistry (Kobayashi et al. 2023).Proton fluxes accelerated by M dwarfs' flares are expected to be more frequent and intense than those for the Sun (Herbst et al. 2019;Rodgers-Lee et al. 2023), therefore they are a potential driver of prebiotic chemistry in potentially habitable planets around these stars.Abiogenesis zones for the M4-M5, M6-M7 and M8-L0 UCDs studied in this work.The zones were calculated using the stellar parameters of RR Cae (M4, T eff =3100 K, R=0.210 R ⊙ ), SDSS J0138-0016 (M5, T eff =3000 K, R=0.165 R ⊙ ), CSS 09704 (M6, T eff =2900 K, R=0.137 R ⊙ ), and SDSS J0857+0342 (M8, T eff =2600 K, R=0.104 R ⊙ ) from Parsons et al. (2018).This plot points out that UCDs do not emit enough UV from flares to drive the chemistry of RNA precursors in relevant quantities for the origins of life.

CONCLUSIONS
In this study, we explored the photometric variability of 208 UCDs, through the analysis of 20-second and 2-minute cadence TESS data.Our main results can be summarised as follows: • We measured rotation periods for 87 objects (∼ 42%) and detected 778 flare events in 103 targets (∼ 49.5%).
• No transiting planet or eclipsing binary companion candidate was identified around the targets analysed.
• Around 64% of the UCDs in the sample (i.e.134 objects) present some indication of activity, either because of the detection of rotational modulation and/or flares.
• In terms of rotation and flaring activity, earlier spectral-type UCDs (M4-M6) tend to be more active than later type objects (M7-L4).
• No trend was found between rotational period and amplitude and stellar spectral type or effective temperature.
• Active UCDs can be found in any of the Milky Way populations (thin disk, thick disk and halo).Noting that the only halo UCD in our sample does not show activity signatures.
• For all spectral types, strong correlations between bolometric energy, amplitude, and duration of flares can be seen, showing that higher amplitude flares last longer, and more energetic events peak higher and last longer than the less energetic ones.
• For the flare energy-duration correlation, we found a slope of  = 0.497±0.058if all the flares are considered and  = 0.610±0.451for superflare events, both are in agreement, given the uncertainties, with the results of previous studies for solar-type and earlier M dwarfs.
• The slope of the FFD for M4-M5 UCDs is measured to be  = −1.75 ± 0.04, for M6-M7 UCDs is  = −1.69± 0.04, and for M8-L0 UCDs is  = −1.72 ± 0.1, and confirms previous findings demonstrating that there are no changes in the power-law relationship as a function of spectral type in the UCD regime.
• UV radiation from the flares of the UCDs analysed in this work may not be enough to drive prebiotic chemistry.However, highenergy particles have the potential to start such chemistry considering the higher CO abundances that terrestrial atmosphere could develope around M dwarfs.
Although the dynamo mechanism dominating the interiors of UCDs must differ from the  dynamo operating in stars with tachoclines, most of these findings show that the signatures of magnetic activity, such as flares and rotational modulation, have similar characteristics among partially-convective FGK and M stars and fully-convective UCDs.

Figure 4 .
Figure 4. Histograms of the number (top in light blue) and fraction (bottom in color) per spectral type of flaring UCDs with and without detected rotational modulation (left, in green), UCDs with detected rotational modulation with and without flares (middle, in pink), and UCDs with detected rotational modulation and flares (right, in orange).In the left panel, we note a peak in the number and fraction of flaring around early-type M4-M6 UCDs that decreases toward late spectral types (M7-L4).We find the same result in the mid and right panels, where the number and fraction of objects with detected rotation periods is maximum around M4-M6.

Figure 6 .
Figure6.Nine flaring events corresponding to nine independent UCDs analysed in this work.These flares have been chosen to showcase the different kind of flaring events that were identified in the analysed TESS light curves.The top row shows well-sampled flare events with typical profiles.The middle row presents noisy flares, and the bottom row displays a poorly-sampled noisy event on the left panel and multi-flare shape events on the mid and right panels.Error bars are shown, but in most cases, they are smaller than the symbol's size.Both axes in each panel have been optimized to each event.

Figure 7 .
Figure7.Left: Box plot of the maximum equivalent duration per spectral type for the 103 targets with detected flares.For the UCDs with more than one detected flare, we chose the longest equivalent duration event.Although median values agree within the interquartile range, we note a slight increase from M7 to M8-L0 stars, where a peak is reached.Nonetheless, it is worth noting that this trend can be due to the small number of M8-L0 UCDs (15 in total) compared with the 88 stars with M4-M7 spectral types.Right: Box plot of the flare median duration per spectral type for the 103 targets with detected flares.The median duration was estimated from the duration of all flares detected per object.No evident correlation is observed, and median values agree within the interquartile range.We note that events in M8 UCDs seem to last slightly longer than the rest.However, this may be a consequence of the small number of targets (only 8) that constitute this group.Here, targets that flare and have a detected rotation period are indicated in orange color, those that only flare in green, and in pink the summed targets of the other two.

Figure 8 .
Figure 8. Toomre diagrams of 196 UCDs in our sample.Each galactic population is shown with a different symbol (see legend).Dashed and dashed-dot lines represent velocity contours of 50 and 80 km s −1 , respectively.For clarity, the target that belongs to the halo is not shown.Left panel: Green, violet, and gray colors indicate UCDs with measured rotation periods ≤ 1 d, measured rotation periods > 1 d, and without a measured rotation period, respectively.Right panel: Blue and gray colors mark UCDs with at least one detected flare and without identified flares, respectively.Both panels show that active UCDs are spatially distributed around almost all Galactic components.

Figure 9 .
Figure 9. Bar graph of the number of objects per spectral type that belong to the thin disk, thick disk, halo, and transition zones.

Figure 10 .
Figure10.Flare bolometric energy versus flare amplitude (top) and flare duration (middle).Flare duration versus flare amplitude (bottom).Here, blue, pink, green, orange, cyan, brown, and gray circles indicate flares coming from UCDs with M4, M5, M6, M7, M8, M9, and L0 spectral types, respectively, while black crosses point out superflares.Solid lines show the best linear least-squares fit to the parameters of all the flares detected, whilst dashed lines represent the best linear least-squares fit but only considering superflares (E bol > 10 33 erg ).We note that regardless of spectral type, there are strong correlations between flare energy, amplitude, and duration, showing that higher amplitude flares last longer, and more energetic events, peak higher and last longer than the less energetic ones.

Figure 11 .
Figure11.Log-log representation of the FFDs for M4-M5 objects (top in orange), M6-M7 targets (middle in green) and M8-L0 UCDs (bottom in blue).In the M4-M5 group, we did not consider the contribution from flares with E bol > 4.6 × 10 33 erg that deviate the FFD from a single power-law.Meanwhile, in the M8-L0 group, we did not take into account the flare from the star TIC 318801864 because we were unable to estimate its bolometric energy.Black solid lines are the best-fit to the data.Gray symbols indicate flares below the minimum energy value adopted for each spectral type, where the flare distribution is not expected to be complete.We found  = −1.754+0.043−0.042 ,  = −1.695+0.048−0.046 and  = −1.726+0.109 −0.100 for the M4-M5, M6-M7, and M8-L0 UCDs, respectively.These values are within the range of previous results and indicate that in the UCD regime, there are no changes in the power-law relationship as a function of spectral type.
, with the tools provided Figure 1.TESS magnitude per spectral type of the 208 UCDs analysed in this work.The horizontal line inside each box indicates the median value for a given spectral type.Outliers are marked as open circles.We note that M4-M5 UCDs are the brightest targets in our sample.Then, T mag increases from M6 to L4 reaching its maximum between L2 and L4 objects.Yellow squares indicate the number of UCDs for each spectral type.

Table 1 .
Tian et al. (2015) the 208 UCDs analysed in this work.Columns are: TICv8.2 identifier, effective temperature, spectral type, TESS sectors used for the analysis, whether the UCD has flares, whether the UCD has a measured rotation period, contamination ratio, bolometric luminosity, rotational period estimated with LS, error in rotational period, rotational amplitude, error in rotational amplitude, false alarm probability, UVW galactic velocity components, UVW galactic velocity components relative to the Local Standard of Rest provided byTian et al. (2015), errors in UVW, reference for radial velocity, galactic population membership, membership probability.All the values shown in this table were determined in this study, except for those of SpT and T eff that were extracted from Notes:

Table 2 .
Flares' main parameters determined in this work.For those UCDs with  TIC > 0.1, the flux contamination from nearby stars may dilute the true flare ED/amplitude.Hence, these values must be taken as lower limits.(This table is available in its entirety in machine-readable form) Notes: Columns are: TICv8.2 identifier, flare start time, flare end time, equivalent duration, flare amplitude, bolometric energy, TESS data cadence.a

Table 3 .
Measured ranges for flare parameters per spectral type found in this work.