Build a public web tool that shows SPHEREx all-sky images and makes it easy to see objects such as comets, asteroids and brown dwarfs move between visits.
All-sky spectral images from SPHEREx, searchable through the spherex.obscore TAP table and the IRSA SIA service by position and time. Repeat visits of the same patch of sky are what reveal moving asteroids, comets and nearby brown dwarfs.
Orbit elements, physical data and discovery details for any asteroid or comet as JSON. Use it to label moving objects, or to give a mission-design game real target bodies.
Computes positions of the Sun, Earth, planets and spacecraft as seen from any place and time, including a point on the lunar surface. Returns azimuth and elevation directly, which is exactly what solar power and Earth-communication windows need.
import requests
# Sun azimuth/elevation seen from a lunar south pole site (lon 0, lat -89.5).
# Use COMMAND='399' for Earth instead of the Sun ('10').
params = {
"format": "json",
"COMMAND": "'10'",
"MAKE_EPHEM": "'YES'", "EPHEM_TYPE": "'OBSERVER'", "OBJ_DATA": "'NO'",
"CENTER": "'coord@301'", "COORD_TYPE": "'GEODETIC'",
"SITE_COORD": "'0,-89.5,0'", # east lon, lat, altitude km
"START_TIME": "'2026-12-01'", "STOP_TIME": "'2026-12-03'",
"STEP_SIZE": "'6h'", "QUANTITIES": "'4'", # 4 = azimuth and elevation
}
r = requests.get("https://ssd.jpl.nasa.gov/api/horizons.api", params=params, timeout=60)
result = r.json()["result"]
table = result.split("$$SOE")[1].split("$$EOE")[0]
for line in table.strip().splitlines():
print(line)
Look up an asteroid orbitPython
import requests
# Look up any asteroid or comet by name or designation
r = requests.get("https://ssd-api.jpl.nasa.gov/sbdb.api",
params={"sstr": "Bennu", "phys-par": "1"}, timeout=30)
r.raise_for_status()
d = r.json()
obj = d["object"]
elements = {e["name"]: e["value"] for e in d["orbit"]["elements"]}
print(obj["fullname"], "| class:", obj["orbit_class"]["name"])
print("semi-major axis (au):", elements["a"], "| eccentricity:", elements["e"])
print("near-Earth object:", obj["neo"], "| hazardous:", obj["pha"])
List SPHEREx visits to one sky positionPython
import io
import requests
import pandas as pd
# Find every SPHEREx image (detector D1) that covers one sky position.
# Repeat visits of the same spot are what reveal moving objects.
ra, dec = 150.1, 2.2 # COSMOS field; change to your target
query = f"""
SELECT obs_id, obs_collection, t_min, access_url
FROM spherex.obscore
WHERE CONTAINS(POINT('ICRS', {ra}, {dec}), s_region) = 1
AND energy_bandpassname = 'SPHEREx-D1'
ORDER BY t_min
"""
r = requests.get("https://irsa.ipac.caltech.edu/TAP/sync",
params={"QUERY": query, "FORMAT": "csv"}, timeout=300)
df = pd.read_csv(io.StringIO(r.text))
print(len(df), "visits") # t_min is a Modified Julian Date
print(df[["obs_id", "obs_collection", "t_min"]].head())
Related 2025 winners
Matched by theme. Study how they scoped the problem.
Resonant Exoplanets (United States), Best Use of Data, for "A World Away: Hunting for Exoplanets with AI"