IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 8983


Ignore:
Timestamp:
Sep 26, 2006, 10:38:47 AM (20 years ago)
Author:
Paul Price
Message:

Changes so that it will work with ISP data, with only a single imfile. The main change is that bg_stdev is undef when there's a single imfile, so that we need to explicitly check for that case, and set it to zero, otherwise the binaries barf due to bad command-line arguments.

Location:
trunk/ippScripts/scripts
Files:
4 edited

Legend:

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

    r8763 r8983  
    120120        "-b2_uri $bin2Name"; # Command to run dettool
    121121    $command .= " -bg " . $stats->bg_mean();
    122     $command .= " -bg_stdev " . $stats->bg_stdev();
     122    if (defined($stats->bg_stdev())) {
     123        $command .= " -bg_stdev " . $stats->bg_stdev();
     124    } else {
     125        # May be undefined if there is only a single imfile
     126        $command .= ' -bg_stdev 0';
     127    }
    123128    $command .= " -bg_mean_stdev " . $stats->bg_mean_stdev();
    124129
  • trunk/ippScripts/scripts/detrend_process.pl

    r8862 r8983  
    9999        "-class_id $class_id -recip $recipe -uri $outputImage"; # Command to run dettool
    100100    $command .= " -bg " . $stats->bg_mean();
    101     $command .= " -bg_stdev " . $stats->bg_stdev();
     101    if (defined($stats->bg_stdev())) {
     102        $command .= " -bg_stdev " . $stats->bg_stdev();
     103    } else {
     104        # May be undefined if there's only a single imfile
     105        $command .= " -bg_stdev 0";
     106    }
    102107    $command .= " -bg_mean_stdev " . $stats->bg_mean_stdev();
    103108
  • trunk/ippScripts/scripts/detrend_stack.pl

    r8763 r8983  
    111111        " -uri $output -recip $recipe"; # Command to run
    112112    $command .= ' -bg ' . $stats->bg_mean();
     113    if (defined($stats->bg_stdev())) {
    113114    $command .= ' -bg_stdev ' . $stats->bg_stdev();
     115    } else {
     116        # May be undefined if there is only a single imfile
     117        $command .= ' -bg_stdev 0';
     118    }
    114119    $command .= ' -bg_mean_stdev ' . $stats->bg_mean_stdev();
    115120    $command .= ' -pleasenormalize' if NORMALISE()->{$det_type};
  • trunk/ippScripts/scripts/phase0imfile.pl

    r8954 r8983  
    103103        $command .= " " . VARIABLES->{$variable} . " " . ($stats->data($variable))->{mean};
    104104    }
    105    
     105
    106106    $command .= " " . P0TOOL_BG_MEAN() . " " . $stats->bg_mean();
    107     $command .= " " . P0TOOL_BG_STDEV() . " " . $stats->bg_stdev();
     107    if (defined($stats->bg_stdev())) {
     108        $command .= " " . P0TOOL_BG_STDEV() . " " . $stats->bg_stdev();
     109    } else {
     110        # Will not be defined if there is only a single imfile
     111        $command .= " " . P0TOOL_BG_STDEV() . " 0";
     112    }
    108113    $command .= " " . P0TOOL_BG_MEAN_STDEV() . " " . $stats->bg_mean_stdev();
    109114 
Note: See TracChangeset for help on using the changeset viewer.