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

    r11297 r11298  
    1919use Pod::Usage qw( pod2usage );
    2020
    21 my ($det_id, $iter, $class_id, $det_type, $camera, $dbname, $no_update);
     21my ($det_id, $iter, $class_id, $det_type, $camera, $dbname, $workdir, $no_update);
    2222GetOptions(
    2323    'det_id|d=s'        => \$det_id,
     
    2727    'camera|c=s'        => \$camera,
    2828    'dbname|d=s'        => \$dbname, # Database name
     29    'workdir|w=s'       => \$workdir,   # Working directory, for output files
    2930    'no-update'         => \$no_update
    3031) or pod2usage( 2 );
     
    7576}
    7677
    77 my $example = ${$files}[0]->{uri}; # Example file
    78 my ($vol, $dir, $file) = File::Spec->splitpath( $example );
     78unless (defined $workdir) {
     79    my $example = ${$files}[0]->{uri}; # Example file
     80    my ($vol, $dir, $file) = File::Spec->splitpath( $example );
     81    $workdir = $dir;
     82}
    7983
    8084# Stack the files
    8185my $outputRoot = $camera . '.' . $det_type . '.' . $det_id . '.' . $iter . '.' . $class_id; # Root name
    82 $outputRoot = File::Spec->catpath( $vol, $dir, $outputRoot );
     86$outputRoot = File::Spec->catfile( $workdir, $outputRoot );
    8387$outputRoot = $ipprc->convert_filename_absolute($outputRoot);
    8488my $outputStack = $outputRoot . '.fits'; # Output name
Note: See TracChangeset for help on using the changeset viewer.