WCSTools programs

newfits
Examples

1. Create Simple Header

The command
$ newfits null.fits
creates a dataless file having the follow header:
SIMPLE  =                    T
BITPIX  =                    0
NAXIS   =                    2
NAXIS1  =                  100
NAXIS2  =                  100
COMMENT  FITS (Flexible Image Transport System) format is defined in 'Astronomy
COMMENT  and Astrophysics' vol 376, page 359; bibcode 2001A&A...376..359H.
END

2. Create Header with WCS

The command
$ newfits -j 10:00 10:00 -p 0.5 -s 1024 1024 null.fits
creates a dataless file having the follow header:
SIMPLE  =                    T
BITPIX  =                    0
NAXIS   =                    2
NAXIS1  =                 1024
NAXIS2  =                 1024
CRVAL1  =         150.00000000
CRVAL2  =          10.00000000
RA      = '10:00:00.000'
DEC     = '+10:00:00.00'
EPOCH   =                 2000
EQUINOX =                 2000
RADECSYS= 'FK5     '
CRPIX1  =              512.500
CRPIX2  =              512.500
SECPIX  =              0.50000
CDELT1  =          -0.00013889
CDELT2  =           0.00013889
CTYPE1  = 'RA---TAN'
CTYPE2  = 'DEC--TAN'
CD1_1   =         -0.000138890
CD1_2   =          0.000000000
CD2_1   =          0.000000000
CD2_2   =          0.000138890
COMMENT  FITS (Flexible Image Transport System) format is defined in 'Astronomy
COMMENT  and Astrophysics' vol 376, page 359; bibcode 2001A&A...376..359H.
END

3. Create Simple Blank Image File

The command
$ newfits -o 16 null.fits
creates the FITS file null.fits full of zeroes with the following header:
SIMPLE  =                    T
BITPIX  =                   16
NAXIS   =                    2
NAXIS1  =                  100
NAXIS2  =                  100
COMMENT  FITS (Flexible Image Transport System) format is defined in 'Astronomy
COMMENT  and Astrophysics' vol 376, page 359; bibcode 2001A&A...376..359H.
END

3. Create FITS File with Data

The command
$ newfits -o 16 -s 100 100 -i test.data+4 test.fits
creates the FITS file test.fits filled with the contents of the file test.data except for the first:
SIMPLE  =                    T
BITPIX  =                   16
NAXIS   =                    2
NAXIS1  =                  100
NAXIS2  =                  100
HISTORY  Pixels from file test.data
COMMENT  FITS (Flexible Image Transport System) format is defined in 'Astronomy
COMMENT  and Astrophysics' vol 376, page 359; bibcode 2001A&A...376..359H.
END

Last updated 20 April 2010 by Doug Mink

SAO TDC [WCSTools programs]