Changeset 18048 for trunk/ippScripts/scripts/detrend_stack.pl
- Timestamp:
- Jun 10, 2008, 8:46:59 AM (18 years ago)
- File:
-
- 1 edited
-
trunk/ippScripts/scripts/detrend_stack.pl (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/detrend_stack.pl
r17941 r18048 18 18 use PS::IPP::Metadata::Stats; 19 19 use PS::IPP::Metadata::List qw( parse_md_list ); 20 use File::Temp qw( tempfile );21 20 use PS::IPP::Config 1.01 qw( :standard ); 22 21 … … 27 26 28 27 my ( $det_id, $iter, $class_id, $det_type, $camera, $outroot, $dbname, $reduction, $verbose, $save_temps, 29 $no_update, $no_op );28 $no_update, $no_op, $redirect ); 30 29 GetOptions( 31 30 'det_id|d=s' => \$det_id, … … 35 34 'camera|c=s' => \$camera, 36 35 'outroot|w=s' => \$outroot, # output file base name 37 'dbname|d=s' => \$dbname, # Database name36 'dbname|d=s' => \$dbname, # Database name 38 37 'reduction=s' => \$reduction, # Reduction class for processing 39 38 'verbose' => \$verbose, # Print to stdout … … 41 40 'no-update' => \$no_update, 42 41 'no-op' => \$no_op, 42 'redirect-output' => \$redirect, 43 43 ) or pod2usage( 2 ); 44 44 45 45 46 pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV; … … 55 56 $ipprc->define_camera($camera); 56 57 $det_type = uc($det_type); 58 59 my $logDest = $ipprc->filename("LOG.IMFILE", $outroot, $class_id) 60 or &my_die("Missing entry in file rules", $det_id, $iter, $class_id, $PS_EXIT_CONFIG_ERROR); 61 62 # optionally redirect the outputs from this script to LOG.IMFILE 63 $ipprc->redirect_output($logDest) if $redirect; 57 64 58 65 # Recipes to use as a function of detrend type … … 121 128 122 129 # Generate MDC file with the inputs 123 my ($listFile, $listName) = tempfile( $ipprc->file_resolve("$outroot.$class_id.list.XXXX"), UNLINK => !$save_temps ); 130 my ($listFile, $listName) = $ipprc->create_temp_file("$outroot.$class_id.list", $save_temps); 131 124 132 my $num = 0; 125 133 foreach my $file (@$files) { … … 161 169 my $outputStats = $ipprc->filename("PPIMAGE.STATS", $outroot, $class_id) or &my_die("Missing entry in file rules", $det_id, $iter, $class_id, $PS_EXIT_CONFIG_ERROR); # Statistics name 162 170 my $traceDest = $ipprc->filename("TRACE.IMFILE", $outroot, $class_id) or &my_die("Missing entry in file rules", $det_id, $iter, $class_id, $PS_EXIT_CONFIG_ERROR); # Trace messages 163 my $logDest = $ipprc->filename("LOG.IMFILE", $outroot, $class_id) or &my_die("Missing entry in file rules", $det_id, $iter, $class_id, $PS_EXIT_CONFIG_ERROR); # Log messages164 171 165 172 $command = "$ppMerge $listName $outroot"; # Command to run
Note:
See TracChangeset
for help on using the changeset viewer.
