## Main

Artificial satellites can affect the observations of space-based telescopes in low Earth orbit (LEO) such as the iconic NASA/ESA Hubble Space Telescope (HST). Shara and Johnston17 warned about this three decades ago: ‘artificial Earth satellites will cross the fields of view of operating HST science instruments with distressingly high brightnesses and frequencies’. Launched in 1990, the orbit of HST is slowly decaying due to atmospheric drag18, now being at a mean altitude of 538 km above the surface of the Earth. HST is thus sensitive to other satellites situated in higher orbits that, depending on the solar illumination angle, position and telescope pointing, can affect the observations by causing bright streaks of light across the HST images. The other concern is that these artificial satellites will become space debris, increasing the amount of space junk and the potential of HST colliding with a debris object17,19.

Satellite trails have been recognized as anomalies in HST Advanced Camera for Surveys (ACS) images20. Borncamp et al.21 proposed an algorithm for users to detect and mask satellites in their individual HST ACS observations. However, so far there has been no quantitative assessment of how frequently satellites appear in HST images. In this study, we quantify the past and current impact of higher-orbit satellites on HST images. In the Hubble Asteroid Hunter (www.asteroidhunter.org) citizen science project (Kruk et al.22), over 11,000 volunteers inspected images from the European HST archive (eHST; http://hst.esac.esa.int/ehst) for asteroid trails. The volunteers also tagged anomalies such as satellites on the forum of the project (called ‘Talk’). In contrast to asteroid trails that appear as short, curved trails in the images due to the parallax effect caused by the motion of the spacecraft around the Earth, satellite trails traverse the entire field of view (FoV) of the HST observations quickly and, in most cases, appear as straight lines.

To explore the HST archive for satellite trails, we used supervised machine learning methods and trained two algorithms based on deep learning with the volunteer classifications: a binary classifier and Google’s Automated Machine Learning (AutoML) Vision algorithm, as described in Methods. We applied the former to individual HST images of 11 minutes average exposure time (Method I: machine learning classification model for individual HST images) and the latter to HST stacked, composite images with an average exposure time of 35 minutes (Method II: AutoML classification for HST composite images). Examples of satellite trails identified in the two types of HST image are shown in Fig. 1. The results are consistent between the two methods, as explained in Comparison of the two methods section. In what follows, we present results for the HST individual exposures and discuss the outlook for HST observations being affected by satellites in the future. The statistics derived in this study concern HST images taken predominantly before the launch of satellite megaconstellations. Thus, this is an attempt to define a baseline before the swarm of artificial satellites for future follow-up studies of the impact of megaconstellations on space-based astronomy. The results and uncertainties were calculated as explained in the section on Uncertainty calculation. The equivalent information for composite images is presented in the Supplementary Information.

The datasets used in this study are shown in Table 1. We find an average fraction of 2.7 ± 0.2% of the individual HST images between 2002 and 2021 containing at least one satellite trail. There is a significant difference between the two instruments studied, as shown in Fig. 2a: the mean satellite fraction for the ACS/Wide-Field Channel (ACS/WFC) is 3.2 ± 0.2%, while for the Wide-Field Camera 3/Ultraviolet Channel (WFC3/UVIS) it is 1.7 ± 0.1%, because of the larger FoV of ACS/WFC, 202 compared to 160, and different wavelength coverage of the two instruments. We observe an increasing fraction of HST images with satellites with time: the satellite fraction increases from 2.8 ± 0.2% in 2002–2005 to 4.3 ± 0.4% in 2018–2021 for ACS/WFC, and from 1.2 ± 0.1% in 2009–2012 to 2.0 ± 0.2% in 2018–2021 for WFC3/UVIS, as shown in Fig. 2a.

The HST observations differ by the filter used. In Fig. 2b, we plot the fraction of individual images with satellite trails, split by instrument and filter used (for the 12 most commonly used filters). We notice a strong wavelength dependence: green (F606W), red (F775W) and near-infrared (F814W) filters contain a mean fraction of 3.3 ± 0.2%, while ultraviolet (UV) filters contain a much smaller fraction of satellites with 0.1 ± 0.1% for F275W. The low fraction of satellites in UV images can probably be explained by a lower satellite reflectivity at UV wavelengths.

In what follows, we also consider multiple trails in the images (144 HST individual exposures contain more than one satellite trail: 133 images with two trails, ten images with three trails and one image with four trails). We calculate the chance of seeing a satellite trail in the HST images by normalizing with the exposure time and scaling to the FoV of ACS/WFC (202 × 202), as described in the section on Uncertainty calculation. We show the chance of seeing a satellite trail in an image with exposure time of 11.2 minutes, FoV of 202 and broadband filters with λ > 400 nm in Fig. 3. The chance of seeing a satellite in HST between 2009 and 2020 is 3.7 ± 0.3% for ACS/WFC and 3.2 ± 0.3% for WFC3/UVIS, while for 2021 it is 5.9 ± 0.9 and 5.5 ± 1.2% representing an increase of 59 and 71% for ACS/WFC and WFC3/UVIS, respectively.

Finally, we investigate whether the satellites observed by HST are distributed uniformly across the sky. Being a general observatory, the observations of HST are in principle random in the sky, except for the Legacy Surveys (for example, COSMOS, CANDELS, Hubble Deep Fields), containing thousands of observations in a small fraction of the sky (roughly 2 square degrees). In Fig. 4a,b we plot histograms of the HST pointings for all the HST observations (for ACS/WFC and WFC3/UVIS combined) and, for comparison, for observations containing satellite trails. We also create a HEALPix representation of the telescope pointings. The fraction of satellites for each pixel is shown in Mollweide projection in Fig. 4c. Although there are variations across the sky, there is an excess of observations containing satellites along the equator (δ = 0°): it is twice more likely to encounter a satellite while observing in the equatorial plane than anywhere else. This can be explained by satellites in geostationary Earth orbits, which feature a constant equatorial latitude for their entire orbit. Additionally, there is a slight excess of observations containing satellites at δ > 60°, possibly due to a higher fraction of satellites in highly elliptical and inclined orbits, such as Molniya and Tundra orbits, intended to cover high latitude regions.

The fraction of HST images crossed by satellites is currently small with a negligible impact on science. However, the number of satellites and space debris will only increase in the future. As of 3 October 2021, there were 8,460 objects with sizes >0.1 m2 in orbit, above the altitude of HST (5,589 satellites of large sizes >1 m2 and 2,871 of medium sizes <1 m2. Both active and defunct satellites were included on the basis of https://www.space-track.org/. Since Space-Track measures radar cross-section sizes, which can be unreliable, these numbers are only relevant to the first significant figure). There has been a 40% increase in the number of artificial satellites in the period 2005–2021, matching the observed increase in fraction of satellites in HST images (roughly 50% increase).

The probability that a satellite crosses the FoV of HST can be modelled on the basis of the distribution of satellites that are visible at any point to HST, the FoV of the instruments and the exposure time, using a similar analysis to ref. 17. We use a simple model with a pure geometrical assessment, and assume that satellites are uniformly distributed with latitude and longitude and that all orbits are circular to first order. The probability that one satellite of Nsat crosses the FoV is

$$P\approx \frac{{N}_{{{{\rm{sat}}}}}}{4\pi }\times f\times a\times \omega \times \delta t,$$
(1)

where Nsat/4π is the number density of satellites above the orbit of HST across the entire sky, f is the fraction of these satellites that are illuminated and visible to HST at any given time (see Supplementary Information for the derivation), ω is the mean angular velocity of a satellite crossing the FoV, a is the size (width) of the FoV and δt is the average exposure time. We consider a typical satellite at 1,500 km altitude (the current median altitude of the roughly 8,500 satellites above the orbit HST). The fraction of illuminated satellites at this altitude, visible at any given time to HST is f 11% (see derivation in Supplementary Information). The probability that one of the 8,500 satellites crosses the FoV with ω 186s−1, during an exposure of 11 min, is P = 4.4% for ACS/WFC and P = 3.5% for WFC3/UVIS, close to the observed probabilities of 5.9 and 4.4% for 2021.

By the date of this analysis, there were 1562 Starlink and 320 One Web satellites in orbit, increasing the population of satellites close to the orbit of HST. Nevertheless, the number of satellites in LEO will only increase in the future, with an estimated number of satellites in LEO between 60,000 and 100,000 by the 2030s (Supplementary Information). Most of these satellites will be between 500 and 2,000 km altitude. To model the future impact of satellites on HST observations, we assume typical LEO megaconstellations between these altitudes and calculate the probability that one of the satellites will cross the FoV of one of the HST instruments using equation (1). We estimate that the probability of a satellite crossing the FoV of HST will be between 20 and 50%, depending on the altitude and the number of satellites in orbit (Supplementary Information). For example, the probability that one of the 100,000 satellites at 850 km altitude will cross the FoV is 33% for WFC3/UVIS and 41% for ACS/WFC, increasing the current fraction of affected images by an order of magnitude.

Satellites in upper LEO (1,000–2,000 km) will appear more frequently in the HST images as the fraction of satellites visible to HST is higher. Nevertheless, they will produce narrower trails (such as those in lower part of Fig. 1a). Satellites in lower LEO orbits (500–1,000 km) will appear less frequently in the images since there will be fewer visible to HST, but they will produce broader trails. One of the main Starlink shells, for example, is at 550 km altitude, not far from the altitude of HST of 538 km. Assuming that an artificial satellite will pass at only 100 km from the pointing of HST, the 3 m Starlink satellite2 will produce a wide band of 6 or 120 pixels across the ACS detector, which might have an impact on the scientific exploitation of the HST data. Even though no scientific impact of satellite trails on HST data has been reported so far, this has been noted for other telescopes such as Keck MOSFIRE, where a probable explanation for a flash attributed to a gamma-ray burst in a z 11 galaxy23 is an artificial satellite causing flashes in the dispersed spectra24,25.

As an important fraction of the HST images will be affected by artificial satellites, it is important to consider mitigation strategies. The current version of DrizzlePac is not designed to correct for the satellite trails in the images, but to correct for cosmic rays (Comparison of the two methods). As mitigation for HST, one could mask out the satellite streaks (for example, with the acstools.satdet, https://acstools.readthedocs.io/en/stable/satdet.html, tool21) before combining multiple drizzled exposures with DrizzlePac. This might prove to be difficult for satellite trails that are wider than a few tens of pixels, in which case the particular exposure cannot be used for science. While deeper surveys can afford to discard one or two exposures affected by satellite trails, it will be particularly problematic for observations of bright and extended targets, such as some HST SNAP programs, where typically only a couple of exposures are available. Taking shorter exposures can alleviate some of the problems, but one will have to account for the telescope time lost with unusable images.

HST may not be the only space telescope affected by artificial satellites. Other telescopes in LEO, such as CHEOPS or NEOWISE, are also susceptible to artificial satellite trails in their images, as their orbit is below the orbit of many of the current satellites. There is a particular concern for satellites having a notable impact on observations with future telescopes in LEO having large FoVs, such as the planned Xuntian wide-field optical-IR telescope (having 300 times the FoV of HST) on the Chinese Space Station. Many space observatories are now orbiting (James Webb Space Telescope) or planned to orbit in L2 (Euclid, Plato), placing them far from artificial satellites and space debris and sparing them from the growing problem faced by telescopes in LEO and on the ground.

## Methods

We analyse the occurrence of satellite trails in HST images using two different machine learning methods and two different types of HST image: individual exposures and composite images available in the eHST archives.

We analyse HST ACS/WFC images taken and publicly released between 22 March 2002 (when the ACS camera was installed) and 3 October 2021 and WFC3/UVIS images taken and publicly released between 25 June 2009 (when the WFC3 obtained first light) and 3 October 2021. The dataset contains the individual HST exposures and composite HST images, created and processed by the Space Telescope Science Institute (STScI) using the standard pipeline calibration settings, drizzled and combined using the DrizzlePac26 algorithm (https://www.stsci.edu/scientific-community/software/drizzlepac.html). We exclude the grism spectral images (as the spatially extended spectral ‘wings’ can be confused with satellite trails), calibration images, images with FoVs smaller than 7 arcmin2 (to remove subframes) and images with an exposure time of less than 100 s (for composite images) and 30 s (for individual exposures). We did not include near-IR images from the WFC3/IR channel, because of the lack of training data for this instrument.

The individual HST images used are the original, undrizzled images with an average exposure time of 11.2 min, with PNG snapshots available in the eHST archives. The images from the two ACS/WFC (WFC3/UVIS) apertures were added side-by-side, without correcting for the geometric distortions. We downsized the images from 4,096 × 4,096 to 600 × 600 pixels to improve the display on the citizen science platform and to increase the speed of training the classifier. These were analysed using a machine learning binary classification model presented in Method I: machine learning classification model for individual HST images. Examples of individual images with satellite trails are shown in Fig. 1a.

The HST composite images, with an average exposure time of 35 min, are processed with the DrizzlePac algorithm that performs cosmic ray rejection before combining the individual images. However, it is not well suited to removing satellite trails. Large artefacts such as satellite trails are visible as residual trails in the composite images27, as shown in the examples in Fig. 1b. These residual trails in the composite HST images were used to identify satellites with AutoML, described in Method II: AutoML classification for HST composite images. This dataset is the same as the one presented in ref. 22.

### Building training sets using crowdsourcing

Satellite trails were first identified in HST composite images by the volunteers on the Hubble Asteroid Hunter (www.asteroidhunter.org) citizen science project and tagged (with #satellite) on the forum of the Zooniverse project (https://www.zooniverse.org/projects/sandorkruk/hubble-asteroid-hunter/talk/tags/satellite). We used 1,613 of the satellite trails identified by the volunteers in the HST composite images to train our AutoML model (Method II). In a subsequent iteration of the citizen science project, to identify the satellites in the corresponding individual HST exposures, we designed a new workflow to classify satellites and uploaded those individual exposures that corresponded to the 1,613 tagged composite HST images with satellites. With the help of 450 citizen scientists, we classified 10,239 HST individual images (7,776 for ACS/WFC and 2,463 for WFC/UVIS), gathering ten classifications per image for a total of 102,390 classifications. An image is labelled to contain a satellite if most of the volunteers provided a positive classification (five or more positive classifications out of ten classifications per image). If all users classified an image to not contain a satellite, we added these images to the ‘no satellite’ class. Balancing the two datasets to have approximately the same number of images for both classes this resulted in 3,329 images for the ‘no satellite’ class and 2,622 for the ‘satellite’ class.

### Method I: machine learning classification model for individual HST images

For the classification of HST individual images, we developed an image classifier model using transfer learning. We based our model on the InceptionV3 model28, pretrained with the ImageNet dataset. The model has 22.9 million parameters. Our model is a simple binary classifier that predicts whether there is a satellite or not in a given image. Therefore, we use a sigmoid activation function in the output layer, while for the other layers we used the rectifier activation function. To reduce overfitting, we add three dropout layers with a probability of 50%. We used the stochastic gradient descent optimizer for the training. For the calculation of the loss, we used the binary crossentropy.

We used the 3,329 images for the ‘no satellite’ class and the 2,622 for the ‘satellite’ class to train the algorithm. We split the data into 80% of the images for training and 20% of the images for validation. We trained the algorithm and stopped it as soon as it started to overfit, after 22 epochs. Our model achieves an accuracy of 93.8%, a precision of 97.5% and a recall of 89.0% at a 50% classification threshold. This leads to an overall F1 score of 93.1%. The confusion matrix is shown in Supplementary Fig. 4.

We applied the trained model on all 114,607 individual HST images and the model predicted that 3,157 images contain satellite trails. We inspected all the positive classifications and removed the images that were not correctly classified by the algorithm (205 cases). The main reasons for the false positive predictions were: guide star failures leading to trailing stars, diffraction spikes from bright stars or cosmic rays falsely classified as satellites. We also added 120 images that the volunteers classified as being crossed by satellites, but were not detected by the algorithm. Some of the images contain more than one satellite (the model only predicts if satellites are present in the images, but not their number). This process led to a final sample of 3,072 HST individual images containing a satellite trail and 3,228 satellite trails in total. This dataset of satellites is used for the analysis described in the main section of the paper.

### Method II: AutoML classification for HST composite images

For the second classification method, we used the HST composite images, which are readily available in the eHST archive. As described in Table 1, we used a total of 37,454 composite images. To improve the trail detection using automated methods, we split the composite PNG images into four equal quadrants (examples are shown in Fig. 1b). The PNG cutouts have sizes of 1,024 × 1,024 pixels, corresponding to 101 × 101 for ACS/WFC and 80 × 80 for WFC3/UVIS.

We used the Google AutoML Vision multi-object-detection algorithm (https://cloud.google.com/vision/automl/object-detection/docs) to identify satellite trails in cutouts of HST composite images. The Google AutoML Vision builds a deep learning model based on a neural architecture search algorithm29. We trained the AutoML Vision model on Google Cloud with four labels: satellite, asteroid, gravitational lens arc and cosmic ray (all of these being trail-like features), thus we can detect all four types of object separately in the cutouts, as described in ref. 22. Besides the classifications, AutoML returns a bounding box for each classification, as shown in Fig. 1b.

We trained the model with the 1,613 satellite trails tagged by the volunteers on Hubble Asteroid Hunter and split the sample into 70% training, 15% validation and 15% test sets for AutoML to optimize the hyperparameters of the model and evaluate its performance. The model achieves a precision of 91.7% and recall (or completeness) of 84.4% on the test set, at a 50% classification confidence threshold. Applying the model to the 149,816 HST composite image cutouts, we detect 7,990 satellite classifications in the cutouts (as shown in the examples in Fig. 1b), corresponding to 4,322 composite images with satellite trails out of the 37,454 ACS/WFC and WFC3/UVIS images. Two of the authors (S.K. and P.G.-M.) inspected the 4,322 composite images with positive classifications by AutoML and identified 1,387 images with trails that were not caused by satellites. The types of trail the automated algorithm was misclassifying as satellite trails were the same as for the individual images: guide star failures causing stars to trail in the images and diffraction spikes from bright stars outside the field appearing as long straight lines in the images. The model could be improved by adding additional labels for ‘diffraction spikes’ and ‘trailing images’. However, given that this paper aims to study the impact of satellites on HST images and not to produce the perfect model, we discarded the 1,387 images, resulting in 2,935 images with correctly identified satellite trails, containing a total of 3,217 satellite trails.

### Comparison of the two methods

We analysed the HST images for satellite trails using two different machine learning methods: a simple binary classifier based on the InceptionV3 model and an object-detection model in Google Cloud, AutoML. We inspected the HST individual exposures, as well as the stacked, composite HST images. The two different analysis methods show consistent results. With our machine learning classification we recovered 3,072 images with satellite trails, while with AutoML we recovered 2,935 images with satellite trails, respectively.

We find a fraction of 8.9 ± 1.1% composite ACS/WFC and 5.8 ± 0.7% composite WFC3/UVIS images crossed by satellites. On average, 3.2 individual exposures were combined to create the composite images. This corresponds to a fraction of HST images with satellites of 2.8 ± 0.3% for the individual ACS/WFC and 1.8 ± 0.2% for individual WFC3/UVIS exposures, an average of 2.4 ± 0.3% for the two instruments. These measurements based on the HST composite agree well (within uncertainties) with those found for the individual HST images (with Method I), 3.2 ± 0.2% for ACS/WFC3 and 1.7 ± 0.1% for WFC3/UVIS, presented in the main section of the paper. These results are promising as we used two completely different and independent algorithms analysing two sets of images processed in different ways. We, therefore, proceed with the analysis and show only the results of the machine learning classifications on individual HST images (Method I) in the main article. The same results, but for the HST composite images are shown in the Supplementary Information.

Finally, since we find a similar fraction of satellites in the HST individual images, which contain bright satellite trails, and in the HST composite images, where the satellite trails appear as residuals, this suggests that flagging satellites as cosmic rays and rejecting them in DrizzlePac is not sufficient to completely remove the trails. Therefore, different mitigation techniques, such as masking the satellite trail, need to be investigated for HST.

### Uncertainty calculation

In the main article, we investigate the number of HST images containing a satellite trail s using histograms. Due to the variation in the number of observations of HST with time, by instrument and filter, we need to consider the Poisson uncertainty in the number of images with satellites, $$\sqrt{s}$$. Additionally, we assume an uncertainty in the performance of the machine learning algorithm to detect the trails. We use the F1 score of 93% that leads to an uncertainty of 0.07s. Both uncertainties are combined using the Gaussian propagation of uncertainty $${u}_{s}=\sqrt{{(\sqrt{s})}^{2}+{(0.07s)}^{2}}=\sqrt{s+0.0049{s}^{2}}$$. We then calculate the fraction $$f=\frac{s}{a}$$ of images containing a satellite trail, where a is the total number of HST images. The uncertainty in the fraction of HST images with satellites is thus

$${u}_{{\mathrm{f}}}=\frac{\sqrt{s+0.0049{s}^{2}}}{a}.$$
(2)

Additionally, for the distribution of the declination and right ascension, in the frequency histogram for the images with satellites, we divide the number of images for each bin by the total number of images with satellites stotal or for the entire dataset atotal: $${\mathrm{fre}}{q}_{s}=\frac{s}{{s}_{{\mathrm{total}}}}$$ and $${\mathrm{fre}}{q}_{a}=\frac{a}{{a}_{{\mathrm{total}}}}$$. To calculate the uncertainty in the frequency histograms, we used the following equation:

$${u}_{{\mathrm{fre}}{q}_{s}}=\sqrt{{\left(\frac{1}{{s}_{{\mathrm{total}}}}{u}_{s}\right)}^{2}+{\left(\frac{s}{{s}_{{\mathrm{total}}}^{2}}{u}_{{s}_{{\mathrm{total}}}}\right)}^{2}}.$$
(3)

The final result of our paper is the chance of seeing a satellite in an HST image, normalized by exposure time and scaled to the width of the FoV of ACS/WFC (202):

$$c=s_{\mathrm t} \frac{t_{\mathrm{mean}}}{t_{\mathrm{sum}}}\frac{202^{\prime\prime}}{a({\,}^{\prime\prime})},$$
(4)

where st is the number of satellite trails, tsum the total exposure time in a bin and tmean the mean exposure duration for an image and a() is the size (width) of the FoV. For this calculation, we only include filters with λ > 400 nm (we excluded UV images where the observed fraction of satellites is low) and images using the full FoV. For the number of satellite trails st, we used the same uncertainty calculation as for the number of images with satellites s. For the total exposure time of all images, we assumed the uncertainty $${u}_{{{\mathrm{t}}}_{\mathrm{sum}}}=0$$. For the mean exposure duration tmean, we used the standard error of $${u}_{{{\mathrm{t}}}_{\mathrm{mean}}}=\frac{\sigma }{\sqrt{{a}_{\mathrm{total}}}}$$ with the standard deviation σ and the number of all images atotal. The uncertainty in the chance of seeing a satellite calculation is therefore

$$u_{\mathrm c}=\sqrt{\left(\frac{t_{\mathrm{mean}}}{t_{\mathrm{sum}}}\right)^2(s_{\mathrm t}+0.0049s_{\mathrm t}^2)+\left(\frac{s_{\mathrm t}}{t_{\mathrm{sum}}}u_{{\mathrm t}_{\mathrm{mean}}}\right)^2}\times \frac{202^{\prime\prime}}{a ({\,}^{\prime\prime})}.$$
(5)