IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 7, 2009, 4:50:25 PM (17 years ago)
Author:
Paul Price
Message:

Merging branches/pap from r23739 onto trunk. No conflicts, ppSub builds fine.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/ippScripts/scripts/diff_skycell.pl

    r23688 r23740  
    9595my $tess_id;                    # Tesselation identifier
    9696my $camera;                     # Camera
    97 my $magicked_0;
    98 my $magicked_1;
     97my ($inputMagic, $templateMagic); # Are the inputs been magicked?
     98my $inverse = 1;                # Generate inverse subtraction if warp-warp
    9999foreach my $file (@$files) {
    100100    if (defined $file->{template} and $file->{template}) {
     
    106106            $templateSources = "PSPHOT.OUT.CMF.MEF";  ## this must be consistent with the value in stack_skycell.pl:161
    107107            # template is a stack so it doesn't need to be magicked
    108             $magicked_1 = 1;
     108            $templateMagic = 1;
     109            $inverse = 0;
    109110            ## use an explicit stack name for psphot output objects
    110111        } else {
     
    112113            $templateVariance = "PSWARP.OUTPUT.VARIANCE";
    113114            $templateSources = "PSWARP.OUTPUT.SOURCES";
    114             $magicked_1 = $file->{magicked};
     115            $templateMagic = $file->{magicked};
    115116        }
    116117    } else {
    117118        $input = $file->{uri};
    118119        $inputPath = $file->{path_base};
    119         $magicked_0 = $file->{magicked};    # if input is a stack the output can't be "magicked"
     120        $inputMagic = $file->{magicked};    # if input is a stack the output can't be "magicked"
    120121        if ($file->{warp_id} == 0) {
    121122            $inputMask = "PPSTACK.OUTPUT.MASK";
    122123            $inputVariance = "PPSTACK.OUTPUT.VARIANCE";
    123124            $inputSources = "PSPHOT.OUT.CMF.MEF";  ## this must be consistent with the value in stack_skycell.pl:161
     125            $inverse = 0;
    124126        } else {
    125127            $inputMask = "PSWARP.OUTPUT.MASK";
     
    145147        $camera = $file->{camera};
    146148    }
    147 
    148149}
    149150
     
    158159# note that difftool -inputskyfile outputs the magicked boolean as an int not T or F
    159160# because the output is constructed from a union of two selects
    160 my $magicked = $magicked_0 && $magicked_1;
     161my $magicked = $inputMagic && $templateMagic;
    161162
    162163# Recipes to use based on reduction class
     
    207208my $outputMask = $ipprc->filename("PPSUB.OUTPUT.MASK", $outroot);
    208209my $outputVariance = $ipprc->filename("PPSUB.OUTPUT.VARIANCE", $outroot);
     210my $outputSources = $ipprc->filename("PPSUB.OUTPUT.SOURCES", $outroot);
     211my $jpeg1Name = $ipprc->filename("PPSUB.OUTPUT.JPEG1", $outroot);
     212my $jpeg2Name = $ipprc->filename("PPSUB.OUTPUT.JPEG2", $outroot);
    209213my $configuration = $ipprc->filename("PPSUB.CONFIG", $outroot);
    210 my $outputSources = $ipprc->filename("PSPHOT.OUT.CMF.MEF", $outroot);
    211 #my $bin1Name =  $ipprc->filename("PPSUB.BIN1", $outroot);
    212 #my $bin2Name =  $ipprc->filename("PPSUB.BIN2", $outroot);
    213214my $outputStats = $ipprc->filename("SKYCELL.STATS", $outroot);
    214215my $traceDest = $ipprc->filename("TRACE.EXP", $outroot);
     216
     217my ($inverseName, $inverseMask, $inverseVariance, $inverseSources);
     218if ($inverse) {
     219    $inverseName = $ipprc->filename("PPSUB.INVERSE", $outroot);
     220    $inverseMask = $ipprc->filename("PPSUB.INVERSE.MASK", $outroot);
     221    $inverseVariance = $ipprc->filename("PPSUB.INVERSE.VARIANCE", $outroot);
     222    $inverseSources = $ipprc->filename("PPSUB.INVERSE.SOURCES", $outroot);
     223}
    215224
    216225my $cmdflags;
     
    236245    $command .= " -F PSPHOT.BACKMDL PSPHOT.BACKMDL.MEF";
    237246    $command .= " -photometry";
     247    $command .= " -inverse" if $inverse;
    238248    $command .= " -tracedest $traceDest -log $logDest";
    239249    $command .= " -dumpconfig $configuration";
     
    271281        &my_die("Couldn't find expected output file: $outputMask", $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputMask);
    272282        &my_die("Couldn't find expected output file: $outputVariance", $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputVariance);
    273 #        &my_die("Couldn't find expected output file: $outputSources", $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputSources);
    274 #        &my_die("Couldn't find expected output file: $bin1Name",    $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($bin1Name);
    275 #        &my_die("Couldn't find expected output file: $bin2Name",    $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($bin2Name);
     283        &my_die("Couldn't find expected output file: $outputSources", $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputSources);
     284        &my_die("Couldn't find expected output file: $jpeg1Name",    $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($jpeg1Name);
     285        &my_die("Couldn't find expected output file: $jpeg2Name",    $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($jpeg2Name);
     286        if ($inverse) {
     287            &my_die("Couldn't find expected output file: $inverseName", $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($inverseName);
     288            &my_die("Couldn't find expected output file: $inverseMask", $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($inverseMask);
     289            &my_die("Couldn't find expected output file: $inverseVariance", $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($inverseVariance);
     290            &my_die("Couldn't find expected output file: $inverseSources", $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($inverseSources);
     291        }
    276292    }
    277293}
Note: See TracChangeset for help on using the changeset viewer.