IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 42341 for trunk/ippScripts


Ignore:
Timestamp:
Jan 30, 2023, 3:53:53 PM (3 years ago)
Author:
tdeboer
Message:

nightly_science.pl update to deal with missing fwhm_major values

File:
1 edited

Legend:

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

    r42316 r42341  
    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,camRun.state FROM ";
     1559        my $input_sth = "select exp_id,warp_id,dateobs,rawExp.comment,warpRun.state AS warp_state,camProcessedExp.quality,camProcessedExp.fwhm_major,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' ";
    1562         $input_sth .=   " AND camProcessedExp.fwhm_major <= $maxFWHM ";
    15631562        $input_sth .=   " AND substr(rawExp.comment, 1, position(' ' in rawExp.comment)) = '$this_chunk' ORDER BY rawExp.comment,dateobs ";
    15641563
     
    15741573            my $this_state   = ${ $this_warp }[4];
    15751574            my $this_warp_id  = ${ $this_warp }[1];
    1576             my $chip_state   = ${ $this_warp }[6];
    1577             my $cam_state   = ${ $this_warp }[7];
     1575            my $this_fwhm   = ${ $this_warp }[6];
     1576            my $chip_state   = ${ $this_warp }[7];
     1577            my $cam_state   = ${ $this_warp }[8];
    15781578           
    15791579            #find exposures for this object that have not been fully processed
     
    15851585            }
    15861586
    1587             if (($this_quality != 0) || ($this_state eq 'drop') ) {
    1588                 print STDERR "diff_queue: excluding $this_exp_id for $this_object due to non-zero cam.quality $this_quality or state $this_state\n";
     1587            if (($this_quality != 0) || ($this_state eq 'drop') || ($this_fwhm > $maxFWHM)) {
     1588                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";
    15891589            }
    15901590            else {
     
    17691769            my $this_chunk = shift @{ $object_row };
    17701770       
    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 ";
     1771            my $input_sth = "select exp_id,warp_id,dateobs,rawExp.comment,warpRun.state AS warp_state,camProcessedExp.quality,camProcessedExp.fwhm_major,chipRun.state,camRun.state FROM ";
    17721772            $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) ";
    17731773            $input_sth .=   " WHERE chipRun.label = '$label' AND chipRun.data_group = '$data_group' AND rawExp.filter = '$filter' AND rawExp.object = '$this_object' ";
     
    17861786                my $this_quality = ${ $this_warp }[5];
    17871787                my $this_state   = ${ $this_warp }[4];
    1788                 my $this_fwhm   = ${ $this_warp }[7];
    17891788                my $this_warp_id  = ${ $this_warp }[1];
    1790                 my $chip_state   = ${ $this_warp }[8];
    1791                 my $cam_state   = ${ $this_warp }[9];
     1789                my $this_fwhm   = ${ $this_warp }[6];
     1790                my $chip_state   = ${ $this_warp }[7];
     1791                my $cam_state   = ${ $this_warp }[8];
    17921792
    17931793                #find exposures for this object that have not been fully processed
     
    21602160            my $this_chunk = shift @{ $object_row };
    21612161       
    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 ";
     2162            my $input_sth = "select exp_id,warp_id,dateobs,rawExp.comment,warpRun.state AS warp_state,camProcessedExp.quality,camProcessedExp.fwhm_major,chipRun.state,camRun.state FROM ";
    21632163            $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) ";
    21642164            $input_sth .=   " WHERE chipRun.label = '$label' AND chipRun.data_group = '$data_group' AND rawExp.filter = '$filter' AND rawExp.object = '$this_object' ";
     
    21772177                my $this_quality = ${ $this_warp }[5];
    21782178                my $this_state   = ${ $this_warp }[4];
    2179                 my $this_fwhm    = ${ $this_warp }[7];
    21802179                my $this_warp_id  = ${ $this_warp }[1];
    2181                 my $chip_state   = ${ $this_warp }[8];
    2182                 my $cam_state   = ${ $this_warp }[9];
     2180                my $this_fwhm    = ${ $this_warp }[6];
     2181                my $chip_state   = ${ $this_warp }[7];
     2182                my $cam_state   = ${ $this_warp }[8];
    21832183
    21842184                #find exposures for this object that have not been fully processed
Note: See TracChangeset for help on using the changeset viewer.