-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplotter.py
More file actions
executable file
·46 lines (38 loc) · 1.18 KB
/
plotter.py
File metadata and controls
executable file
·46 lines (38 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/usr/bin/env python
execfile('go')
yt.enable_parallelism()
if 0:
if len(sys.argv) < 3:
print "plotter.py frame name"
sys.exit(0)
frame = int( sys.argv[1])
name = sys.argv[2]
field_list = ['density','temperature']#,'metallicity']
eq42 = taxi.taxi(directory='/scratch/00369/tg456484/Paper42_NewAK/eq42_m9_grav_512_p59_ppm_L4_J32',name='eq42')
basedir = '/scratch/00369/tg456484/Paper42_NewAK/eq42_m9_grav_512_p59_ppm_L4_J32'
for frame in []: # range(54):
ds = yt.load('%s/DD%04d/data%04d'%(basedir,frame,frame))
p = yt.ProjectionPlot(ds,0,'density')
print p.save('eq42')
car=eq42
car.fill(0)
car.frames=[5] #car.frame_dict.keys()
car.fields=['density']
car.Colorbar='monotonic'
car.plot()
if 0:
do_the_vectors=False
if len(sys.argv) == 4:
print "her"
field_list += ['magnetic_energy']
do_the_vectors=True
for field in field_list:
print field
ds = yt.load('DD%04d/DD%04d'%(frame,frame))
proj = ds.proj(field,2)
pw = proj.to_pw() #width=(0.1,'code_length'))
if do_the_vectors:
pw.annotate_streamlines('Bx','By')
pw.save('%s_zoom_%04d'%(name, frame))
#end
#end