For those PI camera fans who are also into astronomy, here's a little project idea I've explored to a point were I'm confident it's feasible:
If you have a telescope that lacks automatic GOTO stuff but at least is driven to compensate for Earth's motion, it can sometimes be hard to actually find faint objects. The idea is to use a camera (here the PiCamera board) to take a quick image of the field you are pointing the telescope at, then send that image to a web-service at http://nova.astrometry.net which will , with a few arcseconds precision, tell you the coordinates of the image center. You could then show the coordinates on a little display attached to the PI or serve it on an HTML page via a web-browser running on the PI perhaps.
I made some tests where I put the PiCam (without the front lens) at the prime focus of a 76mm Celestron Firstscope and indeed, nova.astrometry.net was able to plate-solve images with 6sec exposure time rapidly and reliably. This looks promising. I'll try some smaller finder-scope later on.
To implement this idea for use "in the field", you need to solve some sub-problems:
a) power supply: I use a Raspberry PI A+ powered by a Charger-battery-pack with 2600mAh (this one: http://www.amazon.de/dp/B009NA5I14 ) which seems to last for a whole observing session. Many "power tanks" used by amateur astronomers also have 12V "car" sockets, and you can put one of those 12V to USB phone charging adapters into them as well.
b) connectivity: I use a WiFi dongle that can connect to a phone via tethering, so the PI has an Internet connection in the field.
c) taking the pictures: I use raspistill with an exposure time of 6sec, AWB switched off , burst mode , and the DRC parameter set to high, 640x480 image size, in an endless loop:
Code: Select all
nohup raspistill --nopreview -awb off -awbg 1.0,1.0 --colfx 128:128 -bm -w 640 -h 480 -q 80 -o /tmp/stream/pic.jpg -ISO 800 -drc high -ss 6000000 -tl 200 -t 999999999 -th 0:0:0 &
d) sending images to astrometry.net : there is a Python script available here : http://nova.astrometry.net/api_help
The script works best if you supply it with a good estimate of the pixel-scale of the image (in my case, for the Firstscope, it is ca 4.17 arcsec per pixel, +/- (say) 2 percent). To get the scale in the first place, take an image and submit it to astrometry.net via the webpage manually, and lookup the pixelscale on the resultpage.
You need to register with astrometry.net first to use their API, you will get a "key" code after registering.
A little helper script nova_query.sh passes the data to the astrometry.net script:
Code: Select all
#!/bin/bash
mydir=`dirname $0`
imagefile=$1
outfile=$2
defscale=4.17
scale=${3:-$defscale}
python client/client.py -k `cat $mydir/key.txt` --server=http://nova.astrometry.net/api/ -u $imagefile --wcs=$outfile -p --scale-est=$scale --scale-units=arcsecperpix --crpix-center --scale-err=2 $@
The script is called like this:
and then you can extract the coordinates with the tool wcshead from the result file res.fit (wcshead is part of the package wcstools that you can install via aptitude)../nova_query.sh /tmp/stream/pic.jpg res.fit
e.g.:
Code: Select all
$ wcshead res.fit
res.fit 640 480 RA---TAN DEC--TAN 330.272 83.677 FK5 321.00 241.00 4.1720 4.1627 218.6021
[One problem is that the astrometry.net script seems to have a bug: when the plate-solving fails, the script will loop forever. I managed to hack it to terminate upon failure, but I need to make a cleaner patch. ]
e) Displaying the coordinates: I've ordered a 4x20 character LCD for the PI but it hasn't arrived yet.
f) streaming the images to check focus etc.:
I use MJPG-streamer to stream the latest picture taken by raspistill so I can check the focus and image quality ( http://www.raspberrypi.org/forums/viewtopic.php?t=48597 ).
I probably also want to have a pushbutton on the PI to initiate the whole procedure, because I don't want to spam nova.astrometry.net in an endless loop.
I'm not quite sure how useful this is for me but it might be useful for others working on robotic telescope setups. Any comments welcome.
Cheers
HB