Skip to content

Commit 01cc349

Browse files
committed
Switch to calibrateImage outputs by default
The "calexp" name is being phased out everywhere: replace it with a more appropriate term in packageAlerts and docs.
1 parent 1823213 commit 01cc349

File tree

4 files changed

+17
-17
lines changed

4 files changed

+17
-17
lines changed

python/lsst/ap/association/diaForcedSource.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -198,11 +198,11 @@ def _calibrate_and_merge(self,
198198
diff_sources : `lsst.afw.table.SourceTable`
199199
Catalog with PsFluxes measured on the difference image.
200200
direct_sources : `lsst.afw.table.SourceTable`
201-
Catalog with PsfFluxes measured on the direct (calexp) image.
201+
Catalog with PsfFluxes measured on the direct (science) image.
202202
diff_exp : `lsst.afw.image.Exposure`
203203
Difference exposure ``diff_sources`` were measured on.
204204
direct_exp : `lsst.afw.image.Exposure`
205-
Direct (calexp) exposure ``direct_sources`` were measured on.
205+
Direct (science) exposure ``direct_sources`` were measured on.
206206
207207
Returns
208208
-------

python/lsst/ap/association/diaPipe.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ class DiaPipelineConnections(
8181
exposure = connTypes.Input(
8282
doc="Calibrated exposure differenced with a template image during "
8383
"image differencing.",
84-
name="{fakesType}calexp",
84+
name="{fakesType}initial_pvi",
8585
storageClass="ExposureF",
8686
dimensions=("instrument", "visit", "detector"),
8787
)

python/lsst/ap/association/packageAlerts.py

+13-13
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ def run(self,
207207
diaSrcHistory,
208208
diaForcedSources,
209209
diffIm,
210-
calexp,
210+
science,
211211
template,
212212
doRunForcedMeasurement=True,
213213
):
@@ -237,7 +237,7 @@ def run(self,
237237
``["diaObjectId"]``
238238
diffIm : `lsst.afw.image.ExposureF`
239239
Difference image the sources in ``diaSourceCat`` were detected in.
240-
calexp : `lsst.afw.image.ExposureF`
240+
science : `lsst.afw.image.ExposureF`
241241
Calexp used to create the ``diffIm``.
242242
template : `lsst.afw.image.ExposureF` or `None`
243243
Template image used to create the ``diffIm``.
@@ -253,10 +253,10 @@ def run(self,
253253
detector = diffIm.detector.getId()
254254
visit = diffIm.visitInfo.id
255255
diffImPhotoCalib = diffIm.getPhotoCalib()
256-
calexpPhotoCalib = calexp.getPhotoCalib()
256+
sciencePhotoCalib = science.getPhotoCalib()
257257
templatePhotoCalib = template.getPhotoCalib()
258258
diffImPsf = self._computePsf(diffIm, diffIm.psf.getAveragePosition())
259-
sciencePsf = self._computePsf(calexp, calexp.psf.getAveragePosition())
259+
sciencePsf = self._computePsf(science, science.psf.getAveragePosition())
260260
templatePsf = self._computePsf(template, template.psf.getAveragePosition())
261261

262262
n_sources = len(diaSourceCat)
@@ -296,12 +296,12 @@ def run(self,
296296
diffImPhotoCalib,
297297
diaSource["diaSourceId"],
298298
averagePsf=diffImPsf)
299-
calexpCutout = self.createCcdDataCutout(
300-
calexp,
299+
scienceCutout = self.createCcdDataCutout(
300+
science,
301301
sphPoint,
302302
pixelPoint,
303303
cutoutExtent,
304-
calexpPhotoCalib,
304+
sciencePhotoCalib,
305305
diaSource["diaSourceId"],
306306
averagePsf=sciencePsf)
307307
templateCutout = self.createCcdDataCutout(
@@ -322,7 +322,7 @@ def run(self,
322322
objSourceHistory,
323323
objDiaForcedSources,
324324
diffImCutout,
325-
calexpCutout,
325+
scienceCutout,
326326
templateCutout))
327327

328328
if self.config.doProduceAlerts:
@@ -524,7 +524,7 @@ def makeAlertDict(self,
524524
objDiaSrcHistory,
525525
objDiaForcedSources,
526526
diffImCutout,
527-
calexpCutout,
527+
scienceCutout,
528528
templateCutout):
529529
"""Convert data and package into a dictionary alert.
530530
@@ -541,8 +541,8 @@ def makeAlertDict(self,
541541
diffImCutout : `astropy.nddata.CCDData` or `None`
542542
Cutout of the difference image around the location of ``diaSource``
543543
with a min size set by the ``cutoutSize`` configurable.
544-
calexpCutout : `astropy.nddata.CCDData` or `None`
545-
Cutout of the calexp around the location of ``diaSource``
544+
scienceCutout : `astropy.nddata.CCDData` or `None`
545+
Cutout of the science image around the location of ``diaSource``
546546
with a min size set by the ``cutoutSize`` configurable.
547547
templateCutout : `astropy.nddata.CCDData` or `None`
548548
Cutout of the template image around the location of ``diaSource``
@@ -572,10 +572,10 @@ def makeAlertDict(self,
572572
else:
573573
alert['cutoutDifference'] = self.streamCcdDataToBytes(diffImCutout)
574574

575-
if calexpCutout is None:
575+
if scienceCutout is None:
576576
alert['cutoutScience'] = None
577577
else:
578-
alert['cutoutScience'] = self.streamCcdDataToBytes(calexpCutout)
578+
alert['cutoutScience'] = self.streamCcdDataToBytes(scienceCutout)
579579

580580
if templateCutout is None:
581581
alert["cutoutTemplate"] = None

tests/test_diaForcedSource.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ def setUp(self):
153153

154154
self.testDiaObjects = create_test_dia_objects(5, self.wcs)
155155
# Add additional diaObjects that are outside of the above difference
156-
# and calexp visit images.
156+
# and science visit images.
157157
objects = [
158158
(10000000, self.wcs.pixelToSky(-100000, -100000)), # xy outside
159159
(10000001, self.wcs.pixelToSky(100, -100000)), # y outside

0 commit comments

Comments
 (0)