From 3e2e8b6e9602af58c28c28aa628ef4d02eb8d6de Mon Sep 17 00:00:00 2001 From: Yusra AlSayyad Date: Thu, 13 Feb 2020 17:38:36 -0600 Subject: [PATCH] Make CoordColumn more reusable by behaving like other Columns which explode per band by default. RAColumn and DecColumn are now the non-exploding special cases that still produce a single reference band column. Change the behavior of intermediate CoordColumn preferred over adding a second intermediate class in the class hierarchy. --- python/lsst/pipe/tasks/functors.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/python/lsst/pipe/tasks/functors.py b/python/lsst/pipe/tasks/functors.py index d18994ba3..f9708aedf 100644 --- a/python/lsst/pipe/tasks/functors.py +++ b/python/lsst/pipe/tasks/functors.py @@ -449,12 +449,9 @@ class FootprintNPix(Column): class CoordColumn(Column): """Base class for coordinate column, in degrees """ - _allow_difference = False _radians = True - _defaultNoDup = True - def __init__(self, col, calculate=False, **kwargs): - self.calculate = calculate + def __init__(self, col, **kwargs): super().__init__(col, **kwargs) def _func(self, df): @@ -468,6 +465,7 @@ class RAColumn(CoordColumn): """Right Ascension, in degrees """ name = 'RA' + _defaultNoDup = True def __init__(self, **kwargs): super().__init__('coord_ra', **kwargs) @@ -480,6 +478,7 @@ class DecColumn(CoordColumn): """Declination, in degrees """ name = 'Dec' + _defaultNoDup = True def __init__(self, **kwargs): super().__init__('coord_dec', **kwargs)