IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 35500


Ignore:
Timestamp:
May 3, 2013, 11:39:01 AM (13 years ago)
Author:
bills
Message:

implement setting using RUN_TYPE to restrict diff lookups by diff_mode
warp_warp, warp_stack, stack_stack

File:
1 edited

Legend:

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

    r35470 r35500  
    471471        $base_name    = "path_base"; # name of the field for the warptool output
    472472    } elsif ($stage eq "diff") {
    473         # XXX: is this path ever used for diff images anymore?
     473
    474474        if ($component or $use_imfile_id or !$skycenter) {
    475475            $command = "$difftool -diffskyfile -pstamp_order -dbname $imagedb";
     
    490490        $psf_name    = "PSPHOT.PSF.SKY.SAVE";
    491491        $base_name   = "path_base";
     492        my $diff_mode = getDiffMode($row->{RUN_TYPE});
     493        $command .= " -diff_mode $diff_mode" if $diff_mode;
    492494    } elsif ($stage eq "stack") {
    493495        $skycell_id = $component;
     
    735737
    736738    my $command = "$difftool -dbname $imagedb -pstamp_order";
    737    
     739
    738740    my $choose_components = 0;
    739741    if ($byid) {
     
    751753    }
    752754
     755    my $diff_mode = getDiffMode($rowList->[0]->{RUN_TYPE});
     756    $command .= " -diff_mode $diff_mode" if $diff_mode;
     757   
    753758    my $output = runToolAndParse($command, $verbose);
    754759
     
    18361841}
    18371842
     1843sub getDiffMode {
     1844    my $run_type = shift;
     1845    my $diff_mode;
     1846    if (!isnull($run_type)) {
     1847        $run_type = lc($run_type);
     1848        if ($run_type eq 'warp_warp') {
     1849            $diff_mode = 1;
     1850        } elsif ($run_type eq 'warp_stack') {
     1851            $diff_mode = 2;
     1852        } elsif ($run_type eq 'stack_stack') {
     1853            $diff_mode = 4;
     1854        } else {
     1855            print STDERR "Ingnoring unrecognized diff RUN_TYPE : $run_type\n";
     1856        }
     1857    }
     1858    return $diff_mode;
     1859}
     1860       
     1861
    18381862sub my_die
    18391863{
Note: See TracChangeset for help on using the changeset viewer.