Bug report in meas_extensions_astrometryNet

stack-bug
Tags: #<Tag:0x00007f7f701b91e8>

(James Mullaney) #1

We’re using the astrometry.net extension to perform astrometry. In v15 and v16 of the stack, I’ve noticed that meas_extensions_astrometryNet/python/lsst/meas/extensions/astrometryNet/anetAstrometry.py refers to self.distortionContext (see here). However, it seems that the distortionContext function was removed on the 4th of November, 2017 by this commit. I may be mistaken, but this seems to be a bug introduced by not catching all references to distortionContext when making that commit.

I don’t know whether this is also affecting the call to wcs.hasDistortion() in the same file.

Finally, is this the best place to report suspected bugs?


(Russell Owen) #2

The best place to report bugs is JIRA. That said, I don’t know what permissions are required.


(James Mullaney) #3

I don’t have an account on JIRA, I’m afraid. I can see bug reports on there, but I can’t submit my own. Am I eligible for an account (I’m a UK affiliate-PI)?


(Russell Owen) #4

I am not sure, but I hope and expect that you are eligible for a JIRA account. Meanwhile I submitted a ticket: https://jira.lsstcorp.org/browse/DM-15008


(K-T Lim) #5

For those that do not have Jira accounts, please do continue to report bugs here in Community, either in Support (for code) or Data Q&A (for data products). We will transfer them to Jira (as Russell did) as needed.

It is also possible to report bugs as GitHub Issues, but we have a preference for Community over that pathway, and we don’t track work in GitHub Issues.


(Russell Owen) #6

Thank you for the clear bug report.

I have a fix in review. on branch tickets/DM-15008. If you want to try it yourself see https://github.com/lsst/meas_extensions_astrometryNet/pull/11 and apply the trivial changes to your copy of python/lsst/meas/extensions/astrometryNet/anetAstrometry.py. If you do try it please let us know how it works out.


(James Mullaney) #7

That’s perfect - thank you. Did you also look into the wcs.hasDistortion() in that same file? I can’t find any other reference to hasDistortion when searching the organization on github, so I wondered whether it also refers to a now-removed method.


(Russell Owen) #8

Good catch. This change should fix that:

-            self.log.info("Astrometric scatter: %f arcsec (%s non-linear terms, %d matches, %d rejected)" %
-                          (scatter.asArcseconds(), "with" if wcs.hasDistortion() else "without",
-                           len(matches), numRejected))
+            self.log.info("Astrometric scatter: %f arcsec (%d matches, %d rejected)" %
+                          (scatter.asArcseconds(), len(matches), numRejected))

(James Mullaney) #9

Great - thanks again.


(Russell Owen) #10

The fix has been merged to master and includes a unit test for the task.