This HTML automatically generated with rman for NEMO
Table of Contents
tabpairs - analyze interaction histories of stars in a starlab simulation
tabpairs [parameter=value]
tabpairs reads a pre-processed
(grep/awk) log file from a starlab simulation, and performs various statistics
on this table.
The following parameters are recognized in any
order if the keyword is also given:
- in=
- Input file name (table). No default.
- star=
- Select the star to show detailed interaction history of. Default:
none
- count=
- Count occurance of all stars? [f]
- delete=
- Number of iterations
to delete obvious combo/splitting pairs of the same interaction list. Default:
0.
- nmax=
- maximum number of data to be read if from a pipe. [10000]
First
the LOG file from a simulation must be trimmed down by grepping for Itop_level_nodeP
and relative E/mu, for example as follows:
egrep ’top_level_node|relative E/mu’ LOG
after which a script log2tab.awk will turn this otherwise still messy looking
output in a simplified table that can then be read by tabpairs:
egrep ’top_level_node|relative E/mu’ LOG | log2tab.awk > LOG.tab
tabpairs LOG.tab count=t > LOG1.count
tabpairs LOG.tab count=t delete=t > LOG2.count
Here’s a version of the log2tab.awk script:
#! /bin/awk -f
#
#split_top_level_node: splitting (953,(8587,2559)) at time 2232.54
#split_top_level_node: splitting ((2559,8512),8587) at time 2232.54
#split_top_level_node: splitting (3403,((3940,1130),7781)) at time 2294.29
#combine_top_level_nodes: combining (659,9654) and 4348 at time 2278.07
#combine_top_level_nodes: combining ((8429,3078),3440) and 8161 at time
2292.19
#
BEGIN {
}
{
if ($2 == "combining") {
n1 = $3;
n2 = $5;
t = $8;
getline;
e = $4;
p = $7;
if (e<0)
print 1,t,e,p,n1,n2;
else
print 1,t,e,0,n1,n2;
} else if ($2 == "splitting") {
n1 = $3;
t = $6;
getline;
e = $4;
p = $7;
if (e<0)
print -1,t,e,p,n1;
else
print -1,t,e,0,n1;
} else
print "# Something wrong on line",$0
}
END {
}
Peter Teuben
22-Jun-00 V1.0 Created - at AMNH visit PJT
Table of Contents