IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 26143


Ignore:
Timestamp:
Nov 13, 2009, 2:48:11 PM (16 years ago)
Author:
bills
Message:

Don't add -destreaked to ippTools command if req_type is byid or byexp.
Let return them to pstampparse so that it can set the error code explicitly.

for bydiff requests do the secondary lookup for raw or chip images byid since
difftool -diffskyfile emits the appropriate values

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/PS-IPP-PStamp/lib/PS/IPP/PStamp/Job.pm

    r25793 r26143  
    8484
    8585        my $image = $results->[0];
    86         if (($img_type eq "raw") or ($img_type eq "chip")) {
    87             $req_type = "byexp";
    88             $id = $image->{exp_name};
     86        if ($img_type eq "raw") {
     87            $req_type = "byid";
     88            $id = $image->{exp_id};
    8989            return undef if !$id;
    90             # fall through and lookup byexp
     90            # fall through and lookup byid
     91        } elsif ($img_type eq "chip") {
     92            $req_type = "byid";
     93            $id = $image->{chip_id};
     94            return undef if !$id;
     95            # fall through and lookup byid
    9196        } elsif ($img_type eq "warp") {
    9297            $req_type = "byid";
     
    171176    }
    172177
     178    # note $magic_arg may be cleared below depending on $req_type
    173179    my $magic_arg = $need_magic ? " -destreaked" : "";
     180
    174181    my $component_args;
    175182    if ($img_type eq "raw") {
     
    229236        $command .= " $id_opt $id";
    230237        $command .= $component_args if $component_args;
     238        # don't include -destreaked if lookup is byid. Let pstampparse check so that the error code gives
     239        # the reason as 'not destreaked'
     240        $magic_arg = "";
    231241    } elsif ($req_type eq "byexp") {
    232242        $command .= " -exp_name $id";
    233243        $command .= $component_args if $component_args;
     244        # don't include -destreaked if lookup is byexp. Let pstampparse check so that the error code gives
     245        # the reason as 'not destreaked'
     246        $magic_arg = "";
    234247    } elsif ($req_type eq "byskycell") {
    235248        die "tess_id and component are required for byskycell" if !$tess_id or ! $skycell_id;
     
    402415        }
    403416
    404         my ($warp_id, $exp_id, $exp_name);
     417        my ($warp_id, $exp_id, $exp_name, $chip_id, $cam_id);
    405418        if ($inverse and !$image->{bothways}) {
    406419            print STDERR "Inverse images requested for diffRun that is not bothways. Ignoring.\n";
     
    411424            $exp_id = $image->{exp_id_2};
    412425            $exp_name = $image->{exp_name_2};
     426            $chip_id = $image->{chip_id_2};
     427            $cam_id = $image->{cam_id_2};
    413428        } else {
    414429            $warp_id =  $image->{warp1};
    415430            $exp_id = $image->{exp_id_1};
    416431            $exp_name = $image->{exp_name_1};
     432            $chip_id = $image->{chip_id_1};
     433            $cam_id = $image->{cam_id_1};
    417434        }
    418435        # XXX difftool currently returns max long long for null
     
    422439            $image->{exp_id} = $exp_id;
    423440            $image->{exp_name} = $exp_name;
     441            $image->{chip_id} = $chip_id;
     442            $image->{cam_id} = $cam_id;
    424443        } else {
    425444            print STDERR "unexpected result warp_id not defined\n";
Note: See TracChangeset for help on using the changeset viewer.