#!/bin/csh -f
# this script recomputes the WCS headers on the given *.fth and/or *.fts files.

if ($#argv < 1) then
    echo "Usage: *.fts and/or *.fth files"
    exit 1
endif

foreach f ($argv)
    if ($f =~ *.fts) then
	wcs -ow $f
    else
	fdecompress -r $f
	wcs -ow $f:r.fts
	fcompress -r -s 50 $f:r.fts
    endif
end

exit 0
