Changeset 14140
- Timestamp:
- Jul 11, 2007, 2:38:42 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/ippScripts/scripts/camera_exp.pl (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/camera_exp.pl
r14115 r14140 138 138 139 139 my $chipObjects; 140 my $chipObjectsExist = 0; 140 141 foreach my $file (@$files) { 141 142 # use the path_base as OUTPUT root and convert the filenames with ipprc->filename: … … 147 148 print $list2File ($ipprc->filename("PPIMAGE.BIN2", $file->{path_base}, $class_id) . "\n"); 148 149 print $list3File ($chipObjects . "\n"); 150 151 # if any of the output chip astrometry files exist, we can run psastro / addstar below 152 if ($ipprc->file_exists($chipObjects)) { 153 $chipObjectsExist = 1; 154 } 149 155 } 150 156 close $list1File; … … 168 174 unless ($no_op) { 169 175 170 # run psastro +mosastro on the set of chips 171 # XXX note that this is wrong if imfiles are cells 172 # XXX add a ppStats call which will collect the astrometry stats 173 if (scalar @$files > 1) { 174 my $command = "$psastro -list $list3Name $outputRoot +mosastro -chipastro " . 175 "-F PSASTRO.OUTPUT PSASTRO.OUTPUT.MEF"; 176 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 177 run(command => $command, verbose => 1); 178 unless ($success) { 179 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 180 &my_die("Unable to perform psastro: $error_code", $cam_id, $error_code); 181 } 182 } else { 183 $ipprc->file_copy($chipObjects, $fpaObjects) unless $chipObjects eq $fpaObjects; 184 } 185 &my_die("Unable to find expected output file: $fpaObjects", $cam_id, $PS_EXIT_PROG_ERROR) unless -f $ipprc->file_resolve($fpaObjects); 186 187 # run addstar on either the single chip output or the single fpa output 188 # XXX this construct requires the user to have a valid .ptolemyrc 189 # XXX which in turn points at ippconfig/dvo.site 190 { 191 my $camdir = $ipprc->dvo_cameradir(); # Camera directory for addstar 192 my $command = "addstar -D CAMERA $camdir " . $ipprc->file_resolve($fpaObjects); 193 194 if (defined $dvodbReal) { 195 $command .= " -D CATDIR $dvodbReal"; 196 } 197 198 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 199 run(command => $command, verbose => 1); 200 unless ($success) { 201 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 202 &my_die("Unable to perform addstar: $error_code", $cam_id, $error_code); 176 # only run psastro / addstar if any of the output chip astrometry files exist 177 if ($chipObjectsExist) { 178 # run psastro +mosastro on the set of chips or copy the chipObjects to fpaObjects 179 # XXX note that this is wrong if imfiles are cells 180 # XXX add a ppStats call which will collect the astrometry stats 181 if (scalar @$files > 1) { 182 my $command = "$psastro -list $list3Name $outputRoot +mosastro -chipastro " . 183 "-F PSASTRO.OUTPUT PSASTRO.OUTPUT.MEF"; 184 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 185 run(command => $command, verbose => 1); 186 unless ($success) { 187 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 188 &my_die("Unable to perform psastro: $error_code", $cam_id, $error_code); 189 } 190 } else { 191 $ipprc->file_copy($chipObjects, $fpaObjects) unless $chipObjects eq $fpaObjects; 192 } 193 &my_die("Unable to find expected output file: $fpaObjects", $cam_id, $PS_EXIT_PROG_ERROR) unless -f $ipprc->file_resolve($fpaObjects); 194 195 # run addstar on either the single chip output or the single fpa output 196 # XXX this construct requires the user to have a valid .ptolemyrc 197 # XXX which in turn points at ippconfig/dvo.site 198 { 199 my $camdir = $ipprc->dvo_cameradir(); # Camera directory for addstar 200 my $command = "addstar -D CAMERA $camdir " . $ipprc->file_resolve($fpaObjects); 201 202 if (defined $dvodbReal) { 203 $command .= " -D CATDIR $dvodbReal"; 204 } 205 206 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 207 run(command => $command, verbose => 1); 208 unless ($success) { 209 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 210 &my_die("Unable to perform addstar: $error_code", $cam_id, $error_code); 211 } 203 212 } 204 213 }
Note:
See TracChangeset
for help on using the changeset viewer.
