forked from solveignaess/fourspheremodel
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathplot_test.py
More file actions
29 lines (24 loc) · 871 Bytes
/
plot_test.py
File metadata and controls
29 lines (24 loc) · 871 Bytes
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
import numpy as np
import matplotlib.pyplot as plt
import os.path
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('--directory', '-d',
default='results',
dest='results',
help='a path to the result directory')
args = parser.parse_args()
analy = np.load(os.path.join(args.results,
'Analytical_correct_all.npz'))
calc_ = np.load(os.path.join(args.results,
'CalcPotential4_correct_all.npz'))
for key_val in analy.keys():
plt.close('all')
plt.subplot(121)
plt.imshow(analy[key_val].reshape(180, 180), cmap=plt.cm.PRGn)
plt.colorbar()
plt.subplot(122)
plt.imshow(calc_[key_val], cmap=plt.cm.PRGn)
plt.colorbar()
plt.savefig(os.path.join(args.results,
key_val + '.png'))