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.flaggedSourceSelector
4import lsst.meas.algorithms.matcherSourceSelector
5import lsst.pipe.tasks.colorterms
6import lsst.meas.algorithms.astrometrySourceSelector
7import lsst.meas.algorithms.loadIndexedReferenceObjects
8import lsst.meas.algorithms.objectSizeStarSelector
9import lsst.meas.algorithms.sourceSelector
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# 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'
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={}
92# Require that the fields needed to correct proper motion (epoch, pm_ra and pm_dec) are present?
93config.astrometryRefObjLoader.requireProperMotion=True
95# Name of the ingested reference dataset
96config.astrometryRefObjLoader.ref_dataset_name='gaia_dr2_20200414'
98# Padding to add to 4 all edges of the bounding box (pixels)
99config.photometryRefObjLoader.pixelMargin=300
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=''
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
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={}
110# Require that the fields needed to correct proper motion (epoch, pm_ra and pm_dec) are present?
111config.photometryRefObjLoader.requireProperMotion=False
113# Name of the ingested reference dataset
114config.photometryRefObjLoader.ref_dataset_name='sdss-dr9-fink-v5b'
116# Apply flux limit?
117config.sourceSelector['science'].doFluxLimit=False
119# Apply flag limitation?
120config.sourceSelector['science'].doFlags=True
122# Apply unresolved limitation?
123config.sourceSelector['science'].doUnresolved=True
125# Apply signal-to-noise limit?
126config.sourceSelector['science'].doSignalToNoise=True
128# Apply isolated limitation?
129config.sourceSelector['science'].doIsolated=True
131# Select objects with value greater than this
132config.sourceSelector['science'].fluxLimit.minimum=None
134# Select objects with value less than this
135config.sourceSelector['science'].fluxLimit.maximum=None
137# Name of the source flux field to use.
138config.sourceSelector['science'].fluxLimit.fluxField='slot_CalibFlux_instFlux'
140# List of source flag fields that must be set for a source to be used.
141config.sourceSelector['science'].flags.good=[]
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']
146# Select objects with value greater than this
147config.sourceSelector['science'].unresolved.minimum=None
149# Select objects with value less than this
150config.sourceSelector['science'].unresolved.maximum=0.5
152# Name of column for star/galaxy separation
153config.sourceSelector['science'].unresolved.name='base_ClassificationExtendedness_value'
155# Select objects with value greater than this
156config.sourceSelector['science'].signalToNoise.minimum=10.0
158# Select objects with value less than this
159config.sourceSelector['science'].signalToNoise.maximum=None
161# Name of the source flux field to use.
162config.sourceSelector['science'].signalToNoise.fluxField='slot_CalibFlux_instFlux'
164# Name of the source flux error field to use.
165config.sourceSelector['science'].signalToNoise.errField='slot_CalibFlux_instFluxErr'
167# Name of column for parent
168config.sourceSelector['science'].isolated.parentName='parent'
170# Name of column for nChild
171config.sourceSelector['science'].isolated.nChildName='deblend_nChild'
173# Apply magnitude limit?
174config.sourceSelector['references'].doMagLimit=False
176# Apply flag limitation?
177config.sourceSelector['references'].doFlags=False
179# Apply unresolved limitation?
180config.sourceSelector['references'].doUnresolved=False
182# Apply signal-to-noise limit?
183config.sourceSelector['references'].doSignalToNoise=False
185# Apply magnitude error limit?
186config.sourceSelector['references'].doMagError=False
188# Select objects with value greater than this
189config.sourceSelector['references'].magLimit.minimum=None
191# Select objects with value less than this
192config.sourceSelector['references'].magLimit.maximum=None
194# Name of the source flux field to use.
195config.sourceSelector['references'].magLimit.fluxField='flux'
197# List of source flag fields that must be set for a source to be used.
198config.sourceSelector['references'].flags.good=[]
200# List of source flag fields that must NOT be set for a source to be used.
201config.sourceSelector['references'].flags.bad=[]
203# Select objects with value greater than this
204config.sourceSelector['references'].unresolved.minimum=None
206# Select objects with value less than this
207config.sourceSelector['references'].unresolved.maximum=0.5
209# Name of column for star/galaxy separation
210config.sourceSelector['references'].unresolved.name='base_ClassificationExtendedness_value'
212# Select objects with value greater than this
213config.sourceSelector['references'].signalToNoise.minimum=None
215# Select objects with value less than this
216config.sourceSelector['references'].signalToNoise.maximum=None
218# Name of the source flux field to use.
219config.sourceSelector['references'].signalToNoise.fluxField='flux'
221# Name of the source flux error field to use.
222config.sourceSelector['references'].signalToNoise.errField='flux_err'
224# Select objects with value greater than this
225config.sourceSelector['references'].magError.minimum=None
227# Select objects with value less than this
228config.sourceSelector['references'].magError.maximum=None
230# Name of the source flux error field to use.
231config.sourceSelector['references'].magError.magErrField='mag_err'
233config.sourceSelector['references'].colorLimits={}
234# Apply flux limit to Psf Candidate selection?
235config.sourceSelector['objectSize'].doFluxLimit=True
237# specify the minimum psfFlux for good Psf Candidates
238config.sourceSelector['objectSize'].fluxMin=12500.0
240# specify the maximum psfFlux for good Psf Candidates (ignored if == 0)
241config.sourceSelector['objectSize'].fluxMax=0.0
243# Apply signal-to-noise (i.e. flux/fluxErr) limit to Psf Candidate selection?
244config.sourceSelector['objectSize'].doSignalToNoiseLimit=False
246# specify the minimum signal-to-noise for good Psf Candidates
247config.sourceSelector['objectSize'].signalToNoiseMin=20.0
249# specify the maximum signal-to-noise for good Psf Candidates (ignored if == 0)
250config.sourceSelector['objectSize'].signalToNoiseMax=0.0
252# minimum width to include in histogram
253config.sourceSelector['objectSize'].widthMin=0.0
255# maximum width to include in histogram
256config.sourceSelector['objectSize'].widthMax=10.0
258# Name of field in Source to use for flux measurement
259config.sourceSelector['objectSize'].sourceFluxField='base_GaussianFlux_instFlux'
261# Standard deviation of width allowed to be interpreted as good stars
262config.sourceSelector['objectSize'].widthStdAllowed=0.15
264# Keep objects within this many sigma of cluster 0's median
265config.sourceSelector['objectSize'].nSigmaClip=2.0
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']
270# Name of a flag field that is True for Sources that should be used.
271config.sourceSelector['flagged'].field='calib_psf_used'
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']
276# Type of source flux; typically one of Ap or Psf
277config.sourceSelector['astrometry'].sourceFluxType='Calib'
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
282# Type of source flux; typically one of Ap or Psf
283config.sourceSelector['matcher'].sourceFluxType='Ap'
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
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
291config.sourceSelector.name='astrometry'
292# Apply magnitude limit?
293config.astrometryReferenceSelector.doMagLimit=False
295# Apply flag limitation?
296config.astrometryReferenceSelector.doFlags=False
298# Apply unresolved limitation?
299config.astrometryReferenceSelector.doUnresolved=False
301# Apply signal-to-noise limit?
302config.astrometryReferenceSelector.doSignalToNoise=False
304# Apply magnitude error limit?
305config.astrometryReferenceSelector.doMagError=False
307# Select objects with value greater than this
308config.astrometryReferenceSelector.magLimit.minimum=None
310# Select objects with value less than this
311config.astrometryReferenceSelector.magLimit.maximum=None
313# Name of the source flux field to use.
314config.astrometryReferenceSelector.magLimit.fluxField='flux'
316# List of source flag fields that must be set for a source to be used.
317config.astrometryReferenceSelector.flags.good=[]
319# List of source flag fields that must NOT be set for a source to be used.
320config.astrometryReferenceSelector.flags.bad=[]
322# Select objects with value greater than this
323config.astrometryReferenceSelector.unresolved.minimum=None
325# Select objects with value less than this
326config.astrometryReferenceSelector.unresolved.maximum=0.5
328# Name of column for star/galaxy separation
329config.astrometryReferenceSelector.unresolved.name='base_ClassificationExtendedness_value'
331# Select objects with value greater than this
332config.astrometryReferenceSelector.signalToNoise.minimum=None
334# Select objects with value less than this
335config.astrometryReferenceSelector.signalToNoise.maximum=None
337# Name of the source flux field to use.
338config.astrometryReferenceSelector.signalToNoise.fluxField='flux'
340# Name of the source flux error field to use.
341config.astrometryReferenceSelector.signalToNoise.errField='flux_err'
343# Select objects with value greater than this
344config.astrometryReferenceSelector.magError.minimum=None
346# Select objects with value less than this
347config.astrometryReferenceSelector.magError.maximum=None
349# Name of the source flux error field to use.
350config.astrometryReferenceSelector.magError.magErrField='mag_err'
352config.astrometryReferenceSelector.colorLimits={}
353# Apply magnitude limit?
354config.photometryReferenceSelector.doMagLimit=False
356# Apply flag limitation?
357config.photometryReferenceSelector.doFlags=False
359# Apply unresolved limitation?
360config.photometryReferenceSelector.doUnresolved=False
362# Apply signal-to-noise limit?
363config.photometryReferenceSelector.doSignalToNoise=False
365# Apply magnitude error limit?
366config.photometryReferenceSelector.doMagError=False
368# Select objects with value greater than this
369config.photometryReferenceSelector.magLimit.minimum=None
371# Select objects with value less than this
372config.photometryReferenceSelector.magLimit.maximum=None
374# Name of the source flux field to use.
375config.photometryReferenceSelector.magLimit.fluxField='flux'
377# List of source flag fields that must be set for a source to be used.
378config.photometryReferenceSelector.flags.good=[]
380# List of source flag fields that must NOT be set for a source to be used.
381config.photometryReferenceSelector.flags.bad=[]
383# Select objects with value greater than this
384config.photometryReferenceSelector.unresolved.minimum=None
386# Select objects with value less than this
387config.photometryReferenceSelector.unresolved.maximum=0.5
389# Name of column for star/galaxy separation
390config.photometryReferenceSelector.unresolved.name='base_ClassificationExtendedness_value'
392# Select objects with value greater than this
393config.photometryReferenceSelector.signalToNoise.minimum=None
395# Select objects with value less than this
396config.photometryReferenceSelector.signalToNoise.maximum=None
398# Name of the source flux field to use.
399config.photometryReferenceSelector.signalToNoise.fluxField='flux'
401# Name of the source flux error field to use.
402config.photometryReferenceSelector.signalToNoise.errField='flux_err'
404# Select objects with value greater than this
405config.photometryReferenceSelector.magError.minimum=None
407# Select objects with value less than this
408config.photometryReferenceSelector.magError.maximum=None
410# Name of the source flux error field to use.
411config.photometryReferenceSelector.magError.magErrField='mag_err'
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
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
420# Write .csv files containing the contributions to chi2 for the initialization and final fit.
421config.writeChi2FilesInitialFinal=False
423# Write .csv files containing the contributions to chi2 for the outer fit loop.
424config.writeChi2FilesOuterLoop=False
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
429# Path to write debug output files to. Used by `writeInitialModel`, `writeChi2Files*`, `writeInitMatrix`.
430config.debugOutputPath='.'
432# Source flux field to use in source selection and to get fluxes from the catalog.
433config.sourceFluxType='Calib'