Newer
Older
/*
* $Log$
* Revision 1.35 2001/08/21 03:11:05 slevy
* Use Steve's new family of center-points -- "kira center" command.
* Add new per-particle field, "ismember", to show escapees.
*
* Revision 1.34 2001/07/19 20:12:47 slevy
* Reprocess particles after changing parameters.
* (Some "kira" commands use kira_set(), which already does this.
* Just set "changed" for those which don't.)
* Impose a max trail gap (delta time). Break up trails at time-gaps
* exceeding this threshold.
*
* Revision 1.33 2001/07/18 22:41:45 slevy
* Add "kira center" command, to report all positions relative to
* the kira-computed smoothed cluster center.
*
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
* Revision 1.32 2001/07/18 19:45:34 slevy
* Picked stars now report their type and spectral/luminosity classes too.
* New "kira hrdiag" command allows turning it on/off, setting plot ranges.
* "kira int x" is a synonym for "kira int x=x", the common case.
* New "sqrtmass" attribute. "mass" is again in linear, not log units.
* Disable kira display if we don't get a valid input file.
* XXX Bogusly import getfloats() from partibrains.c; should go in a separate
* utility .c/.h file.
*
* Revision 1.31 2001/07/17 22:19:37 slevy
* Use type_string(stellar_type) to get readable names for stellar types
* of picked stars.
*
* Revision 1.30 2001/07/17 17:29:36 slevy
* Use new mass_scale_factor() to get starlab's idea of
* dynamical->solar mass unit conversion.
* If it knows, then "kira massscale" only allows user
* to override if user-supplied value ends with "!",
* e.g. "kira mscale 600!".
*
* Revision 1.29 2001/07/16 19:08:30 slevy
* #if(def)'s for CAVE, where we have no plot widget.
*
* Revision 1.28 2001/07/16 17:55:55 slevy
* Report log10(mass*massscale) -- log is handier than linear units.
*
* Revision 1.27 2001/07/12 21:37:02 slevy
* Lots of changes. Add trails. Move tracking code so we'll be
* able to track collections rather than single particles (not yet though).
* Trails are relative to tracked-point position, so can be non-inertial.
*
* Revision 1.26 2001/07/10 17:15:50 slevy
* Add massscale (mscale) for convenient mass presentation.
* Compute fake aggregate temp/luminosity for CM nodes.
* Oops, marks need their own sel[] array!
* Allow adjusting H-R diagram alpha values too.
*
* Revision 1.25 2001/07/09 19:57:22 slevy
* Add H-R diagram zoom (b/B keys).
* Pay attention to emph/see settings.
* Get selection working properly.
*
* Revision 1.24 2001/07/07 15:27:57 slevy
* Save/restore positions of subparticles, so we can reuse interpolated_tree safely.
* Only use SEL_DEST-initialized pick etc. info.
*
* Revision 1.23 2001/07/04 03:28:03 slevy
* Add picking support: kira_picked() gets all pick callbacks.
* Add set-selection features, including interaction tracing.
*
* Revision 1.22 2001/07/02 16:17:24 slevy
* Cast kira_HRplot to avoid complaints.
* Hack for gcc 3.0's stdio (#ifdef NEWSTDIO).
*
* Revision 1.21 2001/07/01 14:30:43 slevy
* Do more plot setup here in kira_parti. Set axis titles too.
*
* Revision 1.20 2001/07/01 07:31:45 slevy
* Hmm, make default logT range a bit smaller.
*
* Revision 1.19 2001/07/01 06:42:01 slevy
* Oops, get the sense of the log-T scale correct!
*
* Revision 1.18 2001/06/30 18:09:15 slevy
* Add kira_HRplot for drawing in H-R diagram.
*
* Revision 1.17 2001/06/30 07:01:47 slevy
* Yes, call create_interpolated_tree2() if not OLDTREE!
*
* Revision 1.16 2001/06/06 17:22:55 slevy
* get_stellar_type() now returns int (enum from starlab/inc/star_support.h),
* rather than a string.
*
* Revision 1.15 2001/05/30 14:31:16 slevy
* Add Tlog, Lum, and stellar-type fields.
* Star type is number-encoded, sigh:
* 0 = unknown
* 1 = ms Main Sequence
* 2 = cd Compact Dwarf??
* 3 = gs ??
* 4 = bh Black Hole
* 5 = sg Supergiant?
* 6 = hb Horizontal Branch
*
* Revision 1.14 2001/05/15 12:18:57 slevy
* New interface to dynamic-data routines.
* Now, the only #ifdef KIRA/WARP needed in partibrains.c are
* the data-command initialization routines. All others,
* including control-command parsing and specialized drawing,
* is now via a function table.
*
* Revision 1.13 2001/05/14 15:47:59 slevy
* Invalidate color/size/threshold sequence numbers so main code will recalc.
*
* Revision 1.12 2001/05/14 08:40:06 slevy
* kira_draw(): don't do anything if the dynamic data isn't ours.
*
* Revision 1.11 2001/05/12 07:23:05 slevy
* New generic get-time-range function for dynamic data.
*
* Revision 1.10 2001/04/04 19:23:05 slevy
* Use portable form of is_open(). Other tidiness.
*
* Revision 1.9 2001/03/30 13:56:07 slevy
* Rename functions to kira_*.
* Add framework for incrementally reading paragraphs of input:
* kira_open(), kira_read_more().
* Add scraps for maintaining trails, but not enough to work yet.
*
* Revision 1.8 2001/02/04 16:52:38 slevy
* Use default speck-field names if user doesn't override them
* (either before or after "kira" reader).
*
* Revision 1.7 2001/02/03 23:37:51 slevy
*
* Oops, now kira_draw needs to ensure we really have something to draw!
*
* Revision 1.6 2001/02/03 15:26:16 slevy
*
* OK, toss those extra 'break's.
*
* Revision 1.5 2001/02/03 15:20:34 slevy
* Add "kira tree" support -- tree arcs, with crosswise tick-marks
* at center-of-mass points. Tickmarks lie in screen plane, with
* length of <tickscale> times true separation.
*
* Revision 1.4 2000/12/31 00:25:05 slevy
* Re-extract whenever kira_set changes something.
* Add particle tracking.
* Compute ring sizes correctly, and draw rounder rings.
*
* Revision 1.3 2000/12/30 02:19:30 slevy
* Add ring markers for non-isolated stars. Not finished yet, but seems usable.
* No GUI yet, but new commands:
* kiractl nodes {on|off|roots}
* kiractl rings {on|off|roots}
* kiractl ringsize {sep|semi} (ring size from curr. separation or semimajor axis)
* kiractl scale <scalefactor>
* kiractl span <minpixels> <maxpixels> (allowed range of ring radii)
*
* Change encoding of nclump: n for leaves, -n for center-of-mass nodes,
* so colormap can make them distinguishable.
*
* Bug: after kiractl command, must change timestep before it takes effect.
* Bug: ring markers aren't colored yet for some reason.
*
* Revision 1.2 2000/12/22 01:11:09 slevy
* Recode to be speedier (use recursion) and to provide more information to partiview:
* [0] worldline index (= kira index for singles, - and unique for others)
* [1] mass
* [2] number of stars (leaf nodes) in clump
* + 100 if this is a member of an unperturbed binary
* [3] top-level name (small integer, = worldline index for single stars)
* [4] tree address in clump (0=single, 1=root, children of <i> are <2i>,<2i+1>)
*
* Revision 1.1 2000/12/20 16:50:54 slevy
* Glue code to read starlab (kira) files and interpolate particle positions
* into partiview internal form.
*/
#include <ostream.h>
#include <istream.h>
#include "worldline.h"
// #define CAVE 1 // NewN: use potentially-shared-memory malloc
#include "shmem.h"
#include "specks.h"
#include "partiviewc.h"
#include "kira_parti.h" // declare following as extern "C"
Loading
Loading full blame...