IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 37916


Ignore:
Timestamp:
Feb 19, 2015, 12:13:04 PM (11 years ago)
Author:
watersc1
Message:

Merge from trunk of less strict script that only requires stack sources if told to.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tags/ipp-20150115/ippScripts/scripts/staticsky.pl

    r36441 r37916  
    4848    print "  --outroot (root)    : Output root name\n";
    4949    print "  --reduction (class) : Reduction class\n";
     50    print "  --require_sources   : Require that the stack source files exist\n";
    5051    print "  --verbose           : Be extra verbose\n";
    5152    print "  --no-update         : Don't update the database?\n";
     
    6061print "run staticsky.pl @ARGV\n";
    6162
    62 my ($sky_id, $camera, $dbname, $threads, $outroot, $reduction, $verbose, $no_update, $no_op, $redirect, $save_temps);
     63my ($sky_id, $camera, $dbname, $threads, $outroot, $reduction, $require_sources, $verbose, $no_update, $no_op, $redirect, $save_temps);
    6364GetOptions(
    6465    'sky_id=s'          => \$sky_id, # Diff identifier
     
    6869    'outroot=s'         => \$outroot, # Output root name
    6970    'reduction=s'       => \$reduction, # Reduction class
     71    'require_sources'   => \$require_sources, # Require that the stack sources exist.
    7072    'verbose'           => \$verbose,   # Print to stdout
    7173    'no-update'         => \$no_update, # Don't update the database?
     
    178180                &my_die("Couldn't find input: $psfCnv",    $sky_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists("$psfCnv");
    179181            }
    180             &my_die("Couldn't find input: $sources",   $sky_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists("$sources");
    181 
     182           
     183            my $have_sources = $ipprc->file_exists("$sources");
     184            if ($require_sources) {
     185                &my_die("Couldn't find input: $sources",   $sky_id, $PS_EXIT_SYS_ERROR) unless $have_sources;
     186            }
     187           
    182188            print $listFile "  STACK_ID      S64  " . $stack_id  . "\n";
    183189            print $listFile "  RAW:IMAGE     STR  " . $imageRaw  . "\n";
     
    185191            print $listFile "  RAW:VARIANCE  STR  " . $weightRaw . "\n";
    186192            print $listFile "  RAW:EXPNUM    STR  " . $expnumRaw . "\n";
    187             print $listFile "  SOURCES       STR  " . $sources   . "\n";
     193            if ($have_sources) {
     194                print $listFile "  SOURCES       STR  " . $sources   . "\n";
     195            }
    188196            if ($needConvolvedImages) {
    189197                print $listFile "  CNV:IMAGE     STR  " . $imageCnv  . "\n";
Note: See TracChangeset for help on using the changeset viewer.