- Timestamp:
- Sep 8, 2009, 12:58:29 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/pstamp/scripts/pstampparse.pl (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pstamp/scripts/pstampparse.pl
r25194 r25285 220 220 221 221 # Temporary hack so that MOPS can get at non-magicked data 222 if ($product eq "mops-pstamp-results") { 222 if (($product eq "mops-pstamp-results") or ($product eq "pstampresults") 223 or ($product eq "bills-results")) { 223 224 $need_magic = 0; 224 225 } … … 470 471 my $thisRun; 471 472 472 my ($pointsList, $pointsListName) = tempfile ("/tmp/pointsList.XXXX", UNLINK => !$save_temps);473 473 my $npoints = 0; 474 foreach my $row (@$rowList) { 475 $row->{components} = {}; 476 if ($row->{skycenter}) { 477 print $pointsList "$row->{ROWNUM} $row->{CENTER_X} $row->{CENTER_Y}\n"; 478 $npoints++; 479 } else { 480 # this row's center is in pixel coordinates add all images to the component list for this row 481 foreach my $i (@$imageList) { 482 my $component = $have_skycells ? $i->{skycell_id} : $i->{class_id}; 483 my_die( "image found with no value for component", $PS_EXIT_UNKNOWN_ERROR) if !$component; 484 $row->{components}->{$component} = 1; 474 my ($pointsList, $pointsListName); 475 if (scalar @$imageList > 1) { 476 ($pointsList, $pointsListName) = tempfile ("/tmp/pointsList.XXXX", UNLINK => !$save_temps); 477 foreach my $row (@$rowList) { 478 $row->{components} = {}; 479 if ($row->{skycenter}) { 480 print $pointsList "$row->{ROWNUM} $row->{CENTER_X} $row->{CENTER_Y}\n"; 481 $npoints++; 482 } else { 483 # this row's center is in pixel coordinates add all images to the component list for this row 484 foreach my $i (@$imageList) { 485 my $component = $have_skycells ? $i->{skycell_id} : $i->{class_id}; 486 my_die( "image found with no value for component", $PS_EXIT_UNKNOWN_ERROR) 487 if !$component; 488 $row->{components}->{$component} = 1; 489 } 485 490 } 486 491 } 487 } 488 close $pointsList; 492 close $pointsList; 493 } else { 494 # only one image. Avoid the expense of dvoImagesAtCoords. 495 # queue the job and let ppstamp figure out if the center is valid for the image 496 # the resulting result code will be the same. 497 foreach my $row (@$rowList) { 498 $row->{components} = {}; 499 my $i = $imageList->[0]; 500 my $component = $have_skycells ? $i->{skycell_id} : $i->{class_id}; 501 my_die( "image found with no value for component", $PS_EXIT_UNKNOWN_ERROR) if !$component; 502 $row->{components}->{$component} = 1; 503 } 504 } 489 505 490 506 my $tess_dir_abs; … … 492 508 while ($thisRun = getOneRun($stage, $imageList)) { 493 509 if ($npoints) { 494 # we collected a set of sky coordintates above filter the images so that only 495 # those that contain the centers are processed 510 my_die( "pointsListName is not defined", $PS_EXIT_PROG_ERROR) if !$pointsListName; 511 # we collected a set of sky coordinates above. 512 # filter the images so that only those that contain the centers of the ROIs are processed 496 513 my $command = "$dvoImagesAtCoords $pointsListName"; 497 514 if ($have_skycells) { … … 636 653 # if first row has no component all of the images will be retrieved, so 637 654 # the fact that this row has a component is ok. Fall through to return 1 638 # XXX Nope that doesn't work (yet) 655 # XXX Nope this doesn't work. It is consistent with the other logic in some way 656 # that i haven't fully thought through 639 657 return 0; 640 658 }
Note:
See TracChangeset
for help on using the changeset viewer.
