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

1import lsst.jointcal.jointcal 

2assert type(config)==lsst.jointcal.jointcal.JointcalConfig, 'config is of type %s.%s instead of lsst.jointcal.jointcal.JointcalConfig' % (type(config).__module__, type(config).__name__) 

3import lsst.meas.algorithms.loadIndexedReferenceObjects 

4import lsst.meas.algorithms.astrometrySourceSelector 

5import lsst.meas.algorithms.matcherSourceSelector 

6import lsst.pipe.tasks.colorterms 

7import lsst.meas.algorithms.sourceSelector 

8import lsst.meas.algorithms.flaggedSourceSelector 

9import lsst.meas.algorithms.objectSizeStarSelector 

10# Fit astrometry and write the fitted result. 

11config.doAstrometry=False 

12 

13# Fit photometry and write the fitted result. 

14config.doPhotometry=True 

15 

16# Type of coadd, typically deep or goodSeeing 

17config.coaddName='deep' 

18 

19# Systematic term to apply to the measured position error (pixels) 

20config.positionErrorPedestal=0.02 

21 

22# Systematic term to apply to the measured error on flux or magnitude as a fraction of source flux or magnitude delta (e.g. 0.05 is 5% of flux or +50 millimag). 

23config.photometryErrorPedestal=0.0 

24 

25# Matching radius between fitted and reference stars (arcseconds) 

26config.matchCut=3.0 

27 

28# Minimum number of associated measured stars for a fitted star to be included in the fit 

29config.minMeasurements=2 

30 

31# Minimum number of measuredStars per ccdImage before printing warnings 

32config.minMeasuredStarsPerCcd=100 

33 

34# Minimum number of measuredStars per ccdImage before printing warnings 

35config.minRefStarsPerCcd=30 

36 

37# Allow a line search during minimization, if it is reasonable for the model (models with a significant non-linear component, e.g. constrainedPhotometry). 

38config.allowLineSearch=False 

39 

40# Polynomial order for fitting the simple astrometry model. 

41config.astrometrySimpleOrder=3 

42 

43# Order of the per-chip transform for the constrained astrometry model. 

44config.astrometryChipOrder=1 

45 

46# Order of the per-visit transform for the constrained astrometry model. 

47config.astrometryVisitOrder=5 

48 

49# Use the input calexp WCSs to initialize a SimpleAstrometryModel. 

50config.useInputWcs=True 

51 

52# Type of model to fit to astrometry 

53config.astrometryModel='constrained' 

54 

55# Type of model to fit to photometry 

56config.photometryModel='simpleFlux' 

57 

58# Apply photometric color terms to reference stars?Requires that colorterms be set to a ColortermLibrary 

59config.applyColorTerms=False 

60 

61config.colorterms.data={} 

62# Order of the per-visit polynomial transform for the constrained photometry model. 

63config.photometryVisitOrder=7 

64 

65# Do the rank update step during minimization. Skipping this can help deal with models that are too non-linear. 

66config.photometryDoRankUpdate=True 

67 

68# Do the rank update step during minimization (should not change the astrometry fit). Skipping this can help deal with models that are too non-linear. 

69config.astrometryDoRankUpdate=True 

70 

71# How many sigma to reject outliers at during minimization. 

72config.outlierRejectSigma=5.0 

73 

74# Maximum number of minimize iterations to take when fitting photometry. 

75config.maxPhotometrySteps=20 

76 

77# Maximum number of minimize iterations to take when fitting photometry. 

78config.maxAstrometrySteps=20 

79 

80# Padding to add to 4 all edges of the bounding box (pixels) 

81config.astrometryRefObjLoader.pixelMargin=300 

82 

83# Default reference catalog filter to use if filter not specified in exposure; if blank then filter must be specified in exposure 

84config.astrometryRefObjLoader.defaultFilter='' 

85 

86# Mapping of camera filter name: reference catalog filter name; each reference filter must exist 

