Skip to content

Commit

Permalink
Implement reviewer responses.
Browse files Browse the repository at this point in the history
  • Loading branch information
morriscb committed Feb 9, 2021
1 parent a472848 commit cf702db
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions python/lsst/ap/association/diaPipe.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,14 +122,26 @@ def adjustQuantum(self, datasetRefMap: pipeBase.InputQuantizedConnection):
datasetRefMap : `NamedKeyDict`
Mapping from dataset type to a `set` of
`lsst.daf.butler.DatasetRef` objects
Returns
-------
datasetRefMap : `NamedKeyDict`
Mapping of input with assurances that bands incompatible with the
Apdb are present.
Raises
------
ValueError
Raises if a data ref in the quantum has a band not available in the
Apdb.
"""
refs = datasetRefMap[self.diffIm.name]
for ref in refs:
if ref.dataId["band"] not in self.config.validBands:
raise ValueError(
f"Requested '{ref.dataId['band']}' not in validBands list "
"in DiaPipelineTask config. To process bands not in the "
"standard Rubin set, ugrizy, you must add the band to the "
f"Requested '{ref.dataId['band']}' not in "
"DiaPipelineConfig.validBands. To process bands not in the "
"standard Rubin set (ugrizy) you must add the band to the "
"validBands list in DiaPipelineConfig and add the "
"appropriate columns to the Apdb schema.")
return super().adjustQuantum(datasetRefMap)
Expand All @@ -154,7 +166,7 @@ class DiaPipelineConfig(pipeBase.PipelineTaskConfig,
dtype=str,
default=["u", "g", "r", "i", "z", "y"],
doc="List of bands that are valid for AP processing. To process a "
"band not on this list, the appropriate, band specific columns "
"band not on this list, the appropriate band specific columns "
"must be added to the Apdb schema in dax_apdb.",
)
diaSourceDpddifier = pexConfig.ConfigurableField(
Expand Down

0 comments on commit cf702db

Please sign in to comment.