IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 28, 2008, 3:59:40 PM (18 years ago)
Author:
Paul Price
Message:

Moving to using outroot instead of workdir.

File:
1 edited

Legend:

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

    r16563 r16741  
    3333use Pod::Usage qw( pod2usage );
    3434
    35 my ($diff_id, $dbname, $workdir, $verbose, $no_update, $no_op);
     35my ($diff_id, $dbname, $outroot, $verbose, $no_update, $no_op);
    3636GetOptions(
    3737    'diff_id|d=s'       => \$diff_id, # Diff identifier
    3838    'dbname|d=s'        => \$dbname, # Database name
    39     'workdir|w=s'       => \$workdir,   # Working directory, for output files
     39    'outroot=s'         => \$outroot, # Output root name
    4040    'verbose'           => \$verbose,   # Print to stdout
    4141    'no-update'         => \$no_update, # Don't update the database?
     
    4747    -msg => "Required options: --diff_id",
    4848    -exitval => 3,
    49           ) unless defined $diff_id;
     49          ) unless defined $diff_id
     50    and defined $outroot;
    5051
    5152my $STATS =
     
    164165
    165166# Get the output filenames
    166 $workdir = caturi( $workdir, "tess_" . $tess_id, "sky_" . $skycell_id ) if defined $workdir;
    167 my $outputRoot = $ipprc->file_prepare( "$tess_id.$skycell_id.dif$diff_id", $workdir, $input );
    168 my $outputName = $ipprc->filename("PPSUB.OUTPUT", $outputRoot);
    169 my $outputMask = $ipprc->filename("PPSUB.OUTPUT.MASK", $outputRoot);
    170 my $outputWeight = $ipprc->filename("PPSUB.OUTPUT.WEIGHT", $outputRoot);
    171 my $outputSources = $ipprc->filename("PSPHOT.OUTPUT", $outputRoot);
    172 #my $bin1Name =  $ipprc->filename("PPSUB.BIN1", $outputRoot);
    173 #my $bin2Name =  $ipprc->filename("PPSUB.BIN2", $outputRoot);
    174 my $outputStats = $outputRoot . '.stats';
    175 
    176 my $traceDest = 'file:' . $ipprc->file_resolve($outputRoot) . ".trace"; # Trace messages
    177 my $logDest = 'file:' . $ipprc->file_resolve($outputRoot) . ".log"; # Log messages
     167my $outputName = $ipprc->filename("PPSUB.OUTPUT", $outroot);
     168my $outputMask = $ipprc->filename("PPSUB.OUTPUT.MASK", $outroot);
     169my $outputWeight = $ipprc->filename("PPSUB.OUTPUT.WEIGHT", $outroot);
     170my $outputSources = $ipprc->filename("PSPHOT.OUTPUT", $outroot);
     171#my $bin1Name =  $ipprc->filename("PPSUB.BIN1", $outroot);
     172#my $bin2Name =  $ipprc->filename("PPSUB.BIN2", $outroot);
     173my $outputStats = $ipprc->filename("SKYCELL.STATS", $outroot);
     174my $traceDest = $ipprc->filename("TRACE.EXP", $outroot);
     175my $logDest = $ipprc->filename("LOG.EXP", $outroot);
    178176
    179177# Perform subtraction
    180178unless ($no_op) {
    181     my $command = "$ppSub $input $template $outputRoot";
     179    my $command = "$ppSub $input $template $outroot";
    182180    $command .= " -inmask $inputMask";
    183181    $command .= " -refmask $templateMask";
     
    218216    # Add the subtraction result
    219217    {
    220         my $command = "$difftool -adddiffskyfile -diff_id $diff_id -uri $outputName -path_base $outputRoot";
     218        my $command = "$difftool -adddiffskyfile -diff_id $diff_id -uri $outputName -path_base $outroot";
    221219        $command .= $stats->cmdflags();
    222220        $command .= " -dbname $dbname" if defined $dbname;
Note: See TracChangeset for help on using the changeset viewer.