Skip to content

Commit

Permalink
make it run
Browse files Browse the repository at this point in the history
  • Loading branch information
certik committed May 29, 2009
1 parent 1df648a commit 7023268
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions readbin3.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
from math import pi

from numpy import arange, meshgrid, sin, cos

nplanets = 1
nr = 800
nphi = 4*nr
Expand All @@ -8,9 +12,12 @@
dp = 2.*pi/nphi
hdp = dp/2.0

r, phi = meshgrid(0.4+dr*(1:nr)-hdr, 0+dp*(0:nphi)+hdp)
x = r.*cos(phi)
y = r.*sin(phi)
radi = 0.4+dr*(1:nr)-hdr
X = 0.4+dr*arange(1, nr+1)-hdr
Y = 0+dp*arange(nphi+1)+hdp
r, phi = meshgrid(X, Y)

x = r * cos(phi)
y = r * sin(phi)
radi = X

beta = 1.5 # power law for density profile

0 comments on commit 7023268

Please sign in to comment.