HTML automatically generated with rman
Table of Contents
tabfits - convert ascii table into FITS images
tabfits [parameter=value]
tabfits converts table-like files to FITS HDUs. Headers in the
table are optional, but should be the usual #-comment lines before the real
numeric data start. The data can be either taken from one specific column,
or read continuesly from all columns, discarding any structure in the data,
i.e. reading it row by row. The image size is given as parameters nx=, ny=
and nz=, on the command line, or else obtained from the header from the
usual FITS-like NAXISn keywords.
For a proper astronomical WCS you will need
to make sure that your FITS style header (see EXAMPLES below) has the correct
CTYPE (see e.g. worldpos(3NEMO)
). The default is currently observer unfriendly
(theory friendly).
It is currently not possible to interchange the axes,
you have to use ccdflip(1NEMO)
for this.
The following parameters
are recognized in any order if the keyword is also given:
- in=
- Input table
file with options commented directives for fits header conversion. No default.
- out=
- Output fits file. No default.
- dcol=
- Column for data. Use 0 if all data
(columns) are to be read continuesly. [0]
- nx=
- X-Size of data, or else specify
in the ascii header as NAXIS1
- ny=
- Y-Size of data, or else specify in the
ascii header as NAXIS2
- nz=
- Z-Size of data, or else specify in the ascii
header as NAXIS3.
- nmax=
- Allocation space for piped I/O.
- scale=
- Scale factor
by which all incoming data are multiplied for output in the fits file. Default:
1
- wcs=t|f
- Enforce a proper FITS style WCS definition. For this the FITS header
description (see ) will need to have a valid CTYPE1 and CTYPE2 to properly
handle the sky coordinates. There is no mechanism to handle spectral axes.
Default: f.
All non-standard fits header keywords are copied verbosely,
so be sure to follow the FITS rules in their formatting.
Here is
an example of an input table:
# NAXIS1 = 25
# NAXIS2 = 29
# NAXIS3 = 1
# CDELT1 = 0.25000000000000
# CDELT2 = 0.25000000000000
# CRVAL1 = 1.0000000000000
# CRVAL2 = -0.25000000000000
# CTYPE1 = ’Log n (/cm**3)’
# CTYPE2 = ’Log G_0’
# CRPIX1 = 1.0000000000000
# CRPIX2 = 1.0000000000000
#
# / Model Parameters:
# VERSION = 1.00000
# DVDOP = 1.50000 / Turbulent Doppler Velocity (km/s)
1.52152E-06
1.56927E-06
1.57882E-06
1.51197E-06
1.34486E-06
An example how to create (some kind of) FITS header that might be useful
for tabfits can be created in the following two step procedure:
ccdgen out=- size=512,512,1 | ccdsky - - | ccdfits - /tmp/toy.fits
fitshead /tmp/toy.fits | awk ’{printf("# %s0,$0)}’ > /tmp/toy.fitshead
tabfits(1NEMO)
, tabmath(1NEMO)
, fits(5NEMO)
, wcs(1NEMO)
src/image/fits/tabfits.c source
code
Peter Teuben
4-dec-98 V1.0 created for Wolfire’s project PJT
17-dec-98 V2.0 nxy= is now nx=,ny=; for Harris’ project too PJT
5-jan-99 V2.0a fixed header formatting bug PJT
9-jul-00 V3.1 allow dcol=0 PJT
21-sep-05 V4.0 add wcs= to deal with real astronomers (lost?) PJT
7-nov-2013 V3.3 add scale= PJT
13-feb-2020 V3.4 promote COMMENT and HISTORY from commented header PJT
Table of Contents