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

    r15643 r16196  
    3535use Pod::Usage qw( pod2usage );
    3636
    37 my ($det_id, $exp_id, $det_type, $exp_tag, $camera, $dbname, $workdir, $reduction, $no_update, $no_op);
     37my ($det_id, $exp_id, $det_type, $exp_tag, $camera, $outroot, $dbname, $reduction, $no_update, $no_op);
    3838GetOptions(
    3939    'det_id|d=s'        => \$det_id,
     
    4242    'exp_tag|=s'        => \$exp_tag,
    4343    'camera|c=s'        => \$camera,
     44    'outroot|w=s'       => \$outroot,   # output file base name
    4445    'dbname|d=s'        => \$dbname, # Database name
    45     'workdir|w=s'       => \$workdir,   # Working directory, for output files
    4646    'reduction|=s'      => \$reduction,
    4747    'no-update'         => \$no_update,
     
    5050
    5151pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV;
    52 pod2usage( -msg => "Required options: --det_id --det_type --exp_id --exp_tag --camera",
    53            -exitval => 3)
    54     unless defined $det_id
    55     and defined $det_type
    56     and defined $exp_id
    57     and defined $exp_tag
    58     and defined $camera;
     52pod2usage( -msg => "Required options: --det_id --det_type --exp_id --exp_tag --camera --outroot",
     53           -exitval => 3) unless
     54    defined $det_id   and
     55    defined $det_type and
     56    defined $exp_id   and
     57    defined $exp_tag  and
     58    defined $camera   and
     59    defined $outroot;
    5960
    6061$ipprc->define_camera($camera);
     
    129130close $list2File;
    130131
    131 # Output files
    132 $workdir = caturi( $workdir, "$camera.$det_type.$det_id" ) if defined $workdir;
    133 my $outputRoot = $ipprc->file_prepare( "$exp_tag/$exp_tag.detproc.$det_id", $workdir, ${$files}[0]->{path_base} );
    134 my $jpeg1 = $ipprc->filename("PPIMAGE.JPEG1", $outputRoot); # Binned JPEG #1
    135 my $jpeg2 = $ipprc->filename("PPIMAGE.JPEG2", $outputRoot); # Binned JPEG #2
     132# outroot examples (HOST components must be set)
     133# file://data/ipp004.0/gpc1/20080130
     134# neb:///ipp004-v1/gpc1/20080130
     135# neb:///*/gpc1/20080130 (volume not specified)
     136
     137# check for existing directory, generate if needed
     138$ipprc->outroot_prepare($outroot);
     139
     140my $jpeg1 = $ipprc->filename("PPIMAGE.JPEG1", $outroot); # Binned JPEG #1
     141my $jpeg2 = $ipprc->filename("PPIMAGE.JPEG2", $outroot); # Binned JPEG #2
    136142
    137143unless ($no_op) {
    138144    # Make the jpeg for binning 1
    139     $command = "$ppImage -list $list1Name $outputRoot -recipe PPIMAGE $recipe1"; # Command to run
     145    $command = "$ppImage -list $list1Name $outroot -recipe PPIMAGE $recipe1"; # Command to run
    140146    ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    141147        run(command => $command, verbose => 1);
     
    147153   
    148154    # Make the jpeg for binning 2
    149     $command = "$ppImage -list $list2Name $outputRoot -recipe PPIMAGE $recipe2"; # Command to run
     155    $command = "$ppImage -list $list2Name $outroot -recipe PPIMAGE $recipe2"; # Command to run
    150156    ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    151157        run(command => $command, verbose => 1);
     
    161167$command .= " -det_id $det_id";
    162168$command .= " -exp_id $exp_id";
    163 $command .= " -recip $recipe1,$recipe2 -path_base $outputRoot";
     169$command .= " -recip $recipe1,$recipe2 -path_base $outroot";
    164170$command .= " -dbname $dbname" if defined $dbname;
    165171$command .= $stats->cmdflags();
Note: See TracChangeset for help on using the changeset viewer.