This HTML automatically generated with rman for NEMO
Table of Contents

Name

snapdens - local density estimator in an N-body snapshot

Synopsis

snapdens in=snap_in [parameter=value]

Description

snapdens finds the space density in an N-body snapshot by using the Kth nearest neighbor density estimator discussed by Casertano & Hut (1985, ApJ 298, 80). It uses a simple N^2 algorithm, and is hence slow for large snapshots (see also hackdens(1NEMO) ).

In case the number of nearest neighbours used is large enough and the velocity distribution function is close enough to gaussian an estimate for the phase space density can also be obtained (see e.g. the discussion in Lake (1989AJ.....97.1312L))

Standard output (not the table) is: density weighted center of mass, nearest neighbor, maximum density, density radius, density weighted average density.

Parameters

The following parameters are recognized in any order if the keyword is also given:
in=in-file
input file, in snapshot(5NEMO) format [no default]
out=out-file
optional output file, in snapshot(5NEMO) format. The Aux() key will contain the density or phase space density, depending on the dens key below. [not used].
kmax=k_max
Number of nearest neighbours used in the density estimator. [default: 6].
dens=t|f
Density written to file (dens=t) or phase space density (dens=f) (future expansion) [default: t].
tab=t|f
Table output? If selected, it shows radius, density, phase space density, K’th nearest neighbor, velocity dispersion. [default: t].
format=f_fmt
Format with which the numbers are output in case a table was selected (see above) [default: %e].
tfactor=
If used, this factor is used to scale radii to velocities, used in computing the phase space densities. ** in development **
nn=t|f
If set, the neighest neighbor (a number from 0 and Nnbody-1) is saved in the Key of a snapshot(5NEMO) . This is required for the atlas(5NEMO) format. Default: f
ndim=2|3f
Dimensionality of space. For ndim=2 a surface density will be computed. Default: 3

Timing


Hackforce:    Nbody=16384    Kmax=32    2600"    grolsch SUN 3/160 (f68881)
Snapdens:    Nbody=1024    Kmax=8    240"/0.41     guinness (f68881)  / P4/1.6
Snapdens:    Nbody=16384    Kmax=64    75000"/83"    grolsch SUN 3/160 (f68881) / P4/1.6
Snapdens:    Nbody=512    Kmax=16    65"    pollux SUN 3/110 (f68881)
Hackdens:    Nbody=512    Kmax=16 xx"    pollux SUN 3/110 (f68881)

See Also

snappeak(1NEMO) , snapstat(1NEMO) , hackdens(1NEMO) , density(1falcON) , snapatlas(1NEMO) , atlas(5NEMO) , snapshot(5NEMO)
M. Maciejewski et. al:     Phase-space structures I: A comparison of 6D density
estimators (arXiv:0810.0504v1)
Wozniak & Kruzewski: On Estimating Non-uniform Density Distributions using
N Nearest Neighbors (arXiv:1301.5346)

Author

Peter Teuben

Files


~/src/pjt/nbody     snapdens.c snapdens.1

Update History


1-Nov-88    V1.0: created              PJT
12-apr-03    V1.5 added nn= and ndim=    PJT


Table of Contents