# Alias measurement.plugins to measurement.algorithms

XMLWordPrintable

#### Details

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

#### Description

The config item in the old measurement task, measurement.algorithms was changed to measurement.plugins in meas_base. The creates a backward compatibility issue for code which refers to this class member.

Jim's suggested fix is to alias plugins with algorithms in the new measurement task.

#### Activity

Hide
Jim Bosch added a comment -

Perry, here's another tiny one for you to review (and hopefully make use of). It should make meas_base compatible with the master version of pipe_tasks, by aliasing .plugins to .algorithms in the config. No rush on this review, but I figured it'd be useful to you before you start the comparison-test issues.

 meas_base:u/jbosch/DM-468 % git diff --stat master...u/jbosch/DM-468  python/lsst/meas/base/forcedImage.py | 1 +  python/lsst/meas/base/sfm.py | 1 +  2 files changed, 2 insertions(+)

Show
Jim Bosch added a comment - Perry, here's another tiny one for you to review (and hopefully make use of). It should make meas_base compatible with the master version of pipe_tasks, by aliasing .plugins to .algorithms in the config. No rush on this review, but I figured it'd be useful to you before you start the comparison-test issues. meas_base:u/jbosch/DM-468 % git diff --stat master...u/jbosch/DM-468 python/lsst/meas/base/forcedImage.py | 1 + python/lsst/meas/base/sfm.py | 1 + 2 files changed, 2 insertions(+)
Hide
Perry Gee added a comment -

Note the following lines in processImage.py (in pipe_tasks) which might indicate that the alias by itself might not be enough. I implemented SkyCoord in python, so I can solve this for now by using the same name.
processImage.py: if "skycoord" not in self.measurement.algorithms.names:

Also, then is similar access to the names list in other code, such as imageDifference.py and calibrate.py. These could be addressed later, however.

self.initialMeasurement.algorithms.names -= ["correctfluxes", "classification"]

Show
Perry Gee added a comment - Note the following lines in processImage.py (in pipe_tasks) which might indicate that the alias by itself might not be enough. I implemented SkyCoord in python, so I can solve this for now by using the same name. processImage.py: if "skycoord" not in self.measurement.algorithms.names: Also, then is similar access to the names list in other code, such as imageDifference.py and calibrate.py. These could be addressed later, however. self.initialMeasurement.algorithms.names -= ["correctfluxes", "classification"]
Hide
Jim Bosch added a comment -

That's unfortunate. Your temporary solution is indeed fine for now, though we should rename skycoord to match the new conventions eventually. I've created DM-545 to capture the extra work you've noted (it's not in this sprint).

Show
Jim Bosch added a comment - That's unfortunate. Your temporary solution is indeed fine for now, though we should rename skycoord to match the new conventions eventually. I've created DM-545 to capture the extra work you've noted (it's not in this sprint).
Hide
Perry Gee added a comment -

I am Ok with this checkin. It seems to work, but does not solve all of the problems.

Show
Perry Gee added a comment - I am Ok with this checkin. It seems to work, but does not solve all of the problems.

#### People

Assignee:
Jim Bosch
Reporter:
Perry Gee
Reviewers:
Perry Gee
Watchers:
Jim Bosch, Perry Gee
Votes:
0 Vote for this issue
Watchers:
2 Start watching this issue

#### Dates

Created:
Updated:
Resolved:

#### Jenkins

No builds found.