Changeset 23342 for trunk/ippScripts/scripts
- Timestamp:
- Mar 17, 2009, 10:36:05 AM (17 years ago)
- File:
-
- 1 edited
-
trunk/ippScripts/scripts/detrend_resid_exp.pl (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/detrend_resid_exp.pl
r23295 r23342 45 45 46 46 # parse the command-line options 47 my ( $det_id, $iter, $exp_id, $exp_tag, $det_ type, $camera, $filter, $reject, $outroot, $dbname, $reduction,47 my ( $det_id, $iter, $exp_id, $exp_tag, $det_mode, $det_type, $camera, $filter, $reject, $outroot, $dbname, $reduction, 48 48 $verbose, $no_update, $no_op, $save_temps, $redirect ); 49 49 GetOptions( … … 53 53 'exp_tag|=s' => \$exp_tag, 54 54 'det_type|t=s' => \$det_type, 55 'det_mode=s' => \$det_mode, 55 56 'camera=s' => \$camera, 56 57 'outroot|w=s' => \$outroot, # output file base name … … 74 75 defined $exp_tag and 75 76 defined $det_type and 77 defined $det_mode and 76 78 defined $camera and 77 79 defined $outroot; … … 93 95 # Get list of normalizations by class_id : stored as $norms; save to temp file for ppImage runs below 94 96 my (%norms, $normsName); 95 {97 if ($det_mode eq 'master') { 96 98 # dettool command to select imfile data for this exp_id 97 99 $command = "$dettool -normalizedstat"; … … 164 166 my ($statFile, $statName) = tempfile( "/tmp/$exp_tag.detresid.$det_id.$iter.stats.XXXX", UNLINK => !$save_temps ); 165 167 168 print $statFile "rawResidImfile MULTI\n"; 169 166 170 # parse the file info in the metadata 167 171 # as we parse the list of files and their stats, apply the normalization to the relevant fields … … 188 192 # modify and save the data in this block: 189 193 foreach my $data (@$mdComponents) { 190 my $norm = $norms{$class_id}; 194 my $norm = 1.0; 195 if ($det_mode eq "master") { 196 $norm = $norms{$class_id}; 197 } 191 198 192 199 # fields to modify by the normalization: … … 252 259 $command .= " -recipe PPIMAGE PPIMAGE_J1"; 253 260 $command .= " -recipe JPEG $recipe"; 254 $command .= " -normlist $normsName" ;261 $command .= " -normlist $normsName" if defined $normsName; 255 262 $command .= " -dbname $dbname" if defined $dbname; 256 263 ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = … … 267 274 $command .= " -recipe PPIMAGE PPIMAGE_J2"; 268 275 $command .= " -recipe JPEG $recipe"; 269 $command .= " -normlist $normsName" ;276 $command .= " -normlist $normsName" if defined $normsName; 270 277 $command .= " -dbname $dbname" if defined $dbname; 271 278 ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
Note:
See TracChangeset
for help on using the changeset viewer.
