Changeset 33575
- Timestamp:
- Mar 21, 2012, 11:32:34 AM (14 years ago)
- File:
-
- 1 edited
-
trunk/tools/dlapstacks (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/dlapstacks
r33524 r33575 30 30 my ($singleframe, $fitToFrame, $deasin, $save_temps, $data_group); 31 31 32 # XXX: get this from the ipprc 32 33 my $temproot = '/local/ipp/tmp'; 33 34 my $outdir; … … 201 202 $imagesize = 680; 202 203 } 204 my $tempdir; 205 if (!$outdir) { 206 $tempdir = tempdir ("$temproot/dlapstacks.temp.XXXX", CLEANUP => !$save_temps); 207 } 203 208 if ($deasin) { 204 209 if ($outdir) { 205 print "Saving deasined files to $outdir\n" ;210 print "Saving deasined files to $outdir\n" if $verbose; 206 211 # user specified output directory save the files there 207 212 if (!-d $outdir) { … … 210 215 } else { 211 216 # otherwise use a temporary directory 212 $outdir = tempdir ("$temproot/dlapstacks.temp.XXXX", CLEANUP => !$save_temps);213 217 print "deasined files will be saved to $outdir\n" if $save_temps; 218 $outdir = $tempdir; 214 219 } 215 220 } … … 222 227 my $filename = $ipprc->file_resolve($pathname); 223 228 next if !$filename; 224 # run ppstamp to undo the asin scaling. The output from ppstamp is linear F32 images 229 230 # prefix file name with filter 231 # this will either be the ppstamp output filename or we 232 # will put a symlink to it in tempdir 233 my $base = basename($pathname); 234 my $filt = substr $f->{filter}, 0, 1; 235 $base = "$filt.$base"; 225 236 if ($deasin) { 226 my $base = basename($pathname); 237 # run ppstamp to undo the asin scaling. The output from ppstamp is linear F32 images 238 239 # drop the .fits for the output path for ppstamp 227 240 my $destbase = $base; 228 229 # drop the .fits for the output path for ppstamp230 241 $destbase =~ s/\.fits//g; 242 231 243 232 244 my $command = "$ppstamp -wholefile -file $filename $outdir/$destbase"; … … 241 253 # new filename for ds9 242 254 $filename = "$outdir/$base"; 255 } else { 256 my $nebname = $filename; 257 $filename = "$tempdir/$base"; 258 symlink $nebname, $filename or die "failed to symlink $nebname"; 243 259 } 244 260
Note:
See TracChangeset
for help on using the changeset viewer.
