Skip to content

Commit 3e7e230

Browse files
committed
working plotting library
1 parent 0bbefdd commit 3e7e230

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

python/plotting/plotter-example.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939

4040
stokes_ind=0 #we want stokes I
4141

42-
rapplot.plot_data_stokes(image,min,max,stokes_ind,data_id,fig,ax,halfrange,mas,label="Stokes I",cmap="afmhot")
42+
rapplot.plot_data_stokes(image,min,max,stokes_ind,data_id,fig,axs,halfrange,mas,label="Stokes I",cmap="afmhot")
4343

4444
fig.suptitle('t=%.01lf [days]'%(ind*10.*Tunit),fontsize=20)
4545

python/plotting/rapplot.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,18 @@
77
import h5py
88

99
G = 6.674e-8
10-
M = 1.989e33
10+
MSUN = 1.989e33
1111
SPEED_OF_LIGHT = 2.998e10
1212

1313
KPC = 3.086e21
1414
SEC_IN_DAY = 86400.
15-
AS_IN_DEG = 206264.806*1000.
15+
MAS_IN_DEG = 206264.806*1000.
1616

1717
def read_data_id(folder,ind):
1818
file_name = folder+'/img_data_%d.h5'%ind
1919
print("Reading keys from: ", file_name)
2020
images = h5py.File(file_name,'r')
21-
keys = images.keys()
21+
keys = [key for key in images.keys()]
2222
print(keys)
2323
images.close()
2424
return keys
@@ -34,7 +34,7 @@ def read_data(folder,ind,data_id):
3434
min = [-100.,-100.,-100.,-100.]
3535
max = [100.,100.,100,100.]
3636

37-
for j in range(0,len(data_id)):
37+
for j in range(0,len(data_id)-2):
3838
for i in range(0,len(images[data_id[j]])):
3939
current=np.max(images[data_id[j]][i])
4040
max[j]=np.maximum(max[j],np.max(images[data_id[j]][i]))

0 commit comments

Comments
 (0)