Changeset 34800 for trunk/ippScripts/scripts/warp_skycell.pl
- Timestamp:
- Dec 11, 2012, 2:04:31 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
ippScripts/scripts/warp_skycell.pl (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk
-
trunk/ippScripts/scripts/warp_skycell.pl
r33053 r34800 128 128 # Where do we get the astrometry source from? 129 129 my $astromSource; # The astrometry source 130 my $doBackground; # Do we want to make background models? 130 131 { 131 132 my $command = "$ppConfigDump -camera $camera -recipe PSWARP $recipe_pswarp -dump-recipe PSWARP -"; … … 139 140 &my_die("Unable to parse metadata config doc", $warp_id, $skycell_id, $tess_dir, $PS_EXIT_PROG_ERROR); 140 141 $astromSource = metadataLookupStr($metadata, 'ASTROM.SOURCE'); 142 $doBackground = metadataLookupBool($metadata, 'BACKGROUND.MODEL'); 141 143 } 142 144 … … 168 170 if ($do_stats) { 169 171 $outputStats = prepare_output ("SKYCELL.STATS", $outroot, $skycell_id, 1) if $do_stats; 172 } 173 my $outputBKGs; 174 if ($doBackground) { 175 $outputBKGs = prepare_output ("PSWARP.OUTPUT.BKGMODEL", $outroot, $skycell_id, 1); 170 176 } 171 177 my $configuration; … … 209 215 my ($weightFile, $weightName) = tempfile( "$tempOutRoot.weight.list.XXXX", UNLINK => !$save_temps); 210 216 my ($astromFile, $astromName) = tempfile( "$tempOutRoot.astrom.list.XXXX", UNLINK => !$save_temps); 211 217 my ($bkgFile, $bkgName); 218 if ($doBackground) { 219 ($bkgFile, $bkgName) = tempfile( "$tempOutRoot.bkg.list.XXXX", UNLINK => !$save_temps); 220 } 212 221 my $wrote_astrom = 0; 213 222 foreach my $imfile (@$imfiles) { … … 235 244 print $maskFile "$mask\n"; 236 245 print $weightFile "$weight\n"; 246 my $bkg; 247 if ($doBackground) { 248 $bkg = $ipprc->filename("PSPHOT.BACKMDL", $imfile->{chip_path_base}, $imfile->{class_id}); 249 print $bkgFile "$bkg\n"; 250 } 237 251 238 252 if (!$wrote_astrom) { … … 245 259 close $weightFile; 246 260 close $astromFile; 247 261 if ($doBackground) { 262 close($bkgFile); 263 } 248 264 # We need the recipe to determine if we care whether the PSF is generated or not 249 265 my $recipe; … … 269 285 $command .= " -variancelist $weightName"; 270 286 $command .= " -astromlist $astromName"; 287 $command .= " -bkglist $bkgName" if ($doBackground); 271 288 $command .= " $outroot $skyFile"; 272 289 $command .= " -F PSPHOT.PSF.SAVE PSPHOT.PSF.SKY.SAVE";
Note:
See TracChangeset
for help on using the changeset viewer.
