202.7. MPC orbits table#
202.7. MPC Orbits table¶
For the Rubin Science Platform at data.lsst.cloud.
Data Release: Prompt Products
Container Size: Large
LSST Science Pipelines version: r30.0.11
Last verified to run: 2026-11-30
Repository: github.com/lsst/tutorial-notebooks
DOI: 10.11578/rubin/dc.20250909.20
Learning objective: To understand the contents of the mpc_orbits table and how to access it.
LSST data products: mpc_orbits
Packages: lsst.rsp
Credit: Originally developed by the Rubin Community Science team. Please consider acknowledging them if this notebook is used for the preparation of journal articles, software releases, or other notebooks.
Get Support: Everyone is encouraged to ask questions or raise issues in the Support Category of the Rubin Community Forum. Rubin staff will respond to all questions posted there.
1. Introduction¶
The mpc_orbits table contains orbit information from the Minor Planet Center (MPC) for all known Solar System objects (SSOs) as of a given date, including but not limited to detections and discoveries made by Rubin.
This table is ingested from the MPC, where Rubin acts as a downstream distributor with many fields in the mpc_orbits table originating upstream at the MPC; inconsistencies or missing information in the MPC's mpc_orbits table may therefore be present in the PPDB table.
Known issues: Some fields in the
mpc_orbitstable are known to contain inconsistent information. For further information on thempc_orbitstable, including known issues, see the MPC documentation.
Related tutorials: The TAP data access services are demonstrated in the 100-level "How to" tutorials.
1.1. Import packages¶
Import standard python package matplotlib.
From the lsst package, import the module for the TAP service.
import matplotlib.pyplot as plt
from lsst.rsp import RSPDiscovery
1.2. Define parameters and functions¶
Create an instance of the TAP service.
discovery = RSPDiscovery("prompt")
service = discovery.get_tap_client()
2. Schema (columns)¶
To browse the table schema visit the Rubin schema browser, or use the TAP service via the Portal Aspect or as demonstrated in Section 2.1.
2.1. Retrieve table schema¶
The original mpc_orbits schema is documented at this MPC page.
To retrieve the PPDB version of the table schema, define a query for the schema columns of the mpc_orbits table and run the query job.
query = """SELECT column_name, datatype, description, unit
FROM tap_schema.columns
WHERE table_name = 'ppdb.mpc_orbits'"""
job = service.submit_job(query)
job.run()
job.wait(phases=['COMPLETED', 'ERROR'])
print('Job phase is', job.phase)
if job.phase == 'ERROR':
job.raise_if_error()
Job phase is COMPLETED
Retrieve the query results and display them as an astropy table with the to_table() attribute.
assert job.phase == 'COMPLETED'
results = job.fetch_result().to_table()
results
| column_name | datatype | description | unit |
|---|---|---|---|
| str64 | str64 | str512 | str64 |
| id | int | Internal ID (generally not seen/used by the user) | |
| designation | char | The primary provisional designation in unpacked form (e.g. 2008 AB). | |
| packed_primary_provisional_designation | char | The primary provisional designation in packed form (e.g. K08A00B) | |
| unpacked_primary_provisional_designation | char | The primary provisional designation in unpacked form (e.g. 2008 AB) | |
| mpc_orb_jsonb | char | Details of the orbit solution in JSON form | |
| created_at | char | When this row was created | |
| updated_at | char | When this row was updated | |
| orbit_type_int | int | Orbit Type (Integer) | |
| u_param | int | U parameter | |
| ... | ... | ... | ... |
| mean_anomaly_unc | double | Uncertainty on Mean Anomaly [degrees] | deg |
| period_unc | double | Uncertainty on Orbital Period [days] | d |
| mean_motion_unc | double | Uncertainty on Orbital Mean Motion [degrees per day] | deg/d |
| epoch_mjd | double | Epoch of the Orbfit-Solution in MJD (TT, not TAI) | d |
| h | double | H-Magnitude | mag |
| g | double | G-Slope Parameter | |
| not_normalized_rms | double | unnormalized rms of the fit [arcsec] | arcsec |
| normalized_rms | double | rms of the fit [unitless] | |
| earth_moid | double | Minimum Orbit Intersection Distance [au] with respect to the Earths Orbit | AU |
| fitting_datetime | char | Date of the last orbit fit |
The table displayed above has been truncated.
Option to print every column name as a list.
# for col in results['column_name']:
# print(col)
Delete the job, but not the results.
del query
job.delete()
2.2. Key Columns¶
Of the 53 columns in the mpc_orbits table, several are the most commonly used.
2.2.1. Designation¶
The primary provisional designation in unpacked form:
designation
The designation field can be used to join the mpc_orbits table with other PPDB Solar System tables.
2.2.2. Primary provisional designation¶
The primary provisional designation (unpacked format):
unpacked_primary_provisional_designation
The primary provisional designation (packed format):
packed_primary_provisional_designation
2.2.3. Orbital elements¶
The osculating orbital elements (distances measured in units of au, angles measured in units of deg):
a,q,e,i,argperi,node,mean_anomaly,peri_time
Warning: There are known issues with the
mpc_orbitstable, see the MPC documentation, such as missing entries for semimajor axis. These can be recalculated from perihelion distance and eccentricity as shown in the example later.
The osculating orbital element uncertainties:
a_unc,q_unc,e_unc,i_unc,argperi_unc,node_unc,mean_anomaly_unc,peri_time_unc
2.2.4. Period and mean motion¶
Orbital period and uncertainty (days):
period,period_unc
Mean motion and uncertainty (deg/day):
mean_motion,mean_motion_unc
2.2.6. Orbit type¶
Orbit type (integer):
orbit_type_int
For the orbit type definitions, see the Minor Planet Center website. Tutorial 308.1 Orbits in the Solar System science series also discusses the orbit type definitions.
2.2.7. Number of observations¶
Total number of all observations (optical + radar) available:
nobs_total
Total number of all observations (optical + radar) selected for use in orbit fitting:
nobs_total_sel
2.2.9. Non-gravitational acceleration components¶
A1 component of the non-gravitational acceleration for comets and uncertainty (10^(-10) au/d^2):
a1,a1_unc
A2 component of the non-gravitational acceleration for comets and uncertainty (10^(-10) au/d^2):
a2,a2_unc
A3 component of the non-gravitational acceleration for comets and uncertainty (10^(-10) au/d^2):
a3,a3_unc
2.2.11. Yarkovsky acceleration¶
Yarkovsky acceleration component and uncertainty:
yarkovsky,yarkovsky_unc
3. Data access¶
The mpc_orbits table is only available via the TAP service. It is not available with the butler.
3.1. TAP (Table Access Protocol)¶
The mpc_orbits table is accessible via the TAP services using ADQL queries.
3.1.1. Current catalog size¶
The mpc_orbits table is a copy of the MPC database and is updated daily as part of solar system processing (SSP). As of the date of PPDB release (30th November 2026) mpc_orbits contains over 1,590,000 rows. Uncomment the following cell to run a query that retrieves the size of the mpc_orbits table (at the time of query).
query = """SELECT COUNT(*)
FROM ppdb.mpc_orbits"""
job = service.submit_job(query)
job.run()
job.wait(phases=['COMPLETED', 'ERROR'])
print('Job phase is', job.phase)
if job.phase == 'ERROR':
job.raise_if_error()
Job phase is COMPLETED
Fetch the results as an astropy table.
assert job.phase == 'COMPLETED'
results = job.fetch_result().to_table()
print(results)
COUNT1 ------- 1594887
3.1.2. Demo query¶
Define a query to return three of the key columns from Section 2.2 for the top 100 entries in the mpc_orbits table.
To query the full mpc_orbits table, remove "TOP 100" from the below query.
query = """SELECT TOP 100 designation, q, e, i
FROM ppdb.mpc_orbits
ORDER BY designation ASC"""
job = service.submit_job(query)
job.run()
job.wait(phases=['COMPLETED', 'ERROR'])
print('Job phase is', job.phase)
if job.phase == 'ERROR':
job.raise_if_error()
Job phase is COMPLETED
Fetch the results as an astropy table and convert to a pandas dataframe.
assert job.phase == 'COMPLETED'
results = job.fetch_result()
result_df = results.to_table().to_pandas()
Option to display the results.
# result_df
The semimajor axis is included in the mpc_orbits table, but many entries are missing, as described in Section 1. For further information on the known issues with the mpc_orbits table, see the MPC documentation. The semimajor axis ($a$) can be computed from the perihelion distance ($q$) and eccentricity ($e$) using the relationship $a$ = $q$ / (1.0-$e$).
Add a column to results with the calculated semimajor axis.
result_df['a_calc'] = result_df['q'] / (1.0-result_df['e'])
Plot semimajor axis versus eccentricity and semimajor axis versus inclination for the TOP 100 Solar System objects in the PPDB mpc_orbits table.
fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(9, 4))
ax1.scatter(result_df['a_calc'], result_df['e'],
marker='o', alpha=0.6,)
ax1.set_xlabel('Semimajor axis (au)')
ax1.set_ylabel('Eccentricity')
ax2.scatter(result_df['a_calc'], result_df['i'],
marker='o', alpha=0.6,)
ax2.set_xlabel('Semimajor axis (au)')
ax2.set_ylabel('Inclination (deg)')
plt.tight_layout()
plt.show()
Figure 1: Semimajor axis versus eccentricity (left) and semimajor axis versus inclination (right) for the TOP 100 Solar System objects in the PPDB
mpc_orbitstable.
job.delete()
del query
3.1.3. Joinable tables¶
The mpc_orbits table can be joined to the other Rubin Solar System tables on the column designation.
A commonly joined table would be SSObject which contains information on the observations of Solar System objects detected in Rubin-images and associated to known objects or new discoveries by the MPC.
The mpc_orbits table has many more rows than the SSObject table with each designation field in the SSObject table having a 1:1 corresponding entry in the mpc_orbits tables.
The following query joins the mpc_orbits and SSObject tables.
Columns returned include the designation, orbital elements, and
the number of observations for the TOP 100 objects in the tables.
query = """SELECT TOP 100 mpc.designation,
mpc.q, mpc.e, mpc.i, sso.arc
FROM ppdb.mpc_orbits AS mpc
JOIN ppdb.SSObject AS sso ON mpc.designation = sso.designation
WHERE mpc.q/(1.0-mpc.e) < 5.0"""
job = service.submit_job(query)
job.run()
job.wait(phases=['COMPLETED', 'ERROR'])
print('Job phase is', job.phase)
if job.phase == 'ERROR':
job.raise_if_error()
Job phase is COMPLETED
Fetch the results as an astropy table and convert to a pandas dataframe.
assert job.phase == 'COMPLETED'
results = job.fetch_result()
result_df = results.to_table().to_pandas()
The semimajor axis is included in the mpc_orbits table, but many entries are missing, as described in Section 1. For further information on the known issues with the mpc_orbits table, see the MPC documentation. The semimajor axis ($a$) can be computed from the perihelion distance ($q$) and eccentricity ($e$) using the relationship $a$ = $q$ / (1.0-$e$).
Add a column to results with the calculated semimajor axis.
result_df['a_calc'] = result_df['q'] / (1.0-result_df['e'])
Option to display the results.
# result_df
Plot semimajor axis versus number of observations for the TOP 100 Rubin-detected PPDB Solar System objects.
fig, ax = plt.subplots(figsize=(6, 4))
ax.scatter(result_df['a_calc'], result_df['arc'],
marker='o', alpha=0.6,)
ax.set_xlabel('Semimajor axis (au)')
ax.set_ylabel('arc')
plt.tight_layout()
plt.show()
Figure 2: Semimajor axis versus number of observations for the TOP 100 Rubin-detected PPDB Solar System objects.
Clean up.
job.delete()
del query, results, result_df