Skip to content

Commit

Permalink
Check that visit ref exists before adding to list
Browse files Browse the repository at this point in the history
The situation can occur where a given visit specified in the list
of selected visits is missing from the inputWarpDict for a given
tract/patch dataRef.  Thus, check that the visit actually exists
in the inputWarpDict before trying to append it to the filtered
inputs list.
  • Loading branch information
laurenam committed Aug 17, 2021
1 parent 8cabc10 commit 657ec6b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion python/lsst/pipe/tasks/assembleCoadd.py
Original file line number Diff line number Diff line change
Expand Up @@ -1332,7 +1332,8 @@ def filterWarps(self, inputs, goodVisits):
inputWarpDict = {inputRef.ref.dataId['visit']: inputRef for inputRef in inputs}
filteredInputs = []
for visit in goodVisits.keys():
filteredInputs.append(inputWarpDict[visit])
if visit in inputWarpDict:
filteredInputs.append(inputWarpDict[visit])
return filteredInputs


Expand Down

0 comments on commit 657ec6b

Please sign in to comment.