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/stack_skycell.pl

    r13668 r13698  
    113113    print $listFile "INPUT$num\tMETADATA\n";
    114114    $num++;
    115     print $listFile "\tIMAGE\tSTR\t" . $file->{uri} . "\n";
     115
     116    my $image = $file->{uri};   # Image name
     117    my $mask = $ipprc->filename( "PSWARP.OUTPUT.MASK", $file->{path_base} ); # Mask name
     118
     119    &my_die("Image $image does not exist", $stack_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists( $image );
     120    &my_die("Mask $mask does not exist", $stack_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists( $mask );
     121   
     122    print $listFile "\tIMAGE\tSTR\t" . $image . "\n";
     123    print $listFile "\tMASK\tSTR\t" . $mask . "\n";
    116124
    117125    ### XXX NEED TO UPDATE THESE appropriately
    118 #    print $listFile "\tMASK\tSTR\t" . "NULL" . "\n";
    119126    print $listFile "\tSEEING\tF32\t" . 1.0 . "\n";
    120127    print $listFile "\tWEIGHT\tF32\t" . 1.0 . "\n";
     
    127134$workdir = caturi( $workdir, "tess_" . $tess_id, "sky_" . $skycell_id ) if defined $workdir;
    128135my $outputRoot = $ipprc->file_prepare( "$tess_id.$skycell_id.stk$stack_id", $workdir, $$files[0]->{uri} );
    129 my $outputName = $outputRoot . ".fits";
    130 #my $bin1Name =  $ipprc->filename("PPSTAC.BIN1", $outputRoot);
    131 #my $bin2Name =  $ipprc->filename("PPSTAC.BIN2", $outputRoot);
     136my $outputName = $ipprc->filename("PPSTACK.OUTPUT", $outputRoot);
     137my $outputMask = $ipprc->filename("PPSTACK.OUTPUT.MASK", $outputRoot);
     138#my $bin1Name =  $ipprc->filename("PPSTACK.BIN1", $outputRoot);
     139#my $bin2Name =  $ipprc->filename("PPSTACK.BIN2", $outputRoot);
    132140my $outputStats = $outputRoot . '.stats';
    133141
     
    143151        &my_die("Unable to perform ppImage: $error_code", $stack_id, $error_code);
    144152    }
    145     &my_die("Couldn't find expected output file: $outputName", $stack_id, $PS_EXIT_SYS_ERROR) unless -f $ipprc->file_resolve($outputName);
    146 #    &my_die("Couldn't find expected output file: $bin1Name",    $stack_id, $PS_EXIT_SYS_ERROR) unless -f $ipprc->file_resolve($bin1Name);
    147 #    &my_die("Couldn't find expected output file: $bin2Name",    $stack_id, $PS_EXIT_SYS_ERROR) unless -f $ipprc->file_resolve($bin2Name);
    148     &my_die("Couldn't find expected output file: $outputStats", $stack_id, $PS_EXIT_SYS_ERROR) unless -f $ipprc->file_resolve($outputStats);
     153    &my_die("Couldn't find expected output file: $outputName", $stack_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputName);
     154    &my_die("Couldn't find expected output file: $outputMask", $stack_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputMask);
     155#    &my_die("Couldn't find expected output file: $bin1Name",    $stack_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($bin1Name);
     156#    &my_die("Couldn't find expected output file: $bin2Name",    $stack_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($bin2Name);
     157    &my_die("Couldn't find expected output file: $outputStats", $stack_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputStats);
    149158
    150159    # Get the statistics on the stacked image
     
    166175    # Add the stack result
    167176    {
    168         my $command = "$stacktool -addsumskyfile -stack_id $stack_id -uri $outputName"; # -path_base $outputRoot";
     177        my $command = "$stacktool -addsumskyfile -stack_id $stack_id -uri $outputName -path_base $outputRoot";
    169178        $command .= " -bg $bg -bg_stdev $bg_stdev";
    170179        $command .= " -dbname $dbname" if defined $dbname;
     
    204213        my $command = "$stacktool -updaterun -stack_id $stack_id -state stop -code $exit_code";
    205214        $command .= " -dbname $dbname" if defined $dbname;
    206         system ($command);
     215###        system ($command);
    207216    }
    208217    exit $exit_code;
Note: See TracChangeset for help on using the changeset viewer.