Commit 7c6fda7d authored by LAMBERT Jean-charles's avatar LAMBERT Jean-charles
Browse files

refactoring...

parent 3944b8de
#!/usr/bin/env python #!/usr/bin/env python
from __future__ import print_function from __future__ import print_function
import sys import sys
sys.path=['/home/jcl/works/GIT/uns_projects/py/modules/','/home/jcl/works/GIT/uns_projects/py/modules/simulations']+sys.path #sys.path=['/home/jcl/works/GIT/uns_projects/py/modules/','/home/jcl/works/GIT/uns_projects/py/modules/simulations']+sys.path
from simulations.cmovie import * from unsiotools.simulations.cmovie import *
import argparse import argparse
import os,glob,subprocess import os,glob,subprocess
......
...@@ -5,7 +5,7 @@ import sys ...@@ -5,7 +5,7 @@ import sys
import argparse,textwrap import argparse,textwrap
#sys.path=['/home/jcl/works/GIT/uns_projects/py/modules/','/home/jcl/works/GIT/uns_projects/py/modules/simulations']+sys.path #sys.path=['/home/jcl/works/GIT/uns_projects/py/modules/','/home/jcl/works/GIT/uns_projects/py/modules/simulations']+sys.path
from simulations.crectify import * from unsiotools.simulations.crectify import *
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# commandLine, parse the command line # commandLine, parse the command line
...@@ -45,5 +45,3 @@ def process(args): ...@@ -45,5 +45,3 @@ def process(args):
# main program # main program
if __name__ == '__main__': if __name__ == '__main__':
commandLine() commandLine()
...@@ -5,7 +5,7 @@ import matplotlib.pyplot as plt ...@@ -5,7 +5,7 @@ import matplotlib.pyplot as plt
# cnd line # cnd line
import sys, getopt,os.path import sys, getopt,os.path
#sys.path.append('/home/jcl/works/SVN/uns_projects/trunk/py/modules/') #sys.path.append('/home/jcl/works/SVN/uns_projects/trunk/py/modules/')
from uns_simu import * from unsiotools.uns_simu import *
import argparse import argparse
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
......
#!/usr/bin/env python #!/usr/bin/env python
from __future__ import print_function from __future__ import print_function
import sys import sys
sys.path=['/home/jcl/works/GIT/uns_projects/py/modules/','/home/jcl/works/GIT/uns_projects/py/modules/simulations']+sys.path #sys.path=['/home/jcl/works/GIT/uns_projects/py/modules/','/home/jcl/works/GIT/uns_projects/py/modules/simulations']+sys.path
import argparse import argparse
import os,glob import os,glob
import errno import errno
......
#!/usr/bin/env python #!/usr/bin/env python
from __future__ import print_function from __future__ import print_function
import sys import sys
sys.path=['/home/jcl/works/GIT/uns_projects/py/modules/','/home/jcl/works/GIT/uns_projects/py/modules/simulations']+sys.path #sys.path=['/home/jcl/works/GIT/uns_projects/py/modules/','/home/jcl/works/GIT/uns_projects/py/modules/simulations']+sys.path
from simulations.cmovie import * #from simulations.cmovie import *
import argparse import argparse
import os,glob import os,glob
......
#!/usr/bin/env python #!/usr/bin/env python
import sys import sys
from uns_simu import * #from unsiotools.uns_simu import *
from simulations.ccod import * #from simulations.ccod import *
import argparse import argparse
sys.path=['/home/jcl/works/GIT/uns_projects/py/modules/','/home/jcl/works/GIT/uns_projects/py/modules/simulations']+sys.path #sys.path=['/home/jcl/works/GIT/uns_projects/py/modules/','/home/jcl/works/GIT/uns_projects/py/modules/simulations']+sys.path
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# commandLine, parse the command line # commandLine, parse the command line
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
from __future__ import print_function from __future__ import print_function
import sys import sys
#sys.path=['/home/jcl/works/GIT/uns_projects/py/modules/','/home/jcl/works/GIT/uns_projects/py/modules/simulations']+sys.path #sys.path=['/home/jcl/works/GIT/uns_projects/py/modules/','/home/jcl/works/GIT/uns_projects/py/modules/simulations']+sys.path
from uns_simu import * #from unsiotools.uns_simu import *
from simulations.ccod import * from unsiotools.simulations.ccod import *
import argparse import argparse
......
...@@ -2,12 +2,11 @@ ...@@ -2,12 +2,11 @@
from __future__ import print_function from __future__ import print_function
import sys import sys
sys.path=['/home/jcl/works/GIT/uns_projects/py/modules/','/home/jcl/works/GIT/uns_projects/py/modules/simulations']+sys.path #sys.path=['/home/jcl/works/GIT/uns_projects/py/modules/','/home/jcl/works/GIT/uns_projects/py/modules/simulations']+sys.path
#from py_unstools import * # import py_unstools package #from py_unstools import * # import py_unstools package
from unsio import * #from unsio import *
from uns_simu import * #from general.ctools import *
from general.ctools import *
import argparse import argparse
import os,subprocess import os,subprocess
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
from __future__ import print_function from __future__ import print_function
import sys import sys
#sys.path=['/home/jcl/works/GIT/uns_projects/py/modules/','/home/jcl/works/GIT/uns_projects/py/modules/simulations']+sys.path #sys.path=['/home/jcl/works/GIT/uns_projects/py/modules/','/home/jcl/works/GIT/uns_projects/py/modules/simulations']+sys.path
from simulations.cmovie import * from unsiotools.simulations.cmovie import *
import argparse import argparse
......
...@@ -4,7 +4,7 @@ from __future__ import print_function ...@@ -4,7 +4,7 @@ from __future__ import print_function
import sys import sys
import numpy as np import numpy as np
import argparse import argparse
from uns_simu import * from unsiotools.uns_simu import *
import os.path import os.path
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# commandLine, parse the command line # commandLine, parse the command line
......
...@@ -9,9 +9,9 @@ import numpy as np ...@@ -9,9 +9,9 @@ import numpy as np
import argparse import argparse
import matplotlib import matplotlib
matplotlib.use('Agg') matplotlib.use('Agg')
sys.path=['/home/jcl/works/GIT/uns_projects/py/modules/','/home/jcl/works/GIT/uns_projects/py/modules/simulations']+sys.path #sys.path=['/home/jcl/works/GIT/uns_projects/py/modules/','/home/jcl/works/GIT/uns_projects/py/modules/simulations']+sys.path
from simulations.cuns_analysis import * from unsiotools.simulations.cuns_analysis import *
# #
...@@ -55,6 +55,3 @@ def process(args): ...@@ -55,6 +55,3 @@ def process(args):
# main program # main program
if __name__ == '__main__': if __name__ == '__main__':
commandLine() commandLine()
...@@ -2,16 +2,15 @@ ...@@ -2,16 +2,15 @@
from __future__ import print_function from __future__ import print_function
import sys import sys
sys.path=['/home/jcl/works/GIT/uns_projects/py/modules/','/home/jcl/works/GIT/uns_projects/py/modules/simulations']+sys.path #sys.path=['/home/jcl/works/GIT/uns_projects/py/modules/','/home/jcl/works/GIT/uns_projects/py/modules/simulations']+sys.path
#from py_unstools import * # import py_unstools package #from py_unstools import * # import py_unstools package
from unsio import * from unsio import *
from uns_simu import *
import argparse import argparse
import os,subprocess import os,subprocess
from simulations.creducesim import * from unsiotools.simulations.creducesim import *
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# commandLine, parse the command line # commandLine, parse the command line
...@@ -49,6 +48,3 @@ def process(args): ...@@ -49,6 +48,3 @@ def process(args):
# main program # main program
if __name__ == '__main__': if __name__ == '__main__':
commandLine() commandLine()
...@@ -8,7 +8,7 @@ import argparse,textwrap ...@@ -8,7 +8,7 @@ import argparse,textwrap
#sys.path=['/home/jcl/works/GIT/uns_projects/py/modules/','/home/jcl/works/GIT/uns_projects/py/modules/simulations']+sys.path #sys.path=['/home/jcl/works/GIT/uns_projects/py/modules/','/home/jcl/works/GIT/uns_projects/py/modules/simulations']+sys.path
import simulations.corbits as orbs import unsiotools.simulations.corbits as orbs
#from IPython import embed #from IPython import embed
......
...@@ -5,10 +5,10 @@ import numpy as np ...@@ -5,10 +5,10 @@ import numpy as np
import os,time import os,time
import sys import sys
import argparse,textwrap import argparse,textwrap
sys.path=['/home/jcl/works/GIT/uns_projects/py/modules/','/home/jcl/works/GIT/uns_projects/py/modules/simulations']+sys.path #sys.path=['/home/jcl/works/GIT/uns_projects/py/modules/','/home/jcl/works/GIT/uns_projects/py/modules/simulations']+sys.path
from simulations.c2dpgplot import * from unsiotools.simulations.c2dpgplot import *
from simulations.csnapshot import * from unsiotools.simulations.csnapshot import *
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# commandLine, parse the command line # commandLine, parse the command line
...@@ -42,9 +42,12 @@ def process(args): ...@@ -42,9 +42,12 @@ def process(args):
uns=CSnapshot(args.snapshot,args.component,verbose_debug=args.verbose) uns=CSnapshot(args.snapshot,args.component,verbose_debug=args.verbose)
ok=uns.nextFrame("") ok=uns.nextFrame("")
if ok: if ok:
print("here 0")
c=C2dpgplot() c=C2dpgplot()
#print("here 1")
c.draw(uns_snap=uns,select=args.component,outdev=args.dev,rrange=args.range,\ c.draw(uns_snap=uns,select=args.component,outdev=args.dev,rrange=args.range,\
prop=args.prop,psort=args.psort,pfname=args.pfname,cb=args.cb,cmap=args.cmap) prop=args.prop,psort=args.psort,pfname=args.pfname,cb=args.cb,cmap=args.cmap)
#print("here 2")
else: else:
print ("[%s] is not a UNS snapshot ..."%(simname)) print ("[%s] is not a UNS snapshot ..."%(simname))
except Exception as x : except Exception as x :
...@@ -55,5 +58,3 @@ def process(args): ...@@ -55,5 +58,3 @@ def process(args):
# main program # main program
if __name__ == '__main__': if __name__ == '__main__':
commandLine() commandLine()
...@@ -5,7 +5,7 @@ import numpy as np ...@@ -5,7 +5,7 @@ import numpy as np
import os,time import os,time
import sys import sys
import argparse,textwrap import argparse,textwrap
sys.path=['/home/jcl/works/GIT/uns_projects/py/modules/']+sys.path #sys.path=['/home/jcl/works/GIT/uns_projects/py/modules/']+sys.path
#from IPython import embed #from IPython import embed
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
...@@ -62,8 +62,8 @@ def process(args): ...@@ -62,8 +62,8 @@ def process(args):
# we import this modules here because # we import this modules here because
# matplotlib.use() must be done before importing matplotlib.pyplot # matplotlib.use() must be done before importing matplotlib.pyplot
import simulations.c2dplot as c2d import unsiotools.simulations.c2dplot as c2d
import simulations.csnapshot as csnap import unsiotools.simulations.csnapshot as csnap
try: try:
cpt = args.cpt cpt = args.cpt
uns=csnap.CSnapshot(args.snapshot,args.component,verbose_debug=args.verbose) uns=csnap.CSnapshot(args.snapshot,args.component,verbose_debug=args.verbose)
...@@ -87,5 +87,3 @@ def process(args): ...@@ -87,5 +87,3 @@ def process(args):
# main program # main program
if __name__ == '__main__': if __name__ == '__main__':
commandLine() commandLine()
#!/usr/bin/python #!/usr/bin/env python
import sys import sys
from uns_simu import * from unsiotools.uns_simu import *
from simulations.ccod import * from unsiotools.simulations.ccod import *
import argparse import argparse
sys.path=['/home/jcl/works/GIT/uns_projects/py/modules/','/home/jcl/works/GIT/uns_projects/py/modules/simulations']+sys.path #sys.path=['/home/jcl/works/GIT/uns_projects/py/modules/','/home/jcl/works/GIT/uns_projects/py/modules/simulations']+sys.path
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# commandLine, parse the command line # commandLine, parse the command line
......
File mode changed from 100644 to 100755
#!/usr/bin/env python #!/usr/bin/env python
from __future__ import print_function from __future__ import print_function
import sys #import sys
#sys.path=['/home/jcl/works/GIT/uns_projects/py/modules/','/home/jcl/works/GIT/uns_projects/py/modules/simulations']+sys.path #sys.path=['/home/jcl/works/GIT/uns_projects/py/modules/','/home/jcl/works/GIT/uns_projects/py/modules/simulations']+sys.path
from simulations.cmovie import * #from .cmovie import *
from unsiotools.uns_simu import *
from unsiotools.simulations.csnapshot import *
import argparse import argparse
......
...@@ -8,9 +8,9 @@ import argparse,textwrap ...@@ -8,9 +8,9 @@ import argparse,textwrap
#sys.path=['/home/jcl/works/GIT/uns_projects/py/modules/','/home/jcl/works/GIT/uns_projects/py/modules/simulations']+sys.path #sys.path=['/home/jcl/works/GIT/uns_projects/py/modules/','/home/jcl/works/GIT/uns_projects/py/modules/simulations']+sys.path
import simulations.cinert as cinert import unsiotools.simulations.cinert as cinert
#import simulations.csnapshot as csnap #import simulations.csnapshot as csnap
from simulations.csnapshot import * #from unsiotools.simulations.csnapshot import *
#from IPython import embed #from IPython import embed
...@@ -64,5 +64,3 @@ def process(args): ...@@ -64,5 +64,3 @@ def process(args):
# main program # main program
if __name__ == '__main__': if __name__ == '__main__':
commandLine() commandLine()
...@@ -8,7 +8,7 @@ import argparse,textwrap ...@@ -8,7 +8,7 @@ import argparse,textwrap
#sys.path=['/home/jcl/works/GIT/uns_projects/py/modules/','/home/jcl/works/GIT/uns_projects/py/modules/simulations']+sys.path #sys.path=['/home/jcl/works/GIT/uns_projects/py/modules/','/home/jcl/works/GIT/uns_projects/py/modules/simulations']+sys.path
import simulations.corbits as orbs import unsiotools.simulations.corbits as orbs
#from IPython import embed #from IPython import embed
......
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