IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 38734


Ignore:
Timestamp:
Sep 15, 2015, 12:54:53 PM (11 years ago)
Author:
watersc1
Message:

change from trunk to support missing stack cmf files.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tags/ipp-20141024/ippScripts/scripts/diff_skycell.pl

    r35325 r38734  
    7878# XXX camera is not known here; cannot use filerules...
    7979my $logDest = "$outroot.log";
     80my $updateMode = 0;
    8081if ($run_state eq 'update') {
    8182    $logDest .= '.update';
     83    $updateMode = 1;
    8284}
    8385$ipprc->redirect_to_logfile($logDest) or my_die( "Unable to redirect output", $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR ) if $redirect;
     
    128130#     $use_convolved = 1; ## This is a hack to do a test for mops, and should not be committed.
    129131# }
     132
     133# Re-implement prescan to decide if this is a warp-stack or warp-warp.  Or stack-stack, but that's what we don't care about now.
     134my $diff_type = '';
     135
     136if ((${ $files }[0]->{warp_id} != 0)&&(${ $files }[1]->{warp_id} != 0)) {
     137    $diff_type = "WW";
     138}
     139elsif ((${ $files }[0]->{stack_id} != 0)&&(${ $files }[1]->{stack_id} != 0)) {
     140    $diff_type = "SS";
     141}
     142elsif (((${ $files }[0]->{warp_id} != 0)&&(${ $files }[1]->{stack_id} != 0))) {
     143    $diff_type = "WS";
     144}
     145else {  # Something has gone horribly wrong.
     146    $diff_type = "WW"; # just pretend it never happened, and let it fail elsewhere.
     147}
    130148
    131149# ppSub does (input) - (template) after PSF-match convolution. 
     
    254272&my_die("Couldn't find input: $templateMask", $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($templateMask);
    255273&my_die("Couldn't find input: $templateVariance", $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($templateVariance);
    256 &my_die("Couldn't find input: $templateSources", $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($templateSources);
     274#&my_die("Couldn't find input: $templateSources", $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($templateSources);
     275
     276if ($diff_type eq 'WS') {
     277    # LANL processed stack images do not have a set of sources transferred back, so we need to choose a different source list.
     278    unless($ipprc->file_exists($templateSources)) {
     279        if ($ipprc->file_exists($inputSources)) {
     280            $templateSources = $inputSources;
     281            print "CHANGED:templateSources: $templateSources\n";
     282        }
     283    }
     284    &my_die("Couldn't find input: $templateSources", $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($templateSources);
     285}
     286else {
     287    &my_die("Couldn't find input: $templateSources", $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($templateSources);
     288}
    257289&my_die("Couldn't find input: $input", $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($input);
    258290&my_die("Couldn't find input: $inputMask", $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($inputMask);
     
    292324    }
    293325
    294     # use WARPSTATS if we're updating, as we don't care about the new stuff from the STACK and DIFF STATS recipes
     326    # use WARPSTATS if we're updating, as we don't care about the new stuff from the STACK and DIFF STATS recipes.
     327    # The only value that we use is -quality
    295328    $recipe_ppstats = 'WARPSTATS';
    296329}
     
    321354{
    322355    my $command = "$ppSub $outroot";
     356    $command .= " -updatemode" if $updateMode;
    323357    $command .= " -inimage $input";
    324358    $command .= " -refimage $template";
Note: See TracChangeset for help on using the changeset viewer.