Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F91549680
example_mkmap2dn.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
Tue, Nov 12, 03:21
Size
364 B
Mime Type
text/x-python
Expires
Thu, Nov 14, 03:21 (2 d)
Engine
blob
Format
Raw Data
Handle
22281925
Attached To
rPNBODY pNbody
example_mkmap2dn.py
View Options
from
pNbody
import
*
from
pNbody
import
io
import
mapping
nb
=
Nbody
(
'../../examples/snap.dat'
,
ftype
=
'gadget'
)
mx
=
max
(
nb
.
rxyz
())
kx
=
256
ky
=
256
kz
=
256
pos
=
(
nb
.
pos
+
[
mx
,
mx
,
mx
]
)
/
(
2
*
mx
)
# between 0,1
#pos = pos*[kx,ky,kz]
pos
=
pos
.
astype
(
float32
)
mat
=
mapping
.
mkmap2dn
(
pos
,
nb
.
mass
,
nb
.
mass
,(
kx
,
ky
))
#io.WriteFits(mat,'qq.fits')
mplot
(
mat
)
Event Timeline
Log In to Comment