This HTML automatically generated with rman for NEMO
Table of Contents

Name

snapcenters - Center position of a snapshot based on shrinking sphere method (Power2003)

Synopsis

snapcenters [parameter=value]

Description

snapcenters estimates the center of a snapshot (following the discussion in Power et al. (2003)) using an iterative technique in which the center of mass of particles within a shrinking sphere is computed recursively until a convergence criterion is met. At each step of the iteration, the center of the sphere is reset to the last computed barycentre and the radius of the sphere is reduced by 2.5 per cent. The iteration is stopped when a specified number of particles (typically either 1000 particles or 1 per cent of the particles within the high-resolution region, whichever is smaller) is reached within the sphere.

Halo centers identified with this procedure are quite independent of the parameters chosen to initiate the iteration, provided that the initial sphere is large enough to encompass a large fraction of the system. In a multi-component system, such as a dark halo with substructure, this procedure isolates the densest region within the largest subcomponent. In more regular systems, the centre so obtained is in good agreement with centres obtained by weighing the centre of mass by the local density or gravitational potential of each particle. We have explicitly checked that none of the results presented here are biased by our particular choice of centering procedure. end-quote.

For snapcenters an additional weight-factor can be applied to each particle. See also snapcenter(1NEMO) and snapcenterp(1NEMO) for alternative approaches. In the examples of hackdens(1NEMO) a table compares the different approaches.

Convergence can be sped up by using a larger shrinking factor (the default is only 2.5%), by setting a finite tolerance on the centering (eta=), since the default is 0, or by increasing the minimum number of particles via fn=.

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=
input snapshot file name, containing one or more snapshots.
No default
out=
output snapshot file name
No default
weight=
weight factor used finding center
[m]
times=
range of times to process
[all]
report=
report the center (in addition to some convergence paramters, see below)
[f]
eta=
Optional additional convergence stop criterion in position. Unless relaxed tolerance is allowed, it’’s best to leave eta=0 (the default).
[0]
shrink=
Reduction fraction for the rmax sphere per iteration
[0.025]
iter=
Maximum number of iterations to use
[20]
center=
Initial estimate for the center. If the true center is not within rmax of center, it is unlikely the center will be found.
[0,0,0]
fn=
Minimum fraction of particles needed in shrinking rmax area. It is adviced to keep at least 1%. If a value > 1 is given, it is assumed to be the number of particles instead.
[0.01]
rmax=
Initial radius to shrink from, should be a good size fraction of the system size.
[10]
one=
Only output COM as a snapshot?
[not implemented]

Convergence

For each iteration the radius is shrunk, and if convergence is reached, it is reported. E.g.

% mkplummer - 2000 seed=123 | snapcenters - . report=t 2 19 3.77354 1940 -0.005382 0.028057 0.020065

Printed are: convergence reason, #iters, rmax, nleft, xcenter, ycenter,

zcenter

convergence reason:
0 - unexpected convergence (should never occur)
1 - eta was reached. By setting eta=0 [the default] this should never happen
2 - iteration max was reached
3 - nmin was reached (the goal of Power2003)
4 - number in shrinking sphere hasn’t changed (not tested for, should rarely occur)

Caveats

Searching is done in Pos space using rmax, there is no eqv. vmax search.

Examples

An example of shifting a Plummer sphere and playing with the essential parameters to find the center:

$ mkplummer - 10000 | snapshift - - 5,0,0 | snapcenters - . report=t shrink=0.3 fn=0.1 rmax=20

See Also

snapcenterp(1NEMO) , snapcenter(1NEMO) , bodytrans(3NEMO) , hackdens(1NEMO) , snapshot(5NEMO)
Power et al (2003) - 2003MNRAS.338...14P - shrinking sphere method, S2.5

Files

NEMO/src/nbody/trans/snapcenters.c

Ads

@ads 2003MNRAS.338...14P

Author

Peter

Teuben

Update History


16-may-2025    0.1 Drafted     PJT
19-may-2025    0.4 renamed keywords to shrink= and fn=        PJT


Table of Contents