Changeset 9004 for trunk/ippScripts/scripts/detrend_stack.pl
- Timestamp:
- Sep 27, 2006, 9:35:47 AM (20 years ago)
- File:
-
- 1 edited
-
trunk/ippScripts/scripts/detrend_stack.pl (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/detrend_stack.pl
r8983 r9004 15 15 use Pod::Usage qw( pod2usage ); 16 16 17 my ($det_id, $iter, $class_id, $det_type );17 my ($det_id, $iter, $class_id, $det_type, $camera); 18 18 GetOptions( 19 19 'det_id|d=s' => \$det_id, … … 21 21 'class_id|i=s' => \$class_id, 22 22 'det_type|t=s' => \$det_type, 23 'camera|c=s' => \$camera, 23 24 ) or pod2usage( 2 ); 24 25 25 26 pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV; 26 27 pod2usage( 27 -msg => "Required options: --det_id --iteration --class_id --det_type ",28 -msg => "Required options: --det_id --iteration --class_id --det_type --camera", 28 29 -exitval => 3, 29 30 ) unless defined $det_id 30 31 and defined $iter 31 32 and defined $class_id 32 and defined $det_type; 33 and defined $det_type 34 and defined $camera; 33 35 34 36 # Recipes to use as a function of detrend type … … 44 46 'dark' => 0, 45 47 'flat' => 1 46 }; 48 }; 47 49 48 die "Unrecognised detrend type: $det_type\n" if not defined RECIPES()->{$det_type}; 50 die "Unrecognised detrend type: $det_type\n" if not defined RECIPES()->{$det_type} 51 or not defined NORMALISE()->{$det_type}; 49 52 my $recipe = RECIPES()->{$det_type}; # Recipe to use in stacking 50 53 … … 70 73 71 74 # Stack the files 72 my $output = $det_type . '_' . $class_id . '_' . $det_id . '_' . $iter . '.fit'; # Output name 73 my $outputStats = $det_type . '_' . $class_id . '_' . $det_id . '_' . $iter . '.stats'; # Statistics name 75 my $outputRoot = $camera . '.' . $det_type . '.' . $det_id . '.' . $iter . '.' . $class_id; # Root name 76 my $outputStack = $outputRoot . '.fits'; # Output name 77 my $outputStats = $outputRoot . '.stats'; # Statistics name 74 78 { 75 my $command = "$ppMerge $output "; # Command to run79 my $command = "$ppMerge $outputStack"; # Command to run 76 80 foreach my $file (@$files) { 77 81 my $uri = $file->{uri}; # URI for input file … … 85 89 run(command => $command, verbose => 1); 86 90 die "Unable to perform ppMerge: $error_code\n" if not $success; 87 die "Unable to find expected output file: $output \n" if not -f $output;91 die "Unable to find expected output file: $outputStack\n" if not -f $outputStack; 88 92 die "Unable to find expected output file: $outputStats\n" if not -f $outputStats; 89 93 } … … 109 113 { 110 114 my $command = "$dettool -addstacked -det_id $det_id -iteration $iter -class_id $class_id" . 111 " -uri $output -recip $recipe";# Command to run115 " -uri $outputStack -recip $recipe"; # Command to run 112 116 $command .= ' -bg ' . $stats->bg_mean(); 113 117 if (defined($stats->bg_stdev())) {
Note:
See TracChangeset
for help on using the changeset viewer.
