IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 38070


Ignore:
Timestamp:
Mar 30, 2015, 4:34:10 PM (11 years ago)
Author:
watersc1
Message:

Change to allow diff_skycell.pl to replace a missing stack CMF with the warp one if the stack one is missing.

File:
1 edited

Legend:

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

    r35325 r38070  
    128128#     $use_convolved = 1; ## This is a hack to do a test for mops, and should not be committed.
    129129# }
     130
     131# 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.
     132my $diff_type = '';
     133
     134if ((${ $files }[0]->{warp_id} != 0)&&(${ $files }[1]->{warp_id} != 0)) {
     135    $diff_type = "WW";
     136}
     137elsif ((${ $files }[0]->{stack_id} != 0)&&(${ $files }[1]->{stack_id} != 0)) {
     138    $diff_type = "SS";
     139}
     140elsif (((${ $files }[0]->{stack_id} != 0)&&(${ $files }[1]->{stack_id} != 0))||
     141       ((${ $files }[0]->{stack_id} != 0)&&(${ $files }[1]->{stack_id} != 0))) {
     142    $diff_type = "WS";
     143}
     144else {  # Something has gone horribly wrong.
     145    $diff_type = "WW"; # just pretend it never happened, and let it fail elsewhere.
     146}
    130147
    131148# ppSub does (input) - (template) after PSF-match convolution. 
     
    254271&my_die("Couldn't find input: $templateMask", $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($templateMask);
    255272&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);
     273#&my_die("Couldn't find input: $templateSources", $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($templateSources);
     274
     275if ($diff_type eq 'WS') {
     276    # LANL processed stack images do not have a set of sources transferred back, so we need to choose a different source list.
     277    unless($ipprc->file_exists($templateSources)) {
     278        if ($ipprc->file_exists($inputSources)) {
     279            $templateSources = $inputSources;
     280            print "CHANGED:templateSources: $templateSources\n";
     281        }
     282    }
     283    &my_die("Couldn't find input: $templateSources", $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($templateSources);
     284}
     285else {
     286    &my_die("Couldn't find input: $templateSources", $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($templateSources);
     287}
    257288&my_die("Couldn't find input: $input", $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($input);
    258289&my_die("Couldn't find input: $inputMask", $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($inputMask);
Note: See TracChangeset for help on using the changeset viewer.