IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 7, 2007, 9:45:27 AM (19 years ago)
Author:
Paul Price
Message:

Commenting out the database error-handling. This means that bad configurations won't mark a product as bad in the database, which is currently annoying because we can't rewind.

File:
1 edited

Legend:

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

    r13275 r13698  
    8888my $outputRoot = $ipprc->file_prepare( "$tess_id.$skycell_id.wrp$warp_id", $workdir, $$imfiles[0]->{uri} );
    8989my $outputImage = $ipprc->filename("PSWARP.OUTPUT", $outputRoot, $skycell_id );
     90my $outputMask = $ipprc->filename("PSWARP.OUTPUT.MASK", $outputRoot, $skycell_id);
    9091my $outputBin1 = $ipprc->filename("PSWARP.BIN1", $outputRoot, $skycell_id );
    9192my $outputBin2 = $ipprc->filename("PSWARP.BIN2", $outputRoot, $skycell_id );
     
    9495
    9596# Get list of filenames
    96 my ($listFile, $listName) = tempfile( "$tess_id.$skycell_id.wrp$warp_id.list.XXXX", UNLINK => 1);
     97my ($list1File, $list1Name) = tempfile( "$tess_id.$skycell_id.wrp$warp_id.image.list.XXXX", UNLINK => 1);
     98my ($list2File, $list2Name) = tempfile( "$tess_id.$skycell_id.wrp$warp_id.mask.list.XXXX", UNLINK => 1);
    9799foreach my $imfile (@$imfiles) {
    98     print $listFile ( $imfile->{uri} . "\n");
     100    my $image = $imfile->{uri}; # Image name
     101    my $mask = $ipprc->filename("PPIMAGE.OUTPUT.MASK", $imfile->{path_base}, $imfile->{class_id}); # Mask name
     102    &my_die("Couldn't find input file: $image", $warp_id, $skycell_id, $tess_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($image);
     103    &my_die("Couldn't find input file: $mask", $warp_id, $skycell_id, $tess_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($mask);
     104
     105    print $list1File ( $image . "\n");
     106    print $list2File ( $mask  . "\n");
    99107}
    100 close $listFile;
     108close $list1File;
     109close $list2File;
    101110
    102111# Run pswarp
    103112my $stats = PS::IPP::Metadata::Stats->new(); # Stats parser
    104113unless ($no_op) {
    105     my $command = "$pswarp -list $listName $outputRoot $skyFile -stat $outputStats"; # Command to run pswarp
     114    my $command = "$pswarp -list $list1Name -masklist $list2Name $outputRoot $skyFile -stat $outputStats"; # Command to run pswarp
    106115    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    107116        run(command => $command, verbose => 1);
     
    110119        &my_die("Unable to perform pswarp: $error_code", $warp_id, $skycell_id, $error_code);
    111120    }
    112     &my_die("Couldn't find expected output file: $outputImage", $warp_id, $skycell_id, $tess_id, $PS_EXIT_SYS_ERROR) unless -f $ipprc->file_resolve($outputImage);
    113     &my_die("Couldn't find expected output file: $outputStats", $warp_id, $skycell_id, $tess_id, $PS_EXIT_SYS_ERROR) unless -f $ipprc->file_resolve($outputStats);
    114 #    &my_die("Couldn't find expected output file: $outputBin1", $warp_id, $skycell_id, $tess_id, $PS_EXIT_SYS_ERROR) unless -f $ipprc->file_resolve($outputBin1);
    115 #    &my_die("Couldn't find expected output file: $outputBin2", $warp_id, $skycell_id, $tess_id, $PS_EXIT_SYS_ERROR) unless -f $ipprc->file_resolve($outputBin2);
     121    &my_die("Couldn't find expected output file: $outputImage", $warp_id, $skycell_id, $tess_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputImage);
     122    &my_die("Couldn't find expected output file: $outputMask", $warp_id, $skycell_id, $tess_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputMask);
     123    &my_die("Couldn't find expected output file: $outputStats", $warp_id, $skycell_id, $tess_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputStats);
     124#    &my_die("Couldn't find expected output file: $outputBin1", $warp_id, $skycell_id, $tess_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputBin1);
     125#    &my_die("Couldn't find expected output file: $outputBin2", $warp_id, $skycell_id, $tess_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputBin2);
    116126
    117127    # Get the statistics on the warped image
     
    130140unless ($no_update) {
    131141    my $command = "$warptool -addwarped -warp_id $warp_id -skycell_id $skycell_id -tess_id $tess_id" .
    132         " -uri $outputImage"; # -path_base $outputRoot"; # Command to run dettool
     142        " -uri $outputImage -path_base $outputRoot"; # -path_base $outputRoot"; # Command to run dettool
    133143    $command .= " -bg $bg -bg_stdev $bg_stdev";
    134144    $command .= " -dbname $dbname" if defined $dbname;
     
    155165        my $command = "$warptool -addwarped -warp_id $warp_id -skycell_id $skycell_id -tess_id $tess_id -code $exit_code";
    156166        $command .= " -dbname $dbname" if defined $dbname;
    157         system ($command);
     167###        system ($command);
    158168    }
    159169    exit $exit_code;
Note: See TracChangeset for help on using the changeset viewer.