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:
comp_cmap['all' ]='jet'
comp_cmap['gas' ]='jet'
comp_cmap['stars']='Paired'
comp_cmap['disk' ]='Paired'
comp_cmap['bndry']='Paired'
comp_cmap['disk' ]='Set3'
comp_cmap['bndry']='hsv'
comp_cmap['halo' ]='RdBu'
if len(cmap.split(","))==1 and len(cmap.split(":"))==1:
# set same cmap for all components
......@@ -456,17 +456,6 @@ class C2dplot:
y = pos[:,2] # z coordinates
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:
x -= center_xy[0]
......@@ -475,9 +464,13 @@ class C2dplot:
else:
y -= center_xz[1]
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
y -= ycom
#z -= zcom
else : # there are no particles
x=np.empty(0)
......
Markdown is supported
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