Changeset 35432
- Timestamp:
- Apr 24, 2013, 3:06:53 PM (13 years ago)
- File:
-
- 1 edited
-
trunk/pstamp/scripts/pstampparse.pl (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pstamp/scripts/pstampparse.pl
r35398 r35432 360 360 361 361 my $wholefile = 0; 362 if (!$skycenter && $row->{CENTER_X} == 0 && $row->{CENTER_Y} == 0) { 362 if (($row->{WIDTH} == 0 && $row->{HEIGHT} == 0) || 363 (!$skycenter && $row->{CENTER_X} == 0 && $row->{CENTER_Y} == 0)) { 363 364 # Secret code for returning the whole file 364 365 $wholefile = 1; … … 628 629 my $h = $row->{HEIGHT}; 629 630 my $coord_mask = $row->{COORD_MASK}; 631 630 632 my $wholeFile = 0; 631 if ($coord_mask & $PSTAMP_CENTER_IN_PIXELS) { 632 # Center of 0, 0 in pixel coordinates is interpreted to mean 633 # return the entire file 634 if ($x == 0 && $y == 0) { 635 $roi_string = "-wholefile"; 636 $wholeFile = 1; 633 # For historical reasons there are two ways to specify that the entire file be returned 634 # rather than a postage stamp ... 635 if ($w == 0 and $h == 0) { 636 # ... The right way: width and height both zero ... 637 $wholeFile = 1; 638 } else { 639 if ($coord_mask & $PSTAMP_CENTER_IN_PIXELS) { 640 if ($x == 0 && $y == 0) { 641 # ... and pixel coordinate center of 0, 0 642 # I made this one up without thinking through the API clearly. 643 # allowing width and height to do it works much better 644 $wholeFile = 1; 645 } else { 646 $roi_string = "-pixcenter $x $y"; 647 } 637 648 } else { 638 $roi_string = "-pixcenter $x $y"; 639 } 649 $roi_string = "-skycenter $x $y"; 650 } 651 } 652 653 if ($wholeFile) { 654 $roi_string = "-wholefile"; 655 } elsif ($coord_mask & $PSTAMP_RANGE_IN_PIXELS) { 656 $roi_string .= " -pixrange $w $h"; 640 657 } else { 641 $roi_string = "-skycenter $x $y";642 }643 if (!$wholeFile) {644 if ($coord_mask & $PSTAMP_RANGE_IN_PIXELS) {645 $roi_string .= " -pixrange $w $h";646 } else {647 658 $roi_string .= " -arcrange $w $h"; 648 }649 659 } 650 660
Note:
See TracChangeset
for help on using the changeset viewer.
