Skip to content

Commit 17b95fa

Browse files
committed
Update CalibrateImageTask configs and functor transformation.
1 parent 20cf614 commit 17b95fa

File tree

2 files changed

+202
-11
lines changed

2 files changed

+202
-11
lines changed

pipelines/_ingredients/cpIlluminationCorrectionLSST.yaml

+13-11
Original file line numberDiff line numberDiff line change
@@ -14,35 +14,26 @@ tasks:
1414
connections.exposure: calexp
1515
connections.background: calexpBackground
1616
python: |
17-
# TODO[DM-47320]: make output catalog as similar to the old 'src' as
18-
# possible; we'll try to go back to calibrateImage defaults with a
19-
# smaller catalog after it's integrated.
20-
# Goal is to remove all of these overrides except the aperture radii,
21-
# which we instead want to set to the same as the compensated tophat
22-
# radii below for lsst.fgcmcal.fgcmOutputProducts.FgcmOutputProductsTask
2317
config.star_detection.includeThresholdMultiplier = 1.0
2418
config.star_selector["science"].doUnresolved = False
2519
config.star_selector["science"].doSignalToNoise = False
2620
config.star_measurement.plugins["base_CircularApertureFlux"].radii = [
27-
3.0, 6.0, 9.0, 12.0, 17.0, 25.0, 35.0, 50.0, 70.0
21+
12.0, 17.0, 35.0, 50.0,
2822
]
2923
config.star_measurement.plugins.names |= [
3024
"base_Variance",
31-
"ext_shapeHSM_HsmPsfMomentsDebiased",
32-
"ext_shapeHSM_HsmShapeRegauss",
3325
"base_Blendedness",
3426
"base_Jacobian",
3527
]
3628
3729
# fgcmcal needs an inner and outer aperture.
3830
config.star_measurement.plugins["base_CircularApertureFlux"].maxSincRadius = 12.0
3931
config.star_measurement.plugins["base_CompensatedTophatFlux"].apertures = [12, 17]
40-
config.star_measurement.plugins.names |= ["base_LocalBackground"]
4132
4233
cpIlluminationCorrectionTransformPreSourceTable:
4334
class: lsst.pipe.tasks.postprocess.TransformSourceTableTask
4435
config:
45-
functorFile: $PIPE_TASKS_DIR/schemas/PreSource.yaml
36+
functorFile: $CP_PIPE_DIR/schemas/PreSourceIlluminationCorrection.yaml
4637
connections.inputCatalog: preSource
4738
connections.outputCatalog: preSourceTable
4839
cpIlluminationCorrectionConsolidatePreSourceTable:
@@ -55,6 +46,17 @@ tasks:
5546
class: lsst.pipe.tasks.isolatedStarAssociation.IsolatedStarAssociationTask
5647
config:
5748
connections.source_table_visit: preSourceTable_visit
49+
python: |
50+
config.extra_columns = [
51+
"x",
52+
"y",
53+
"apFlux_12_0_instFlux",
54+
"apFlux_12_0_instFluxErr",
55+
"apFlux_12_0_flag",
56+
"apFlux_17_0_instFlux",
57+
"apFlux_17_0_instFluxErr",
58+
"apFlux_17_0_flag",
59+
]
5860
cpIlluminationCorrectionFgcmBuildFromIsolatedStars:
5961
class: lsst.fgcmcal.fgcmBuildFromIsolatedStars.FgcmBuildFromIsolatedStarsTask
6062
cpIlluminationCorrectionFgcmFitCycle:
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,189 @@
1+
# This file defines the mapping between the columns in a single visit+detector
2+
# source table and their respective DPDD-style column names, as used by
3+
# `lsst.pipe.tasks.postprocess.TransformSourceTableTask`.
4+
# See the DPDD for more information about the output: https://lse-163.lsst.io
5+
funcs:
6+
sourceId:
7+
functor: Column
8+
args: id
9+
coord_ra:
10+
# reference position required by db. Not in DPDD
11+
functor: CoordColumn
12+
args: coord_ra
13+
coord_dec:
14+
# Reference position required by db. Not in DPDD
15+
functor: CoordColumn
16+
args: coord_dec
17+
parentSourceId:
18+
functor: Column
19+
args: parent
20+
x:
21+
functor: Column
22+
args: slot_Centroid_x
23+
y:
24+
functor: Column
25+
args: slot_Centroid_y
26+
xErr:
27+
functor: Column
28+
args: slot_Centroid_xErr
29+
yErr:
30+
functor: Column
31+
args: slot_Centroid_yErr
32+
ra:
33+
functor: RAColumn
34+
dec:
35+
functor: DecColumn
36+
raErr:
37+
functor: RAErrColumn
38+
decErr:
39+
functor: DecErrColumn
40+
ra_dec_Cov:
41+
functor: RADecCovColumn
42+
psfFlux:
43+
functor: Column
44+
args:
45+
- slot_PsfFlux_flux
46+
psfFluxErr:
47+
functor: Column
48+
args:
49+
- slot_PsfFlux_fluxErr
50+
51+
ixx:
52+
functor: Column
53+
args: slot_Shape_xx
54+
iyy:
55+
functor: Column
56+
args: slot_Shape_yy
57+
ixy:
58+
functor: Column
59+
args: slot_Shape_xy
60+
# DPDD should include Psf Shape
61+
ixxPSF:
62+
functor: Column
63+
args: slot_PsfShape_xx
64+
iyyPSF:
65+
functor: Column
66+
args: slot_PsfShape_yy
67+
ixyPSF:
68+
functor: Column
69+
args: slot_PsfShape_xy
70+
# DPDD does not include gaussianFluxes, however they are used for
71+
# the single frame extendedness column which is used for QA.
72+
gaussianFlux:
73+
functor: Column
74+
args:
75+
- base_GaussianFlux_flux
76+
gaussianFluxErr:
77+
functor: Column
78+
args:
79+
- base_GaussianFlux_fluxErr
80+
extendedness:
81+
functor: Column
82+
args: base_ClassificationExtendedness_value
83+
sizeExtendedness:
84+
functor: Column
85+
args: base_ClassificationSizeExtendedness_value
86+
flags:
87+
- base_Blendedness_abs
88+
- base_Blendedness_flag
89+
- base_Blendedness_flag_noCentroid
90+
- base_Blendedness_flag_noShape
91+
- base_CircularApertureFlux_12_0_flag
92+
- base_CircularApertureFlux_12_0_flag_apertureTruncated
93+
- base_CircularApertureFlux_12_0_flag_sincCoeffsTruncated
94+
- base_CircularApertureFlux_12_0_instFlux
95+
- base_CircularApertureFlux_12_0_instFluxErr
96+
- base_CircularApertureFlux_17_0_flag
97+
- base_CircularApertureFlux_17_0_instFlux
98+
- base_CircularApertureFlux_17_0_instFluxErr
99+
- base_CircularApertureFlux_35_0_flag
100+
- base_CircularApertureFlux_35_0_instFlux
101+
- base_CircularApertureFlux_35_0_instFluxErr
102+
- base_CircularApertureFlux_50_0_flag
103+
- base_CircularApertureFlux_50_0_instFlux
104+
- base_CircularApertureFlux_50_0_instFluxErr
105+
- base_NormalizedCompensatedTophatFlux_flag
106+
- base_NormalizedCompensatedTophatFlux_instFlux
107+
- base_NormalizedCompensatedTophatFlux_instFluxErr
108+
- base_ClassificationExtendedness_flag
109+
- base_ClassificationSizeExtendedness_flag
110+
- base_FootprintArea_value
111+
- base_InvalidPsf_flag
112+
- base_Jacobian_flag
113+
- base_Jacobian_value
114+
- base_PixelFlags_flag_bad
115+
- base_PixelFlags_flag_cr
116+
- base_PixelFlags_flag_crCenter
117+
- base_PixelFlags_flag_edge
118+
- base_PixelFlags_flag_interpolated
119+
- base_PixelFlags_flag_interpolatedCenter
120+
- base_PixelFlags_flag_offimage
121+
- base_PixelFlags_flag_saturated
122+
- base_PixelFlags_flag_saturatedCenter
123+
- base_PixelFlags_flag_suspect
124+
- base_PixelFlags_flag_suspectCenter
125+
- base_PsfFlux_apCorr
126+
- base_PsfFlux_apCorrErr
127+
- base_PsfFlux_area
128+
- base_PsfFlux_flag
129+
- base_PsfFlux_flag_apCorr
130+
- base_PsfFlux_flag_edge
131+
- base_PsfFlux_flag_noGoodPixels
132+
- base_GaussianFlux_flag
133+
- base_SdssCentroid_flag
134+
- base_SdssCentroid_flag_almostNoSecondDerivative
135+
- base_SdssCentroid_flag_badError
136+
- base_SdssCentroid_flag_edge
137+
- base_SdssCentroid_flag_noSecondDerivative
138+
- base_SdssCentroid_flag_notAtMaximum
139+
- base_SdssCentroid_flag_resetToPeak
140+
- base_Variance_flag
141+
- base_Variance_flag_emptyFootprint
142+
- base_Variance_value
143+
- calib_astrometry_used
144+
- calib_photometry_reserved
145+
- calib_photometry_used
146+
- calib_psf_candidate
147+
- calib_psf_reserved
148+
- calib_psf_used
149+
- deblend_deblendedAsPsf
150+
- deblend_hasStrayFlux
151+
- deblend_masked
152+
- deblend_nChild
153+
- deblend_parentTooBig
154+
- deblend_patchedTemplate
155+
- deblend_rampedTemplate
156+
- deblend_skipped
157+
- deblend_tooManyPeaks
158+
- ext_shapeHSM_HsmPsfMoments_flag
159+
- ext_shapeHSM_HsmPsfMoments_flag_no_pixels
160+
- ext_shapeHSM_HsmPsfMoments_flag_not_contained
161+
- ext_shapeHSM_HsmPsfMoments_flag_parent_source
162+
- sky_source
163+
- detect_isPrimary
164+
165+
flag_rename_rules:
166+
# Taken from db-meas-forced
167+
- ['ext_photometryKron_', '']
168+
- ['base_Blendedness', 'base_blendedness']
169+
- ['base_Local', 'local']
170+
- ['base_PixelFlags_flag', 'pixelFlags']
171+
- ['base_ClassificationE', 'e']
172+
- ['base_ClassificationS', 's']
173+
- ['base_SdssCentroid', 'centroid']
174+
- ['base_Variance', 'variance']
175+
- ['base_Psf', 'psf']
176+
- ['base_InvalidPsf_flag', 'invalidPsfFlag']
177+
- ['base_GaussianFlux', 'gaussianFlux']
178+
- ['base_CircularApertureFlux', 'apFlux']
179+
- ['base_NormalizedCompensatedTophatFlux', 'normCompTophatFlux']
180+
- ['base_FootprintArea', 'footprintArea']
181+
- ['base_Jacobian', 'jacobian']
182+
- ['ext_shapeHSM_HsmPsfMomentsDebiased', 'iDebiasedPSF']
183+
- ['ext_shapeHSM_Hsm', 'hsm']
184+
- ['ext_convolved_', '']
185+
- ['undeblended_base', 'undeblended']
186+
- ['undeblended_ext_photometryKron', 'undeblended']
187+
- ['ext_photometryKron_', '']
188+
- ['base_', '']
189+
- ['slot_', '']

0 commit comments

Comments
 (0)