Index: trunk/pstamp/lib/PStamp/Job.pm
===================================================================
--- trunk/pstamp/lib/PStamp/Job.pm	(revision 18988)
+++ trunk/pstamp/lib/PStamp/Job.pm	(revision 19001)
@@ -188,15 +188,4 @@
 }
 
-sub lookup_byexp {
-    my $ipprc    = shift;
-    my $image_db = shift;
-    my $img_type = shift;
-    my $exp_name = shift;
-    my $class_id = shift;
-
-    return undef;
-}
-
-#        $results = lookup_bycoord($ipprc, $image_db, $x, $y, $mjd_min, $mjd_max, $filter);
 sub lookup_bycoord {
     my $ipprc    = shift;
@@ -216,5 +205,7 @@
     }
 
-    # XXX TODO: we don't yet do real lookups by cordinate but we can lookup by date and filter
+    # XXX TODO:
+    # Full lookups by coordinate require looking at the DVO database. However, 
+    # dateobs and filter which is all that MOPS has asked for.
 
     my $args;
@@ -231,6 +222,15 @@
     }
 
+    if (!$args) {
+        # avoid returning every exposure in the DB
+        print STDERR "no query arguments provided for bycoord\n";
+        return undef;
+    }
+
     # XXX TODO: This query doesn't work Something appears to be out of
     # sync about the times I'm passing and what regtool and or the DB expect
+    # the query I used in the C version of locateimages used
+    # WHERE dateobs >= FROM_UNIXTIME(%ld) AND dateobs <= FROM_UNIXTIME(%ld + exp_time)
+
     my $command = "$regtool -processedexp -dbname $image_db $args";
 
