Changeset 27788
- Timestamp:
- Apr 27, 2010, 4:08:17 PM (16 years ago)
- Location:
- trunk/pstamp
- Files:
-
- 3 edited
-
scripts/detect_query_read (modified) (2 diffs)
-
scripts/detectability_respond.pl (modified) (7 diffs)
-
test/detect_query_create (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pstamp/scripts/detect_query_read
r18587 r27788 78 78 comment => 'site identifier (MPC observatory code)', 79 79 value => undef 80 } 80 }, 81 'STAGE' => { 82 name => 'STAGE', 83 writetype => TSTRING, 84 comment => 'processing stage to examine', 85 value => undef 86 } 81 87 }; 82 88 83 89 # key_array insures that the order that the keywords is printed out is 84 90 # the same as the ICD 85 my @key_array = qw( QUERY_ID FPA_ID MJD_OBS FILTER OBSCODE );91 my @key_array = qw( QUERY_ID FPA_ID MJD_OBS FILTER OBSCODE STAGE); 86 92 87 93 # Specification of columns … … 144 150 my $name = $header->{$key}->{name}; 145 151 my $value = $inHeader->{$name}; 152 if (($key eq 'STAGE')&& !(defined($value))) { 153 $value = 'DIFF'; 154 } 146 155 # get rid of quotes and whitespace 147 156 $value =~ s/\'//g; -
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 = (); -
trunk/pstamp/test/detect_query_create
r18738 r27788 16 16 $output, # Name of output table 17 17 $query_id, 18 $nostage, 18 19 ); 19 20 … … 22 23 'output|o=s' => \$output, 23 24 'query_id|q=s' => \$query_id, 25 'nostage' => \$nostage, 24 26 ) or pod2usage( 2 ); 25 27 … … 61 63 } 62 64 ]; 65 unless(defined($nostage)) { 66 push @{ $header }, { name => 'STAGE', 67 writetype => TSTRING, 68 comment => 'processing stage to examine', 69 value => undef 70 }; 71 } 63 72 64 73 # Specification of columns to write
Note:
See TracChangeset
for help on using the changeset viewer.
