Changeset 18048 for trunk/ippScripts/scripts
- Timestamp:
- Jun 10, 2008, 8:46:59 AM (18 years ago)
- Location:
- trunk/ippScripts/scripts
- Files:
-
- 7 edited
-
detrend_correct_imfile.pl (modified) (3 diffs)
-
detrend_norm_apply.pl (modified) (4 diffs)
-
detrend_process_exp.pl (modified) (3 diffs)
-
detrend_process_imfile.pl (modified) (4 diffs)
-
detrend_reject_imfile.pl (modified) (3 diffs)
-
detrend_resid.pl (modified) (4 diffs)
-
detrend_stack.pl (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/detrend_correct_imfile.pl
r17671 r18048 25 25 26 26 my ( $det_id, $exp_id, $class_id, $det_type, $exp_tag, $input_uri, $camera, $dbname, $workdir, $reduction, 27 $verbose, $no_update, $no_op );27 $verbose, $no_update, $no_op, $outroot, $redirect, $corr_id, $corr_type, $corr_uri ); 28 28 GetOptions( 29 29 'det_id|d=s' => \$det_id, … … 41 41 'no-update' => \$no_update, 42 42 'no-op' => \$no_op, 43 'outroot' => \$outroot, 44 'redirect-output' => \$redirect, 43 45 ) or pod2usage( 2 ); 44 46 … … 56 58 # XXX this exits with status = 0 on failure 57 59 $ipprc->define_camera($camera); 60 61 if ($redirect) { 62 die "must suplly --outroot with --redirect-output" if !defined ($outroot); 63 my $logDest = $ipprc->filename("LOG.IMFILE", $outroot, $class_id) 64 or &my_die("Missing entry from camera config", $det_id, $exp_id, $class_id, $PS_EXIT_CONFIG_ERROR); 65 $ipprc->redirect_output($logDest); 66 } 58 67 59 68 # Recipes to use as a function of detrend type -
trunk/ippScripts/scripts/detrend_norm_apply.pl
r17943 r18048 26 26 # Parse the command-line 27 27 my ( $det_id, $iter, $class_id, $value, $input_uri, $camera, $det_type, $outroot, $dbname, $verbose, 28 $no_update, $no_op );28 $no_update, $no_op, $redirect ); 29 29 GetOptions( 30 30 'det_id|d=s' => \$det_id, # Detrend ID … … 40 40 'no-update' => \$no_update, # Don't update the database 41 41 'no-op' => \$no_op, # Don't do any operations 42 'redirect-output' => \$redirect, # send output from script to LOG.IMFILE 42 43 ) or pod2usage( 2 ); 43 44 … … 56 57 $ipprc->define_camera($camera); 57 58 59 my $logDest = $ipprc->filename("LOG.IMFILE", $outroot, $class_id) 60 or &my_die("Missing entry from camera config", $det_id, $iter, $class_id, $PS_EXIT_CONFIG_ERROR); 61 $ipprc->redirect_output($logDest) if $redirect; 62 58 63 my $RECIPE_PPIMAGE = 'PPIMAGE_N'; # Recipe to use with ppImage 59 64 my $RECIPE_PPSTATS = 'CHIPSTATS'; # Recipe to use with ppStats … … 100 105 my $statsName = $ipprc->filename("PPIMAGE.STATS", $outroot, $class_id) or &my_die("Missing entry from camera config", $det_id, $iter, $class_id, $PS_EXIT_CONFIG_ERROR); 101 106 my $traceDest = $ipprc->filename("TRACE.IMFILE", $outroot, $class_id) or &my_die("Missing entry from camera config", $det_id, $iter, $class_id, $PS_EXIT_CONFIG_ERROR); 102 my $logDest = $ipprc->filename("LOG.IMFILE", $outroot, $class_id) or &my_die("Missing entry from camera config", $det_id, $iter, $class_id, $PS_EXIT_CONFIG_ERROR);103 107 104 108 # Run normalisation -
trunk/ippScripts/scripts/detrend_process_exp.pl
r17943 r18048 27 27 28 28 my ( $det_id, $exp_id, $det_type, $exp_tag, $camera, $outroot, $dbname, $reduction, $verbose, $no_update, 29 $no_op, $save_temps );29 $no_op, $save_temps, $redirect ); 30 30 GetOptions( 31 31 'det_id|d=s' => \$det_id, … … 41 41 'no-op' => \$no_op, 42 42 'save-temps' => \$save_temps, # Save temporary files? 43 'redirect-output' => \$redirect, 43 44 ) or pod2usage( 2 ); 44 45 … … 54 55 55 56 $ipprc->define_camera($camera); 57 58 if ($redirect) { 59 my $logDest = $ipprc->filename("LOG.EXP", $outroot, "NONE") 60 or &my_die("Missing entry in file rules", $det_id, $exp_id, $PS_EXIT_CONFIG_ERROR); 61 $ipprc->redirect_output($logDest); 62 } 56 63 57 64 # Recipes to use based on reduction class -
trunk/ippScripts/scripts/detrend_process_imfile.pl
r17971 r18048 25 25 26 26 my ( $det_id, $exp_id, $class_id, $det_type, $exp_tag, $input_uri, $camera, $outroot, $dbname, $reduction, 27 $verbose, $no_update, $no_op );27 $verbose, $no_update, $no_op, $redirect ); 28 28 GetOptions( 29 29 'det_id|d=s' => \$det_id, … … 40 40 'no-update' => \$no_update, 41 41 'no-op' => \$no_op, 42 'redirect-output' => \$redirect, 42 43 ) or pod2usage( 2 ); 43 44 … … 56 57 # XXX this exits with status = 0 on failure 57 58 $ipprc->define_camera($camera); 59 60 my $logDest = $ipprc->filename("LOG.IMFILE", $outroot, $class_id) 61 or &my_die("Missing entry from camera config", $exp_id, $exp_id, $class_id, $PS_EXIT_CONFIG_ERROR); 62 63 $ipprc->redirect_output($logDest) if $redirect; 58 64 59 65 # Recipes to use as a function of detrend type … … 95 101 my $outputStats = $ipprc->filename("PPIMAGE.STATS", $outroot, $class_id) or &my_die("Missing entry from camera config", $det_id, $exp_id, $class_id, $PS_EXIT_PROG_ERROR); 96 102 my $traceDest = $ipprc->filename("TRACE.IMFILE", $outroot, $class_id) or &my_die("Missing entry from camera config", $exp_id, $exp_id, $class_id, $PS_EXIT_CONFIG_ERROR); 97 my $logDest = $ipprc->filename("LOG.IMFILE", $outroot, $class_id) or &my_die("Missing entry from camera config", $exp_id, $exp_id, $class_id, $PS_EXIT_CONFIG_ERROR);98 99 103 # Run ppImage 100 104 unless ($no_op) { -
trunk/ippScripts/scripts/detrend_reject_imfile.pl
r17943 r18048 36 36 # parse the command-line options 37 37 my ( $det_id, $iter, $exp_id, $exp_tag, $det_type, $camera, $filter, $reject, $outroot, $dbname, $reduction, 38 $verbose, $no_update, $no_op, $save_temps );38 $verbose, $no_update, $no_op, $save_temps, $redirect ); 39 39 GetOptions( 40 40 'det_id|d=s' => \$det_id, … … 53 53 'no-op' => \$no_op, 54 54 'save-temps' => \$save_temps, # Save temporary files? 55 'redirect-output' => \$redirect, # redirect output from LOG.IMFILE 55 56 ) or pod2usage( 2 ); 56 57 … … 68 69 # load IPP config information for the specified camera 69 70 $ipprc->define_camera($camera); 71 if ($redirect) { 72 # XXX should this really be going to LOG.IMFILE? 73 # That's where detrend.resid.pro was sending it 74 my $logDest = $ipprc->filename("LOG.IMFILE", $outroot, "NONE") 75 or &my_die("Missing entry from camera config", $det_id, $iter, $exp_id, $PS_EXIT_CONFIG_ERROR); 76 $ipprc->redirect_output($logDest); 77 } 78 70 79 71 80 # Recipes to use based on reduction class -
trunk/ippScripts/scripts/detrend_resid.pl
r17971 r18048 25 25 26 26 my ( $det_id, $iter, $exp_id, $exp_tag, $class_id, $det_type, $detrend, $input_uri, $camera, $mode, $outroot, 27 $dbname, $reduction, $verbose, $no_update, $no_op );27 $dbname, $reduction, $verbose, $no_update, $no_op, $redirect ); 28 28 GetOptions( 29 29 'det_id|d=s' => \$det_id, … … 43 43 'no-update' => \$no_update, 44 44 'no-op' => \$no_op, 45 'redirect-output' => \$redirect, 45 46 ) or pod2usage( 2 ); 46 47 … … 61 62 62 63 $ipprc->define_camera($camera); 64 my $logDest = $ipprc->filename("LOG.IMFILE", $outroot, $class_id); 65 if ($redirect) { 66 $ipprc->redirect_output($logDest); 67 } 63 68 64 69 # Recipes to use as a function of detrend type and mode … … 137 142 my $outputStats = $ipprc->filename("PPIMAGE.STATS", $outroot, $class_id); 138 143 my $traceDest = $ipprc->filename("TRACE.IMFILE", $outroot, $class_id); 139 my $logDest = $ipprc->filename("LOG.IMFILE", $outroot, $class_id);140 144 141 145 # Run ppImage & ppStats -
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.
