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

    r13663 r13698  
    8080
    8181# Identify the input and the template
    82 my $input;                      # Input file
    83 my $template;                   # Template file
     82my $input, $inputMask;          # Input file and mask
     83my $template, $templateMask;    # Template file and mask
    8484my $tess_id;                    # Tesselation identifier
    8585my $skycell_id;                 # Skycell identifier
     
    8888    if (defined $file->{template} and $file->{template}) {
    8989        $template = $file->{uri};
     90        $templateMask = $ipprc->filename("PSWARP.OUTPUT.MASK", $file->{path_base});
    9091    } else {
    9192        $input = $file->{uri};
     93        $inputMask = $ipprc->filename("PSWARP.OUTPUT.MASK", $file->{path_base});
    9294    }
    9395    if (defined $tess_id) {
     
    115117$ipprc->define_camera($camera);
    116118
     119&my_die("Couldn't find input: $template", $diff_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($template);
     120&my_die("Couldn't find input: $templateMask", $diff_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($templateMask);
     121&my_die("Couldn't find input: $nput", $diff_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($input);
     122&my_die("Couldn't find input: $nputMask", $diff_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($inputMask);
    117123
    118124# Get the output filenames
    119125$workdir = caturi( $workdir, "tess_" . $tess_id, "sky_" . $skycell_id ) if defined $workdir;
    120126my $outputRoot = $ipprc->file_prepare( "$tess_id.$skycell_id.dif$diff_id", $workdir, $input );
    121 my $outputName = $outputRoot . ".fits";
    122 my $bin1Name =  $ipprc->filename("PPIMAGE.BIN1", $outputRoot);
    123 my $bin2Name =  $ipprc->filename("PPIMAGE.BIN2", $outputRoot);
     127my $outputName = $ipprc->filename("PPSUB.OUTPUT", $outputRoot);
     128my $outputMask = $ipprc->filename("PPSUB.OUTPUT.MASK", $outputRoot);
     129#my $bin1Name =  $ipprc->filename("PPSUB.BIN1", $outputRoot);
     130#my $bin2Name =  $ipprc->filename("PPSUB.BIN2", $outputRoot);
    124131my $outputStats = $outputRoot . '.stats';
    125132
     
    133140my $stats = PS::IPP::Metadata::Stats->new(); # Stats parser
    134141unless ($no_op) {
    135     my $command = "$ppSub $input $template $outputName"; # Command to run ppSub
     142    my $command = "$ppSub $input $template $outputName -inmask $inputMask -refmask $templateMask -stat $outputStats"; # Command to run ppSub
    136143
    137144    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
     
    141148        &my_die("Unable to perform ppSub: $error_code", $diff_id, $error_code);
    142149    }
    143     &my_die("Couldn't find expected output file: $outputName", $diff_id, $PS_EXIT_SYS_ERROR) unless -f $ipprc->file_resolve($outputName);
    144 #    &my_die("Couldn't find expected output file: $bin1Name",    $diff_id, $PS_EXIT_SYS_ERROR) unless -f $ipprc->file_resolve($bin1Name);
    145 #    &my_die("Couldn't find expected output file: $bin2Name",    $diff_id, $PS_EXIT_SYS_ERROR) unless -f $ipprc->file_resolve($bin2Name);
    146 #    &my_die("Couldn't find expected output file: $outputStats", $diff_id, $PS_EXIT_SYS_ERROR) unless -f $ipprc->file_resolve($outputStats);
     150    &my_die("Couldn't find expected output file: $outputName", $diff_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputName);
     151    &my_die("Couldn't find expected output file: $outputMask", $diff_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputMask);
     152#    &my_die("Couldn't find expected output file: $bin1Name",    $diff_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($bin1Name);
     153#    &my_die("Couldn't find expected output file: $bin2Name",    $diff_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($bin2Name);
     154    &my_die("Couldn't find expected output file: $outputStats", $diff_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputStats);
    147155
    148156    # Get the statistics on the residual image
     
    164172    # Add the subtraction result
    165173    {
    166         my $command = "$difftool -adddiffskyfile -diff_id $diff_id -uri $outputName"; # -path_base $outputRoot";
     174        my $command = "$difftool -adddiffskyfile -diff_id $diff_id -uri $outputName -path_base $outputRoot";
    167175        $command .= " -bg $bg -bg_stdev $bg_stdev";
    168176        $command .= " -dbname $dbname" if defined $dbname;
     
    202210        my $command = "$difftool -updaterun -diff_id $diff_id -state stop -code $exit_code";
    203211        $command .= " -dbname $dbname" if defined $dbname;
    204         system ($command);
     212###        system ($command);
    205213    }
    206214    exit $exit_code;
Note: See TracChangeset for help on using the changeset viewer.