IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 34314


Ignore:
Timestamp:
Aug 15, 2012, 9:09:20 AM (14 years ago)
Author:
bills
Message:

When updating an exposure only update the chips if the warp is not in full state

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tags/ipp-20120802/ippScripts/scripts/lap_science.pl

    r34064 r34314  
    280280    $warptool_update_cmd   .= " -dbname $dbname " if defined $dbname;
    281281
    282     ($success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    283         run(command => $chiptool_update_cmd, verbose => $verbose);
    284     unless ($success) {
    285         $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
    286         &my_die("Unable to perform chiptool -setimfiletoupdate: $error_code", $exposure->{exp_id}, $data_group);
    287     }
    288 #     if ($chip_magicDS_id != 0) {   
    289 #       ($success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    290 #           run(command => $magicDS_update_cmd, verbose => $verbose);
    291 #       unless ($success) {
    292 #           $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
    293 #           &my_die("Unable to perform magicdstool -setfiletoupdate: $error_code", $exposure->{exp_id}, $data_group);
    294 #       }
    295 #     }
    296 
    297     ($success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    298         run(command => $warptool_update_cmd, verbose => $verbose);
    299     unless ($success) {
    300         $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
    301         &my_die("Unable to perform warptool -setskyfiletoupdate: $error_code", $exposure->{exp_id}, $data_group);
    302     }
    303    
     282    # only need to update the data if the warps are not full
     283    if ($warp->{state} ne 'full') {
     284        if ($chip->{state} eq 'cleaned') {
     285            ($success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
     286                run(command => $chiptool_update_cmd, verbose => $verbose);
     287            unless ($success) {
     288                $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
     289                &my_die("Unable to perform chiptool -setimfiletoupdate: $error_code", $exposure->{exp_id}, $data_group);
     290            }
     291
     292#             if ($chip_magicDS_id != 0) {   
     293#               ($success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
     294#                   run(command => $magicDS_update_cmd, verbose => $verbose);
     295#               unless ($success) {
     296#                   $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
     297#                   &my_die("Unable to perform magicdstool -setfiletoupdate: $error_code", $exposure->{exp_id}, $data_group);
     298#               }
     299#             }
     300        }
     301
     302        ($success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
     303            run(command => $warptool_update_cmd, verbose => $verbose);
     304        unless ($success) {
     305            $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
     306            &my_die("Unable to perform warptool -setskyfiletoupdate: $error_code", $exposure->{exp_id}, $data_group);
     307        }
     308    }
    304309    $exposure->{active} = 1;
     310
    305311    return($exposure);
    306312}
     
    309315    my $exposure = shift;
    310316   
     317    if (S64_IS_NOT_NULL($exposure->{warp_id})) {
     318        if ($exposure->{warpRun_state} eq 'full') {
     319            # this warp is in full state no need to update it or the chips
     320            return 0;
     321        }
     322    }
    311323    if (S64_IS_NOT_NULL($exposure->{chip_id})) {
    312324        if (($exposure->{chip_state} eq 'cleaned')||
     
    762774            }
    763775            print "STATUS: Made $Nstacks_made final stacks.\n";
    764             exit($Nstacks_made);
     776            exit(0);
    765777            # If this doesn't do anything, we may end up stuck here.  Therefore, we need a more robust test.
    766778        }
Note: See TracChangeset for help on using the changeset viewer.