Jump to content

Banner.jpg.b89429c566825f6ab32bcafbada449c9.jpg

Star Hopping with on-the-fly Astrometry


badgers

Recommended Posts

Hello DIYers, I wanted to share a little software project I've been working on.

I've used the astrometry server at nova.astrometry.net for a while now to submit pictures to their servers to identify stars.

The online servers take an age to process your images, but work really well.

I wondered whether or not this would be useful for those of us without goto scopes to aid star-hopping to faint fuzzes via an attached camera.

An evening of hunting for M81 in bad seeing convinced me to give this a try, and I'm amazed with the results.

My main worry was that it would take too long to solve images, but I'm happy to say that the local version, if run well, can solve images very quickly (i.e. faster than you can shoot another one).

Requirements:

  • Mac OSX or Linux
  • Camera connected through the scope that places images on the laptop via USB etc.
  • A local copy of astrometry (source available from Astrometry - Astrometry.net)
  • A compatible star catalog file (I compiled mine from Tycho)
  • A simple script that monitors the folder where your DSLR images land and sends information to stellarium.
  • dcraw if processing RAW images
  • Imagemagick to convert images.
  • Stellarium (optional)

Installation:

Compiling the astrometry tools is a little time-consuming but works very well. If you are a mac user I can give you advice on this.

You need the script (attached) and also dcraw and imagemagick available on your system.

Macports or apt-get tools on linux will get imagemagick and draw if they are not already installed.

Usage:

It's all essentially automatic once the script is running....

Start the script running, start stellarium, then shoot pictures and it'll tell you what you are looking at every 20-30 seconds.

  • Start the starhop script and leave it run in the background.
  • Take a 5-20 second image
  • The script watches for new images landing in your astro photos directory.
  • The script processes the latest RAW file and sends it to the local astrometry program.
  • Astrometry attempts to solve the image within 15 seconds (It usually takes 6-8 seconds).
  • The solved image is annotated and placed somewhere of your choosing.
  • The RA/DEC and field information are parsed.
  • Stellarium receives the RA/DEC information from the script and plots the coordinates on the star map.
  • Adjust the scope on RA/DEC or both and shoot another image.

A full pass of a new image takes about 20-30 seconds.

I was able to dramatically speed up my ability to locate objects down to a very small number of hops using this tool.

Here's a screenshot of the server log in action processing a star-hop on my way to M81. The window on the left is the log from the server script, you don't need to view this you can just let it run permanently in the background. The window on the right shows the astrometry information plotted in Stellarium. The bottom window is my DSLR capture software. The bottom-right window is the solution to the last DSLR capture.

6884360384_37ab076d0f_b.jpg

(click to make bigger).

Here's an example solved image

6884363686_629629a41a_b.jpg

The accuracy is very very good, using the stars in the image to determine your current RA/DEC is obviously going to give you near-perfect results, assuming you can solve the image.

The Perl script I wrote to detect incoming picture files, run astrometry and communicate with stellarium is attached.

Script Options:

-dir=/directory <- location of where your astrophotos land

-o=/directory/solved.jpg <- put solved images here

-stellarium <- connect to Stellarium for results display

-port <- set the port number for Stellarium (default is 10001)

-delay <- set the timer for checking for new images (seconds)

The catalog files I compiled for astrometry are available here (large download).

Anyway, if any mac or linux users want to give it a bash then drop me a line. The only difficult bit is compiling the astrometry tools.

starhop.zip

Link to comment
Share on other sites

  • Replies 206
  • Created
  • Last Reply

This is a really cool/original application of Stellarium's telescope control code. Nice hack! ;)

KStars recently introduced a native star-hopping plug-in. There was a suggestion to port it to Stellarium, but nobody seems to have time even for higher priority tasks. :)

Link to comment
Share on other sites

I forgot to post the setup on the Stellarium Side:

  1. Go to telescope control configuration
  2. Add a new scope
  3. Select 'External software on a remote computer'
  4. Name: set to "Astrometry Server" or something similar
  5. Connection delay: 0.5
  6. Host: localhost TCP Port: 10001
  7. Connect at startup: ticked.
  8. All other default settings are fine
