<p>Thanks for your question and your interest in the THOR algorithm. THOR is the product of my PhD dissertation so I figured I’d take a stab at answering your question. It’s super humbling and inspiring to see it mentioned on stack exchange – bucket list item checked off, thank you!</p>
<p><strong>Background and Motivation:</strong></p>
<p>To discover asteroids, survey telescopes will take an image of the night sky and then come back about 30 minutes later and take another image. In the time between those images, stars and galaxies will not have moved but asteroids will have shown discernable motion. The detections of asteroids measured from these images are known as &quot;tracklets&quot;. The same telescope then comes back a few nights later and takes another series of images to try to re-observe the same asteroid (observe another tracklet). Once you’ve observed the asteroid on a few distinct nights you’ve then made the discovery.</p>
<p>The key detail is that telescopes must observe the same area of the sky multiple times in one night to discover asteroids since they rely on observing tracklets. The gif below shows how tracklets are observed. In this example, 4 observations per night are made (known as “quads”) over the course of 5 nights. The detections that get highlighted in blue are all the asteroids observed with tracklets.</p>
<p><a href="https://i.sstatic.net/7AAEKNye.gif" rel="noreferrer"><img src="https://i.sstatic.net/7AAEKNye.gif" alt="Observing Tracklets" /></a></p>
<p>What we wanted to do with THOR was find a way to make it so that telescopes didn’t need to take a series images of the same area of the sky within one night. Instead, we wanted to find a way that allowed telescopes to perform a variety of different observing campaigns that perhaps focus on other science and/or require a different pattern of observations. A cool side-effect of this is that if you could remove the requirement to observe tracklets suddenly it might be possible to find asteroids in a lot more astronomical datasets. Many astronomical datasets were not made with asteroid discovery in mind -- they don't have tracklets!</p>
<p><strong>How Tracklet-Less Heliocentric Orbit Recovery (THOR) Works:</strong></p>
<p><em>Transformations</em>
<a href="https://i.sstatic.net/o9E4wjA4.gif" rel="noreferrer"><img src="https://i.sstatic.net/o9E4wjA4.gif" alt="THOR's Test Orbit Transformation" /></a></p>
<p>In the left panel in the gif above, the grey dots represent simulated observations extracted from images taken by a telescope over a 2-week period. There are asteroids in these data but they can be very difficult to spot. The non-linearity of their motion in part due to our motion around the Sun and the rotation of the Earth, and the fact that there are many, many detections makes this a challenging problem. There are also no traditional tracklets as only one image is taken a day.</p>
<p>In THOR we use test orbits to find asteroids. Using a test orbit, we can propagate that orbit backward and forward through time and calculate exactly where it would appear in our images. One advantage of this is that we also know how far away the test orbit would be from us at any point in time and how fast it's moving. In the gif, the red dots in the left panel represent where a particular test orbit would appear in each of the images from which these data were extracted. As the red dot moves we grab detections near the predicted position of the orbit at that time (these get highlighted in blue as the red dots appear).</p>
<p>For each of the test orbit’s predicted positions, we can make a simple assumption: let’s assume that all the detections near the location of the test orbit at that time are at the same distance from the Sun as our test orbit. When we make this assumption, we have all of the information we need to transform the grey detections into a frame that is centered on the motion of our test orbit. This transformation is similar to having a camera located at the Sun, and from the Sun tracking and following the motion of an asteroid while taking images. These transformed detections are plotted in the right panel. Notice how suddenly you can see lines and curves? These lines and curves are other asteroids that have similar orbits to our test orbit. It’s the same data as in the left panel just visualized in a different way to make it easier to spot asteroids. In the right panel, because our detections have been transformed to be centered on the motion of our test orbit, the red dots from the left panel have collapsed to a single dot in the right panel. In the transformed frame centered on its own motion, the test orbit would appear at the center as a single point.</p>
<p><em>Hough Transform</em></p>
<p>The 3D Hough transform component is how we programmatically extract the lines and curves from the right panel in the gif above. Fundamentally, the blue detections are 3-dimensional: they have a time dimension and two position dimensions. We collapse the problem to 2-dimensions by assuming some velocity offsets relative to our test orbit’s motion. We shift the detections with each velocity offset to see if the lines collapse into small clusters. These clusters can then be identified by cluster finding algorithms like DBSCAN. Below is an example (from <a href="https://iopscience.iop.org/article/10.3847/1538-3881/ac042b/meta" rel="noreferrer">Moeyens et al. 2021</a>). The blue detections are the same type of detections as in the right panel in the gif from earlier, but for a different dataset and different test orbit. The blue lines connect the blue detections that belong to the same asteroids. A few of these lines are in different colors so we can more clearly see the effect of applying the velocity offsets. Notice how if we guess the correct velocity offset, (<span class="math-container">$d\theta_{X}/dt, d\theta_{Y}/dt$</span>), the black line in the left panel becomes a small cluster in the right panel? For each test orbit, we run a grid of 90,000 such velocity guesses.</p>
<p><a href="https://i.sstatic.net/bZQ0hr0U.png" rel="noreferrer"><img src="https://i.sstatic.net/bZQ0hr0U.png" alt="THOR's Hough Transform" /></a></p>
<p>Once the lines have been extracted with the method above, we can then try a different test orbit and see if we can find more objects. In practice, for multi-year data we use 10,000s-100,000s of test orbits!</p>
<p><em>Test Orbit Selection (Phase Space Gridding)</em></p>
<p>How do we pick test orbits (the phase space gridding component)? This is on-going research but for the time being we’ve had a lot of success with simply picking known asteroids from different regions (populations) of the solar system. This will likely change as we keep tuning THOR to be better and better at finding interesting objects but for now it has been doing an adequate job.</p>
<p>Hope this helps!</p>

