Changeset 13698
- Timestamp:
- Jun 7, 2007, 9:45:27 AM (19 years ago)
- Location:
- trunk/ippScripts/scripts
- Files:
-
- 16 edited
-
camera_exp.pl (modified) (1 diff)
-
chip_imfile.pl (modified) (4 diffs)
-
detrend_norm_apply.pl (modified) (1 diff)
-
detrend_norm_calc.pl (modified) (1 diff)
-
detrend_norm_exp.pl (modified) (1 diff)
-
detrend_process_exp.pl (modified) (1 diff)
-
detrend_process_imfile.pl (modified) (1 diff)
-
detrend_reject_exp.pl (modified) (1 diff)
-
detrend_reject_imfile.pl (modified) (1 diff)
-
detrend_resid.pl (modified) (1 diff)
-
detrend_stack.pl (modified) (1 diff)
-
diff_skycell.pl (modified) (7 diffs)
-
register_exp.pl (modified) (1 diff)
-
register_imfile.pl (modified) (1 diff)
-
stack_skycell.pl (modified) (5 diffs)
-
warp_skycell.pl (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/camera_exp.pl
r13652 r13698 243 243 my $command = "$camtool -addprocessedexp -cam_id $cam_id -code $exit_code"; 244 244 $command .= " -dbname $dbname" if defined $dbname; 245 system ($command);245 ### system ($command); 246 246 } 247 247 exit $exit_code; -
trunk/ippScripts/scripts/chip_imfile.pl
r13652 r13698 77 77 $ppImage .= " -dbname $dbname" if defined $dbname; 78 78 79 &my_die("Couldn't find input file: $input\n", $chip_id, $class_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($input); 79 80 80 81 $workdir = caturi( $workdir, $exp_id ) if defined $workdir; … … 82 83 my $outputRoot = $ipprc->file_prepare( "$exp_id.chp$chip_id", $workdir, $input ); 83 84 my $outputImage = $ipprc->filename("PPIMAGE.OUTPUT", $outputRoot, $class_id); 85 my $outputMask = $ipprc->filename("PPIMAGE.OUTPUT.MASK", $outputRoot, $class_id); 84 86 my $outputBin1 = $ipprc->filename("PPIMAGE.BIN1", $outputRoot, $class_id); 85 87 my $outputBin2 = $ipprc->filename("PPIMAGE.BIN2", $outputRoot, $class_id); … … 101 103 &my_die("Unable to perform ppImage: $error_code", $chip_id, $class_id, $error_code); 102 104 } 103 &my_die("Couldn't find expected output file: $outputImage\n", $chip_id, $class_id, $PS_EXIT_SYS_ERROR) unless -f $ipprc->file_resolve($outputImage); 104 &my_die("Couldn't find expected output file: $outputBin1\n", $chip_id, $class_id, $PS_EXIT_SYS_ERROR) unless -f $ipprc->file_resolve($outputBin1); 105 &my_die("Couldn't find expected output file: $outputBin2\n", $chip_id, $class_id, $PS_EXIT_SYS_ERROR) unless -f $ipprc->file_resolve($outputBin2); 106 &my_die("Couldn't find expected output file: $outputStats\n", $chip_id, $class_id, $PS_EXIT_SYS_ERROR) unless -f $ipprc->file_resolve($outputStats); 105 &my_die("Couldn't find expected output file: $outputImage\n", $chip_id, $class_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputImage); 106 &my_die("Couldn't find expected output file: $outputMask\n", $chip_id, $class_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputMask); 107 &my_die("Couldn't find expected output file: $outputBin1\n", $chip_id, $class_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputBin1); 108 &my_die("Couldn't find expected output file: $outputBin2\n", $chip_id, $class_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputBin2); 109 &my_die("Couldn't find expected output file: $outputStats\n", $chip_id, $class_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputStats); 107 110 108 111 # Get the statistics on the processed image … … 159 162 $command .= " -uri $outputImage"; 160 163 $command .= " -dbname $dbname" if defined $dbname; 161 system ($command);164 ### system ($command); 162 165 } 163 166 exit $exit_code; -
trunk/ippScripts/scripts/detrend_norm_apply.pl
r13275 r13698 149 149 my $command = "$dettool -addnormalizedimfile -det_id $det_id -iteration $iter -class_id $class_id -code $exit_code"; 150 150 $command .= " -dbname $dbname" if defined $dbname; 151 system ($command);151 ### system ($command); 152 152 } 153 153 exit $exit_code; -
trunk/ippScripts/scripts/detrend_norm_calc.pl
r12800 r13698 204 204 my $command = "$dettool -addnormalizedstat -det_id $det_id -iteration $iter -code $exit_code"; 205 205 $command .= " -dbname $dbname" if defined $dbname; 206 system ($command);206 ### system ($command); 207 207 } 208 208 exit $exit_code; -
trunk/ippScripts/scripts/detrend_norm_exp.pl
r13590 r13698 202 202 my $command = "$dettool -addprocessedimfile -det_id $det_id -iter $iter -code $exit_code"; 203 203 $command .= " -dbname $dbname" if defined $dbname; 204 system ($command);204 ### system ($command); 205 205 } 206 206 exit $exit_code; -
trunk/ippScripts/scripts/detrend_process_exp.pl
r13680 r13698 212 212 my $command = "$dettool -addprocessedexp -det_id $det_id -exp_tag $exp_tag -code $exit_code"; 213 213 $command .= " -dbname $dbname" if defined $dbname; 214 system ($command);214 ### system ($command); 215 215 } 216 216 exit $exit_code; -
trunk/ippScripts/scripts/detrend_process_imfile.pl
r13680 r13698 154 154 my $command = "$dettool -addprocessedimfile -det_id $det_id -exp_tag $exp_tag -class_id $class_id -code $exit_code"; 155 155 $command .= " -dbname $dbname" if defined $dbname; 156 system ($command);156 ### system ($command); 157 157 } 158 158 exit $exit_code; -
trunk/ippScripts/scripts/detrend_reject_exp.pl
r13639 r13698 318 318 my $command = "$dettool -adddetrunsummary -det_id $det_id -iteration $iter -code $exit_code"; 319 319 $command .= " -dbname $dbname" if defined $dbname; 320 system ($command);320 ### system ($command); 321 321 } 322 322 exit $exit_code; -
trunk/ippScripts/scripts/detrend_reject_imfile.pl
r13683 r13698 394 394 my $command = "$dettool -addresidexp -det_id $det_id -iteration $iter -exp_tag $exp_tag -code $exit_code"; 395 395 $command .= " -dbname $dbname" if defined $dbname; 396 system ($command);396 ### system ($command); 397 397 } 398 398 exit $exit_code; -
trunk/ippScripts/scripts/detrend_resid.pl
r13683 r13698 217 217 my $command = "$dettool -addresidimfile -det_id $det_id -iteration $iter -exp_tag $exp_tag -class_id $class_id -code $exit_code"; 218 218 $command .= " -dbname $dbname" if defined $dbname; 219 system ($command);219 ### system ($command); 220 220 } 221 221 exit $exit_code; -
trunk/ippScripts/scripts/detrend_stack.pl
r13678 r13698 173 173 my $command = "$dettool -addstacked -det_id $det_id -iteration $iter -class_id $class_id -code $exit_code"; 174 174 $command .= " -dbname $dbname" if defined $dbname; 175 system ($command);175 ### system ($command); 176 176 } 177 177 exit $exit_code; -
trunk/ippScripts/scripts/diff_skycell.pl
r13663 r13698 80 80 81 81 # Identify the input and the template 82 my $input ; # Input file83 my $template ; # Template file82 my $input, $inputMask; # Input file and mask 83 my $template, $templateMask; # Template file and mask 84 84 my $tess_id; # Tesselation identifier 85 85 my $skycell_id; # Skycell identifier … … 88 88 if (defined $file->{template} and $file->{template}) { 89 89 $template = $file->{uri}; 90 $templateMask = $ipprc->filename("PSWARP.OUTPUT.MASK", $file->{path_base}); 90 91 } else { 91 92 $input = $file->{uri}; 93 $inputMask = $ipprc->filename("PSWARP.OUTPUT.MASK", $file->{path_base}); 92 94 } 93 95 if (defined $tess_id) { … … 115 117 $ipprc->define_camera($camera); 116 118 119 &my_die("Couldn't find input: $template", $diff_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($template); 120 &my_die("Couldn't find input: $templateMask", $diff_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($templateMask); 121 &my_die("Couldn't find input: $nput", $diff_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($input); 122 &my_die("Couldn't find input: $nputMask", $diff_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($inputMask); 117 123 118 124 # Get the output filenames 119 125 $workdir = caturi( $workdir, "tess_" . $tess_id, "sky_" . $skycell_id ) if defined $workdir; 120 126 my $outputRoot = $ipprc->file_prepare( "$tess_id.$skycell_id.dif$diff_id", $workdir, $input ); 121 my $outputName = $outputRoot . ".fits"; 122 my $bin1Name = $ipprc->filename("PPIMAGE.BIN1", $outputRoot); 123 my $bin2Name = $ipprc->filename("PPIMAGE.BIN2", $outputRoot); 127 my $outputName = $ipprc->filename("PPSUB.OUTPUT", $outputRoot); 128 my $outputMask = $ipprc->filename("PPSUB.OUTPUT.MASK", $outputRoot); 129 #my $bin1Name = $ipprc->filename("PPSUB.BIN1", $outputRoot); 130 #my $bin2Name = $ipprc->filename("PPSUB.BIN2", $outputRoot); 124 131 my $outputStats = $outputRoot . '.stats'; 125 132 … … 133 140 my $stats = PS::IPP::Metadata::Stats->new(); # Stats parser 134 141 unless ($no_op) { 135 my $command = "$ppSub $input $template $outputName "; # Command to run ppSub142 my $command = "$ppSub $input $template $outputName -inmask $inputMask -refmask $templateMask -stat $outputStats"; # Command to run ppSub 136 143 137 144 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = … … 141 148 &my_die("Unable to perform ppSub: $error_code", $diff_id, $error_code); 142 149 } 143 &my_die("Couldn't find expected output file: $outputName", $diff_id, $PS_EXIT_SYS_ERROR) unless -f $ipprc->file_resolve($outputName); 144 # &my_die("Couldn't find expected output file: $bin1Name", $diff_id, $PS_EXIT_SYS_ERROR) unless -f $ipprc->file_resolve($bin1Name); 145 # &my_die("Couldn't find expected output file: $bin2Name", $diff_id, $PS_EXIT_SYS_ERROR) unless -f $ipprc->file_resolve($bin2Name); 146 # &my_die("Couldn't find expected output file: $outputStats", $diff_id, $PS_EXIT_SYS_ERROR) unless -f $ipprc->file_resolve($outputStats); 150 &my_die("Couldn't find expected output file: $outputName", $diff_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputName); 151 &my_die("Couldn't find expected output file: $outputMask", $diff_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputMask); 152 # &my_die("Couldn't find expected output file: $bin1Name", $diff_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($bin1Name); 153 # &my_die("Couldn't find expected output file: $bin2Name", $diff_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($bin2Name); 154 &my_die("Couldn't find expected output file: $outputStats", $diff_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputStats); 147 155 148 156 # Get the statistics on the residual image … … 164 172 # Add the subtraction result 165 173 { 166 my $command = "$difftool -adddiffskyfile -diff_id $diff_id -uri $outputName "; #-path_base $outputRoot";174 my $command = "$difftool -adddiffskyfile -diff_id $diff_id -uri $outputName -path_base $outputRoot"; 167 175 $command .= " -bg $bg -bg_stdev $bg_stdev"; 168 176 $command .= " -dbname $dbname" if defined $dbname; … … 202 210 my $command = "$difftool -updaterun -diff_id $diff_id -state stop -code $exit_code"; 203 211 $command .= " -dbname $dbname" if defined $dbname; 204 system ($command);212 ### system ($command); 205 213 } 206 214 exit $exit_code; -
trunk/ippScripts/scripts/register_exp.pl
r13606 r13698 255 255 my $command = "$regtool -addprocessedexp -exp_tag $exp_tag -code $exit_code"; 256 256 $command .= " -dbname $dbname" if defined $dbname; 257 system($command);257 ### system($command); 258 258 } 259 259 exit $exit_code; -
trunk/ippScripts/scripts/register_imfile.pl
r13606 r13698 200 200 my $command = "$regtool -addprocessedimfile -exp_tag $exp_tag -class_id $class_id -code $exit_code"; 201 201 $command .= " -dbname $dbname" if defined $dbname; 202 system ($command);202 ### system ($command); 203 203 } 204 204 exit $exit_code; -
trunk/ippScripts/scripts/stack_skycell.pl
r13668 r13698 113 113 print $listFile "INPUT$num\tMETADATA\n"; 114 114 $num++; 115 print $listFile "\tIMAGE\tSTR\t" . $file->{uri} . "\n"; 115 116 my $image = $file->{uri}; # Image name 117 my $mask = $ipprc->filename( "PSWARP.OUTPUT.MASK", $file->{path_base} ); # Mask name 118 119 &my_die("Image $image does not exist", $stack_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists( $image ); 120 &my_die("Mask $mask does not exist", $stack_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists( $mask ); 121 122 print $listFile "\tIMAGE\tSTR\t" . $image . "\n"; 123 print $listFile "\tMASK\tSTR\t" . $mask . "\n"; 116 124 117 125 ### XXX NEED TO UPDATE THESE appropriately 118 # print $listFile "\tMASK\tSTR\t" . "NULL" . "\n";119 126 print $listFile "\tSEEING\tF32\t" . 1.0 . "\n"; 120 127 print $listFile "\tWEIGHT\tF32\t" . 1.0 . "\n"; … … 127 134 $workdir = caturi( $workdir, "tess_" . $tess_id, "sky_" . $skycell_id ) if defined $workdir; 128 135 my $outputRoot = $ipprc->file_prepare( "$tess_id.$skycell_id.stk$stack_id", $workdir, $$files[0]->{uri} ); 129 my $outputName = $outputRoot . ".fits"; 130 #my $bin1Name = $ipprc->filename("PPSTAC.BIN1", $outputRoot); 131 #my $bin2Name = $ipprc->filename("PPSTAC.BIN2", $outputRoot); 136 my $outputName = $ipprc->filename("PPSTACK.OUTPUT", $outputRoot); 137 my $outputMask = $ipprc->filename("PPSTACK.OUTPUT.MASK", $outputRoot); 138 #my $bin1Name = $ipprc->filename("PPSTACK.BIN1", $outputRoot); 139 #my $bin2Name = $ipprc->filename("PPSTACK.BIN2", $outputRoot); 132 140 my $outputStats = $outputRoot . '.stats'; 133 141 … … 143 151 &my_die("Unable to perform ppImage: $error_code", $stack_id, $error_code); 144 152 } 145 &my_die("Couldn't find expected output file: $outputName", $stack_id, $PS_EXIT_SYS_ERROR) unless -f $ipprc->file_resolve($outputName); 146 # &my_die("Couldn't find expected output file: $bin1Name", $stack_id, $PS_EXIT_SYS_ERROR) unless -f $ipprc->file_resolve($bin1Name); 147 # &my_die("Couldn't find expected output file: $bin2Name", $stack_id, $PS_EXIT_SYS_ERROR) unless -f $ipprc->file_resolve($bin2Name); 148 &my_die("Couldn't find expected output file: $outputStats", $stack_id, $PS_EXIT_SYS_ERROR) unless -f $ipprc->file_resolve($outputStats); 153 &my_die("Couldn't find expected output file: $outputName", $stack_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputName); 154 &my_die("Couldn't find expected output file: $outputMask", $stack_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputMask); 155 # &my_die("Couldn't find expected output file: $bin1Name", $stack_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($bin1Name); 156 # &my_die("Couldn't find expected output file: $bin2Name", $stack_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($bin2Name); 157 &my_die("Couldn't find expected output file: $outputStats", $stack_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputStats); 149 158 150 159 # Get the statistics on the stacked image … … 166 175 # Add the stack result 167 176 { 168 my $command = "$stacktool -addsumskyfile -stack_id $stack_id -uri $outputName "; #-path_base $outputRoot";177 my $command = "$stacktool -addsumskyfile -stack_id $stack_id -uri $outputName -path_base $outputRoot"; 169 178 $command .= " -bg $bg -bg_stdev $bg_stdev"; 170 179 $command .= " -dbname $dbname" if defined $dbname; … … 204 213 my $command = "$stacktool -updaterun -stack_id $stack_id -state stop -code $exit_code"; 205 214 $command .= " -dbname $dbname" if defined $dbname; 206 system ($command);215 ### system ($command); 207 216 } 208 217 exit $exit_code; -
trunk/ippScripts/scripts/warp_skycell.pl
r13275 r13698 88 88 my $outputRoot = $ipprc->file_prepare( "$tess_id.$skycell_id.wrp$warp_id", $workdir, $$imfiles[0]->{uri} ); 89 89 my $outputImage = $ipprc->filename("PSWARP.OUTPUT", $outputRoot, $skycell_id ); 90 my $outputMask = $ipprc->filename("PSWARP.OUTPUT.MASK", $outputRoot, $skycell_id); 90 91 my $outputBin1 = $ipprc->filename("PSWARP.BIN1", $outputRoot, $skycell_id ); 91 92 my $outputBin2 = $ipprc->filename("PSWARP.BIN2", $outputRoot, $skycell_id ); … … 94 95 95 96 # Get list of filenames 96 my ($listFile, $listName) = tempfile( "$tess_id.$skycell_id.wrp$warp_id.list.XXXX", UNLINK => 1); 97 my ($list1File, $list1Name) = tempfile( "$tess_id.$skycell_id.wrp$warp_id.image.list.XXXX", UNLINK => 1); 98 my ($list2File, $list2Name) = tempfile( "$tess_id.$skycell_id.wrp$warp_id.mask.list.XXXX", UNLINK => 1); 97 99 foreach my $imfile (@$imfiles) { 98 print $listFile ( $imfile->{uri} . "\n"); 100 my $image = $imfile->{uri}; # Image name 101 my $mask = $ipprc->filename("PPIMAGE.OUTPUT.MASK", $imfile->{path_base}, $imfile->{class_id}); # Mask name 102 &my_die("Couldn't find input file: $image", $warp_id, $skycell_id, $tess_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($image); 103 &my_die("Couldn't find input file: $mask", $warp_id, $skycell_id, $tess_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($mask); 104 105 print $list1File ( $image . "\n"); 106 print $list2File ( $mask . "\n"); 99 107 } 100 close $listFile; 108 close $list1File; 109 close $list2File; 101 110 102 111 # Run pswarp 103 112 my $stats = PS::IPP::Metadata::Stats->new(); # Stats parser 104 113 unless ($no_op) { 105 my $command = "$pswarp -list $list Name $outputRoot $skyFile -stat $outputStats"; # Command to run pswarp114 my $command = "$pswarp -list $list1Name -masklist $list2Name $outputRoot $skyFile -stat $outputStats"; # Command to run pswarp 106 115 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 107 116 run(command => $command, verbose => 1); … … 110 119 &my_die("Unable to perform pswarp: $error_code", $warp_id, $skycell_id, $error_code); 111 120 } 112 &my_die("Couldn't find expected output file: $outputImage", $warp_id, $skycell_id, $tess_id, $PS_EXIT_SYS_ERROR) unless -f $ipprc->file_resolve($outputImage); 113 &my_die("Couldn't find expected output file: $outputStats", $warp_id, $skycell_id, $tess_id, $PS_EXIT_SYS_ERROR) unless -f $ipprc->file_resolve($outputStats); 114 # &my_die("Couldn't find expected output file: $outputBin1", $warp_id, $skycell_id, $tess_id, $PS_EXIT_SYS_ERROR) unless -f $ipprc->file_resolve($outputBin1); 115 # &my_die("Couldn't find expected output file: $outputBin2", $warp_id, $skycell_id, $tess_id, $PS_EXIT_SYS_ERROR) unless -f $ipprc->file_resolve($outputBin2); 121 &my_die("Couldn't find expected output file: $outputImage", $warp_id, $skycell_id, $tess_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputImage); 122 &my_die("Couldn't find expected output file: $outputMask", $warp_id, $skycell_id, $tess_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputMask); 123 &my_die("Couldn't find expected output file: $outputStats", $warp_id, $skycell_id, $tess_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputStats); 124 # &my_die("Couldn't find expected output file: $outputBin1", $warp_id, $skycell_id, $tess_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputBin1); 125 # &my_die("Couldn't find expected output file: $outputBin2", $warp_id, $skycell_id, $tess_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputBin2); 116 126 117 127 # Get the statistics on the warped image … … 130 140 unless ($no_update) { 131 141 my $command = "$warptool -addwarped -warp_id $warp_id -skycell_id $skycell_id -tess_id $tess_id" . 132 " -uri $outputImage "; # -path_base $outputRoot"; # Command to run dettool142 " -uri $outputImage -path_base $outputRoot"; # -path_base $outputRoot"; # Command to run dettool 133 143 $command .= " -bg $bg -bg_stdev $bg_stdev"; 134 144 $command .= " -dbname $dbname" if defined $dbname; … … 155 165 my $command = "$warptool -addwarped -warp_id $warp_id -skycell_id $skycell_id -tess_id $tess_id -code $exit_code"; 156 166 $command .= " -dbname $dbname" if defined $dbname; 157 system ($command);167 ### system ($command); 158 168 } 159 169 exit $exit_code;
Note:
See TracChangeset
for help on using the changeset viewer.
