IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 25, 2007, 3:15:46 PM (19 years ago)
Author:
Paul Price
Message:

Adding -workdir to all scripts.

File:
1 edited

Legend:

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

    r11297 r11298  
    1919use Pod::Usage qw( pod2usage );
    2020
    21 my ($det_id, $iter, $exp_tag, $det_type, $camera, $filter, $reject, $dbname, $no_update);
     21my ($det_id, $iter, $exp_tag, $det_type, $camera, $filter, $reject, $dbname, $workdir, $no_update);
    2222GetOptions(
    2323           'det_id|d=s'        => \$det_id,
     
    2929           'reject'            => \$reject
    3030           'dbname|d=s'        => \$dbname, # Database name
     31           'workdir|w=s'       => \$workdir, # Working directory, for output files
    3132           'no-update'         => \$no_update,
    3233           ) or pod2usage( 2 );
     
    6869}
    6970
    70 my $example = ${$files}[0]->{b1_uri}; # Example file
    71 my ($vol, $dir, $file) = File::Spec->splitpath( $example );
     71unless (defined $workdir) {
     72    my $example = ${$files}[0]->{b1_uri}; # Example file
     73    my ($vol, $dir, $file) = File::Spec->splitpath( $example );
     74    $workdir = $dir;
     75}
    7276
    7377# Generate the file list, and get the statistics
    7478my $outputRoot = $exp_tag . '.detresid.' . $det_id . '.' . $iter; # Root output name
    75 $outputRoot = File::Spec->catpath( $vol, $dir, $outputRoot );
     79$outputRoot = File::Spec->catfile( $workdir, $outputRoot );
    7680$outputRoot = $ipprc->convert_filename_absolute($outputRoot);
    7781my $list1Name = $outputRoot . '.b1.list'; # Name for the input file list for binning 1
Note: See TracChangeset for help on using the changeset viewer.