Changeset 16308
- Timestamp:
- Feb 5, 2008, 11:47:19 AM (18 years ago)
- Location:
- trunk/ippScripts/scripts
- Files:
-
- 18 edited
-
camera_exp.pl (modified) (9 diffs)
-
chip_imfile.pl (modified) (5 diffs)
-
detrend_correct_imfile.pl (modified) (4 diffs)
-
detrend_norm_apply.pl (modified) (4 diffs)
-
detrend_norm_calc.pl (modified) (5 diffs)
-
detrend_norm_exp.pl (modified) (6 diffs)
-
detrend_process_exp.pl (modified) (6 diffs)
-
detrend_process_imfile.pl (modified) (4 diffs)
-
detrend_reject_exp.pl (modified) (5 diffs)
-
detrend_reject_imfile.pl (modified) (6 diffs)
-
detrend_resid.pl (modified) (5 diffs)
-
detrend_stack.pl (modified) (3 diffs)
-
diff_skycell.pl (modified) (6 diffs)
-
register_exp.pl (modified) (4 diffs)
-
register_imfile.pl (modified) (7 diffs)
-
stack_skycell.pl (modified) (5 diffs)
-
warp_overlap.pl (modified) (10 diffs)
-
warp_skycell.pl (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/camera_exp.pl
r16247 r16308 37 37 use Pod::Usage qw( pod2usage ); 38 38 39 my ($exp_tag, $cam_id, $camera, $outroot, $recipe, $dbname, $reduction, $dvodb, $no_update, $no_op); 39 my ( $exp_tag, $cam_id, $camera, $outroot, $recipe, $dbname, $reduction, $dvodb, $verbose, $no_update, 40 $no_op ); 40 41 GetOptions( 41 42 'exp_tag=s' => \$exp_tag, # Exposure identifier … … 47 48 'reduction=s' => \$reduction, # Reduction class 48 49 'dvodb|w=s' => \$dvodb, # output DVO database 50 'verbose' => \$verbose, # Print to stdout 49 51 'no-update' => \$no_update, # Update the database? 50 52 'no-op' => \$no_op, # Don't do any operations? … … 129 131 $command .= " -dbname $dbname" if defined $dbname; 130 132 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 131 run(command => $command, verbose => 1);133 run(command => $command, verbose => $verbose); 132 134 unless ($success) { 133 135 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); … … 196 198 my $command = "$ppImage -list $list1Name $outroot -recipe PPIMAGE $recipe1"; # Command to run 197 199 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 198 run(command => $command, verbose => 1);200 run(command => $command, verbose => $verbose); 199 201 unless ($success) { 200 202 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); … … 208 210 my $command = "$ppImage -list $list2Name $outroot -recipe PPIMAGE $recipe2"; # Command to run 209 211 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 210 run(command => $command, verbose => 1);212 run(command => $command, verbose => $verbose); 211 213 unless ($success) { 212 214 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); … … 222 224 my $command = "$ppConfigDump -camera $camera -dump-recipe PSASTRO -"; 223 225 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 224 run(command => $command, verbose => 1);226 run(command => $command, verbose => $verbose); 225 227 unless ($success) { 226 228 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); … … 244 246 $command .= " -tracedest $traceDest -log $logDest"; 245 247 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 246 run(command => $command, verbose => 1);248 run(command => $command, verbose => $verbose); 247 249 unless ($success) { 248 250 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); … … 274 276 275 277 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 276 run(command => $command, verbose => 1);278 run(command => $command, verbose => $verbose); 277 279 unless ($success) { 278 280 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); … … 293 295 unless ($no_update) { 294 296 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 295 run(command => $fpaCommand, verbose => 1);297 run(command => $fpaCommand, verbose => $verbose); 296 298 unless ($success) { 297 299 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); -
trunk/ippScripts/scripts/chip_imfile.pl
r16247 r16308 33 33 34 34 # Parse the command-line arguments 35 my ($exp_id, $exp_tag, $chip_id, $class_id, $uri, $camera, $outroot, $dbname, $reduction, $no_update, $no_op); 35 my ( $exp_id, $exp_tag, $chip_id, $class_id, $uri, $camera, $outroot, $dbname, $reduction, $verbose, 36 $no_update, $no_op ); 36 37 GetOptions( 37 'exp_id=s' => \$exp_id, # Exposure identifier 38 'exp_tag=s' => \$exp_tag, # Exposure identifier 39 'chip_id=s' => \$chip_id, # Chiptool identifier 40 'class_id=s' => \$class_id, # Class identifier 41 'uri|u=s' => \$uri, # Input FITS file 42 'camera|c=s' => \$camera, # Camera 38 'exp_id=s' => \$exp_id, # Exposure identifier 39 'exp_tag=s' => \$exp_tag, # Exposure identifier 40 'chip_id=s' => \$chip_id, # Chiptool identifier 41 'class_id=s' => \$class_id, # Class identifier 42 'uri|u=s' => \$uri, # Input FITS file 43 'camera|c=s' => \$camera, # Camera 43 44 'outroot|w=s' => \$outroot, # output file base name 44 45 'dbname|d=s' => \$dbname, # Database name 45 'reduction=s' => \$reduction, # Reduction class 46 'no-update' => \$no_update, # Don't update the database? 47 'no-op' => \$no_op, # Don't do any operations? 46 'reduction=s' => \$reduction, # Reduction class 47 'verbose' => \$verbose, # Print to stdout 48 'no-update' => \$no_update, # Don't update the database? 49 'no-op' => \$no_op, # Don't do any operations? 48 50 ) or pod2usage( 2 ); 49 51 … … 70 72 # values to extract from output metadata and the stats to calculate 71 73 # XXX commented-out entries are not yet defined in the output files 72 my $STATS = 73 [ 74 my $STATS = 75 [ 74 76 # PPSTATS KEYWORD STATISTIC CHIPTOOL FLAG 75 77 { name => "ROBUST_MEDIAN", type => "mean", flag => "-bg", dtype => "float" }, … … 103 105 my $chiptool = can_run('chiptool') or (warn "Can't find chiptool" and $missing_tools = 1); 104 106 my $ppImage = can_run('ppImage') or (warn "Can't find ppImage" and $missing_tools = 1); 105 if ($missing_tools) { 107 if ($missing_tools) { 106 108 warn("Can't find required tools."); 107 exit($PS_EXIT_CONFIG_ERROR); 109 exit($PS_EXIT_CONFIG_ERROR); 108 110 } 109 111 … … 140 142 141 143 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 142 run(command => $command, verbose => 1);144 run(command => $command, verbose => $verbose); 143 145 unless ($success) { 144 146 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); … … 185 187 unless ($no_update) { 186 188 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 187 run(command => $command, verbose => 1);189 run(command => $command, verbose => $verbose); 188 190 unless ($success) { 189 191 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); -
trunk/ippScripts/scripts/detrend_correct_imfile.pl
r15314 r16308 32 32 use Pod::Usage qw( pod2usage ); 33 33 34 my ($det_id, $exp_id, $class_id, $det_type, $exp_tag, $input_uri, $camera, $dbname, $workdir, $reduction, $no_update, $no_op); 34 my ( $det_id, $exp_id, $class_id, $det_type, $exp_tag, $input_uri, $camera, $dbname, $workdir, $reduction, 35 $verbose, $no_update, $no_op ); 35 36 GetOptions( 36 37 'det_id|d=s' => \$det_id, … … 45 46 'dbname|d=s' => \$dbname, # Database name 46 47 'workdir|w=s' => \$workdir, # Working directory, for output files 48 'verbose' => \$verbose, # Print to stdout 47 49 'no-update' => \$no_update, 48 50 'no-op' => \$no_op, … … 91 93 92 94 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 93 run(command => $command, verbose => 1);95 run(command => $command, verbose => $verbose); 94 96 unless ($success) { 95 97 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); … … 111 113 unless ($no_update) { 112 114 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 113 run(command => $command, verbose => 1);115 run(command => $command, verbose => $verbose); 114 116 unless ($success) { 115 117 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); -
trunk/ippScripts/scripts/detrend_norm_apply.pl
r16196 r16308 33 33 34 34 # Parse the command-line 35 my ($det_id, $iter, $class_id, $value, $input_uri, $camera, $det_type, $outroot, $dbname, $no_update, $no_op); 35 my ( $det_id, $iter, $class_id, $value, $input_uri, $camera, $det_type, $outroot, $dbname, $verbose, 36 $no_update, $no_op ); 36 37 GetOptions( 37 38 'det_id|d=s' => \$det_id, # Detrend ID … … 44 45 'outroot|w=s' => \$outroot, # output file base name 45 46 'dbname|d=s' => \$dbname, # Database name 47 'verbose' => \$verbose, # Print to stdout 46 48 'no-update' => \$no_update, # Don't update the database 47 49 'no-op' => \$no_op, # Don't do any operations … … 117 119 118 120 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 119 run(command => $command, verbose => 1);121 run(command => $command, verbose => $verbose); 120 122 unless ($success) { 121 123 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); … … 160 162 unless ($no_update) { 161 163 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 162 run(command => $command, verbose => 1);164 run(command => $command, verbose => $verbose); 163 165 unless ($success) { 164 166 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); -
trunk/ippScripts/scripts/detrend_norm_calc.pl
r16196 r16308 32 32 33 33 # Parse command-line arguments 34 my ($det_id, $iter, $detType, $outroot, $dbname, $ no_update, $no_op);34 my ($det_id, $iter, $detType, $outroot, $dbname, $verbose, $no_update, $no_op); 35 35 GetOptions( 36 36 'det_id|d=s' => \$det_id, # Detrend id … … 39 39 'outroot|w=s' => \$outroot, # output file base name 40 40 'dbname|d=s' => \$dbname, # Database name 41 'verbose' => \$verbose, # Print to stdout 41 42 'no-update' => \$no_update, # Don't update the database? 42 43 'no-op' => \$no_op, # Don't do operations … … 88 89 my @command = split /\s+/, $command; 89 90 my ( $stdin, $stdout, $stderr ); # Buffers for running program 90 print "Running [$command]...\n" ;91 print "Running [$command]...\n" if $verbose; 91 92 if (not run(\@command, \$stdin, \$stdout, \$stderr)) { 92 93 &my_die("Unable to perform dettool -processedimfile on detrend $det_id/$iter: $?", 93 94 $det_id, $iter, $PS_EXIT_SYS_ERROR); 94 95 } 95 # print $stdout . "\n";96 print $stdout . "\n" if $verbose; 96 97 97 98 # Because of the length, need to split into individual metadatas --- it parses SO much quicker! … … 141 142 my ( $stdout, $stderr ); # Buffers for running program 142 143 my @command = split /\s+/, $ppNormCalc; 143 print "Running [$ppNormCalc]...\n" ;144 print "Running [$ppNormCalc]...\n" if $verbose; 144 145 if (not run(\@command, \$normData, \$stdout, \$stderr)) { 145 146 &my_die("Unable to perform ppNormCalc: $?", $det_id, $iter, $PS_EXIT_SYS_ERROR); 146 147 } 147 print $stdout . "\n" ;148 print $stdout . "\n" if $verbose; 148 149 149 150 # Parse the output … … 187 188 188 189 my ( $stdin, $stdout, $stderr ); # Buffers for running program 189 print "Running [$command]...\n" ;190 print "Running [$command]...\n" if $verbose; 190 191 if (not run \@command, \$stdin, \$stdout, \$stderr) { 191 192 warn("Unable to perform dettool -addnormstat for $className: $?"); 192 193 exit($PS_EXIT_SYS_ERROR); 193 194 } 194 print $stdout . "\n" ;195 print $stdout . "\n" if $verbose; 195 196 } 196 197 } else { -
trunk/ippScripts/scripts/detrend_norm_exp.pl
r16196 r16308 35 35 use Pod::Usage qw( pod2usage ); 36 36 37 my ($det_id, $iter, $det_type, $camera, $outroot, $dbname, $reduction, $ no_update, $no_op);37 my ($det_id, $iter, $det_type, $camera, $outroot, $dbname, $reduction, $verbose, $no_update, $no_op); 38 38 GetOptions( 39 39 'det_id|d=s' => \$det_id, … … 44 44 'dbname|d=s' => \$dbname, # Database name 45 45 'reduction|=s' => \$reduction, 46 'verbose' => \$verbose, # Print to stdout 46 47 'no-update' => \$no_update, 47 48 'no-op' => \$no_op, … … 97 98 $command .= " -dbname $dbname" if defined $dbname; 98 99 ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 99 run(command => $command, verbose => 1);100 run(command => $command, verbose => $verbose); 100 101 unless ($success) { 101 102 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); … … 142 143 $command = "$ppImage -list $list1Name $outroot -recipe PPIMAGE $recipe1"; # Command to run 143 144 ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 144 run(command => $command, verbose => 1);145 run(command => $command, verbose => $verbose); 145 146 &my_die("Unable to find expected output file: $jpeg1Name", $det_id, $iter, $PS_EXIT_SYS_ERROR) unless -f $ipprc->file_resolve($jpeg1Name); 146 147 … … 148 149 $command = "$ppImage -list $list2Name $outroot -recipe PPIMAGE $recipe2"; # Command to run 149 150 ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 150 run(command => $command, verbose => 1);151 run(command => $command, verbose => $verbose); 151 152 &my_die("Unable to find expected output file: $jpeg2Name", $det_id, $iter, $PS_EXIT_SYS_ERROR) unless -f $ipprc->file_resolve($jpeg2Name); 152 153 … … 165 166 unless ($no_update) { 166 167 ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 167 run(command => $command, verbose => 1);168 run(command => $command, verbose => $verbose); 168 169 unless ($success) { 169 170 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); -
trunk/ippScripts/scripts/detrend_process_exp.pl
r16196 r16308 35 35 use Pod::Usage qw( pod2usage ); 36 36 37 my ($det_id, $exp_id, $det_type, $exp_tag, $camera, $outroot, $dbname, $reduction, $no_update, $no_op); 37 my ( $det_id, $exp_id, $det_type, $exp_tag, $camera, $outroot, $dbname, $reduction, $verbose, $no_update, 38 $no_op ); 38 39 GetOptions( 39 40 'det_id|d=s' => \$det_id, … … 45 46 'dbname|d=s' => \$dbname, # Database name 46 47 'reduction|=s' => \$reduction, 48 'verbose' => \$verbose, # Print to stdout 47 49 'no-update' => \$no_update, 48 50 'no-op' => \$no_op, … … 99 101 $command .= " -dbname $dbname" if defined $dbname; 100 102 ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 101 run(command => $command, verbose => 1);103 run(command => $command, verbose => $verbose); 102 104 unless ($success) { 103 105 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); … … 145 147 $command = "$ppImage -list $list1Name $outroot -recipe PPIMAGE $recipe1"; # Command to run 146 148 ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 147 run(command => $command, verbose => 1);149 run(command => $command, verbose => $verbose); 148 150 unless ($success) { 149 151 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); … … 155 157 $command = "$ppImage -list $list2Name $outroot -recipe PPIMAGE $recipe2"; # Command to run 156 158 ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 157 run(command => $command, verbose => 1);159 run(command => $command, verbose => $verbose); 158 160 unless ($success) { 159 161 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); … … 174 176 unless ($no_update) { 175 177 ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 176 run(command => $command, verbose => 1);178 run(command => $command, verbose => $verbose); 177 179 unless ($success) { 178 180 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); -
trunk/ippScripts/scripts/detrend_process_imfile.pl
r16209 r16308 32 32 use Pod::Usage qw( pod2usage ); 33 33 34 my ($det_id, $exp_id, $class_id, $det_type, $exp_tag, $input_uri, $camera, $outroot, $dbname, $reduction, $no_update, $no_op); 34 my ( $det_id, $exp_id, $class_id, $det_type, $exp_tag, $input_uri, $camera, $outroot, $dbname, $reduction, 35 $verbose, $no_update, $no_op ); 35 36 GetOptions( 36 37 'det_id|d=s' => \$det_id, … … 44 45 'dbname|d=s' => \$dbname, # Database name 45 46 'reduction=s' => \$reduction, # Reduction class 47 'verbose' => \$verbose, # Print to stdout 46 48 'no-update' => \$no_update, 47 49 'no-op' => \$no_op, … … 113 115 114 116 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 115 run(command => $command, verbose => 1);117 run(command => $command, verbose => $verbose); 116 118 unless ($success) { 117 119 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); … … 152 154 unless ($no_update) { 153 155 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 154 run(command => $command, verbose => 1);156 run(command => $command, verbose => $verbose); 155 157 unless ($success) { 156 158 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); -
trunk/ippScripts/scripts/detrend_reject_exp.pl
r16196 r16308 37 37 use Pod::Usage qw( pod2usage ); 38 38 39 my ($det_id, $iter, $det_type, $camera, $outroot, $filter, $dbname, $ no_update, $no_op);39 my ($det_id, $iter, $det_type, $camera, $outroot, $filter, $dbname, $verbose, $no_update, $no_op); 40 40 GetOptions( 41 41 'det_id|d=s' => \$det_id, … … 43 43 'det_type|t=s' => \$det_type, 44 44 'camera=s' => \$camera, 45 'outroot|w=s' => \$outroot, # output file base name45 'outroot|w=s' => \$outroot, # output file base name 46 46 'filter=s' => \$filter, 47 47 'dbname|d=s' => \$dbname, # Database name 48 'verbose' => \$verbose, # Print to stdout 48 49 'no-update' => \$no_update, 49 50 'no-op' => \$no_op, … … 106 107 $command .= " -dbname $dbname" if defined $dbname; 107 108 ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 108 run(command => $command, verbose => 1);109 run(command => $command, verbose => $verbose); 109 110 unless ($success) { 110 111 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); … … 261 262 # Update 262 263 ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 263 run(command => $command, verbose => 1);264 run(command => $command, verbose => $verbose); 264 265 unless ($success) { 265 266 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); … … 308 309 unless ($no_update) { 309 310 ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 310 run(command => $command, verbose => 1);311 run(command => $command, verbose => $verbose); 311 312 unless ($success) { 312 313 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); -
trunk/ippScripts/scripts/detrend_reject_imfile.pl
r16196 r16308 43 43 44 44 # parse the command-line options 45 my ($det_id, $iter, $exp_id, $exp_tag, $det_type, $camera, $filter, $reject, $outroot, $dbname, $reduction, $no_update, $no_op); 45 my ( $det_id, $iter, $exp_id, $exp_tag, $det_type, $camera, $filter, $reject, $outroot, $dbname, $reduction, 46 $verbose, $no_update, $no_op ); 46 47 GetOptions( 47 48 'det_id|d=s' => \$det_id, … … 56 57 'dbname|d=s' => \$dbname, # Database name 57 58 'reduction|=s' => \$reduction, 59 'verbose' => \$verbose, # Print to stdout 58 60 'no-update' => \$no_update, 59 61 'no-op' => \$no_op, … … 124 126 $command .= " -dbname $dbname" if defined $dbname; 125 127 ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 126 run(command => $command, verbose => 1);128 run(command => $command, verbose => $verbose); 127 129 unless ($success) { 128 130 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); … … 178 180 $command = "$ppImage -list $list1Name $outroot -recipe PPIMAGE $recipe1"; # Command to run 179 181 ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 180 run(command => $command, verbose => 1);182 run(command => $command, verbose => $verbose); 181 183 unless ($success) { 182 184 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); … … 188 190 $command = "$ppImage -list $list2Name $outroot -recipe PPIMAGE $recipe2"; # Command to run 189 191 ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 190 run(command => $command, verbose => 1);192 run(command => $command, verbose => $verbose); 191 193 unless ($success) { 192 194 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); … … 515 517 unless ($no_update) { 516 518 ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 517 run(command => $command, verbose => 1);519 run(command => $command, verbose => $verbose); 518 520 unless ($success) { 519 521 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); -
trunk/ippScripts/scripts/detrend_resid.pl
r16196 r16308 32 32 use Pod::Usage qw( pod2usage ); 33 33 34 my ($det_id, $iter, $exp_id, $exp_tag, $class_id, $det_type, $detrend, $input_uri, $camera, $mode, $outroot, $dbname, $reduction, $no_update, $no_op); 34 my ( $det_id, $iter, $exp_id, $exp_tag, $class_id, $det_type, $detrend, $input_uri, $camera, $mode, $outroot, 35 $dbname, $reduction, $verbose, $no_update, $no_op ); 35 36 GetOptions( 36 37 'det_id|d=s' => \$det_id, … … 47 48 'dbname|d=s' => \$dbname, # Database name 48 49 'reduction=s' => \$reduction, # Reduction class 50 'verbose' => \$verbose, # Print to stdout 49 51 'no-update' => \$no_update, 50 52 'no-op' => \$no_op, … … 162 164 163 165 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 164 run(command => $command, verbose => 1);166 run(command => $command, verbose => $verbose); 165 167 unless ($success) { 166 168 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); … … 188 190 $command = "$ppStats -recipe PPSTATS RESIDUAL $bin2Name"; 189 191 ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 190 run(command => $command, verbose => 1);192 run(command => $command, verbose => $verbose); 191 193 unless ($success) { 192 194 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); … … 217 219 unless ($no_update) { 218 220 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 219 run(command => $command, verbose => 1);221 run(command => $command, verbose => $verbose); 220 222 unless ($success) { 221 223 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); -
trunk/ippScripts/scripts/detrend_stack.pl
r16196 r16308 33 33 use Pod::Usage qw( pod2usage ); 34 34 35 my ($det_id, $iter, $class_id, $det_type, $camera, $outroot, $dbname, $reduction, $no_update, $no_op, $quiet); 35 my ( $det_id, $iter, $class_id, $det_type, $camera, $outroot, $dbname, $reduction, $verbose, $no_update, 36 $no_op ); 36 37 GetOptions( 37 38 'det_id|d=s' => \$det_id, … … 43 44 'dbname|d=s' => \$dbname, # Database name 44 45 'reduction=s' => \$reduction, # Reduction class for processing 46 'verbose' => \$verbose, # Print to stdout 45 47 'no-update' => \$no_update, 46 48 'no-op' => \$no_op, 47 'quiet' => \$quiet,48 49 ) or pod2usage( 2 ); 49 50 … … 57 58 defined $camera and 58 59 defined $outroot; 59 60 my $verbose = 1;61 if (defined $quiet) { $verbose = 0; }62 60 63 61 $ipprc->define_camera($camera); -
trunk/ippScripts/scripts/diff_skycell.pl
r16247 r16308 33 33 use Pod::Usage qw( pod2usage ); 34 34 35 my ($diff_id, $dbname, $workdir, $ no_update, $no_op);35 my ($diff_id, $dbname, $workdir, $verbose, $no_update, $no_op); 36 36 GetOptions( 37 37 'diff_id|d=s' => \$diff_id, # Diff identifier 38 38 'dbname|d=s' => \$dbname, # Database name 39 39 'workdir|w=s' => \$workdir, # Working directory, for output files 40 'verbose' => \$verbose, # Print to stdout 40 41 'no-update' => \$no_update, # Don't update the database? 41 42 'no-op' => \$no_op, # Don't do any operations? … … 74 75 $command .= " -dbname $dbname" if defined $dbname; 75 76 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 76 run(command => $command, verbose => 1);77 run(command => $command, verbose => $verbose); 77 78 unless ($success) { 78 79 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); … … 190 191 191 192 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 192 run(command => $command, verbose => 1);193 run(command => $command, verbose => $verbose); 193 194 unless ($success) { 194 195 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); … … 222 223 223 224 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 224 run(command => $command, verbose => 1);225 run(command => $command, verbose => $verbose); 225 226 unless ($success) { 226 227 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); … … 235 236 236 237 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 237 run(command => $command, verbose => 1);238 run(command => $command, verbose => $verbose); 238 239 unless ($success) { 239 240 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); … … 255 256 my $command = "$difftool -adddiffskyfile -diff_id $diff_id -code $exit_code"; 256 257 $command .= " -dbname $dbname" if defined $dbname; 257 run(command => $command, verbose => 1);258 run(command => $command, verbose => $verbose); 258 259 } 259 260 exit $exit_code; -
trunk/ippScripts/scripts/register_exp.pl
r16196 r16308 34 34 ); 35 35 36 my ($cache, $exp_id, $exp_tag, $dbname, $ no_update, $no_op);36 my ($cache, $exp_id, $exp_tag, $dbname, $verbose, $no_update, $no_op); 37 37 GetOptions( 38 38 'caches' => \$cache, … … 40 40 'exp_tag|t=s' => \$exp_tag, 41 41 'dbname|d=s' => \$dbname, # Database name 42 'verbose' => \$verbose, # Print to stdout 42 43 'no-update' => \$no_update, 43 44 'no-op' => \$no_op, … … 126 127 $command .= " -dbname $dbname" if defined $dbname; 127 128 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 128 cache_run(command => $command, verbose => 1);129 cache_run(command => $command, verbose => $verbose); 129 130 unless ($success) { 130 131 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); … … 176 177 unless ($no_update) { 177 178 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 178 cache_run(command => $command, verbose => 1);179 cache_run(command => $command, verbose => $verbose); 179 180 unless ($success) { 180 181 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); -
trunk/ippScripts/scripts/register_imfile.pl
r16196 r16308 37 37 use Pod::Usage qw( pod2usage ); 38 38 39 my ($cache, $exp_id, $tmp_class_id, $tmp_exp_name, $uri, $dbname, $ no_update, $no_op);39 my ($cache, $exp_id, $tmp_class_id, $tmp_exp_name, $uri, $dbname, $berbose, $no_update, $no_op); 40 40 GetOptions( 41 41 'caches' => \$cache, … … 45 45 'uri|u=s' => \$uri, 46 46 'dbname|d=s' => \$dbname,# Database name 47 'verbose' => \$verbose, # Print to stdout 47 48 'no-update' => \$no_update, 48 49 'no-op' => \$no_op, … … 130 131 131 132 my $now_time = localtime(); 132 printf STDERR "\nstarting ppStats: %s\n", $now_time ;133 printf STDERR "\nstarting ppStats: %s\n", $now_time if $verbose; 133 134 134 135 # Run ppStats on the input file … … 137 138 my $command = "$ppStats $uri -recipe PPSTATS $RECIPE -level"; # Command to run ppStats 138 139 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 139 cache_run(command => $command, verbose => 1);140 cache_run(command => $command, verbose => $verbose); 140 141 unless ($success) { 141 142 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); … … 157 158 158 159 $now_time = localtime(); 159 printf STDERR "\ndone with ppStats: %s\n", $now_time ;160 printf STDERR "\ndone with ppStats: %s\n", $now_time if $verbose; 160 161 161 162 # we require at a minimum: -telescope, -inst, -filelevel, -class_id, -exp_type … … 175 176 176 177 $now_time = localtime(); 177 printf STDERR "\nrunning regtool update: %s\n", $now_time ;178 printf STDERR "\nrunning regtool update: %s\n", $now_time if $verbose; 178 179 179 180 # Push the results into the database 180 181 unless ($no_update) { 181 182 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 182 run(command => $command, verbose => 1);183 run(command => $command, verbose => $verbose); 183 184 unless ($success) { 184 185 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); … … 191 192 192 193 $now_time = localtime(); 193 printf STDERR "\ndone with regtool update: %s\n", $now_time ;194 printf STDERR "\ndone with regtool update: %s\n", $now_time if $verbose; 194 195 195 196 sub cache_run -
trunk/ippScripts/scripts/stack_skycell.pl
r16247 r16308 34 34 use Pod::Usage qw( pod2usage ); 35 35 36 my ($stack_id, $dbname, $workdir, $ no_update, $no_op, $save_temps);36 my ($stack_id, $dbname, $workdir, $verbose, $no_update, $no_op, $save_temps); 37 37 GetOptions( 38 38 'stack_id|d=s' => \$stack_id, # Stack identifier 39 39 'dbname|d=s' => \$dbname, # Database name 40 40 'workdir|w=s' => \$workdir, # Working directory, for output files 41 'verbose' => \$verbose, # Print to stdout 41 42 'no-update' => \$no_update, # Don't update the database? 42 43 'no-op' => \$no_op, # Don't do any operations? … … 76 77 $command .= " -dbname $dbname" if defined $dbname; 77 78 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 78 run(command => $command, verbose => 1);79 run(command => $command, verbose => $verbose); 79 80 unless ($success) { 80 81 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); … … 181 182 $command .= " -tracedest $traceDest -log $logDest"; 182 183 183 # print "\n\nWARNING: Convolving to 1 arcsec FWHM seeing!\n\n";184 print "\n\nWARNING: NOT Convolving!\n\n";185 186 184 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 187 run(command => $command, verbose => 1);185 run(command => $command, verbose => $verbose); 188 186 unless ($success) { 189 187 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); … … 217 215 218 216 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 219 run(command => $command, verbose => 1);217 run(command => $command, verbose => $verbose); 220 218 unless ($success) { 221 219 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); … … 230 228 231 229 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 232 run(command => $command, verbose => 1);230 run(command => $command, verbose => $verbose); 233 231 unless ($success) { 234 232 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); -
trunk/ippScripts/scripts/warp_overlap.pl
r16020 r16308 38 38 my $ipprc = PS::IPP::Config->new(); # IPP configuration 39 39 40 my ($warp_id, $camera, $dbname, $workdir, $ no_update, $no_op);40 my ($warp_id, $camera, $dbname, $workdir, $verbose, $no_update, $no_op); 41 41 GetOptions( 42 42 'warp_id|i=s' => \$warp_id, # Warp identifier … … 44 44 'dbname|d=s' => \$dbname, # Database name 45 45 'workdir|w=s' => \$workdir, # Working directory, for output files 46 'verbose' => \$verbose, # Print to stdout 46 47 'no-update' => \$no_update, # Don't update the database? 47 48 'no-op' => \$no_op, # Don't do any operations … … 76 77 $command .= " -dbname $dbname" if defined $dbname; 77 78 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 78 run(command => $command, verbose => 1);79 run(command => $command, verbose => $verbose); 79 80 unless ($success) { 80 81 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); … … 95 96 my $command = "$ppConfigDump -camera $camera -dump-recipe PSWARP -"; 96 97 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 97 run(command => $command, verbose => 1);98 run(command => $command, verbose => $verbose); 98 99 unless ($success) { 99 100 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); … … 122 123 123 124 my $tess_dir = $ipprc->convert_filename_absolute( $$tessellations{$tess_id} ); # Catdir for DVO 124 print STDERR "tessellation: $tess_id, $tess_dir\n";125 125 126 126 my %unique_skycells = (); # Identified skycells (all unique by virtue of hash property) … … 153 153 } 154 154 my @matchlist = get_overlaps($astromFile, $tess_dir, $astromAccept); # List of overlaps 155 if (! @matchlist ) {155 if (! @matchlist and $verbose) { 156 156 print "skipping $astromFile\n"; 157 157 } … … 206 206 207 207 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 208 run(command => $command, verbose => 1);208 run(command => $command, verbose => $verbose); 209 209 unless ($success) { 210 210 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); … … 236 236 $command .= ' -accept-astrom' if $accept; 237 237 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 238 run(command => $command, verbose => 1);238 run(command => $command, verbose => $verbose); 239 239 if (!$success) { 240 240 print "missing astrometry for $filename\n"; … … 273 273 274 274 $entry = $filename . '\[' . $extname . '\]'; 275 print STDERR "entry: $entry, class: $class_id, extname: $extname, chiproot: $chipRoot\n" ;275 print STDERR "entry: $entry, class: $class_id, extname: $extname, chiproot: $chipRoot\n" if $verbose; 276 276 } else { 277 277 $entry = $filename; 278 print STDERR "entry: $entry\n" ;278 print STDERR "entry: $entry\n" if $verbose; 279 279 } 280 280 281 281 my @skycells = &select_skycells($entry, @$matches); # Matching skycells 282 282 my $Nskycells = @skycells; 283 printf STDERR "Nskycells: $Nskycells\n" ;283 printf STDERR "Nskycells: $Nskycells\n" if $verbose; 284 284 foreach my $skycell (@skycells) { 285 285 my %overlap = (); # Overlap information for warptool … … 291 291 push @$overlaps, \%overlap; 292 292 293 printf STDERR "overlap: %s : %s , %s\n", $skycell, $imfile->{cam_id}, $imfile->{class_id} ;293 printf STDERR "overlap: %s : %s , %s\n", $skycell, $imfile->{cam_id}, $imfile->{class_id} if $verbose; 294 294 295 295 $unique_skycells->{$skycell} = 1; -
trunk/ippScripts/scripts/warp_skycell.pl
r16247 r16308 37 37 my $ipprc = PS::IPP::Config->new(); # IPP configuration 38 38 39 my ($warp_id, $skycell_id, $tess_id, $camera, $dbname, $workdir, $ no_update, $no_op, $save_temps);39 my ($warp_id, $skycell_id, $tess_id, $camera, $dbname, $workdir, $verbose, $no_update, $no_op, $save_temps); 40 40 GetOptions( 41 41 'warp_id|i=s' => \$warp_id, # Warp identifier … … 45 45 'dbname|d=s' => \$dbname, # Database name 46 46 'workdir|w=s' => \$workdir, # Working directory, for output files 47 'verbose' => \$verbose, # Print to stdout 47 48 'no-update' => \$no_update, # Don't update the database? 48 49 'no-op' => \$no_op, # Don't do any operations? … … 88 89 $command .= " -dbname $dbname" if defined $dbname; 89 90 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 90 run(command => $command, verbose => 1);91 run(command => $command, verbose => $verbose); 91 92 unless ($success) { 92 93 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); … … 105 106 my $command = "$ppConfigDump -camera $camera -dump-recipe PSWARP -"; 106 107 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 107 run(command => $command, verbose => 1);108 run(command => $command, verbose => $verbose); 108 109 unless ($success) { 109 110 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); … … 190 191 191 192 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 192 run(command => $command, verbose => 1);193 run(command => $command, verbose => $verbose); 193 194 unless ($success) { 194 195 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); … … 229 230 230 231 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 231 run(command => $command, verbose => 1);232 run(command => $command, verbose => $verbose); 232 233 unless ($success) { 233 234 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); … … 249 250 my $command = "$warptool -addwarped -warp_id $warp_id -skycell_id $skycell_id -tess_id $tess_id -code $exit_code"; 250 251 $command .= " -dbname $dbname" if defined $dbname; 251 run(command => $command, verbose => 1);252 run(command => $command, verbose => $verbose); 252 253 } 253 254 exit $exit_code;
Note:
See TracChangeset
for help on using the changeset viewer.
