repo.or.cz
/
ClusterDetector.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
.
[ClusterDetector.git]
/
Cluster.py
blob
a82717bfd9ad9d055ca70bcbb5948cac609b1e7e
1
#!/usr/bin/python
2
import
sys
,
os
3
import
tables
,
numpy
4
import
cluster
5
import
numpy
6
7
import
hdf
8
9
hh
=
hdf
.
hdf
(
"dump.test.h5"
)
10
11
c
=
cluster
12
13
pp
=
hh
.
particles
.
All
.
readWhere
(
"y>30"
)
14
xx
=
pp
[
"x"
]
15
yy
=
pp
[
"y"
]
16
zz
=
pp
[
"z"
]
17
x
=
numpy
.
array
(
xx
)
18
y
=
numpy
.
array
(
yy
)
19
z
=
numpy
.
array
(
zz
)
20
21
cc
=
cluster
.
clusterdetector
(
x
,
y
,
z
,
3.615
*
2
.)
22
print
cc