Coverage for .test/JointcalTestCFHTMinimal/test_jointcalTask_2_visits_photometry/config/jointcal.py : 100%

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.sourceSelector
4import lsst.pipe.tasks.colorterms
5import lsst.meas.algorithms.loadIndexedReferenceObjects
6import lsst.meas.algorithms.objectSizeStarSelector
7import lsst.meas.algorithms.flaggedSourceSelector
8import lsst.meas.algorithms.matcherSourceSelector
9import lsst.meas.algorithms.astrometrySourceSelector
10# Fit astrometry and write the fitted result.
11config.doAstrometry=False
13# Fit photometry and write the fitted result.
14config.doPhotometry=True
16# Type of coadd, typically deep or goodSeeing
17config.coaddName='deep'
19# Systematic term to apply to the measured position error (pixels)
20config.positionErrorPedestal=0.02
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
25# Matching radius between fitted and reference stars (arcseconds)
26config.matchCut=3.0
28# Minimum number of associated measured stars for a fitted star to be included in the fit
29config.minMeasurements=2
31# Minimum number of measuredStars per ccdImage before printing warnings
32config.minMeasuredStarsPerCcd=100
34# Minimum number of measuredStars per ccdImage before printing warnings
35config.minRefStarsPerCcd=30
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
40# Polynomial order for fitting the simple astrometry model.
41config.astrometrySimpleOrder=3
43# Order of the per-chip transform for the constrained astrometry model.
44config.astrometryChipOrder=1
46# Order of the per-visit transform for the constrained astrometry model.
47config.astrometryVisitOrder=5
49# Use the input calexp WCSs to initialize a SimpleAstrometryModel.
50config.useInputWcs=True
52# Type of model to fit to astrometry
53config.astrometryModel='constrained'
55# Type of model to fit to photometry
56config.photometryModel='simpleFlux'
58# Apply photometric color terms to reference stars?Requires that colorterms be set to a ColortermLibrary
59config.applyColorTerms=False
61config.colorterms.data={}
62# Order of the per-visit polynomial transform for the constrained photometry model.
63config.photometryVisitOrder=7
65# Do the rank update step during minimization. Skipping this can help deal with models that are too non-linear.
66config.photometryDoRankUpdate=True
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
71# How many sigma to reject outliers at during minimization.
72config.outlierRejectSigma=5.0
74# Maximum number of minimize iterations to take when fitting photometry.
75config.maxPhotometrySteps=20
77# Maximum number of minimize iterations to take when fitting photometry.
78config.maxAstrometrySteps=20
80# Padding to add to 4 all edges of the bounding box (pixels)
81config.astrometryRefObjLoader.pixelMargin=300
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=''
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'}
89# Require that the fields needed to correct proper motion (epoch, pm_ra and pm_dec) are present?
90config.astrometryRefObjLoader.requireProperMotion=True
92# Name of the ingested reference dataset
93config.astrometryRefObjLoader.ref_dataset_name='gaia_dr2_20200414'
95# Padding to add to 4 all edges of the bounding box (pixels)
96config.photometryRefObjLoader.pixelMargin=300
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=''
101# Mapping of camera filter name: reference catalog filter name; each reference filter must exist
102config.photometryRefObjLoader.filterMap={}
104# Require that the fields needed to correct proper motion (epoch, pm_ra and pm_dec) are present?
105config.photometryRefObjLoader.requireProperMotion=False
107# Name of the ingested reference dataset
108config.photometryRefObjLoader.ref_dataset_name='sdss-dr9-fink-v5b'
110# Apply flux limit?
111config.sourceSelector['science'].doFluxLimit=False
113# Apply flag limitation?
114config.sourceSelector['science'].doFlags=True
116# Apply unresolved limitation?
117config.sourceSelector['science'].doUnresolved=True
119# Apply signal-to-noise limit?
120config.sourceSelector['science'].doSignalToNoise=True
122# Apply isolated limitation?
123config.sourceSelector['science'].doIsolated=True
125# Select objects with value greater than this
126config.sourceSelector['science'].fluxLimit.minimum=None
128# Select objects with value less than this
129config.sourceSelector['science'].fluxLimit.maximum=None
131# Name of the source flux field to use.
132config.sourceSelector['science'].fluxLimit.fluxField='slot_CalibFlux_instFlux'
134# List of source flag fields that must be set for a source to be used.
135config.sourceSelector['science'].flags.good=[]
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']
140# Select objects with value greater than this
141config.sourceSelector['science'].unresolved.minimum=None
143# Select objects with value less than this
144config.sourceSelector['science'].unresolved.maximum=0.5
146# Name of column for star/galaxy separation
147config.sourceSelector['science'].unresolved.name='base_ClassificationExtendedness_value'
149# Select objects with value greater than this
150config.sourceSelector['science'].signalToNoise.minimum=10.0
152# Select objects with value less than this
153config.sourceSelector['science'].signalToNoise.maximum=None
155# Name of the source flux field to use.
156config.sourceSelector['science'].signalToNoise.fluxField='slot_CalibFlux_instFlux'
158# Name of the source flux error field to use.
159config.sourceSelector['science'].signalToNoise.errField='slot_CalibFlux_instFluxErr'
161# Name of column for parent
162config.sourceSelector['science'].isolated.parentName='parent'
164# Name of column for nChild
165config.sourceSelector['science'].isolated.nChildName='deblend_nChild'
167# Apply magnitude limit?
168config.sourceSelector['references'].doMagLimit=False
170# Apply flag limitation?
171config.sourceSelector['references'].doFlags=False
173# Apply unresolved limitation?
174config.sourceSelector['references'].doUnresolved=False
176# Apply signal-to-noise limit?
177config.sourceSelector['references'].doSignalToNoise=False
179# Apply magnitude error limit?
180config.sourceSelector['references'].doMagError=False
182# Select objects with value greater than this
183config.sourceSelector['references'].magLimit.minimum=None
185# Select objects with value less than this
186config.sourceSelector['references'].magLimit.maximum=None
188# Name of the source flux field to use.
189config.sourceSelector['references'].magLimit.fluxField='flux'
191# List of source flag fields that must be set for a source to be used.
192config.sourceSelector['references'].flags.good=[]
194# List of source flag fields that must NOT be set for a source to be used.
195config.sourceSelector['references'].flags.bad=[]
197# Select objects with value greater than this
198config.sourceSelector['references'].unresolved.minimum=None
200# Select objects with value less than this
201config.sourceSelector['references'].unresolved.maximum=0.5
203# Name of column for star/galaxy separation
204config.sourceSelector['references'].unresolved.name='base_ClassificationExtendedness_value'
206# Select objects with value greater than this
207config.sourceSelector['references'].signalToNoise.minimum=None
209# Select objects with value less than this
210config.sourceSelector['references'].signalToNoise.maximum=None
212# Name of the source flux field to use.
213config.sourceSelector['references'].signalToNoise.fluxField='flux'
215# Name of the source flux error field to use.
216config.sourceSelector['references'].signalToNoise.errField='flux_err'
218# Select objects with value greater than this
219config.sourceSelector['references'].magError.minimum=None
221# Select objects with value less than this
222config.sourceSelector['references'].magError.maximum=None
224# Name of the source flux error field to use.
225config.sourceSelector['references'].magError.magErrField='mag_err'
227config.sourceSelector['references'].colorLimits={}
228# Apply flux limit to Psf Candidate selection?
229config.sourceSelector['objectSize'].doFluxLimit=True
231# specify the minimum psfFlux for good Psf Candidates
232config.sourceSelector['objectSize'].fluxMin=12500.0
234# specify the maximum psfFlux for good Psf Candidates (ignored if == 0)
235config.sourceSelector['objectSize'].fluxMax=0.0
237# Apply signal-to-noise (i.e. flux/fluxErr) limit to Psf Candidate selection?
238config.sourceSelector['objectSize'].doSignalToNoiseLimit=False
240# specify the minimum signal-to-noise for good Psf Candidates
241config.sourceSelector['objectSize'].signalToNoiseMin=20.0
243# specify the maximum signal-to-noise for good Psf Candidates (ignored if == 0)
244config.sourceSelector['objectSize'].signalToNoiseMax=0.0
246# minimum width to include in histogram
247config.sourceSelector['objectSize'].widthMin=0.0
249# maximum width to include in histogram
250config.sourceSelector['objectSize'].widthMax=10.0
252# Name of field in Source to use for flux measurement
253config.sourceSelector['objectSize'].sourceFluxField='base_GaussianFlux_instFlux'
255# Standard deviation of width allowed to be interpreted as good stars
256config.sourceSelector['objectSize'].widthStdAllowed=0.15
258# Keep objects within this many sigma of cluster 0's median
259config.sourceSelector['objectSize'].nSigmaClip=2.0
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']
264# Name of a flag field that is True for Sources that should be used.
265config.sourceSelector['flagged'].field='calib_psf_used'
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']
270# Type of source flux; typically one of Ap or Psf
271config.sourceSelector['astrometry'].sourceFluxType='Calib'
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
276# Type of source flux; typically one of Ap or Psf
277config.sourceSelector['matcher'].sourceFluxType='Ap'
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
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
285config.sourceSelector.name='astrometry'
286# Apply magnitude limit?
287config.astrometryReferenceSelector.doMagLimit=False
289# Apply flag limitation?
290config.astrometryReferenceSelector.doFlags=False
292# Apply unresolved limitation?
293config.astrometryReferenceSelector.doUnresolved=False
295# Apply signal-to-noise limit?
296config.astrometryReferenceSelector.doSignalToNoise=False
298# Apply magnitude error limit?
299config.astrometryReferenceSelector.doMagError=False
301# Select objects with value greater than this
302config.astrometryReferenceSelector.magLimit.minimum=None
304# Select objects with value less than this
305config.astrometryReferenceSelector.magLimit.maximum=None
307# Name of the source flux field to use.
308config.astrometryReferenceSelector.magLimit.fluxField='flux'
310# List of source flag fields that must be set for a source to be used.
311config.astrometryReferenceSelector.flags.good=[]
313# List of source flag fields that must NOT be set for a source to be used.
314config.astrometryReferenceSelector.flags.bad=[]
316# Select objects with value greater than this
317config.astrometryReferenceSelector.unresolved.minimum=None
319# Select objects with value less than this
320config.astrometryReferenceSelector.unresolved.maximum=0.5
322# Name of column for star/galaxy separation
323config.astrometryReferenceSelector.unresolved.name='base_ClassificationExtendedness_value'
325# Select objects with value greater than this
326config.astrometryReferenceSelector.signalToNoise.minimum=None
328# Select objects with value less than this
329config.astrometryReferenceSelector.signalToNoise.maximum=None
331# Name of the source flux field to use.
332config.astrometryReferenceSelector.signalToNoise.fluxField='flux'
334# Name of the source flux error field to use.
335config.astrometryReferenceSelector.signalToNoise.errField='flux_err'
337# Select objects with value greater than this
338config.astrometryReferenceSelector.magError.minimum=None
340# Select objects with value less than this
341config.astrometryReferenceSelector.magError.maximum=None
343# Name of the source flux error field to use.
344config.astrometryReferenceSelector.magError.magErrField='mag_err'
346config.astrometryReferenceSelector.colorLimits={}
347# Apply magnitude limit?
348config.photometryReferenceSelector.doMagLimit=False
350# Apply flag limitation?
351config.photometryReferenceSelector.doFlags=False
353# Apply unresolved limitation?
354config.photometryReferenceSelector.doUnresolved=False
356# Apply signal-to-noise limit?
357config.photometryReferenceSelector.doSignalToNoise=False
359# Apply magnitude error limit?
360config.photometryReferenceSelector.doMagError=False
362# Select objects with value greater than this
363config.photometryReferenceSelector.magLimit.minimum=None
365# Select objects with value less than this
366config.photometryReferenceSelector.magLimit.maximum=None
368# Name of the source flux field to use.
369config.photometryReferenceSelector.magLimit.fluxField='flux'
371# List of source flag fields that must be set for a source to be used.
372config.photometryReferenceSelector.flags.good=[]
374# List of source flag fields that must NOT be set for a source to be used.
375config.photometryReferenceSelector.flags.bad=[]
377# Select objects with value greater than this
378config.photometryReferenceSelector.unresolved.minimum=None
380# Select objects with value less than this
381config.photometryReferenceSelector.unresolved.maximum=0.5
383# Name of column for star/galaxy separation
384config.photometryReferenceSelector.unresolved.name='base_ClassificationExtendedness_value'
386# Select objects with value greater than this
387config.photometryReferenceSelector.signalToNoise.minimum=None
389# Select objects with value less than this
390config.photometryReferenceSelector.signalToNoise.maximum=None
392# Name of the source flux field to use.
393config.photometryReferenceSelector.signalToNoise.fluxField='flux'
395# Name of the source flux error field to use.
396config.photometryReferenceSelector.signalToNoise.errField='flux_err'
398# Select objects with value greater than this
399config.photometryReferenceSelector.magError.minimum=None
401# Select objects with value less than this
402config.photometryReferenceSelector.magError.maximum=None
404# Name of the source flux error field to use.
405config.photometryReferenceSelector.magError.magErrField='mag_err'
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
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
414# Write .csv files containing the contributions to chi2 for the initialization and final fit.
415config.writeChi2FilesInitialFinal=False
417# Write .csv files containing the contributions to chi2 for the outer fit loop.
418config.writeChi2FilesOuterLoop=False
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
423# Path to write debug output files to. Used by `writeInitialModel`, `writeChi2Files*`, `writeInitMatrix`.
424config.debugOutputPath='.'
426# Source flux field to use in source selection and to get fluxes from the catalog.
427config.sourceFluxType='Calib'