Changeset 27039
- Timestamp:
- Feb 22, 2010, 5:36:31 PM (16 years ago)
- Location:
- trunk/ippScripts/scripts
- Files:
-
- 2 edited
-
camera_exp.pl (modified) (2 diffs)
-
warp_skycell.pl (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/camera_exp.pl
r27010 r27039 144 144 } 145 145 146 147 my $produceMasks; # Produce masks? 148 { 149 # Get the PSASTRO recipe 150 my $command = "$ppConfigDump -camera $camera -recipe PSASTRO $recipe_psastro -dump-recipe ADDSTAR -"; 151 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 152 run(command => $command, verbose => $verbose); 153 unless ($success) { 154 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 155 &my_die("Unable to perform ppConfigDump: $error_code", $cam_id, $PS_EXIT_CONFIG_ERROR); 156 } 157 my $recipeData = $mdcParser->parse(join "", @$stdout_buf) or 158 &my_die("Unable to parse metadata config doc", $cam_id, $PS_EXIT_CONFIG_ERROR); 159 160 $produceMasks = metadataLookupBool($recipeData, 'REFSTAR_MASK'); 161 } 162 163 146 164 ### not needed to have such an extensive temp file name. 147 165 my ($list1File, $list1Name) = tempfile( "/tmp/$exp_tag.cm.$cam_id.b1.list.XXXX", UNLINK => !$save_temps ); # For binning 1 … … 177 195 print $list4File ($chipMask . "\n"); 178 196 179 push @outMasks, $ipprc->filename("PSASTRO.OUTPUT.MASK", $outroot, $class_id) ;197 push @outMasks, $ipprc->filename("PSASTRO.OUTPUT.MASK", $outroot, $class_id) if $produceMasks; 180 198 } 181 199 close $list1File; -
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.
