HTML automatically generated with rman
Table of Contents

Name

snapshot - format for N-body snapshot files

Synopsis



Description

snapshot is the format used to store N-body particle data. The format is that of the general binary structured fileformat as described in filestruct(3NEMO) .

TAGS and BITS


Tagname              current ASCII    Bit?
SnapShotTag          "SnapShot"    -
ParametersTag        "Parameters"    -
NobjTag               "Nobj"           -
TimeTag                 "Time"        TimeBit
ParticlesTag         "Particles"      -
CoordSystemTag          "CoordSystem"    -
MassTag              "Mass"          MassBit
PhaseSpaceTag          "PhaseSpace"    PhaseSpaceBit
PositionTag          "Position"    PositionBit (see ZENO below)
VelocityTag          "Velocity"    VelocityBit (see ZENO below)
AccelerationTag      "Acceleration"    AccelerationBit
PotentialTag        "Potential"    PotentialBit
AuxTag                "Aux"           AuxBit
KeyTag                  "Key"          KeyBit
DensityTag        "Density"
GasDensTag        "GasDensity"
EpsTag            "Eps"
StoryTag        "Story"
NumberTag        "NPartners"
SPHNumberTag        "NSPHPartners"
DiagnosticsTag      "Diagnostics"    -
EnergyTag               "Energy"           EnergyBit
KETensorTag            "KETensor"    KETensorBit
PETensorTag          "PETensor"      PETensorBit
AMTensorTag          "AMTensor"         AMTensorBit
CMPhaseSpaceTag      "CMPhaseSpace"    CMPhaseSpaceBit

Coordinate Systems

Coordinate system codes; these assume 32-bit ints.
#define CSCode(type,ndim,nder) ((type) | (ndim) << 8 | (nder))
#define CSType(code) ( (code) & (0377 << 16))
#define CSNdim(code) (((code) >> 8) & 0377)
#define CSNder(code) ( (code) & 0377)
#define Cartesian   (1 << 16)
#define Spherical   (2 << 16)
#define Scattering  (3 << 16)
#define TrueAnomaly (4 << 16)
#define EccAnomaly  (5 << 16)
#define MeanAnomaly (6 << 16)
#define PeriPassage (7 << 16)

The coordinate system flag, usually visible as an octal number via tsf(1NEMO) , consists of three parts: nder refers to the number of derived quantities (2 if position and velocities are given, 3 of the jerk is also given, 1 if only position is given), ndim, the dimensionality of the coordinate system (typically 1, 2 or 3, but higher values should not be illegal if the code handles it), and tBtype, which is an enumerated number that signifies the coordinate type (from <snapshot/snapshot.h>: Cartesian, Spherical, etc.)

Conversions

In newer versions of NEMO you may find a SnapShot format with a split Position and Velocity, instead of the classic combined PhaseSpace. In such case, most conversion programs stubbornly convert the datastream to the classic PhaseSpace format. E.g. gyrfalcON(1NEMO) produces output data in the new format.
    mkplummer p100 100
    gyrfalcON p100 p100.out
    snapscale p100.out - | stoa - p100.atos

See Also

atosph(1NEMO) , filestruct(5NEMO)


Large Particles, e.g. Stern et al. MNRAS, 272, 291 (1995)

SPH Particles

Smooth Particle Hydro (SPH) particles store a few addition attributes per particle.

Zeno Data

ZENO programs write a new flavor of SnapShot files, in which the PhaseSpace array has been split into a Position and Velocity array. NEMO’sget_snap macros understand this flavor, but will - for now - convert the data back into the less flexible type with combined PhaseSpace coordinates.

Author

Peter Teuben

Files


~/inc/snapshot/      snapshot.h body.h get_snap.h put_snap.h

Update History


26-aug-93    written at long last    PJT
2-jan-03    documented the split Pos/Vel (ZENO) type snapshot flavor    PJT
10-feb-04    documented SPH properties    PJT


Table of Contents