Changeset 9166 for trunk/ippScripts/scripts/detrend_process_imfile.pl
- Timestamp:
- Oct 3, 2006, 3:44:37 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/detrend_process_imfile.pl
r9099 r9166 10 10 use PS::IPP::Metadata::Config; 11 11 use PS::IPP::Metadata::Stats; 12 13 use PS::IPP::Config; 14 my $ipprc = PS::IPP::Config->new(); # IPP configuration 15 use File::Spec; 12 16 13 17 use Getopt::Long qw( GetOptions :config auto_help auto_version gnu_getopt ); … … 42 46 }; 43 47 44 use constant DELETE_STATS => 0; # Delete the statistics file when done?45 46 48 # Look for programs we need 47 49 my $missing_tools; … … 55 57 56 58 ### Output file name --- must match camera configuration! 57 my $outputRoot = $exp_tag . '.detproc.' . $det_id; 58 my $outputName = $outputRoot . '.' . $class_id ; 59 my $outputImage = $outputName . '.fits'; 60 my $outputStats = $outputName . '.stats'; 59 my ($vol, $dir, $file) = File::Spec->splitpath( $input_uri ); 60 my $outputRoot = $exp_tag . '.detproc.' . $det_id; # Root name 61 $outputRoot = File::Spec->rel2abs( File::Spec->catpath( $vol, $dir, $outputRoot ), $ipprc->workdir() ); 62 $input_uri = File::Spec->rel2abs( $input_uri, $ipprc->workdir() ); 63 my $outputImage = $outputRoot . '.' . $class_id . '.fits'; 64 my $outputStats = $outputRoot . '.' . $class_id . '.stats'; 61 65 62 66 # Run ppImage … … 85 89 } 86 90 91 # Take off the absolute path, to stuff into the database 92 $outputImage = File::Spec->abs2rel( $outputImage, $ipprc->workdir() ); 93 87 94 # Add the processed file to the database 88 95 unless ($no_update) { … … 102 109 die "Unable to perform dettool -addprocessedimfile for $det_id/$exp_tag/$class_id: $error_code\n" 103 110 if not $success; 111 112 unlink $outputStats; 104 113 } 105 114 106 unlink "$outputStats" if DELETE_STATS;107 115 108 116 __END__
Note:
See TracChangeset
for help on using the changeset viewer.
