Changeset 11837 for trunk/ippScripts/scripts/detrend_norm_exp.pl
- Timestamp:
- Feb 15, 2007, 2:23:33 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/ippScripts/scripts/detrend_norm_exp.pl (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/detrend_norm_exp.pl
r11829 r11837 33 33 use Pod::Usage qw( pod2usage ); 34 34 35 my ($det_id, $iter, $det_type, $camera, $dbname, $workdir, $no_update );35 my ($det_id, $iter, $det_type, $camera, $dbname, $workdir, $no_update, $no_op); 36 36 GetOptions( 37 37 'det_id|d=s' => \$det_id, … … 41 41 'dbname|d=s' => \$dbname, # Database name 42 42 'workdir|w=s' => \$workdir, # Working directory, for output files 43 'no-update' => \$no_update 43 'no-update' => \$no_update, 44 'no-op' => \$no_op, 44 45 ) or pod2usage( 2 ); 45 46 … … 104 105 my $stats = Statistics::Descriptive::Sparse->new; # Statistics calculator 105 106 $stats->add_data(@backgrounds); 106 $bg = $stats->mean();107 $bg_mean_stdev = $stats->standard_deviation() || 0.0;107 $bg = ($stats->mean() or 'NAN'); 108 $bg_mean_stdev = ($stats->standard_deviation() or 'NAN'); 108 109 } 109 110 { 110 111 my $stats = Statistics::Descriptive::Sparse->new; # Statistics calculator 111 112 $stats->add_data(@variances); 112 $bg_stdev = sqrt( $stats->mean());113 $bg_stdev = (sqrt( $stats->mean() ) or 'NAN'); 113 114 } 114 115 } … … 147 148 my $jpeg2Name = $ipprc->filename("PPIMAGE.JPEG2", $outputRoot); # Binned JPEG #2 148 149 149 # Make the jpeg for binning 1 150 { 151 my $command = "$ppImage -list $list1Name $outputRoot -recipe PPIMAGE " . RECIPE1; # Command to run 152 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 153 run(command => $command, verbose => 1); 154 &my_die("Unable to find expected output file: $jpeg1Name", $det_id, $iter, $PS_EXIT_SYS_ERROR) unless -f $jpeg1Name; 155 } 156 157 # Make the jpeg for binning 2 158 { 159 my $command = "$ppImage -list $list2Name $outputRoot -recipe PPIMAGE " . RECIPE2; # Command to run 160 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 161 run(command => $command, verbose => 1); 162 &my_die("Unable to find expected output file: $jpeg2Name", $det_id, $iter, $PS_EXIT_SYS_ERROR) unless -f $jpeg2Name; 150 unless ($no_op) { 151 # Make the jpeg for binning 1 152 { 153 my $command = "$ppImage -list $list1Name $outputRoot -recipe PPIMAGE " . RECIPE1; # Command to run 154 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 155 run(command => $command, verbose => 1); 156 &my_die("Unable to find expected output file: $jpeg1Name", $det_id, $iter, $PS_EXIT_SYS_ERROR) unless -f $jpeg1Name; 157 } 158 159 # Make the jpeg for binning 2 160 { 161 my $command = "$ppImage -list $list2Name $outputRoot -recipe PPIMAGE " . RECIPE2; # Command to run 162 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 163 run(command => $command, verbose => 1); 164 &my_die("Unable to find expected output file: $jpeg2Name", $det_id, $iter, $PS_EXIT_SYS_ERROR) unless -f $jpeg2Name; 165 } 163 166 } 164 167
Note:
See TracChangeset
for help on using the changeset viewer.
