HTML automatically generated with rman
Table of Contents

Name

snapmstat - statistics of the masses in a snapshot

Synopsis

snapscale in=in_file [parameter=value] ...

Description

snapmstat runs through the masses of a snapshot, in sequential order or sorted by mass, and reports in each bin (to be defined later) how many stars there are and the total mass is each bin.

Currently a new bin is defined when its predecessor in the searching (either sequential or sorted) has a different mass. In some future version perhaps a fuzzyness or histogramming option will be offered.

The output is suitable to be parsed by awk(1) or tabmath(1NEMO) and can be used in snapmask(1NEMO) to select certain particles by mass. snapcopy can perhaps also be of some use.

The glnemo2(1NEMO) program uses a select= keyword by which different mass groups can be given a different color.

Parameters

The following parameters are recognized:
in=in_file
input file, in snapshot(5NEMO) format. Default: none.
sort=t|f
Should masses be sorted? Although this keyword has not been implemented yet, it’s effect can be achieved with snapsort. [default: t].
species=maxspecies
Maximum number of species allowed. This keyword is also not used, since the current table is build on the fly, and not saved. [default: 100].

Example

The output of an SPH snapshot could look like:


0 0:8191  = 8192 Mass= 3.4332e-06 TotMas= 0.0281248 CumMas= 0.0281248
1 8192:12287  = 4096 Mass= 1.5259e-05 TotMas= 0.0625009 CumMas= 0.0906256
2 12288:28671  = 16384 Mass= 9.7275e-06 TotMas= .159375 CumMas= .250001
3 28672:45055  = 16384 Mass= 6.1035e-05 TotMas= .999997 CumMas= 1.25
4 45056:49151 = 4096 Mass= 0.00015259 TotMas= .625009 CumMas= 1.87501
For sort=f it will also also report the optimal select= string for glnemo2(1NEMO) , for example:
# Found 6 species:
select=0:7999,8000:11999,12000:17999,18000:25999,26000:29999,30000:35999
# example to view all particle species by a different color
glnemo2 snap.out $(snapmstat snap.out | grep select=)

See Also

snapstat(1NEMO) , snapprint(1NEMO) , snapcopy(1NEMO)

Author

Peter Teuben

Files


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

Update History


18-Sep-90    V1.0: created              PJT
6-feb-2020    V2.0: add select= output example when sort=f    PJT


Table of Contents