IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 16, 2007, 6:46:54 PM (19 years ago)
Author:
Paul Price
Message:

Propagating weight maps

File:
1 edited

Legend:

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

    r14228 r14261  
    9797my $outputImage = $ipprc->filename("PSWARP.OUTPUT", $outputRoot, $skycell_id );
    9898my $outputMask = $ipprc->filename("PSWARP.OUTPUT.MASK", $outputRoot, $skycell_id);
     99my $outputWeight = $ipprc->filename("PSWARP.OUTPUT.WEIGHT", $outputRoot, $skycell_id);
    99100my $outputBin1 = $ipprc->filename("PSWARP.BIN1", $outputRoot, $skycell_id );
    100101my $outputBin2 = $ipprc->filename("PSWARP.BIN2", $outputRoot, $skycell_id );
     
    103104
    104105# Get list of filenames
    105 my ($list1File, $list1Name) = tempfile( "$tess_id.$skycell_id.wrp$warp_id.image.list.XXXX", UNLINK => 1);
    106 my ($list2File, $list2Name) = tempfile( "$tess_id.$skycell_id.wrp$warp_id.mask.list.XXXX", UNLINK => 1);
     106my ($imageFile, $imageName) = tempfile( "$tess_id.$skycell_id.wrp$warp_id.image.list.XXXX", UNLINK => 1);
     107my ($maskFile, $maskName) = tempfile( "$tess_id.$skycell_id.wrp$warp_id.mask.list.XXXX", UNLINK => 1);
     108my ($weightFile, $weightName) = tempfile( "$tess_id.$skycell_id.wrp$warp_id.weight.list.XXXX", UNLINK => 1);
    107109my $inputAstrom;
    108110foreach my $imfile (@$imfiles) {
    109111    my $image = $imfile->{uri}; # Image name
    110112    my $mask = $ipprc->filename("PPIMAGE.CHIP.MASK", $imfile->{chip_path_base}, $imfile->{class_id}); # Mask name
    111     my $astrom = $ipprc->filename("PSASTRO.OUTPUT.MEF", $imfile->{cam_path_base}); # Astrometry file name
     113    my $weight = $ipprc->filename("PPIMAGE.CHIP.WEIGHT", $imfile->{chip_path_base}, $imfile->{class_id}); # Mask name
     114   my $astrom = $ipprc->filename("PSASTRO.OUTPUT.MEF", $imfile->{cam_path_base}); # Astrometry file name
    112115
    113116    &my_die("Couldn't find input file: $image", $warp_id, $skycell_id, $tess_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($image);
     
    115118    &my_die("Couldn't find input file: $astrom", $warp_id, $skycell_id, $tess_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($astrom);
    116119
    117     print $list1File ( $image . "\n");
    118     print $list2File ( $mask  . "\n");
     120    print $imageFile ( $image . "\n");
     121    print $maskFile ( $mask  . "\n");
     122    print $weightFile ( $weight  . "\n");
    119123    if (defined $inputAstrom) {
    120124        &my_die("Astrometry files don't match: $inputAstrom vs $astrom", $warp_id, $skycell_id, $tess_id, $PS_EXIT_SYS_ERROR) unless $inputAstrom eq $astrom;
     
    123127    }
    124128}
    125 close $list1File;
    126 close $list2File;
     129close $imageFile;
     130close $maskFile;
     131close $weightFile;
    127132
    128133# Run pswarp
    129134unless ($no_op) {
    130     my $command = "$pswarp -list $list1Name";
    131     $command .= " -masklist $list2Name";
     135    my $command = "$pswarp -list $imageName";
     136    $command .= " -masklist $maskName";
     137    $command .= " -weightlist $weightName";
    132138    $command .= " -astrom $inputAstrom";
    133139    $command .= " $outputRoot $skyFile";
     
    143149    &my_die("Couldn't find expected output file: $outputImage", $warp_id, $skycell_id, $tess_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputImage);
    144150    &my_die("Couldn't find expected output file: $outputMask", $warp_id, $skycell_id, $tess_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputMask);
     151    &my_die("Couldn't find expected output file: $outputWeight", $warp_id, $skycell_id, $tess_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputWeight);
    145152    &my_die("Couldn't find expected output file: $outputStats", $warp_id, $skycell_id, $tess_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputStats);
    146153#    &my_die("Couldn't find expected output file: $outputBin1", $warp_id, $skycell_id, $tess_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputBin1);
Note: See TracChangeset for help on using the changeset viewer.