Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F73449645
mksnap.py
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sun, Jul 21, 09:15
Size
417 B
Mime Type
text/x-python
Expires
Tue, Jul 23, 09:15 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
19201866
Attached To
rGEAR Gear
mksnap.py
View Options
#!/usr/bin/env python
from
pNbody
import
ic
from
pNbody
import
libutil
from
numpy
import
*
import
sys
import
time
import
copy
from
PyGear
import
gadget
###################################
# generate model
n
=
1000
nb
=
ic
.
box
(
n
,
0.5
,
0.5
,
0.5
,
ftype
=
'gadget'
,
irand
=
0
)
#nb = ic.plummer(n,1,1,1,eps=0.1,rmax=1.,ftype='gadget')
nb
.
pos
[:,
2
]
=
nb
.
pos
[:,
2
]
*
0
nb
.
pos
=
nb
.
pos
+
0.5
nb
.
rename
(
'snap.dat'
)
nb
.
write
()
Event Timeline
Log In to Comment