Changeset 19652
- Timestamp:
- Sep 22, 2008, 3:48:05 PM (18 years ago)
- Location:
- trunk/ippScripts/scripts
- Files:
-
- 6 edited
-
camera_exp.pl (modified) (2 diffs)
-
detrend_norm_exp.pl (modified) (5 diffs)
-
detrend_process_exp.pl (modified) (5 diffs)
-
detrend_process_imfile.pl (modified) (4 diffs)
-
detrend_resid_exp.pl (modified) (7 diffs)
-
detrend_resid_imfile.pl (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/camera_exp.pl
r19561 r19652 221 221 # Make the jpeg for binning 1 222 222 if ($run_state eq 'new') { 223 my $command = "$ppImage -list $list1Name $outroot -recipe PPIMAGE $recipe1"; # Command to run 223 my $command = "$ppImage -list $list1Name $outroot"; # Command to run 224 $command .= " -recipe PPIMAGE $recipe1"; 224 225 $command .= " -dbname $dbname" if defined $dbname; 225 226 … … 235 236 # Make the jpeg for binning 2 236 237 if ($run_state eq 'new') { 237 my $command = "$ppImage -list $list2Name $outroot -recipe PPIMAGE $recipe2"; # Command to run 238 my $command = "$ppImage -list $list2Name $outroot"; # Command to run 239 $command .= " -recipe PPIMAGE $recipe2" 238 240 $command .= " -dbname $dbname" if defined $dbname; 239 241 -
trunk/ippScripts/scripts/detrend_norm_exp.pl
r19261 r19652 59 59 # Recipes to use based on reduction class 60 60 $reduction = 'DETREND' unless defined $reduction; 61 62 my $recipe1 = $ipprc->reduction($reduction, 'JPEG_BIN1_IMAGE_' . uc($det_type)); # Recipe to use 63 &my_die("Unrecognised detrend type: $det_type", $det_id, $iter, $PS_EXIT_PROG_ERROR) unless defined $recipe1; 64 65 my $recipe2 = $ipprc->reduction($reduction, 'JPEG_BIN2_IMAGE_' . uc($det_type)); # Recipe to use 66 &my_die("Unrecognised detrend type: $det_type", $det_id, $iter, $PS_EXIT_PROG_ERROR) unless defined $recipe2; 61 my $recipe = $ipprc->reduction($reduction, uc($det_type) . '_JPEG_IMAGE'); 62 &my_die("Unrecognised detrend type: $det_type", $det_id, $iter, $PS_EXIT_PROG_ERROR) unless defined $recipe; 67 63 68 64 # values to extract from output metadata and the stats to calculate … … 94 90 $command = "$dettool -normalizedimfile"; # Command to run 95 91 $command .= " -det_id $det_id"; 96 $command .= " -iteration $iter"; 92 $command .= " -iteration $iter"; 97 93 $command .= " -dbname $dbname" if defined $dbname; 98 94 ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = … … 140 136 unless ($no_op) { 141 137 # Make the jpeg for binning 1 142 $command = "$ppImage -list $list1Name $outroot -recipe PPIMAGE $recipe1"; # Command to run 138 $command = "$ppImage -list $list1Name $outroot"; # Command to run 139 $command .= " -recipe PPIMAGE PPIMAGE_N"; 140 $command .= " -recipe JPEG $recipe"; 143 141 $command .= " -dbname $dbname" if defined $dbname; 144 142 ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = … … 147 145 148 146 # Make the jpeg for binning 2 149 $command = "$ppImage -list $list2Name $outroot -recipe PPIMAGE $recipe2"; # Command to run 147 $command = "$ppImage -list $list2Name $outroot"; # Command to run 148 $command .= " -recipe PPIMAGE PPIMAGE_N"; 149 $command .= " -recipe JPEG $recipe"; 150 150 $command .= " -dbname $dbname" if defined $dbname; 151 151 ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = … … 188 188 $command .= " -det_id $det_id"; 189 189 $command .= " -iteration $iter"; 190 $command .= " -path_base $outroot ";190 $command .= " -path_base $outroot "; 191 191 $command .= " -code $exit_code"; 192 192 $command .= " -dbname $dbname" if defined $dbname; -
trunk/ippScripts/scripts/detrend_process_exp.pl
r19261 r19652 57 57 58 58 if ($redirect) { 59 my $logDest = $ipprc->filename("LOG.EXP", $outroot, "NONE") 59 my $logDest = $ipprc->filename("LOG.EXP", $outroot, "NONE") 60 60 or &my_die("Missing entry in file rules", $det_id, $exp_id, $PS_EXIT_CONFIG_ERROR); 61 61 $ipprc->redirect_output($logDest); … … 65 65 $reduction = 'DETREND' unless defined $reduction; 66 66 67 my $recipe1 = $ipprc->reduction($reduction, 'JPEG_BIN1_IMAGE_' . uc($det_type)); # Recipe to use 68 &my_die("Unrecognised detrend type: $det_type", $det_id, $exp_id, $PS_EXIT_PROG_ERROR) unless defined $recipe1; 69 70 my $recipe2 = $ipprc->reduction($reduction, 'JPEG_BIN2_IMAGE_' . uc($det_type)); # Recipe to use 71 &my_die("Unrecognised detrend type: $det_type", $det_id, $exp_id, $PS_EXIT_PROG_ERROR) unless defined $recipe2; 67 my $recipe = $ipprc->reduction($reduction, uc($det_type) . '_JPEG_IMAGE'); # Recipe to use 68 &my_die("Unrecognised detrend type: $det_type", $det_id, $exp_id, $PS_EXIT_PROG_ERROR) unless defined $recipe; 72 69 73 70 # values to extract from output metadata and the stats to calculate … … 144 141 unless ($no_op) { 145 142 # Make the jpeg for binning 1 146 $command = "$ppImage -list $list1Name $outroot -recipe PPIMAGE $recipe1"; # Command to run 143 $command = "$ppImage -list $list1Name $outroot"; # Command to run 144 $command .= " -recipe PPIMAGE PPIMAGE_N"; 145 $command .= " -recipe JPEG $recipe"; 147 146 $command .= " -dbname $dbname" if defined $dbname; 148 147 ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = … … 155 154 156 155 # Make the jpeg for binning 2 157 $command = "$ppImage -list $list2Name $outroot -recipe PPIMAGE $recipe2"; # Command to run 156 $command = "$ppImage -list $list2Name $outroot"; # Command to run 157 $command .= " -recipe PPIMAGE PPIMAGE_N"; 158 $command .= " -recipe JPEG $recipe"; 158 159 $command .= " -dbname $dbname" if defined $dbname; 159 160 ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = … … 200 201 $command .= " -exp_id $exp_id"; 201 202 $command .= " -code $exit_code"; 202 $command .= " -path_base $outroot";203 $command .= " -path_base $outroot"; 203 204 $command .= " -dbname $dbname" if defined $dbname; 204 205 system ($command); -
trunk/ippScripts/scripts/detrend_process_imfile.pl
r19127 r19652 37 37 'dbname|d=s' => \$dbname, # Database name 38 38 'reduction=s' => \$reduction, # Reduction class 39 'threads=s' => \$threads, # Number of threads to use for ppImage39 'threads=s' => \$threads, # Number of threads to use for ppImage 40 40 'verbose' => \$verbose, # Print to stdout 41 41 'no-update' => \$no_update, … … 65 65 # Recipes to use as a function of detrend type 66 66 $reduction = "DETREND" unless defined $reduction; 67 my $recipe = $ipprc->reduction($reduction, uc($det_type) . '_PROCESS'); # Recipe name to use 67 my $ppimage_recipe = $ipprc->reduction($reduction, uc($det_type) . '_PROCESS'); # Recipe name for ppImage 68 my $jpeg_recipe = $ipprc->reduction($reduction, uc($det_type) . '_JPEG_IMAGE'); # Recipe name for JPEG 68 69 69 70 # values to extract from output metadata and the stats to calculate … … 104 105 unless ($no_op) { 105 106 my $command = "$ppImage -file $input_uri $outroot"; 106 $command .= " -recipe PPIMAGE $recipe"; 107 $command .= " -recipe PPIMAGE $ppimage_recipe"; 108 $command .= " -recipe JPEG $jpeg_recipe"; 107 109 $command .= " -recipe PPSTATS CHIPSTATS"; 108 110 $command .= " -stats $outputStats"; … … 175 177 $command .= " -exp_id $exp_id"; 176 178 $command .= " -class_id $class_id"; 177 $command .= " -path_base $outroot";179 $command .= " -path_base $outroot"; 178 180 $command .= " -code $exit_code"; 179 181 $command .= " -dbname $dbname" if defined $dbname; -
trunk/ippScripts/scripts/detrend_resid_exp.pl
r19627 r19652 82 82 $reduction = 'DETREND' unless defined $reduction; 83 83 84 my $recipe1 = $ipprc->reduction($reduction, 'JPEG_BIN1_RESID_' . uc($det_type)); # Recipe to use 85 &my_die("Unrecognised detrend type: $det_type", $det_id, $iter, $PS_EXIT_PROG_ERROR) unless defined $recipe1; 86 87 my $recipe2 = $ipprc->reduction($reduction, 'JPEG_BIN2_RESID_' . uc($det_type)); # Recipe to use 88 &my_die("Unrecognised detrend type: $det_type", $det_id, $iter, $PS_EXIT_PROG_ERROR) unless defined $recipe2; 84 my $recipe = $ipprc->reduction($reduction, uc($det_type) . '_JPEG_RESID'); # Recipe to use 85 &my_die("Unrecognised detrend type: $det_type", $det_id, $iter, $PS_EXIT_PROG_ERROR) unless defined $recipe; 89 86 90 87 # Look for programs we need … … 129 126 my ($statFile, $statName) = tempfile( "/tmp/$exp_tag.detresid.$det_id.$iter.stats.XXXX", UNLINK => !$save_temps ); 130 127 foreach my $line (@$stdout_buf) { 131 print $statFile $line;128 print $statFile $line; 132 129 } 133 130 close $statFile; … … 143 140 144 141 foreach my $line (@$stdout_buf) { 145 $cmdflags .= " $line";142 $cmdflags .= " $line"; 146 143 } 147 144 print "cmdflags: $cmdflags\n"; … … 173 170 unless ($no_op) { 174 171 # Make the jpeg for binning 1 175 $command = "$ppImage -list $list1Name $outroot -recipe PPIMAGE $recipe1"; # Command to run 172 $command = "$ppImage -list $list1Name $outroot"; # Command to run 173 $command .= " -recipe PPIMAGE PPIMAGE_N"; 174 $comamnd .= " -recipe JPEG $recipe"; 176 175 $command .= " -dbname $dbname" if defined $dbname; 177 176 ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = … … 184 183 185 184 # Make the jpeg for binning 2 186 $command = "$ppImage -list $list2Name $outroot -recipe PPIMAGE $recipe2"; # Command to run 185 $command = "$ppImage -list $list2Name $outroot"; # Command to run 186 $command .= " -recipe PPIMAGE PPIMAGE_N"; 187 $command .= " -recipe JPEG $recipe"; 187 188 $command .= " -dbname $dbname" if defined $dbname; 188 189 ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = … … 530 531 531 532 532 sub value_for_flag 533 sub value_for_flag 533 534 { 534 535 my $cmdflags = shift; … … 537 538 my $value = 0.0; 538 539 if ($cmdflags =~ m|$flag|) { 539 ($value) = $cmdflags =~ m|$flag\s+(\S+)|;540 ($value) = $cmdflags =~ m|$flag\s+(\S+)|; 540 541 } 541 542 $value; -
trunk/ippScripts/scripts/detrend_resid_imfile.pl
r19642 r19652 44 44 'dbname|d=s' => \$dbname, # Database name 45 45 'reduction=s' => \$reduction, # Reduction class 46 'threads=s' => \$threads, # Number of threads to use for ppImage46 'threads=s' => \$threads, # Number of threads to use for ppImage 47 47 'verbose' => \$verbose, # Print to stdout 48 48 'no-update' => \$no_update, … … 87 87 88 88 print "raw recipe: $recipe\n"; 89 $recipe = $ipprc->reduction($reduction, $recipe); 89 $ppimage_recipe = $ipprc->reduction($reduction, $recipe); 90 $jpeg_recipe = $ipprc->reduction($reduction, uc($det_type) . '_JPEG_RESID'; 90 91 print "real recipe: $recipe\n"; 91 92 92 93 # Flags to specify the particular detrend to use 93 94 use constant DETRENDS => { 94 'bias' => '-bias', # Specify the bias frame95 'dark' => '-dark', # Specify the dark frame95 'bias' => '-bias', # Specify the bias frame 96 'dark' => '-dark', # Specify the dark frame 96 97 'dark_premask' => '-dark', # Specify the dark frame 97 'shutter' => '-shutter', # Specify the shutter frame98 'shutter' => '-shutter', # Specify the shutter frame 98 99 'flat_premask' => '-flat', # Specify the flat frame 99 100 'domeflat_premask' => '-flat', # Specify the flat frame … … 102 103 'domeflat_raw' => '-flat', # Specify the flat frame 103 104 'skyflat_raw' => '-flat', # Specify the flat frame 104 'flat' => '-flat', # Specify the flat frame105 'domeflat' => '-flat', # Specify the flat frame106 'skyflat' => '-flat', # Specify the flat frame107 'fringe' => '-fringe', # Specify the fringe frame108 'mask' => '-mask', # Specify the mask frame109 'darkmask' => '-mask', # Specify the mask frame110 'flatmask' => '-mask', # Specify the mask frame105 'flat' => '-flat', # Specify the flat frame 106 'domeflat' => '-flat', # Specify the flat frame 107 'skyflat' => '-flat', # Specify the flat frame 108 'fringe' => '-fringe', # Specify the fringe frame 109 'mask' => '-mask', # Specify the mask frame 110 'darkmask' => '-mask', # Specify the mask frame 111 'flatmask' => '-mask', # Specify the mask frame 111 112 }; 112 113 … … 146 147 unless ($no_op) { 147 148 my $command = "$ppImage -file $input_uri $outroot"; 148 $command .= " -recipe PPIMAGE $recipe"; 149 $command .= " -recipe PPIMAGE $ppimage_recipe"; 150 $command .= " -recipe JPEG $jpeg_recipe"; 149 151 $command .= " -recipe PPSTATS RESIDUAL"; 150 152 $command .= " -F PPIMAGE.OUTPUT PPIMAGE.OUTPUT.RESID"; … … 235 237 $command .= " -det_id $det_id"; 236 238 $command .= " -iteration $iter"; 237 $command .= " -ref_det_id $ref_det_id";238 $command .= " -ref_iter $ref_iter";239 $command .= " -ref_det_id $ref_det_id"; 240 $command .= " -ref_iter $ref_iter"; 239 241 $command .= " -exp_id $exp_id"; 240 242 $command .= " -class_id $class_id"; 241 $command .= " -path_base $outroot";243 $command .= " -path_base $outroot"; 242 244 $command .= " -code $exit_code"; 243 245 $command .= " -dbname $dbname" if defined $dbname;
Note:
See TracChangeset
for help on using the changeset viewer.