CC BY-SA 4.0
2024-06-13T00:05:36.150Z
Welcome! Thank you so much for stopping by. Glad to hear about the bucket list but I hope you stick around and perhaps add a few more answers or ask a few questions. It's a nice, friendly community here.
uhoh
CC BY-SA 4.0
2024-06-20T07:46:38.463Z
Nice that an expert was able to answer! Sadly I didn't get my answer submitted in time @uhoh, but I guess this would definitely be better than mine :)
DialFrost
CC BY-SA 4.0
2024-06-11T20:48:33.593Z
2024-06-11T20:48:33.593Z
moeyensj
<p>The New York Times's April 30, 2024 <a href="https://www.nytimes.com/2024/04/30/science/killer-asteroids-algorithm.html" rel="noreferrer">Killer Asteroid Hunters Spot 27,500 Overlooked Space Rocks</a> begins:</p>
<blockquote>
<p>With the help of Google Cloud, scientists churned through hundreds of thousands of images of the night sky to reveal that the solar system is filled with unseen objects.</p>
</blockquote>
<p>and includes the following:</p>
<blockquote>
<p>Historically, astronomers spotted new planets, asteroids, comets and Kuiper belt objects by photographing the same swath of sky multiple times during one night. The pattern of distant stars and galaxies remain unchanged. But objects that are much closer, within the solar system, move noticeably within a few hours.</p>
<p>Multiple observations of a moving object, called a “tracklet,” sketch out its path, providing enough information to give astronomers a good idea of where to look on another night and pin down its orbit.</p>
<p>Other astronomical observations inevitably include asteroids, but only at a single time and place, not the multiple observations needed to assemble a tracklet.</p>
<p><strong>The 412,000 images in the digital archives of the National Optical-Infrared Astronomy Research Laboratory, or NOIRLab, contain some 1.7 billion dots of light that appear in a just a single image.</strong></p>
<p><strong>The algorithm used in the current research, known as <em>Tracklet-less Heliocentric Orbit Recovery, or THOR</em>, is able to connect a dot of light seen in one image with a different dot of light in a different image taken on a different night — sometimes by a different telescope — and figure out that these two dots are actually the same object, usually an asteroid that has shifted positions as it orbits the sun.</strong></p>
<p>THOR’s identification of asteroid candidates across disparate images is a daunting computational task, one that would have been impossible not too long ago. But Google Cloud, a distributed computing system, was able to perform the calculations in about five weeks.</p>
</blockquote>
<p>I've found Moyens et al. (2021) <a href="https://arxiv.org/abs/2105.01056" rel="noreferrer">THOR: An Algorithm for Cadence-Independent Asteroid Discovery</a> who's abstract contains:</p>
<blockquote>
<p>By sparsely covering regions of interest in the phase space with &quot;test orbits&quot;, transforming nearby observations over a few nights into the co-rotating frame of the test orbit at each epoch, and then performing a generalized Hough transform on the transformed detections followed by orbit determination (OD) filtering, candidate clusters of observations belonging to the same objects can be recovered at moderate computational cost and little to no constraints on cadence.</p>
</blockquote>
<p>Here, and in the paper I see 3D <a href="https://en.wikipedia.org/wiki/Hough_transform" rel="noreferrer">Hough transforms</a> and &quot;phase space gridding&quot;, but I still can't wrap my mind around how this actually works.</p>
<p><strong>Question:</strong> What are the basics of Tracklet-less Heliocentric Orbit Recovery (THOR)? What would be a simple breakdown of how it works?</p>

