NEMO     Start Previous Next
A Gentle Introduction to NEMO

2.2: Data files...and pipes

$  mkplummer plummer.dat 100 
$  ls -l html/plummer.dat 
-rw-rw-r--    1 teuben   teuben       5865 May 21 01:07 plummer.dat
$  tsf plummer.dat 
char Headline[33] "set_xrandom: seed used 990421668"
char History[39] "mkplummer plummer.dat 100 VERSION=2.5d"
set SnapShot
  set Parameters
    int Nobj 0144 
    double Time 0.00000 
  tes
  set Particles
    int CoordSystem 0201402 
    double Mass[100] 0.01000000 0.01000000 0.01000000 0.01000000 
      0.01000000 0.01000000 0.01000000 0.01000000 0.01000000 
      0.01000000 0.01000000 0.01000000 0.01000000 0.01000000 
      0.01000000 0.01000000 0.01000000 0.01000000 0.01000000 
      . . .
    double PhaseSpace[100][2][3] -0.222372 0.178469 -0.180598 0.287263 
      0.699825 -0.763477 -0.357846 0.801222 -0.326738 0.149624 
      0.238088 0.298049 -0.917463 -0.598775 -0.607166 -0.0550849 
      0.0754756 0.628052 0.286610 0.189917 0.289674 -0.594378 0.395770 
      . . .
  tes 
tes

Files can be exchanged between different architectures (IEEE/normal-endian).
Data does not need to stored in files, can be piped, in which case the filename is replaced with a dash (-):
$  mkplummer - 100 | tsf - 
char Headline[33] "set_xrandom: seed used 990421838"
char History[29] "mkplummer - 100 VERSION=2.5d"
set SnapShot
  set Parameters
    int Nobj 0144 
    double Time 0.00000 
  tes
  set Particles
    int CoordSystem 0201402 
    double Mass[100] 0.01000000 0.01000000 0.01000000 0.01000000 
      0.01000000 0.01000000 0.01000000 0.01000000 0.01000000 
      0.01000000 0.01000000 0.01000000 0.01000000 0.01000000 
      0.01000000 0.01000000 0.01000000 0.01000000 0.01000000 
      . . .
    double PhaseSpace[100][2][3] 0.634026 -0.637972 0.655291 -0.188306 
      0.149475 0.363432 0.272000 1.40328 0.0527634 0.206006 0.489493 
      0.0568578 -0.0229232 -0.0251911 -0.717110 0.00911736 0.431143 
      0.455234 0.00159274 -0.773549 -0.628798 -0.0177913 -0.272241 
      . . .
  tes
tes

$  mkplummer help=h 
out              : Output file name [???]
nbody            : Number of particles [???]
mfrac            : Mass fraction used of Plummer distribution [0.999]
rfrac            : Radius fraction used of Plummer distribution
                   NOTE: the above two values are chosen so
                   that m( rfrac ) = mfrac                 [22.8042468]
seed             : Seed for the random number generator [0]
time             : Time at which snapshot is taken [0.0]
zerocm           : Centrate snapshot (t/f)? [t]
quiet            : 0=noisy 1=somewhat quiet 2=more quiet [0]
massname         : If used Mass-function name (e.g. n(m)) []
massexpr         : Mass function expression (e.g. pow(m,p)) [pow(m,p)]
masspars         : Mass function parameters (e.g. p,0.0) [p,0.0]
massrange        : Range for mass-spectrum (e.g. 1,2) [1,1]
headline         : Verbiage for output []
VERSION          : 6-jun-96 PJT [2.5d]