Skip to content

Commit

Permalink
Make CoordColumn more reusable
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
yalsayyad committed Feb 15, 2020
1 parent 71556b4 commit 3e2e8b6
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions python/lsst/pipe/tasks/functors.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -468,6 +465,7 @@ class RAColumn(CoordColumn):
"""Right Ascension, in degrees
"""
name = 'RA'
_defaultNoDup = True

def __init__(self, **kwargs):
super().__init__('coord_ra', **kwargs)
Expand All @@ -480,6 +478,7 @@ class DecColumn(CoordColumn):
"""Declination, in degrees
"""
name = 'Dec'
_defaultNoDup = True

def __init__(self, **kwargs):
super().__init__('coord_dec', **kwargs)
Expand Down

0 comments on commit 3e2e8b6

Please sign in to comment.