Jump to content

Banner.jpg.b83b14cd4142fe10848741bb2a14c66b.jpg

Star Hopping with on-the-fly Astrometry


badgers

Recommended Posts

Check out their forums, there are a few people there having issues compiling.

For some reason the makefile also doesn't seem to clean properly, so its also worth unpacking it again, making the netpbm modifications and trying a clean rebuild.

Sorry its now working out : (

I got my goto mount today, but I'm still using this technique for framing, working a treat.

Link to comment
Share on other sites

  • Replies 206
  • Created
  • Last Reply

Ok, this is for a build on Ubuntu 11.10 and I'm using a fresh copy of the sources. I'm actually using the astrometry.net-20082 snapshot to get around the problem with the maths library being linked in the wrong order that causes errors with "roundf" being undefined amongst others.

On line 325 of util/Makefile I changed

$(CFLAGS) -DTEST_NETPBM $(LDFLAGS) $(NETPBM_INC_ORIG) $(NETPBM_LIB_ORIG) $^ > /dev/null && \

to read:

$(CFLAGS) -DTEST_NETPBM $(LDFLAGS) $(NETPBM_INC_ORIG) $^ $(NETPBM_LIB_ORIG) > /dev/null && \

note that the order of

^$

and

$(NETPBM_LIB_ORIG)

has been swapped.

I did the same change on line 337 of the same file, from:

$(CFLAGS) -DTEST_NETPBM_MAKE $(LDFLAGS) $(NETPBM_INC_ORIG) $(NETPBM_LIB_ORIG) $^ > /dev/null && \

to:

$(CFLAGS) -DTEST_NETPBM_MAKE $(LDFLAGS) $(NETPBM_INC_ORIG) $^ $(NETPBM_LIB_ORIG) > /dev/null && \

That appears to get the build system to correctly recognise that the netpbm library is present and to link it in the correct order.

It may be possible to make this change and then just do

make clean reconfig

in a build source tree, but I've not tried that. I've also obviously not tested your exact case because I don't know what command line you're running.

James

Link to comment
Share on other sites

Seems it's not to be.. after a solve


Failed to read input image /tmp/tmp.ppm.mXnfR8: No such file or directory
Failed to read input image /tmp/tmp.ppm.mXnfR8: No such file or directory

and it seems...


xscode@Persephone:/tmp$ ls tmp*
tmp.fits.1WFDh1 tmp.fits.AMBGKO

looks like it's changing tmp filenames in the middle of the solve :/

My source with the edits just in case it helps...

http://dl.dropbox.com/u/13321962/astrometry.tar.gz

Link to comment
Share on other sites

As regards the sources, I can only find one difference between yours and mine which is that you don't appear to have done the second edit to util/Makefile at line 325.

James

Link to comment
Share on other sites

hmm... I thought I had... lemmie try again..

edit: don't I feel stupid... looks like i copied and pasted the wrong box ... lol ... tnx for all your help!

edit2: BTW, I couldn't get any fields to solve using the tyco data badgers posted, so I built my own that seems to work for me... I post it so anyone else can try it.

http://dl.dropbox.com/u/13321962/tyco2_indexes.tar.gz

edit3: With my indexes and badgers I've so far failed to find an image that takes longer to solve than 10 seconds!!! My catalogs seem to work better on wide fields and badgers on more zoomed ones.

Link to comment
Share on other sites

Are you solving RAW files ? or JPEGs ?

I find that the image intensity, color balance and image size really affect the speed of processing.

I had to tweak my RAW processing quite a bit before they'd solve first time and quickly.

Anyway, nice work on those indices.

Link to comment
Share on other sites

Hi All,

Dumb question can you use this on win7 ??

John

You could, you'd need to install Cygwin and run it through that, but it would be a long and difficult process to get working right, I'd say.

Link to comment
Share on other sites

Are you solving RAW files ? or JPEGs ?

I find that the image intensity, color balance and image size really affect the speed of processing.

I had to tweak my RAW processing quite a bit before they'd solve first time and quickly.

Anyway, nice work on those indices.

I've just been using random photo's from here there and everywhere to test atm, but I will be using DNG Raw's for my own usage.

Link to comment
Share on other sites

  • 4 weeks later...

I will try and piece together exactly what I did to compile on mac.

It was an absolute nightmare and involved hacking makefiles and some of the C-code.

Perhaps it's easier for me to send you compiled mac binaries ?

PM me and I'll work out how to get the binaries to you.

Link to comment
Share on other sites

  • 4 months later...

Hmmmm... I never checked this.....

However the RA/DECs that are fed back to stellarium seem pixel perfect to me for every target so far.

The CCD field of view I get in stellarium is slightly out though, probably as my scope is running slightly shorter than 750mm.

Anton

Link to comment
Share on other sites

Hello Anton, I just used your starhop.pl program and it could have saved me a lot of time last night. Well done! It works like a charm. I already had cygwin installed (and astrometry.net on it) so it was a quick edit to your script ( I use JPG files for starhopping and don't need the plot annotations as I will be using the stellarium link) and presto! I used some JPGs from last night. For some reason they were taking a long time to solve but now they only took a few seconds - I must have messed up the options somehow. Sure enough, as soon as they were solved, Stellarium showed me where the centre of the FOV was. Brilliant!

Here's my modified script, I've added some solve options that work well for me (my image scale is about 5.5 arcseconds/pixel)

PS: the JNOW/J2000 issue is resolved because in Stellarium's dialog for setting up telescopes you can specify that the coordinates transferred are J2000.


#!/usr/bin/perl -w
#
# A Simple Star-Hopping Astrometry Server Script
# Anton Enright - aje@ebi.ac.uk
#
#
use POSIX;
use IO::Socket;
use strict;
use Math::BigInt;
my $store_all=0;
my $stellarium_port="10004";
my $stell_connect=1;
my $photos_dir="/cygdrive/c/pa/";
my $astrometry_dir="/usr/local/astrometry/";
my $outfile=0;
my $delay=2;
my %pre_store;
foreach my $arg(@ARGV){
if ($arg eq '-all'){
$store_all=1;
}
if ($arg =~ /-dir=(\S+)/){
$photos_dir=$1;
}
if ($arg =~ /-port=(\d+)/){
$stellarium_port=$1;
}
if ($arg =~ /-o=(.*)/){
$outfile=$1;
}
if ($arg =~ /-stellarium/){
$stell_connect=1;
}
if ($arg =~ /-delay (\d+)/){
$delay=$1;
}
}
if (!-e "$astrometry_dir/bin/solve-field"){
die "Error: astrometry software not found";
}
if (!-d $photos_dir){
die "Error: Photos Directory $photos_dir does not exist or cannot be accessed";
}
pre_store_files($photos_dir);
print "Server started, monitoring: $photos_dir\n";
if ($store_all){
print "Will create astrometry images for any unsolved picture\n";
} else {
print "Will create astrometry image for new photos\n";
}
my $ra=12;
my $dec=90;
$| = 1;
my $client_socket = "";
if ($stell_connect){
my $socket = new IO::Socket::INET (
LocalHost => '127.0.0.1',
LocalPort => $stellarium_port,
Proto => 'tcp',
Listen => 1,
Reuse => 1
);
die "Coudn't open socket" unless $socket;
print "TCPServer Waiting for Stellarium to connect on port $stellarium_port\n";
$client_socket = $socket->accept();
my $peer_address = $client_socket->peerhost();
my $peer_port = $client_socket->peerport();
print "Stellarium Connected\n";
}

while(1)
{

check_for_shots($photos_dir);
sleep($delay);
my $curr_ra=($ra/360)*0x100000000;
my $curr_dec=($dec/90)*0x40000000;
if ($stell_connect){
my $fmt="iiiIii";
my $packet=pack($fmt,24,0,time(),$curr_ra,$curr_dec,0);
for (my $i=0;$i<=100;$i++){
$client_socket->send($packet);
}
}
}
sub pre_store_files{
my $dir=$_[0];
my @files=`ls -t $dir/*.JPG`;
foreach my $file(@files){
$pre_store{$file}=1;
}
}
sub check_for_shots{
my $dir=$_[0];
# Select latest file which has not been solved
my @files=`ls -t $dir/*.JPG`;
foreach my $file (@files){
chomp($file);
my $stem=$file;
$stem=~ s/.JPG$//g;
my $solved= $stem . "_solved.jpg";
my $field_ra;
my $field_dec;
my $process_flag=0;
if (!$store_all){
if (!defined($pre_store{$file})){
$process_flag=1;
} else {
$process_flag=0;
}
} else {
$process_flag=1;
}
if (!-e "$solved"){
if ($process_flag==1){
$pre_store{$file}=1;
if ($outfile){
$solved=$outfile;
}
chomp($file);
print "Processing: $file to $solved\n";
system("djpeg $file > /tmp/go.ppm");
open(PROC,"$astrometry_dir/bin/solve-field /tmp/go.ppm -B none -P none -M none -S none -R none -U none -N none --downsample 2 --overwrite --no-plots --scale-units app --scale-low 5 --scale-high 6|");
while(<PROC>){
chomp();
if (/^Field center: \(RA,Dec\) = \(([^)]+)\) deg.$/){
($field_ra,$field_dec)=split(",",$1);
}
}
if (defined($field_ra) && defined($field_dec)){
$ra=$field_ra;
$dec=$field_dec;
# system("$astrometry_dir/bin/plot-constellations -B -j -C -N -G 5 -w /tmp/go.wcs -i /tmp/go.ppm -f 35 -o /tmp/go_cons.png >/dev/null");
# system("convert /tmp/go_cons.png -gravity South -background Plum -splice 0x78 -pointsize 72 -annotate +0+2 \"RA: $field_ra, DEC: $field_dec\" $solved");
print "SOLVED: RA/DEC to $ra $dec\n";
} else {
print "UNSOLVED\n";
# system("convert /tmp/go.ppm -gravity South -background Plum -splice 0x78 -pointsize 72 -annotate +0+2 \"RA: UNSOLVED, DEC: UNSOLVED\" $solved");
}
system("rm /tmp/go*");
last();
}
}
}
}
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.