Changeset 23342
- Timestamp:
- Mar 17, 2009, 10:36:05 AM (17 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
-
ippScripts/scripts/detrend_resid_exp.pl (modified) (8 diffs)
-
ippTasks/detrend.resid.pro (modified) (1 diff)
-
ippTools/share/dettool_toresidexp.sql (modified) (4 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 ) = -
trunk/ippTasks/detrend.resid.pro
r23230 r23342 316 316 stderr $LOGDIR/detrend.resid.exp.log 317 317 318 $run = detrend_resid_exp.pl --det_id $DET_ID --iteration $ITERATION --exp_id $EXP_ID --exp_tag $EXP_TAG --det_ type $DET_TYPE --camera $CAMERA --outroot $outroot --redirect-output --verbose318 $run = detrend_resid_exp.pl --det_id $DET_ID --iteration $ITERATION --exp_id $EXP_ID --exp_tag $EXP_TAG --det_mode $MODE --det_type $DET_TYPE --camera $CAMERA --outroot $outroot --redirect-output --verbose 319 319 320 320 add_standard_args run -
trunk/ippTools/share/dettool_toresidexp.sql
r23229 r23342 20 20 -- detResidImfile.{det_id, iteration, exp_id} is not in detResidExp 21 21 22 SELECT DISTINCT22 SELECT 23 23 det_id, 24 24 iteration, … … 30 30 workdir, 31 31 exp_tag 32 FROM 33 (SELECT DISTINCT32 FROM 33 ( SELECT 34 34 detRun.det_id AS det_id, 35 35 detRun.iteration, 36 36 detRun.det_type, 37 37 detRun.mode, 38 detRun.workdir,39 38 detInputExp.exp_id, 40 39 detInputExp.include, 41 40 rawExp.camera, 42 rawExp.exp_tag,43 detResidImfile.class_id41 detRun.workdir, 42 rawExp.exp_tag 44 43 FROM detRun 45 44 JOIN detNormalizedExp … … 62 61 WHERE 63 62 detRun.state = 'run' 63 AND detRun.mode = 'master' 64 64 AND detResidExp.det_id IS NULL 65 65 AND detResidExp.iteration IS NULL … … 72 72 COUNT(rawImfile.class_id) = COUNT(detResidImfile.class_id) 73 73 AND SUM(detResidImfile.fault) = 0 74 ) AS toresidexp 74 UNION 75 SELECT 76 detRun.det_id AS det_id, 77 detRun.iteration, 78 detRun.det_type, 79 detRun.mode, 80 detInputExp.exp_id, 81 detInputExp.include, 82 rawExp.camera, 83 detRun.workdir, 84 rawExp.exp_tag 85 FROM detRun 86 JOIN detInputExp 87 USING(det_id, iteration) 88 JOIN rawExp 89 ON detInputExp.exp_id = rawExp.exp_id 90 JOIN rawImfile 91 on rawExp.exp_id = rawImfile.exp_id 92 LEFT JOIN detResidImfile 93 ON detRun.det_id = detResidImfile.det_id 94 AND detRun.iteration = detResidImfile.iteration 95 AND detInputExp.exp_id = detResidImfile.exp_id 96 AND rawImfile.class_id = detResidImfile.class_id 97 LEFT JOIN detResidExp 98 ON detResidImfile.det_id = detResidExp.det_id 99 AND detResidImfile.iteration = detResidExp.iteration 100 AND detResidImfile.exp_id = detResidExp.exp_id 101 WHERE 102 detRun.state = 'run' 103 AND detRun.mode = 'verify' 104 AND detResidExp.det_id IS NULL 105 AND detResidExp.iteration IS NULL 106 AND detResidExp.exp_id IS NULL 107 GROUP BY 108 detInputExp.exp_id, 109 detRun.iteration, 110 detRun.det_id 111 HAVING 112 COUNT(rawImfile.class_id) = COUNT(detResidImfile.class_id) 113 AND SUM(detResidImfile.fault) = 0 114 ) as temp
Note:
See TracChangeset
for help on using the changeset viewer.
