Coverage for python / lsst / pipe / tasks / ssp / schema.py: 100%

6 statements  

« prev     ^ index     » next       coverage.py v7.13.5, created at 2026-04-15 00:08 +0000

1# ***** GENERATED FILE, DO NOT EDIT BY HAND ***** 

2# flake8: noqa 

3# ruff: noqa: W505 

4# generated with /Users/mjuric/miniforge3/envs/ddpp-dev/bin/ssp-generate-dtypes /Users/mjuric/projects/github.com/lsst/sdm_schemas/yml/lsstcam.yaml # noqa: E501 

5 

6import numpy as np 

7 

8# SSObject: LSST-computed per-object quantities. 

9SSObjectDtype = np.dtype([ 

10 ('ssObjectId', '<i8'), # Unique identifier. 

11 ('designation', '<U16'), # The unpacked primary provisional designation for this object. 

12 ('nObs', '<i4'), # Total number of LSST observations of this object. 

13 ('arc', '<f4'), # [d] Timespan ("arc") of all LSST observations, t_{last} - t_{first} 

14 ('firstObservationMjdTai', '<f8'), # [d] The time of the first LSST observation of this object (could be 

15 # precovered), TAI. 

16 ('MOIDEarth', '<f4'), # [AU] Minimum orbit intersection distance to Earth. 

17 ('MOIDEarthDeltaV', '<f4'), # [km/s] DeltaV at the MOID point. 

18 ('MOIDEarthEclipticLongitude', '<f4'), # [deg] Ecliptic longitude of the MOID point (Earth's orbit). 

19 ('MOIDEarthTrueAnomaly', '<f4'), # [deg] True anomaly of the MOID point on Earth's orbit. 

20 ('MOIDEarthTrueAnomalyObject', '<f4'), # [deg] True anomaly of the MOID point on the object's orbit. 

21 ('tisserand_J', '<f4'), # Tisserand parameter with respect to Jupiter (T_J). 

22 ('extendednessMax', '<f4'), # Maximum `extendedness` value from the DiaSource. 

23 ('extendednessMedian', '<f4'), # Median `extendedness` value from the DiaSource. 

24 ('extendednessMin', '<f4'), # Minimum `extendedness` value from the DiaSource. 

25 ('u_nObs', '<i4'), # Total number of data points (u band). 

26 ('u_H', '<f4'), # [mag] Best fit absolute magnitude (u band). 

27 ('u_HErr', '<f4'), # [mag] Error in the estimate of H (u band). 

28 ('u_G12', '<f4'), # Best fit G12 slope parameter (u band). 

29 ('u_G12Err', '<f4'), # Error in the estimate of G12 (u band). 

30 ('u_H_u_G12_Cov', '<f4'), # [mag**2] H–G12 covariance (u band). 

31 ('u_nObsUsed', '<i4'), # The number of data points used to fit the phase curve (u band). 

32 ('u_Chi2', '<f4'), # Chi^2 statistic of the phase curve fit (u band). 

33 ('u_phaseAngleMin', '<f4'), # [deg] Minimum phase angle observed (u band). 

34 ('u_phaseAngleMax', '<f4'), # [deg] Maximum phase angle observed (u band). 

35 ('u_slope_fit_failed', '|b1'), # G12 fit failed in u band. G12 contains a fiducial value used to fit H. 

36 ('g_nObs', '<i4'), # Total number of data points (g band). 

37 ('g_H', '<f4'), # [mag] Best fit absolute magnitude (g band). 

38 ('g_HErr', '<f4'), # [mag] Error in the estimate of H (g band). 

39 ('g_G12', '<f4'), # Best fit G12 slope parameter (g band). 

40 ('g_G12Err', '<f4'), # Error in the estimate of G12 (g band). 

41 ('g_H_g_G12_Cov', '<f4'), # [mag**2] H–G12 covariance (g band). 

42 ('g_nObsUsed', '<i4'), # The number of data points used to fit the phase curve (g band). 

43 ('g_Chi2', '<f4'), # Chi^2 statistic of the phase curve fit (g band). 

44 ('g_phaseAngleMin', '<f4'), # [deg] Minimum phase angle observed (g band). 

45 ('g_phaseAngleMax', '<f4'), # [deg] Maximum phase angle observed (g band). 

46 ('g_slope_fit_failed', '|b1'), # G12 fit failed in g band. G12 contains a fiducial value used to fit H. 

47 ('r_nObs', '<i4'), # Total number of data points (r band). 

48 ('r_H', '<f4'), # [mag] Best fit absolute magnitude (r band). 

49 ('r_HErr', '<f4'), # [mag] Error in the estimate of H (r band). 

50 ('r_G12', '<f4'), # Best fit G12 slope parameter (r band). 

51 ('r_G12Err', '<f4'), # Error in the estimate of G12 (r band). 

52 ('r_H_r_G12_Cov', '<f4'), # [mag**2] H–G12 covariance (r band). 

53 ('r_nObsUsed', '<i4'), # The number of data points used to fit the phase curve (r band). 

54 ('r_Chi2', '<f4'), # Chi^2 statistic of the phase curve fit (r band). 

55 ('r_phaseAngleMin', '<f4'), # [deg] Minimum phase angle observed (r band). 

56 ('r_phaseAngleMax', '<f4'), # [deg] Maximum phase angle observed (r band). 

57 ('r_slope_fit_failed', '|b1'), # G12 fit failed in r band. G12 contains a fiducial value used to fit H. 

58 ('i_nObs', '<i4'), # Total number of data points (i band). 

59 ('i_H', '<f4'), # [mag] Best fit absolute magnitude (i band). 

60 ('i_HErr', '<f4'), # [mag] Error in the estimate of H (i band). 

61 ('i_G12', '<f4'), # Best fit G12 slope parameter (i band). 

62 ('i_G12Err', '<f4'), # Error in the estimate of G12 (i band). 

63 ('i_H_i_G12_Cov', '<f4'), # [mag**2] H–G12 covariance (i band). 

64 ('i_nObsUsed', '<i4'), # The number of data points used to fit the phase curve (i band). 

65 ('i_Chi2', '<f4'), # Chi^2 statistic of the phase curve fit (i band). 

66 ('i_phaseAngleMin', '<f4'), # [deg] Minimum phase angle observed (i band). 

67 ('i_phaseAngleMax', '<f4'), # [deg] Maximum phase angle observed (i band). 

68 ('i_slope_fit_failed', '|b1'), # G12 fit failed in i band. G12 contains a fiducial value used to fit H. 

69 ('z_nObs', '<i4'), # Total number of data points (z band). 

70 ('z_H', '<f4'), # [mag] Best fit absolute magnitude (z band). 

71 ('z_HErr', '<f4'), # [mag] Error in the estimate of H (z band). 

72 ('z_G12', '<f4'), # Best fit G12 slope parameter (z band). 

73 ('z_G12Err', '<f4'), # Error in the estimate of G12 (z band). 

74 ('z_H_z_G12_Cov', '<f4'), # [mag**2] H–G12 covariance (z band). 

75 ('z_nObsUsed', '<i4'), # The number of data points used to fit the phase curve (z band). 

76 ('z_Chi2', '<f4'), # Chi^2 statistic of the phase curve fit (z band). 

77 ('z_phaseAngleMin', '<f4'), # [deg] Minimum phase angle observed (z band). 

78 ('z_phaseAngleMax', '<f4'), # [deg] Maximum phase angle observed (z band). 

79 ('z_slope_fit_failed', '|b1'), # G12 fit failed in z band. G12 contains a fiducial value used to fit H. 

80 ('y_nObs', '<i4'), # Total number of data points (y band). 

81 ('y_H', '<f4'), # [mag] Best fit absolute magnitude (y band). 

82 ('y_HErr', '<f4'), # [mag] Error in the estimate of H (y band). 

83 ('y_G12', '<f4'), # Best fit G12 slope parameter (y band). 

84 ('y_G12Err', '<f4'), # Error in the estimate of G12 (y band). 

85 ('y_H_y_G12_Cov', '<f4'), # [mag**2] H–G12 covariance (y band). 

86 ('y_nObsUsed', '<i4'), # The number of data points used to fit the phase curve (y band). 

87 ('y_Chi2', '<f4'), # Chi^2 statistic of the phase curve fit (y band). 

88 ('y_phaseAngleMin', '<f4'), # [deg] Minimum phase angle observed (y band). 

89 ('y_phaseAngleMax', '<f4'), # [deg] Maximum phase angle observed (y band). 

90 ('y_slope_fit_failed', '|b1'), # G12 fit failed in y band. G12 contains a fiducial value used to fit H. 

91]) 