Link to comment
Share on other sites

This is a really cool/original application of Stellarium's telescope control code. Nice hack! ;)

KStars recently introduced a native star-hopping plug-in. There was a suggestion to port it to Stellarium, but nobody seems to have time even for higher priority tasks. :)

I've not tried Kstars, I should definitely give it a try it looks really good.

Link to comment
Share on other sites

Interesting ;) Wish I could use Linux for everything ;) But I guess with so many Windoze machines about that is unlikely :p I guess XP SP3 is just about bearable :)

Link to comment
Share on other sites

I managed to get the software to solve an image using my own tycho2 indexes, but I can't for the life of me get it to produce the PNG image afterwards, it always fails. Ubuntu 11.10

Link to comment
Share on other sites

Yes, this should work on Cygwin on Windows.

I'm tempted to have a crack at a little JAVA Gui Interface for this.

I was using it again last night, and again it has really really made finding objects and framing them a total breeze.

I could ask the friendly people at astrometry.net whether they would mind cygwin binaries of their software distributed with it. Then it would be possible to run it on windows mac and linux with a neat little GUI without having to install a million libraries and other things.

Link to comment
Share on other sites

That's the small version, I think the one they use on their servers goes up to about 20 Gb.

The tycho 2 atlas can solve most things just fine for me.

Actually, its solving things with huge wobble, trees and houses too, and still quite quickly. The attached JPG was me monkeying about around the jellyfish nebula not really expecting it to solve anything as I bumped the scope during a quick 8 sec capture.

I flew around the sky last night tracking down objects I'm planning to image. Managed to get it to line up and frame the Rosette Nebula in about 10 minutes before it dropped behind houses. I've never managed to image the Rosette before as by the time I get anywhere near it, its gone too low.

Please let me know of any issues in the script, I've already found a few small bugs, I'll be updating the script shortly.

I've already realised that the location of astrometry software seems to be hardcoded and requires editing, I'll tidy things up tomorrow.

post-31839-13387775792_thumb.jpg

Link to comment
Share on other sites

Other issues:

* Ability to work on JPG or TIFF or other formats, currently it only watches for CR2 files. This is easy to fix.

* Camera Field Rotation: Currently, I have to manually rotate the camera field in Stellarium to get it to match. I don't think I can have the script communicate this to Stellarium but I should be able to have it compute the field rotation and print it to the log to make this quicker.

* Proper command-line options via --help

Link to comment
Share on other sites

I managed to get the software to solve an image using my own tycho2 indexes, but I can't for the life of me get it to produce the PNG image afterwards, it always fails. Ubuntu 11.10

Is this the astrometry side failing ? or my script ?

If it's my script then it sounds like a problem with imagemagick.

If its the solve-field or plot-constellations command then its likely a libPNG problem when it was compiled.

To debug this go and see what files have been produced in /tmp

the final result is go_cons.png and imagemagick is used to convert this to a jpg.

It is also possibly a missing fonts library, as imagemagick needs fonts (libfreetype) to annotate the image.

You can debug this in individual steps

1) Convert Canon RAW to a PPM file using DCRAW

dcraw -w -W -c somefile.CR2 > /tmp/go.ppm

2) Solve the astrometry using solve field (Downsample x3.0, 500 brightest objects, 20 second maximum)

/usr/local/astrometry/bin/solve-field /tmp/go.ppm -z 3.0 --overwrite -d 500 -l 20 -r

3) Plot Constellations on the image, make a PNG of the output

/usr/local/astrometry/bin/plot-constellations -B -j -C -N -G 5 -w /tmp/go.wcs -i /tmp/go.ppm -f 35 -o /tmp/go_cons.png

4) Convert PNG to a JPG locally using Imagemagick

convert /tmp/go_cons.png solved.jpg

Link to comment
Share on other sites

Sorry for the delay in replying, bad shifts this week :)

The problem is with my setup and compilation of the Astrometry software and more specifically with netpbm. I've trid lots of suggested solutions and nothing is working. I may try a different distro seeing as i'm using a VM.

