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

Tiny Image Scale reported when users use another tool for plate solving before EXOTIC #1310

Closed
ivenzor opened this issue Oct 1, 2024 · 1 comment · Fixed by #1311
Closed

Comments

@ivenzor
Copy link
Contributor

ivenzor commented Oct 1, 2024

Some users are reporting tiny image scale when using a tool for plate solve before EXOTIC (see attached image)
FOV_WASP-43 b_07-MAY-2014_SquaredStretch (1)

I have located the relevant section of the code, function get_img_scale

    if wcs_file:
        wcs_hdr = fits.getheader(wcs_file)
        astrometry_scale = [key.value.split(' ') for key in wcs_hdr._cards if 'scale:' in str(key.value)]

        if astrometry_scale:
            img_scale_num = astrometry_scale[0][1]
            img_scale_units = astrometry_scale[0][2]
        else:
            wcs = WCS(wcs_hdr).proj_plane_pixel_scales()
            img_scale_num = (wcs[0].value + wcs[1].value) / 2
            img_scale_units = "arsec/pixel"

The tiny values comes from that else clause, e.g.:

img_scale Image scale in arsec/pixel: 0.0014532234679896525
img_scale_num 0.00145322346799
@ivenzor
Copy link
Contributor Author

ivenzor commented Oct 1, 2024

WCS(wcs_hdr).proj_plane_pixel_scales() returns the pixel scales in degrees per pixel, not arcseconds per pixel, we need to multiply by 3600 to get the correct arcsec/pixel value:

img_scale_num = ((wcs[0].value + wcs[1].value) / 2) * 3600 # Convert to arcsec/pixel
I will create a PR to fix this.

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.

2 participants