Changeset 26554 for trunk/ippScripts/scripts/magic_destreak.pl
- Timestamp:
- Jan 9, 2010, 10:53:10 AM (16 years ago)
- File:
-
- 1 edited
-
trunk/ippScripts/scripts/magic_destreak.pl (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/magic_destreak.pl
r26461 r26554 15 15 16 16 use IPC::Cmd 0.36 qw( can_run run ); 17 use File::Temp qw( tempfile );17 use File::Temp qw( tempfile tempdir ); 18 18 use File::Basename qw( basename dirname ); 19 19 use PS::IPP::Metadata::Config; … … 179 179 } 180 180 181 my $temp_dir; 182 181 183 if ($stage ne "camera") { 182 184 # get skycell list if needed … … 200 202 &my_die("Unable to parse metadata list", $magic_ds_id, $component, $PS_EXIT_PROG_ERROR); 201 203 204 $temp_dir = tempdir( CLEANUP => !$save_temps); 202 205 ($sfh, $skycell_list) = tempfile( "/tmp/skycell_list.XXXX", UNLINK => !$save_temps); 203 206 204 207 foreach my $skycell (@$skycells) { 205 my $skycell_uri = $ipprc->filename("PPSUB.OUTPUT", $skycell->{path_base}); 208 my $skycell_uri; 209 if ($skycell->{data_state} eq "full") { 210 $skycell_uri = $ipprc->filename("PPSUB.OUTPUT", $skycell->{path_base}); 211 } else { 212 # diff run must have been cleaned up, need to create this skycell file on the fly 213 my $skycell_id = $skycell->{skycell_id}; 214 $skycell_uri = "$temp_dir/$skycell_id"; 215 $ipprc->skycell_file($skycell->{tess_id}, $skycell_id, $skycell_uri, $verbose) or 216 &my_die("failed to create skycell file for $skycell_id", $magic_ds_id, $component, $PS_EXIT_PROG_ERROR); 217 } 206 218 print $sfh "$skycell_uri\n"; 207 219 } 208 close $sfh ;220 close $sfh 209 221 } 210 222 }
Note:
See TracChangeset
for help on using the changeset viewer.
