Index: trunk/tools/bills/concatsmf
===================================================================
--- trunk/tools/bills/concatsmf	(revision 38746)
+++ trunk/tools/bills/concatsmf	(revision 38748)
@@ -33,13 +33,29 @@
 my $output = shift;
 
-my $stilts="java -jar $ENV{HOME}/tools/stilts.jar";
+# TODO: make this an option
+my $stiltsJar = '/home/panstarrs/bills/jars/stilts.jar';
+
+my $stilts="java -jar $stiltsJar";
 
 my $ofmt = 'fits';
 
 my $infilename = basename($smf);
+
+my $path;
+if ($smf =~ /^neb:/) {
+    $path = `neb-locate -p $smf`;
+    if (!$path) {
+        die "ailed to find location of $smf\n";
+    }
+    print $path if $verbose;
+    chomp $path;
+} else {
+    $path = $smf;
+}
+
 my ($exp_name, $exp_id, $cam_id);
 ($exp_name, $exp_id, undef, $cam_id) = split '\.', $infilename;
 
-print "$exp_name $exp_id $cam_id\n";
+print "$exp_name $exp_id $cam_id\n" if $verbose;
 my $extension = "";
 
@@ -50,5 +66,5 @@
     }
     $extension = sprintf "XY%02d.psf", $ota;
-    extract_chip($smf, $output, $exp_id, $ota, $extension);
+    extract_chip($path, $output, $exp_id, $ota, $extension);
     exit 0;
 }
@@ -69,5 +85,5 @@
         my ($ofile, $out) = tempfile ("$dir/$ota.XXXX", SUFFIX => '.cmf', UNLINK => !$save_temps);
         print $listfile "$out\n";
-        extract_chip($smf, $out, $exp_id, $ota, $extension);
+        extract_chip($path, $out, $exp_id, $ota, $extension);
     }
 }
@@ -94,5 +110,5 @@
 
     # Add a column IMAGE_ID which we can match with the imageID in the Detection table.
-    my $cmd = "$stilts tpipe in=$in'#'$extension out=$out ofmt=$ofmt cmd='addcol -after IPP_IDET IMAGE_ID $imageID;' join=1or2";
+    my $cmd = "$stilts tpipe in=$in'#'$extension out=$out ofmt=$ofmt cmd='addcol -after IPP_IDET IMAGE_ID $imageID;'";
 
     print "$cmd\n" if $verbose;
