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

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

59

60

61

62

63

64

65

66

67

68

69

70

71

72

73

74

75

76

77

78

79

80

81

82

83

84

85

86

87

88

89

90

91

92

93

94

95

96

97

98

99

100

101

102

103

104

105

106

107

108

109

110

111

112

113

114

115

116

117

118

119

120

121

122

123

124

125

126

127

128

129

130

131

132

133

134

135

136

137

138

139

140

141

142

143

144

145

146

147

148

149

150

151

152

153

154

155

156

157

158

159

160

161

162

163

164

165

166

167

168

169

170

171

172

173

174

175

176

177

178

179

180

181

182

183

184

185

186

187

188

189

190

191

192

193

194

195

196

197

198

199

200

201

202

203

204

205

206

207

208

209

210

211

212

213

214

215

216

217

218

219

220

221

222

223

224

225

226

227

228

229

230

231

232

233

234

235

236

237

238

239

240

241

242

243

244

245

246

247

248

249

250

251

252

253

254

255

256

257

258

259

260

261

262

from .BaseCatalogModels import BaseCatalogObj 

from lsst.sims.utils import ObservationMetaData 

from lsst.sims.catalogs.db import CompoundCatalogDBObject 

 

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

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

"DwarfGalStarObj", "BrightStarObj"] 

 

class StarBase(BaseCatalogObj): 

objid = 'starbase' 

tableid = None 

idColKey = 'id' 

raColName = 'ra' 

decColName = 'decl' 

objectTypeId = -1 

#Don't run test on base class 

doRunTest = False 

#default observation metadata 

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

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

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

'runobjid':-1} 

#These types should be matched to the database. 

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

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

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

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

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

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

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

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

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

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

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

('radialVelocity', 'vrad'), 

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

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

 

 

class StarObj(StarBase): 

objid = 'allstars' 

tableid = 'StarAllForceseek' 

objectTypeId = 4 

doRunTest = True 

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

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

#These types should be matched to the database. 

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

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

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

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

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

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

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

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

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

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

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

('radialVelocity', 'vrad'), 

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

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

 

class MsStarObj(StarBase): 

objid = 'msstars' 

tableid = 'StarMSRGBForceseek' 

objectTypeId = 5 

doRunTest = True 

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

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

#These types should be matched to the database. 

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

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

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

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

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

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

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

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

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

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

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

('radialVelocity', 'vrad'), 

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

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

 

 

class BrightStarObj(StarBase): 

objid = 'brightstars' 

tableid = 'bright_stars' 

objectTypeId = 13 

doRunTest = True 

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

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

 

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

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

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

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

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

('magNorm', 'mag_norm'), 

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

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

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

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

 

class WdStarObj(StarBase): 

objid = 'wdstars' 

tableid = 'StarWhiteDwarf' 

objectTypeId = 6 

doRunTest = True 

#These types should be matched to the database. 

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

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

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

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

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

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

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

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

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

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

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

('radialVelocity', 'vrad'), 

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

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

 

class RRLyStarObj(StarBase): 

objid = 'rrlystars' 

tableid = 'StarRRLy' 

objectTypeId = 7 

doRunTest = True 

#These types should be matched to the database. 

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

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

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

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

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

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

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

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

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

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

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

('radialVelocity', 'vrad'), 

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

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

 

class BhbStarObj(StarBase): 

objid = 'bhbstars' 

tableid = 'StarBHB' 

objectTypeId = 8 

doRunTest = True 

#These types should be matched to the database. 

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

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

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

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

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

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

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

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

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

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

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

('radialVelocity', 'vrad'), 

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

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

 

class EbStarObj(StarBase): 

objid = 'ebstars' 

tableid = 'StarEclipsingBinary' 

objectTypeId = 9 

doRunTest = True 

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

#These types should be matched to the database. 

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

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

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

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

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

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

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

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

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

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

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

('radialVelocity', 'vrad'), 

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

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

 

class CepheidStarObj(StarBase): 

objid = 'cepheidstars' 

tableid = 'StarCepheid' 

objectTypeId = 10 

doRunTest = True 

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

#These types should be matched to the database. 

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

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

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

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

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

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

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

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

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

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

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

('radialVelocity', 'vrad'), 

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

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

 

class EasterEggStarObj(StarBase): 

objid = 'eastereggstars' 

tableid = 'AstromEasterEggs' 

objectTypeId = 11 

doRunTest = True 

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

dbDefaultValues = StarBase.dbDefaultValues 

dbDefaultValues['sedid']=-1 

dbDefaultValues['especid']=-1 

dbDefaultValues['pop']=-1 

dbDefaultValues['type']=-1 

dbDefaultValues['isvar']=False 

#These types should be matched to the database. 

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

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

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

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

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

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

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

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

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

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

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

('radialVelocity', 'vrad'), 

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

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

 

class DwarfGalStarObj(StarBase): 

objid = 'dwarfgalstars' 

tableid = 'StarDwarfGalaxy' 

objectTypeId = 12 

doRunTest = True 

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

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

#These types should be matched to the database. 

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

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

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

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

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

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

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

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

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

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

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

('radialVelocity', 'vrad'), 

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

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