92 

93# SSSource: LSST-computed per-source quantities. 1::1 relationship with DiaSource. 

94SSSourceDtype = np.dtype([ 

95 ('diaSourceId', '<i8'), # Unique identifier of the observation (matching DiaSource.diaSourceId). 

96 ('ssObjectId', '<i8'), # Unique LSST identifier of the Solar System object. 

97 ('designation', '<U16'), # The unpacked primary provisional designation for this object. 

98 ('eclLambda', '<f8'), # [deg] Ecliptic longitude, converted from the observed coordinates. 

99 ('eclBeta', '<f8'), # [deg] Ecliptic latitude, converted from the observed coordinates. 

100 ('galLon', '<f8'), # [deg] Galactic longitude, converted from the observed coordinates. 

101 ('galLat', '<f8'), # [deg] Galactic latitude, converted from the observed coordinates. 

102 ('elongation', '<f4'), # [deg] Solar elongation of the object at the time of observation. 

103 ('phaseAngle', '<f4'), # [deg] Phase angle between the Sun, object, and observer. 

104 ('topoRange', '<f4'), # [AU] Topocentric distance (delta) at light-emission time. 

105 ('topoRangeRate', '<f4'), # [km/s] Topocentric radial (line-of-sight) velocity (deldot); positive 

106 # values indicate motion away from the observer. 

107 ('helioRange', '<f4'), # [AU] Heliocentric distance (r) at light-emission time. 

108 ('helioRangeRate', '<f4'), # [km/s] Heliocentric radial velocity (rdot); positive values indicate 

109 # motion away from the Sun. 

110 ('ephRa', '<f8'), # [deg] Predicted ICRS right ascension from the orbit in mpc_orbits. 

111 ('ephDec', '<f8'), # [deg] Predicted ICRS declination from the orbit in mpc_orbits. 

112 ('ephVmag', '<f4'), # [mag] Predicted magnitude in V band, computed from mpc_orbits data 

113 # including the mpc_orbits-provided (H, G) estimates 

114 ('ephRate', '<f4'), # [deg/d] Total predicted on-sky angular rate of motion. 

115 ('ephRateRa', '<f4'), # [deg/d] Predicted on-sky angular rate in the R.A. direction (includes 

116 # the cos(dec) factor). 

117 ('ephRateDec', '<f4'), # [deg/d] Predicted on-sky angular rate in the declination direction. 

118 ('ephOffset', '<f4'), # [arcsec] Total observed versus predicted angular separation on the sky. 

119 ('ephOffsetRa', '<f8'), # [arcsec] Offset between observed and predicted position in the R.A. 

120 # direction (includes cos(dec) term). 

121 ('ephOffsetDec', '<f8'), # [arcsec] Offset between observed and predicted position in declination. 

122 ('ephOffsetAlongTrack', '<f4'), # [arcsec] Offset between observed and predicted position in the 

123 # along-track direction on the sky. 

124 ('ephOffsetCrossTrack', '<f4'), # [arcsec] Offset between observed and predicted position in the 

125 # cross-track direction on the sky. 

126 ('helio_x', '<f4'), # [AU] Cartesian heliocentric X coordinate at light-emission time (ICRS). 

127 ('helio_y', '<f4'), # [AU] Cartesian heliocentric Y coordinate at light-emission time (ICRS). 

128 ('helio_z', '<f4'), # [AU] Cartesian heliocentric Z coordinate at light-emission time (ICRS). 

129 ('helio_vx', '<f4'), # [km/s] Cartesian heliocentric X velocity at light-emission time (ICRS). 

130 ('helio_vy', '<f4'), # [km/s] Cartesian heliocentric Y velocity at light-emission time (ICRS). 

131 ('helio_vz', '<f4'), # [km/s] Cartesian heliocentric Z velocity at light-emission time (ICRS). 

132 ('helio_vtot', '<f4'), # [km/s] The magnitude of the heliocentric velocity vector, sqrt(vx*vx + 

133 # vy*vy + vz*vz). 

134 ('topo_x', '<f4'), # [AU] Cartesian topocentric X coordinate at light-emission time (ICRS). 

135 ('topo_y', '<f4'), # [AU] Cartesian topocentric Y coordinate at light-emission time (ICRS). 

136 ('topo_z', '<f4'), # [AU] Cartesian topocentric Z coordinate at light-emission time (ICRS). 

137 ('topo_vx', '<f4'), # [km/s] Cartesian topocentric X velocity at light-emission time (ICRS). 

138 ('topo_vy', '<f4'), # [km/s] Cartesian topocentric Y velocity at light-emission time (ICRS). 

139 ('topo_vz', '<f4'), # [km/s] Cartesian topocentric Z velocity at light-emission time (ICRS). 

140 ('topo_vtot', '<f4'), # [km/s] The magnitude of the topocentric velocity vector, sqrt(vx*vx + 

141 # vy*vy + vz*vz). 

142 ('diaDistanceRank', '<i2'), # The rank of the diaSourceId-identified source in terms of its closeness 

143 # to the predicted SSO position. If diaSourceId is the nearest DiaSour... 

144]) 

