# External astrometric calibration not being applied correctly in faro

XMLWordPrintable

#### Details

• Type: Story
• Status: Done
• Resolution: Done
• Fix Version/s: None
• Component/s:
• Labels:
None
• Story Points:
2
• Team:
DM Science
• Urgent?:
No

#### Description

While exploring differences between faro and validate_drp matched catalogs, we ran across another issue with faro. The external astrometric calibrations (from, e.g., jointcal) are not being applied correctly, leading to "random"-looking differences in positions between catalogs like in the following plot:

Fix the astrometric calibration in faro.

#### Attachments

1. image-2021-01-06-12-05-46-121.png
719 kB

#### Activity

Hide
Jeffrey Carlin added a comment -

I put debug statements into matcher.py in faro, and found for the first example I looked at that 3 dataIds were being passed to the matcher, but 238 astromCalibs (external astrometric calibrations). After some discussion, it appears that having the astromCalibs in MatchedCatalogsBase.py as connectionType "PrerequisiteInput" meant that it was passing a list of all available calibs, instead of just those corresponding to the desired dataIds.

I changed the connectionType in MatchedBaseTaskConnections from MatchedCatalogsBase.py to "Input" instead of "PrerequisiteInput", and that seems to work fine now.

Show
Jeffrey Carlin added a comment - I put debug statements into matcher.py in faro, and found for the first example I looked at that 3 dataIds were being passed to the matcher, but 238 astromCalibs (external astrometric calibrations). After some discussion, it appears that having the astromCalibs in MatchedCatalogsBase.py as connectionType "PrerequisiteInput" meant that it was passing a list of all available calibs , instead of just those corresponding to the desired dataIds. I changed the connectionType in MatchedBaseTaskConnections from MatchedCatalogsBase.py to "Input" instead of "PrerequisiteInput", and that seems to work fine now.
Hide
Jeffrey Carlin added a comment -

PR is here.

Show
Jeffrey Carlin added a comment - PR is here .
Hide
Keith Bechtol added a comment -

This fix to the ConnectionType and sorting of inputs has resolved the astrometric anomalies noted above.

Show
Keith Bechtol added a comment - This fix to the ConnectionType and sorting of inputs has resolved the astrometric anomalies noted above.
Hide
Jeffrey Carlin added a comment -

PR has been merged. I'm currently re-running faro with all these changes on the v21.0 version of RC2.

Show
Jeffrey Carlin added a comment - PR has been merged. I'm currently re-running faro with all these changes on the v21.0 version of RC2.
Hide
Jeffrey Carlin added a comment -

Summary of what was included in this PR:

• Sort the input dataIds (sorting on visit, ccd, filter, in that order of priority) before matching catalogs
• Change the connectionType of astromCalibs to Input rather than PrerequisiteInput to ensure that the correct astrometric calibrations are being passed
• Add a filter to require detect_isPrimary=True for all matched groups
Show
Jeffrey Carlin added a comment - Summary of what was included in this PR: Sort the input dataIds (sorting on visit, ccd, filter, in that order of priority) before matching catalogs Change the connectionType of astromCalibs to Input rather than PrerequisiteInput to ensure that the correct astrometric calibrations are being passed Add a filter to require detect_isPrimary=True for all matched groups

#### People

Assignee:
Jeffrey Carlin
Reporter:
Jeffrey Carlin
Reviewers:
Keith Bechtol
Watchers:
Jeffrey Carlin, Keith Bechtol
0 Vote for this issue
Watchers:
2 Start watching this issue

#### Dates

Created:
Updated:
Resolved: