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

263

264

265

266

267

268

269

270

271

272

273

274

275

276

277

278

279

280

281

282

283

284

285

286

287

288

289

290

291

292

293

294

295

296

297

298

299

300

301

302

303

304

305

306

307

308

309

310

311

312

313

314

315

316

317

318

319

320

321

322

323

324

325

326

327

328

329

330

331

332

333

334

335

336

337

338

339

340

341

342

343

344

345

346

347

348

349

350

351

352

353

354

355

356

357

358

359

360

361

362

363

364

365

366

367

368

369

370

371

372

373

374

375

376

377

378

379

380

381

382

383

384

385

386

387

388

389

390

391

392

393

394

395

396

397

398

399

400

401

402

403

404

405

406

407

408

409

410

411

412

413

414

415

416

417

418

419

420

421

422

import lsst.jointcal.jointcal 

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

import lsst.meas.algorithms.sourceSelector 

import lsst.meas.algorithms.loadIndexedReferenceObjects 

import lsst.meas.algorithms.matcherSourceSelector 

import lsst.pipe.tasks.colorterms 

import lsst.meas.algorithms.objectSizeStarSelector 

import lsst.meas.algorithms.astrometrySourceSelector 

import lsst.meas.algorithms.flaggedSourceSelector 

# Fit astrometry and write the fitted result. 

config.doAstrometry=False 

 

# Fit photometry and write the fitted result. 

config.doPhotometry=True 

 

# Type of coadd, typically deep or goodSeeing 

config.coaddName='deep' 

 

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

config.positionErrorPedestal=0.02 

 

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

config.photometryErrorPedestal=0.0 

 

# Matching radius between fitted and reference stars (arcseconds) 

config.matchCut=3.0 

 

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

config.minMeasurements=2 

 

# Minimum number of measuredStars per ccdImage before printing warnings 

config.minMeasuredStarsPerCcd=100 

 

# Minimum number of measuredStars per ccdImage before printing warnings 

config.minRefStarsPerCcd=30 

 

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

config.allowLineSearch=False 

 

# Polynomial order for fitting the simple astrometry model. 

config.astrometrySimpleOrder=3 

 

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

config.astrometryChipOrder=1 

 

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

config.astrometryVisitOrder=5 

 

# Use the input calexp WCSs to initialize a SimpleAstrometryModel. 

config.useInputWcs=True 

 

# Type of model to fit to astrometry 

config.astrometryModel='constrained' 

 

# Type of model to fit to photometry 

config.photometryModel='simpleFlux' 

 

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

config.applyColorTerms=False 

 

config.colorterms.data={} 

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

config.photometryVisitOrder=7 

 

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

config.photometryDoRankUpdate=True 

 

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

config.astrometryDoRankUpdate=True 

 

# How many sigma to reject outliers at during minimization. 

config.outlierRejectSigma=5.0 

 

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

config.maxPhotometrySteps=20 

 

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

config.maxAstrometrySteps=20 

 

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

config.astrometryRefObjLoader.pixelMargin=300 

 

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

config.astrometryRefObjLoader.defaultFilter='' 

 

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

config.astrometryRefObjLoader.filterMap={} 

 

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

config.astrometryRefObjLoader.requireProperMotion=False 

 

# Name of the ingested reference dataset 

config.astrometryRefObjLoader.ref_dataset_name='sdss-dr9-fink-v5b' 

 

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

config.photometryRefObjLoader.pixelMargin=300 

 

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

config.photometryRefObjLoader.defaultFilter='' 

 

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

config.photometryRefObjLoader.filterMap={} 

 

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

config.photometryRefObjLoader.requireProperMotion=False 

 

# Name of the ingested reference dataset 

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

 

# Apply flux limit? 

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

 

# Apply flag limitation? 

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

 

# Apply unresolved limitation? 

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

 

# Apply signal-to-noise limit? 

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

 

# Apply isolated limitation? 

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

 

# Select objects with value greater than this 

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

 

# Select objects with value less than this 

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

 

# Name of the source flux field to use. 

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

 

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

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

 

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

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

 

# Select objects with value greater than this 

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

 

# Select objects with value less than this 

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

 

# Name of column for star/galaxy separation 

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

 

# Select objects with value greater than this 

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

 

# Select objects with value less than this 

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

 

# Name of the source flux field to use. 

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

 

# Name of the source flux error field to use. 

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

 

# Name of column for parent 

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

 

# Name of column for nChild 

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

 

# Apply magnitude limit? 

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

 

# Apply flag limitation? 

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

 

# Apply unresolved limitation? 

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

 

# Apply signal-to-noise limit? 

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

 

# Apply magnitude error limit? 

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

 

# Select objects with value greater than this 

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

 

# Select objects with value less than this 

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

 

# Name of the source flux field to use. 

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

 

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

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

 

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

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

 

# Select objects with value greater than this 

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

 

# Select objects with value less than this 

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

 

# Name of column for star/galaxy separation 

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

 

# Select objects with value greater than this 

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

 

# Select objects with value less than this 

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

 

# Name of the source flux field to use. 

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

 

# Name of the source flux error field to use. 

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

 

