Changeset 27211 for trunk/PS-IPP-PStamp/lib/PS/IPP/PStamp/Job.pm
- Timestamp:
- Mar 5, 2010, 1:47:06 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/PS-IPP-PStamp/lib/PS/IPP/PStamp/Job.pm (modified) (14 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/PS-IPP-PStamp/lib/PS/IPP/PStamp/Job.pm
r27140 r27211 38 38 my $tess_id = shift; 39 39 my $component= shift; # class_id or skycell_id 40 my $ inverse= shift;40 my $option_mask = shift; 41 41 my $need_magic = shift; 42 42 my $x = shift; … … 48 48 my $verbose = shift; 49 49 50 51 50 # we die in response to bad data in request files 52 51 # The wrapper script is responsible for updating the database … … 58 57 ($req_type ne "byskycell"); 59 58 59 60 60 my $dateobs_begin; 61 61 my $dateobs_end; … … 77 77 78 78 if ($req_type eq "bycoord") { 79 my $results = lookup_bycoord($ipprc, $image_db, $img_type, $tess_id, $component, $need_magic, $x, $y, $dateobs_begin, $dateobs_end, $filter, $data_group, $ verbose);79 my $results = lookup_bycoord($ipprc, $image_db, $img_type, $tess_id, $component, $need_magic, $x, $y, $dateobs_begin, $dateobs_end, $filter, $data_group, $option_mask, $verbose); 80 80 return $results; 81 81 } … … 86 86 # in one place 87 87 $req_type = "bydiff"; 88 my $results = lookup_diff($ipprc, $image_db, $id, $component, 1, $ inverse, $img_type, $verbose);88 my $results = lookup_diff($ipprc, $image_db, $id, $component, 1, $option_mask, $img_type, $verbose); 89 89 return $results; 90 90 } 91 91 92 92 if ($req_type eq "bydiff") { 93 my $results = lookup_diff($ipprc, $image_db, $id, $component, 0, $ inverse, $img_type, $verbose);93 my $results = lookup_diff($ipprc, $image_db, $id, $component, 0, $option_mask, $img_type, $verbose); 94 94 if (!$results) { 95 95 return undef; … … 139 139 140 140 my $results = lookup($ipprc, $image_db, $req_type, $img_type, $id, $tess_id, $component, $need_magic, 141 $dateobs_begin, $dateobs_end, $filter, $data_group, $ verbose);141 $dateobs_begin, $dateobs_end, $filter, $data_group, $option_mask, $verbose); 142 142 143 143 return $results; … … 158 158 my $filter = shift; 159 159 my $data_group = shift; 160 my $option_mask = shift; 160 161 my $verbose = shift; 162 163 my $inverse = $option_mask & $PSTAMP_SELECT_INVERSE; 164 my $unconvolved = $option_mask & $PSTAMP_SELECT_UNCONV; 161 165 162 166 my $missing_tools; … … 244 248 $component_args = " -skycell_id $skycell_id" if $skycell_id; 245 249 246 $image_name = "PPSTACK.OUTPUT"; 247 $mask_name = "PPSTACK.OUTPUT.MASK"; 248 $weight_name = "PPSTACK.OUTPUT.VARIANCE"; 250 if (!$unconvolved) { 251 $image_name = "PPSTACK.OUTPUT"; 252 $mask_name = "PPSTACK.OUTPUT.MASK"; 253 $weight_name = "PPSTACK.OUTPUT.VARIANCE"; 254 } else { 255 $image_name = "PPSTACK.UNCONV"; 256 $mask_name = "PPSTACK.UNCONV.MASK"; 257 $weight_name = "PPSTACK.UNCONV.VARIANCE"; 258 } 249 259 # this is wrong but gets the right answer. Need to figure out how to find the 250 260 # rule properly … … 351 361 } elsif ($img_type eq "diff") { 352 362 $stage_id = $image->{diff_id}; 363 if ($inverse && $image->{bothways}) { 364 $image_name = "PPSUB.INVERSE"; 365 $mask_name = "PPSUB.INVERSE.MASK"; 366 $weight_name = "PPSUB.INVERSE.VARIANCE"; 367 $cmf_name = "PPSUB.INVERSE.SOURCES"; 368 } 353 369 } elsif ($img_type eq "stack") { 354 370 $stage_id = $image->{stack_id}; … … 379 395 my $skycell_id = shift; 380 396 my $byid = shift; 381 my $ inverse= shift;397 my $option_mask = shift; 382 398 my $img_type = shift; 383 399 my $verbose = shift; 400 401 my $inverse = $option_mask & $PSTAMP_SELECT_INVERSE; 384 402 385 403 my $missing_tools; … … 503 521 $image->{mask} = $ipprc->filename($filerule_base . ".MASK", $image->{path_base}); 504 522 $image->{weight} = $ipprc->filename($filerule_base . ".VARIANCE", $image->{path_base}); 523 $image->{cmf} = $ipprc->filename($filerule_base . ".SOURCES", $image->{path_base}); 524 $image->{psf} = $ipprc->filename("PSPHOT.PSF.SKY.SAVE", $image->{path_base}); 525 $image->{stage_id} = $image->{diff_id}; 526 $image->{stage} = "diff"; 527 $image->{image_db} = $image_db; 528 $image->{component} = $image->{skycell_id}; 505 529 } else { 506 530 # XXX this will only happen if the minuend is not a warp. See hack above … … 527 551 my $filter = shift; 528 552 my $data_group = shift; 553 my $option_mask = shift; 529 554 my $verbose = shift; 530 555 … … 549 574 my $these_results = lookup($ipprc, $image_db, "byid", $img_type, $run->{id}, 550 575 $tess_id, $run->{component}, $need_magic, 551 $dateobs_begin, $dateobs_end, $filter, $data_group, $ verbose);576 $dateobs_begin, $dateobs_end, $filter, $data_group, $option_mask, $verbose); 552 577 553 578 next if !$these_results; … … 565 590 my $these_results = lookup($ipprc, $image_db, "byskycell", $img_type, undef, 566 591 $skycell->{tess_id}, $skycell->{component}, $need_magic, 567 $dateobs_begin, $dateobs_end, $filter, $data_group, $ verbose);592 $dateobs_begin, $dateobs_end, $filter, $data_group, $option_mask, $verbose); 568 593 569 594 next if !$these_results;
Note:
See TracChangeset
for help on using the changeset viewer.
