IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 42304


Ignore:
Timestamp:
Nov 14, 2022, 1:00:24 PM (4 years ago)
Author:
tdeboer
Message:

merging in new version of nightly_science with chip stage protection

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tags/ipp-ops-20220705/ippScripts/scripts/nightly_science.pl

    r42300 r42304  
    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 FROM ";
     1559        my $input_sth = "select exp_id,warp_id,dateobs,rawExp.comment,warpRun.state AS warp_state,camProcessedExp.quality,chipRun.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' ";
     
    15741574            my $this_state   = ${ $this_warp }[4];
    15751575            my $this_warp_id  = ${ $this_warp }[1];
     1576            my $chip_state   = ${ $this_warp }[6];
    15761577           
    15771578            #find exposures for this object that have not been fully processed
    1578             if (($this_warp_id eq 'NULL') && (($this_quality == 0) || ($this_quality eq 'NULL')) ) {
     1579            if (($this_warp_id eq 'NULL') && (($this_quality == 0) || ($this_quality eq 'NULL') || ($chip_state eq 'run') ) ) {
    15791580                $Nbad += 1;
    15801581            }
     
    17491750        my $difference=$date2->delta_ms($date1);
    17501751
    1751         $summittimediff=(($difference->hours)*60.) + ($difference->minutes) + (($difference->seconds)/60.);
     1752        my $summittimediff=(($difference->hours)*60.) + ($difference->minutes) + (($difference->seconds)/60.);
    17521753    }
    17531754
     
    17641765            my $this_chunk = shift @{ $object_row };
    17651766       
    1766             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 FROM ";
     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 ";
    17671768            $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) ";
    17681769            $input_sth .=   " WHERE chipRun.label = '$label' AND chipRun.data_group = '$data_group' AND rawExp.filter = '$filter' AND rawExp.object = '$this_object' ";
     
    17831784                my $this_fwhm   = ${ $this_warp }[7];
    17841785                my $this_warp_id  = ${ $this_warp }[1];
     1786                my $chip_state   = ${ $this_warp }[8];
    17851787
    17861788                #find exposures for this object that have not been fully processed
    1787                 if (($this_warp_id eq 'NULL') && (($this_quality == 0) || ($this_quality eq 'NULL')) ) {
     1789                if (($this_warp_id eq 'NULL') && (($this_quality == 0) || ($this_quality eq 'NULL') || ($chip_state eq 'run') ) ) {
    17881790                    $Nbad += 1;
    17891791                }
     
    19141916                    }
    19151917                    else {
    1916                         print STDERR "Preparing to diff $date $target $input_exp_id $template_exp_id ($input_warp_id $template_warp_id) $this_object $input_comment $template_comment\n";
     1918                        print STDERR "Preparing to single desperate diff $date $target $input_exp_id $template_exp_id ($input_warp_id $template_warp_id) $this_object $input_comment $template_comment\n";
    19171919                    }
    19181920           
     
    21352137        my $difference=$date2->delta_ms($date1);
    21362138
    2137         $summittimediff=(($difference->hours)*60.) + ($difference->minutes) + (($difference->seconds)/60.);
     2139        my $summittimediff=(($difference->hours)*60.) + ($difference->minutes) + (($difference->seconds)/60.);
    21382140    }
    21392141
     
    21502152            my $this_chunk = shift @{ $object_row };
    21512153       
    2152             my $input_sth = "select exp_id,warp_id,dateobs,rawExp.comment,warpRun.state AS warp_state,camProcessedExp.quality,camProcessedExp.fwhm_major FROM ";
     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 ";
    21532155            $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) ";
    21542156            $input_sth .=   " WHERE chipRun.label = '$label' AND chipRun.data_group = '$data_group' AND rawExp.filter = '$filter' AND rawExp.object = '$this_object' ";
     
    21692171                my $this_fwhm    = ${ $this_warp }[7];
    21702172                my $this_warp_id  = ${ $this_warp }[1];
     2173                my $chip_state   = ${ $this_warp }[8];
    21712174
    21722175                #find exposures for this object that have not been fully processed
    2173                 if (($this_warp_id eq 'NULL') && (($this_quality == 0) || ($this_quality eq 'NULL')) ) {
     2176                if (($this_warp_id eq 'NULL') && (($this_quality == 0) || ($this_quality eq 'NULL') || ($chip_state eq 'run') ) ) {
    21742177                    $Nbad += 1;
    21752178                }
     
    22762279                    }
    22772280                    else {
    2278                         print STDERR "Preparing to diff $date $target $input_exp_id $template_exp_id ($input_warp_id $template_warp_id) $this_object $input_comment $template_comment\n";
     2281                        print STDERR "Preparing to desperate diff $date $target $input_exp_id $template_exp_id ($input_warp_id $template_warp_id) $this_object $input_comment $template_comment\n";
    22792282                    }
    22802283           
Note: See TracChangeset for help on using the changeset viewer.