meas_algorithms contains several (e.g. #1, #2, there are more) explicit uses of lsst.afw.display.ds9. These should be replaced by calls to the generic (backend-independent) lsst.afw.display system.
Robert Lupton Robert, are you the expert on display?
There is a "global fig" followed by a line "if not fig" in objectSizeStarSelector.py, but fig is not defined prior to this line, so an exception occurs. I can use a "try/except NameError" to test that fig is defined, or I could define "fig = None" outside local scope, unless you can suggest another solution which you like better.
Also, the name "fig" is used locally in another routine. I assume this is really a separate usage?
Perry Gee
added a comment - Robert Lupton Robert, are you the expert on display?
There is a "global fig" followed by a line "if not fig" in objectSizeStarSelector.py, but fig is not defined prior to this line, so an exception occurs. I can use a "try/except NameError" to test that fig is defined, or I could define "fig = None" outside local scope, unless you can suggest another solution which you like better.
Also, the name "fig" is used locally in another routine. I assume this is really a separate usage?
Robert Lupton
added a comment - Merlin just ran into something similar. I think someone probably removed a block at global scope:
try:
fig
except NameError:
fig = None
Yes, that is how I solved it. I just wanted to be sure that there wasn't some other intention to share this global with other routines outside of plot().
Perry Gee
added a comment - Yes, that is how I solved it. I just wanted to be sure that there wasn't some other intention to share this global with other routines outside of plot().
Perry Gee
added a comment - Note the changes required to https://developer.lsst.io/coding/debug.html . If you run from a cmdLineTask, there is no -d option, and debug.py must be in your PYTHONPATH.
Michael Wood-Vasey
added a comment - The code changes look fine.
Rebase to current master (sorry for the extensive delay in reviewing this).
I've spent 3 hours trying to get the display itself tested, but have been unable to do so. DM-11125 is just one symptom.
I suggest the best way forward at this point is to merge this.
Robert Lupton Robert, are you the expert on display?
There is a "global fig" followed by a line "if not fig" in objectSizeStarSelector.py, but fig is not defined prior to this line, so an exception occurs. I can use a "try/except NameError" to test that fig is defined, or I could define "fig = None" outside local scope, unless you can suggest another solution which you like better.
Also, the name "fig" is used locally in another routine. I assume this is really a separate usage?