Changeset 14158
- Timestamp:
- Jul 12, 2007, 9:36:26 AM (19 years ago)
- File:
-
- 1 edited
-
trunk/ippScripts/scripts/camera_exp.pl (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/camera_exp.pl
r14140 r14158 63 63 64 64 my $recipe1 = $ipprc->reduction($reduction, 'JPEG_BIN1'); # Recipe to use 65 &my_die("Unrecognised JPEG recipe", $cam_id, $PS_EXIT_ PROG_ERROR) unless defined $recipe1;65 &my_die("Unrecognised JPEG recipe", $cam_id, $PS_EXIT_CONFIG_ERROR) unless defined $recipe1; 66 66 67 67 my $recipe2 = $ipprc->reduction($reduction, 'JPEG_BIN2'); # Recipe to use 68 &my_die("Unrecognised JPEG recipe", $cam_id, $PS_EXIT_ PROG_ERROR) unless defined $recipe2;68 &my_die("Unrecognised JPEG recipe", $cam_id, $PS_EXIT_CONFIG_ERROR) unless defined $recipe2; 69 69 70 70 # values to extract from output metadata and the stats to calculate … … 173 173 174 174 unless ($no_op) { 175 176 ## build the output JPEG images first so we get them even if the astrometry fails 177 178 # Make the jpeg for binning 1 179 { 180 my $command = "$ppImage -list $list1Name $outputRoot -recipe PPIMAGE $recipe1"; # Command to run 181 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 182 run(command => $command, verbose => 1); 183 unless ($success) { 184 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 185 &my_die("Unable to perform ppImage: $error_code", $cam_id, $error_code); 186 } 187 &my_die("Unable to find expected output file: $jpeg1", $cam_id, $PS_EXIT_PROG_ERROR) unless -f $ipprc->file_resolve($jpeg1); 188 } 189 190 # Make the jpeg for binning 2 191 { 192 my $command = "$ppImage -list $list2Name $outputRoot -recipe PPIMAGE $recipe2"; # Command to run 193 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 194 run(command => $command, verbose => 1); 195 unless ($success) { 196 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 197 &my_die("Unable to perform ppImage: $error_code", $cam_id, $error_code); 198 } 199 &my_die("Unable to find expected output file: $jpeg2", $cam_id, $PS_EXIT_PROG_ERROR) unless -f $ipprc->file_resolve($jpeg2); 200 } 175 201 176 202 # only run psastro / addstar if any of the output chip astrometry files exist … … 196 222 # XXX this construct requires the user to have a valid .ptolemyrc 197 223 # XXX which in turn points at ippconfig/dvo.site 198 { 224 225 # require a defined output dvo database to run addstar (ie, refuse to use the .ptolemyrc default) 226 # XXX this needs to be converted to addstar_client... 227 if (defined $dvodbReal) { 199 228 my $camdir = $ipprc->dvo_cameradir(); # Camera directory for addstar 200 229 my $command = "addstar -D CAMERA $camdir " . $ipprc->file_resolve($fpaObjects); 201 202 if (defined $dvodbReal) { 203 $command .= " -D CATDIR $dvodbReal"; 204 } 230 $command .= " -D CATDIR $dvodbReal"; 205 231 206 232 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = … … 213 239 } 214 240 215 # Make the jpeg for binning 1216 {217 my $command = "$ppImage -list $list1Name $outputRoot -recipe PPIMAGE $recipe1"; # Command to run218 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =219 run(command => $command, verbose => 1);220 unless ($success) {221 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);222 &my_die("Unable to perform ppImage: $error_code", $cam_id, $error_code);223 }224 &my_die("Unable to find expected output file: $jpeg1", $cam_id, $PS_EXIT_PROG_ERROR) unless -f $ipprc->file_resolve($jpeg1);225 }226 227 # Make the jpeg for binning 2228 {229 my $command = "$ppImage -list $list2Name $outputRoot -recipe PPIMAGE $recipe2"; # Command to run230 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =231 run(command => $command, verbose => 1);232 unless ($success) {233 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);234 &my_die("Unable to perform ppImage: $error_code", $cam_id, $error_code);235 }236 &my_die("Unable to find expected output file: $jpeg2", $cam_id, $PS_EXIT_PROG_ERROR) unless -f $ipprc->file_resolve($jpeg2);237 }238 241 } 239 242 … … 269 272 my $command = "$camtool -addprocessedexp -cam_id $cam_id -code $exit_code"; 270 273 $command .= " -dbname $dbname" if defined $dbname; 271 ###system ($command);274 system ($command); 272 275 } 273 276 exit $exit_code;
Note:
See TracChangeset
for help on using the changeset viewer.