87config.astrometryRefObjLoader.filterMap={'u': 'phot_g_mean', 'g': 'phot_g_mean', 'r': 'phot_g_mean', 'i': 'phot_g_mean', 'z': 'phot_g_mean', 'y': 'phot_g_mean'} 

88 

89# Require that the fields needed to correct proper motion (epoch, pm_ra and pm_dec) are present? 

90config.astrometryRefObjLoader.requireProperMotion=True 

91 

92# Name of the ingested reference dataset 

93config.astrometryRefObjLoader.ref_dataset_name='gaia_dr2_20200414' 

94 

95# Padding to add to 4 all edges of the bounding box (pixels) 

96config.photometryRefObjLoader.pixelMargin=300 

97 

98# Default reference catalog filter to use if filter not specified in exposure; if blank then filter must be specified in exposure 

99config.photometryRefObjLoader.defaultFilter='' 

100 

101# Mapping of camera filter name: reference catalog filter name; each reference filter must exist 

102config.photometryRefObjLoader.filterMap={} 

103 

104# Require that the fields needed to correct proper motion (epoch, pm_ra and pm_dec) are present? 

105config.photometryRefObjLoader.requireProperMotion=False 

106 

107# Name of the ingested reference dataset 

108config.photometryRefObjLoader.ref_dataset_name='sdss-dr9-fink-v5b' 

109 

110# Apply flux limit? 

111config.sourceSelector['science'].doFluxLimit=False 

112 

113# Apply flag limitation? 

114config.sourceSelector['science'].doFlags=True 

115 

116# Apply unresolved limitation? 

117config.sourceSelector['science'].doUnresolved=True 

118 

119# Apply signal-to-noise limit? 

120config.sourceSelector['science'].doSignalToNoise=True 

121 

122# Apply isolated limitation? 

123config.sourceSelector['science'].doIsolated=True 

124 

125# Select objects with value greater than this 

126config.sourceSelector['science'].fluxLimit.minimum=None 

127 

128# Select objects with value less than this 

129config.sourceSelector['science'].fluxLimit.maximum=None 

130 

131# Name of the source flux field to use. 

132config.sourceSelector['science'].fluxLimit.fluxField='slot_CalibFlux_instFlux' 

133 

134# List of source flag fields that must be set for a source to be used. 

135config.sourceSelector['science'].flags.good=[] 

136 

137# List of source flag fields that must NOT be set for a source to be used. 

138config.sourceSelector['science'].flags.bad=['base_PixelFlags_flag_edge', 'base_PixelFlags_flag_saturated', 'base_PixelFlags_flag_interpolatedCenter', 'base_SdssCentroid_flag', 'base_PsfFlux_flag', 'base_PixelFlags_flag_suspectCenter'] 

139 

140# Select objects with value greater than this 

141config.sourceSelector['science'].unresolved.minimum=None 

142 

143# Select objects with value less than this 

144config.sourceSelector['science'].unresolved.maximum=0.5 

145 

146# Name of column for star/galaxy separation 

147config.sourceSelector['science'].unresolved.name='base_ClassificationExtendedness_value' 

148 

149# Select objects with value greater than this 

150config.sourceSelector['science'].signalToNoise.minimum=10.0 

151 

152# Select objects with value less than this 

153config.sourceSelector['science'].signalToNoise.maximum=None 

154 

155# Name of the source flux field to use. 

156config.sourceSelector['science'].signalToNoise.fluxField='slot_CalibFlux_instFlux' 

157 

158# Name of the source flux error field to use. 

159config.sourceSelector['science'].signalToNoise.errField='slot_CalibFlux_instFluxErr' 

160 

161# Name of column for parent 

162config.sourceSelector['science'].isolated.parentName='parent' 

163 

164# Name of column for nChild 

165config.sourceSelector['science'].isolated.nChildName='deblend_nChild' 

166 

167# Apply magnitude limit? 

168config.sourceSelector['references'].doMagLimit=False 