145 

146# mpc_orbits: Table of orbital elements and related information of known (sun-orbiting and unbound) Solar 

147# System objects. Replicated from the Minor Planet Center (Postgres) database. This schema will generally 

148# closely follow the schema of the upstream table, to allow end-users to rerun queries developed elsewhere on 

149# the RSP. 

150mpc_orbitsDtype = np.dtype([ 

151 ('id', '<i4'), # Internal ID (generally not seen/used by the user) 

152 ('designation', '<U16'), # The primary provisional designation in unpacked form (e.g. 2008 AB). 

153 ('packed_primary_provisional_designation', '<U16'), # The primary provisional designation in packed form 

154 # (e.g. K08A00B) 

155 ('unpacked_primary_provisional_designation', '<U16'), # The primary provisional designation in unpacked 

156 # form (e.g. 2008 AB) 

157 ('mpc_orb_jsonb', '|O'), # Details of the orbit solution in JSON form 

158 ('created_at', '<M8[ns]'), # When this row was created 

159 ('updated_at', '<M8[ns]'), # When this row was updated 

160 ('orbit_type_int', '<i4'), # Orbit Type (Integer) 

161 ('u_param', '<i4'), # U parameter 

162 ('nopp', '<i4'), # number of oppositions 

163 ('arc_length_total', '<f8'), # [d] Arc length over total observations [days] 

164 ('arc_length_sel', '<f8'), # [d] Arc length over total observations *selected* [days] 

165 ('nobs_total', '<i4'), # Total number of all observations (optical + radar) available 

166 ('nobs_total_sel', '<i4'), # Total number of all observations (optical + radar) selected for use in 

167 # orbit fitting 

168 ('a', '<f8'), # [AU] Semi Major Axis [au] 

169 ('q', '<f8'), # [AU] Pericenter Distance [au] 

170 ('e', '<f8'), # Eccentricity 

171 ('i', '<f8'), # [deg] Inclination [degrees] 

172 ('node', '<f8'), # [deg] Longitude of Ascending Node [degrees] 

173 ('argperi', '<f8'), # [deg] Argument of Pericenter [degrees] 

174 ('peri_time', '<f8'), # [d] Time from Pericenter Passage [days] 

175 ('yarkovsky', '<f8'), # [1e-10.au.d-2] Yarkovsky Component [10^(-10)*au/day^2] 

176 ('srp', '<f8'), # [m2.t-1] Solar-Radiation Pressure Component [m^2/ton] 

177 ('a1', '<f8'), # [m2.t-1] A1 non-grav components [m^2/ton] 

178 ('a2', '<f8'), # [m2.t-1] A2 non-grav components [m^2/ton] 

179 ('a3', '<f8'), # [m2.t-1] A3 non-grav components [m^2/ton] 

180 ('dt', '<f8'), # DT non-grav component 

181 ('mean_anomaly', '<f8'), # [deg] Mean Anomaly [degrees] 

182 ('period', '<f8'), # [d] Orbital Period [days] 

183 ('mean_motion', '<f8'), # [deg.d-1] Orbital Mean Motion [degrees per day] 

184 ('a_unc', '<f8'), # [AU] Uncertainty on Semi Major Axis [au] 

185 ('q_unc', '<f8'), # [AU] Uncertainty on Pericenter Distance [au] 

186 ('e_unc', '<f8'), # Uncertainty on Eccentricity 

187 ('i_unc', '<f8'), # [deg] Uncertainty on Inclination [degrees] 

188 ('node_unc', '<f8'), # [deg] Uncertainty on Longitude of Ascending Node [degrees] 

189 ('argperi_unc', '<f8'), # [deg] Uncertainty on Argument of Pericenter [degrees] 

190 ('peri_time_unc', '<f8'), # [d] Uncertainty on Time from Pericenter Passage [days] 

191 ('yarkovsky_unc', '<f8'), # [1e-10.au.d-2] Uncertainty on Yarkovsky Component [10^(-10)*au/day^2] 

192 ('srp_unc', '<f8'), # [m2.t-1] Uncertainty on Solar-Radiation Pressure Component [m^2/ton] 

193 ('a1_unc', '<f8'), # [m2.t-1] Uncertainty on A1 non-grav components [m^2/ton] 

194 ('a2_unc', '<f8'), # [m2.t-1] Uncertainty on A2 non-grav components [m^2/ton] 

195 ('a3_unc', '<f8'), # [m2.t-1] Uncertainty on A3 non-grav components [m^2/ton] 

196 ('dt_unc', '<f8'), # Uncertainty on DT non-grav component 

197 ('mean_anomaly_unc', '<f8'), # [deg] Uncertainty on Mean Anomaly [degrees] 

198 ('period_unc', '<f8'), # [d] Uncertainty on Orbital Period [days] 

199 ('mean_motion_unc', '<f8'), # [deg.d-1] Uncertainty on Orbital Mean Motion [degrees per day] 

200 ('epoch_mjd', '<f8'), # [d] Epoch of the Orbfit-Solution in MJD 

201 ('h', '<f8'), # [mag] H-Magnitude 

202 ('g', '<f8'), # G-Slope Parameter 

203 ('not_normalized_rms', '<f8'), # [arcsec] unnormalized rms of the fit [arcsec] 

204 ('normalized_rms', '<f8'), # rms of the fit [unitless] 

205 ('earth_moid', '<f8'), # [AU] Minimum Orbit Intersection Distance [au] with respect to the 

206 # Earths Orbit 

207 ('fitting_datetime', '<M8[ns]'), # Date of the last orbit fit 

208]) 

