IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 22, 2008, 5:36:36 PM (18 years ago)
Author:
eugene
Message:

updates from eam_branch_20080121: workdir changed to outroot

File:
1 edited

Legend:

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

    r15853 r16196  
    3535use Pod::Usage qw( pod2usage );
    3636
    37 my ($det_id, $iter, $det_type, $camera, $dbname, $workdir, $reduction, $no_update, $no_op);
     37my ($det_id, $iter, $det_type, $camera, $outroot, $dbname, $reduction, $no_update, $no_op);
    3838GetOptions(
    3939           'det_id|d=s'        => \$det_id,
     
    4141           'camera|c=s'        => \$camera,
    4242           'det_type|t=s'      => \$det_type,
     43           'outroot|w=s'       => \$outroot,   # output file base name
    4344           'dbname|d=s'        => \$dbname, # Database name
    44            'workdir|w=s'       => \$workdir,    # Working directory, for output files
    4545           'reduction|=s'      => \$reduction,
    4646           'no-update'         => \$no_update,
     
    4949
    5050pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV;
    51 pod2usage( -msg => "Required options: --det_id --iteration --camera --det_type",
    52            -exitval => 3)
    53     unless defined $det_id
    54     and defined $iter
    55     and defined $camera
    56     and defined $det_type;
     51pod2usage( -msg => "Required options: --det_id --iteration --camera --det_type --outroot",
     52           -exitval => 3) unless
     53    defined $det_id   and
     54    defined $iter     and
     55    defined $camera   and
     56    defined $det_type and
     57    defined $outroot;
    5758
    5859$ipprc->define_camera($camera);
     
    126127close $list2File;
    127128
    128 # Output products
    129 $workdir = caturi( $workdir, "$camera.$det_type.$det_id" ) if defined $workdir;
    130 my $outputRoot = $ipprc->file_prepare( "$camera.$det_type.norm.$det_id.$iter", $workdir );
    131 my $jpeg1Name = $ipprc->filename("PPIMAGE.JPEG1", $outputRoot); # Binned JPEG #1
    132 my $jpeg2Name = $ipprc->filename("PPIMAGE.JPEG2", $outputRoot); # Binned JPEG #2
     129# outroot examples (HOST components must be set)
     130# file://data/ipp004.0/gpc1/20080130
     131# neb:///ipp004-v1/gpc1/20080130
     132# neb:///*/gpc1/20080130 (volume not specified)
     133
     134# check for existing directory, generate if needed
     135$ipprc->outroot_prepare($outroot);
     136
     137my $jpeg1Name = $ipprc->filename("PPIMAGE.JPEG1", $outroot); # Binned JPEG #1
     138my $jpeg2Name = $ipprc->filename("PPIMAGE.JPEG2", $outroot); # Binned JPEG #2
    133139
    134140unless ($no_op) {
    135141    # Make the jpeg for binning 1
    136     $command = "$ppImage -list $list1Name $outputRoot -recipe PPIMAGE $recipe1"; # Command to run
     142    $command = "$ppImage -list $list1Name $outroot -recipe PPIMAGE $recipe1"; # Command to run
    137143    ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    138144        run(command => $command, verbose => 1);
     
    140146   
    141147    # Make the jpeg for binning 2
    142     $command = "$ppImage -list $list2Name $outputRoot -recipe PPIMAGE $recipe2"; # Command to run
     148    $command = "$ppImage -list $list2Name $outroot -recipe PPIMAGE $recipe2"; # Command to run
    143149    ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    144150        run(command => $command, verbose => 1);
     
    152158$command .= " -iteration $iter";
    153159$command .= " -recip $recipe1,$recipe2";
    154 $command .= " -path_base $outputRoot ";
     160$command .= " -path_base $outroot ";
    155161$command .= " -dbname $dbname" if defined $dbname;
    156162$command .= $stats->cmdflags();
Note: See TracChangeset for help on using the changeset viewer.