- Timestamp:
- Aug 11, 2009, 3:54:00 PM (17 years ago)
- Location:
- branches/czw_branch/cleanup
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
ippScripts/scripts/magic_destreak_revert.pl (modified) (2 diffs, 1 prop)
Legend:
- Unmodified
- Added
- Removed
-
branches/czw_branch/cleanup
- Property svn:mergeinfo changed
/trunk merged: 24940-24950,24953-24971,24973-24977,24986-24989,24993-25017,25019,25021,25023-25024,25026,25029-25031,25036-25049
- Property svn:mergeinfo changed
-
branches/czw_branch/cleanup/ippScripts/scripts/magic_destreak_revert.pl
- Property svn:mergeinfo changed
/trunk/ippScripts/scripts/magic_destreak_revert.pl merged: 25019,25023-25024
r24951 r25051 180 180 $bsources = $ipprc->filename("PSWARP.OUTPUT.SOURCES", $backup_path_base); 181 181 } elsif ($stage eq "diff") { 182 my $name = $inverse ? "PPSUB.INVERSE" : "PPSUB.OUTPUT"; # Base name for images182 my $name = "PPSUB.OUTPUT"; 183 183 $image = $ipprc->filename($name, $path_base); 184 184 $mask = $ipprc->filename("$name.MASK", $path_base); 185 185 $weight = $ipprc->filename("$name.VARIANCE", $path_base); 186 $sources = $ipprc->filename(" PPSUB.OUTPUT.SOURCES", $path_base);186 $sources = $ipprc->filename("$name.SOURCES", $path_base); 187 187 $bimage = $ipprc->filename($name, $backup_path_base); 188 188 $bmask = $ipprc->filename("$name.MASK", $backup_path_base); 189 189 $bweight = $ipprc->filename("$name.VARIANCE", $backup_path_base); 190 $bsources = $ipprc->filename("PPSUB.OUTPUT.SOURCES", $backup_path_base); 191 } 192 193 if ($image) { 194 revert_file($image, $bimage) or 195 &my_die("failed to restore image file", $magic_ds_id, $component, $PS_EXIT_CONFIG_ERROR); 196 } 197 198 if ($mask) { 199 if (!revert_file($mask, $bmask)) { 200 if ($stage eq 'chip') { 201 # don't fail if the mask file (from the camera stage) fails to revert. 202 # It probably doesn't exist 203 # XXX: Handle this properly 204 print STDERR "failure to revert mask file, ignored\n"; 205 } else { 206 &my_die("failed to restore mask file", $magic_ds_id, $component, $PS_EXIT_CONFIG_ERROR); 207 } 208 } 209 } 210 211 if ($ch_mask) { 212 if (!revert_file($ch_mask, $bch_mask)) { 213 &my_die("failed to restore chip mask file", $magic_ds_id, $component, $PS_EXIT_CONFIG_ERROR); 214 } 215 } 216 217 218 if ($weight) { 219 revert_file($weight, $bweight) or 220 &my_die("failed to restore variance image", $magic_ds_id, $component, $PS_EXIT_CONFIG_ERROR); 221 } 222 223 if ($sources) { 224 revert_file($sources, $bsources) or 225 &my_die("failed to restore sources file", $magic_ds_id, $component, $PS_EXIT_CONFIG_ERROR); 226 } 227 228 if ($astrom) { 229 revert_file($astrom, $bastrom) or 230 &my_die("failed to restore astrometry file", $magic_ds_id, $component, $PS_EXIT_CONFIG_ERROR); 190 $bsources = $ipprc->filename("$name.SOURCES", $backup_path_base); 191 } 192 193 revert_files($image, $mask, $weight, $sources, $astrom, $bimage, $bmask, $bweight, $bsources, $bastrom); 194 195 if ($stage eq "diff") { 196 my $name = "PPSUB.INVERSE"; 197 $image = $ipprc->filename($name, $path_base); 198 $mask = $ipprc->filename("$name.MASK", $path_base); 199 $weight = $ipprc->filename("$name.VARIANCE", $path_base); 200 $sources = $ipprc->filename("$name.SOURCES", $path_base); 201 $bimage = $ipprc->filename($name, $backup_path_base); 202 $bmask = $ipprc->filename("$name.MASK", $backup_path_base); 203 $bweight = $ipprc->filename("$name.VARIANCE", $backup_path_base); 204 $bsources = $ipprc->filename("$name.SOURCES", $backup_path_base); 205 revert_files($image, $mask, $weight, $sources, undef, $bimage, $bmask, $bweight, $bsources, undef); 231 206 } 232 207 … … 254 229 255 230 ### Pau. 231 232 sub revert_files { 233 my $image = shift; 234 my $mask = shift; 235 my $weight = shift; 236 my $sources = shift; 237 my $astrom = shift; 238 my $bimage = shift; 239 my $bmask = shift; 240 my $bweight = shift; 241 my $bsources = shift; 242 my $bastrom = shift; 243 244 if ($image) { 245 revert_file($image, $bimage) or 246 &my_die("failed to restore image file", $magic_ds_id, $component, $PS_EXIT_CONFIG_ERROR); 247 } 248 249 if ($mask) { 250 if (!revert_file($mask, $bmask)) { 251 if ($stage eq 'chip') { 252 # don't fail if the mask file (from the camera stage) fails to revert. 253 # It probably doesn't exist 254 # XXX: Handle this properly 255 print STDERR "failure to revert mask file, ignored\n"; 256 } else { 257 &my_die("failed to restore mask file", $magic_ds_id, $component, $PS_EXIT_CONFIG_ERROR); 258 } 259 } 260 } 261 262 if ($ch_mask) { 263 if (!revert_file($ch_mask, $bch_mask)) { 264 &my_die("failed to restore chip mask file", $magic_ds_id, $component, $PS_EXIT_CONFIG_ERROR); 265 } 266 } 267 268 269 if ($weight) { 270 revert_file($weight, $bweight) or 271 &my_die("failed to restore variance image", $magic_ds_id, $component, $PS_EXIT_CONFIG_ERROR); 272 } 273 274 if ($sources) { 275 revert_file($sources, $bsources) or 276 &my_die("failed to restore sources file", $magic_ds_id, $component, $PS_EXIT_CONFIG_ERROR); 277 } 278 279 if ($astrom) { 280 revert_file($astrom, $bastrom) or 281 &my_die("failed to restore astrometry file", $magic_ds_id, $component, $PS_EXIT_CONFIG_ERROR); 282 } 283 } 256 284 257 285 sub check_keyword - Property svn:mergeinfo changed
Note:
See TracChangeset
for help on using the changeset viewer.
