Changeset 13698 for trunk/ippScripts/scripts/diff_skycell.pl
- Timestamp:
- Jun 7, 2007, 9:45:27 AM (19 years ago)
- File:
-
- 1 edited
-
trunk/ippScripts/scripts/diff_skycell.pl (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
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;
Note:
See TracChangeset
for help on using the changeset viewer.