# Select objects with value greater than this 

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

 

# Select objects with value less than this 

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

 

# Name of the source flux error field to use. 

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

 

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

# Apply flux limit to Psf Candidate selection? 

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

 

# specify the minimum psfFlux for good Psf Candidates 

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

 

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

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

 

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

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

 

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

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

 

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

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

 

# minimum width to include in histogram 

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

 

# maximum width to include in histogram 

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

 

# Name of field in Source to use for flux measurement 

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

 

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

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

 

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

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

 

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

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

 

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

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

 

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

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

 

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

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

 

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

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

 

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

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

 

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

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

 

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

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

 

config.sourceSelector.name='astrometry' 

# Apply magnitude limit? 

config.astrometryReferenceSelector.doMagLimit=False 

 

# Apply flag limitation? 

config.astrometryReferenceSelector.doFlags=False 

 

# Apply unresolved limitation? 

config.astrometryReferenceSelector.doUnresolved=False 

 

# Apply signal-to-noise limit? 

config.astrometryReferenceSelector.doSignalToNoise=False 

 

# Apply magnitude error limit? 

config.astrometryReferenceSelector.doMagError=False 

 

# Select objects with value greater than this 

config.astrometryReferenceSelector.magLimit.minimum=None 

 

# Select objects with value less than this 

config.astrometryReferenceSelector.magLimit.maximum=None 

 

# Name of the source flux field to use. 

config.astrometryReferenceSelector.magLimit.fluxField='flux' 

 

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

config.astrometryReferenceSelector.flags.good=[] 

 

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

config.astrometryReferenceSelector.flags.bad=[] 

 

# Select objects with value greater than this 

config.astrometryReferenceSelector.unresolved.minimum=None 

 

# Select objects with value less than this 

config.astrometryReferenceSelector.unresolved.maximum=0.5 

 

# Name of column for star/galaxy separation 

config.astrometryReferenceSelector.unresolved.name='base_ClassificationExtendedness_value' 

 

# Select objects with value greater than this 

config.astrometryReferenceSelector.signalToNoise.minimum=None 

 

# Select objects with value less than this 

config.astrometryReferenceSelector.signalToNoise.maximum=None 

 

# Name of the source flux field to use. 

config.astrometryReferenceSelector.signalToNoise.fluxField='flux' 

 

# Name of the source flux error field to use. 

config.astrometryReferenceSelector.signalToNoise.errField='flux_err' 

 

# Select objects with value greater than this 

config.astrometryReferenceSelector.magError.minimum=None 

 

# Select objects with value less than this 

config.astrometryReferenceSelector.magError.maximum=None 

 

# Name of the source flux error field to use. 

config.astrometryReferenceSelector.magError.magErrField='mag_err' 

 

config.astrometryReferenceSelector.colorLimits={} 

# Apply magnitude limit? 

config.photometryReferenceSelector.doMagLimit=False 

 

# Apply flag limitation? 

config.photometryReferenceSelector.doFlags=False 

 

# Apply unresolved limitation? 

config.photometryReferenceSelector.doUnresolved=False 

 

# Apply signal-to-noise limit? 

config.photometryReferenceSelector.doSignalToNoise=False 

 

# Apply magnitude error limit? 

config.photometryReferenceSelector.doMagError=False 

 

# Select objects with value greater than this 

config.photometryReferenceSelector.magLimit.minimum=None 

 

# Select objects with value less than this 

config.photometryReferenceSelector.magLimit.maximum=None 

 

# Name of the source flux field to use. 

config.photometryReferenceSelector.magLimit.fluxField='flux' 

 

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

config.photometryReferenceSelector.flags.good=[] 

 

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

config.photometryReferenceSelector.flags.bad=[] 

 

# Select objects with value greater than this 

config.photometryReferenceSelector.unresolved.minimum=None 

 

# Select objects with value less than this 

config.photometryReferenceSelector.unresolved.maximum=0.5 

 

# Name of column for star/galaxy separation 

config.photometryReferenceSelector.unresolved.name='base_ClassificationExtendedness_value' 

 

# Select objects with value greater than this 

config.photometryReferenceSelector.signalToNoise.minimum=None 

 

# Select objects with value less than this 

config.photometryReferenceSelector.signalToNoise.maximum=None 

 

# Name of the source flux field to use. 

config.photometryReferenceSelector.signalToNoise.fluxField='flux' 

 

# Name of the source flux error field to use. 

config.photometryReferenceSelector.signalToNoise.errField='flux_err' 

 

# Select objects with value greater than this 

config.photometryReferenceSelector.magError.minimum=None 

 

# Select objects with value less than this 

config.photometryReferenceSelector.magError.maximum=None 

 

# Name of the source flux error field to use. 

config.photometryReferenceSelector.magError.magErrField='mag_err' 

 

config.photometryReferenceSelector.colorLimits={} 

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

config.astrometryReferenceErr=100.0 

 

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

config.writeInitMatrix=True 

 

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

config.writeChi2FilesInitialFinal=False 

 

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

config.writeChi2FilesOuterLoop=False 

 

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

config.sourceFluxType='Calib'