Table of Contents


snapmass - add or modify masses in a snapshot


snapmass in=snap_in out=snap_out [parameters=values...]


snapmass adds or modifies the masses in a snapshot. The keyword mass can be used to give a bodytrans(3NEMO) expression.

Alternatively masses can be copied from another input snapshot.


The following parameters are reckognized in any order if the keyword is also given:
Input data is read from snap_in, which must be in standard snapshot(5NEMO) format [no default].
Copied output data is written to snap_out, which will also be in snapshot(5NEMO) format [No default].
Expression for the new masses, using bodytrans(3NEMO) to parse the expression. If nothing supplied, either inmass= or massname= will have to be used. [default: none].
If used, the masses from this snapshot file are copied to that of the snap_out file. [default: none].
Identification of the mass spectrum. It is normally only a function of mass, so n(m) will suffice. If nothing specified, all stars will have the same mass (total mass M=1). [default: none].
Expression for the mass-spectrum. In addition to the mass m from the massname it may contain any variables contained in the masspars to be specified next. [default: pow(m,p)].
List of parameters and their values. They can be used by name in the massexpr specified before. [default: p,0.0].
Valid massrange. A lower and higher cutoff must be supplied. The massrange has arbitrary units, since all masses will be rescaled to set the total mass M=1. [default: 1,1].
seed for the random number generator (default: a value 0, which will be converted into a unique new value using UNIX’s clock time, in seconds since once-upon-a-time-in-the-seventies). [Default: 0].
New total mass required for normalization. By default the masses are not scaled. See also snapscale(1NEMO) . [Default: not used].

See Also

snapmstat(1NEMO) , snapscale(1NEMO) , bodytrans(3NEMO)


Peter Teuben


~/src/nbody/trans    snapmass.c

Update History

1-Aug-88    V1.0: created                 PJT
5-dec-88    V1.1: mass keyword added    PJT
5-feb-89    V1.2: bodytrans() used         PJT
13-may-91    V1.3: helpvec + doc added    PJT
29-may-97    V2.0: mass{name,expr,pars,range} from mkplummer     PJT
30-jul-97    V2.1: added norm=               PJT

Table of Contents