- Timestamp:
- Aug 7, 2009, 12:45:24 PM (17 years ago)
- Location:
- branches/eam_branches/20090715
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
ippScripts/scripts/magic_destreak_revert.pl (modified) (6 diffs, 1 prop)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/20090715
- Property svn:mergeinfo changed
/trunk (added) merged: 24801-24824,24827-24834,24836-24859,24861-24901,24903-24912,24914-24950,24953-24971,24973-24977,24986-24989,24993-25017
- Property svn:mergeinfo changed
-
branches/eam_branches/20090715/ippScripts/scripts/magic_destreak_revert.pl
- Property svn:mergeinfo changed
/trunk/ippScripts/scripts/magic_destreak_revert.pl (added) merged: 24856,24936
r24726 r25022 60 60 61 61 pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV; 62 pod2usage( -msg => "Required options: --magic_ds_id --camera --st reaks --stage --stage_id --component --uri--path_base --outroot",62 pod2usage( -msg => "Required options: --magic_ds_id --camera --stage --stage_id --component --path_base --outroot", 63 63 -exitval => 3) unless 64 64 defined $magic_ds_id and … … 95 95 } elsif ($stage eq "diff") { 96 96 $skycell_id = $component; 97 } els e{97 } elsif ($stage ne "camera") { 98 98 &my_die("Invalid value for stage: $stage", $magic_ds_id, $component, $PS_EXIT_CONFIG_ERROR); 99 99 } … … 142 142 143 143 144 my ($image, $mask, $ch_mask, $weight );145 my ($bimage, $bmask, $bch_mask, $bweight );144 my ($image, $mask, $ch_mask, $weight, $sources, $astrom); 145 my ($bimage, $bmask, $bch_mask, $bweight, $bsources, $bastrom); 146 146 147 147 if ($stage eq "raw") { … … 167 167 $bch_mask= $ipprc->filename("PPIMAGE.CHIP.MASK", $backup_path_base, $class_id); 168 168 $bweight = $ipprc->filename("PPIMAGE.CHIP.VARIANCE", $backup_path_base, $class_id); 169 } elsif ($stage eq "camera") { 170 $astrom = $ipprc->filename("PSASTRO.OUTPUT", $path_base); 171 $bastrom = $ipprc->filename("PSASTRO.OUTPUT", $backup_path_base); 169 172 } elsif ($stage eq "warp") { 170 173 $image = $ipprc->filename("PSWARP.OUTPUT", $path_base); 171 174 $mask = $ipprc->filename("PSWARP.OUTPUT.MASK", $path_base); 172 175 $weight = $ipprc->filename("PSWARP.OUTPUT.VARIANCE", $path_base); 176 $sources = $ipprc->filename("PSWARP.OUTPUT.SOURCES", $path_base); 173 177 $bimage = $ipprc->filename("PSWARP.OUTPUT", $backup_path_base); 174 178 $bmask = $ipprc->filename("PSWARP.OUTPUT.MASK", $backup_path_base); 175 179 $bweight = $ipprc->filename("PSWARP.OUTPUT.VARIANCE", $backup_path_base); 180 $bsources = $ipprc->filename("PSWARP.OUTPUT.SOURCES", $backup_path_base); 176 181 } elsif ($stage eq "diff") { 177 182 my $name = $inverse ? "PPSUB.INVERSE" : "PPSUB.OUTPUT"; # Base name for images … … 179 184 $mask = $ipprc->filename("$name.MASK", $path_base); 180 185 $weight = $ipprc->filename("$name.VARIANCE", $path_base); 186 $sources = $ipprc->filename("PPSUB.OUTPUT.SOURCES", $path_base); 181 187 $bimage = $ipprc->filename($name, $backup_path_base); 182 188 $bmask = $ipprc->filename("$name.MASK", $backup_path_base); 183 189 $bweight = $ipprc->filename("$name.VARIANCE", $backup_path_base); 184 } 185 186 revert_file($image, $bimage) or 190 $bsources = $ipprc->filename("PPSUB.OUTPUT.SOURCES", $backup_path_base); 191 } 192 193 if ($image) { 194 revert_file($image, $bimage) or 187 195 &my_die("failed to restore image file", $magic_ds_id, $component, $PS_EXIT_CONFIG_ERROR); 188 189 # don't commit next the next couple of lines and see xxx below 190 # change to if 0 to revert chip runs without masks 191 if (0) { 196 } 192 197 193 198 if ($mask) { 194 199 if (!revert_file($mask, $bmask)) { 195 200 if ($stage eq 'chip') { 196 # XXX: don't fail if the mask file fails to revert. It probably doesn't exist 197 # Handle this properly 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 198 204 print STDERR "failure to revert mask file, ignored\n"; 199 205 } else { … … 204 210 205 211 if ($ch_mask) { 206 # Handle this properly207 212 if (!revert_file($ch_mask, $bch_mask)) { 208 # print STDERR "failure to revert chip mask file, ignored\n";209 213 &my_die("failed to restore chip mask file", $magic_ds_id, $component, $PS_EXIT_CONFIG_ERROR); 210 214 } 211 215 } 212 216 213 # xxx don't commmit next line214 }215 217 216 218 if ($weight) { 217 219 revert_file($weight, $bweight) or 218 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); 219 231 } 220 232 - Property svn:mergeinfo changed
Note:
See TracChangeset
for help on using the changeset viewer.
