- Timestamp:
- Jan 21, 2008, 4:56:26 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branch_20080121/ippScripts/scripts/camera_exp.pl
r16018 r16176 37 37 use Pod::Usage qw( pod2usage ); 38 38 39 my ($exp_tag, $cam_id, $ recipe, $camera, $dbname, $workdir, $reduction, $dvodb, $no_update, $no_op);39 my ($exp_tag, $cam_id, $camera, $outroot, $recipe, $dbname, $reduction, $dvodb, $no_update, $no_op); 40 40 GetOptions( 41 41 'exp_tag=s' => \$exp_tag, # Exposure identifier … … 44 44 'camera|c=s' => \$camera, # Camera 45 45 'dbname|d=s' => \$dbname, # Database name 46 ' workdir|w=s' => \$workdir, # Working directory46 'outroot|w=s' => \$outroot, # output file base name 47 47 'reduction=s' => \$reduction, # Reduction class 48 48 'dvodb|w=s' => \$dvodb, # output DVO database … … 55 55 -msg => "Required options: --exp_tag --cam_id --camera", 56 56 -exitval => 3, 57 ) unless defined $exp_tag 58 and defined $cam_id 59 and defined $camera; 57 ) unless 58 defined $exp_tag and 59 defined $cam_id and 60 defined $outroot and 61 defined $camera; 60 62 61 63 $ipprc->define_camera($camera); … … 136 138 } 137 139 140 ### not needed to have such an extensive temp file name. 138 141 my ($list1File, $list1Name) = tempfile( "$exp_tag.cm.$cam_id.b1.list.XXXX", UNLINK => 1 ); # For binning 1 139 142 my ($list2File, $list2Name) = tempfile( "$exp_tag.cm.$cam_id.b2.list.XXXX", UNLINK => 1 ); # For binning 2 … … 162 165 163 166 # Output products 164 $workdir = caturi( $workdir, $exp_tag ) if defined $workdir; 165 my $outputRoot = $ipprc->file_prepare( "$exp_tag.cm.$cam_id", $workdir, ${$files}[0]->{path_base} ); 166 167 my $jpeg1 = $ipprc->filename("PPIMAGE.JPEG1", $outputRoot); # Binned JPEG #1 168 my $jpeg2 = $ipprc->filename("PPIMAGE.JPEG2", $outputRoot); # Binned JPEG #2 169 my $fpaObjects = $ipprc->filename("PSASTRO.OUTPUT.MEF", $outputRoot); # MEF psastro output 170 171 my $traceDest = 'file:' . $ipprc->file_resolve($outputRoot) . ".trace"; # Trace messages 172 my $logDest = 'file:' . $ipprc->file_resolve($outputRoot) . ".log"; # Log messages 167 $ipprc->outroot_prepare($outroot); 168 169 my $jpeg1 = $ipprc->filename("PPIMAGE.JPEG1", $outroot) or &my_die("Missing entry from camera config", $cam_id, $PS_EXIT_CONFIG_ERROR); 170 my $jpeg2 = $ipprc->filename("PPIMAGE.JPEG2", $outroot) or &my_die("Missing entry from camera config", $cam_id, $PS_EXIT_CONFIG_ERROR); 171 my $fpaObjects = $ipprc->filename("PSASTRO.OUTPUT.MEF", $outroot) or &my_die("Missing entry from camera config", $cam_id, $PS_EXIT_CONFIG_ERROR); 172 my $traceDest = $ipprc->filename("TRACE.EXP", $outroot) or &my_die("Missing entry from camera config", $cam_id, $PS_EXIT_CONFIG_ERROR); 173 my $logDest = $ipprc->filename("LOG.EXP", $outroot) or &my_die("Missing entry from camera config", $cam_id, $PS_EXIT_CONFIG_ERROR); 173 174 174 175 # convert supplied DVO database name to UNIX filename … … 184 185 # Make the jpeg for binning 1 185 186 { 186 my $command = "$ppImage -list $list1Name $out putRoot -recipe PPIMAGE $recipe1"; # Command to run187 my $command = "$ppImage -list $list1Name $outroot -recipe PPIMAGE $recipe1"; # Command to run 187 188 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 188 189 run(command => $command, verbose => 1); … … 196 197 # Make the jpeg for binning 2 197 198 { 198 my $command = "$ppImage -list $list2Name $out putRoot -recipe PPIMAGE $recipe2"; # Command to run199 my $command = "$ppImage -list $list2Name $outroot -recipe PPIMAGE $recipe2"; # Command to run 199 200 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 200 201 run(command => $command, verbose => 1); … … 229 230 # XXX add a ppStats call which will collect the astrometry stats 230 231 my $command; 231 $command = "$psastro -list $list3Name $out putRoot";232 $command = "$psastro -list $list3Name $outroot"; 232 233 $command .= " +mosastro -chipastro"; 233 234 $command .= " -F PSASTRO.OUTPUT PSASTRO.OUTPUT.MEF"; … … 276 277 $fpaCommand .= " -cam_id $cam_id"; 277 278 $fpaCommand .= " -uri UNKNOWN"; 278 $fpaCommand .= " -path_base $out putRoot";279 $fpaCommand .= " -path_base $outroot"; 279 280 $fpaCommand .= " -dbname $dbname" if defined $dbname; 280 281 $fpaCommand .= $chipStats->cmdflags();
Note:
See TracChangeset
for help on using the changeset viewer.
