- Timestamp:
- Mar 30, 2012, 2:49:37 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20111122/ippScripts/scripts/camera_exp.pl
r32562 r33638 41 41 42 42 my ( $exp_tag, $cam_id, $camera, $outroot, $dbname, $reduction, $dvodb, $verbose, $no_update, 43 $no_op, $redirect, $save_temps, $run_state );43 $no_op, $redirect, $save_temps, $run_state, $skip_binned, $skip_masks); 44 44 GetOptions( 45 'exp_tag=s' => \$exp_tag, # Exposure identifier45 'exp_tag=s' => \$exp_tag, # Exposure identifier 46 46 'cam_id=s' => \$cam_id, # Camtool identifier 47 47 'camera|c=s' => \$camera, # Camera … … 51 51 'dvodb|w=s' => \$dvodb, # output DVO database 52 52 'run-state=s' => \$run_state, # 'new' or 'update' 53 'skip-binned' => \$skip_binned, # override recipe - don't create binned images 54 'skip-refmask' => \$skip_masks, # override recipe - don't create refmask 53 55 'verbose' => \$verbose, # Print to stdout 54 56 'no-update' => \$no_update, # Update the database? … … 156 158 { # Determine if FWHM is too large to bother continuing. 157 159 my $maxFWHM = 0; 160 # XXX: temporary hack if this is a CNP exposure set maxFWHM to a large 161 # value. 162 # Before the next tag we will put this into a recipe 163 if ($outroot =~ /CNP/) { 164 $maxFWHM = 25; 165 } else { 158 166 my $command = "$ppConfigDump -camera $camera -get-key MAX_ALLOWED_FWHM"; 159 167 my ($success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = … … 168 176 $maxFWHM = metadataLookupStr($cameraConfig, 'MAX_ALLOWED_FWHM'); 169 177 } 178 } 170 179 if ($maxFWHM) { 171 180 my $expFWHM; … … 183 192 184 193 my $produceMasks; # Produce masks? 185 {194 if (!$skip_masks) { 186 195 # Get the PSASTRO recipe 187 196 my $command = "$ppConfigDump -camera $camera -recipe PSASTRO $recipe_psastro -dump-recipe PSASTRO -"; … … 198 207 } 199 208 200 201 209 ### not needed to have such an extensive temp file name. 202 210 my ($list1File, $list1Name) = tempfile( "/tmp/$exp_tag.cm.$cam_id.b1.list.XXXX", UNLINK => !$save_temps ); # For binning 1 … … 254 262 255 263 # Make the jpeg for binning 1 256 if ( $run_state eq 'new') {264 if (!$skip_binned and ($run_state eq 'new')) { 257 265 my $command = "$ppImage -list $list1Name $outroot"; # Command to run 258 266 $command .= " -recipe PPIMAGE $recipe1"; … … 269 277 270 278 # Make the jpeg for binning 2 271 if ( $run_state eq 'new') {279 if (!$skip_binned and ($run_state eq 'new')) { 272 280 my $command = "$ppImage -list $list2Name $outroot"; # Command to run 273 281 $command .= " -recipe PPIMAGE $recipe2"; … … 288 296 $command = "$psastro"; 289 297 $command .= " -list $list3Name"; 290 $command .= " -masklist $list4Name" ;298 $command .= " -masklist $list4Name" if $produceMasks; 291 299 $command .= " $outroot"; 292 300 $command .= " -recipe PSASTRO $recipe_psastro"; 301 $command .= " -Db PSASTRO:REFSTAR_MASK F" if $skip_masks; 293 302 $command .= " -tracedest $traceDest -log $logDest"; 294 303 $command .= " -dbname $dbname" if defined $dbname;
Note:
See TracChangeset
for help on using the changeset viewer.
