Changeset 27991
- Timestamp:
- May 18, 2010, 10:39:36 AM (16 years ago)
- File:
-
- 1 edited
-
trunk/PS-IPP-PStamp/lib/PS/IPP/PStamp/Job.pm (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/PS-IPP-PStamp/lib/PS/IPP/PStamp/Job.pm
r27990 r27991 369 369 $images = selectComponents($ipprc, $imagedb, $req_type, $stage, $rowList, $images, $verbose); 370 370 } else { 371 # put each of the rows into all of the the images371 # put index for each of the rows into all of the the images 372 372 setRowRefs($rowList, $images); 373 373 } … … 398 398 $ipprc->define_camera($camera); 399 399 } 400 # ok it's a keeper 400 401 my $out = $image; 401 402 402 403 # if uri is nil this will get overridded below 403 404 # (we do this here for raw stage) 404 $out->{image} = $ image->{uri};405 $out->{image} = $out->{uri}; 405 406 406 407 if ($set_class_id) { 407 $class_id = $ image->{class_id};408 $class_id = $out->{class_id}; 408 409 $out->{component} = $class_id; 409 410 } else { 410 $out->{component} = $ image->{skycell_id};411 $out->{component} = $out->{skycell_id}; 411 412 } 412 413 my $stage_id; 413 414 if ($stage eq "raw") { 414 $stage_id = $ image->{exp_id};415 $stage_id = $out->{exp_id}; 415 416 } elsif ($stage eq "chip") { 416 $stage_id = $ image->{chip_id};417 $stage_id = $out->{chip_id}; 417 418 } elsif ($stage eq "warp") { 418 $stage_id = $ image->{warp_id};419 $stage_id = $out->{warp_id}; 419 420 } elsif ($stage eq "diff") { 420 $stage_id = $ image->{diff_id};421 if ($inverse && $ image->{bothways}) {421 $stage_id = $out->{diff_id}; 422 if ($inverse && $out->{bothways}) { 422 423 $image_name = "PPSUB.INVERSE"; 423 424 $mask_name = "PPSUB.INVERSE.MASK"; … … 426 427 } 427 428 } elsif ($stage eq "stack") { 428 $stage_id = $ image->{stack_id};429 $stage_id = $out->{stack_id}; 429 430 } 430 431 $out->{stage_id} = $stage_id; … … 450 451 $out->{mask} = $ipprc->filename($mask_name, $mask_base, $class_id) if $mask_name; 451 452 $out->{weight} = $ipprc->filename($weight_name, $base, $class_id) if $weight_name; 452 $out->{cmf} = $ipprc->filename($cmf_name, $base, $class_id) if $cmf_name;453 $out->{psf} = $ipprc->filename($psf_name, $base, $class_id) if $psf_name;454 $out->{backmdl}= $ipprc->filename($backmdl_name, $base, $class_id) if $backmdl_name;453 $out->{cmf} = $ipprc->filename($cmf_name, $base, $class_id) if $cmf_name; 454 $out->{psf} = $ipprc->filename($psf_name, $base, $class_id) if $psf_name; 455 $out->{backmdl}= $ipprc->filename($backmdl_name,$base, $class_id) if $backmdl_name; 455 456 } 456 457 … … 775 776 chip_id => $camRun->{chip_id}, 776 777 cam_id => $camRun->{cam_id}, 777 astrom => $astrom_resolved, 778 astrom => $astrom_resolved, # XXX: is astrom used? 778 779 class_id => $class_id, 779 780 component => $class_id … … 855 856 # cache of results of ppConfigDump 856 857 my %astromSources; 857 # my $last_exp_id = 0;858 my $lastCamRun;859 858 860 859 # find the astrometry file for a given exposure 861 860 # return undef if no completed camRun exists 862 861 # XXX Right now this probably only works cameras where the astrometry is done at the camera stage 862 # What other possibilities are there for ASTROM.SOURCE besides PSASTRO.OUTPUT? 863 863 864 sub find_astrometry { 864 865 my $ipprc = shift; … … 870 871 871 872 my $exp_id = $image->{exp_id}; 872 if (defined $lastCamRun) {873 if ($lastCamRun->{exp_id} == $exp_id) {874 # running camtool 60 times is really expensive when the answer is the same every time875 $image->{astrom} = $lastCamRun->{astrom};876 $image->{cam_path_base} = $lastCamRun->{path_base};877 return 1;878 }879 }880 # $last_exp_id = 0;881 # $lastAstromFile = undef;882 $lastCamRun = undef;883 873 884 874 my $camRun = getCamRunByExpID($exp_id); … … 945 935 # XXX: Is this code correct if ASTROM.SOURCE ne "PSASTRO.OUTPUT" 946 936 my $astromFile = $ipprc->filename($astromSource, $camRoot); 947 if ($astromFile) { 948 $lastCamRun = $camRun; 949 $lastCamRun->{astrom} = $astromFile; 950 # $last_exp_id = $exp_id; 951 } else { 937 if (!$astromFile) { 938 print STDERR "failed to find astrometry file from $astromSource $camRoot\n"; 952 939 return 0; 953 940 }
Note:
See TracChangeset
for help on using the changeset viewer.