209 

210# current_identifications: All single-designations, and all identifications between designations. Always uses 

211# primary provisional designation (even for numbered objects). Includes all comets and satellites. Replicated 

212# from the Minor Planet Center (Postgres) database. This schema will generally closely follow the schema of 

213# the upstream table, to allow end-users to rerun queries developed elsewhere on the RSP. 

214current_identificationsDtype = np.dtype([ 

215 ('id', '<i4'), # Internal ID (generally not seen/used by the user) 

216 ('packed_primary_provisional_designation', '<U16'), # The primary provisional designation in packed form 

217 # (e.g. K08A00B) 

218 ('packed_secondary_provisional_designation', '<U16'), # The secondary provisional designation in packed 

219 # form (e.g. K08A00B). May be the same-as (A=A)... 

220 ('unpacked_primary_provisional_designation', '<U16'), # The primary provisional designation in unpacked 

221 # form (e.g. 2008 AB) 

222 ('unpacked_secondary_provisional_designation', '<U16'), # The secondary provisional designation in 

223 # unpacked form (e.g. 2008 AB). May be the... 

224 ('published', '|b1'), # Has this been published yet? i.e. has it been released to the public? 

225 ('identifier_ids', '|O'), # This is a set of unique identifier_ids in an array that points to the 

226 # identification_metadata table. 

227 ('object_type', '<i4'), # Integer to indicate the object type. To be linked (foreign key) to 

228 # object_type lookup table 

229 ('numbered', '|b1'), # Has the object been numbered and hence does it appear in the 

230 # numbered_objects table? 

231 ('created_at', '<M8[ns]'), # When this row was created 

232 ('updated_at', '<M8[ns]'), # When this row was updated 

233]) 

