Changeset 27916
- Timestamp:
- May 11, 2010, 12:12:50 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/PS-IPP-PStamp/lib/PS/IPP/PStamp/Job.pm (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/PS-IPP-PStamp/lib/PS/IPP/PStamp/Job.pm
r27901 r27916 208 208 my $skycell_id; 209 209 210 if (isnull($component)) {211 $component = undef;212 }213 214 210 # note $magic_arg may be cleared below depending on $req_type 215 211 my $magic_arg = $need_magic ? " -destreaked" : ""; … … 221 217 my $choose_components = 0; 222 218 if ($stage eq "raw") { 223 $class_id = $component;224 219 $command = "$regtool -processedimfile -dbname $imagedb"; 225 220 # XXX: for now restrict lookups to type object … … 227 222 $command .= " -exp_type object"; 228 223 $id_opt = $use_imfile_id ? "-raw_imfile_id" : "-exp_id"; 229 $component_args = " -class_id $class_id" if $component; 224 225 if ($component and $component ne 'all') { 226 $class_id = $component; 227 $component_args = " -class_id $class_id"; 228 } 230 229 $want_astrom = 1; 231 230 $set_class_id = 1; 232 231 } elsif ($stage eq "chip") { 233 $class_id = $component;234 232 # if the request is such that it will yield a single image per "run" or the 235 233 # center is specified in pixel coordinates 236 234 # use chiptool -processsedimfile. Otherwise use chiptool -listrun and then 237 235 # choose the chips containing the center pixel by calling selectComponets() below 238 if ($c lass_idor $use_imfile_id or !$skycenter) {236 if ($component or $use_imfile_id or !$skycenter) { 239 237 $command = "$chiptool -processedimfile -dbname $imagedb"; 240 $component_args = " -class_id $class_id" if $class_id; 238 if ($component and $component ne 'all') { 239 $class_id = $component; 240 $component_args = " -class_id $class_id"; 241 } 241 242 } else { 242 243 $command = "$chiptool -listrun -pstamp_order -dbname $imagedb"; … … 256 257 $set_class_id = 1; 257 258 } elsif ($stage eq "warp") { 258 $skycell_id = $component; 259 if ($skycell_id or $use_imfile_id or !$skycenter) { 259 if ($component or $use_imfile_id or !$skycenter) { 260 260 $command = "$warptool -warped -dbname $imagedb"; 261 $component_args = " -skycell_id $skycell_id" if $skycell_id; 261 if ($component and $component ne 'all') { 262 $skycell_id = $component; 263 $component_args = " -skycell_id $skycell_id"; 264 } 262 265 } else { 263 266 $command = "$warptool -listrun -pstamp_order -dbname $imagedb"; … … 272 275 $base_name = "path_base"; # name of the field for the warptool output 273 276 } elsif ($stage eq "diff") { 274 $skycell_id = $component; 275 if ($skycell_id or $use_imfile_id or !$skycenter) { 277 if ($component or $use_imfile_id or !$skycenter) { 276 278 $command = "$difftool -diffskyfile -dbname $imagedb"; 277 $component_args = " -skycell_id $skycell_id" if $skycell_id; 279 if ($component and $component ne 'all') { 280 $skycell_id = $component; 281 $component_args = " -skycell_id $skycell_id"; 282 } 278 283 } else { 279 284 $command = "$difftool -listrun -pstamp_order -dbname $imagedb"; … … 285 290 $weight_name = "PPSUB.OUTPUT.VARIANCE"; 286 291 $cmf_name = "PPSUB.OUTPUT.SOURCES"; 287 $psf_name = "PSPHOT.PSF.SKY.SAVE";292 $psf_name = "PSPHOT.PSF.SKY.SAVE"; 288 293 $base_name = "path_base"; 289 294 } elsif ($stage eq "stack") { … … 883 888 # If there are multiple cam runs for this exposure, take the last completed one with good quality 884 889 # on the assumption that it has the best astrometry. 885 foreach $camRun (@$camruns) { 886 last if (($camRun->{state} eq 'full') and ($camRun->{quality} eq 0) and ($camRun->{fault} eq 0)); 890 foreach my $cr (@$camruns) { 891 if (($cr->{state} eq 'full') and ($cr->{quality} eq 0) and ($cr->{fault} eq 0)) { 892 $camRun = $cr; 893 last; 894 } 887 895 } 888 896 # XXX: this looks like a bug at least if ASTROM.SOURCE eq PSASTRO.OUTPUT
Note:
See TracChangeset
for help on using the changeset viewer.
