Details
-
Type:
Story
-
Status: Done
-
Resolution: Done
-
Fix Version/s: None
-
Component/s: meas_astrom
-
Labels:None
-
Story Points:4
-
Epic Link:
-
Sprint:Science Pipelines DM-W16-4
-
Team:Data Release Production
Description
Recent changes to meas_astrom accidentally removed a function readMatches (copied below). Please restore it, preferably in its own module (though if someday we have more small python functions we may want a utils.py module).
Also please include a unit test.
def readMatches(butler, dataId, sourcesName='icSrc', matchesName='icMatch', config=MeasAstromConfig(), sourcesFlags=afwTable.SOURCE_IO_NO_FOOTPRINTS):
|
"""Read matches, sources and catalogue; combine.
|
@param butler Data butler
|
@param dataId Data identifier for butler
|
@param sourcesName Name for sources from butler
|
@param matchesName Name for matches from butler
|
@param sourcesFlags Flags to pass for source retrieval
|
@returns Matches
|
"""
|
sources = butler.get(sourcesName, dataId, flags=sourcesFlags)
|
packedMatches = butler.get(matchesName, dataId)
|
astrom = Astrometry(config)
|
return astrom.joinMatchListWithCatalog(packedMatches, sources)
|
Attachments
Activity
Field | Original Value | New Value |
---|---|---|
Description |
Recent changes to meas_astrom accidentally removed a function readMatches (copied below). Please restore it, preferably in its own module (though if someday we have more small python functions we may want a utils.py module).
{code} def readMatches(butler, dataId, sourcesName='icSrc', matchesName='icMatch', config=MeasAstromConfig(), sourcesFlags=afwTable.SOURCE_IO_NO_FOOTPRINTS): """Read matches, sources and catalogue; combine. @param butler Data butler @param dataId Data identifier for butler @param sourcesName Name for sources from butler @param matchesName Name for matches from butler @param sourcesFlags Flags to pass for source retrieval @returns Matches """ sources = butler.get(sourcesName, dataId, flags=sourcesFlags) packedMatches = butler.get(matchesName, dataId) astrom = Astrometry(config) return astrom.joinMatchListWithCatalog(packedMatches, sources) {code} |
Recent changes to meas_astrom accidentally removed a function readMatches (copied below). Please restore it, preferably in its own module (though if someday we have more small python functions we may want a utils.py module).
{code} def readMatches(butler, dataId, sourcesName='icSrc', matchesName='icMatch', config=MeasAstromConfig(), sourcesFlags=afwTable.SOURCE_IO_NO_FOOTPRINTS): """Read matches, sources and catalogue; combine. @param butler Data butler @param dataId Data identifier for butler @param sourcesName Name for sources from butler @param matchesName Name for matches from butler @param sourcesFlags Flags to pass for source retrieval @returns Matches """ sources = butler.get(sourcesName, dataId, flags=sourcesFlags) packedMatches = butler.get(matchesName, dataId) astrom = Astrometry(config) return astrom.joinMatchListWithCatalog(packedMatches, sources) {code} Also include a unit test. |
Story Points | 1 | 2 |
Description |
Recent changes to meas_astrom accidentally removed a function readMatches (copied below). Please restore it, preferably in its own module (though if someday we have more small python functions we may want a utils.py module).
{code} def readMatches(butler, dataId, sourcesName='icSrc', matchesName='icMatch', config=MeasAstromConfig(), sourcesFlags=afwTable.SOURCE_IO_NO_FOOTPRINTS): """Read matches, sources and catalogue; combine. @param butler Data butler @param dataId Data identifier for butler @param sourcesName Name for sources from butler @param matchesName Name for matches from butler @param sourcesFlags Flags to pass for source retrieval @returns Matches """ sources = butler.get(sourcesName, dataId, flags=sourcesFlags) packedMatches = butler.get(matchesName, dataId) astrom = Astrometry(config) return astrom.joinMatchListWithCatalog(packedMatches, sources) {code} Also include a unit test. |
Recent changes to meas_astrom accidentally removed a function readMatches (copied below). Please restore it, preferably in its own module (though if someday we have more small python functions we may want a utils.py module).
Also please include a unit test. {code} def readMatches(butler, dataId, sourcesName='icSrc', matchesName='icMatch', config=MeasAstromConfig(), sourcesFlags=afwTable.SOURCE_IO_NO_FOOTPRINTS): """Read matches, sources and catalogue; combine. @param butler Data butler @param dataId Data identifier for butler @param sourcesName Name for sources from butler @param matchesName Name for matches from butler @param sourcesFlags Flags to pass for source retrieval @returns Matches """ sources = butler.get(sourcesName, dataId, flags=sourcesFlags) packedMatches = butler.get(matchesName, dataId) astrom = Astrometry(config) return astrom.joinMatchListWithCatalog(packedMatches, sources) {code} |
Assignee | Lauren MacArthur [ lauren ] |
Status | To Do [ 10001 ] | In Progress [ 3 ] |
Epic Link |
|
Sprint | Science Pipelines DM-W16-4 [ 187 ] | |
Story Points | 2 | 4 |
Team | Data Release Production [ 10301 ] |
Reviewers | Russell Owen [ rowen ] | |
Status | In Progress [ 3 ] | In Review [ 10004 ] |
Status | In Review [ 10004 ] | Reviewed [ 10101 ] |
Resolution | Done [ 10000 ] | |
Status | Reviewed [ 10101 ] | Done [ 10002 ] |
Remote Link | This issue links to "Page (Confluence)" [ 13300 ] |
Remote Link | This issue links to "Page (Confluence)" [ 13300 ] | This issue links to "Page (Confluence)" [ 13300 ] |
Remote Link | This issue links to "Page (Confluence)" [ 13300 ] | This issue links to "Page (Confluence)" [ 13300 ] |
Remote Link | This issue links to "Page (Confluence)" [ 13300 ] | This issue links to "Page (Confluence)" [ 13300 ] |
Remote Link | This issue links to "Page (Confluence)" [ 13300 ] | This issue links to "Page (Confluence)" [ 13300 ] |
Remote Link | This issue links to "Page (Confluence)" [ 13300 ] | This issue links to "Page (Confluence)" [ 13300 ] |
Remote Link | This issue links to "Page (Confluence)" [ 13300 ] | This issue links to "Page (Confluence)" [ 13300 ] |
Remote Link | This issue links to "Page (Confluence)" [ 13300 ] | This issue links to "Page (Confluence)" [ 13300 ] |
Remote Link | This issue links to "Page (Confluence)" [ 13300 ] | This issue links to "Page (Confluence)" [ 13300 ] |
Remote Link | This issue links to "Page (Confluence)" [ 13300 ] | This issue links to "Page (Confluence)" [ 13300 ] |
Remote Link | This issue links to "Page (Confluence)" [ 13300 ] | This issue links to "Page (Confluence)" [ 13300 ] |
Remote Link | This issue links to "Page (Confluence)" [ 13300 ] | This issue links to "Page (Confluence)" [ 13300 ] |
Remote Link | This issue links to "Page (Confluence)" [ 13300 ] | This issue links to "Page (Confluence)" [ 13300 ] |
Remote Link | This issue links to "Page (Confluence)" [ 13300 ] | This issue links to "Page (Confluence)" [ 13300 ] |
Remote Link | This issue links to "Page (Confluence)" [ 13300 ] | This issue links to "Page (Confluence)" [ 13300 ] |
Remote Link | This issue links to "Page (Confluence)" [ 13300 ] | This issue links to "Page (Confluence)" [ 13300 ] |
Remote Link | This issue links to "Page (Confluence)" [ 13300 ] | This issue links to "Page (Confluence)" [ 13300 ] |
Remote Link | This issue links to "Page (Confluence)" [ 13300 ] | This issue links to "Page (Confluence)" [ 13300 ] |
Remote Link | This issue links to "Page (Confluence)" [ 13300 ] | This issue links to "Page (Confluence)" [ 13300 ] |
Remote Link | This issue links to "Page (Confluence)" [ 13300 ] | This issue links to "Page (Confluence)" [ 13300 ] |
Remote Link | This issue links to "Page (Confluence)" [ 13300 ] | This issue links to "Page (Confluence)" [ 13300 ] |
Remote Link | This issue links to "Page (Confluence)" [ 13300 ] | This issue links to "Page (Confluence)" [ 13300 ] |
Remote Link | This issue links to "Page (Confluence)" [ 13300 ] | This issue links to "Page (Confluence)" [ 13300 ] |
Remote Link | This issue links to "Page (Confluence)" [ 13300 ] | This issue links to "Page (Confluence)" [ 13300 ] |
Remote Link | This issue links to "Page (Confluence)" [ 13300 ] | This issue links to "Page (Confluence)" [ 13300 ] |
Remote Link | This issue links to "Page (Confluence)" [ 13300 ] | This issue links to "Page (Confluence)" [ 13300 ] |
Remote Link | This issue links to "Page (Confluence)" [ 13300 ] | This issue links to "Page (Confluence)" [ 13300 ] |
Remote Link | This issue links to "Page (Confluence)" [ 13300 ] | This issue links to "Page (Confluence)" [ 13300 ] |
Remote Link | This issue links to "Page (Confluence)" [ 13300 ] | This issue links to "Page (Confluence)" [ 13300 ] |
Remote Link | This issue links to "Page (Confluence)" [ 13300 ] | This issue links to "Page (Confluence)" [ 13300 ] |
Remote Link | This issue links to "Page (Confluence)" [ 13300 ] | This issue links to "Page (Confluence)" [ 13300 ] |
Remote Link | This issue links to "Page (Confluence)" [ 13300 ] | This issue links to "Page (Confluence)" [ 13300 ] |
Remote Link | This issue links to "Page (Confluence)" [ 13300 ] | This issue links to "Page (Confluence)" [ 13300 ] |
Remote Link | This issue links to "Page (Confluence)" [ 13300 ] | This issue links to "Page (Confluence)" [ 13300 ] |
Remote Link | This issue links to "Page (Confluence)" [ 13300 ] | This issue links to "Page (Confluence)" [ 13300 ] |
Remote Link | This issue links to "Page (Confluence)" [ 13300 ] | This issue links to "Page (Confluence)" [ 13300 ] |
Remote Link | This issue links to "Page (Confluence)" [ 13300 ] | This issue links to "Page (Confluence)" [ 13300 ] |
Remote Link | This issue links to "Page (Confluence)" [ 13300 ] | This issue links to "Page (Confluence)" [ 13300 ] |
Remote Link | This issue links to "Page (Confluence)" [ 13300 ] | This issue links to "Page (Confluence)" [ 13300 ] |
Remote Link | This issue links to "Page (Confluence)" [ 13300 ] | This issue links to "Page (Confluence)" [ 13300 ] |
Remote Link | This issue links to "Page (Confluence)" [ 13300 ] | This issue links to "Page (Confluence)" [ 13300 ] |
Remote Link | This issue links to "Page (Confluence)" [ 13300 ] | This issue links to "Page (Confluence)" [ 13300 ] |
Remote Link | This issue links to "Page (Confluence)" [ 13300 ] | This issue links to "Page (Confluence)" [ 13300 ] |
Remote Link | This issue links to "Page (Confluence)" [ 13300 ] | This issue links to "Page (Confluence)" [ 13300 ] |
Remote Link | This issue links to "Page (Confluence)" [ 13300 ] | This issue links to "Page (Confluence)" [ 13300 ] |
Remote Link | This issue links to "Page (Confluence)" [ 13300 ] | This issue links to "Page (Confluence)" [ 13300 ] |
Remote Link | This issue links to "Page (Confluence)" [ 13300 ] | This issue links to "Page (Confluence)" [ 13300 ] |
Remote Link | This issue links to "Page (Confluence)" [ 13300 ] | This issue links to "Page (Confluence)" [ 13300 ] |
Remote Link | This issue links to "Page (Confluence)" [ 13300 ] | This issue links to "Page (Confluence)" [ 13300 ] |
Remote Link | This issue links to "Page (Confluence)" [ 13300 ] | This issue links to "Page (Confluence)" [ 13300 ] |
Remote Link | This issue links to "Page (Confluence)" [ 13300 ] | This issue links to "Page (Confluence)" [ 13300 ] |
Remote Link | This issue links to "Page (Confluence)" [ 13300 ] | This issue links to "Page (Confluence)" [ 13300 ] |
Remote Link | This issue links to "Page (Confluence)" [ 13300 ] | This issue links to "Page (Confluence)" [ 13300 ] |
Remote Link | This issue links to "Page (Confluence)" [ 13300 ] | This issue links to "Page (Confluence)" [ 13300 ] |
Remote Link | This issue links to "Page (Confluence)" [ 13300 ] | This issue links to "Page (Confluence)" [ 13300 ] |
Remote Link | This issue links to "Page (Confluence)" [ 13300 ] | This issue links to "Page (Confluence)" [ 13300 ] |
Remote Link | This issue links to "Page (Confluence)" [ 13300 ] | This issue links to "Page (Confluence)" [ 13300 ] |
Remote Link | This issue links to "Page (Confluence)" [ 13300 ] | This issue links to "Page (Confluence)" [ 13300 ] |
Remote Link | This issue links to "Page (Confluence)" [ 13300 ] | This issue links to "Page (Confluence)" [ 13300 ] |
Remote Link | This issue links to "Page (Confluence)" [ 13300 ] | This issue links to "Page (Confluence)" [ 13300 ] |
Remote Link | This issue links to "Page (Confluence)" [ 13300 ] | This issue links to "Page (Confluence)" [ 13300 ] |
Remote Link | This issue links to "Page (Confluence)" [ 13300 ] | This issue links to "Page (Confluence)" [ 13300 ] |
Remote Link | This issue links to "Page (Confluence)" [ 13300 ] | This issue links to "Page (Confluence)" [ 13300 ] |
Remote Link | This issue links to "Page (Confluence)" [ 13300 ] | This issue links to "Page (Confluence)" [ 13300 ] |
Remote Link | This issue links to "Page (Confluence)" [ 13300 ] | This issue links to "Page (Confluence)" [ 13300 ] |
Remote Link | This issue links to "Page (Confluence)" [ 13300 ] | This issue links to "Page (Confluence)" [ 13300 ] |
Remote Link | This issue links to "Page (Confluence)" [ 13300 ] | This issue links to "Page (Confluence)" [ 13300 ] |
Remote Link | This issue links to "Page (Confluence)" [ 13300 ] | This issue links to "Page (Confluence)" [ 13300 ] |
Remote Link | This issue links to "Page (Confluence)" [ 13300 ] | This issue links to "Page (Confluence)" [ 13300 ] |
Remote Link | This issue links to "Page (Confluence)" [ 13300 ] | This issue links to "Page (Confluence)" [ 13300 ] |
Remote Link | This issue links to "Page (Confluence)" [ 13300 ] | This issue links to "Page (Confluence)" [ 13300 ] |
Remote Link | This issue links to "Page (Confluence)" [ 13300 ] | This issue links to "Page (Confluence)" [ 13300 ] |
Remote Link | This issue links to "Page (Confluence)" [ 13300 ] | This issue links to "Page (Confluence)" [ 13300 ] |
Remote Link | This issue links to "Page (Confluence)" [ 13300 ] | This issue links to "Page (Confluence)" [ 13300 ] |
Remote Link | This issue links to "Page (Confluence)" [ 13300 ] | This issue links to "Page (Confluence)" [ 13300 ] |
Remote Link | This issue links to "Page (Confluence)" [ 13300 ] | This issue links to "Page (Confluence)" [ 13300 ] |
Remote Link | This issue links to "Page (Confluence)" [ 13300 ] | This issue links to "Page (Confluence)" [ 13300 ] |
Remote Link | This issue links to "Page (Confluence)" [ 13300 ] | This issue links to "Page (Confluence)" [ 13300 ] |
Remote Link | This issue links to "Page (Confluence)" [ 13300 ] | This issue links to "Page (Confluence)" [ 13300 ] |
Remote Link | This issue links to "Page (Confluence)" [ 13300 ] | This issue links to "Page (Confluence)" [ 13300 ] |
Remote Link | This issue links to "Page (Confluence)" [ 13300 ] | This issue links to "Page (Confluence)" [ 13300 ] |
Russell Owen & Paul Price: In reinstating this function, I realized it is a bit odd as its only real job is to delegate to joinMatchListWithCatalog(). That function lives in anetBasicAstrometry.py, so even if the caller has initialized AstrometryTask, calling this function still requires initializing an ANetBasicAstrometryTask. I've come up with two solutions and have pushed branches for both:
u/lauren/
DM-3633alt:Just adds back the function in its own file and slightly simplifies the API (i.e. it has the caller pass in the matches and source lists themselves rather than reloading them here through a passed in butler).
u/lauren/
DM-3633Moves joinMatchListWithCatalog() to setMatchDistance.py. The user can either pass in their own astrometry task instance, or one will be created for them. This has the advantage that one no longer needs to go through ANetBasicAstrometryTask to get to joinMatchListWithCatalog(). It also comes with the added bonus that the (adapted) unittest SourceMatchJoin.py already provides a unit test. Note that I also made the following filename changes:
setMatchDistance.py -> matchUtils.py
SourceMatchJoin.py -> testJoinMatchListWithCatalog.py
I prefer the latter, but if you have strong opinions either way, let me know. I'll wait until we've settled on one or the other solution before officially putting this up for review (shout if you can/are willing to take it!).
Oh, and a Jenkins build was successful on the u/lauren/
DM-3633branch.