Changeset 23186 for trunk/ippScripts/scripts/detrend_process_imfile.pl
- Timestamp:
- Mar 4, 2009, 4:17:15 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/detrend_process_imfile.pl
r23183 r23186 17 17 use PS::IPP::Metadata::Config; 18 18 use PS::IPP::Config 1.01 qw( :standard ); 19 20 my $ipprc = PS::IPP::Config->new(); # IPP configuration21 19 22 20 use Getopt::Long qw( GetOptions :config auto_help auto_version gnu_getopt ); … … 65 63 defined $outroot; 66 64 67 # Unhandled exceptions should be passed on to my_die so they get pushed into the database 68 $SIG{__DIE__} = sub { die @_ if $^S; 69 my_die( $_[0], $det_id, $exp_id, $class_id, $PS_EXIT_UNKNOWN_ERROR ); }; 70 71 # XXX this exits with status = 0 on failure 72 $ipprc->define_camera($camera); 73 65 my $ipprc = PS::IPP::Config->new( $camera ) or my_die( "Unable to set up", $det_id, $exp_id, $class_id, $PS_EXIT_CONFIG_ERROR ); # IPP configuration 74 66 my $logDest = $ipprc->filename("LOG.IMFILE", $outroot, $class_id) or &my_die("Missing entry from camera config", $det_id, $exp_id, $class_id, $PS_EXIT_CONFIG_ERROR); 75 76 $ipprc->redirect_output($logDest) if $redirect; 67 $ipprc->redirect_output($logDest) or my_die( "Unable to redirect output", $det_id, $exp_id, $class_id, $PS_EXIT_SYS_ERROR ) if $redirect; 77 68 78 69 # Recipes to use as a function of detrend type … … 113 104 my $cmdflags; 114 105 115 my $outputImage = $ipprc->filename("PPIMAGE.OUTPUT", $outroot, $class_id) or &my_die("Missing entry from camera config", $det_id, $exp_id, $class_id, $PS_EXIT_PROG_ERROR); 106 my $filerule = $FILERULES->{$det_type}; # File rule to use for output 107 $filerule = "PPIMAGE.OUTPUT" unless defined $filerule; 108 109 my $outputImage = $ipprc->filename($filerule, $outroot, $class_id) or &my_die("Missing entry from camera config", $det_id, $exp_id, $class_id, $PS_EXIT_PROG_ERROR); 116 110 my $outputBin1 = $ipprc->filename("PPIMAGE.BIN1", $outroot, $class_id) or &my_die("Missing entry from camera config", $det_id, $exp_id, $class_id, $PS_EXIT_PROG_ERROR); 117 111 my $outputBin2 = $ipprc->filename("PPIMAGE.BIN2", $outroot, $class_id) or &my_die("Missing entry from camera config", $det_id, $exp_id, $class_id, $PS_EXIT_PROG_ERROR); 118 112 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); 119 113 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); 114 115 120 116 # Run ppImage 121 117 unless ($no_op) { … … 125 121 $command .= " -recipe PPSTATS DETSTATS"; 126 122 $command .= " -stats $outputStats"; 127 $command .= " -F PPIMAGE.OUTPUT $FILERULES{$det_type}" if defined $FILERULES{$det_type}; 128 123 $command .= " -F PPIMAGE.OUTPUT $filerule" if $filerule ne "PPIMAGE.OUTPUT"; 129 124 $command .= " -tracedest $traceDest -log $logDest"; 130 125 $command .= " -threads $threads" if defined $threads;
Note:
See TracChangeset
for help on using the changeset viewer.
