Changeset 16308 for trunk/ippScripts/scripts/warp_overlap.pl
- Timestamp:
- Feb 5, 2008, 11:47:19 AM (18 years ago)
- File:
-
- 1 edited
-
trunk/ippScripts/scripts/warp_overlap.pl (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/warp_overlap.pl
r16020 r16308 38 38 my $ipprc = PS::IPP::Config->new(); # IPP configuration 39 39 40 my ($warp_id, $camera, $dbname, $workdir, $ no_update, $no_op);40 my ($warp_id, $camera, $dbname, $workdir, $verbose, $no_update, $no_op); 41 41 GetOptions( 42 42 'warp_id|i=s' => \$warp_id, # Warp identifier … … 44 44 'dbname|d=s' => \$dbname, # Database name 45 45 'workdir|w=s' => \$workdir, # Working directory, for output files 46 'verbose' => \$verbose, # Print to stdout 46 47 'no-update' => \$no_update, # Don't update the database? 47 48 'no-op' => \$no_op, # Don't do any operations … … 76 77 $command .= " -dbname $dbname" if defined $dbname; 77 78 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 78 run(command => $command, verbose => 1);79 run(command => $command, verbose => $verbose); 79 80 unless ($success) { 80 81 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); … … 95 96 my $command = "$ppConfigDump -camera $camera -dump-recipe PSWARP -"; 96 97 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 97 run(command => $command, verbose => 1);98 run(command => $command, verbose => $verbose); 98 99 unless ($success) { 99 100 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); … … 122 123 123 124 my $tess_dir = $ipprc->convert_filename_absolute( $$tessellations{$tess_id} ); # Catdir for DVO 124 print STDERR "tessellation: $tess_id, $tess_dir\n";125 125 126 126 my %unique_skycells = (); # Identified skycells (all unique by virtue of hash property) … … 153 153 } 154 154 my @matchlist = get_overlaps($astromFile, $tess_dir, $astromAccept); # List of overlaps 155 if (! @matchlist ) {155 if (! @matchlist and $verbose) { 156 156 print "skipping $astromFile\n"; 157 157 } … … 206 206 207 207 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 208 run(command => $command, verbose => 1);208 run(command => $command, verbose => $verbose); 209 209 unless ($success) { 210 210 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); … … 236 236 $command .= ' -accept-astrom' if $accept; 237 237 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 238 run(command => $command, verbose => 1);238 run(command => $command, verbose => $verbose); 239 239 if (!$success) { 240 240 print "missing astrometry for $filename\n"; … … 273 273 274 274 $entry = $filename . '\[' . $extname . '\]'; 275 print STDERR "entry: $entry, class: $class_id, extname: $extname, chiproot: $chipRoot\n" ;275 print STDERR "entry: $entry, class: $class_id, extname: $extname, chiproot: $chipRoot\n" if $verbose; 276 276 } else { 277 277 $entry = $filename; 278 print STDERR "entry: $entry\n" ;278 print STDERR "entry: $entry\n" if $verbose; 279 279 } 280 280 281 281 my @skycells = &select_skycells($entry, @$matches); # Matching skycells 282 282 my $Nskycells = @skycells; 283 printf STDERR "Nskycells: $Nskycells\n" ;283 printf STDERR "Nskycells: $Nskycells\n" if $verbose; 284 284 foreach my $skycell (@skycells) { 285 285 my %overlap = (); # Overlap information for warptool … … 291 291 push @$overlaps, \%overlap; 292 292 293 printf STDERR "overlap: %s : %s , %s\n", $skycell, $imfile->{cam_id}, $imfile->{class_id} ;293 printf STDERR "overlap: %s : %s , %s\n", $skycell, $imfile->{cam_id}, $imfile->{class_id} if $verbose; 294 294 295 295 $unique_skycells->{$skycell} = 1;
Note:
See TracChangeset
for help on using the changeset viewer.
