Changeset 9892 for trunk/ippScripts/scripts/phase2.pl
- Timestamp:
- Nov 7, 2006, 10:38:05 AM (20 years ago)
- File:
-
- 1 edited
-
trunk/ippScripts/scripts/phase2.pl (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/phase2.pl
r9446 r9892 21 21 $classId, # Class Id 22 22 $input, # Input FITS file 23 $camera, # Camera 23 24 $no_update # Don't update the database? 24 25 ); … … 27 28 'class_id|i=s' => \$classId, 28 29 'uri|u=s' => \$input, 30 'camera|c=s' => \$camera, 29 31 'no-update' => \$no_update 30 32 ) or pod2usage( 2 ); … … 32 34 pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV; 33 35 pod2usage( 34 -msg => "Required options: --exp_tag --class_id --uri ",36 -msg => "Required options: --exp_tag --class_id --uri --camera", 35 37 -exitval => 3, 36 38 ) unless defined $expTag 37 39 and defined $classId 38 and defined $input; 40 and defined $input 41 and defined $camera; 42 43 $ipprc->define_camera($camera); 39 44 40 45 # Look for programs we need … … 49 54 $outputRoot = File::Spec->rel2abs( File::Spec->catpath( $vol, $dir, $outputRoot ), $ipprc->workdir() ); 50 55 $input = File::Spec->rel2abs( $input, $ipprc->workdir() ); 51 my $outputImage = $outputRoot . '.' . $classId . '.fits'; 56 my $outputImage = $ipprc->filename("PPIMAGE.OUTPUT", $outputRoot, $classId); 57 my $outputBin1 = $ipprc->filename("PPIMAGE.BIN1", $outputRoot, $classId); 58 my $outputBin2 = $ipprc->filename("PPIMAGE.BIN2", $outputRoot, $classId); 52 59 my $outputStats = $outputRoot . '.' . $classId . '.stats'; 53 my $outputBin1Name = $outputRoot . '.' . $classId . '.b1.fits';54 my $outputBin2Name = $outputRoot . '.' . $classId . '.b2.fits';55 60 56 61 # Run ppImage … … 62 67 die "Unable to perform ppImage on $input: $error_code\n" if not $success; 63 68 die "Couldn't find expected output file: $outputImage\n" if not -f $outputImage; 64 die "Couldn't find expected output file: $outputBin1 Name\n" if not -f $outputBin1Name;65 die "Couldn't find expected output file: $outputBin2 Name\n" if not -f $outputBin2Name;69 die "Couldn't find expected output file: $outputBin1\n" if not -f $outputBin1; 70 die "Couldn't find expected output file: $outputBin2\n" if not -f $outputBin2; 66 71 die "Couldn't find expected output file: $outputStats\n" if not -f $outputStats; 67 72 } … … 83 88 # Add the processed file to the database 84 89 $outputImage = File::Spec->abs2rel( $outputImage, $ipprc->workdir() ); 85 $outputBin1 Name = File::Spec->abs2rel( $outputBin1Name, $ipprc->workdir() );86 $outputBin2 Name = File::Spec->abs2rel( $outputBin2Name, $ipprc->workdir() );90 $outputBin1 = File::Spec->abs2rel( $outputBin1, $ipprc->workdir() ); 91 $outputBin2 = File::Spec->abs2rel( $outputBin2, $ipprc->workdir() ); 87 92 unless ($no_update) { 88 93 # Command to run dettool … … 92 97 $command .= " -recip " . RECIPE; 93 98 $command .= " -uri $outputImage"; 94 $command .= " -b1_uri $outputBin1 Name";95 $command .= " -b2_uri $outputBin2 Name";99 $command .= " -b1_uri $outputBin1"; 100 $command .= " -b2_uri $outputBin2"; 96 101 $command .= " -bg " . $stats->bg_mean(); 97 102 $command .= " -bg_stdev " . $stats->bg_stdev();
Note:
See TracChangeset
for help on using the changeset viewer.
