IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 1, 2012, 1:34:15 PM (14 years ago)
Author:
heather
Message:

if it isn't tested.. fixed staticksy file rules

File:
1 edited

Legend:

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

    r33957 r33979  
    8181    -msg => "Required options: --sky_id --outroot --camera",
    8282    -exitval => 3,
    83           ) unless 
     83          ) unless
    8484    defined $sky_id and
    8585    defined $outroot and
     
    120120
    121121
    122 # generate the input 
     122# generate the input
    123123print $listFile "INPUT   MULTI\n";
    124124my $nInputs = @$files;
     
    194194        # Perform stack photometry analysis
    195195        {
    196             my $command = "$psphotStack $outroot.stk";
     196            my $command = "$psphotStack $outroot";
    197197            $command .= " -input $listName";
    198198            $command .= " -threads $threads" if defined $threads;
     
    235235                    # we have one set of output files per input file set
    236236                    for (my $i = 0; $i < @$files; $i++) {
    237                         my $outputName     = $ipprc->filename("PSPHOT.STACK.OUTPUT.IMAGE", $outroot, $i);
    238                         my $outputMask     = $ipprc->filename("PSPHOT.STACK.OUTPUT.MASK", $outroot, $i);
    239                         my $outputVariance = $ipprc->filename("PSPHOT.STACK.OUTPUT.VARIANCE", $outroot, $i);
    240                         my $outputSources  = $ipprc->filename("PSPHOT.STACK.OUTPUT", $outroot, $i);
     237                        my $stack_id = @$files[$i]->{stack_id};
     238                        my $outputName     = $ipprc->filename("PSPHOT.STACK.OUTPUT.IMAGE", $outroot, $stack_id);
     239                        my $outputMask     = $ipprc->filename("PSPHOT.STACK.OUTPUT.MASK", $outroot, $stack_id);
     240                        my $outputVariance = $ipprc->filename("PSPHOT.STACK.OUTPUT.VARIANCE", $outroot, $stack_id);
     241                        my $outputSources  = $ipprc->filename("PSPHOT.STACK.OUTPUT", $outroot, $stack_id);
    241242
    242243                        # XXX these are optional and not generated by default
     
    256257
    257258                    # XXX check the recipe -- should we expect these to exist?
    258                     # &my_die("Couldn't find expected output file: $chisqName",           $sky_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($chisqName);
    259                     # &my_die("Couldn't find expected output file: $chisqMask",           $sky_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($chisqMask);
     259                    # &my_die("Couldn't find expected output file: $chisqName",           $sky_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($chisqName);
     260                    # &my_die("Couldn't find expected output file: $chisqMask",           $sky_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($chisqMask);
    260261                    # &my_die("Couldn't find expected output file: $chisqVariance", $sky_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($chisqVariance);
    261262                }
     
    346347                }
    347348
    348                 &my_die("Couldn't find expected output file: $configuration", $sky_id, $PS_EXIT_SYS_ERROR) 
     349                &my_die("Couldn't find expected output file: $configuration", $sky_id, $PS_EXIT_SYS_ERROR)
    349350                    unless $ipprc->file_exists($configuration);
    350351            } else {
     
    359360    {
    360361        my $command = "$staticskytool -sky_id $sky_id";
    361         $command .= " -addresult -path_base $outroot";
    362         $command .= " -num_inputs $nInputs";
    363         # $command .= " $cmdflags";
    364         $command .= (" -dtime_script " . ((DateTime->now->mjd - $mjd_start) * 86400));
    365         $command .= " -hostname $host" if defined $host;
     362        $command .= " -addresult -path_base $outroot";
     363        $command .= " -num_inputs $nInputs";
     364        # $command .= " $cmdflags";
     365        $command .= (" -dtime_script " . ((DateTime->now->mjd - $mjd_start) * 86400));
     366        $command .= " -hostname $host" if defined $host;
    366367        $command .= " -dbname $dbname" if defined $dbname;
    367368
     
    371372            $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
    372373            my $err_message = "Unable to perform staticskytool -addresult";
    373             warn($err_message);
    374             exit $error_code;
     374            warn($err_message);
     375            exit $error_code;
    375376        }
    376377    }
     
    389390    if (defined $sky_id and not $no_update) {
    390391        my $command = "$staticskytool -sky_id $sky_id -fault $exit_code";
    391         $command .= " -addresult";
    392         $command .= (" -dtime_script " . ((DateTime->now->mjd - $mjd_start) * 86400));
    393         $command .= " -hostname $host" if defined $host;
    394         $command .= " -path_base $outroot" if defined $outroot;
    395         $command .= " -dbname $dbname" if defined $dbname;
     392        $command .= " -addresult";
     393        $command .= (" -dtime_script " . ((DateTime->now->mjd - $mjd_start) * 86400));
     394        $command .= " -hostname $host" if defined $host;
     395        $command .= " -path_base $outroot" if defined $outroot;
     396        $command .= " -dbname $dbname" if defined $dbname;
    396397        run(command => $command, verbose => $verbose);
    397398    }
Note: See TracChangeset for help on using the changeset viewer.