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

    r11297 r11298  
    1919use Pod::Usage qw( pod2usage );
    2020
    21 my ($det_id, $iter, $det_type, $camera, $dbname, $no_update);
     21my ($det_id, $iter, $det_type, $camera, $dbname, $workdir, $no_update);
    2222GetOptions(
    2323    'det_id|d=s'        => \$det_id,
     
    2626    'det_type|t=s'      => \$det_type,
    2727    'dbname|d=s'        => \$dbname, # Database name
     28    'workdir|w=s'       => \$workdir,   # Working directory, for output files
    2829    'no-update'         => \$no_update
    2930) or pod2usage( 2 );
     
    9293}
    9394
    94 my $example = ${$files}[0]->{b1_uri}; # Example file, for path
    95 my ($vol, $dir, $file) = File::Spec->splitpath( $example );
     95unless (defined $workdir) {
     96    my $example = ${$files}[0]->{b1_uri}; # Example file, for path
     97    my ($vol, $dir, $file) = File::Spec->splitpath( $example );
     98    $workdir = $dir;
     99}
    96100
    97101# Generate the file list, and get the statistics
    98102my $outputRoot = $camera . '.' . $det_type . '.norm.' . $det_id . '.' . $iter; # Root output name
    99 $outputRoot = File::Spec->catpath( $vol, $dir, $outputRoot );
     103$outputRoot = File::Spec->catfile( $workdir, $outputRoot );
    100104$outputRoot = $ipprc->convert_filename_absolute( $outputRoot );
    101105my $list1Name = $outputRoot . '.b1.list'; # Name for the input file list for binning 1
     
    114118close $list2File;
    115119
    116 # Output products --- need to synch with the camera configuration!
     120# Output products
    117121my $jpeg1Name = $ipprc->filename("PPIMAGE.JPEG1", $outputRoot); # Binned JPEG #1
    118122my $jpeg2Name = $ipprc->filename("PPIMAGE.JPEG2", $outputRoot); # Binned JPEG #2
Note: See TracChangeset for help on using the changeset viewer.