Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase abs_separation default value in tweakreg #1329

Closed
braingram opened this issue Jul 24, 2024 · 3 comments · Fixed by #1352
Closed

Increase abs_separation default value in tweakreg #1329

braingram opened this issue Jul 24, 2024 · 3 comments · Fixed by #1352

Comments

@braingram
Copy link
Collaborator

The default value for abs_separation in romancal (0.1) matches the previous default value in jwst.

However, spacetelescope/jwst#8445 increased this parameter to 1.0 with mention of the need for this to be 1.5x the tolerance (0.7). However a later PR added a slightly different check spacetelescope/jwst#8476 to verify abs_)separation > sqrt(2) * (abs_)tolerance.

The default values in romancal could likely use some updating (and a similar check added) as I just ran into the same issue fixed by the jwst PR where running roman_elp on an uncal file resulted in RuntimeError: Number of output coordinates exceeded allocation which went away when I set abs_separation to 1.0.

The failed filed were simulated images shared with me by @schlafly:

['r0000101001001001001_01101_0002_WFI10_uncal.asdf' and 'r0000101001001001001_01101_0003_WFI10_uncal.asdf']
@mcara
Copy link
Member

mcara commented Jul 24, 2024

Current defaults:

separation = float(default=1.0) # Minimum object separation in arcsec
tolerance = float(default=0.7) # Matching tolerance for xyxymatch in arcsec
abs_separation = float(default=0.1) # Minimum object separation in arcsec when performing absolute astrometry
abs_tolerance = float(default=0.7) # Matching tolerance for xyxymatch in arcsec when performing absolute astrometry

For absolute alignment, the settings are bad, as mentioned by @braingram, resulting in multiple sources being within the tolerance region, while xyxymatch allocates enough memory for just 1 match, resulting in the above error. For relative alignment settings are "better", however, a tolerance of 0.7 arcsec is kind of large, IMHO.

@schlafly
Copy link
Collaborator

If you want to suggest a different value, Mihai, please do. In practice we don't use relative alignment and just align to Gaia all of the time, so it is somewhat future-proofing rather than something we actually use.

Practically we expect our ultimate alignment to be ~1 mas, so after tweakreg if we're doing worse than 0.1" for brightish stars something is pretty bad. Before tweakreg alignment errors of a few pixels seem plausible to me.

@mcara
Copy link
Member

mcara commented Jul 24, 2024

... Before tweakreg alignment errors of a few pixels seem plausible to me.

=> (abs_)tolerance = (a few pixels) * pixel_scale (and round up to a more round value)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants