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.objectSizeStarSelector 

4import lsst.meas.algorithms.flaggedSourceSelector 

5import lsst.pipe.tasks.colorterms 

6import lsst.meas.algorithms.loadIndexedReferenceObjects 

7import lsst.meas.algorithms.matcherSourceSelector 

8import lsst.meas.algorithms.sourceSelector 

9import lsst.meas.algorithms.astrometrySourceSelector 

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# Always use this reference catalog filter, no matter whether or what filter name is supplied to the loader. Effectively a trivial filterMap: map all filter names to this filter. This can be set for purely-astrometric catalogs (e.g. Gaia DR2) where there is only one reasonable choice for every camera filter->refcat mapping, but not for refcats used for photometry, which need a filterMap and/or colorterms/transmission corrections. 

87config.astrometryRefObjLoader.anyFilterMapsToThis='phot_g_mean' 

88 

89# Mapping of camera filter name: reference catalog filter name; each reference filter must exist in the refcat. Note that this does not perform any bandpass corrections: it is just a lookup. 

90config.astrometryRefObjLoader.filterMap={} 

91 

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

93config.astrometryRefObjLoader.requireProperMotion=True 

94 

95# Name of the ingested reference dataset 

96config.astrometryRefObjLoader.ref_dataset_name='gaia_dr2_20200414' 

97 

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

99config.photometryRefObjLoader.pixelMargin=300 

100 

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

102config.photometryRefObjLoader.defaultFilter='' 

103 

104# Always use this reference catalog filter, no matter whether or what filter name is supplied to the loader. Effectively a trivial filterMap: map all filter names to this filter. This can be set for purely-astrometric catalogs (e.g. Gaia DR2) where there is only one reasonable choice for every camera filter->refcat mapping, but not for refcats used for photometry, which need a filterMap and/or colorterms/transmission corrections. 

105config.photometryRefObjLoader.anyFilterMapsToThis=None 

106 

107# Mapping of camera filter name: reference catalog filter name; each reference filter must exist in the refcat. Note that this does not perform any bandpass corrections: it is just a lookup. 

108config.photometryRefObjLoader.filterMap={} 

109 

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

111config.photometryRefObjLoader.requireProperMotion=False 

112 

113# Name of the ingested reference dataset 

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

115 

116# Apply flux limit? 

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

118 

119# Apply flag limitation? 

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

121 

122# Apply unresolved limitation? 

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

124 

125# Apply signal-to-noise limit? 

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

127 

128# Apply isolated limitation? 

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

130 

131# Select objects with value greater than this 

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

133 

134# Select objects with value less than this 

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

136 

137# Name of the source flux field to use. 

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

139 

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

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

142 

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

144config.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'] 

145 

146# Select objects with value greater than this 

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

148 

149# Select objects with value less than this 

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

151 

152# Name of column for star/galaxy separation 

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

154 

155# Select objects with value greater than this 

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

157 

158# Select objects with value less than this 

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

160 

161# Name of the source flux field to use. 

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

163 

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

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

166 

167# Name of column for parent 

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

169 

170# Name of column for nChild 

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

172 

173# Apply magnitude limit? 

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

175 

176# Apply flag limitation? 

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

178 

179# Apply unresolved limitation? 

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

181 

182# Apply signal-to-noise limit? 

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

184 

185# Apply magnitude error limit? 

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

187 

188# Select objects with value greater than this 

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

190 

191# Select objects with value less than this 

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

193 

194# Name of the source flux field to use. 

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

196 

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

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

199 

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

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

202 

203# Select objects with value greater than this 

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

205 

206# Select objects with value less than this 

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

208 

209# Name of column for star/galaxy separation 

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

211 

212# Select objects with value greater than this 

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

214 

215# Select objects with value less than this 

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

217 

218# Name of the source flux field to use. 

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

220 

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

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

223 

224# Select objects with value greater than this 

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

226 

227# Select objects with value less than this 

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

229 

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

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

232 

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

234# Apply flux limit to Psf Candidate selection? 

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

236 

237# specify the minimum psfFlux for good Psf Candidates 

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

239 

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

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

242 

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

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

245 

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

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

248 

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

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

251 

252# minimum width to include in histogram 

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

254 

255# maximum width to include in histogram 

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

257 

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

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

260 

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

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

