Changeset 38001
- Timestamp:
- Mar 24, 2015, 2:55:38 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tags/ipp-pv3-20140717/ippScripts/scripts/sc_prepare_camera.pl
-
Property svn:mergeinfo
set to (toggle deleted branches)
/branches/eam_branches/ipp-20140610/ippScripts/scripts/sc_prepare_camera.pl merged eligible /branches/eam_branches/ipp-ops-20130712/ippScripts/scripts/sc_prepare_camera.pl merged eligible /trunk/ippScripts/scripts/sc_prepare_camera.pl merged eligible /branches/eam_branches/ipp-20140423/ippScripts/scripts/sc_prepare_camera.pl 36693-36832 /tags/ipp-20130712/ippScripts/scripts/sc_prepare_camera.pl 35815-37063
r37332 r38001 14 14 use Data::Dumper; 15 15 use File::Basename; 16 use File::Temp qw( tempfile ); 16 17 17 18 use Getopt::Long qw( GetOptions :config auto_help auto_version gnu_getopt ); … … 30 31 my $remotetool = can_run('remotetool') or (warn "Can't find remotetool" and $missing_tools = 1); 31 32 my $camtool = can_run('camtool') or (warn "Can't find camtool" and $missing_tools = 1); 33 my $ppStatsFromMetadata = can_run('ppStatsFromMetadata') or (warn "Can't find ppStatsFromMetadata" and $missing_tools = 1); 32 34 33 35 if ($missing_tools) { … … 88 90 my ($workdir,$exp_tag,$reduction); 89 91 { 92 93 ### $command = "$camtool -processedexp -cam_id $cam_id "; ### THIS LINE ONLY TO TEST! 90 94 my $command = "$camtool -pendingexp -cam_id $cam_id "; 91 95 $command .= " -dbname $dbname " if defined($dbname); … … 142 146 my $pre_cmd_cmfs = "ls -1 ${remote_chip_path}*.cmf > ${remote_outroot}.cmflist"; 143 147 my $pre_cmd_masks= "ls -1 ${remote_chip_path}*.mk.fits > ${remote_outroot}.masklist"; 148 149 # Despite the previous comment, we do care about the output of pendingimfile, as that 150 # contains information for the exposure. 151 my ($statFile, $statName) = tempfile( "/tmp/cm.$cam_id.stats.XXXX", UNLINK => 1 ); 152 foreach my $line (@$stdout_buf) { 153 print $statFile $line; 154 } 155 close $statFile; 156 157 # parse the stats in the metadata file 158 $command = "$ppStatsFromMetadata $statName - CAMERA_EXP_IMFILE"; 159 ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 160 run(command => $command, verbose => $verbose); 161 unless ($success) { 162 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 163 warn("Unable to perform ppStatsFromMetadata: $error_code\n"); 164 exit($error_code); 165 } 166 167 my $results = ''; 168 foreach my $line (@$stdout_buf) { 169 $results .= " $line"; 170 } 171 chomp($results); 172 173 144 174 145 175 my $recipe_psastro = $ipprc->reduction($reduction, 'PSASTRO'); # Recipe to use … … 163 193 $camtool_post_cmd .= " -dbname $dbname " if defined $dbname; 164 194 $camtool_post_cmd .= " -path_base $ipp_outroot -hostname $remote_hostname -dtime_script 0 "; 195 $camtool_post_cmd .= " $results "; # Add exposure information 196 165 197 my $post_cmd_echo = " echo -n \"$camtool_post_cmd\" > ${remote_outroot}.dbinfo "; 166 198 my $post_cmd_SfM = " ppStatsFromMetadata ${remote_outroot}.stats - CAMERA_EXP_FPA >> ${remote_outroot}.dbinfo "; -
Property svn:mergeinfo
set to (toggle deleted branches)
Note:
See TracChangeset
for help on using the changeset viewer.
