Changeset 27039 for trunk/ippScripts/scripts/warp_skycell.pl
- Timestamp:
- Feb 22, 2010, 5:36:31 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/ippScripts/scripts/warp_skycell.pl (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/warp_skycell.pl
r27019 r27039 77 77 # Recipes to use based on reduction class 78 78 $reduction = 'DEFAULT' unless defined $reduction; 79 my $recipe_pswarp = $ipprc->reduction($reduction, 'WARP_PSWARP'); # Recipe to use for ppImage 80 unless ($recipe_pswarp) { 81 &my_die("Couldn't find selected reduction for WARP_PSWARP: $reduction\n", $warp_id, $skycell_id, $tess_dir, $PS_EXIT_CONFIG_ERROR); 79 my $recipe_pswarp = $ipprc->reduction($reduction, 'WARP_PSWARP'); # Recipe to use 80 my $recipe_psastro = $ipprc->reduction($reduction, 'PSASTRO'); # Recipe to use 81 unless ($recipe_pswarp and $recipe_psastro) { 82 &my_die("Couldn't find selected reduction: $reduction\n", $warp_id, $skycell_id, $tess_dir, $PS_EXIT_CONFIG_ERROR); 82 83 } 83 84 … … 121 122 $astromSource = metadataLookupStr($metadata, 'ASTROM.SOURCE'); 122 123 } 124 125 my $dynamicMasks; # Use dynamic masks? 126 { 127 # Get the PSASTRO recipe 128 my $command = "$ppConfigDump -camera $camera -recipe PSASTRO $recipe_psastro -dump-recipe ADDSTAR -"; 129 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 130 run(command => $command, verbose => $verbose); 131 unless ($success) { 132 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 133 &my_die("Unable to perform ppConfigDump: $error_code", $warp_id, $PS_EXIT_CONFIG_ERROR); 134 } 135 my $recipeData = $mdcParser->parse(join "", @$stdout_buf) or 136 &my_die("Unable to parse metadata config doc", $warp_id, $PS_EXIT_CONFIG_ERROR); 137 138 $dynamicMasks = metadataLookupBool($recipeData, 'REFSTAR_MASK'); 139 } 140 123 141 124 142 my $outputImage = $ipprc->filename("PSWARP.OUTPUT", $outroot, $skycell_id ); … … 153 171 my $image = $imfile->{uri}; # Image name 154 172 my $weight = $ipprc->filename("PPIMAGE.CHIP.VARIANCE", $imfile->{chip_path_base}, $imfile->{class_id}); # Mask name 155 my $mask = $ipprc->filename("PSASTRO.OUTPUT.MASK", $imfile->{cam_path_base}, $imfile->{class_id}); # Mask name 173 174 my $mask; # Mask name 175 if ($dynamicMasks) { 176 $mask = $ipprc->filename("PSASTRO.OUTPUT.MASK", $imfile->{cam_path_base}, $imfile->{class_id}); 177 } else { 178 $mask = $ipprc->filename("PPIMAGE.CHIP.MASK", $imfile->{chip_path_base}, $imfile->{class_id}); 179 } 156 180 157 181 &my_die("Couldn't find input file: $image", $warp_id, $skycell_id, $tess_dir, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($image);
Note:
See TracChangeset
for help on using the changeset viewer.
