Changeset 8586
- Timestamp:
- Aug 24, 2006, 5:22:57 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/ippScripts/scripts/detrend_stack.pl (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/detrend_stack.pl
r8505 r8586 46 46 my $files; # Array of files to be stacked 47 47 { 48 my $command = "$dettool -processed -det_id $detId -iter $iter -class_id $classId"; # Command to run48 my $command = "$dettool -processed -det_id $detId -iteration $iter -class_id $classId"; # Command to run 49 49 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 50 50 run(command => $command, verbose => 1); … … 55 55 56 56 # Stack the files 57 my $output = $detType . '_' . $classId . '_' . $detId . '_' . $iter ; # Output name57 my $output = $detType . '_' . $classId . '_' . $detId . '_' . $iter . '.fit'; # Output name 58 58 { 59 59 my $command = "$ppMerge $output"; # Command to run … … 63 63 } 64 64 $command .= " -recipe PPMERGE $recipe"; 65 $command .= ' -type ' . uc($detType); # Type of stacking to perform65 $command .= ' -type ' . uc($detType); # Type of stacking to perform 66 66 67 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =68 run(command => $command, verbose => 1);69 die "Unable to perform ppMerge: $error_code\n" if not $success;67 # my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 68 # run(command => $command, verbose => 1); 69 # die "Unable to perform ppMerge: $error_code\n" if not $success; 70 70 die "Unable to find expected output file: $output\n" if not -f $output; 71 71 } 72 72 73 ### XXX: Need to add statistics 74 my $bg_mean = 0; 75 my $bg_stdev = 0; 76 my $bg_mean_stdev = 0; 77 78 73 79 # Add the resultant into the database 74 80 { 75 my $command = "dettool -addstacked -det_id $detId -iter $iter -class_id $classId" . 76 " -uri $output"; # Command to run 81 my $command = "$dettool -addstacked -det_id $detId -iteration $iter -class_id $classId" . 82 " -uri $output -recip $recipe"; # Command to run 83 $command .= ' -bg ' . $bg_mean; 84 $command .= ' -bg_stdev ' . $bg_stdev; 85 $command .= ' -bg_mean_stdev ' . $bg_mean_stdev; 77 86 $command .= ' -pleasenormalize' if NORMALISE()->{$detType}; 78 87 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
Note:
See TracChangeset
for help on using the changeset viewer.
