Changeset 9185
- Timestamp:
- Oct 3, 2006, 6:00:02 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/ippScripts/scripts/detrend_norm_apply.pl (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/detrend_norm_apply.pl
r9145 r9185 6 6 use IPC::Cmd qw( can_run run ); 7 7 use Data::Dumper; 8 9 use PS::IPP::Config; 10 my $ipprc = PS::IPP::Config->new(); # IPP configuration 11 use File::Spec; 8 12 9 13 use Getopt::Long qw( GetOptions :config auto_help auto_version gnu_getopt ); … … 51 55 die "Can't find required tools.\n" if $missing_tools; 52 56 57 my ($vol, $dir, $file) = File::Spec->splitpath( $input ); 58 $input = File::Spec->rel2abs( $input, $ipprc->workdir() ); 59 53 60 # Output name 54 61 my $outputRoot = $camera . '.' . $detType . '.norm.' . $detId . '.' . $iter; # Root output name 62 $outputRoot = File::Spec->rel2abs( File::Spec->catpath( $vol, $dir, $outputRoot ), $ipprc->workdir() ); 55 63 my $output = $outputRoot . '.' . $classId . '.fits'; # Main output file 56 64 my $b1name = $outputRoot . '.' . $classId . '.b1.fits'; # Output file with binning 1 … … 58 66 my $statsName = $outputRoot . '.' . $classId . '.stats'; # Statistics file 59 67 60 # Run ppArith68 # Run normalisation 61 69 { 62 70 my $command = "$ppImage -file $input $outputRoot -norm $value -stat $statsName -recipe PPIMAGE " . RECIPE(); # Command to run … … 84 92 } 85 93 86 87 94 # Update the database 95 $output = File::Spec->abs2rel( $output, $ipprc->workdir() ); 96 $b1name = File::Spec->abs2rel( $b1name, $ipprc->workdir() ); 97 $b2name = File::Spec->abs2rel( $b2name, $ipprc->workdir() ); 88 98 unless ($no_update) { 89 99 my $command = "$dettool -addnormalizedimfile -det_id $detId -iteration $iter -class_id $classId ". … … 102 112 die "Unable to perform dettool -addnormalizedimfile: $error_code\n" 103 113 if not $success; 114 115 unlink $statsName; 104 116 }
Note:
See TracChangeset
for help on using the changeset viewer.
