Arushi Nath

Toronto, Canada

Founder (Grade 9 Student)

Strengthening Planetary Defense: Detecting Unknown Asteroids using Open Data, Math, and Python

March 14, 2023

Asteroid collision risks are real and unpredictable. 66 million years ago, the Chicxulub asteroid impact wiped away the dinosaurs. My project strengthens planetary defense by using robotic telescopes, open data, math, and python to find unknown asteroids.
Project Overview

I took images from 4 telescopes located at different latitudes to get full sky coverage. I wrote Python algorithms to query European Space Agency’s GAIA and NASA’s Horizon sky catalogues to find all known stars and asteroids. Mean, standard deviation, and histograms created masks to remove known objects. The remaining objects were classified as possible asteroid candidates.
I detected 3 ‘preliminary’ asteroids. My algorithm’s plate-solving ability determined its Right Ascension and Declination using the telescope's focal length and celestial location. I reported this information by creating a Minor Planet Center report for my images. I have made my code and methodology open-source to crowdsource planetary defense.
 Asteroids are rocky remnants left over from the early formation of our solar system. Over a million asteroids have been identified, with sizes varying from 10 m to 530 km. Most asteroids orbit our Sun between Mars and Jupiter in the main asteroid belt. Sometimes asteroids can migrate from the main asteroid belt. If they come closer than 1.3 Astronomical Units (1 AU = Distance between Earth and the Sun) to the Sun, they are called Near-Earth Asteroids (NEA). If they come even closer: 0.05 AU or 19.46 times the Lunar Distance from Earth, they are called Potentially Hazardous Asteroids (PHA). 
Many asteroids remain undetected, or their orbits are uncertain. Sometimes paths of asteroids can intersect with the orbit of the Earth, raising possibilities of collision. In 2013 the Chelyabinsk asteroid collided with Earth showing the risk of asteroid collision is real. Thus, detecting and tracking unknown asteroids is important to strengthen planetary defense.
Create an algorithm using math and open data to detect unknown asteroids in sky images taken from robotic telescopes. 
To observe the sky and detect unknown asteroids, I turned to a network of free robotic telescopes to get complete sky coverage. I created an algorithm to remove known objects: stars and asteroids in the image and classify the remaining objects as possible asteroid candidates.
My algorithm is open-source; anyone can use it to detect unknown asteroids. It can be expanded to determine the orbital path of asteroids.

Background Research:
To learn about Python, asteroids, robotic telescopes and astronomy software, I took online courses, participated in astronomy-related Zoom calls, and wrote to astronomers for telescope time. 
Data Source:
I used open datasets for finding known stars and asteroids.
  • GAIA Early Data Release 3 (EDR3): Catalog by the European Space Agency and gives the position of all-stars based on information collected from 2014 to 2017.
  • Horizons Database: Catalog by NASA Jet Propulsion Laboratory and gives the position of known asteroids based on date and time.
Project Methodology:
I took images from 4 robotic telescopes located at different latitudes to get full sky coverage.
  • I scaled the raw images to display dimmer and brighter objects.
  • I queried the Flexible Image Transport System (FITS) file of the images to get important information: date and time the image was taken, celestial coordinates [Right Ascension (RA) and Declination (Dec)] where the telescope was pointing, its focal length, "Field of View (FOV)", and the pixel size of the camera.
  • To find all known objects in my image, I queried the GAIA EDR3 and the NASA Horizons database using image location (RA, Dec) and FOV. The output of the query was RA and Dec of all known objects. I overlaid these known objects on my image by converting celestial coordinates to pixel coordinates using a Python function.
  • I eliminated all known objects by writing an algorithm to overlay them with a black mask. The size of the objects determined the mask radius.
  • After filtering out noise by applying standard deviation, the remaining unmasked objects in the image were possible asteroid candidates. 
I wrote all algorithms in Python and used Astropy, Astroquery, Matplotlib, and Numpy libraries for analysis.
I used and to verify that I picked all known objects. 
Result 1: Auto-Scaling of Raw Images
My algorithm applied mean and standard deviation tools to automatically display dim and bright objects from any of the robotic telescopes.

 Result 2: Getting ~100% Detection of Known Objects
