This HTML automatically generated with rman for NEMO
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 shifts the phase-space data from 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 coordinates can be produced using one=t.

Parameters

The following parameters are recognized in order; they may be given in any order if the keyword is also given. Use --help to confirm this man page is up to date.
in=snap-file
Input data is read from snap-file, which must be in snapshot(5NEMO) format.
No default.
out=snap-file
Output data is written to snap-file.
No default.
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].
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].
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].

Examples

To view the center of mass of a system without ac atually creating an output file:
   % mkplummer - nbody=100 zerocm=f seed=123 | snapcenter - . report=t
   0.073515 0.006338 0.068154 0.005858 0.014697 0.059333
   
   % mkplummer - nbody=100 zerocm=f seed=123 | snapcenterp - . report=t
   0.058525 0.087385 0.099227 
(notice snapcenterp(1NEMO) does not compute the velocity centroid).

Here is an example to analyze a whole series::

% mkplummer - nbody=100 zerocm=f nmodel=100 seed=123 | snapcenter - . report=t | tabstat - 1:6 npt: 100 100 100 100 100 100 min: -0.25276 -0.233932 -0.239581 -0.094354 -0.127564 -0.128537 max: 0.259662 0.297318 0.42111 0.099852 0.101441 0.088769 sum: -0.476577 0.634456 0.928364 0.272159 -0.074268 -0.074884 mean: -0.00476577 0.00634456 0.00928364 0.00272159 -0.00074268 -0.00074884 disp: 0.0997349 0.0970942 0.103345 0.0386814 0.045105 0.0440842 skew: 0.0784864 -0.189295 0.702539 0.0190448 -0.223761 -0.157901 kurt: -0.0980693 0.039727 2.47228 -0.22483 -0.0507929 -0.106209 min/sig: -2.48653 -2.47468 -2.40809 -2.50962 -2.81169 -2.89873 max/sig: 2.65131 2.99682 3.98496 2.51103 2.26546 2.03061 median: -0.0011355 0.0115855 0.010902 0.0022755 0.0001605 -0.002766

See Also

snapcenterp(1NEMO) , snapcenters(1NEMO) , bodytrans(3NEMO) , hackdens(1NEMO) , hackforce(1NEMO) , snapshot(5NEMO)

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

Picard,A. and Johnston, H.M. - (1994) A&A, 76. 1994A%26A...283...76P (observational)

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

Power et al (2003) - 2003MNRAS.338...14P - shrinking sphere method, S2.5

Author

Joshua E. Barnes.

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
12-aug-22    added cross-refs    PJT
15-may-23    examples    PJT


Table of Contents