169 

170# Apply flag limitation? 

171config.sourceSelector['references'].doFlags=False 

172 

173# Apply unresolved limitation? 

174config.sourceSelector['references'].doUnresolved=False 

175 

176# Apply signal-to-noise limit? 

177config.sourceSelector['references'].doSignalToNoise=False 

178 

179# Apply magnitude error limit? 

180config.sourceSelector['references'].doMagError=False 

181 

182# Select objects with value greater than this 

183config.sourceSelector['references'].magLimit.minimum=None 

184 

185# Select objects with value less than this 

186config.sourceSelector['references'].magLimit.maximum=None 

187 

188# Name of the source flux field to use. 

189config.sourceSelector['references'].magLimit.fluxField='flux' 

190 

191# List of source flag fields that must be set for a source to be used. 

192config.sourceSelector['references'].flags.good=[] 

193 

194# List of source flag fields that must NOT be set for a source to be used. 

195config.sourceSelector['references'].flags.bad=[] 

196 

197# Select objects with value greater than this 

198config.sourceSelector['references'].unresolved.minimum=None 

199 

200# Select objects with value less than this 

201config.sourceSelector['references'].unresolved.maximum=0.5 

202 

203# Name of column for star/galaxy separation 

204config.sourceSelector['references'].unresolved.name='base_ClassificationExtendedness_value' 

205 

206# Select objects with value greater than this 

207config.sourceSelector['references'].signalToNoise.minimum=None 

208 

209# Select objects with value less than this 

210config.sourceSelector['references'].signalToNoise.maximum=None 

211 

212# Name of the source flux field to use. 

213config.sourceSelector['references'].signalToNoise.fluxField='flux' 

214 

215# Name of the source flux error field to use. 

216config.sourceSelector['references'].signalToNoise.errField='flux_err' 

217 

218# Select objects with value greater than this 

219config.sourceSelector['references'].magError.minimum=None 

220 

221# Select objects with value less than this 

222config.sourceSelector['references'].magError.maximum=None 

223 

224# Name of the source flux error field to use. 

225config.sourceSelector['references'].magError.magErrField='mag_err' 

226 

227config.sourceSelector['references'].colorLimits={} 

228# Apply flux limit to Psf Candidate selection? 

229config.sourceSelector['objectSize'].doFluxLimit=True 

230 

231# specify the minimum psfFlux for good Psf Candidates 

232config.sourceSelector['objectSize'].fluxMin=12500.0 

233 

234# specify the maximum psfFlux for good Psf Candidates (ignored if == 0) 

235config.sourceSelector['objectSize'].fluxMax=0.0 

236 

237# Apply signal-to-noise (i.e. flux/fluxErr) limit to Psf Candidate selection? 

238config.sourceSelector['objectSize'].doSignalToNoiseLimit=False 

239 

240# specify the minimum signal-to-noise for good Psf Candidates 

241config.sourceSelector['objectSize'].signalToNoiseMin=20.0 

242 

243# specify the maximum signal-to-noise for good Psf Candidates (ignored if == 0) 

244config.sourceSelector['objectSize'].signalToNoiseMax=0.0 

245 

246# minimum width to include in histogram 

247config.sourceSelector['objectSize'].widthMin=0.0 

248 

249# maximum width to include in histogram 

250config.sourceSelector['objectSize'].widthMax=10.0 

251 

252# Name of field in Source to use for flux measurement 

253config.sourceSelector['objectSize'].sourceFluxField='base_GaussianFlux_instFlux' 

254 

255# Standard deviation of width allowed to be interpreted as good stars 

256config.sourceSelector['objectSize'].widthStdAllowed=0.15 

257 

258# Keep objects within this many sigma of cluster 0's median 

259config.sourceSelector['objectSize'].nSigmaClip=2.0 

260 

261# List of flags which cause a source to be rejected as bad 

262config.sourceSelector['objectSize'].badFlags=['base_PixelFlags_flag_edge', 'base_PixelFlags_flag_interpolatedCenter', 'base_PixelFlags_flag_saturatedCenter', 'base_PixelFlags_flag_crCenter', 'base_PixelFlags_flag_bad', 'base_PixelFlags_flag_interpolated'] 

263 

264# Name of a flag field that is True for Sources that should be used. 

265config.sourceSelector['flagged'].field='calib_psf_used' 

266 

267# List of flags which cause a source to be rejected as bad 

268config.sourceSelector['astrometry'].badFlags=['base_PixelFlags_flag_edge', 'base_PixelFlags_flag_interpolatedCenter', 'base_PixelFlags_flag_saturatedCenter', 'base_PixelFlags_flag_crCenter', 'base_PixelFlags_flag_bad', 'slot_Shape_flag', 'base_PixelFlags_flag_interpolated'] 

269 

270# Type of source flux; typically one of Ap or Psf 

271config.sourceSelector['astrometry'].sourceFluxType='Calib' 

272 

273# Minimum allowed signal-to-noise ratio for sources used for matching (in the flux specified by sourceFluxType); <= 0 for no limit 

274config.sourceSelector['astrometry'].minSnr=10.0 

275 

276# Type of source flux; typically one of Ap or Psf 

277config.sourceSelector['matcher'].sourceFluxType='Ap' 

278 

279# Minimum allowed signal-to-noise ratio for sources used for matching (in the flux specified by sourceFluxType); <= 0 for no limit 

280config.sourceSelector['matcher'].minSnr=40.0 

281 

282# Exclude objects that have saturated, interpolated, or edge pixels using PixelFlags. For matchOptimisticB set this to False to recover previous matcher selector behavior. 

283config.sourceSelector['matcher'].excludePixelFlags=True 

284 

285config.sourceSelector.name='astrometry' 

286# Apply magnitude limit? 

287config.astrometryReferenceSelector.doMagLimit=False 

288 

289# Apply flag limitation? 

290config.astrometryReferenceSelector.doFlags=False 

291 

292# Apply unresolved limitation? 

293config.astrometryReferenceSelector.doUnresolved=False 

294 

295# Apply signal-to-noise limit? 

296config.astrometryReferenceSelector.doSignalToNoise=False 

297 

298# Apply magnitude error limit? 

299config.astrometryReferenceSelector.doMagError=False 

300 

301# Select objects with value greater than this 

302config.astrometryReferenceSelector.magLimit.minimum=None 

303 

304# Select objects with value less than this 

305config.astrometryReferenceSelector.magLimit.maximum=None 

306 

307# Name of the source flux field to use. 

308config.astrometryReferenceSelector.magLimit.fluxField='flux' 

309 

310# List of source flag fields that must be set for a source to be used. 

311config.astrometryReferenceSelector.flags.good=[] 

312 

313# List of source flag fields that must NOT be set for a source to be used. 

314config.astrometryReferenceSelector.flags.bad=[] 

315 

316# Select objects with value greater than this 

317config.astrometryReferenceSelector.unresolved.minimum=None 

318 

319# Select objects with value less than this 

320config.astrometryReferenceSelector.unresolved.maximum=0.5 

321 

322# Name of column for star/galaxy separation 

323config.astrometryReferenceSelector.unresolved.name='base_ClassificationExtendedness_value' 

324 

325# Select objects with value greater than this 

326config.astrometryReferenceSelector.signalToNoise.minimum=None 

327 

328# Select objects with value less than this 

329config.astrometryReferenceSelector.signalToNoise.maximum=None 

330 

331# Name of the source flux field to use. 

332config.astrometryReferenceSelector.signalToNoise.fluxField='flux' 

333 

334# Name of the source flux error field to use. 

335config.astrometryReferenceSelector.signalToNoise.errField='flux_err' 

336 

337# Select objects with value greater than this 

338config.astrometryReferenceSelector.magError.minimum=None 

