Changeset 14567 for trunk/ippScripts/scripts/warp_skycell.pl
- Timestamp:
- Aug 20, 2007, 2:24:57 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/ippScripts/scripts/warp_skycell.pl (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/warp_skycell.pl
r14391 r14567 94 94 } 95 95 96 # Where do we get the astrometry source from? 97 my $astromSource; # The astrometry source 98 { 99 my $command = "$ppConfigDump -camera $camera -dump-recipe PSWARP -"; 100 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 101 run(command => $command, verbose => 1); 102 unless ($success) { 103 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 104 &my_die("Unable to perform ppConfigDump: $error_code", $warp_id, $error_code); 105 } 106 my $metadata = $mdcParser->parse(join "", @$stdout_buf) or 107 &my_die("Unable to parse metadata config doc", $warp_id, $PS_EXIT_PROG_ERROR); 108 $astromSource = metadataLookupStr('ASTROM.SOURCE'); 109 } 110 96 111 $workdir = caturi( $workdir, "tess_" . $tess_id, "sky_" . $skycell_id ) if defined $workdir; 97 112 my $outputRoot = $ipprc->file_prepare( "$tess_id.$skycell_id.wrp$warp_id", $workdir, $$imfiles[0]->{uri} ); … … 113 128 my $mask = $ipprc->filename("PPIMAGE.CHIP.MASK", $imfile->{chip_path_base}, $imfile->{class_id}); # Mask name 114 129 my $weight = $ipprc->filename("PPIMAGE.CHIP.WEIGHT", $imfile->{chip_path_base}, $imfile->{class_id}); # Mask name 115 my $astrom = $ipprc->filename("PSASTRO.OUTPUT.MEF", $imfile->{cam_path_base}); # Astrometry file name116 130 117 131 &my_die("Couldn't find input file: $image", $warp_id, $skycell_id, $tess_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($image); 118 132 &my_die("Couldn't find input file: $mask", $warp_id, $skycell_id, $tess_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($mask); 119 &my_die("Couldn't find input file: $astrom", $warp_id, $skycell_id, $tess_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($astrom); 133 134 my $astrom; # Astrometry file 135 if ($astromSource and $astromSource ne 'NULL') { 136 $astrom = $ipprc->filename($astromSource, $imfile->{cam_path_base}); 137 &my_die("Couldn't find input file: $astrom", $warp_id, $skycell_id, $tess_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($astrom); 138 } 120 139 121 140 print $imageFile ( $image . "\n"); 122 141 print $maskFile ( $mask . "\n"); 123 142 print $weightFile ( $weight . "\n"); 124 if (defined $inputAstrom) { 143 144 if (defined $inputAstrom and defined $astrom) { 125 145 &my_die("Astrometry files don't match: $inputAstrom vs $astrom", $warp_id, $skycell_id, $tess_id, $PS_EXIT_SYS_ERROR) unless $inputAstrom eq $astrom; 126 146 } else { … … 137 157 $command .= " -masklist $maskName"; 138 158 $command .= " -weightlist $weightName"; 139 $command .= " -astrom $inputAstrom" ;159 $command .= " -astrom $inputAstrom" if defined $inputAstrom; 140 160 $command .= " $outputRoot $skyFile"; 141 161 $command .= " -stats $outputStats";
Note:
See TracChangeset
for help on using the changeset viewer.
