Details
-
Type:
Story
-
Status: Done
-
Resolution: Done
-
Fix Version/s: None
-
Component/s: pipe_tasks, qa_explorer
-
Labels:None
-
Story Points:1
-
Epic Link:
-
Team:Data Release Production
Description
Scary inline comment in about being backwards. Please double check and remove. Or remove functor if it's not used.
class StarGalaxyLabeller(Labeller):
|
_columns = ["base_ClassificationExtendedness_value"]
|
_column = "base_ClassificationExtendedness_value"
|
|
def _func(self, df):
|
x = df[self._columns][self._column]
|
mask = x.isnull()
|
test = (x < 0.5).astype(int)
|
test = test.mask(mask, 2)
|
|
# are these backwards?
|
categories = ['galaxy', 'star', self._null_label]
|
label = pd.Series(pd.Categorical.from_codes(test, categories=categories),
|
index=x.index, name='label')
|
if self._force_str:
|
label = label.astype(str)
|
return label
|
From my Github code searches so far in org:lsst and org:lsst-dm, the following functors are never used anywhere (except may be in their own unit tests) and can (should) be safely removed.
John Parejko has also asked for some of these to be removed in
DM-36182.The following ones are used only in lsst-dm/qa_explorer, which is where Yusra AlSayyad had moved from to pipe_tasks. I'm inclined to move them back to qa_explorer instead of removing them altogether. I know qa_explorer isn't actively developer or used, but I'd rather let these die along with the package rather than before.