the serveur will be in maintenance mode Thursday February 25 from 7:00 to 12:00 ( git and registry will be unreacheable)

Commit 5b180b4d authored by LAMBERT Jean-charles's avatar LAMBERT Jean-charles

some fixes

parent 09308952
......@@ -64,6 +64,7 @@ PLease visit :
- [UNSIO project home page](https://projets.lam.fr/projects/unsio)
- [UNSIO Python reading manual](https://projets.lam.fr/projects/unsio/wiki/PythonReadDataNew)
- [UNSIO Python writing manual](https://projets.lam.fr/projects/unsio/wiki/PythonWriteDataNew)
- [UNSIO Pypi page](https://pypi.org/project/python-unsio/)
- [NEMO home page](https://teuben.github.io/nemo/)
## Copyright
......
......@@ -409,7 +409,8 @@ class C2dplot:
#
def fullProcess(self,uns,out="",component=None,xrange=20.,sigma=6.0,mergers="",cmap="jet",
cpt=0,noxz=False,contour=False,nc=20,center_cod=None,nopart=False,
rect_sim=None, rect_comp="stars-stars",rect_dir="rectify2",rect_suffix="ev"):
rect_sim=None, rect_comp="stars-stars",rect_dir="rectify2",rect_suffix="ev",
circle=0.0):
t0=time.clock()
sigma_ori=sigma
xrange_ori=xrange
......@@ -418,6 +419,7 @@ class C2dplot:
self.__rect_comp = rect_comp
self.__rect_dir = rect_dir
self.__rect_suffix = rect_suffix
self.__circle = circle
self.__x={}
# set color map
comp_cmap=self.__setCmapComponents(cmap)
......@@ -750,7 +752,10 @@ class C2dplot:
img=ax.imshow(zd , origin='lower',cmap=cmap, norm = matplotlib.colors.LogNorm(),extent=[view_xmin, view_xmax, view_ymin, view_ymax])
if self.__circle!="" :
for radius in self.__circle.split(","):
cc=plt.Circle((0.,0.),float(radius),color='r',fill=False)
ax.add_artist(cc)
#cax=fig.add_axes(np.linspace(np.log(zd.min()),np.log(zd.max()),4))
#fig.colorbar(img,orientation='vertical',shrink=0.8,ticks=[np.linspace(1,zd.max(),15)])
......@@ -802,6 +807,7 @@ def commandLine():
parser.add_argument('--noxz',help='no XZ projection',dest="noxz", action="store_true", default=False)
parser.add_argument('--nopart',help='not display particles number',dest="nopart", action="store_true", default=False)
parser.add_argument('--contour',help='toggle iso contour display',dest="contour", action="store_true", default=False)
parser.add_argument('--circle',help='Draw circles with given radius[,radius1,radius2] centered in 0,0,0. ',dest="circle", default="", type=str)
parser.add_argument('--nc',help='#levels contour',default=20,type=int)
parser.add_argument('--cpt', help="index of the image (out.cpt.jpg)",default=0,type=int)
parser.add_argument('--verbose',help='verbose mode',dest="verbose", action="store_true", default=False)
......@@ -840,7 +846,7 @@ def process(args):
c.fullProcess(uns=uns,out=args.out,component=args.component,xrange=float(args.range),sigma=args.sigma,
mergers=args.mergers,cmap=args.cmap,cpt=cpt,noxz=args.noxz, contour=args.contour,
nc=args.nc,center_cod=args.cod,nopart=args.nopart,
rect_sim=args.rect_sim,rect_comp=args.rect_comp,rect_dir=args.rect_dir,rect_suffix=args.rect_suffix)
rect_sim=args.rect_sim,rect_comp=args.rect_comp,rect_dir=args.rect_dir,rect_suffix=args.rect_suffix, circle=args.circle)
cpt =cpt+1
# else:
# print ("[%s] is not a UNS snapshot ..."%(simname))
......
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