IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 42316


Ignore:
Timestamp:
Dec 5, 2022, 1:30:27 PM (4 years ago)
Author:
tdeboer
Message:

nightly_science.pl better chip and cam check

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippScripts/scripts/nightly_science.pl

    r42306 r42316  
    15571557        my $this_object = shift @{ $object_row };       
    15581558        my $this_chunk = shift @{ $object_row };
    1559         my $input_sth = "select exp_id,warp_id,dateobs,rawExp.comment,warpRun.state AS warp_state,camProcessedExp.quality,chipRun.state FROM ";
     1559        my $input_sth = "select exp_id,warp_id,dateobs,rawExp.comment,warpRun.state AS warp_state,camProcessedExp.quality,chipRun.state,camRun.state FROM ";
    15601560        $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) ";
    15611561        $input_sth .=   " WHERE chipRun.label = '$label' AND chipRun.data_group = '$data_group' AND rawExp.filter = '$filter' AND rawExp.object = '$this_object' ";
     
    15751575            my $this_warp_id  = ${ $this_warp }[1];
    15761576            my $chip_state   = ${ $this_warp }[6];
     1577            my $cam_state   = ${ $this_warp }[7];
    15771578           
    15781579            #find exposures for this object that have not been fully processed
    1579             if (($this_warp_id eq 'NULL') && (($this_quality == 0) || ($this_quality eq 'NULL') || ($chip_state eq 'run') ) ) {
    1580                 $Nbad += 1;
     1580            if (($this_warp_id eq 'NULL') && (($this_quality == 0) || ($this_quality eq 'NULL')) ) {
     1581                $Nbad += 1;
     1582            }
     1583            if (($chip_state ne 'full') || ($cam_state ne 'full') ) {
     1584                $Nbad += 1;
    15811585            }
    15821586
     
    17651769            my $this_chunk = shift @{ $object_row };
    17661770       
    1767             my $input_sth = "select exp_id,warp_id,dateobs,rawExp.comment,warpRun.state AS warp_state,camProcessedExp.quality,substr(comment, 1, position(' ' in comment)),camProcessedExp.fwhm_major,chipRun.state FROM ";
     1771            my $input_sth = "select exp_id,warp_id,dateobs,rawExp.comment,warpRun.state AS warp_state,camProcessedExp.quality,substr(comment, 1, position(' ' in comment)),camProcessedExp.fwhm_major,chipRun.state,camRun.state FROM ";
    17681772            $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) ";
    17691773            $input_sth .=   " WHERE chipRun.label = '$label' AND chipRun.data_group = '$data_group' AND rawExp.filter = '$filter' AND rawExp.object = '$this_object' ";
     
    17851789                my $this_warp_id  = ${ $this_warp }[1];
    17861790                my $chip_state   = ${ $this_warp }[8];
     1791                my $cam_state   = ${ $this_warp }[9];
    17871792
    17881793                #find exposures for this object that have not been fully processed
    1789                 if (($this_warp_id eq 'NULL') && (($this_quality == 0) || ($this_quality eq 'NULL') || ($chip_state eq 'run') ) ) {
    1790                     $Nbad += 1;
    1791                 }
     1794                if (($this_warp_id eq 'NULL') && (($this_quality == 0) || ($this_quality eq 'NULL')) ) {
     1795                    $Nbad += 1;
     1796                }
     1797                if (($chip_state ne 'full') || ($cam_state ne 'full') ) {
     1798                    $Nbad += 1;
     1799                }
    17921800
    17931801                if (($this_quality != 0) || ($this_state eq 'drop') || ($this_fwhm > $maxFWHM)) {
     
    21522160            my $this_chunk = shift @{ $object_row };
    21532161       
    2154             my $input_sth = "select exp_id,warp_id,dateobs,rawExp.comment,warpRun.state AS warp_state,camProcessedExp.qualityy,substr(comment, 1, position(' ' in comment)),camProcessedExp.fwhm_major,chipRun.state FROM ";
     2162            my $input_sth = "select exp_id,warp_id,dateobs,rawExp.comment,warpRun.state AS warp_state,camProcessedExp.quality,substr(comment, 1, position(' ' in comment)),camProcessedExp.fwhm_major,chipRun.state,camRun.state FROM ";
    21552163            $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) ";
    21562164            $input_sth .=   " WHERE chipRun.label = '$label' AND chipRun.data_group = '$data_group' AND rawExp.filter = '$filter' AND rawExp.object = '$this_object' ";
     
    21722180                my $this_warp_id  = ${ $this_warp }[1];
    21732181                my $chip_state   = ${ $this_warp }[8];
     2182                my $cam_state   = ${ $this_warp }[9];
    21742183
    21752184                #find exposures for this object that have not been fully processed
    2176                 if (($this_warp_id eq 'NULL') && (($this_quality == 0) || ($this_quality eq 'NULL') || ($chip_state eq 'run') ) ) {
     2185                if (($this_warp_id eq 'NULL') && (($this_quality == 0) || ($this_quality eq 'NULL')) ) {
    21772186                    $Nbad += 1;
    21782187                }
     2188                if (($chip_state ne 'full') || ($cam_state ne 'full') ) {
     2189                    $Nbad += 1;
     2190                }
    21792191
    21802192                if (($this_quality != 0) || ($this_state eq 'drop') || ($this_fwhm > $maxFWHM)) {
Note: See TracChangeset for help on using the changeset viewer.