Skip to content
Snippets Groups Projects
data2.cf 1.96 KiB
Newer Older
slevy's avatar
slevy committed
#! /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
slevy's avatar
 
slevy committed
# compiled into partiview (kira_parti.cc) as of Dec 30 2000.
slevy's avatar
slevy committed
# 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
slevy's avatar
 
slevy committed
# ringsize: zero for stars, nonzero world-unit radius for (some) CM nodes
slevy's avatar
slevy committed

datavar 0 id
datavar 1 mass
datavar 2 nclump
datavar 3 topnode
datavar 4 treeaddr
slevy's avatar
 
slevy committed
datavar 5 ringsize
slevy's avatar
slevy committed

#  ``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
slevy's avatar
 
slevy committed
eval color nclump exact 8
slevy's avatar
slevy committed

slevy's avatar
 
slevy committed
# 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
slevy's avatar
 
slevy committed
# Could track a particle, with:
## eval kiractl track 12
slevy's avatar
 
slevy committed

#  ``load data for time 0 and report to user how many particles are in it''
eval step 0
eval every