aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVolker Hoffmann <volker@cheleb.net>2013-04-02 13:09:09 +0200
committerVolker Hoffmann <volker@cheleb.net>2013-04-02 13:09:34 +0200
commitcf4c74a2a73e41bd5d044257a58ffa9c6e9465cb (patch)
tree959862ae817b36136af6252b13685b4ecd2e301b
parent09658afc8f44d13d97a78acaf25d90c7e35bcf2d (diff)
save radial velocity in v(x,y) and v(r); larger bins in velocity(r)
-rw-r--r--comp_VelocitiesR.py10
-rw-r--r--comp_VelocitiesXY.py2
2 files changed, 8 insertions, 4 deletions
diff --git a/comp_VelocitiesR.py b/comp_VelocitiesR.py
index 59fdcb2..3fa7410 100644
--- a/comp_VelocitiesR.py
+++ b/comp_VelocitiesR.py
@@ -17,7 +17,7 @@ def main():
# Set Defaults
iout = 1
- nrbins = 128
+ nrbins = 64
# Parse Arguments
if len(sys.argv) == 3:
@@ -47,13 +47,15 @@ def do_comp_VelocitiesR(iiout, nrbins):
xgrid, ygrid = np.meshgrid(x0, y0)
rr = xgrid**2. + ygrid**2.
r = np.sqrt(rr)
- rbins = np.linspace(r.min(), r.max(), nrbins + 1)
- OmegaR, rbins = prof1d(r.flatten(), npz["OmegaXY"].flatten(), rbins)
+ rbins_in = np.linspace(r.min(), r.max(), nrbins + 1)
+ OmegaR, rbins_out = prof1d(r.flatten(), npz["OmegaXY"].flatten(), rbins_in)
+ vr_r, rbins_out = prof1d(r.flatten(), npz["vr_xy"].flatten(), rbins_in)
# Save OmegaR_iout.npz
np.savez('VelocitiesR_%05d' % iiout,\
OmegaR=OmegaR,\
- rbins=rbins,\
+ vr_r=vr_r,\
+ rbins=rbins_out,\
tout=npz["tout"])
# Close Open File, Free Memory
diff --git a/comp_VelocitiesXY.py b/comp_VelocitiesXY.py
index 6eef5e0..9a59131 100644
--- a/comp_VelocitiesXY.py
+++ b/comp_VelocitiesXY.py
@@ -118,11 +118,13 @@ def do_comp_VelocitiesXY(iiout, \
# Reshape, Rename Arrays
OmegaXY = OmegaXY.reshape(nx, ny)
VelocityXY = vxy.reshape(nx, ny)
+ vr_xy = vr.reshape(nx, ny)
# Save Z-Averaged Planar Angular Velocity Map
np.savez('VelocitiesXY_%05d.npz' % iiout, \
OmegaXY=OmegaXY,\
VelocityXY = VelocityXY, \
+ vr_xy = vr_xy, \
x=x, y=y, z=z,\
center = center, radius = radius, thickness = thickness, \
nx = nx, ny = ny, nz = nz, \