339 

340# Select objects with value less than this 

341config.astrometryReferenceSelector.magError.maximum=None 

342 

343# Name of the source flux error field to use. 

344config.astrometryReferenceSelector.magError.magErrField='mag_err' 

345 

346config.astrometryReferenceSelector.colorLimits={} 

347# Apply magnitude limit? 

348config.photometryReferenceSelector.doMagLimit=False 

349 

350# Apply flag limitation? 

351config.photometryReferenceSelector.doFlags=False 

352 

353# Apply unresolved limitation? 

354config.photometryReferenceSelector.doUnresolved=False 

355 

356# Apply signal-to-noise limit? 

357config.photometryReferenceSelector.doSignalToNoise=False 

358 

359# Apply magnitude error limit? 

360config.photometryReferenceSelector.doMagError=False 

361 

362# Select objects with value greater than this 

363config.photometryReferenceSelector.magLimit.minimum=None 

364 

365# Select objects with value less than this 

366config.photometryReferenceSelector.magLimit.maximum=None 

367 

368# Name of the source flux field to use. 

369config.photometryReferenceSelector.magLimit.fluxField='flux' 

370 

371# List of source flag fields that must be set for a source to be used. 

372config.photometryReferenceSelector.flags.good=[] 

373 

374# List of source flag fields that must NOT be set for a source to be used. 

375config.photometryReferenceSelector.flags.bad=[] 

376 

377# Select objects with value greater than this 

378config.photometryReferenceSelector.unresolved.minimum=None 

379 

380# Select objects with value less than this 

381config.photometryReferenceSelector.unresolved.maximum=0.5 

382 

383# Name of column for star/galaxy separation 

384config.photometryReferenceSelector.unresolved.name='base_ClassificationExtendedness_value' 

385 

386# Select objects with value greater than this 

387config.photometryReferenceSelector.signalToNoise.minimum=None 

388 

389# Select objects with value less than this 

390config.photometryReferenceSelector.signalToNoise.maximum=None 

391 

392# Name of the source flux field to use. 

393config.photometryReferenceSelector.signalToNoise.fluxField='flux' 

394 

395# Name of the source flux error field to use. 

396config.photometryReferenceSelector.signalToNoise.errField='flux_err' 

397 

398# Select objects with value greater than this 

399config.photometryReferenceSelector.magError.minimum=None 

400 

401# Select objects with value less than this 

402config.photometryReferenceSelector.magError.maximum=None 

403 

404# Name of the source flux error field to use. 

405config.photometryReferenceSelector.magError.magErrField='mag_err' 

406 

407config.photometryReferenceSelector.colorLimits={} 

408# Uncertainty on reference catalog coordinates [mas] to use in place of the `coord_*Err` fields. If None, then raise an exception if the reference catalog is missing coordinate errors. If specified, overrides any existing `coord_*Err` values. 

409config.astrometryReferenceErr=None 

410 

411# Write the pre/post-initialization Hessian and gradient to text files, for debugging. The output files will be of the form 'astrometry_preinit-mat.txt', in the current directory. Note that these files are the dense versions of the matrix, and so may be very large. 

412config.writeInitMatrix=True 

413 

414# Write .csv files containing the contributions to chi2 for the initialization and final fit. 

415config.writeChi2FilesInitialFinal=False 

416 

417# Write .csv files containing the contributions to chi2 for the outer fit loop. 

418config.writeChi2FilesOuterLoop=False 

419 

420# Write the pre-initialization model to text files, for debugging. Output is written to `initial[Astro|Photo]metryModel.txt` in the current working directory. 

421config.writeInitialModel=False 

422 

423# Path to write debug output files to. Used by `writeInitialModel`, `writeChi2Files*`, `writeInitMatrix`. 

424config.debugOutputPath='.' 

425 

426# Source flux field to use in source selection and to get fluxes from the catalog. 

427config.sourceFluxType='Calib' 

428