Sending an image and retrieving DEC and RA from a single python script

64 views
Skip to first unread message

Elliott Boreham

unread,
Sep 27, 2022, 3:06:34 AM9/27/22
to astrometry
I'm working on a project currently where I'm attempting to implement automated synchronization of an old 24" telescope, with a smaller sub system. I have a Raspberry Pi4 combined with a 6" telescope and a camera.

what I need to be able to do is when requested have the Pi take a photo and then plate solve and return the RA and DEC to the primary navigation system. 

Is there any examples of how to do this in a single script(the image upload and data return)? I'm not sure the client.py on GitHub is suitable for this application? Although I'm certainly no expert.

Astro Keith

unread,
Sep 27, 2022, 4:29:06 AM9/27/22
to astrometry
Hi, Why not have a local copy of astrometry.net on your Pi. You will get faster results.

I've implemented this on my 18". The drive system gets a solution within 2-3 seconds of requesting one.

Dustin Lang

unread,
Sep 27, 2022, 8:42:11 AM9/27/22
to Elliott Boreham, astrometry
Hi,

You can also import client.py as a library to do whatever you want.  You'll want the --crpix-center and --wcs options to put the reference point in the center of the image, and to fetch the WCS file, respectively (as well as --scale-lower, --scale-upper to make it much faster).  Then read the WCS file (eg using fitsio) and pull out the CRVAL1, CRVAL2 (RA,Dec) headers.  OR, figure out the Job ID number and fetch a URL like https://nova.astrometry.net/api/jobs/2646067/info which is a JSON string containing the RA,Dec.

cheers,
dustin

--
You received this message because you are subscribed to the Google Groups "astrometry" group.
To unsubscribe from this group and stop receiving emails from it, send an email to astrometry+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/astrometry/58b82954-18b3-4455-b86e-9c82f6742e91n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages