IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 27916


Ignore:
Timestamp:
May 11, 2010, 12:12:50 PM (16 years ago)
Author:
bills
Message:

In locate_images if $component = 'all' return all components for a run. pstampparse now passes
this for get_image jobs, in which the ROI is ignored

File:
1 edited

Legend:

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

    r27901 r27916  
    208208    my $skycell_id;
    209209
    210     if (isnull($component)) {
    211         $component = undef;
    212     }
    213 
    214210    # note $magic_arg may be cleared below depending on $req_type
    215211    my $magic_arg = $need_magic ? " -destreaked" : "";
     
    221217    my $choose_components = 0;
    222218    if ($stage eq "raw") {
    223         $class_id = $component;
    224219        $command = "$regtool -processedimfile -dbname $imagedb";
    225220        # XXX: for now restrict lookups to type object
     
    227222        $command .= " -exp_type object";
    228223        $id_opt = $use_imfile_id ? "-raw_imfile_id" : "-exp_id";
    229         $component_args = " -class_id $class_id" if $component;
     224
     225        if ($component and $component ne 'all') {
     226            $class_id = $component;
     227            $component_args = " -class_id $class_id";
     228        }
    230229        $want_astrom = 1;
    231230        $set_class_id = 1;
    232231    } elsif ($stage eq "chip") {
    233         $class_id = $component;
    234232        # if the request is such that it will yield a single image per "run" or the
    235233        # center is specified in pixel coordinates
    236234        # use chiptool -processsedimfile. Otherwise use chiptool -listrun and then
    237235        # choose the chips containing the center pixel by calling selectComponets() below
    238         if ($class_id or $use_imfile_id or !$skycenter) {
     236        if ($component or $use_imfile_id or !$skycenter) {
    239237            $command = "$chiptool -processedimfile -dbname $imagedb";
    240             $component_args = " -class_id $class_id" if $class_id;
     238            if ($component and $component ne 'all') {
     239                $class_id = $component;
     240                $component_args = " -class_id $class_id";
     241            }
    241242        } else {
    242243            $command = "$chiptool -listrun -pstamp_order -dbname $imagedb";
     
    256257        $set_class_id = 1;
    257258    } elsif ($stage eq "warp") {
    258         $skycell_id = $component;
    259         if ($skycell_id or $use_imfile_id or !$skycenter) {
     259        if ($component or $use_imfile_id or !$skycenter) {
    260260            $command = "$warptool -warped -dbname $imagedb";
    261             $component_args = " -skycell_id $skycell_id" if $skycell_id;
     261            if ($component and $component ne 'all') {
     262                $skycell_id = $component;
     263                $component_args = " -skycell_id $skycell_id";
     264            }
    262265        } else {
    263266            $command = "$warptool -listrun -pstamp_order -dbname $imagedb";
     
    272275        $base_name    = "path_base"; # name of the field for the warptool output
    273276    } elsif ($stage eq "diff") {
    274         $skycell_id = $component;
    275         if ($skycell_id or $use_imfile_id or !$skycenter) {
     277        if ($component or $use_imfile_id or !$skycenter) {
    276278            $command = "$difftool -diffskyfile -dbname $imagedb";
    277             $component_args = " -skycell_id $skycell_id" if $skycell_id;
     279            if ($component and $component ne 'all') {
     280                $skycell_id = $component;
     281                $component_args = " -skycell_id $skycell_id";
     282            }
    278283        } else {
    279284            $command = "$difftool -listrun -pstamp_order -dbname $imagedb";
     
    285290        $weight_name = "PPSUB.OUTPUT.VARIANCE";
    286291        $cmf_name    = "PPSUB.OUTPUT.SOURCES";
    287         $psf_name     = "PSPHOT.PSF.SKY.SAVE";
     292        $psf_name    = "PSPHOT.PSF.SKY.SAVE";
    288293        $base_name   = "path_base";
    289294    } elsif ($stage eq "stack") {
     
    883888        # If there are multiple cam runs for this exposure, take the last completed one with good quality
    884889        # on the assumption that it has the best astrometry.
    885         foreach $camRun (@$camruns) {
    886             last if (($camRun->{state} eq 'full') and ($camRun->{quality} eq 0) and ($camRun->{fault} eq 0));
     890        foreach my $cr (@$camruns) {
     891            if (($cr->{state} eq 'full') and ($cr->{quality} eq 0) and ($cr->{fault} eq 0)) {
     892                $camRun = $cr;
     893                last;
     894            }
    887895        }
    888896        # XXX: this looks like a bug at least if ASTROM.SOURCE eq PSASTRO.OUTPUT
Note: See TracChangeset for help on using the changeset viewer.