- Timestamp:
- Jan 21, 2008, 4:56:26 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branch_20080121/ippScripts/scripts/detrend_resid.pl
r15616 r16176 32 32 use Pod::Usage qw( pod2usage ); 33 33 34 my ($det_id, $iter, $exp_id, $exp_tag, $class_id, $det_type, $detrend, $input_uri, $camera, $mode, $ dbname, $workdir, $reduction, $no_update, $no_op);34 my ($det_id, $iter, $exp_id, $exp_tag, $class_id, $det_type, $detrend, $input_uri, $camera, $mode, $outroot, $dbname, $reduction, $no_update, $no_op); 35 35 GetOptions( 36 36 'det_id|d=s' => \$det_id, … … 44 44 'camera|c=s' => \$camera, 45 45 'mode|m=s' => \$mode, 46 'outroot|w=s' => \$outroot, # output file base name 46 47 'dbname|d=s' => \$dbname, # Database name 47 'workdir|w=s' => \$workdir, # Working directory, for output files48 48 'reduction=s' => \$reduction, # Reduction class 49 49 'no-update' => \$no_update, … … 52 52 53 53 pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV; 54 pod2usage( -msg => "Required options: --det_id --iteration --exp_id --exp_tag --class_id --det_type --camera --input_uri --mode --detrend (not for 'verify' mode)", 55 -exitval => 3) 56 unless defined $det_id 57 and defined $iter 58 and defined $exp_id 59 and defined $exp_tag 60 and defined $class_id 61 and defined $det_type 62 and defined $input_uri 63 and defined $camera 64 and defined $mode 65 and (defined $detrend or lc($mode) eq 'verify'); 54 pod2usage( -msg => "Required options: --det_id --iteration --exp_id --exp_tag --class_id --det_type --camera --input_uri --mode --detrend --outroot (not for 'verify' mode)", 55 -exitval => 3) unless 56 defined $det_id and 57 defined $iter and 58 defined $exp_id and 59 defined $exp_tag and 60 defined $class_id and 61 defined $det_type and 62 defined $input_uri and 63 defined $camera and 64 defined $mode and 65 defined $outroot and 66 (defined $detrend or lc($mode) eq 'verify'); 66 67 67 68 $ipprc->define_camera($camera); … … 130 131 $ppImage .= " -dbname $dbname" if defined $dbname; 131 132 132 $workdir = caturi( $workdir, "$camera.$det_type.$det_id" ) if defined $workdir; 133 134 my $outputRoot = $ipprc->file_prepare( "$exp_tag/$exp_tag.detresid.$det_id.$iter", $workdir, $input_uri ); 135 136 my $outputName = $ipprc->filename("PPIMAGE.OUTPUT", $outputRoot, $class_id); 137 my $bin1Name = $ipprc->filename("PPIMAGE.BIN1", $outputRoot, $class_id); 138 my $bin2Name = $ipprc->filename("PPIMAGE.BIN2", $outputRoot, $class_id); 139 my $outputStats = $ipprc->filename("PPIMAGE.STATS", $outputRoot, $class_id); 140 141 my $traceDest = 'file:' . $ipprc->file_resolve($outputRoot) . ".$class_id.trace"; # Trace messages 142 my $logDest = 'file:' . $ipprc->file_resolve($outputRoot) . ".$class_id.log"; # Log messages 133 # outroot examples (HOST components must be set) 134 # file://data/ipp004.0/gpc1/20080130 135 # neb:///ipp004-v1/gpc1/20080130 136 # neb:///*/gpc1/20080130 (volume not specified) 137 138 # check for existing directory, generate if needed 139 $ipprc->outroot_prepare($outroot); 140 141 my $outputName = $ipprc->filename("PPIMAGE.OUTPUT", $outroot, $class_id); 142 my $bin1Name = $ipprc->filename("PPIMAGE.BIN1", $outroot, $class_id); 143 my $bin2Name = $ipprc->filename("PPIMAGE.BIN2", $outroot, $class_id); 144 my $outputStats = $ipprc->filename("PPIMAGE.STATS", $outroot, $class_id); 145 my $traceDest = $ipprc->filename("TRACE.IMFILE", $outroot, $class_id); 146 my $logDest = $ipprc->filename("LOG.IMFILE", $outroot, $class_id); 143 147 144 148 # Run ppImage & ppStats 145 149 unless ($no_op) { 146 my $command = "$ppImage -file $input_uri $out putRoot";150 my $command = "$ppImage -file $input_uri $outroot"; 147 151 $command .= " -recipe PPIMAGE $recipe"; 148 152 $command .= " -recipe PPSTATS RESIDUAL"; … … 205 209 $command .= " -recip $recipe"; 206 210 $command .= " -uri $outputName"; 207 $command .= " -path_base $out putRoot";211 $command .= " -path_base $outroot"; 208 212 $command .= " -dbname $dbname" if defined $dbname; 209 213 $command .= $stats->cmdflags();
Note:
See TracChangeset
for help on using the changeset viewer.
