Newer
Older
#! /usr/bin/env partiview
# The above trick searches for "partiview" on $PATH,
# making this .cf file be an executable script:
# invoke with either
# partiview whatever.cf
# or just
# whatever.cf
# These are the data fields filled in by the kira reader as
# If the code changes, these datavar definitions should change too.
# The field names given here are arbitrary, but indices are hard-wired.
# id: >0 positive small integer index for leaf nodes (stars),
# <0 negative of small integer index for non-leaves (CM nodes)
# mass: mass
# nclump: number of stars in clump. 1=singles, 2=binaries, ...
# topnode: small int index, equal for all stars/CM nodes in clump.
# topnode == abs(id) for root node of a clump.
# treeaddr: bit-encoded, giving location in a clump tree.
# 0 for single stars (nclump=1). Otherwise,
# 1 for root of a clump
# 2*(parent treeaddr) for left-child of parent
# 2*(parent treeaddr)+1 for right-child of parent
datavar 0 id
datavar 1 mass
datavar 2 nclump
datavar 3 topnode
datavar 4 treeaddr
# ``read kira data from file "data2.out"''
kira data2.out
# ``scale particle brightness by mass (over range 0 - 0.01)''
eval lum mass 0 0.01
# ``brighten them up'' Intrinsic brightness = <lum function> * psize * slum
eval psize 100
# use bright-colored colormap, and
# color by number-of-stars-in-clump. colorindex = nclump + (-1)
# so e.g. nclump=1 => colorindex=0
eval cmap nclump.cmap
# Turn center-of-mass nodes off,
# draw ring markers for multiple stars,
# choose marker radius from abs(semimajor axis) * 1.5
eval kiractl nodes off
eval kiractl rings on
eval kiractl ringsize semimajor
eval kiractl ringscale 1.5