pprice@tiger-sumire:~/LSST/pipe/drivers (tickets/DM-9055=) $ git sub-patch
|
commit b38869003ba584709576bf4eee1b42777ae6e703
|
Author: Paul Price <price@astro.princeton.edu>
|
Date: Thu Jan 19 17:40:15 2017 -0500
|
|
DarkCombineTask: fix setting of metadata
|
|
DM-8913 changed DarkCombineTask to use VisitInfo, but this assumed
|
that the combined variable is an Exposure, but it's actually a
|
DecoratedImage, which broke the dark creation. Fixed by using a
|
different means to get the metadata in.
|
|
diff --git a/python/lsst/pipe/drivers/constructCalibs.py b/python/lsst/pipe/drivers/constructCalibs.py
|
index efea8fc..806f0ae 100644
|
--- a/python/lsst/pipe/drivers/constructCalibs.py
|
+++ b/python/lsst/pipe/drivers/constructCalibs.py
|
@@ -649,7 +649,12 @@ class DarkCombineTask(CalibCombineTask):
|
"""Task to combine dark images"""
|
def run(*args, **kwargs):
|
combined = CalibCombineTask.run(*args, **kwargs)
|
- combined.getInfo().setVisitInfo(afwImage.makeVisitInfo(exposureTime=1.0, darkTime=1.0))
|
+
|
+ # Update the metadata
|
+ visitInfo = afwImage.makeVisitInfo(exposureTime=1.0, darkTime=1.0)
|
+ md = dafBase.PropertyList.cast(combined.getMetadata())
|
+ afwImage.setVisitInfoMetadata(md, visitInfo)
|
+
|
return combined
|
|
class DarkConfig(CalibConfig):
|
|
|
pprice@tiger-sumire:~/LSST/obs/subaru (tickets/DM-9055=) $ git sub-patch
|
commit 8c5efb3b7f89394382a97002c66381016c62f481
|
Author: Paul Price <price@astro.princeton.edu>
|
Date: Thu Jan 19 17:42:04 2017 -0500
|
|
config: adapt to removal of DarkConfig
|
|
Darktime now comes from the VisitInfo rather than a header
|
keyword.
|
|
diff --git a/config/hsc/dark.py b/config/hsc/dark.py
|
index 2da1bb6..e13408b 100644
|
--- a/config/hsc/dark.py
|
+++ b/config/hsc/dark.py
|
@@ -4,8 +4,6 @@ from lsst.utils import getPackageDir
|
|
config.load(os.path.join(getPackageDir("obs_subaru"), "config", "hsc", "isr.py"))
|
|
-config.darkTime = None
|
-
|
config.isr.doBias = True
|
config.repair.cosmicray.nCrPixelMax = 1000000
|
config.repair.cosmicray.minSigma = 5.0
|
John Swinbank, would you please review this fix?
pprice@tiger-sumire:~/LSST/pipe/drivers (tickets/DM-9055=) $ git sub-patch
commit b38869003ba584709576bf4eee1b42777ae6e703
Author: Paul Price <price@astro.princeton.edu>
Date: Thu Jan 19 17:40:15 2017 -0500
DarkCombineTask: fix setting of metadata
DM-8913 changed DarkCombineTask to use VisitInfo, but this assumed
that the combined variable is an Exposure, but it's actually a
DecoratedImage, which broke the dark creation. Fixed by using a
different means to get the metadata in.
diff --git a/python/lsst/pipe/drivers/constructCalibs.py b/python/lsst/pipe/drivers/constructCalibs.py
index efea8fc..806f0ae 100644
--- a/python/lsst/pipe/drivers/constructCalibs.py
+++ b/python/lsst/pipe/drivers/constructCalibs.py
@@ -649,7 +649,12 @@ class DarkCombineTask(CalibCombineTask):
"""Task to combine dark images"""
def run(*args, **kwargs):
combined = CalibCombineTask.run(*args, **kwargs)
- combined.getInfo().setVisitInfo(afwImage.makeVisitInfo(exposureTime=1.0, darkTime=1.0))
+
+ # Update the metadata
+ visitInfo = afwImage.makeVisitInfo(exposureTime=1.0, darkTime=1.0)
+ md = dafBase.PropertyList.cast(combined.getMetadata())
+ afwImage.setVisitInfoMetadata(md, visitInfo)
+
return combined
class DarkConfig(CalibConfig):
pprice@tiger-sumire:~/LSST/obs/subaru (tickets/DM-9055=) $ git sub-patch
commit 8c5efb3b7f89394382a97002c66381016c62f481
Author: Paul Price <price@astro.princeton.edu>
Date: Thu Jan 19 17:42:04 2017 -0500
config: adapt to removal of DarkConfig
Darktime now comes from the VisitInfo rather than a header
keyword.
diff --git a/config/hsc/dark.py b/config/hsc/dark.py
index 2da1bb6..e13408b 100644
--- a/config/hsc/dark.py
+++ b/config/hsc/dark.py
@@ -4,8 +4,6 @@ from lsst.utils import getPackageDir
config.load(os.path.join(getPackageDir("obs_subaru"), "config", "hsc", "isr.py"))
-config.darkTime = None
-
config.isr.doBias = True
config.repair.cosmicray.nCrPixelMax = 1000000
config.repair.cosmicray.minSigma = 5.0