IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 24168


Ignore:
Timestamp:
May 13, 2009, 11:42:57 AM (17 years ago)
Author:
Paul Price
Message:

Fixing destreaking for no URI in diffSkyfile, and possibility of inverse subtractions.

Location:
branches/pap_magic
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/pap_magic/ippScripts/scripts/magic_destreak.pl

    r23909 r24168  
    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
  • branches/pap_magic/ippTasks/magic.pro

    r24164 r24168  
    409409    book getword magicToDS $pageName uri -var URI
    410410    book getword magicToDS $pageName path_base -var PATH_BASE
     411    book getword magicToDS $pageName inverse -var INVERSE
    411412    book getword magicToDS $pageName cam_path_base -var CAM_PATH_BASE
    412413    book getword magicToDS $pageName outroot -var OUTROOT
     
    423424
    424425    $run = magic_destreak.pl --magic_ds_id $MAGIC_DS_ID --camera $CAMERA --streaks $STREAKS --stage $STAGE --stage_id $STAGE_ID --component $COMPONENT --uri $URI --path_base $PATH_BASE --cam_path_base $CAM_PATH_BASE --outroot $OUTROOT --logfile $logfile --recoveryroot $RECROOT --replace $REPLACE --remove $REMOVE
     426    if ($INVERSE > 0)
     427       # Inverse subtraction
     428       $run = $run --inverse
     429    end
    425430
    426431    add_standard_args run
  • branches/pap_magic/ippTools/share/magicdstool_todestreak.sql

    r23974 r24168  
    1313    rawImfile.uri as uri,
    1414    NULL as path_base,
     15    magicRun.inverse,
    1516    camProcessedExp.path_base as cam_path_base,
    1617    outroot,
     
    4445    chipProcessedImfile.uri,
    4546    chipProcessedImfile.path_base,
     47    magicRun.inverse,
    4648    camProcessedExp.path_base as cam_path_base,
    4749    outroot,
     
    7981    warpSkyfile.uri,
    8082    warpSkyfile.path_base,
     83    magicRun.inverse,
    8184    NULL as cam_path_base,
    8285    outroot,
     
    113116    magicRun.diff_id as stage_id,
    114117    diffSkyfile.skycell_id as component,
    115     diffSkyfile.uri,
     118    NULL AS uri,
    116119    diffSkyfile.path_base,
     120    magicRun.inverse,
    117121    NULL as cam_path_base,
    118122    outroot,
Note: See TracChangeset for help on using the changeset viewer.