Changeset 11319 for trunk/ippScripts/scripts/phase2.pl
- Timestamp:
- Jan 26, 2007, 12:20:56 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/ippScripts/scripts/phase2.pl (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/phase2.pl
r11316 r11319 26 26 27 27 # Parse the command-line arguments 28 my ($exp Tag, # Exposure tag29 $class Id, # Class Id28 my ($exp_tag, # Exposure tag 29 $class_id, # Class Id 30 30 $input, # Input FITS file 31 31 $camera, # Camera … … 35 35 ); 36 36 GetOptions( 37 'exp_tag|e=s' => \$exp Tag,38 'class_id|i=s' => \$class Id,37 'exp_tag|e=s' => \$exp_tag, 38 'class_id|i=s' => \$class_id, 39 39 'uri|u=s' => \$input, 40 40 'camera|c=s' => \$camera, … … 46 46 pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV; 47 47 pod2usage( 48 -msg => "Required options: --exp_tag --class_id --uri --camera -- outpath",48 -msg => "Required options: --exp_tag --class_id --uri --camera --workdir", 49 49 -exitval => 3, 50 ) unless defined $exp Tag51 and defined $class Id50 ) unless defined $exp_tag 51 and defined $class_id 52 52 and defined $input 53 53 and defined $camera; … … 70 70 71 71 ### Output file name --- must match camera configuration! 72 my $outputRoot = $exp Tag . '.p2';72 my $outputRoot = $exp_tag . '.p2'; 73 73 $outputRoot = File::Spec->catfile( $workdir, $outputRoot ); 74 74 $outputRoot = $ipprc->convert_filename_absolute($outputRoot); 75 75 $input = $ipprc->convert_filename_absolute ( $input ); 76 76 77 my $outputImage = $ipprc->filename("PPIMAGE.OUTPUT", $outputRoot, $class Id);78 my $outputBin1 = $ipprc->filename("PPIMAGE.BIN1", $outputRoot, $class Id);79 my $outputBin2 = $ipprc->filename("PPIMAGE.BIN2", $outputRoot, $class Id);80 my $outputStats = $outputRoot . '.' . $class Id . '.stats';77 my $outputImage = $ipprc->filename("PPIMAGE.OUTPUT", $outputRoot, $class_id); 78 my $outputBin1 = $ipprc->filename("PPIMAGE.BIN1", $outputRoot, $class_id); 79 my $outputBin2 = $ipprc->filename("PPIMAGE.BIN2", $outputRoot, $class_id); 80 my $outputStats = $outputRoot . '.' . $class_id . '.stats'; 81 81 82 82 # Run ppImage … … 91 91 run(command => $command, verbose => 1); 92 92 unless ($success) { 93 $error_code >> 8;93 $error_code = $error_code >> 8; 94 94 &my_die("Unable to perform ppImage: $error_code", $exp_tag, $class_id, $error_code); 95 95 } … … 122 122 # Command to run p2tool 123 123 my $command = "$p2tool -addprocessedimfile"; 124 $command .= " -exp_tag $exp Tag";125 $command .= " -class_id $class Id";124 $command .= " -exp_tag $exp_tag"; 125 $command .= " -class_id $class_id"; 126 126 $command .= " -recip " . RECIPE; 127 127 $command .= " -uri $outputImage"; … … 136 136 run(command => $command, verbose => 1); 137 137 unless ($success) { 138 $error_code >> 8;138 $error_code = $error_code >> 8; 139 139 warn("Unable to perform p2tool -addprocessedimfile: $error_code\n"); 140 140 exit($error_code); … … 154 154 warn($msg); 155 155 if ($exp_tag and $class_id) { 156 my $command = "$ dettool -addprocessedimfile -exp_tag $exp_tag -class_id $class_id -code $exit_code";156 my $command = "$p2tool -addprocessedimfile -exp_tag $exp_tag -class_id $class_id -code $exit_code"; 157 157 $command .= " -dbname $dbname" if defined $dbname; 158 158 system ($command);
Note:
See TracChangeset
for help on using the changeset viewer.
