Skip to content

Instantly share code, notes, and snippets.

@sequoiap
Created December 5, 2019 02:29
Show Gist options
  • Save sequoiap/29a5eebf66bfce7049b415d182f4749b to your computer and use it in GitHub Desktop.
Save sequoiap/29a5eebf66bfce7049b415d182f4749b to your computer and use it in GitHub Desktop.
Gets the RA and DEC from a star image using astrometry.net without creating other files except the output.
#! /usr/bin bash
# Using python to get the RA, DEC from a wcs file: https://groups.google.com/d/msg/astrometry/0ICnBUecOx8/S1to9wayBQAJ
# Physical meaning of "Field rotation angle": https://groups.google.com/d/msg/astrometry/KEPzYd7fHis/hGDGMUwMBgAJ
# Possible program flaw of rotation near poles: https://groups.google.com/d/msg/astrometry/Uicir_i1E_o/nJsjjDeEBwAJ
solve-field \
--no-plots \
--no-verify \
--resort \
--corr none \
--solved none \
--match none \
--rdls none \
--index-xyls none \
--new-fits none \
--temp-axy \
--crpix-center \
-O \
--depth 30,40 \
"$1" > out.txt
# 26_07_-_20_27_08_image8_900.jpg
# python -c "from astrometry.util.util import Sip; wcs=Sip('26_07_-_20_27_08_image8_900.wcs'); print wcs.radec_center()"
@sequoiap
Copy link
Author

sequoiap commented Dec 5, 2019

To time this script on your system, simply execute this script as follows:

time bash solve.sh <image-filename>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment