Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1from .BaseCatalogModels import BaseCatalogObj 

2from lsst.sims.utils import ObservationMetaData 

3from lsst.sims.catalogs.db import CompoundCatalogDBObject 

4 

5__all__ = ["StarBase", "StarObj", "MsStarObj", "WdStarObj", "RRLyStarObj", 

6 "BhbStarObj", "EbStarObj", "CepheidStarObj", "EasterEggStarObj", 

7 "DwarfGalStarObj", "BrightStarObj"] 

8 

9class StarBase(BaseCatalogObj): 

10 objid = 'starbase' 

11 tableid = None 

12 idColKey = 'id' 

13 raColName = 'ra' 

14 decColName = 'decl' 

15 objectTypeId = -1 

16 #Don't run test on base class 

17 doRunTest = False 

18 #default observation metadata 

19 testObservationMetaData = ObservationMetaData(boundType='circle', pointingRA=210.0, pointingDec=-30.0, 

20 boundLength=0.3, mjd=52000., bandpassName='r',m5=22.0) 

21 dbDefaultValues = {'varsimobjid':-1, 'runid':-1, 'ismultiple':-1, 'run':-1, 

22 'runobjid':-1} 

23 #These types should be matched to the database. 

24 #: Default map is float. If the column mapping is the same as the column name, None can be specified 

25 columns = [('id','simobjid', int), 

26 ('raJ2000', 'ra*PI()/180.'), 

27 ('decJ2000', 'decl*PI()/180.'), 

28 ('glon', 'gal_l*PI()/180.'), 

29 ('glat', 'gal_b*PI()/180.'), 

30 ('magNorm', '(-2.5*log(flux_scale)/log(10.)) - 18.402732642'), 

31 ('properMotionRa', '(mura/(1000.*3600.))*PI()/180.'), 

32 ('properMotionDec', '(mudecl/(1000.*3600.))*PI()/180.'), 

33 ('parallax', 'parallax*PI()/648000000.'), 

34 ('galacticAv', 'CONVERT(float, ebv*3.1)'), 

35 ('radialVelocity', 'vrad'), 

36 ('variabilityParameters', 'varParamStr', str, 256), 

37 ('sedFilename', 'sedfilename', str, 40)] 

38 

39 

40class StarObj(StarBase): 

41 objid = 'allstars' 

42 tableid = 'StarAllForceseek' 

43 objectTypeId = 4 

44 doRunTest = True 

45 testObservationMetaData = ObservationMetaData(boundType = 'circle', pointingRA=210.0, pointingDec=-30.0, 

46 boundLength=0.1, mjd=52000., bandpassName='r', m5=22.0) 

47 #These types should be matched to the database. 

48 #: Default map is float. If the column mapping is the same as the column name, None can be specified 

49 columns = [('id','simobjid', int), 

50 ('raJ2000', 'ra*PI()/180.'), 

51 ('decJ2000', 'decl*PI()/180.'), 

52 ('glon', 'gal_l*PI()/180.'), 

53 ('glat', 'gal_b*PI()/180.'), 

54 ('magNorm', '(-2.5*log(flux_scale)/log(10.)) - 18.402732642'), 

55 ('properMotionRa', '(mura/(1000.*3600.))*PI()/180.'), 

56 ('properMotionDec', '(mudecl/(1000.*3600.))*PI()/180.'), 

57 ('parallax', 'parallax*PI()/648000000.'), 

58 ('galacticAv', 'CONVERT(float, ebv*3.1)'), 

59 ('radialVelocity', 'vrad'), 

60 ('variabilityParameters', 'varParamStr', str, 256), 

61 ('sedFilename', 'sedfilename', str, 40)] 

62 

63class MsStarObj(StarBase): 

64 objid = 'msstars' 

65 tableid = 'StarMSRGBForceseek' 

66 objectTypeId = 5 

67 doRunTest = True 

68 testObservationMetaData = ObservationMetaData(boundType = 'circle', pointingRA=210.0, pointingDec=-30.0, 

69 boundLength=0.1, mjd=52000., bandpassName='r',m5=22.0) 

70 #These types should be matched to the database. 

71 #: Default map is float. If the column mapping is the same as the column name, None can be specified 

72 columns = [('id','simobjid', int), 

73 ('raJ2000', 'ra*PI()/180.'), 

74 ('decJ2000', 'decl*PI()/180.'), 

75 ('glon', 'gal_l*PI()/180.'), 

76 ('glat', 'gal_b*PI()/180.'), 

77 ('magNorm', '(-2.5*log(flux_scale)/log(10.)) - 18.402732642'), 

78 ('properMotionRa', '(mura/(1000.*3600.))*PI()/180.'), 

79 ('properMotionDec', '(mudecl/(1000.*3600.))*PI()/180.'), 

80 ('parallax', 'parallax*PI()/648000000.'), 

81 ('galacticAv', 'CONVERT(float, ebv*3.1)'), 

82 ('radialVelocity', 'vrad'), 

83 ('variabilityParameters', 'varParamStr', str, 256), 

84 ('sedFilename', 'sedfilename', str, 40)] 

85 

86 

87class BrightStarObj(StarBase): 

88 objid = 'brightstars' 

89 tableid = 'bright_stars' 

90 objectTypeId = 13 

91 doRunTest = True 

92 testObservationMetaData = ObservationMetaData(boundType='circle', pointingRA=210.0, pointingDec=-30.0, 

93 boundLength=0.1, mjd=52000.0, bandpassName='r', m5=22.0) 

94 

95 columns = [('id', 'simobjid', int), 

96 ('raJ2000', 'ra*PI()/180.'), 

97 ('decJ2000', 'decl*PI()/180.'), 

98 ('glon', 'gal_l*PI()/180.'), 

99 ('glat', 'gal_b*PI()/180.'), 

100 ('magNorm', 'mag_norm'), 

101 ('properMotionRa', '(mura/(1000.*3600.))*PI()/180.'), 

102 ('properMotionDec', '(mudecl/(1000.*3600.))*PI()/180.'), 

103 ('galacticAv', 'CONVERT(float, ebv*3.1)'), 

104 ('sedFilename', 'sedfilename', str, 60)] 

105 

106class WdStarObj(StarBase): 

107 objid = 'wdstars' 

108 tableid = 'StarWhiteDwarf' 

109 objectTypeId = 6 

110 doRunTest = True 

111 #These types should be matched to the database. 

112 #: Default map is float. If the column mapping is the same as the column name, None can be specified 

113 columns = [('id','simobjid', int), 

114 ('raJ2000', 'ra*PI()/180.'), 

115 ('decJ2000', 'decl*PI()/180.'), 

116 ('glon', 'gal_l*PI()/180.'), 

117 ('glat', 'gal_b*PI()/180.'), 

118 ('magNorm', '(-2.5*log(flux_scale)/log(10.)) - 18.402732642'), 

119 ('properMotionRa', '(mura/(1000.*3600.))*PI()/180.'), 

120 ('properMotionDec', '(mudecl/(1000.*3600.))*PI()/180.'), 

121 ('parallax', 'parallax*PI()/648000000.'), 

122 ('galacticAv', 'CONVERT(float, ebv*3.1)'), 

123 ('radialVelocity', 'vrad'), 

124 ('variabilityParameters', 'varParamStr', str, 256), 

125 ('sedFilename', 'sedfilename', str, 40)] 

126 

127class RRLyStarObj(StarBase): 

128 objid = 'rrlystars' 

129 tableid = 'StarRRLy' 

130 objectTypeId = 7 

131 doRunTest = True 

132 #These types should be matched to the database. 

133 #: Default map is float. If the column mapping is the same as the column name, None can be specified 

134 columns = [('id','simobjid', int), 

135 ('raJ2000', 'ra*PI()/180.'), 

136 ('decJ2000', 'decl*PI()/180.'), 

137 ('glon', 'gal_l*PI()/180.'), 

138 ('glat', 'gal_b*PI()/180.'), 

139 ('magNorm', '(-2.5*log(flux_scale)/log(10.)) - 18.402732642'), 

140 ('properMotionRa', '(mura/(1000.*3600.))*PI()/180.'), 

141 ('properMotionDec', '(mudecl/(1000.*3600.))*PI()/180.'), 

142 ('parallax', 'parallax*PI()/648000000.'), 

143 ('galacticAv', 'CONVERT(float, ebv*3.1)'), 

144 ('radialVelocity', 'vrad'), 

145 ('variabilityParameters', 'varParamStr', str, 256), 

146 ('sedFilename', 'sedfilename', str, 40)] 

147 

148class BhbStarObj(StarBase): 

149 objid = 'bhbstars' 

150 tableid = 'StarBHB' 

151 objectTypeId = 8 

152 doRunTest = True 

153 #These types should be matched to the database. 

154 #: Default map is float. If the column mapping is the same as the column name, None can be specified 

155 columns = [('id','simobjid', int), 

156 ('raJ2000', 'ra*PI()/180.'), 

157 ('decJ2000', 'decl*PI()/180.'), 

158 ('glon', 'gal_l*PI()/180.'), 

159 ('glat', 'gal_b*PI()/180.'), 

160 ('magNorm', '(-2.5*log(flux_scale)/log(10.)) - 18.402732642'), 

161 ('properMotionRa', '(mura/(1000.*3600.))*PI()/180.'), 

162 ('properMotionDec', '(mudecl/(1000.*3600.))*PI()/180.'), 

163 ('parallax', 'parallax*PI()/648000000.'), 

164 ('galacticAv', 'CONVERT(float, ebv*3.1)'), 

165 ('radialVelocity', 'vrad'), 

166 ('variabilityParameters', 'varParamStr', str, 256), 

167 ('sedFilename', 'sedfilename', str, 40)] 

168 

169class EbStarObj(StarBase): 

170 objid = 'ebstars' 

171 tableid = 'StarEclipsingBinary' 

172 objectTypeId = 9 

173 doRunTest = True 

174 testObservationMetaData = ObservationMetaData(mjd=52000., bandpassName='r', m5=22.0) 

175 #These types should be matched to the database. 

176 #: Default map is float. If the column mapping is the same as the column name, None can be specified 

177 columns = [('id','simobjid', int), 

178 ('raJ2000', 'ra*PI()/180.'), 

179 ('decJ2000', 'decl*PI()/180.'), 

180 ('glon', 'gal_l*PI()/180.'), 

181 ('glat', 'gal_b*PI()/180.'), 

182 ('magNorm', '(-2.5*log(flux_scale)/log(10.)) - 18.402732642'), 

183 ('properMotionRa', '(mura/(1000.*3600.))*PI()/180.'), 

184 ('properMotionDec', '(mudecl/(1000.*3600.))*PI()/180.'), 

185 ('parallax', 'parallax*PI()/648000000.'), 

186 ('galacticAv', 'CONVERT(float, ebv*3.1)'), 

187 ('radialVelocity', 'vrad'), 

188 ('variabilityParameters', 'varParamStr', str, 256), 

189 ('sedFilename', 'sedfilename', str, 40)] 

190 

191class CepheidStarObj(StarBase): 

192 objid = 'cepheidstars' 

193 tableid = 'StarCepheid' 

194 objectTypeId = 10 

195 doRunTest = True 

196 testObservationMetaData = ObservationMetaData(mjd=52000., bandpassName='r', m5=22.0) 

197 #These types should be matched to the database. 

198 #: Default map is float. If the column mapping is the same as the column name, None can be specified 