CC BY-SA 4.0
2024-05-08T13:56:57.653Z
Yes!! Another perfect question for me to research (I will be more frequent with my answers in a few weeks :) )
DialFrost
CC BY-SA 4.0
2024-05-08T17:50:20.463Z
Scott Manley has a video now. See "Old Data & New Discoveries: How 'THOR & Computational Astronomy' Discovered 27,500 Asteroids" at https://www.youtube.com/watch?v=GUaIQvQORfI
JohnHoltz
CC BY-SA 4.0
2024-05-09T14:04:03.140Z
@DialFrost Yay! Looking forward to that :-)
uhoh
CC BY-SA 4.0
2024-05-09T14:07:46.753Z
@JohnHoltz Manley often gets things right, and finding asteroid trajectories from surveys was his thing once, cf. [Why did the distribution of asteroids discovered in 2010 have a radial modulation?](https://astronomy.stackexchange.com/q/25736/7982) and [this answer to *Orbits of Trojan Asteroids*](https://astronomy.stackexchange.com/a/43328/7982) for example.
uhoh
<observational-astronomy><orbital-mechanics><asteroids><data-analysis><near-earth-object>
Basics of Tracklet-less Heliocentric Orbit Recovery (THOR) - simple breakdown of how it works?
uhoh
# Basics of Tracklet-less Heliocentric Orbit Recovery (THOR) - simple breakdown of how it works?

(Asked by: username_0 on 2024-05-01)

The New York Times's April 30, 2024 [Killer Asteroid Hunters Spot 27,500 Overlooked Space Rocks](https://www.nytimes.com/2024/04/30/science/killer-asteroids-algorithm.html) begins:

> With the help of Google Cloud, scientists churned through hundreds of thousands of images of the night sky to reveal that the solar system is filled with unseen objects.

and includes the following:

> Historically, astronomers spotted new planets, asteroids, comets and Kuiper belt objects by photographing the same swath of sky multiple times during one night. The pattern of distant stars and galaxies remain unchanged. But objects that are much closer, within the solar system, move noticeably within a few hours.
>
> Multiple observations of a moving object, called a “tracklet,” sketch out its path, providing enough information to give astronomers a good idea of where to look on another night and pin down its orbit.
>
> Other astronomical observations inevitably include asteroids, but only at a single time and place, not the multiple observations needed to assemble a tracklet.
>
> **The 412,000 images in the digital archives of the National Optical-Infrared Astronomy Research Laboratory, or NOIRLab, contain some 1.7 billion dots of light that appear in a just a single image.**
>
> **The algorithm used in the current research, known as *Tracklet-less Heliocentric Orbit Recovery, or THOR*, is able to connect a dot of light seen in one image with a different dot of light in a different image taken on a different night — sometimes by a different telescope — and figure out that these two dots are actually the same object, usually an asteroid that has shifted positions as it orbits the sun.**
>
> THOR’s identification of asteroid candidates across disparate images is a daunting computational task, one that would have been impossible not too long ago. But Google Cloud, a distributed computing system, was able to perform the calculations in about five weeks.

I've found Moyens et al. (2021) [THOR: An Algorithm for Cadence-Independent Asteroid Discovery](https://arxiv.org/abs/2105.01056) who's abstract contains:

> By sparsely covering regions of interest in the phase space with "test orbits", transforming nearby observations over a few nights into the co-rotating frame of the test orbit at each epoch, and then performing a generalized Hough transform on the transformed detections followed by orbit determination (OD) filtering, candidate clusters of observations belonging to the same objects can be recovered at moderate computational cost and little to no constraints on cadence.

Here, and in the paper I see 3D [Hough transforms](https://en.wikipedia.org/wiki/Hough_transform) and "phase space gridding", but I still can't wrap my mind around how this actually works.

**Question:** What are the basics of Tracklet-less Heliocentric Orbit Recovery (THOR)? What would be a simple breakdown of how it works?

**Tags:** observational-astronomy, orbital-mechanics, asteroids, data-analysis, near-earth-object

> **Comments:**
> **username_1**: Yes!! Another perfect question for me to research (I will be more frequent with my answers in a few weeks :) )  
> **username_2**: Scott Manley has a video now. See "Old Data & New Discoveries: How 'THOR & Computational Astronomy' Discovered 27,500 Asteroids" at https://www.youtube.com/watch?v=GUaIQvQORfI  
> **username_0**: @username_1 Yay! Looking forward to that :-)  
> **username_0**: @username_2 Manley often gets things right, and finding asteroid trajectories from surveys was his thing once, cf. [Why did the distribution of asteroids discovered in 2010 have a radial modulation?](https://astronomy.stackexchange.com/q/25736/7982) and [this answer to *Orbits of Trojan Asteroids*](https://astronomy.stackexchange.com/a/43328/7982) for example.  

---

## 1 answers

### Answer by username_3 on 2024-06-11. Score: 7 | Accepted answer

Thanks for your question and your interest in the THOR algorithm. THOR is the product of my PhD dissertation so I figured I’d take a stab at answering your question. It’s super humbling and inspiring to see it mentioned on stack exchange – bucket list item checked off, thank you!

**Background and Motivation:**

To discover asteroids, survey telescopes will take an image of the night sky and then come back about 30 minutes later and take another image. In the time between those images, stars and galaxies will not have moved but asteroids will have shown discernable motion. The detections of asteroids measured from these images are known as "tracklets". The same telescope then comes back a few nights later and takes another series of images to try to re-observe the same asteroid (observe another tracklet). Once you’ve observed the asteroid on a few distinct nights you’ve then made the discovery.

The key detail is that telescopes must observe the same area of the sky multiple times in one night to discover asteroids since they rely on observing tracklets. The gif below shows how tracklets are observed. In this example, 4 observations per night are made (known as “quads”) over the course of 5 nights. The detections that get highlighted in blue are all the asteroids observed with tracklets.

[![Observing Tracklets](https://i.sstatic.net/7AAEKNye.gif)](https://i.sstatic.net/7AAEKNye.gif)

What we wanted to do with THOR was find a way to make it so that telescopes didn’t need to take a series images of the same area of the sky within one night. Instead, we wanted to find a way that allowed telescopes to perform a variety of different observing campaigns that perhaps focus on other science and/or require a different pattern of observations. A cool side-effect of this is that if you could remove the requirement to observe tracklets suddenly it might be possible to find asteroids in a lot more astronomical datasets. Many astronomical datasets were not made with asteroid discovery in mind -- they don't have tracklets!

**How Tracklet-Less Heliocentric Orbit Recovery (THOR) Works:**

*Transformations*
[![THOR's Test Orbit Transformation](https://i.sstatic.net/o9E4wjA4.gif)](https://i.sstatic.net/o9E4wjA4.gif)

In the left panel in the gif above, the grey dots represent simulated observations extracted from images taken by a telescope over a 2-week period. There are asteroids in these data but they can be very difficult to spot. The non-linearity of their motion in part due to our motion around the Sun and the rotation of the Earth, and the fact that there are many, many detections makes this a challenging problem. There are also no traditional tracklets as only one image is taken a day.

In THOR we use test orbits to find asteroids. Using a test orbit, we can propagate that orbit backward and forward through time and calculate exactly where it would appear in our images. One advantage of this is that we also know how far away the test orbit would be from us at any point in time and how fast it's moving. In the gif, the red dots in the left panel represent where a particular test orbit would appear in each of the images from which these data were extracted. As the red dot moves we grab detections near the predicted position of the orbit at that time (these get highlighted in blue as the red dots appear).

For each of the test orbit’s predicted positions, we can make a simple assumption: let’s assume that all the detections near the location of the test orbit at that time are at the same distance from the Sun as our test orbit. When we make this assumption, we have all of the information we need to transform the grey detections into a frame that is centered on the motion of our test orbit. This transformation is similar to having a camera located at the Sun, and from the Sun tracking and following the motion of an asteroid while taking images. These transformed detections are plotted in the right panel. Notice how suddenly you can see lines and curves? These lines and curves are other asteroids that have similar orbits to our test orbit. It’s the same data as in the left panel just visualized in a different way to make it easier to spot asteroids. In the right panel, because our detections have been transformed to be centered on the motion of our test orbit, the red dots from the left panel have collapsed to a single dot in the right panel. In the transformed frame centered on its own motion, the test orbit would appear at the center as a single point.

*Hough Transform*

The 3D Hough transform component is how we programmatically extract the lines and curves from the right panel in the gif above. Fundamentally, the blue detections are 3-dimensional: they have a time dimension and two position dimensions. We collapse the problem to 2-dimensions by assuming some velocity offsets relative to our test orbit’s motion. We shift the detections with each velocity offset to see if the lines collapse into small clusters. These clusters can then be identified by cluster finding algorithms like DBSCAN. Below is an example (from [Moeyens et al. 2021](https://iopscience.iop.org/article/10.3847/1538-3881/ac042b/meta)). The blue detections are the same type of detections as in the right panel in the gif from earlier, but for a different dataset and different test orbit. The blue lines connect the blue detections that belong to the same asteroids. A few of these lines are in different colors so we can more clearly see the effect of applying the velocity offsets. Notice how if we guess the correct velocity offset, ($d\theta\_{X}/dt, d\theta\_{Y}/dt$), the black line in the left panel becomes a small cluster in the right panel? For each test orbit, we run a grid of 90,000 such velocity guesses.

[![THOR's Hough Transform](https://i.sstatic.net/bZQ0hr0U.png)](https://i.sstatic.net/bZQ0hr0U.png)

Once the lines have been extracted with the method above, we can then try a different test orbit and see if we can find more objects. In practice, for multi-year data we use 10,000s-100,000s of test orbits!

*Test Orbit Selection (Phase Space Gridding)*

How do we pick test orbits (the phase space gridding component)? This is on-going research but for the time being we’ve had a lot of success with simply picking known asteroids from different regions (populations) of the solar system. This will likely change as we keep tuning THOR to be better and better at finding interesting objects but for now it has been doing an adequate job.

Hope this helps!

> **Comments:**
> **username_0**: Welcome! Thank you so much for stopping by. Glad to hear about the bucket list but I hope you stick around and perhaps add a few more answers or ask a few questions. It's a nice, friendly community here.  
> **username_1**: Nice that an expert was able to answer! Sadly I didn't get my answer submitted in time @username_0, but I guess this would definitely be better than mine :)  

---

