IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 13, 2009, 12:37:33 PM (17 years ago)
Author:
Paul Price
Message:

Merging branches/pap_magic@24173 into trunk. One conflict in dbconfig/changes.txt resolved easily.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/ippScripts/scripts/magic_destreak.pl

    r23909 r24174  
    3535
    3636# Parse the command-line arguments
    37 my ($magic_ds_id, $camera, $streaks, $stage, $stage_id, $component, $uri, $path_base, $cam_path_base);
     37my ($magic_ds_id, $camera, $streaks, $stage, $stage_id, $component, $uri, $path_base, $inverse, $cam_path_base);
    3838my ($outroot, $recoveryroot);
    3939my ($replace, $remove, $release);
     
    4949           'uri=s'          => \$uri,        # uri of the input image
    5050           'path_base=s'    => \$path_base,  # path_base of the input
     51           'inverse'        => \$inverse,    # Inverse subtraction?
    5152           'cam_path_base=s'=> \$cam_path_base,  # path_base of the associated camera run
    5253           'outroot=s'      => \$outroot,     # "directory" for temporary images (may be nebulous)
     
    183184my $image = $uri;
    184185
    185 my ($mask, $ch_mask, $weight, $astrom);
     186my ($image, $mask, $ch_mask, $weight, $astrom);
    186187
    187188if ($stage eq "raw") {
     189    $image = $uri;
    188190    $astrom = $ipprc->filename("PSASTRO.OUTPUT", $cam_path_base);
    189191    $mask   = $ipprc->filename("PSASTRO.OUTPUT.MASK", $cam_path_base, $class_id) if $release ;
     
    191193    # we use the mask output from the camera stage for input and replace
    192194    # the output of the chip stage with that mask as well.
     195    $image  = $ipprc->filename("PPIMAGE.CHIP", $path_base, $class_id);
    193196    $mask   = $ipprc->filename("PSASTRO.OUTPUT.MASK", $cam_path_base, $class_id);
    194197    $ch_mask= $ipprc->filename("PPIMAGE.CHIP.MASK", $path_base, $class_id);
     
    196199    $astrom = $ipprc->filename("PSASTRO.OUTPUT", $cam_path_base);
    197200} elsif ($stage eq "warp") {
     201    $image  = $ipprc->filename("PSWARP.OUTPUT", $path_base);
    198202    $mask   = $ipprc->filename("PSWARP.OUTPUT.MASK", $path_base);
    199203    $weight = $ipprc->filename("PSWARP.OUTPUT.VARIANCE", $path_base);
    200204} elsif ($stage eq "diff") {
    201     $mask   = $ipprc->filename("PPSUB.OUTPUT.MASK", $path_base);
    202     $weight = $ipprc->filename("PPSUB.OUTPUT.VARIANCE", $path_base);
     205    my $name = $inverse ? "PPSUB.INVERSE" : "PPSUB.OUTPUT"; # Base name for images
     206    $image  = $ipprc->filename($name, $path_base);
     207    $mask   = $ipprc->filename("$name.MASK", $path_base);
     208    $weight = $ipprc->filename("$name.VARIANCE", $path_base);
    203209}
    204210
Note: See TracChangeset for help on using the changeset viewer.