Earlier, my algorithm queried the USNO B-1 Star Catalog to detect known stars in the scaled images. But it was only able to identify and mask around 90% of known stars, as it is currently outdated. I switched to the GAIA EDR3 Catalog, which contained up to 20.7 magnitude stars observed between 2014 and 2017. It led to almost 100% detection of known stars and decreased false positive asteroid candidates.
Result 3: Algorithm Auto-Masks the Known Objects
The algorithm assumes stars and asteroids to be circular and applies the area of a circle formula to determine the radius of their custom masks.
Result 4: Identified 30 Possible Asteroid Candidates
I applied my algorithm to 20 sky images from different robotic telescopes. The algorithm was able to work on all images and identified over 50 possible asteroid candidates. I manually checked each output from the algorithm to remove noise or false positives (incompletely masked stars, irregular shapes, blurred backgrounds). It left me with 30 possible asteroid candidates.
Result 5: 3 Asteroids Classified as Preliminary Asteroids
I created Minor Planet Centre reports for all 30 possible asteroid candidates using Astrometrica and submitted them through IASC over 3 months. Ultimately, I learned that 3 of my observations were classified as preliminary asteroids as they matched the Pan-STARRS automated process and criteria set by their expert team. Not all preliminary asteroids become new asteroids, as they need to be observed multiple times.
 Maths and Statistics:
All telescopes imaged the sky digitally using charged coupled devices (CCD) cameras. This meant that these images could be described as arrays of different pixel values. All the analysis (scaling, masking, finding centers of bright objects, detecting unmasked candidates) was done by applying the statistical tool to pixel values.
Scaling: I used the mean and standard deviation to scale the pixel values between a lower limit (darkest spot) and the highest limit (brightest spot).
Finding Center of Known Objects: As the stars are always brighter in the center and become dimmer as you move outside, I used weighted mean to find the center point of the object.
Custom Masking: I assumed asteroids and stars to be circular in shape. I applied the formula for determining the radius of a circle based on its area to find the custom radius of the mask for each star.


1. Masking does Not Work with Unusually Shaped Objects
My algorithm is unable to eliminate irregularly shaped bright noise in my image and classifies them as possible asteroid candidates as it is only able to create masks around approximately circular objects.
2. Magnitude of Unknown Objects is Undetermined:
I am currently unable to find the magnitude (brightness) of unknown asteroid candidates in the image. Brightness allows you to determine the size of the asteroid. 


1. Correcting the Rotation and Flip of the Images
While the algorithm extracted the Right Ascension, Declination, and Field of View from the FITS file, it did not provide the rotation angle of the images or if they were flipped. As images rotated by different degrees or flipped around, the horizontal and vertical axis would have the same values, the algorithm must be configured on these variations for each telescope.
2. Recently Discovered Asteroids may not Fully Match the Images
While my algorithm picked the most recently discovered asteroids, their celestial coordinates did not match the pixel coordinates of my image. This is because the orbital path of these asteroids was not certain, and hence their actual position was different from the expected position.
3. Selecting the Best Telescope (Aperture vs Field of View)
I used robotic telescopes with aperture sizes of up to 2 meters and a field of view from 10 to 180 arcminutes. While the aperture determined the dimmest (highest Magnitude) asteroid, I would detect, the field of view determined how much sky I could image. As dimmer asteroids are more likely to be undiscovered so far, bigger aperture telescope such as Faulkes Telescope South and Pan STARRS 2 was advantageous.
Open-Source Code
I made my algorithm open-source and published it on GitHub.
I strengthened planetary defense by using robotic telescopes, open data and my coding and math skills to create an open-source algorithm to detect possible asteroid candidates.
I plan to extend my algorithm to be able to analyze multiple images. It will provide more information about asteroid candidates, such as if they are moving and if the movement is in a straight line. It will improve the asteroid detection rate and provide information about their orbits and their magnitude based on pixel brightness. As brightness is linked to the size of the asteroid, I will be able to determine what would be the impact of a possible collision. 
I also plan to convert my Algorithm to a Web App so that it is available on mobile phones.


Follow this website

You need to create an Owlstown account to follow this website.

Sign up

Already an Owlstown member?

Log in