Changeset 27788 for trunk/pstamp/scripts/detectability_respond.pl
- Timestamp:
- Apr 27, 2010, 4:08:17 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/pstamp/scripts/detectability_respond.pl (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pstamp/scripts/detectability_respond.pl
r27643 r27788 73 73 #my $tmp_dir = "/data/${host}.0/tmp/"; 74 74 75 my $project = resolve_project($ipprc,"project_name",$dbname); 75 76 # 76 77 # Parse input request file using detect_query_read (as it's already written). … … 120 121 for (my $i = 1; $i < $Nrows; $i++) { 121 122 # print "$i $Nrows $query{CONTENT}{RA1_DEG}[$i] $query{CONTENT}{DEC1_DEG}[$i]\n"; 122 123 123 my $image_set_tmp = find_image_set($query{HEADER}{FPA_ID}[0],$query{HEADER}{STAGE}[0], 124 124 $query{HEADER}{MJD_OBS}[0],$query{HEADER}{FILTER}[0], … … 143 143 my $i = 0; 144 144 145 145 146 foreach my $k (keys %image_list_hash) { 146 147 # Write coordinates of the requested targets to a file. … … 153 154 print $coordfile "$image_list_hash{$k}{SKY_COORDINATES}[$j]\n"; 154 155 } 155 156 print "$k\n"; 156 157 # Convert the sky coordinates to image coordinates with ppCoord. 157 158 my $command = "ppCoord -astrom $image_list_hash{$k}{CATALOG} -radec $coordname"; … … 171 172 } 172 173 173 174 print "psphot $image_list_hash{$k}{PSF}\n"; 174 175 # Run psphotForced on the target list. 175 176 my $tmpdir = tempdir("detect.$i.XXXX", DIR => "/tmp/", CLEANUP => !$save_temps); … … 215 216 $query{HEADER}{obscode}[0], 216 217 \@rownums, \@psphot_Npix, \@psphot_Qfact, \@psphot_flux); 217 218 print "Wrote response file $output\n"; 218 219 # 219 220 # Add to datastore … … 252 253 my $mjd_max = $mjd + 1; 253 254 255 # Construct a row list: 256 257 my @rowList; 258 $rowList[0]->{CENTER_X} = $ra; 259 $rowList[0]->{CENTER_Y} = $dec; 260 $rowList[0]->{ID} = 1; 261 $rowList[0]->{STAGE} = $stage; 262 $rowList[0]->{COORD_MASK} = 0; 263 print "$stage\n"; 254 264 # Call the PStamp code to find the images that contain the target on the given MJD in the specified filter. 255 my @images = locate_images($ipprc,$dbname,"bycoord",$stage, 256 undef,undef,undef,$option_mask,$need_magic, 257 $ra,$dec,$mjd_min,$mjd_max,$filter . ".00000",undef,$verbose); 265 my @images = locate_images($ipprc,$dbname, 266 \@rowList, 267 "bycoord",$stage, 268 undef,undef,undef, 269 $option_mask,$need_magic, 270 # $ra,$dec, 271 $mjd_min,$mjd_max,$filter . ".00000",undef,$verbose); 258 272 259 273 my %image_info = ();
Note:
See TracChangeset
for help on using the changeset viewer.
