makeCoaddTempExp with external photocalib and skywcs

Hello, I want to do coaddition for HSC data using jointcal calibration. This is the command line I am using: makeCoaddTempExp.py /sps/lsst/HSC/Manal/hsc_output --rerun NameExternalPhotocalibSkyexterne --selectId filter=HSC-Z --id filter=HSC-Z tract=9812 patch=1,1^1,2^2,3 --config doApplyExternalPhotoCalib=True doApplyExternalSkyWcs=True
as a test with a few patches. I got the error:

makeCoaddTempExp FATAL: Failed on dataId=DataId(initialdata={'filter': 'HSC-Z', 'tract': 9812, 'patch': '2,3'}, tag=set()): NoResults: No locations for get: datasetType:skyCorr dataId:DataId(initialdata={'filter': 'HSC-Z', 'pointing': 817, 'visit': 1174, 'ccd': 37, 'field': 'SSP_UDEEP_COSMOS', 'dateObs': '2014-03-28', 'taiObs': '2014-03-28', 'expTime': 270.0, 'tract': 9812}, tag=set())
Traceback (most recent call last):
  File "/cvmfs/sw.lsst.eu/linux-x86_64/lsst_distrib/w_2020_10/stack/miniconda3-4.7.12-984c9f7/Linux64/pipe_base/19.0.0-10-ged17d6e+2/python/lsst/pipe/base/cmdLineTask.py", line 388, in __call__
    result = self.runTask(task, dataRef, kwargs)
  File "/cvmfs/sw.lsst.eu/linux-x86_64/lsst_distrib/w_2020_10/stack/miniconda3-4.7.12-984c9f7/Linux64/pipe_base/19.0.0-10-ged17d6e+2/python/lsst/pipe/base/cmdLineTask.py", line 447, in runTask
    return task.runDataRef(dataRef, **kwargs)
  File "/cvmfs/sw.lsst.eu/linux-x86_64/lsst_distrib/w_2020_10/stack/miniconda3-4.7.12-984c9f7/Linux64/pipe_base/19.0.0-10-ged17d6e+2/python/lsst/pipe/base/timer.py", line 150, in wrapper
    res = func(self, *args, **keyArgs)
  File "/cvmfs/sw.lsst.eu/linux-x86_64/lsst_distrib/w_2020_10/stack/miniconda3-4.7.12-984c9f7/Linux64/pipe_tasks/19.0.0-29-g47457369+2/python/lsst/pipe/tasks/makeCoaddTempExp.py", line 361, in runDataRef
    self.applySkyCorr(calExpRef, calExp)
  File "/cvmfs/sw.lsst.eu/linux-x86_64/lsst_distrib/w_2020_10/stack/miniconda3-4.7.12-984c9f7/Linux64/pipe_tasks/19.0.0-29-g47457369+2/python/lsst/pipe/tasks/makeCoaddTempExp.py", line 565, in applySkyCorr
    bg = dataRef.get("skyCorr")
  File "/cvmfs/sw.lsst.eu/linux-x86_64/lsst_distrib/w_2020_10/stack/miniconda3-4.7.12-984c9f7/Linux64/daf_persistence/19.0.0-2-gf01c5b1+1/python/lsst/daf/persistence/butlerSubset.py", line 203, in get
    return self.butlerSubset.butler.get(datasetType, self.dataId, **rest)
  File "/cvmfs/sw.lsst.eu/linux-x86_64/lsst_distrib/w_2020_10/stack/miniconda3-4.7.12-984c9f7/Linux64/daf_persistence/19.0.0-2-gf01c5b1+1/python/lsst/daf/persistence/butler.py", line 1399, in get
    raise NoResults("No locations for get:", datasetType, dataId)
lsst.daf.persistence.butlerExceptions.NoResults: No locations for get: datasetType:skyCorr dataId:DataId(initialdata={'filter': 'HSC-Z', 'pointing': 817, 'visit': 1174, 'ccd': 37, 'field': 'SSP_UDEEP_COSMOS', 'dateObs': '2014-03-28', 'taiObs': '2014-03-28', 'expTime': 270.0, 'tract': 9812}, tag=set())

Seems that it does not use the output of jointcal. would you please let me know how I can make this command work? Thank you

It’s not looking for jointcal results, it’s looking for the skyCorr. That’s the result of running skyCorrection.py.

Hi Paul, Thank you.
I run skyCorrection.py. Now, I don’t have the error I had with makeCoaddTemp using doApplyExternalPhotoCalib=True doApplyExternalSkyWcs=True.
Then in this case it does not take into account the jointcal outputs (photocalib and corrected wcs). How can I do to let it take these outputs into account?
Thank you in advance

If you have doApplyExternalPhotoCalib=True doApplyExternalSkyWcs=True (as they should be by default, and you are setting them explicitly as well), then the appropriate calibrations will be applied in the process of running makeCoaddTempExp.py.

Ok, great, thank you for your answer