199 columns = [('id','simobjid', int), 

200 ('raJ2000', 'ra*PI()/180.'), 

201 ('decJ2000', 'decl*PI()/180.'), 

202 ('glon', 'gal_l*PI()/180.'), 

203 ('glat', 'gal_b*PI()/180.'), 

204 ('magNorm', '(-2.5*log(flux_scale)/log(10.)) - 18.402732642'), 

205 ('properMotionRa', '(mura/(1000.*3600.))*PI()/180.'), 

206 ('properMotionDec', '(mudecl/(1000.*3600.))*PI()/180.'), 

207 ('parallax', 'parallax*PI()/648000000.'), 

208 ('galacticAv', 'CONVERT(float, ebv*3.1)'), 

209 ('radialVelocity', 'vrad'), 

210 ('variabilityParameters', 'varParamStr', str, 256), 

211 ('sedFilename', 'sedfilename', str, 40)] 

212 

213class EasterEggStarObj(StarBase): 

214 objid = 'eastereggstars' 

215 tableid = 'AstromEasterEggs' 

216 objectTypeId = 11 

217 doRunTest = True 

218 testObservationMetaData = ObservationMetaData(mjd=52000., bandpassName='r', m5=22.0) 

219 dbDefaultValues = StarBase.dbDefaultValues 

220 dbDefaultValues['sedid']=-1 

221 dbDefaultValues['especid']=-1 

222 dbDefaultValues['pop']=-1 

223 dbDefaultValues['type']=-1 

224 dbDefaultValues['isvar']=False 

225 #These types should be matched to the database. 

226 #: Default map is float. If the column mapping is the same as the column name, None can be specified 

227 columns = [('id','simobjid', int), 

228 ('raJ2000', 'ra*PI()/180.'), 

229 ('decJ2000', 'decl*PI()/180.'), 

230 ('glon', 'gal_l*PI()/180.'), 

231 ('glat', 'gal_b*PI()/180.'), 

232 ('magNorm', '(-2.5*log(flux_scale)/log(10.)) - 18.402732642'), 

233 ('properMotionRa', '(mura/(1000.*3600.))*PI()/180.'), 

234 ('properMotionDec', '(mudecl/(1000.*3600.))*PI()/180.'), 

235 ('parallax', 'parallax*PI()/648000000.'), 

236 ('galacticAv', 'CONVERT(float, ebv*3.1)'), 

237 ('radialVelocity', 'vrad'), 

238 ('variabilityParameters', 'varParamStr', str, 256), 

239 ('sedFilename', 'sedfilename', str, 40)] 

240 

241class DwarfGalStarObj(StarBase): 

242 objid = 'dwarfgalstars' 

243 tableid = 'StarDwarfGalaxy' 

244 objectTypeId = 12 

245 doRunTest = True 

246 testObservationMetaData = ObservationMetaData(boundType='circle', pointingRA=1.37, pointingDec=-0.1, 

247 boundLength=0.1, mjd=52000., bandpassName='r', m5=22.0) 

248 #These types should be matched to the database. 

249 #: Default map is float. If the column mapping is the same as the column name, None can be specified 

250 columns = [('id','simobjid', int), 

251 ('raJ2000', 'ra*PI()/180.'), 

252 ('decJ2000', 'decl*PI()/180.'), 

253 ('glon', 'gal_l*PI()/180.'), 

254 ('glat', 'gal_b*PI()/180.'), 

255 ('magNorm', '(-2.5*log(flux_scale)/log(10.)) - 18.402732642'), 

256 ('properMotionRa', '(mura/(1000.*3600.))*PI()/180.'), 

257 ('properMotionDec', '(mudecl/(1000.*3600.))*PI()/180.'), 

258 ('parallax', 'parallax*PI()/648000000.'), 

259 ('galacticAv', 'CONVERT(float, ebv*3.1)'), 

260 ('radialVelocity', 'vrad'), 

261 ('variabilityParameters', 'varParamStr', str, 256), 

262 ('sedFilename', 'sedfilename', str, 40)]