202.5. SS Observation table#
202.5. SSObservation 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 SSObservation table and how to access it.
LSST data products: SSObservation
Packages: lsst.rsp, lsst.utils.plotting
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 SSObservation table contains single-epoch solar system source information corresponding to a specific Rubin observation of a solar system object.
Warning: There have been some significant changes in the PPDB schema compared to the corresponding solar system tables in Data Preview 2. The
SSObservationis approximately equivalent to the join betweendp2.DiaSourceanddp2.SSSource.
The SSObservation table contains detections from both difference and direct science images (DiaSource or Source respectively).
SSObservation contains only Rubin detections that have been submitted to the Minor Planet Center (MPC) and have been associated by the MPC to a known moving object or a new discovery (or determined to be an undesignated moving object in the MPC Isolated Tracklet File).
Warning: While all Rubin detections for
SSObservationhave adiaSourceId, not all of these identifiers are for theppdb.DiaSourcetable: use theprocessingTablecolumn to know where thediaSourceIdcomes from.
Warning: The NearbySSO table contains
DiaSourcesthat have been associated to known moving objects by Solar System prompt processing, but have not yet been accepted by MPC, and so are not yet in theSSObservationtable.
As such SSObservation contains the accumulated record of Rubin observations that have been accepted by the MPC, with one row per accepted observation. Each row contains columns drawn from:
- The MPC record (from the
obs_sbntable which is held by MPC and described here). - The Rubin measurement from difference imaging (
DiaSource) or a direct image (Source) that was accepted by MPC. - The object's predicted position and viewing geometry as calculated from the orbital elements in
mpc_orbitsas part of solar system processing (SSP).
Related tutorials: The TAP and butler data access services are demonstrated in the 100-level "How to" tutorials.
1.1. Import packages¶
Import standard python packages numpy and matplotlib.
From the lsst package, import modules for the TAP service and plotting.
import numpy as np
import matplotlib.pyplot as plt
import astropy
from lsst.rsp import RSPDiscovery
from lsst.utils.plotting import (get_multiband_plot_colors,
get_multiband_plot_symbols,
set_rubin_plotstyle)
1.2. Define parameters and functions¶
Create an instance of the TAP service.
discovery = RSPDiscovery("prompt")
service = discovery.get_tap_client()
Define the colors and symbols to represent the LSST filters in plots.
set_rubin_plotstyle()
filter_colors = get_multiband_plot_colors()
filter_names = filter_colors.keys()
filter_symbols = get_multiband_plot_symbols()
Display the astropy version (see Section 2.2.1).
astropy.__version__
'7.2.0'
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¶
To retrieve the table schema, define a query for the schema columns of the SSSource table and run the query job.
query = """SELECT column_name, datatype, description, unit
FROM tap_schema.columns
WHERE table_name = 'ppdb.SSObservation'"""
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 |
| obsid | char | MPC's unique identifier of the observation (obs_sbn.obsid): the obs_sbn row this SSObservation row is. The primary key. | |
| obssubid | char | Observer-assigned identifier of the observation, as submitted (obs_sbn.obssubid), e.g. LSST-<processing>-<id>, with a -A or -B suffix on the two rows of a trailed source. NULL where the MPC record has none. | |
| trksub | char | Observer-assigned tracklet identifier, as submitted (obs_sbn.trksub). | |
| trkid | char | MPC-assigned tracklet identifier (obs_sbn.trkid). | |
| submission_id | char | Identifier of the MPC submission this observation arrived in (obs_sbn.submission_id). | |
| status | char | MPC status of the observation (obs_sbn.status). 'I' marks observations in the Isolated Tracklet File: accepted as valid, but not identified with a known object. | |
| primary | boolean | True on exactly one row per measurement (processing, diaSourceId/sourceId): the '-A' row of a trail pair, else the row from the earliest submission. A measurement submitted more than once has several rows; count only primary rows when counting detections. | |
| ssObjectId | long | Unique LSST identifier of the Solar System object (SSObject.ssObjectId). NULL when this observation is not identified with an object that has an SSObject row: Isolated Tracklet File observations (status 'I'), and designated objects missing from mpc_orbits. | |
| designation | char | The unpacked primary provisional designation of the object the MPC identified this observation with; NULL if none. | |
| ... | ... | ... | ... |
| helio_vy | float | Cartesian heliocentric Y velocity at light-emission time (ICRS). | km/s |
| helio_vz | float | Cartesian heliocentric Z velocity at light-emission time (ICRS). | km/s |
| helio_vtot | float | The magnitude of the heliocentric velocity vector, sqrt(vx*vx + vy*vy + vz*vz). | km/s |
| topo_x | double | Cartesian topocentric X coordinate at light-emission time (ICRS). | AU |
| topo_y | double | Cartesian topocentric Y coordinate at light-emission time (ICRS). | AU |
| topo_z | double | Cartesian topocentric Z coordinate at light-emission time (ICRS). | AU |
| topo_vx | float | Cartesian topocentric X velocity at light-emission time (ICRS). | km/s |
| topo_vy | float | Cartesian topocentric Y velocity at light-emission time (ICRS). | km/s |
| topo_vz | float | Cartesian topocentric Z velocity at light-emission time (ICRS). | km/s |
| topo_vtot | float | The magnitude of the topocentric velocity vector, sqrt(vx*vx + vy*vy + vz*vz). | km/s |
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 39 columns of the SSSource table, several are the most commonly used.
2.2.1. Solar System Object Id¶
The long integer that uniquely identifies each Solar System object:
ssObjectId
In some cases the ssObjectId can be NULL, e.g. the MPC has confirmed that submitted track is a moving object but there are insufficient observations to fit a secure orbit and it has been moved to the Isolated Tracklet File.
Warning: Caution is advised when handling query results from columns that contain both integer and NULL values, such as
SSObservation.ssObjectId,SSObservation.diaSourceId,SSObservation.sourceId. The conversion of such results from an astropy Table to a pandas DataFrame using theto_pandas()method (astropy = 7.2.0) can alter long integer numbers such asssObjectIddue to rounding errors in integer to float conversion. Ifto_pandas()is required for such columns exclude NULL values in the query (WHERE ssObjectId IS NOT NULL) or consider usingto_pandas(use_nullable_int=False)to produce an error.
2.2.2. Unpacked primary provisional designation¶
The unpacked primary provisional designation for this object:
designation
2.2.3. MPC submission details¶
There are a number of columns returned from the MPC obs_sbn record with information from the MPC submission and processing. This includes identifiers for the observation and its tracklet (as assigned by MPC and Rubin), and the MPC status (notably status = I for observations in the Isolated Tracklet File):
obsid,obssubidtrkid,trksubstatus
Warning: The
primarycolumn is a Rubin generated flag relating to a trailed detection submitted as a pair of measurements (seeobssubidsuffixes-Aand-Bin the schema). AsPRIMARYis an ADQL reserved keyword references toprimaryin a query should be formatted as"primary".
2.2.4. Provenance of the observation¶
Columns are provided that describe whether the observation was measured on a difference or direct image, how it was processed, and which visit and detector it came from:
measuredOnprocessing,processingTablevisit,detector
2.2.5. Observation photometry and astrometry¶
Many of the columns describing photometric measurement of the observation are carried over from the corresponding DiaSource or Source tables depending on whether the measurement was made on a difference or direct image. Difference images observations will have diaSourceId IS NOT NULL AND sourceId IS NULL, likewise direct images observations will have sourceId IS NOT NULL AND diaSourceId IS NULL. Further details of the measurements associated with DiaSource and Source can be found in the 200-level tutorials; some of the columns from these tables included in SSObservation are:
diaSourceId,sourceIdbandra,decpsfFlux,apFlux
Warning: The warning above about
to_pandas()rounding errors when queryingSSObservation.ssObjectIdalso applies toSSObservation.diaSourceId,SSObservation.sourceId.
2.2.6. Exposure midpoint time¶
The exposure midpoint time at the position of the detection:
midpointMjdTai
Warning: In
SSObservationthemidpointMjdTaihas been corrected to account for the time taken for LSSTCam shutter blades to cross the focal plane, indicated bymidpointMjdTai_flag. This means thatSSObservation.midpointMjdTaidiffers slightly toDiaSource.midpointMjdTai.
2.2.7. Heliocentric distance and velocity¶
The cartesian heliocentric position and velocity coordinates:
helio_x,helio_y,helio_z,helio_vx,helio_vy,helio_vz
The heliocentric distance at light-emission time and heliocentric radial velocity (positive values indicate motion away from the Sun):
helioRangehelioRate
The magnitude of the heliocentric velocity vector:
helio_vtot
2.2.8. Topocentric distance and velocity¶
The topocentric position and velocity coordinates:
topo_x,topo_y,topo_z,topo_vx,topo_vy,topo_vz
The topocentric distance at light-emission time and topocentric radial velocity (positive values indicate motion away from the Sun):
topoRangetopoRate
The magnitude of the topocentric velocity vector:
topo_vtot
2.2.9. Phase angle and solar elongation¶
The phase angle is the angle between the light incident onto an observed object and the light reflected from the object:
phaseAngle
The solar elongation at the time of observation:
elongation
2.2.10. Ecliptic coordinates¶
The ecliptic latitude and longitude, converted from the observed coordinates:
eclLambdaeclBeta
2.2.11. Predicted magnitude, ra, dec, and on-sky angular rates¶
The predicted V-band magnitude, computed from mpc_orbits data including the mpc_orbits-provided (H, G) estimates:
ephVmag
The predicted ICRS right ascension (ra) and declincation (dec) from the orbit in mpc_orbits:
ephRaephDec
The total predicted on-sky angular rate of motion and the predicted on-sky angular rates in the ra (includes the cos(dec) factor) and dec direction:
ephRateephRateRaephRateDec
2.2.12. Offsets from predicted magnitude, ra, dec, and on-sky angular rates¶
The total observed versus predicted angular separation on the sky and the offsets between the observed and predicted positions in the ra (includes cos(dec) term)and dec directions:
ephOffsetephOffsetRaephOffsetDec
The offsets between observed and predicted positions in the along-track and cross-track directions on the sky:
ephOffsetAlongTrackephOffsetCrossTrack
2.3. Descriptions and units¶
For a subset of the key columns in Section 2.2, show the table of their descriptions and units.
col_list = set(['ssObjectId', 'helioRange', 'topoRange', 'ephOffset'])
tx = [i for i, item in enumerate(results['column_name']) if item in col_list]
results[tx]
| column_name | datatype | description | unit |
|---|---|---|---|
| str64 | str64 | str512 | str64 |
| ssObjectId | long | Unique LSST identifier of the Solar System object (SSObject.ssObjectId). NULL when this observation is not identified with an object that has an SSObject row: Isolated Tracklet File observations (status 'I'), and designated objects missing from mpc_orbits. | |
| topoRange | double | Topocentric distance (delta) at light-emission time. | AU |
| helioRange | double | Heliocentric distance (r) at light-emission time. | AU |
| ephOffset | float | Total observed versus predicted angular separation on the sky. | arcsec |
Clean up.
del col_list, tx, results
3. Data access¶
The Prompt Products SSObservation table is available via the TAP service.
3.1. TAP (Table Access Protocol)¶
The SSObservation table is accessible via the TAP services using ADQL queries.
3.1.1. Current catalog size¶
The SSObservation table is updated daily as part of solar system prompt processing and the number of rows will increase as submitted detections are accepted and returned by the MPC. As of the date of PPDB release (30th November 2026) SSObservation contains over 8,220,000 rows.
Uncomment the following cell to run a query that retrieves the size of the SSObservation table (at the time of query).
results = service.search("SELECT COUNT(*) FROM ppdb.SSObservation")
results.to_table()
| COUNT1 |
|---|
| int64 |
| 8224815 |
3.1.2. Retrieve a subset¶
As described in the 100-level TAP tutorials it is best practice to limit queries to only required columns and to constrain the rows returned where possible. For this example we retrieve a subset of the SSObservation based on a single lunation between 9th August and 7th September 2025. An additional spatial constraint is applied and only detections near the Cosmos Deep Drilling Field (DDF) centred on ra = 150.1, dec = 2.1 degress are retrieved.
query = """SELECT ssObjectId, designation, diaSourceId, sourceId,
measuredOn, processing, processingTable, ra, dec, midpointMjdTai
FROM ppdb.SSObservation
WHERE CONTAINS(POINT('ICRS', ra, dec), CIRCLE('ICRS', 150.1, 2.1, 0.5)) = 1
AND (midpointMjdTai BETWEEN 61072 AND 61103)
AND ssObjectId IS NOT NULL
ORDER BY ssObjectId 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.
assert job.phase == 'COMPLETED'
results = job.fetch_result().to_table()
print(len(results))
25794
Option to print the results.
# results
Create a scatter plot to show the sky coordinates of each observation associated with each object.
fig, ax = plt.subplots(figsize=(8, 6))
s = ax.scatter(results['ra'], results['dec'], c=results["ssObjectId"],
s=10, alpha=0.4, edgecolors='none', cmap="tab20")
cbar = plt.colorbar(s)
ax.set_xlabel('ra')
ax.set_ylabel('dec')
cbar.set_label('ssObjectId')
ax.set_aspect("equal")
plt.tight_layout()
plt.show()
Figure 1: The RA, Dec positions of subset of SSObservations in the Cosmos DDF. The color bar indicates unique
ssObjectId(note that colors are repeated). Each object appears as a track of detections.
Note: DDF observations occur at higher cadence than typical wide-fast-deep (WFD) survey observations. The tracks of moving detections highlighted in Figure 1 would often not be as dense in time for WFD.
3.1.3. Demo query - example light curve¶
Retrieve the photometry for an example ssObjectId and plot its lightcurve. Use only difference image detections.
query = """SELECT ssObjectId, designation, diaSourceId, sourceId, band,
measuredOn, processing, processingTable, ra, dec, midpointMjdTai, psfMag
FROM ppdb.SSObservation
WHERE ssObjectId = 4841987830809971488
AND diaSourceId IS NOT NULL"""
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(len(results))
581
Option to print the results.
# results
Plot the psfFlux of the objects in the observed bands as a function of time:
fig, ax = plt.subplots(1, 1, figsize=(10, 4))
for filt in filter_names:
fx = np.where(results['band'] == filt)[0]
if len(fx) > 0:
ax.plot(results['midpointMjdTai'][fx], results['psfMag'][fx],
filter_symbols[filt], ms=5, mew=0, alpha=0.7,
color=filter_colors[filt], label=filt)
ax.set_xlabel('midpointMjdTai')
ax.set_ylabel('psfFlux')
ax.legend()
plt.suptitle(f"ssObjectId = {results['ssObjectId'][0]}", y=1.01)
plt.show()
Figure 2: Lightcurve of PPDB
ssObjectId=4841987830809971488(measured aspsfFlux) as a function of time in modified Julian date. Observations in different filters are indicated with marker shape and color.
Clean up.
job.delete()
del query, results
3.1.4. Joinable tables¶
The SSObservation table can be joined to other solar system object tables in PPDB using the ssObjectId and designation identifiers.
The query below retrieves orbital parameters from the mpc_orbits table for the moving objects shown in Figure 1.
query = """SELECT DISTINCT ssobs.designation, mpc.q, mpc.e, mpc.i
FROM ppdb.SSObservation as ssobs
JOIN ppdb.mpc_orbits as mpc ON mpc.designation = ssobs.designation
WHERE CONTAINS(POINT('ICRS', ra, dec), CIRCLE('ICRS', 150.1, 2.1, 0.5)) = 1
AND (midpointMjdTai BETWEEN 61072 AND 61103)
AND ssObjectId IS NOT NULL"""
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(len(results))
190
Option to print the results.
# results
Make an orbital element plot for the selected solar system objects.
fig, ax = plt.subplots(figsize=(6, 4))
s = ax.scatter(results['q'], results['e'], alpha=0.5)
plt.xlabel('Perihelion (au)')
plt.ylabel('Eccentricity')
plt.xlim(1.2, 3.5)
plt.ylim(0.0, 0.4)
plt.tight_layout()
plt.show()
Figure 3: Orbital element plot of eccentricity versus perihelion for the solar system objects observed near the Cosmos DDF in a single lunation between 9th August and 7th September 2025. The plot limits have been set to highlight inner solar system objects.
Clean up.
job.delete()
del query, results
3.2. Butler¶
The PPDB SSObservation table is not currently available via the Butler.