- Timestamp:
- Mar 5, 2013, 2:24:05 PM (13 years ago)
- Location:
- branches/eam_branches/ipp-20130207
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
ippScripts/scripts/background_warp.pl (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20130207
- Property svn:mergeinfo changed
/trunk (added) merged: 35127-35128,35130,35133-35135,35141-35142,35148,35150-35159,35162-35167,35169-35200,35203-35218,35221-35228,35230,35232-35233
- Property svn:mergeinfo changed
-
branches/eam_branches/ipp-20130207/ippScripts/scripts/background_warp.pl
r35118 r35236 119 119 my $tempOutRoot = "/tmp/background.warp.$warp_bg_id.$skycell_id"; 120 120 121 # XXX: get this from recipe122 my $alternate_astrometry_label = 'M31.test.20130206.bgsub';123 # XXX: get exp_id from command line124 my $exp_id = 196758;125 126 121 if (!defined $imageName) { 127 122 # go find our inputs 128 my $astrom_path_base;129 if (defined $alternate_astrometry_label) {130 my $command = "$camtool -processedexp -exp_id $exp_id -label $alternate_astrometry_label";131 $command .= " -dbname $dbname" if $dbname;132 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =133 run(command => $command, verbose => $verbose);134 unless ($success) {135 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);136 &my_die("Unable to perform camtool -processedexp: $error_code", $warp_bg_id, $error_code);137 }138 my $entries = $mdcParser->parse_list(join "", @$stdout_buf) or139 &my_die("Unable to parse metadata config doc", $warp_bg_id, $PS_EXIT_PROG_ERROR);140 my $entry = $entries->[0];141 $astrom_path_base = $entry->{path_base};142 }143 144 123 my ($imageFile, $maskFile, $weightFile); 145 124 ($imageFile, $imageName) = tempfile( "$tempOutRoot.image.list.XXXX", UNLINK => !$save_temps); … … 174 153 $magicked = $file->{magicked}; 175 154 176 if (!$astrom_path_base) { 177 my $cam_path = $file->{cam_path_base}; 178 my $astrom = $ipprc->filename($astromSource, $cam_path); 179 &my_die("Astrometry files don't match: $astrom vs $astrometry", $warp_bg_id, $skycell_id, $PS_EXIT_PROG_ERROR) if defined $astrometry and $astrom ne $astrometry; 180 $astrometry = $astrom; 181 } elsif (!$astrometry) { 182 # using alternate astrometry 183 $astrometry = $ipprc->filename($astromSource, $astrom_path_base); 184 } 155 my $cam_path = $file->{cam_path_base}; 156 my $astrom = $ipprc->filename($astromSource, $cam_path); 157 &my_die("Astrometry files don't match: $astrom vs $astrometry", $warp_bg_id, $skycell_id, $PS_EXIT_PROG_ERROR) if defined $astrometry and $astrom ne $astrometry; 158 $astrometry = $astrom; 185 159 } 186 160 close $imageFile; … … 238 212 &my_die("Couldn't find expected output file: $out_stats", $warp_bg_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($out_stats); 239 213 240 my $command = "$ppStatsFromMetadata $out_stats - BACKGROUND_WARP"; 214 my $real_stats = $ipprc->file_resolve($out_stats); 215 216 my $command = "$ppStatsFromMetadata $real_stats - BACKGROUND_WARP"; 241 217 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 242 218 run(command => $command, verbose => $verbose);
Note:
See TracChangeset
for help on using the changeset viewer.
