Changeset 19621 for trunk/ippScripts/scripts/detrend_resid_imfile.pl
- Timestamp:
- Sep 19, 2008, 2:11:37 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/ippScripts/scripts/detrend_resid_imfile.pl (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/detrend_resid_imfile.pl
r19374 r19621 24 24 use Pod::Usage qw( pod2usage ); 25 25 26 my ( $det_id, $iter, $ exp_id, $exp_tag, $class_id, $det_type, $detrend, $input_uri, $camera, $mode, $outroot,26 my ( $det_id, $iter, $ref_det_id, $ref_iter, $exp_id, $exp_tag, $class_id, $det_type, $detrend, $input_uri, $camera, $mode, $outroot, 27 27 $dbname, $reduction, $threads, $verbose, $no_update, $no_op, $redirect ); 28 28 GetOptions( 29 29 'det_id|d=s' => \$det_id, 30 30 'iteration=s' => \$iter, 31 'ref_det_id=s' => \$ref_det_id, 32 'ref_iter=s' => \$ref_iter, 31 33 'exp_id|e=s' => \$exp_id, 32 34 'exp_tag|=s' => \$exp_tag, … … 48 50 49 51 pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV; 50 pod2usage( -msg => "Required options: --det_id --iteration -- exp_id --exp_tag --class_id --det_type --camera --input_uri --mode --detrend --outroot (not for 'verify' mode)",52 pod2usage( -msg => "Required options: --det_id --iteration --ref_det_id --ref_iter --exp_id --exp_tag --class_id --det_type --camera --input_uri --mode --detrend --outroot (not for 'verify' mode)", 51 53 -exitval => 3) unless 52 defined $det_id and 53 defined $iter and 54 defined $exp_id and 55 defined $exp_tag and 56 defined $class_id and 57 defined $det_type and 58 defined $input_uri and 59 defined $camera and 60 defined $mode and 61 defined $outroot and 62 (defined $detrend or lc($mode) eq 'verify'); 54 defined $det_id and 55 defined $iter and 56 defined $ref_det_id and 57 defined $ref_iter and 58 defined $exp_id and 59 defined $exp_tag and 60 defined $class_id and 61 defined $det_type and 62 defined $input_uri and 63 defined $camera and 64 defined $mode and 65 defined $outroot and 66 defined $detrend; 63 67 64 68 $ipprc->define_camera($camera); … … 69 73 70 74 # Recipes to use as a function of detrend type and mode 75 # XXX probably can drop the distinct 'verify' recipes 71 76 $reduction = 'DETREND' unless defined $reduction; 72 77 my $recipe; # Name of recipe to use … … 78 83 &my_die("Unrecognised mode: $mode", $det_id, $iter, $exp_id, $class_id, $PS_EXIT_PROG_ERROR); 79 84 } 85 86 print "raw recipe: $recipe\n"; 80 87 $recipe = $ipprc->reduction($reduction, $recipe); 88 print "real recipe: $recipe\n"; 81 89 82 90 # values to extract from output metadata and the stats to calculate … … 166 174 167 175 # Detrend to use in processing 168 if (lc($mode) ne 'verify') { 169 my $detFlag = DETRENDS->{lc($det_type)}; 170 &my_die("Unrecognised detrend type: $det_type", $det_id, $iter, $exp_id, $class_id, $PS_EXIT_PROG_ERROR) unless defined $detFlag; 171 $command .= " $detFlag $detrend"; 172 } 176 my $detFlag = DETRENDS->{lc($det_type)}; 177 &my_die("Unrecognised detrend type: $det_type", $det_id, $iter, $exp_id, $class_id, $PS_EXIT_PROG_ERROR) unless defined $detFlag; 178 $command .= " $detFlag $detrend"; 173 179 174 180 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = … … 216 222 $command .= " -det_id $det_id"; 217 223 $command .= " -iteration $iter"; 224 $command .= " -ref_det_id $ref_det_id"; 225 $command .= " -ref_iter $ref_iter"; 218 226 $command .= " -exp_id $exp_id"; 219 227 $command .= " -class_id $class_id"; … … 252 260 $command .= " -det_id $det_id"; 253 261 $command .= " -iteration $iter"; 262 $command .= " -ref_det_id $ref_det_id"; 263 $command .= " -ref_iter $ref_iter"; 254 264 $command .= " -exp_id $exp_id"; 255 265 $command .= " -class_id $class_id";
Note:
See TracChangeset
for help on using the changeset viewer.
