Index: trunk/pstamp/scripts/dquery_job_run.pl
===================================================================
--- trunk/pstamp/scripts/dquery_job_run.pl	(revision 33282)
+++ trunk/pstamp/scripts/dquery_job_run.pl	(revision 33285)
@@ -2,5 +2,5 @@
 #
 #
-# Create a response to a MOPS_DETECTABILITY_QUERY
+# Run a detectability query job
 #
 #
@@ -170,5 +170,5 @@
 }
 
-my $results = "$outroot.results";
+my $results = "${output_base}results.txt";
 open OUT, ">$results" or 
         my_die("Failed to open results file $results",
@@ -183,5 +183,5 @@
 my ($tmp_Npix,$tmp_Qfact,$tmp_flux,$tmp_flux_error) = read_cmf_file($cmf,$rows[0]->{EXTENSION_BASE});
 $i = 0;
-print OUT "ROWNUM PROC_ERROR NPIX QFACTOR FLUX FLUX_SIG STAGE STAGE_ID COMPONENT CMFFILE\n";
+print OUT "ROWNUM PROC_ERROR NPIX QFACTOR FLUX FLUX_SIG FPA_ID STAGE STAGE_ID COMPONENT CMFFILE\n";
 foreach my $row (@rows) {
     $row->{PROC_ERROR} = $params->{PROC_ERROR};
@@ -192,5 +192,5 @@
     $row->{FLUX_SIG} = ${ $tmp_flux_error }[$i];
     
-    print OUT "$row->{ROWNUM} $row->{PROC_ERROR} $row->{NPIX} $row->{QFACTOR} $row->{FLUX} $row->{FLUX_SIG} $stage $stage_id $component $cmfbase\n";
+    print OUT "$row->{ROWNUM} $row->{PROC_ERROR} $row->{NPIX} $row->{QFACTOR} $row->{FLUX} $row->{FLUX_SIG} $fpa_id $stage $stage_id $component $cmfbase\n";
     $i++;
 }
