Table of Contents

Name

tabpairs - analyze interaction histories of stars in a starlab simulation

Synopsis

tabpairs [parameter=value]

Description

tabpairs reads a pre-processed (grep/awk) log file from a starlab simulation, and performs various statistics on this table.

Parameters

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]

Examples

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

See Also

Log2tab

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 {
}

Author

Peter Teuben

Update History


22-Jun-00    V1.0 Created - at AMNH visit        PJT


Table of Contents