Table of Contents

Name

snapcenter - translate snapshot data to coordinates centered on subset of bodies

Synopsis

snapcenter in=snap-file out=snap-file [parameter=value] ...

Description

snapcenter translates the phase-space data in an input snapshot file to a coordinate system centered on an arbitrary subset of bodies. More precisely, real-valued weights are specified for each body, and used to compute a weighted phase-space centroid, which becomes the new origin of the coordinate system.

Alternatively a new snapshot with a single particle of total mass and these new center-of-mass coordintes can be produced.

Parameters

The following parameters are recognized; they may be given in any order.
in=snap-file
Input data is read from snap-file, which must be in snapshot format. No default.
out=snap-file
Output data is written to snap-file. No default.
times=time-range
Only data frames with time values within time-range, which is of the form, eg, "1.0:1.5,2.5,3.0", will be translated. [Default: all].
weight=expression
The value of expression is used to compute the centroid. expression is a real-valued C language expression over the real values x, y, z, vx, vy, vz, phi, m, t, and the integer value i. [Default 1].
report=t|f
Report the center of mass coordinates. These are 2*NDIM numbers, position and velocity, of the new center of mass in the old coordinates. If you want to use snapcenter in a pipe, you need to reset report=f, since both standard output and filestruct output will get merged, and become illegable for the next program in the pipe. [Default: f].
one=t|f
Write output center of mass (COM) as a single body with total mass and COM coordinates as computed from weight=. [Default: f].

See Also

snapcenterp(1NEMO) , bodytrans(3NEMO) , snapshot(5NEMO)

W.L.Sweatman - (1993) MNRAS 261, 497. 1993MNRAS.261..497S

Picard,A. and Johnston, H.M. - (1994) A&A, 76.

Cruz., F et al. - (2002) Rev.Mex.de Astr.y Astr. 38, 225

Author

Joshua E. Barnes.

Update History


3-jul-87    Created ?    Josh
26-aug-93    1.4 added tab= for displaying center (@Tokyo)    Peter
29-nov-93    1.4 documented earlier report= (ala tab=) addition    PJT
26-feb-97    1.6 added one= and changed default of report=    PJT


Table of Contents