263 

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

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

266 

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

268config.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'] 

269 

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

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

272 

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

274config.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'] 

275 

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

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

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['astrometry'].minSnr=10.0 

281 

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

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

284 

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

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

287 

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

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

290 

291config.sourceSelector.name='astrometry' 

292# Apply magnitude limit? 

293config.astrometryReferenceSelector.doMagLimit=False 

294 

295# Apply flag limitation? 

296config.astrometryReferenceSelector.doFlags=False 

297 

298# Apply unresolved limitation? 

299config.astrometryReferenceSelector.doUnresolved=False 

300 

301# Apply signal-to-noise limit? 

302config.astrometryReferenceSelector.doSignalToNoise=False 

303 

304# Apply magnitude error limit? 

305config.astrometryReferenceSelector.doMagError=False 

306 

307# Select objects with value greater than this 

308config.astrometryReferenceSelector.magLimit.minimum=None 

309 

310# Select objects with value less than this 

311config.astrometryReferenceSelector.magLimit.maximum=None 

312 

313# Name of the source flux field to use. 

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

315 

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

317config.astrometryReferenceSelector.flags.good=[] 

318 

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

320config.astrometryReferenceSelector.flags.bad=[] 

321 

322# Select objects with value greater than this 

323config.astrometryReferenceSelector.unresolved.minimum=None 

324 

325# Select objects with value less than this 

326config.astrometryReferenceSelector.unresolved.maximum=0.5 

327 

328# Name of column for star/galaxy separation 

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

330 

331# Select objects with value greater than this 

332config.astrometryReferenceSelector.signalToNoise.minimum=None 

333 

334# Select objects with value less than this 

335config.astrometryReferenceSelector.signalToNoise.maximum=None 

336 

337# Name of the source flux field to use. 

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

339 

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

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

342 

343# Select objects with value greater than this 

344config.astrometryReferenceSelector.magError.minimum=None 

345 

346# Select objects with value less than this 

347config.astrometryReferenceSelector.magError.maximum=None 

348 

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

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

351 

352config.astrometryReferenceSelector.colorLimits={} 

353# Apply magnitude limit? 

354config.photometryReferenceSelector.doMagLimit=False 

355 

356# Apply flag limitation? 

357config.photometryReferenceSelector.doFlags=False 

358 

359# Apply unresolved limitation? 

360config.photometryReferenceSelector.doUnresolved=False 

361 

362# Apply signal-to-noise limit? 

363config.photometryReferenceSelector.doSignalToNoise=False 

364 

365# Apply magnitude error limit? 

366config.photometryReferenceSelector.doMagError=False 

367 

368# Select objects with value greater than this 

369config.photometryReferenceSelector.magLimit.minimum=None 

370 

371# Select objects with value less than this 

372config.photometryReferenceSelector.magLimit.maximum=None 

373 

374# Name of the source flux field to use. 

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

376 

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

378config.photometryReferenceSelector.flags.good=[] 

379 

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

381config.photometryReferenceSelector.flags.bad=[] 

382 

383# Select objects with value greater than this 

384config.photometryReferenceSelector.unresolved.minimum=None 

385 

386# Select objects with value less than this 

387config.photometryReferenceSelector.unresolved.maximum=0.5 

388 

389# Name of column for star/galaxy separation 

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

391 

392# Select objects with value greater than this 

393config.photometryReferenceSelector.signalToNoise.minimum=None 

394 

395# Select objects with value less than this 

396config.photometryReferenceSelector.signalToNoise.maximum=None 

397 

398# Name of the source flux field to use. 

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

400 

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

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

403 

404# Select objects with value greater than this 

405config.photometryReferenceSelector.magError.minimum=None 

406 

407# Select objects with value less than this 

408config.photometryReferenceSelector.magError.maximum=None 

409 

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

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

412 

413config.photometryReferenceSelector.colorLimits={} 

414# 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. 

415config.astrometryReferenceErr=None 

416 

417# 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. 

418config.writeInitMatrix=True 

419 

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

421config.writeChi2FilesInitialFinal=False 

422 

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

424config.writeChi2FilesOuterLoop=False 

425 

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

427config.writeInitialModel=False 

428 

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

430config.debugOutputPath='.' 

431 

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

433config.sourceFluxType='Calib' 

434