# PixelsFlags, SkyCoordAlgorithm, and Classification

XMLWordPrintable

#### Details

• Type: Story
• Status: Done
• Resolution: Done
• Fix Version/s: None
• Component/s: None
• Labels:
• Story Points:
2
• Sprint:
Measurement Sprint 1
• Team:
Data Release Production

#### Description

SkyCoord was moved to DM-441 - done in Python

Classification is also simple if done in Python

Pixel Keys will be done in C++

Some work left from SdssShape will be done with this ticket

Also, since these are out only two Python algorithms in the base set, I will add the exception handling and base fail() methods at this time.

#### Activity

Hide
Perry Gee added a comment -

This is just two algorithms, since skycoord was done previously.
Classification can't be tested without a model flux, so the unit test is bogus.

[pgee@lsst-dev mb463]$git diff --stat origin include/lsst/meas/base.h | 2 + include/lsst/meas/base/Classification.h | 230 ++++++++++++++++++++ include/lsst/meas/base/PixelFlags.h | 151 +++++++++++++ include/lsst/meas/base/ResultMappers.h | 17 ++ include/lsst/meas/base/Results.h | 3 + .../meas/base/algorithms/PixelFlagsTemplates.h | 38 ++++ python/lsst/meas/base/baseLib.i | 29 +++ python/lsst/meas/base/plugins.py | 3 +- src/Classification.cc | 128 +++++++++++ src/PixelFlags.cc | 120 ++++++++++ tests/testClassificationBasic.py | 95 ++++++++ tests/testPixelFlagsBasic.py | 100 +++++++++ 12 files changed, 915 insertions, 1 deletions Show Perry Gee added a comment - This is just two algorithms, since skycoord was done previously. Classification can't be tested without a model flux, so the unit test is bogus. [pgee@lsst-dev mb463]$ git diff --stat origin include/lsst/meas/base.h | 2 + include/lsst/meas/base/Classification.h | 230 ++++++++++++++++++++ include/lsst/meas/base/PixelFlags.h | 151 +++++++++++++ include/lsst/meas/base/ResultMappers.h | 17 ++ include/lsst/meas/base/Results.h | 3 + .../meas/base/algorithms/PixelFlagsTemplates.h | 38 ++++ python/lsst/meas/base/baseLib.i | 29 +++ python/lsst/meas/base/plugins.py | 3 +- src/Classification.cc | 128 +++++++++++ src/PixelFlags.cc | 120 ++++++++++ tests/testClassificationBasic.py | 95 ++++++++ tests/testPixelFlagsBasic.py | 100 +++++++++ 12 files changed, 915 insertions , 1 deletions
Hide
Jim Bosch added a comment -

Looks good. Just a few minor comments:

Classification:

• This is a lot of boilerplate for one line of actual algorithm code; how do you feel about converting this to a pure-Python plugin?
• If you'd prefer to keep it in C++, please remove the unnecessary C standard library includes from Classification.h

PixelFlags:

• Could we just move the class in PixelFlagsTemplates.h directly into an anonymous namespace in PixelFlags.cc now? It'd be one less thing to cleanup later; I don't think PixelFlags really requires any cleanup beyond that.

Tests:

• You have a lot of variable names that don't comply with our coding standards, particularly in the use of underscores (e.g. "sfm_config"), which are not allowed, and in non-camelcase word combinations ("srccat" should be "srcCat").
Show
Jim Bosch added a comment - Looks good. Just a few minor comments: Classification: This is a lot of boilerplate for one line of actual algorithm code; how do you feel about converting this to a pure-Python plugin? If you'd prefer to keep it in C++, please remove the unnecessary C standard library includes from Classification.h PixelFlags: Could we just move the class in PixelFlagsTemplates.h directly into an anonymous namespace in PixelFlags.cc now? It'd be one less thing to cleanup later; I don't think PixelFlags really requires any cleanup beyond that. Tests: You have a lot of variable names that don't comply with our coding standards, particularly in the use of underscores (e.g. "sfm_config"), which are not allowed, and in non-camelcase word combinations ("srccat" should be "srcCat").

#### People

Assignee:
Perry Gee
Reporter:
Perry Gee
Reviewers:
Jim Bosch
Watchers:
Jim Bosch, Perry Gee