Changeset 16020 for trunk/ippScripts/scripts/warp_overlap.pl
- Timestamp:
- Jan 6, 2008, 2:00:06 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/ippScripts/scripts/warp_overlap.pl (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/warp_overlap.pl
r15691 r16020 50 50 pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV; 51 51 pod2usage( 52 -msg => "Required options: --warp_id --camera ",52 -msg => "Required options: --warp_id --camera --workdir", 53 53 -exitval => 3, 54 54 ) unless defined $warp_id 55 and defined $camera; 55 and defined $camera 56 and define $workdir; 56 57 57 58 $ipprc->define_camera($camera); … … 125 126 my %unique_skycells = (); # Identified skycells (all unique by virtue of hash property) 126 127 127 if ($astromSource and $astromSource ne 'NULL') { 128 # We have an astrometry file from psastro 128 # XXX this is a bit too hard wired: the concept is that astrometry comes from the MOSAIC vs CHIP output 129 if ($astromSource eq 'PSASTRO.OUTPUT.MEF') { 130 # We have a MEF astrometry file from psastro 129 131 my $imfile = $imfiles->[0]; 130 132 my $camRoot = $imfile->{cam_path_base}; … … 132 134 133 135 my @matchlist = get_overlaps($astromFile, $tess_dir, $astromAccept); # List of overlaps 134 136 if (! @matchlist) { 137 &my_die("Unable to perform dvoImageOverlaps: missing astrometry", $warp_id, $PS_EXIT_DATA_ERROR); 138 } 135 139 # Match each of the imfiles to this list 136 140 foreach my $imfile (@$imfiles) { … … 138 142 } 139 143 } else { 140 # We have the imfiles themselves for the WCS144 # We have per-imfile astrometry 141 145 foreach my $imfile (@$imfiles) { 142 my $astromFile = $imfile->{chip_uri}; # Astrometry file 146 my $astromFile; 147 if ($astromSource eq 'PSASTRO.OUTPUT') { 148 my $chipRoot = $imfile->{chip_path_base}; 149 my $classID = $imfile->{class_id}; 150 $astromFile = $ipprc->filename($astromSource, $chipRoot, $classID); # Astrometry file 151 } else { 152 $astromFile = $imfile->{chip_uri}; # Astrometry file 153 } 143 154 my @matchlist = get_overlaps($astromFile, $tess_dir, $astromAccept); # List of overlaps 155 if (! @matchlist) { 156 print "skipping $astromFile\n"; 157 } 158 144 159 extract_overlaps(\@matchlist, $imfile, $astromFile, $tess_id, \@overlaps, \%unique_skycells); 145 160 } … … 222 237 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 223 238 run(command => $command, verbose => 1); 224 unless ($success) {225 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);226 &my_die("Unable to perform dvoImageOverlaps: $error_code", $warp_id, $error_code);239 if (!$success) { 240 print "missing astrometry for $filename\n"; 241 return 0; 227 242 } 228 243 return split ('\n', (join "", @$stdout_buf));
Note:
See TracChangeset
for help on using the changeset viewer.
