Table of Contents

Name

snapmass - add or modify masses in a snapshot

Synopsis

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

Description

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.

Parameters

The following parameters are reckognized in any order if the keyword is also given:
in=snap_in
Input data is read from snap_in, which must be in standard snapshot(5NEMO) format [no default].
out=snap_out
Copied output data is written to snap_out, which will also be in snapshot(5NEMO) format [No default].
mass=expression
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].
inmass=mass-file
If used, the masses from this snapshot file are copied to that of the snap_out file. [default: none].
massname=name
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].
massexpr=expr
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)].
masspars=pars
List of parameters and their values. They can be used by name in the massexpr specified before. [default: p,0.0].
massrange=mlow:mhigh
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=seed
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].
norm=total_mass
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)

Author

Peter Teuben

Files


~/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