Changeset 9091
- Timestamp:
- Oct 2, 2006, 11:54:11 AM (20 years ago)
- Location:
- trunk/ippScripts/scripts
- Files:
-
- 9 edited
-
detrend_apply_norm.pl (modified) (3 diffs)
-
detrend_calc_norm.pl (modified) (2 diffs)
-
detrend_create_resid.pl (modified) (3 diffs)
-
detrend_process.pl (modified) (3 diffs)
-
detrend_reject_exp.pl (modified) (2 diffs)
-
detrend_reject_imfile.pl (modified) (3 diffs)
-
detrend_stack.pl (modified) (2 diffs)
-
phase0exp.pl (modified) (3 diffs)
-
phase0imfile.pl (modified) ( previous)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/detrend_apply_norm.pl
r9004 r9091 17 17 $input, # Input file 18 18 $camera, # Camera 19 $detType # Detrend type 19 $detType, # Detrend type 20 $no_update # Don't update the database 20 21 ); 21 22 GetOptions( … … 26 27 'input_uri|u=s' => \$input, 27 28 'camera|c=s' => \$camera, 28 'det_type|t=s' => \$detType 29 'det_type|t=s' => \$detType, 30 'no-update' => \$no_update 29 31 ) or pod2usage( 2 ); 30 32 … … 62 64 63 65 # Update the database 64 {66 unless ($no_update) { 65 67 my $command = "$dettool -addnormalizedimfile -det_id $detId -iteration $iter -class_id $classId ". 66 68 "-uri $output"; # Command to run -
trunk/ippScripts/scripts/detrend_calc_norm.pl
r9005 r9091 16 16 # Parse command-line arguments 17 17 my ($detId, # Detrend id 18 $iter # Iteration 18 $iter, # Iteration 19 $no_update # Don't update the database? 19 20 ); 20 21 GetOptions( 21 22 'det_id|d=s' => \$detId, 22 23 'iteration|i=s' => \$iter, 24 'no-update' => \$no_update 23 25 ) or pod2usage( 2 ); 24 26 … … 94 96 95 97 # Process output normalisations 96 {98 unless ($no_update) { 97 99 foreach my $normItem (@$norms) { 98 100 my $className = $normItem->{name}; # Name of component -
trunk/ippScripts/scripts/detrend_create_resid.pl
r9004 r9091 16 16 17 17 my ($det_id, $iter, $exp_id, $class_id, $det_type, $detrend, 18 $input_uri );18 $input_uri, $no_update); 19 19 GetOptions( 20 20 'det_id|d=s' => \$det_id, … … 25 25 'detrend=s' => \$detrend, 26 26 'input_uri|u=s' => \$input_uri, 27 'no-update' => \$no_update 27 28 ) or pod2usage( 2 ); 28 29 … … 104 105 105 106 # Add the processed file to the database 106 {107 unless ($no_update) { 107 108 my $command = "$dettool -addresidimfile -det_id $det_id -iteration $iter -exp_id $exp_id " . 108 109 "-class_id $class_id -recip $recipe -uri $outputName -b1_uri $bin1Name " . -
trunk/ippScripts/scripts/detrend_process.pl
r9090 r9091 14 14 use Pod::Usage qw( pod2usage ); 15 15 16 my ($det_id, $exp_id, $class, $class_id, $det_type, $input_uri, $output_uri );16 my ($det_id, $exp_id, $class, $class_id, $det_type, $input_uri, $output_uri, $no_update); 17 17 GetOptions( 18 18 'det_id|d=s' => \$det_id, … … 22 22 'det_type|t=s' => \$det_type, 23 23 'input_uri|u=s' => \$input_uri, 24 'no-update' => \$no_update 24 25 ) or pod2usage( 2 ); 25 26 … … 85 86 86 87 # Add the processed file to the database 87 {88 unless ($no_update) { 88 89 my $command = "$dettool -addprocessed -det_id $det_id -exp_id $exp_id " . 89 90 "-class_id $class_id -recip $recipe -uri $outputImage"; # Command to run dettool -
trunk/ippScripts/scripts/detrend_reject_exp.pl
r9004 r9091 15 15 use Pod::Usage qw( pod2usage ); 16 16 17 my ($det_id, $iter, $det_type );17 my ($det_id, $iter, $det_type, $no_update); 18 18 GetOptions( 19 19 'det_id|d=s' => \$det_id, 20 20 'iteration=s' => \$iter, 21 21 'det_type|t=s' => \$det_type, 22 'no-update' => \$no_update 22 23 ) or pod2usage( 2 ); 23 24 … … 158 159 159 160 # Put the result into the database 160 { 161 my $command = "$dettool -adddetrunsummary -det_id $det_id -iteration $iter " . 162 "-bg " . $meanStats->mean() . " -bg_stdev " . $stdevStats->mean() . 163 " -bg_mean_stdev " . $meanStdevStats->mean(); 164 $command .= " -reject" if not $master; 165 166 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 167 run(command => $command, verbose => 1); 168 die "Unable to perform dettool -adddetrunsummary: $error_code\n" if not $success; 169 } 170 171 # Re-run processing if required 172 { 173 my $command = "$dettool -updatedetrun -det_id $det_id"; 174 if ($stop) { 175 $command .= ' -stop'; 176 } else { 177 $command .= ' -again'; 161 unless ($no_update) { 162 { 163 my $command = "$dettool -adddetrunsummary -det_id $det_id -iteration $iter " . 164 "-bg " . $meanStats->mean() . " -bg_stdev " . $stdevStats->mean() . 165 " -bg_mean_stdev " . $meanStdevStats->mean(); 166 $command .= " -reject" if not $master; 167 168 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 169 run(command => $command, verbose => 1); 170 die "Unable to perform dettool -adddetrunsummary: $error_code\n" if not $success; 178 171 } 179 172 180 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 181 run(command => $command, verbose => 1); 182 die "Unable to perform dettool -updatedetrun: $error_code\n" if not $success; 173 # Re-run processing if required 174 { 175 my $command = "$dettool -updatedetrun -det_id $det_id"; 176 if ($stop) { 177 $command .= ' -stop'; 178 } else { 179 $command .= ' -again'; 180 } 181 182 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 183 run(command => $command, verbose => 1); 184 die "Unable to perform dettool -updatedetrun: $error_code\n" if not $success; 185 } 183 186 } 184 187 __END__ -
trunk/ippScripts/scripts/detrend_reject_imfile.pl
r9004 r9091 15 15 use Pod::Usage qw( pod2usage ); 16 16 17 my ($det_id, $iter, $exp_id, $det_type );17 my ($det_id, $iter, $exp_id, $det_type, $no_update); 18 18 GetOptions( 19 19 'det_id|d=s' => \$det_id, … … 21 21 'exp_id|e=s' => \$exp_id, 22 22 'det_type|t=s' => \$det_type, 23 'no-update' => \$no_update 23 24 ) or pod2usage( 2 ); 24 25 … … 193 194 194 195 # Add the result into the database 195 {196 unless ($no_update) { 196 197 my $command = "$dettool -addresidexp -det_id $det_id -iteration $iter -exp_id $exp_id " . 197 198 "-recip " . RECIPE1() . "," . RECIPE2() . " -b1_uri $jpeg1Name -b2_uri $jpeg2Name " . -
trunk/ippScripts/scripts/detrend_stack.pl
r9004 r9091 22 22 'det_type|t=s' => \$det_type, 23 23 'camera|c=s' => \$camera, 24 'no-update' => \$no_update 24 25 ) or pod2usage( 2 ); 25 26 … … 111 112 112 113 # Add the resultant into the database 113 {114 unless ($no_update) { 114 115 my $command = "$dettool -addstacked -det_id $det_id -iteration $iter -class_id $class_id" . 115 116 " -uri $outputStack -recip $recipe"; # Command to run -
trunk/ippScripts/scripts/phase0exp.pl
r8715 r9091 10 10 use Data::Dumper; 11 11 12 use Getopt::Long qw( GetOptions :config auto_help auto_version gnu_getopt ); 13 14 my ($expid, $no_update); 15 16 GetOptions( 17 'exp_id|e=s' => \$expid, 18 'no-update' => \$no_update 19 ) or pod2usage( 2 ); 20 21 pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV; 22 pod2usage( 23 -msg => "Required options: --exp_id", 24 -exitval => 3, 25 ) unless defined $expid; 26 27 # Define setup 12 28 use constant TYPE => "exp_type"; # Observation type keyword 13 29 use constant DETRENDS => [ "bias", "dark", "flat", "fringe" ]; # Observation types to mark as detrend … … 42 58 ### "time" # Time of exposure --- not yet implemented 43 59 ]; 44 45 if (scalar @ARGV == 0 || scalar @ARGV >= 2) {46 die "Perform phase 0 processing at the exposure level.\n\n" .47 "Usage: $0 EXP_ID\n\n";48 }49 my $expid = shift @ARGV; # Exposure id50 60 51 61 … … 106 116 107 117 # Output results to the database 108 {118 unless ($no_update) { 109 119 my $command = "$p0tool -updateexp -exp_id $expid"; # Command to execute to update exposure parameters 110 120
Note:
See TracChangeset
for help on using the changeset viewer.
