Index: /tags/ipp-ops-20220705/ippScripts/scripts/nightly_science.pl
===================================================================
--- /tags/ipp-ops-20220705/ippScripts/scripts/nightly_science.pl	(revision 42341)
+++ /tags/ipp-ops-20220705/ippScripts/scripts/nightly_science.pl	(revision 42342)
@@ -1560,5 +1560,4 @@
         $input_sth .=   " rawExp LEFT JOIN chipRun USING (exp_id) LEFT JOIN camRun USING (chip_id) LEFT JOIN camProcessedExp USING(cam_id) LEFT JOIN fakeRun USING (cam_id) LEFT JOIN warpRun USING (fake_id) ";
         $input_sth .=   " WHERE chipRun.label = '$label' AND chipRun.data_group = '$data_group' AND rawExp.filter = '$filter' AND rawExp.object = '$this_object' ";
-        $input_sth .=   " AND camProcessedExp.fwhm_major <= $maxFWHM ";
         $input_sth .=   " AND substr(rawExp.comment, 1, position(' ' in rawExp.comment)) = '$this_chunk' ORDER BY rawExp.comment,dateobs ";
 
@@ -1574,5 +1573,7 @@
             my $this_state   = ${ $this_warp }[4];
             my $this_warp_id  = ${ $this_warp }[1];
-            my $chip_state   = ${ $this_warp }[6];
+            my $this_fwhm   = ${ $this_warp }[6];
+            my $chip_state   = ${ $this_warp }[7];
+            my $cam_state   = ${ $this_warp }[8];
             my $cam_state   = ${ $this_warp }[7];
 	    
@@ -1585,6 +1586,6 @@
             }
 
-            if (($this_quality != 0) || ($this_state eq 'drop') ) {
-                print STDERR "diff_queue: excluding $this_exp_id for $this_object due to non-zero cam.quality $this_quality or state $this_state\n";
+            if (($this_quality != 0) || ($this_state eq 'drop') || ($this_fwhm > $maxFWHM)) {
+                print STDERR "diff_queue: excluding $this_exp_id for $this_object due to non-zero cam.quality $this_quality or state $this_state or FWHM $this_fwhm\n";
             }
             else {
@@ -1786,7 +1787,8 @@
                 my $this_quality = ${ $this_warp }[5];
                 my $this_state   = ${ $this_warp }[4];
-                my $this_fwhm   = ${ $this_warp }[7];
                 my $this_warp_id  = ${ $this_warp }[1];
-                my $chip_state   = ${ $this_warp }[8];
+                my $this_fwhm   = ${ $this_warp }[6];
+                my $chip_state   = ${ $this_warp }[7];
+                my $cam_state   = ${ $this_warp }[8];
                 my $cam_state   = ${ $this_warp }[9];
 
@@ -2177,7 +2179,8 @@
                 my $this_quality = ${ $this_warp }[5];
                 my $this_state   = ${ $this_warp }[4];
-                my $this_fwhm    = ${ $this_warp }[7];
                 my $this_warp_id  = ${ $this_warp }[1];
-                my $chip_state   = ${ $this_warp }[8];
+                my $this_fwhm    = ${ $this_warp }[6];
+                my $chip_state   = ${ $this_warp }[7];
+                my $cam_state   = ${ $this_warp }[8];
                 my $cam_state   = ${ $this_warp }[9];
 
