This HTML automatically generated with rman for NEMO
Table of Contents
tsf - type a structured file
tsf in=file [parameter=value]
...
tsf types the contents of a (binary) structured file (see
filestruct(5NEMO)
) in a human readable form on standard output. The type,
tag, dimensions (if any) and contents of all items are listed. The contents
of CharType items are printed directly; FloatType and DoubleType items
are printed in floating-point notation; all other types are printed in
octal for portability reasons (but see octal= below). XML format can optionally
be selected as well, but this is not been well exercised. A json mode has
been considered.
The following parameters are recognized in
order; they may be given in any order if the keyword is also given. Use
--help to confirm this man page is up to date.
- in=file
- Input data is read
from file, which must be a structured binary file.
No default.
- maxprec=t|f
- If true, print float and double item data with maximum
precision.
[Default: f].
- maxline=lines
- Limits the number of lines of data typed for
each item to lines. See also allline= below.
[Default: 4].
- allline=t|f
- Print all lines, it overrides any value of maxline.
If xml format selected, allline will always be set to t.
[Default: f].
- indent=set-indent
- Amount to indent contents of item-sets.
[Default: 2].
- margin=right-margin
- Righthand margin for output. Set this to
a high value to prevent possible string problems if file needs to be read
by rsf.
[Default: 72].
- item=item-name
- select only this item for output.
Default: all items selected.
- xml=t|f
- Output in xml mode? If not, old-style
human readable tsf mode is selected.
[Default: f].
- octal=t|f
- Output of (short/long) integers in octal? Old versions
used to exchange integer information in octal, we have now switched by
default to decimal (more human readable). By using octal=t you can force
this program back in the old mode. If take output of tsf to be read into
rsf, you now need to force octal=t.
[Default: f].
debug=2 reports values of MaxSetLen as defined in "filestruct.h".
For MaxTagLen and MaxVecDim see rsf(1NEMO)
.
Here is an N-body snapshot
of a Plummer sphere with 10 particles:
mkplummer - 10 seed=123 | tsf
-
char Headline[28] "init_xrandom: seed used 123" char History[37] "mkplummer
- 10 seed=123 VERSION=3.0c" set SnapShot set Parameters
int Nobj 10
double Time 0.00000
tes
set Particles
int CoordSystem 66306
double Mass[10] 0.100000 0.100000 0.100000 0.100000 0.100000
0.100000 0.100000 0.100000 0.100000 0.100000
double PhaseSpace[10][2][3] -0.609486 -0.221687 -0.450963
-0.0766784 -0.209397 0.396561 4.80925 -0.486182 -1.52575
0.418474 0.117766 0.230193 0.545314 0.0795464 0.0632245
0.0867019 -0.109128 -0.282036 0.377209 -0.213318 -0.0118330
. . .
tes
tes
list brief contents of a binary structured file
% tsf {{path/to/file}}
list more
% tsf {{path/to/file}}
- Show contents of a binary structured
file in brief format
tsf {{file}}
- Show contents of a binary structured
file, showing all lines, and in full precision
tsf {{file}} True allline=t
The algorithm for implementing maxline is crude.
If indent= and
margin= are choosen too large, resp. too small, they can bump into each
other and cause illegable output, which cannot be read by rsf(1NEMO)
either.
ls(1v)
, file(1)
, rsf(1NEMO)
, csf(1NEMO)
, qsf(1NEMO)
, bsf(1NEMO)
,
mkplummer(1NEMO)
, filestruct(3NEMO)
, filestruct(5NEMO)
Joshua E.
Barnes.
xx-xxx-86 V1.0 original version JEB
xx-apr-88 V2.0 new filestruct package JEB
9-dec-90 V2.3 helpvec and other minor things PJT
21-mar-01 V2.7 experimental xml output option PJT
14-jun-02 V3.0 added octal=, output now decimal PJT
Table of Contents