Changeset 20973 for trunk/ippScripts/scripts/diff_skycell.pl
- Timestamp:
- Dec 13, 2008, 10:17:34 AM (17 years ago)
- File:
-
- 1 edited
-
trunk/ippScripts/scripts/diff_skycell.pl (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/diff_skycell.pl
r20928 r20973 27 27 use Pod::Usage qw( pod2usage ); 28 28 29 my ($diff_id, $diff_skyfile_id, $dbname, $threads, $outroot, $reduction, $verbose, $no_update, $no_op, $redirect); 29 my ($diff_id, $dbname, $threads, $outroot, $reduction, $verbose, $no_update, $no_op, $redirect); 30 my $skycell_id; # Skycell identifier 30 31 GetOptions( 31 'diff_id |d=s' => \$diff_id, # Diff identifier32 ' diff_skyfile_id|d=s' => \$diff_skyfile_id, # Unique skyfileidentifier33 'dbname|d=s' => \$dbname, # Database name34 'threads=s' => \$threads, # Number of threads to use35 'outroot=s' => \$outroot, # Output root name36 'reduction=s' => \$reduction, # Reduction class37 'verbose' => \$verbose, # Print to stdout38 'no-update' => \$no_update, # Don't update the database?39 'no-op' => \$no_op, # Don't do any operations?40 'redirect-output' => \$redirect,32 'diff_id=s' => \$diff_id, # Diff identifier 33 'skycell_id=s' => \$skycell_id, # Diff identifier 34 'dbname|d=s' => \$dbname, # Database name 35 'threads=s' => \$threads, # Number of threads to use 36 'outroot=s' => \$outroot, # Output root name 37 'reduction=s' => \$reduction, # Reduction class 38 'verbose' => \$verbose, # Print to stdout 39 'no-update' => \$no_update, # Don't update the database? 40 'no-op' => \$no_op, # Don't do any operations? 41 'redirect-output' => \$redirect, 41 42 ) or pod2usage( 2 ); 42 43 43 44 pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV; 44 45 pod2usage( 45 -msg => "Required options: --diff_id -- outroot",46 -msg => "Required options: --diff_id --skycell_id --outroot", 46 47 -exitval => 3, 47 48 ) unless defined $diff_id 49 and defined $skycell_id 48 50 and defined $outroot; 49 51 … … 53 55 my $logDest = "$outroot.log"; 54 56 $ipprc->redirect_output($logDest) if $redirect; 55 56 my $image_id = $diff_skyfile_id;57 my $source_id = $ipprc->source_id($dbname, $PS_TABLE_ID_DIFF);58 57 59 58 # Look for programs we need … … 71 70 my $files; 72 71 { 73 my $command = "$difftool -inputskyfile -diff_id $diff_id ";72 my $command = "$difftool -inputskyfile -diff_id $diff_id -skycell_id $skycell_id"; 74 73 $command .= " -dbname $dbname" if defined $dbname; 75 74 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = … … 93 92 my ($template, $templateMask, $templateWeight, $templatePath, $templateSources); # Template files and path 94 93 my $tess_id; # Tesselation identifier 95 my $skycell_id; # Skycell identifier96 94 my $camera; # Camera 97 95 foreach my $file (@$files) { … … 214 212 $command .= " -dumpconfig $configuration"; 215 213 $command .= " -dbname $dbname" if defined $dbname; 216 # $command .= " -image_id $image_id" if defined $image_id;217 # $command .= " -source_id $source_id" if defined $source_id;218 214 219 215 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = … … 226 222 &my_die("Couldn't find expected output file: $outputMask", $diff_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputMask); 227 223 &my_die("Couldn't find expected output file: $outputWeight", $diff_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputWeight); 228 &my_die("Couldn't find expected output file: $outputSources", $diff_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputSources);224 # &my_die("Couldn't find expected output file: $outputSources", $diff_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputSources); 229 225 # &my_die("Couldn't find expected output file: $bin1Name", $diff_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($bin1Name); 230 226 # &my_die("Couldn't find expected output file: $bin2Name", $diff_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($bin2Name); … … 251 247 # Add the subtraction result 252 248 { 253 my $command = "$difftool -adddiffskyfile -diff_id $diff_id - uri $outputName -path_base $outroot";249 my $command = "$difftool -adddiffskyfile -diff_id $diff_id -skycell_id $skycell_id -uri $outputName -path_base $outroot"; 254 250 $command .= " $cmdflags"; 255 251 $command .= (" -dtime_script " . ((DateTime->now->mjd - $mjd_start) * 86400)); … … 275 271 warn($msg); 276 272 if (defined $diff_id and not $no_update) { 277 my $command = "$difftool -adddiffskyfile -diff_id $diff_id - code $exit_code";273 my $command = "$difftool -adddiffskyfile -diff_id $diff_id -skycell_id $skycell_id -code $exit_code"; 278 274 $command .= (" -dtime_script " . ((DateTime->now->mjd - $mjd_start) * 86400)); 279 275 $command .= " -hostname $host" if defined $host;
Note:
See TracChangeset
for help on using the changeset viewer.
