Changeset 33525 for trunk/ippScripts/scripts/addstar_run.pl
- Timestamp:
- Mar 14, 2012, 3:05:17 PM (14 years ago)
- File:
-
- 1 edited
-
trunk/ippScripts/scripts/addstar_run.pl (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/addstar_run.pl
r33038 r33525 117 117 118 118 my $fpaObjects = $ipprc->filename("PSASTRO.OUTPUT", $stageroot) or &my_die("Missing entry from camera config", $add_id, $PS_EXIT_CONFIG_ERROR); 119 my $fpaObjectsAlt = $fpaObjects; 120 119 121 120 122 if ($stage =~ /cam/) { … … 162 164 if (($stage =~/staticsky/) || ($stage =~/stack/)) { 163 165 $fpaObjects =~ s/smf$/cmf/; 164 } 165 if ($stage =~/staticsky_multi/) { 166 $fpaObjectsAlt =~ s/smf$/cmf/; 167 } 168 my $checkalt = 0; 169 if ($stage =~/staticsky/) { 166 170 $fpaObjects =~ s/smf$/cmf/; #this should do nothing because it was already modded above 167 171 &my_die( "can't find the filter_num for staticsky_multi, giving up.", $add_id, $PS_EXIT_SYS_ERROR) unless (defined $multi_num); 168 172 my $nice_num = sprintf ("%03d", $multi_num); 169 173 $fpaObjects =~ s/cmf$/$nice_num.cmf/; #this make it look for .001.cmf, etc 174 if ($multi_num == 0) { 175 $checkalt =1 ; #if it's staticsky and multi_num = 0 there's an alternate file to try if this one doesn't work 176 } 170 177 } 171 178 … … 222 229 # get the names for the camera and the real input file 223 230 my $camdir = $ipprc->dvo_cameradir(); # Camera directory for addstar 224 my $realFile = $ipprc->file_resolve($fpaObjects) or &my_die("Unable to resolve $fpaObjects", $add_id, $PS_EXIT_SYS_ERROR); 225 231 232 my $realFile = $ipprc->file_resolve($fpaObjects); 233 if (!defined($realFile)) { 234 print "can't find $fpaObjects\n"; 235 if ($checkalt) { 236 $realFile = $ipprc->file_resolve($fpaObjectsAlt) or &my_die("Unable to resolve $fpaObjectsAlt", $add_id, $PS_EXIT_SYS_ERROR); 237 $fpaObjects = $fpaObjectsAlt; # want to make sure the correct value is used. 238 } else { 239 # try the 'good one' again and fail i 240 #$realFile = $ipprc->file_resolve($fpaObjects) or 241 &my_die("Unable to resolve $fpaObjects", $add_id, $PS_EXIT_SYS_ERROR); 242 } 243 244 } 245 226 246 # require a defined output dvo database to run addstar (ie, refuse to use the .ptolemyrc default) 227 247 my $command = "$addstar -update"; # XXX optionally set -update?
Note:
See TracChangeset
for help on using the changeset viewer.
