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_process_exp.pl

    r11297 r11298  
    1919use Pod::Usage qw( pod2usage );
    2020
    21 my ($det_id, $exp_tag, $camera, $dbname, $no_update);
     21my ($det_id, $exp_tag, $camera, $dbname, $workdir, $no_update);
    2222GetOptions(
    2323    'det_id|d=s'        => \$det_id,
     
    2525    'camera|c=s'        => \$camera,
    2626    'dbname|d=s'        => \$dbname, # Database name
     27    'workdir|w=s'       => \$workdir,   # Working directory, for output files
    2728    'no-update'         => \$no_update
    2829) or pod2usage( 2 );
     
    9091}
    9192
    92 my $example = ${$files}[0]->{b1_uri}; # Example filename
    93 my ($vol, $dir, $file) = File::Spec->splitpath( $example );
     93unless (defined $workdir) {
     94    my $example = ${$files}[0]->{b1_uri}; # Example filename
     95    my ($vol, $dir, $file) = File::Spec->splitpath( $example );
     96    $workdir = $dir;
     97}
    9498
    9599# Generate the file list, and get the statistics
    96100my $outputRoot = $exp_tag . '.detproc.' . $det_id; # Root output name
    97 $outputRoot = File::Spec->catpath( $vol, $dir, $outputRoot );
     101$outputRoot = File::Spec->catfile( $workdir, $outputRoot );
    98102$outputRoot = $ipprc->convert_filename_absolute($outputRoot);
    99103my $list1Name = $outputRoot . '.b1.list'; # Name for the input file list for binning 1
Note: See TracChangeset for help on using the changeset viewer.