Changeset 16196 for trunk/ippScripts/scripts/detrend_process_imfile.pl
- Timestamp:
- Jan 22, 2008, 5:36:36 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/detrend_process_imfile.pl
r15466 r16196 32 32 use Pod::Usage qw( pod2usage ); 33 33 34 my ($det_id, $exp_id, $class_id, $det_type, $exp_tag, $input_uri, $camera, $ dbname, $workdir, $reduction, $no_update, $no_op);34 my ($det_id, $exp_id, $class_id, $det_type, $exp_tag, $input_uri, $camera, $outroot, $dbname, $reduction, $no_update, $no_op); 35 35 GetOptions( 36 36 'det_id|d=s' => \$det_id, … … 41 41 'input_uri|u=s' => \$input_uri, 42 42 'camera|c=s' => \$camera, 43 'outroot|w=s' => \$outroot, # output file base name 43 44 'dbname|d=s' => \$dbname, # Database name 44 'workdir|w=s' => \$workdir, # Working directory, for output files45 45 'reduction=s' => \$reduction, # Reduction class 46 46 'no-update' => \$no_update, … … 49 49 50 50 pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV; 51 pod2usage( -msg => "Required options: --det_id --exp_id --class_id --det_type --exp_tag --input_uri --camera", 52 -exitval => 3) 53 unless defined $det_id 54 and defined $exp_id 55 and defined $class_id 56 and defined $det_type 57 and defined $exp_tag 58 and defined $input_uri 59 and defined $camera; 51 pod2usage( -msg => "Required options: --det_id --exp_id --class_id --det_type --exp_tag --input_uri --camera --outroot", 52 -exitval => 3) unless 53 defined $det_id and 54 defined $exp_id and 55 defined $class_id and 56 defined $det_type and 57 defined $exp_tag and 58 defined $input_uri and 59 defined $camera and 60 defined $outroot; 60 61 61 62 # XXX this exits with status = 0 on failure … … 88 89 &my_die("Couldn't find input file: $input_uri\n", $det_id, $exp_id, $class_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($input_uri); 89 90 90 $workdir = caturi( $workdir, "$camera.$det_type.$det_id" ) if defined $workdir; 91 # outroot examples (HOST components must be set) 92 # file://data/ipp004.0/gpc1/20080130 93 # neb:///ipp004-v1/gpc1/20080130 94 # neb:///*/gpc1/20080130 (volume not specified) 91 95 92 my $outputRoot = $ipprc->file_prepare( "$exp_tag/$exp_tag.detproc.$det_id", $workdir, $input_uri ); 96 # check for existing directory, generate if needed 97 $ipprc->outroot_prepare($outroot); 93 98 94 my $outputImage = $ipprc->filename("PPIMAGE.OUTPUT", $outputRoot, $class_id) or &my_die("Missing entry from camera config", $det_id, $exp_id, $class_id, $PS_EXIT_PROG_ERROR); 95 my $outputBin1 = $ipprc->filename("PPIMAGE.BIN1", $outputRoot, $class_id) or &my_die("Missing entry from camera config", $det_id, $exp_id, $class_id, $PS_EXIT_PROG_ERROR); 96 my $outputBin2 = $ipprc->filename("PPIMAGE.BIN2", $outputRoot, $class_id) or &my_die("Missing entry from camera config", $det_id, $exp_id, $class_id, $PS_EXIT_PROG_ERROR); 97 my $outputStats = $ipprc->filename("PPIMAGE.STATS", $outputRoot, $class_id) or &my_die("Missing entry from camera config", $det_id, $exp_id, $class_id, $PS_EXIT_PROG_ERROR); 98 99 my $traceDest = 'file:' . $ipprc->file_resolve($outputRoot) . ".$class_id.trace"; # Trace messages 100 my $logDest = 'file:' . $ipprc->file_resolve($outputRoot) . ".$class_id.log"; # Log messages 99 my $outputImage = $ipprc->filename("PPIMAGE.OUTPUT", $outroot, $class_id) or &my_die("Missing entry from camera config", $det_id, $exp_id, $class_id, $PS_EXIT_PROG_ERROR); 100 my $outputBin1 = $ipprc->filename("PPIMAGE.BIN1", $outroot, $class_id) or &my_die("Missing entry from camera config", $det_id, $exp_id, $class_id, $PS_EXIT_PROG_ERROR); 101 my $outputBin2 = $ipprc->filename("PPIMAGE.BIN2", $outroot, $class_id) or &my_die("Missing entry from camera config", $det_id, $exp_id, $class_id, $PS_EXIT_PROG_ERROR); 102 my $outputStats = $ipprc->filename("PPIMAGE.STATS", $outroot, $class_id) or &my_die("Missing entry from camera config", $det_id, $exp_id, $class_id, $PS_EXIT_PROG_ERROR); 103 my $traceDest = $ipprc->filename("TRACE.IMFILE", $outroot, $class_id) or &my_die("Missing entry from camera config", $exp_id, $chip_id, $class_id, $PS_EXIT_CONFIG_ERROR); 104 my $logDest = $ipprc->filename("LOG.IMFILE", $outroot, $class_id) or &my_die("Missing entry from camera config", $exp_id, $chip_id, $class_id, $PS_EXIT_CONFIG_ERROR); 101 105 102 106 # Run ppImage 103 107 unless ($no_op) { 104 my $command = "$ppImage -file $input_uri $out putRoot";108 my $command = "$ppImage -file $input_uri $outroot"; 105 109 $command .= " -recipe PPIMAGE $recipe"; 106 110 $command .= " -recipe PPSTATS CHIPSTATS"; … … 141 145 $command .= " -class_id $class_id"; 142 146 $command .= " -recip $reduction"; 143 $command .= " -uri $outputImage -path_base $out putRoot";147 $command .= " -uri $outputImage -path_base $outroot"; 144 148 $command .= " -dbname $dbname" if defined $dbname; 145 149 $command .= $stats->cmdflags();
Note:
See TracChangeset
for help on using the changeset viewer.
