Table of Contents

Name

radprof - tabulate or display radial profiles of an N-body snapshot

Synopsis

radprof in=snapshot [parameter=value]

Description

radprof computes spherically averaged density (and some derived quantities) of an N-body realization. Although it can plot, it is often more useful to store the data in a table (tab=t) and use other programs to plot. One can optionally plot the density, cumulative mass or rotational velocity as a function of radius.

Using table output (tab=t) the intrinsic cumulative mass profile is transformed to a spatial and surface density, using 3D-angle averaging (hence assuming a spherical system, snapscale(1NEMO) has to be used first if the averaging is to be done on triaxial shells). The density at radius of radius-sorted star i (i=0..NBODY-1) is given by:

                sum_{i-k}^{i+k} M(j)  -  0.5*(M(i-k)+M(i+k))
    rho(i) = -----------------------------------------------
                    4/3 * PI * ( r(i+k)^3 - r(i-k)^3 )

where M(i) is the mass of star i). This equation is only valid for i=k...NBODY-1-k, the two edge stars have different densities defined. See source code for details. For points within ’k’ stars (see also kmax= below) of the minimum and maximum radius, fewer stars will be used on one side of the interval, but the formulae used is still the same.

The table will contain 7 columns: (1) radius, (2) density, (3) circular velocity (assuming centrifugal balance), (4) cumulative mass, (5) projected surface density, (6) radius to the power 0.25 and (7) -2.5*log(surface 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]
center=x,y,z
The center (x,y,z) from which the radial profile will be constructed [default: 0,0,0].
mode=name
Choice of variable against which the radial distribution is plotted. Options are: mass, which plots the cumulative mass, density, which plots the stellar density and rotcur, which plots the rotation curve for centrifugally bound orbits.
rmax=rmax
This is a radial cutoff in the plot. [default: program selects rmax to be the particle with maximum radius from the center (x,y,z)]
dmax=dmax
Upper cutoff of the density [default: program selects the maximum found density to fit on the plot].
mmax=mmax
Upper cutoff of the cumulative mass plot [default: 1.0].
vmax=vmax
Upper cutoff of the rotation curve plot [default: program selects the maximum found rotation curve to fit on the plot].
kmax=k_max
Number of nearest neighbors in radius on either side used determine the density. This acts like a hanning type smoothing constant. Note this means that each density point used 2 kmax + 1 points from the snapshot. [Default: 1].
tab=t|f
Output as table? When true no plotting will be done, only the table is produced on standard output: radius, density, circular velocity, cumulative mass, projected surface density, radius to the power 0.25 and -2.5*log(surface density). [default: f].
headline=
Optional text for plot header. [no header].

Bugs


Tables (tab=t): the density is crummy.
Plot: no logarithmic scaling can be done.

See Also

snapdens(1NEMO) , hackdens(1NEMO) , tabplot(1NEMO) , snapshot(5NEMO)

Author

Peter Teuben

Files


~src/nbody/reduc    radprof.c

Update History


18-Mar-87    document created            PJT
 8-Apr-87    V1.0 coding                 PJT
21-Apr-87    V1.1 rotcur added           PJT
 1-jun-88    V2.0 new filestruct + table    PJT
28-Mar-89    V2.0c bug remarks in man page    PJT
12-feb-92       V2.1a Nemo V2.x             PJT
25-jul-97    V3.0 added kmax= and changed density computation    PJT
20-jun-02    V3.1 able to read PhaseSpace as well as Pos/Vel data    PJT


Table of Contents