Table of Contents

Name

snapfits - convert a snapshot file to a fits file.

Synopsis

snapfits in=snapshot out=fitsfile [parameter=value]

Description

snapfits converts a snapshot to a fits file, in the random groups format (See: xxx). See the section on ’FITS KEYWORDS’ below for a more detailed description. The kind of parameters written can be choosen with the options keyword (see below). The default is 7 (masses, positions and velocities for a 3-dimensional simulation).

Note: Only one snapshot can be written. The time of the snapshot is not saved yet.

Parameters

The following parameters are the ones whose meaning is different from the one in snapplot:
in=in-file
input file, must be in snapshot(5NEMO) format [no default].
out=out-file
output file, will be in fits(5NEMO) format [no default].
options=opt1[,opt2...]
List of options, separated by comma’s (no spaces), of the items to be saved in the output FITS file. They can be any combination of: mass, phase (pos, vel), phi and acc. Note that the order of items written is fixed, as described above. Even for options=pos,mass the mass will be preceded by the 2/3 positions of the particle. [default: mass,phase].
comment=comment
One comment line with up to about [70] characters can be used to identify this FITS file. [default: empty].

Fits Keywords

The data is written using the random groups format in FITS without any primary data matrix. Hence NAXIS1=0, PGROUP the number of items per particle to be output (7 being the default), and GCOUNT the total number of bodies in a snapshot. The external format of the data is IEEE floating point (BITPIX = -32 or -64, depending on precision required). There will be no scaling (default PZEROnnn and PSCALnnn), whereas the axes are labeled using the PTYPEnnn keyword. They can be any of MASS, POSn, VELn, PHI and ACCn (n=1,..NDIM).

Bugs

There is really no use for this program, since the general way to transport data is using the general ascii format (see atos(1NEMO) or snapprint(1NEMO) ) or ascii structured files (see tsf(1NEMO) ). For large amounts of datafiles this fits format may actually become useful. It was merely created for the authors amusement and to show how the FITS format could be used to export N-body data.

There is no program fitssnap yet. As the need arises, and this fits-i/o format becomes popular, the author may be poked to create one.

See Also

atos(1NEMO) , stoa(1NEMO) , tsf(1NEMO) , rsf(1NEMO) , snapprint(1NEMO)

Author

Peter Teuben

Files


src/pjt/image    snapfits.c, snapfits.1

Update History


19-mar-90    V1.0: Created    PJT


Table of Contents