- Timestamp:
- Jun 19, 2012, 5:24:19 PM (14 years ago)
- Location:
- branches/meh_branches/ppstack_test
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
ippScripts/scripts/addstar_run.pl (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/meh_branches/ppstack_test
- Property svn:mergeinfo changed
-
branches/meh_branches/ppstack_test/ippScripts/scripts/addstar_run.pl
r33415 r34041 38 38 } 39 39 my $minidvodb_path; 40 my $stage_extra1 ; 41 my ( $add_id, $camera, $stage, $stage_id, $ multi_num, $outroot, $stageroot, $dbname, $reduction, $dvodb, $minidvodb, $minidvodb_name, $minidvodb_group, $image_only, $verbose, $no_update,40 41 my ( $add_id, $camera, $stage, $stage_id, $stage_extra1, $outroot, $stageroot, $dbname, $reduction, $dvodb, $minidvodb, $minidvodb_name, $minidvodb_group, $image_only, $verbose, $no_update, 42 42 $no_op, $redirect, $save_temps); 43 43 GetOptions( … … 46 46 'stage|s=s' => \$stage, # Camera 47 47 'stage_id|w=s' => \$stage_id, 48 ' multi_num|w=s' => \$multi_num, # the number for a staticskymulti (for finding cmf)48 'stage_extra1|w=s' => \$stage_extra1, # the number for a staticskymulti (for finding cmf), or stack_id 49 49 'dbname|d=s' => \$dbname, # Database name 50 50 'outroot|w=s' => \$outroot, # output file base name … … 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/) { … … 160 162 } 161 163 } 162 if (($stage =~/sta ticsky/) || ($stage =~/stack/)) {164 if (($stage =~/stack/)) { 163 165 $fpaObjects =~ s/smf$/cmf/; 164 } 165 if ($stage =~/staticsky_multi/) { 166 $fpaObjects =~ s/smf$/cmf/; #this should do nothing because it was already modded above 167 &my_die( "can't find the filter_num for staticsky_multi, giving up.", $add_id, $PS_EXIT_SYS_ERROR) unless (defined $multi_num); 168 my $nice_num = sprintf ("%03d", $multi_num); 169 $fpaObjects =~ s/cmf$/$nice_num.cmf/; #this make it look for .001.cmf, etc 166 $fpaObjectsAlt =~ s/smf$/cmf/; 167 168 } 169 my $fpaObjects1; 170 my $fpaObjects2; 171 my $checkalt = 0; 172 if ($stage =~/staticsky/) { 173 $checkalt = 1; 174 my $sources = $ipprc->filename("PSPHOT.OUT.CMF.MEF", $stageroot); #this is mostly rigtht except the .cmf needs either 175 # .000.cmf or .stk.xxxxx.cmf 176 print "$sources\n\n\n"; 177 &my_die( "can't find the filter_num for staticsky_multi, giving up.", $add_id, $PS_EXIT_SYS_ERROR) unless (defined $stage_extra1); 178 179 180 $fpaObjects1 = $sources; 181 $fpaObjects2 = $sources; 182 $fpaObjects = $sources; 183 184 my $nice_num = sprintf ("%03d", $stage_extra1); 185 186 $fpaObjects1 =~ s/cmf$/stk.$stage_extra1.cmf/; 187 $fpaObjects2 =~ s/cmf$/$nice_num.cmf/; #this make it look for .001.cmf, etc 188 # we have 3 of them to try 189 my $realFile = $ipprc->file_resolve($fpaObjects); 190 my $realFile1 = $ipprc->file_resolve($fpaObjects1); 191 my $realFile2 = $ipprc->file_resolve($fpaObjects2); 192 if (!defined($realFile1)) { 193 if (!defined($realFile2)) { 194 print "using $fpaObjects\n"; 195 196 } else { 197 print "using $fpaObjects2\n"; 198 $fpaObjects = $fpaObjects2; 199 } 200 201 } else { 202 print "using $fpaObjects1\n"; 203 $fpaObjects = $fpaObjects1; 204 } 205 206 170 207 } 171 208 … … 222 259 # get the names for the camera and the real input file 223 260 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 261 262 my $realFile = $ipprc->file_resolve($fpaObjects) or &my_die("Unable to resolve $fpaObjects", $add_id, $PS_EXIT_SYS_ERROR); 263 264 265 266 226 267 # require a defined output dvo database to run addstar (ie, refuse to use the .ptolemyrc default) 227 268 my $command = "$addstar -update"; # XXX optionally set -update?
Note:
See TracChangeset
for help on using the changeset viewer.
