Table of Contents

**radprof in=**snapshot [parameter=value]

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).

**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: (1) radius, (2)
density, (3) circular velocity, (4) cumulative mass, (5) projected surface
density, (6) radius to the power (7)
0.25 and -2.5*log(surface density). [default:
**f**]. **headline=**- Optional text for plot header. [no header].

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

~src/nbody/reducradprof.c

18-Mar-87document createdPJT 8-Apr-87V1.0 codingPJT 21-Apr-87V1.1 rotcur addedPJT 1-jun-88V2.0 new filestruct + tablePJT 28-Mar-89V2.0c bug remarks in man pagePJT 12-feb-92 V2.1a Nemo V2.xPJT 25-jul-97V3.0 added kmax= and changed density computationPJT 20-jun-02V3.1 able to read PhaseSpace as well as Pos/Vel dataPJT 8-aug-2022V3.2 added sort=t and dens=t keywordPJT