Link to comment
Share on other sites

I did have one problem compiling, but that was down to the ordering of some flags relating to the maths library in the Makefiles. I've not found any netpbm-related problems as yet.

I'm using a clean installation of ubuntu 11.10, so if you want to tell me what command you're using and perhaps drop me the image you're working from, I'm quite happy to give it a go and see if I can find anything untoward.

James

Link to comment
Share on other sites

no matter what I do it won't find netppm...


cairoutils.c:681:cairoutils_read_ppm_stream: cairoutils.c:681:cairoutils_read_ppm_stream: Netpbm is not available; can't read PPM images
cairoutils.c:681:cairoutils_read_ppm_stream: Netpbm is not available; can't read PPM images
cairoutils.c:681:cairoutils_read_ppm_stream: Netpbm is not available; can't read PPM images
Netpbm is not available; can't read PPM images

yet...


xscode@Persephone-VM ~ $ sudo apt-get install netpbm
Reading package lists... Done
Building dependency tree
Reading state information... Done
netpbm is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 11 not upgraded.

xscode@Persephone-VM ~ $ sudo apt-get install libnetpbm10-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
libnetpbm10-dev is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 11 not upgraded.

do I need to edit the utils/makefile.netpbm with these paths?

/usr/include/netpbm-shhopt.h

/usr/lib/libnetpbm.a

Link to comment
Share on other sites

http://astrometry.net/svn/trunk/src/astrometry/README



AUTO-CONFIGURATION
------------------

We use a do-it-yourself auto-config system that tries to detect what
is available on your machine. It is called "os-features", and it
works by trying to compile, link, and run a number of executables to
detect:

-whether the "netpbm" library is available
-whether certain GNU-specific function calls exist

You can change the flags used to compile and link "netpbm" by either:

-editing util/makefile.netpbm
-setting NETPBM_INC or NETPBM_LIB, like this:
$ make NETPBM_INC="-I/tmp" NETPBM_LIB="-L/tmp -lnetpbm"

You can see whether netpbm was successfully detected by:

$ cat util/makefile.os-features
# This file is generated by util/Makefile.
HAVE_NETPBM := yes

You can force a re-detection either by deleting util/makefile.os-features
and util/os-features-config.h, or running:
$ make reconfig
(which just deletes those files)
Link to comment
Share on other sites

Thanks, but ....


We use a do-it-yourself auto-config system that tries to detect what
is available on your machine. It is called "os-features", and it
works by trying to compile, link, and run a number of executables to
detect:

[B]-whether the "netpbm" library is available[/B]

Obviously it's not working that well...

also ...


xscode@Persephone-VM ~ $ make NETPBM_INC="-I/usr/include/" NETPBM_LIB="-L/usr/lib/ -lnetpbm"

Ends with..


cairoutils.c:681:cairoutils_read_ppm_stream: cairoutils.c:681:cairoutils_read_ppm_stream: Netpbm is not available; can't read PPM images
cairoutils.c:681:cairoutils_read_ppm_stream: Netpbm is not available; can't read PPM images
libpng warning: Image width is zero in IHDRNetpbm is not available; can't read PPM images
cairoutils.c:681:cairoutils_read_ppm_stream: Netpbm is not available; can't read PPM images
Link to comment
Share on other sites

Are you on linux or OSX stu ?

I have a makefile that works for OSX, I had similar issues.

I can also compile static binaries.

If its linux then I'm not sure what to recommend.

EDIT: I see you are linux, I think its going to require tweaking the makefiles.

I edited my makefile.netpbm to:

NETPBM_INC ?= -I/opt/local/include/netpbm

NETPBM_LIB ?= -L/opt/local/lib -lnetpbm

Link to comment
Share on other sites

Thanks Badgers,

Yeah, I'm on Mint atm, so basically it's Ubuntu. I tried altering the makefile.netpbm to no avail. I tried compiling with the env's on the command line and now it won't even solve..lol!! time to try a RH distro me thinks..??

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. By using this site, you agree to our Terms of Use.