Changeset 13168 for trunk/ippScripts/scripts/warp_overlap.pl
- Timestamp:
- May 2, 2007, 3:22:15 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/ippScripts/scripts/warp_overlap.pl (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/warp_overlap.pl
r13159 r13168 108 108 # Calculate the overlaps between imfiles and skycells 109 109 110 # The tess_id is the catdir used to define the tessalation 111 my $command = "ppConfigDump -camera $camera -dump-recipe PSWARP -"; 112 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 113 run(command => $command, verbose => 1); 114 unless ($success) { 115 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 116 &my_die("Unable to perform ppConfigDump: $error_code", $error_code); 117 } 118 my $parser = PS::IPP::Metadata::Config->new; # Parser for metadata config files 119 my $recipe = $parser->parse( join '', @$stdout_buf); 120 my @tesselations = split(/\s+/, metadataLookupStr($recipe, 'DVO.TESSELLATION')); # List of tessellations 121 foreach my $tess_id ( @tesselations ) { 122 print STDERR "tessellation: $tess_id\n"; 110 my $tessellations = $ipprc->tessellations(); # Hash of defined tessellations 111 foreach my $tess_id ( keys %$tessellations ) { 112 my $tess_dir = $$tessellations{$tess_id}; 113 print STDERR "tessellation: $tess_id, $tess_dir\n"; 123 114 124 115 my $imfile = $imfiles->[0]; … … 131 122 132 123 # run the dvoImageOverlaps program to get the overlaps with this image 133 my $command = "dvoImageOverlaps -D CATDIR $tess_ id$psastroFile";124 my $command = "dvoImageOverlaps -D CATDIR $tess_dir $psastroFile"; 134 125 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 135 126 run(command => $command, verbose => 1); … … 140 131 my @matchlist = split ('\n', (join "", @$stdout_buf)); 141 132 142 # The command "dvoImageOverlaps -D CATDIR tess alation (megacam)" returns:133 # The command "dvoImageOverlaps -D CATDIR tessellation (megacam)" returns: 143 134 # 729534pa.cmf[ccd00.hdr] : skycell.051.fits 144 135 # PSASTRO.OUTPUT[CMF.HEAD] : SKYCELL … … 187 178 system "mkdir -p $skyDir" unless -d $skyDir; 188 179 my $skyFile = File::Spec->catfile( $skyDir , $skycell_id ); 189 my $command = "dvoImageExtract -D CATDIR $tess_ id$skycell_id -o $skyFile";180 my $command = "dvoImageExtract -D CATDIR $tess_dir $skycell_id -o $skyFile"; 190 181 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 191 182 run(command => $command, verbose => 1);
Note:
See TracChangeset
for help on using the changeset viewer.