234 

235# numbered_identifications: The numbered identification table contains all the numbered objects (minor 

236# planets, comets and natural satellites) with their primary provisional designations. The table is 

237# continously updated everytime a new object is numbered. Replicated from the Minor Planet Center (Postgres) 

238# database. This schema will generally closely follow the schema of the upstream table, to allow end-users to 

239# rerun queries developed elsewhere on the RSP. 

240numbered_identificationsDtype = np.dtype([ 

241 ('id', '<i4'), # Internal ID (generally not seen/used by the user) 

242 ('packed_primary_provisional_designation', '<U16'), # The primary provisional designation in packed form 

243 # (e.g. K08A00B) 

244 ('unpacked_primary_provisional_designation', '<U16'), # The primary provisional designation in unpacked 

245 # form (e.g. 2008 AB) 

246 ('permid', '<U16'), # Permanent designation (number) 

247 ('iau_designation', '|O'), # IAU-approved designation (not filled at the moment) 

248 ('iau_name', '<U32'), # IAU-approved name (not filled at the moment) 

249 ('numbered_publication_references', '|O'), # MPEC where this object was numbered 

250 ('named_publication_references', '|O'), # MPEC where this object was named 

251 ('naming_credit', '|O'), # Credit for suggesting the name 

252 ('created_at', '<M8[ns]'), # When this row was created 

253 ('updated_at', '<M8[ns]'), # When this row was updated 

254])