- Timestamp:
- Jun 19, 2012, 5:24:19 PM (14 years ago)
- Location:
- branches/meh_branches/ppstack_test
- Files:
-
- 3 edited
-
. (modified) (1 prop)
-
pstamp/scripts (modified) (1 prop)
-
pstamp/scripts/pstampparse.pl (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/meh_branches/ppstack_test
- Property svn:mergeinfo changed
-
branches/meh_branches/ppstack_test/pstamp/scripts
- Property svn:mergeinfo changed
/branches/eam_branches/ipp-20120405/pstamp/scripts (added) merged: 33948 /trunk/pstamp/scripts merged: 33455,33512,33670,33927,33963
- Property svn:mergeinfo changed
-
branches/meh_branches/ppstack_test/pstamp/scripts/pstampparse.pl
r33415 r34041 333 333 my $skycenter = $row->{skycenter} = ! ($row->{COORD_MASK} & $PSTAMP_CENTER_IN_PIXELS); 334 334 335 if (!$skycenter and !$component) { 335 my $wholefile = 0; 336 if (!$skycenter && $row->{CENTER_X} == 0 && $row->{CENTER_Y} == 0) { 337 # Secret code for returning the whole file 338 $wholefile = 1; 339 } 340 341 if (!$skycenter and !$wholefile and !$component and $stage ne 'stack' and !($option_mask & $PSTAMP_USE_IMFILE_ID)){ 336 342 print STDERR "COMPONENT must be specified for pixel coordinate ROI center\n"; 337 343 insertFakeJobForRow($row, 1, $PSTAMP_INVALID_REQUEST); … … 418 424 my $camera = $proj_hash->{camera}; 419 425 $need_magic = $proj_hash->{need_magic}; 426 # Since user can get unmagicked data "by coordinate" requests can go back in time 427 # to dredge unusable data from the "dark days"... 428 if ($req_type eq 'bycoord' and $mjd_min eq 0) { 429 # ... so unless the user sets mjd_min clamp it to 2009-04-01 430 # XXX: This value should live in the pstampProject table not be hardcoded here 431 $mjd_min = 54922; 432 } 420 433 421 434 $need_magic = 0 if $stage eq 'stack'; … … 431 444 # and this user's data store destination is allowed uncensored stamps, so accept the request 432 445 $need_magic = 0; 433 434 # Since user can get unmagicked data "by coordinate" requests can go back in time435 # to dredge unusable data from the "dark days"...436 if ($req_type eq 'bycoord' and $mjd_min eq 0) {437 # ... so unless the user sets mjd_min clamp it to 2009-04-01438 # XXX: This value should live in the pstampProject table not be hardcoded here439 $mjd_min = 54922;440 }441 446 } else { 442 447 print STDERR "Error row $rownum: User not authorized to to request uncensored stamps.\n"; … … 526 531 my $h = $row->{HEIGHT}; 527 532 my $coord_mask = $row->{COORD_MASK}; 533 my $wholeFile = 0; 528 534 if ($coord_mask & $PSTAMP_CENTER_IN_PIXELS) { 529 $roi_string = "-pixcenter $x $y"; 535 # Center of 0, 0 in pixel coordinates is interpreted to mean 536 # return the entire file 537 if ($x == 0 && $y == 0) { 538 $roi_string = "-wholefile"; 539 $wholeFile = 1; 540 } else { 541 $roi_string = "-pixcenter $x $y"; 542 } 530 543 } else { 531 544 $roi_string = "-skycenter $x $y"; 532 545 } 533 if ($coord_mask & $PSTAMP_RANGE_IN_PIXELS) { 534 $roi_string .= " -pixrange $w $h"; 535 } else { 536 $roi_string .= " -arcrange $w $h"; 546 if (!$wholeFile) { 547 if ($coord_mask & $PSTAMP_RANGE_IN_PIXELS) { 548 $roi_string .= " -pixrange $w $h"; 549 } else { 550 $roi_string .= " -arcrange $w $h"; 551 } 537 552 } 538 553 … … 571 586 $args .= " -class_id $component" if $component; 572 587 } 573 574 if (0) {575 # add astrometry file for raw and chip images if one is available576 if (($stage eq "chip") || ($stage eq "raw")) {577 $args .= " -astrom $image->{astrom}" if $image->{astrom};578 }579 }580 588 581 589 $image->{job_args} = $args;
Note:
See TracChangeset
for help on using the changeset viewer.
