Changeset 24921 for trunk/PS-IPP-PStamp
- Timestamp:
- Jul 24, 2009, 2:45:59 PM (17 years ago)
- Location:
- trunk/PS-IPP-PStamp/lib/PS/IPP/PStamp
- Files:
-
- 2 edited
-
Job.pm (modified) (10 diffs)
-
RequestFile.pm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/PS-IPP-PStamp/lib/PS/IPP/PStamp/Job.pm
r24831 r24921 24 24 use PS::IPP::Metadata::List qw( parse_md_list ); 25 25 use PS::IPP::Config qw( :standard ); 26 use Carp; 26 27 27 28 ### my @images = locate_images($image_db, $req_type, $img_type, $id, $component, … … 121 122 my $command; 122 123 my $id_opt; # option for the lookup 124 my $image_name; 123 125 my $mask_name; 124 126 my $weight_name; … … 130 132 131 133 # special class_id value "null" means ignore 132 if ($component eq "null") {134 if ($component and ($component eq "null")) { 133 135 $component = undef; 134 136 } … … 146 148 $command .= " -class_id $class_id" if $class_id; 147 149 $id_opt = "-chip_id"; 150 $image_name = "PPIMAGE.CHIP"; 148 151 $mask_name = "PPIMAGE.CHIP.MASK"; 149 152 $weight_name = "PPIMAGE.CHIP.VARIANCE"; … … 156 159 $command .= " -skycell_id $skycell_id" if $skycell_id; 157 160 $id_opt = "-warp_id"; 161 $image_name = "PSWARP.OUTPUT"; 158 162 $mask_name = "PSWARP.OUTPUT.MASK"; 159 163 $weight_name = "PSWARP.OUTPUT.VARIANCE"; … … 164 168 $command .= " -skycell_id $skycell_id" if $skycell_id; 165 169 $id_opt = "-diff_id"; 170 $image_name = "PPSUB.OUTPUT"; 166 171 $mask_name = "PPSUB.OUTPUT.MASK"; 167 172 $weight_name = "PPSUB.OUTPUT.VARIANCE"; … … 171 176 $id_opt = "-stack_id"; 172 177 178 $image_name = "PPSTACK.OUTPUT"; 173 179 $mask_name = "PPSTACK.OUTPUT.MASK"; 174 180 $weight_name = "PPSTACK.OUTPUT.VARIANCE"; … … 225 231 $ipprc->define_camera($camera); 226 232 } 227 my $out = {}; 228 $out->{exp_id} = $image->{exp_id}; 229 $out->{exp_name} = $image->{exp_name}; 233 my $out = $image; 234 # if uri is nil this will get overridded below 230 235 $out->{image} = $image->{uri}; 231 $out->{state} = $image->{state}; # state is undef for rawExp, but that's ok 232 if ($set_class_id) { 233 $class_id = $image->{class_id}; 234 $out->{class_id} = $class_id; 235 } 236 # $out->{exp_id} = $image->{exp_id}; 237 # $out->{exp_name} = $image->{exp_name}; 238 # $out->{state} = $image->{state}; # state is undef for rawExp, but that's ok 239 # if ($set_class_id) { 240 # $class_id = $image->{class_id}; 241 # $out->{class_id} = $class_id; 242 # } 236 243 237 244 # find the mask and weight images 238 245 if ($base) { 246 $out->{image} = $ipprc->filename($image_name, $base, $class_id) if $image_name; 239 247 $out->{mask} = $ipprc->filename($mask_name, $base, $class_id) if $mask_name; 240 248 $out->{weight} = $ipprc->filename($weight_name, $base, $class_id) if $weight_name; 241 249 } 242 $out->{camera} = $camera;250 # $out->{camera} = $camera; 243 251 244 252 $out->{astrom} = find_astrometry($ipprc, $image_db, $image, $verbose) if $want_astrom; … … 539 547 # resolve_project() 540 548 # get project specific information 549 my $last_project = ""; 541 550 sub resolve_project { 542 551 my $ipprc = shift; 543 552 my $project_name = shift; 553 554 if (!$project_name) { 555 carp ("project is not defined"); 556 return undef; 557 } 558 559 if ($project_name eq $last_project) { 560 return $last_project; 561 } 562 544 563 my $dbname = shift; 545 564 my $dbserver = shift; 546 die "project is not defined" if !$project_name;547 565 548 566 my $verbose = 0; … … 575 593 my $proj_hash = parse_md_fast($mdcParser, $output); 576 594 577 return $proj_hash->[0]; 595 $last_project = $proj_hash->[0]; 596 597 return $last_project; 578 598 } 579 599 1; -
trunk/PS-IPP-PStamp/lib/PS/IPP/PStamp/RequestFile.pm
r23266 r24921 26 26 27 27 28 # these values need to match the ones in pstamp/src/pstamp.h 28 29 our $PSTAMP_CENTER_IN_PIXELS = 1; 29 30 our $PSTAMP_RANGE_IN_PIXELS = 2;
Note:
See TracChangeset
for help on using the changeset viewer.
