Changeset 25776 for trunk/PS-IPP-PStamp/lib/PS/IPP/PStamp/Job.pm
- Timestamp:
- Oct 5, 2009, 2:17:58 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/PS-IPP-PStamp/lib/PS/IPP/PStamp/Job.pm (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/PS-IPP-PStamp/lib/PS/IPP/PStamp/Job.pm
r25712 r25776 108 108 } elsif ($req_type eq "bycoord") { 109 109 110 # run 111 # regtool -dbname $image_db -processedimfile -time_begin $mjd_min -time_end = $mjd_max -filter $filter 112 # 113 my $results = lookup_bycoord($ipprc, $image_db, $x, $y, $dateobs_begin, $dateobs_end, $filter, $verbose); 114 115 # now take the results and lookup byexp 116 # XXX: This needs work. What stops results from returning multiple images???? 117 # We should loop over the set of images returned building up the full results array 118 $req_type = "byexp"; 119 $id = $results->{exp_name}; 110 if ($img_type eq "stack") { 111 print STDERR "Error bycoord lookup not implemented for stage stack yet\n"; 112 return undef; 113 } 120 114 } elsif ($req_type eq "byskycell") { 121 115 if (($img_type eq "raw") or ($img_type eq "chip")) { … … 129 123 } 130 124 131 my $results = lookup($ipprc, $image_db, $req_type, $img_type, $id, $tess_id, $component, $need_magic, $ dateobs_begin, $dateobs_end, $filter, $label, $verbose);125 my $results = lookup($ipprc, $image_db, $req_type, $img_type, $id, $tess_id, $component, $need_magic, $x, $y, $dateobs_begin, $dateobs_end, $filter, $label, $verbose); 132 126 133 127 return $results; … … 143 137 my $component= shift; 144 138 my $need_magic = shift; 139 my $x = shift; 140 my $y = shift; 145 141 my $dateobs_begin = shift; 146 142 my $dateobs_end = shift; … … 175 171 176 172 my $magic_arg = $need_magic ? " -destreaked" : ""; 173 my $component_args; 177 174 if ($img_type eq "raw") { 178 175 $class_id = $component; 179 176 $command = "$regtool -processedimfile -dbname $image_db"; 177 # XXX: for now restrict lookups to type object 178 # are stamps of detrend exposures interesting? 179 $command .= " -exp_type object"; 180 180 $id_opt = "-exp_id"; 181 $com mand .= " -class_id $class_id" if $component;181 $component_args = " -class_id $class_id" if $component; 182 182 $want_astrom = 1; 183 183 $set_class_id = 1; … … 185 185 $class_id = $component; 186 186 $command = "$chiptool -processedimfile -dbname $image_db"; 187 $com mand .= " -class_id $class_id" if $class_id;187 $component_args = " -class_id $class_id" if $class_id; 188 188 $id_opt = "-chip_id"; 189 189 $image_name = "PPIMAGE.CHIP"; … … 196 196 $skycell_id = $component; 197 197 $command = "$warptool -warped -dbname $image_db"; 198 $com mand .= " -skycell_id $skycell_id" if $skycell_id;198 $component_args = " -skycell_id $skycell_id" if $skycell_id; 199 199 $id_opt = "-warp_id"; 200 200 $image_name = "PSWARP.OUTPUT"; … … 205 205 $skycell_id = $component; 206 206 $command = "$difftool -diffskyfile -dbname $image_db"; 207 $com mand .= " -skycell_id $skycell_id" if $skycell_id;207 $component_args = " -skycell_id $skycell_id" if $skycell_id; 208 208 $id_opt = "-diff_id"; 209 209 $image_name = "PPSUB.OUTPUT"; … … 212 212 $base_name = "path_base"; 213 213 } elsif ($img_type eq "stack") { 214 $skycell_id = $component; 214 215 $command = "$stacktool -sumskyfile -dbname $image_db"; 215 216 $id_opt = "-stack_id"; 217 $component_args = " -skycell_id $skycell_id" if $skycell_id; 216 218 217 219 $image_name = "PPSTACK.OUTPUT"; … … 225 227 if ($req_type eq "byid") { 226 228 $command .= " $id_opt $id"; 229 $command .= $component_args if $component_args; 227 230 } elsif ($req_type eq "byexp") { 228 231 $command .= " -exp_name $id"; 232 $command .= $component_args if $component_args; 229 233 } elsif ($req_type eq "byskycell") { 234 die "tess_id and component are required for byskycell" if !$tess_id or ! $skycell_id; 230 235 $command .= " -tess_id $tess_id -skycell_id $skycell_id"; 236 } elsif ($req_type eq "bycoord") { 237 $command .= " -radius 3.0 -ra $x -decl $y"; 231 238 } else { 232 239 die "Unknown req_type supplied: $req_type";
Note:
See TracChangeset
for help on using the changeset viewer.
