Changeset 34242 for branches/eam_branches/ipp-20120627/PS-IPP-PStamp
- Timestamp:
- Jul 31, 2012, 11:38:57 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20120627/PS-IPP-PStamp/lib/PS/IPP/PStamp/Job.pm
r33382 r34242 48 48 my ($regtool, $chiptool, $camtool, $warptool, $stacktool, $difftool); 49 49 my ($pstamptool, $dvoImagesAtCoords, $whichimage, $ppConfigDump); 50 51 my $default_data_groups = ""; 50 52 51 53 sub locate_images { … … 76 78 ($req_type ne "byskycell"); 77 79 80 $default_data_groups = load_data_groups($verbose); 78 81 79 82 my $dateobs_begin; … … 342 345 die "tess_id and component are required for byskycell" if !$tess_id or ! $skycell_id; 343 346 $command .= " -tess_id $tess_id -skycell_id $skycell_id"; 347 if ($stage ne 'stack') { 348 $filter_runs = 1; 349 } 344 350 } else { 345 351 # this should be caught by caller … … 357 363 358 364 $command .= " -filter $filter" if !isnull($filter); 359 $command .= " -data_group $data_group" if !isnull($data_group); 365 366 if (!isnull($data_group)) { 367 $command .= " -data_group $data_group"; 368 } elsif ($req_type eq 'byskycell') { 369 $command .= $default_data_groups; 370 } 360 371 361 372 my $images = runToolAndParse($command, $verbose); … … 727 738 # always the case. If this turns out to be a problem we can defer 728 739 # the data_group test to when we look up the chipProcessedImfiles 729 $command .= " -data_group $data_group" if $data_group; 740 if ($data_group) { 741 $command .= " -data_group $data_group"; 742 } else { 743 $command .= $default_data_groups; 744 } 730 745 $command .= " -destreaked" if $need_magic; 731 746 … … 1409 1424 } 1410 1425 1426 sub load_data_groups { 1427 my $verbose = shift; 1428 my $command = "$ppConfigDump -dump-recipe PSTAMP -"; 1429 1430 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 1431 run(command => $command, verbose => $verbose); 1432 unless ($success) { 1433 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 1434 die("Unable to perform ppConfigDump: $error_code"); 1435 } 1436 my $mdcParser = PS::IPP::Metadata::Config->new; 1437 my $metadata = $mdcParser->parse(join "", @$stdout_buf) or 1438 die ("Unable to parse metadata config doc"); 1439 1440 my $data_group_string = ""; 1441 foreach my $item (@$metadata) { 1442 my $tag = $item->{name}; 1443 next if $tag ne "DATA_GROUP"; 1444 my $dg = $item->{value}; 1445 # print "adding $dg to list of default data groups\n"; 1446 $data_group_string .= " -data_group $dg"; 1447 } 1448 return $data_group_string; 1449 } 1450 1411 1451 sub my_die 1412 1452 {
Note:
See TracChangeset
for help on using the changeset viewer.
