Index: trunk/pstamp/scripts/detectability_respond.pl
===================================================================
--- trunk/pstamp/scripts/detectability_respond.pl	(revision 28929)
+++ trunk/pstamp/scripts/detectability_respond.pl	(revision 29050)
@@ -98,4 +98,8 @@
 	    my $key = shift(@key_values);
 	    my $val = shift(@key_values);
+	    # if we have wisdom, then we should have updated already.  If not, we'll bomb out later in the code.
+	    if ($key eq 'FAULT') {
+		$val = 0;
+	    }
 	    $query{$fpa_id}{$key}[$i] = $val;
 	}
@@ -148,36 +152,36 @@
 	# Determine the query style for this fpa_id
 	if ($fpa_id =~ /o.*g.*o/) {
-	$query_style = 'byexp';
-    }
+	    $query_style = 'byexp';
+	}
 	elsif ($fpa_id =~ /\d+/) {
-	$query_style = 'byid';
-    }
+	    $query_style = 'byid';
+	}
 	else {
-	exit_with_failure(21,"Parse error in request file");
-    }
+	    exit_with_failure(21,"Parse error in request file");
+	}
 	# Confirm that we only have one stage/filter/mjd
 	for (my $i = 0; $i <= $#{ $query{$fpa_id}{STAGE} }; $i++) {
-	$temp_hash{STAGE}{$query{$fpa_id}{STAGE}[$i]} = 1;
-	$temp_hash{FILTER}{$query{$fpa_id}{FILTER}[$i]} = 1;
-	$temp_hash{'MJD-OBS'}{$query{$fpa_id}{'MJD-OBS'}[$i]} = 1;
-    }
+	    $temp_hash{STAGE}{$query{$fpa_id}{STAGE}[$i]} = 1;
+	    $temp_hash{FILTER}{$query{$fpa_id}{FILTER}[$i]} = 1;
+	    $temp_hash{'MJD-OBS'}{$query{$fpa_id}{'MJD-OBS'}[$i]} = 1;
+	}
 	if (scalar(keys(%{ $temp_hash{STAGE} })) == 1) {
 	    $stage = (keys(%{ $temp_hash{STAGE} }))[0];
 	}
 	else {
-	exit_with_failure(21,"Too many STAGEs specified");
-    }
+	    exit_with_failure(21,"Too many STAGEs specified");
+	}
 	if (scalar(keys(%{ $temp_hash{FILTER} })) == 1) {
-	$filter = (keys(%{ $temp_hash{FILTER} }))[0];
-    }
+	    $filter = (keys(%{ $temp_hash{FILTER} }))[0];
+	}
 	else {
-	exit_with_failure(21,"Too many FILTERs specified");
-    }
+	    exit_with_failure(21,"Too many FILTERs specified");
+	}
 	if (scalar(keys(%{ $temp_hash{'MJD-OBS'} })) == 1) {
-	$mjd = (keys(%{ $temp_hash{'MJD-OBS'} }))[0];
-    }
+	    $mjd = (keys(%{ $temp_hash{'MJD-OBS'} }))[0];
+	}
 	else {
-	exit_with_failure(21,"Too many MJD-OBS specified");
-    }
+	    exit_with_failure(21,"Too many MJD-OBS specified");
+	}
 	# Set common request components
 	my $option_mask |= 1;
@@ -231,6 +235,6 @@
 		    }
 		    else {
-		    $query{$fpa_id}{CATALOG}[$valid_index] = $this_image_ref->{cmf};
-		}
+			$query{$fpa_id}{CATALOG}[$valid_index] = $this_image_ref->{cmf};
+		    }
 		    if (exists($this_image_ref->{class_id})) {
 			$query{$fpa_id}{COMPONENT_ID}[$valid_index] = $this_image_ref->{class_id};
@@ -304,5 +308,5 @@
 	    ($query{$fpa_id}{STATE}[$i],$query{$fpa_id}{STAGE}[$i],$query{$fpa_id}{STAGE_ID}[$i],
 	     $query{$fpa_id}{COMPONENT_ID}[$i],$query{$fpa_id}{NEED_MAGIC}[$i],$query{$fpa_id}{IMAGE_DB}[$i]);
-	push @{ $processing_request{$fpa_id}{$query{$fpa_id}{IMAGE}[$i]} }, $i;
+ 	push @{ $processing_request{$fpa_id}{$query{$fpa_id}{IMAGE}[$i]} }, $i;
     }
 }
@@ -384,6 +388,6 @@
 	    my ($r_ra,$r_dec,$trash,$r_x,$r_y,$r_chip) = split /\s+/, $line;
 	    print $targetfile "$r_x $r_y\n";
-	    if (($r_ra == $query{$fpa_id}{RA1_DEG}[$processing_request{$fpa_id}{$image}[$i]])&&
-		($r_dec == $query{$fpa_id}{DEC1_DEG}[$processing_request{$fpa_id}{$image}[$i]])) {
+	    if ((abs($r_ra - $query{$fpa_id}{RA1_DEG}[$processing_request{$fpa_id}{$image}[$i]]) < 1e-8)&&
+		(abs($r_dec - $query{$fpa_id}{DEC1_DEG}[$processing_request{$fpa_id}{$image}[$i]]) < 1e-8)) {
 		$query{$fpa_id}{X_PXL}[$processing_request{$fpa_id}{$image}[$i]] = $r_x;
 		$query{$fpa_id}{Y_PXL}[$processing_request{$fpa_id}{$image}[$i]] = $r_y;
@@ -392,5 +396,5 @@
 	    else {
 		$error_code = $PS_EXIT_PROG_ERROR;
-		my_die("Unable to match input RA/DEC with output RA/DEC: ($query{$fpa_id}{RA1_DEG}[$i],$query{$fpa_id}{DEC1_DEG}[$i]) -> ($r_ra,$r_dec) i. $error_code",
+		my_die("Unable to match input RA/DEC with output RA/DEC: ($query{$fpa_id}{RA1_DEG}[$i],$query{$fpa_id}{DEC1_DEG}[$i]) -> ($r_ra,$r_dec) $error_code",
 		   $query{$fpa_id}{QUERY_ID}[$index],$fpa_id,$query{$fpa_id}{'MJD-OBS'}[$index],
 		   $query{$fpa_id}{FILTER}[$index],$query{$fpa_id}{OBSCODE}[$index],$query{$fpa_id}{STAGE}[$index],
