Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-21166: Create DiaCalculation plugins that replicate current ap_association behavior #56

Merged
merged 11 commits into from
Oct 15, 2019
16 changes: 16 additions & 0 deletions python/lsst/ap/association/diaCalculation.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,22 @@ def calculate(self,
"""
raise NotImplementedError()

def fail(self, diaObject, columns, error=None):
"""Set diaObject position values to nan.

Parameters
----------
diaObject : `dict`
Summary object to store values in.
columns : `list` of `str`
List of string names of columns to write a the failed value.
error : `BaseException` or `None`
Error to pass. Kept for consistency with CatologCalculationPlugin.
Unused.
"""
for colName in columns:
diaObject[colName] = np.nan


class DiaObjectCalculationConfig(CatalogCalculationConfig):
"""Config class for the catalog calculation driver task.
Expand Down