Skip to content

Commit

Permalink
Make CoordColumn more reusable
Browse files Browse the repository at this point in the history
behaving like other Columns which explode per band by default.
RAColumns and DecColumn are now the non-exploding special cases
that still produce single reference band column. Preferred
changing behavior if intermediate CoordColumn than profilerating
adding a second intermediate class in the class hierarchy.
  • Loading branch information
yalsayyad committed Feb 15, 2020
1 parent 71556b4 commit d302b3b
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 d302b3b

Please sign in to comment.