IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 14274


Ignore:
Timestamp:
Jul 17, 2007, 1:53:14 PM (19 years ago)
Author:
Paul Price
Message:

Using weight maps in ppStack. Adding flag to preserve temporary files.

Location:
trunk/ippScripts/scripts
Files:
2 edited

Legend:

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

    r13113 r14274  
    2828    $no_op,                     # No operations?
    2929    $no_update,                 # No updating?
     30    $save_temps,                # Save temporary files?
    3031    );
    3132GetOptions(
     
    3334           'no-op' => \$no_op,
    3435           'no-update' => \$no_update,
     36           'save-temps' => \$save_temps,
    3537) or pod2usage( 2 );
    3638
     
    7476        $command .= " --no-op" if defined $no_op;
    7577        $command .= " --no-update" if defined $no_update;
     78        $command .= " --save-temps" if defined $save_temps;
    7679        $command .= " --workdir $workdir" if defined $workdir;
    7780        my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
  • trunk/ippScripts/scripts/stack_skycell.pl

    r14239 r14274  
    3434use Pod::Usage qw( pod2usage );
    3535
    36 my ($stack_id, $dbname, $workdir, $no_update, $no_op);
     36my ($stack_id, $dbname, $workdir, $no_update, $no_op, $save_temps);
    3737GetOptions(
    3838    'stack_id|d=s'      => \$stack_id, # Stack identifier
     
    4141    'no-update'         => \$no_update, # Don't update the database?
    4242    'no-op'             => \$no_op, # Don't do any operations?
     43    'save-temps'        => \$save_temps, # Save temporary files?
    4344) or pod2usage( 2 );
    4445
     
    116117
    117118# Generate MDC file with the inputs
    118 my ($listFile, $listName) = tempfile( "$tess_id.$skycell_id.stk$stack_id.list.XXXX", UNLINK => 1 );
     119my ($listFile, $listName) = tempfile( "$tess_id.$skycell_id.stk$stack_id.list.XXXX",
     120                                      UNLINK => !$save_temps );
    119121my $num = 0;
    120122foreach my $file (@$files) {
     
    124126    my $image = $file->{uri};   # Image name
    125127    my $mask = $ipprc->filename( "PSWARP.OUTPUT.MASK", $file->{path_base} ); # Mask name
     128    my $weight = $ipprc->filename( "PSWARP.OUTPUT.WEIGHT", $file->{path_base} ); # Weight name
    126129
    127130    &my_die("Image $image does not exist", $stack_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists( $image );
     
    130133    print $listFile "\tIMAGE\tSTR\t" . $image . "\n";
    131134    print $listFile "\tMASK\tSTR\t" . $mask . "\n";
     135    print $listFile "\tWEIGHT\tSTR\t" . $weight . "\n";
    132136
    133137    ### XXX NEED TO UPDATE THESE appropriately
    134138    print $listFile "\tSEEING\tF32\t" . 1.0 . "\n";
    135     print $listFile "\tWEIGHT\tF32\t" . 1.0 . "\n";
     139    print $listFile "\tWEIGHTING\tF32\t" . 1.0 . "\n";
    136140    print $listFile "\tSCALE\tF32\t" . 1.0 . "\n";
    137141
     
    144148my $outputName = $ipprc->filename("PPSTACK.OUTPUT", $outputRoot);
    145149my $outputMask = $ipprc->filename("PPSTACK.OUTPUT.MASK", $outputRoot);
     150my $outputWeight = $ipprc->filename("PPSTACK.OUTPUT.WEIGHT", $outputRoot);
    146151#my $bin1Name =  $ipprc->filename("PPSTACK.BIN1", $outputRoot);
    147152#my $bin2Name =  $ipprc->filename("PPSTACK.BIN2", $outputRoot);
     
    152157    my $command = "$ppStack $listName $outputRoot";
    153158    $command .= " -stats $outputStats";
    154     $command .= " -recipe PPSTATS CHIPSTATS";
     159    $command .= " -recipe PPSTATS WARPSTATS";
    155160
    156161    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
     
    162167    &my_die("Couldn't find expected output file: $outputName", $stack_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputName);
    163168    &my_die("Couldn't find expected output file: $outputMask", $stack_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputMask);
     169    &my_die("Couldn't find expected output file: $outputWeight", $stack_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputWeight);
    164170#    &my_die("Couldn't find expected output file: $bin1Name",    $stack_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($bin1Name);
    165171#    &my_die("Couldn't find expected output file: $bin2Name",    $stack_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($bin2Name);
Note: See TracChangeset for help on using the changeset viewer.