Commit 00831b9e authored by LAMBERT Jean-charles's avatar LAMBERT Jean-charles
Browse files

change colormap value for disk and bndry

parent 3682e23f
...@@ -313,8 +313,8 @@ class C2dplot: ...@@ -313,8 +313,8 @@ class C2dplot:
comp_cmap['all' ]='jet' comp_cmap['all' ]='jet'
comp_cmap['gas' ]='jet' comp_cmap['gas' ]='jet'
comp_cmap['stars']='Paired' comp_cmap['stars']='Paired'
comp_cmap['disk' ]='Paired' comp_cmap['disk' ]='Set3'
comp_cmap['bndry']='Paired' comp_cmap['bndry']='hsv'
comp_cmap['halo' ]='RdBu' comp_cmap['halo' ]='RdBu'
if len(cmap.split(","))==1 and len(cmap.split(":"))==1: if len(cmap.split(","))==1 and len(cmap.split(":"))==1:
# set same cmap for all components # set same cmap for all components
...@@ -456,17 +456,6 @@ class C2dplot: ...@@ -456,17 +456,6 @@ class C2dplot:
y = pos[:,2] # z coordinates y = pos[:,2] # z coordinates
nbody = x.size nbody = x.size
## if (rho.size > 0) :
## rho = np.log(rho)
## else:
## rho = z
# center according COM
xcom=np.average(x.astype(np.float64),weights=mass)
ycom=np.average(y.astype(np.float64),weights=mass)
#zcom=np.average(z.astype(np.float64),weights=mass)
if self.__vdebug:
print ("COM = ",xcom,ycom)
if ok_center: if ok_center:
x -= center_xy[0] x -= center_xy[0]
...@@ -475,9 +464,13 @@ class C2dplot: ...@@ -475,9 +464,13 @@ class C2dplot:
else: else:
y -= center_xz[1] y -= center_xz[1]
else: else:
# center according COM or COD if RHO exist
xcom=np.average(x.astype(np.float64),weights=mass*rho)
ycom=np.average(y.astype(np.float64),weights=mass*rho)
if self.__vdebug:
print ("COM = ",xcom,ycom)
x -= xcom x -= xcom
y -= ycom y -= ycom
#z -= zcom
else : # there are no particles else : # there are no particles
x=np.empty(0) x=np.empty(0)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment