IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 21414


Ignore:
Timestamp:
Feb 6, 2009, 5:49:52 PM (17 years ago)
Author:
bills
Message:

avoid calling warptool -warped twice in bydiff warp

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/PStamp/lib/PStamp/Job.pm

    r21240 r21414  
    5656            return undef;
    5757        }
    58         if ($img_type eq "diff") {
     58        if (($img_type eq "warp") or ($img_type eq "diff")) {
     59            # lookup_bydiff has done all of the work
    5960            return [$results];
    6061        } elsif (($img_type eq "raw") or ($img_type eq "chip")) {
     
    6364            return undef if !$id;
    6465            # fall through and lookup byexp
    65         } elsif ($img_type eq "warp") {
    66             $req_type = "byid";
    67             $id = $results->{warp_id};
    68             $component = $results->{skycell_id};
    69             return undef if !$id;
    70             # fall through and lookup by warp_id
     66#        } elsif ($img_type eq "warp") {
     67#            $req_type = "byid";
     68#            $id = $results->{warp_id};
     69#            $component = $results->{skycell_id};
     70#            return undef if !$id;
     71#            # fall through and lookup by warp_id
    7172        } elsif ($img_type eq "stack") {
    7273            $req_type = "byid";
     
    333334        my $warp = $warps->[0];
    334335
    335         $image->{exp_id} = $warp->{exp_id};
    336         $image->{exp_name} = $warp->{exp_name};
    337         $image->{camera} = $warp->{camera};
    338     }
    339 
    340     if ($img_type eq "diff") {
     336        if ($img_type eq "warp") {
     337            $image = $warp;
     338        } else {
     339            $image->{exp_id} = $warp->{exp_id};
     340            $image->{exp_name} = $warp->{exp_name};
     341            $image->{camera} = $warp->{camera};
     342        }
     343    }
     344
     345    if (($img_type eq "diff") or ($img_type eq "warp")) {
    341346        # the $image is going to be returned directly in this case so we need to duplicate
    342347        # some of processing that lookup does for other img_types
     
    344349        if ($image->{camera}) {
    345350            $ipprc->define_camera($image->{camera});
    346             $image->{mask}   = $ipprc->filename("PPSUB.OUTPUT.MASK", $image->{path_base});
    347             $image->{weight} = $ipprc->filename("PPSUB.OUTPUT.WEIGHT", $image->{path_base});
     351            if ($img_type eq "diff") {
     352                $image->{mask}   = $ipprc->filename("PPSUB.OUTPUT.MASK", $image->{path_base});
     353                $image->{weight} = $ipprc->filename("PPSUB.OUTPUT.WEIGHT", $image->{path_base});
     354            } else {
     355                $image->{mask}   = $ipprc->filename("PSWARP.OUTPUT.MASK",   $image->{path_base});
     356                $image->{weight} = $ipprc->filename("PSWARP.OUTPUT.WEIGHT", $image->{path_base});
     357            }
    348358        } else {
    349359            # XXX this will only happen if the minuend is not a warp
Note: See TracChangeset for help on using the changeset viewer.