> Yes, my data is in a FITS file. So I fist use FITS2NDF convert it to NDF
> file, then use FINDCLUMPS to find clumps and get an output
> NDF file. I then convert it to FITS file with NDF2FITS.
As you've enabled CONVERT, FINDCLUMPS should be able to process the FITS
file (it does the format conversion on the fly recognised by the file
extension). However, converting manually gives you easier control of
the FITS2NDF and NDF2FITS defaulted parameters.
> As you said, there are some HISTORY and also TAB in original FITS file.
KAPPA offers a number of ways of editing the headers. The FITSEDIT
command lets you edit the headers in the NDF using your favourite editor
defined by environment variable EDITOR.
If you have lots of these illegal headers you likely want an automated
edit. There is FITSMOD, but it's not so convenient applying to multiply
occuring keywords like HISTORY. You can specify that FITSMOD editing
applies to nth HISTORY header. Provided the offending HISTORY line is
always in the same order amongst HISTORY headers FITSMOD will work fine.
Otherwise extract the headers to a text file with FITSLIST. Edit the
text file using a command-line editor like sed to perform the
replacement on the line containing a recognised string. Then import the
modified text file with FITSTEXT. This also validates your headers.
Malcolm
|