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