IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 30, 2013, 4:52:14 PM (13 years ago)
Author:
eugene
Message:

updates from trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20130711/ippScripts/scripts/chip_imfile.pl

    r35789 r36072  
    233233    if ($do_photom and ($run_state eq 'update')) {
    234234        # If previous psf file is ok skip photometry
    235         if ($dump_config || rerun_photometry($outroot, $class_id)) {
     235        if (rerun_photometry($outroot, $class_id)) {
    236236            carp "Will rerun photometry\n";
    237237        } else {
     
    348348            }
    349349        }
     350        # resolve uri
     351        my $uriReal = $ipprc->file_resolve( $uri );
     352        # If instance is not found or if it doesn't exist try running neb-repair on it
     353        # Note: file_exists returns false if the file exists but has zero size
     354        if (!$uriReal or !$ipprc->file_exists($uriReal)) {
     355            my $repair_cmd = "$nebrepair $uri";
     356            my ($repair_success, $repair_error_code, $repair_full_buf, $repair_stdout_buf, $repair_stderr_buf ) = run(command => $repair_cmd, verbose => $verbose);
     357            unless ($repair_success) {
     358                &my_die("Unable to attempt repair: $uri $repair_error_code", $exp_id,$chip_id, $class_id, $PS_EXIT_SYS_ERROR);
     359            }
     360            $uriReal = $ipprc->file_resolve( $uri );
     361        }
     362           
     363        &my_die("Unable to resolve $uri on $host", $exp_id, $chip_id, $class_id, $PS_EXIT_SYS_ERROR) if !$uriReal;
    350364
    351365        # if recipe option PPIMAGE:APPLY.BURNTOOL is set and the burntool information is stored in
     
    379393                                              UNLINK => !$save_temps, SUFFIX => '.fits' );
    380394
    381             # get the UNIX version of the (possible) neb: or path: filename
    382             my $uriReal = $ipprc->file_resolve( $uri );
    383                 # Catch errors here
    384             if (!$uriReal) {
    385                 my $repair_cmd = "$nebrepair $uri";
    386                 my ($repair_success, $repair_error_code, $repair_full_buf, $repair_stdout_buf, $repair_stderr_buf ) = run(command => $repair_cmd, verbose => $verbose);
    387                 unless ($repair_success) {
    388                     &my_die("Unable to attempt repair: $uri $repair_error_code", $exp_id,$chip_id, $class_id, $PS_EXIT_SYS_ERROR);
    389                 }
    390                 $uriReal = $ipprc->file_resolve( $uri );
    391             }
    392                
    393             &my_die("Unable to resolve $uri on $host", $exp_id, $chip_id, $class_id, $PS_EXIT_SYS_ERROR) if !$uriReal;
    394 
    395395            # funpack into the temp file.
    396396            my $funpack_cmd = "$funpack -S $uriReal > $tempName";
     
    492492    if ($no_compress_image) {
    493493        $command .= " -R PPIMAGE.CHIP FITS.TYPE NONE";
     494    }
     495    if ($run_state eq 'update' and metadataLookupBool($recipeData, 'MASK.STATS')) {
     496        $command .= " -Db PPIMAGE:MASK.STATS FALSE ";
    494497    }
    495498    $command .= $burntoolArguments if $burntoolArguments;
Note: See TracChangeset for help on using the changeset viewer.