Changeset 29256
- Timestamp:
- Sep 28, 2010, 6:13:48 PM (16 years ago)
- Location:
- tags/ipp-20100823
- Files:
-
- 3 edited
-
ippScripts/scripts/automate_stacks.pl (modified) (9 diffs)
-
ippScripts/scripts/ipp_apply_burntool.pl (modified) (2 diffs)
-
ippconfig/recipes/nightly_science.config (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tags/ipp-20100823/ippScripts/scripts/automate_stacks.pl
r29166 r29256 129 129 my @target_list = (); 130 130 my @filter_list = (); 131 my %distribution_list = (); 131 132 my %tessID_list = (); 132 133 my %obsmode_list = (); … … 135 136 my %cleanmods_list = (); 136 137 my %stackable_list = (); 138 my %extra_processing = (); 137 139 my %reduction_class = (); 138 140 my %macro_formats = (); … … 206 208 $this_target = ${ $tentry }{value}; 207 209 push @target_list, $this_target; 210 $distribution_list{$this_target} = $this_target; 211 } 212 elsif (${ $tentry }{name} eq 'DISTRIBUTION') { 213 $distribution_list{$this_target} = ${ $tentry }{value}; 208 214 } 209 215 elsif (${ $tentry }{name} eq 'TESS') { … … 222 228 $stackable_list{$this_target} = ${ $tentry }{value}; 223 229 } 230 elsif (${ $tentry }{name} eq 'EXTRA_PROCESSING') { 231 $extra_processing{$this_target} = ${ $tentry }{value}; 232 } 224 233 elsif (${ $tentry }{name} eq 'REDUCTION') { 225 234 $reduction_class{$this_target} = ${ $tentry }{value}; … … 1183 1192 &my_die("Unable to perform stacktool: $error_code", 0,0,$date, $PS_EXIT_SYS_ERROR); 1184 1193 } 1194 1195 1185 1196 return(0); 1186 1197 } … … 1190 1201 my $pretend = shift; 1191 1202 foreach my $target (@target_list) { 1192 if ($stackable_list{$target} == 1) { 1193 foreach my $filter (@filter_list) { 1203 foreach my $filter (@filter_list) { 1204 if (exists($extra_processing{$target})) { 1205 do_extra_processing($date,$target,$filter,$pretend); 1206 } 1207 if ($stackable_list{$target} == 1) { 1194 1208 my ($Nexposures,$NprocChips,$NprocWarps,$Nalready) = pre_stack_queue($date,$target,$filter); 1195 1209 if ((!defined($force_stack_count))&&($NprocChips != $NprocWarps)) { # This makes me sad. :( … … 1231 1245 } 1232 1246 } 1247 else { 1248 # print STDERR "execute_stacks: Target $target is not auto-stackable.\n"; 1249 } 1233 1250 } 1234 else { 1235 # print STDERR "execute_stacks: Target $target is not auto-stackable.\n"; 1236 } 1237 } 1238 1251 } 1239 1252 } 1240 1253 … … 1291 1304 1292 1305 # 1306 # Extra processing 1307 ################################################################################ 1308 1309 sub do_extra_processing { 1310 my $date = shift; 1311 my $target = shift; 1312 my $filter = shift; 1313 my $pretend = shift; 1314 my ($label,$workdir,$obs_mode,$object,$comment,$tess_id,$dist_group,$data_group,$reduction) = get_tool_parameters($date,$target); 1315 1316 if ($target eq 'OSS') { 1317 my $db = init_gpc_db(); 1318 1319 my $obj_sth = "select DISTINCT rawExp.object from warpRun JOIN fakeRun USING(fake_id) JOIN camRun USING(cam_id) JOIN chipRun USING(chip_id) JOIN rawExp USING(exp_id) "; 1320 $obj_sth .= " WHERE warpRun.state = 'full' AND warpRun.label = '$label' AND warpRun.data_group = '$data_group' AND rawExp.filter = '$filter' ORDER BY rawExp.object"; 1321 print STDERR "$obj_sth\n"; 1322 my $object_ref = $db->selectall_arrayref( $obj_sth ); 1323 1324 foreach my $object_row (@{ $object_ref }) { 1325 my $this_object = shift @{ $object_row }; 1326 my $input_sth = "select exp_id,warp_id,dateobs from warpRun JOIN fakeRun USING(fake_id) JOIN camRun USING(cam_id) JOIN chipRun USING(chip_id) JOIN rawExp USING(exp_id) "; 1327 $input_sth .= " WHERE warpRun.state = 'full' AND warpRun.label = '$label' AND warpRun.data_group = '$data_group' AND rawExp.filter = '$filter' AND rawExp.object = '$this_object' "; 1328 $input_sth .= " ORDER BY dateobs "; 1329 1330 my $warps = $db->selectall_arrayref( $input_sth ); 1331 1332 if (($#{ $warps } + 1) % 2 != 0) { 1333 print STDERR "Number of input warps to make OSS diffs is not even! $#{ $warps }\n"; 1334 die; 1335 } 1336 1337 while ($#{ $warps } > -1) { 1338 my $input_warp = shift @{ $warps }; 1339 my $template_warp = shift @{ $warps }; 1340 my $input_exp_id = ${ $input_warp }[0]; 1341 my $template_exp_id = ${ $template_warp }[0]; 1342 1343 my $cmd = "$difftool -definewarpwarp -input_label $label -template_label $label -timediff 3600 -set_workdir $workdir -set_dist_group $dist_group -set_data_group $data_group "; 1344 $cmd .= " -simple -set_label $label -exp_id $input_exp_id -template_exp_id $template_exp_id "; 1345 $cmd .= " -pretend "; 1346 if (defined($pretend)) { 1347 $cmd .= ' -pretend '; 1348 } 1349 if ($debug == 1) { 1350 $cmd .= ' -pretend '; 1351 } 1352 print STDERR "EXTRA_PROCESSING: $cmd\n"; 1353 if (($debug == 0)&&(!defined($pretend))) { 1354 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 1355 run ( command => $cmd, verbose => $verbose ); 1356 unless ($success) { 1357 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 1358 &my_die("Unable to perform difftool: $error_code", 0,0,$date, $PS_EXIT_SYS_ERROR); 1359 } 1360 } 1361 } 1362 } 1363 } 1364 } 1365 1366 1367 1368 1369 # 1293 1370 # Auto-Clean 1294 1371 ################################################################################ … … 1380 1457 my $object = $object_list{$target}; 1381 1458 my $comment = $comment_list{$target}; 1382 my $dist_group = $ target;1459 my $dist_group = $distribution_list{$target}; 1383 1460 my $data_group = "${target}.${trunc_date}"; 1384 1461 my $tess_id = $tessID_list{$target}; -
tags/ipp-20100823/ippScripts/scripts/ipp_apply_burntool.pl
r27299 r29256 55 55 my $ppConfigDump = can_run('ppConfigDump') or (warn "Can't find ppConfigDump" and $missing_tools = 1); 56 56 my $nebXattr = can_run('neb-xattr') or (warn "Can't find neb-xattr" and $missing_tools = 1); 57 my $nebreplicate = can_run('neb-replicate') or (warn "Can't find neb-replicate" and $missing_tools = 1); 57 58 #my $fpack = can_run('fpack') or (warn "Can't find fpack" and $missing_tools = 1); 58 59 if ($missing_tools) { … … 214 215 215 216 $status = vsystem ("$nebXattr --write $outTable user.copies:2",$REALRUN); 217 $status = vsystem ("$nebreplicate --set_copies 2 $outTable",$REALRUN); 216 218 $status = vsystem ("$regtool -dbname $dbname -updateprocessedimfile -exp_id $exp_id -class_id $class_id -burntool_state $outState", $REALRUN); 217 219 if ($status) { -
tags/ipp-20100823/ippconfig/recipes/nightly_science.config
r29178 r29256 37 37 FILTERS STR z.00000 38 38 FILTERS STR y.00000 39 FILTERS STR w.00000 39 40 40 41 UNRECOVERABLE_QUALITY MULTI … … 234 235 END 235 236 TARGETS METADATA 237 NAME STR OSS 238 DISTRIBUTION STR SweetSpot 239 TESS STR RINGS.V0 240 OBSMODE STR OSS 241 STACKABLE BOOL TRUE 242 EXTRA_PROCESSING BOOL TRUE 243 END 244 TARGETS METADATA 236 245 NAME STR ThreePi 237 246 TESS STR RINGS.V0
Note:
See TracChangeset
for help on using the changeset viewer.
