-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathatbdstacked2.py
96 lines (69 loc) · 2.66 KB
/
atbdstacked2.py
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
"""
script for making a stacked plot for the ATBD
This is for a 5-row figure made from beaf frames
"""
import imageio.v3 as iio
import numpy as np
import matplotlib.pyplot as plt
dir = '/home/mark.miesch/Products/image_processing/frames/'
outdir = '/home/mark.miesch/Products/image_processing/figs/'
fig = 2
if fig == 1:
#file1 = dir + 'stereo_2012_09_16_ba/frame_019.png'
file1 = dir + 'stereo_2012_09_16_ba/frame_119.png'
file2 = dir + '2012_04_16/frame_001.png'
outfile = outdir+'L3survey1.png'
elif fig == 2:
file1 = dir + '2021_05_23_f6/frame_035.png'
file2 = dir + '2021_05_noh/frame_037.png'
outfile = outdir+'L3survey2.png'
elif fig == 3:
file1 = dir + '2014_01_16_ba/frame_174.png'
file2 = dir + 'CME0/frame_027.png'
outfile = outdir+'L3survey3.png'
elif fig == 4:
#file1 = dir + '2021_05_23_f6/frame_079.png'
#file1 = dir + '2021_05_23_f6/frame_129.png'
file1 = dir + '2021_05_23_f6/frame_127.png'
#file1 = dir + '2014_01_16_ba/frame_040.png'
#file2 = dir + '2014_01_16_ba/frame_094.png'
file2 = dir + '2014_01_16_ba/frame_092.png'
outfile = outdir+'L3survey4.png'
elif fig == 5:
#file1 = dir + '2021_05_23_f6/frame_129.png'
#file1 = dir + '2014_01_16_ba/frame_051.png'
#file2 = dir + '2014_01_16_ba/frame_052.png'
file1 = dir + '2014_01_16_ba/frame_049.png'
file2 = dir + '2014_01_16_ba/frame_050.png'
outfile = outdir+'L3survey5.png'
elif fig == 6:
file1 = dir + 'CME0_gaussian/frame_027.png'
file2 = dir + 'CME0_salt/frame_027.png'
outfile = outdir+'L3noise.png'
else:
print("enter a valid fig number")
exit()
#------------------------------------------------------------------------------
row1 = iio.imread(file1)
row2 = iio.imread(file2)
#------------------------------------------------------------------------------
fig, ax = plt.subplots(nrows=2, ncols=1, figsize = (14,12))
plt.subplots_adjust(hspace=-0.4)
ax[0].imshow(row1)
ax[0].axis('off')
ax[1].imshow(row2)
ax[1].axis('off')
fig.tight_layout(pad=1,rect=(0.0,0.0,1.0,1.0))
xx1 = .08
yy2 = 0.92
plt.annotate("(a)", (xx1,yy2), xycoords = 'figure fraction', color='white', \
fontsize = 'x-large', fontweight = 'semibold')
xx2 = xx1 + 0.41
plt.annotate("(b)", (xx2,yy2), xycoords = 'figure fraction', color='white', \
fontsize = 'x-large', fontweight = 'semibold')
yy1 = 0.44
plt.annotate("(c)", (xx1,yy1), xycoords = 'figure fraction', color='white', \
fontsize = 'x-large', fontweight = 'semibold')
plt.annotate("(d)", (xx2,yy1), xycoords = 'figure fraction', color='white', \
fontsize = 'x-large', fontweight = 'semibold')
plt.savefig(outfile,bbox_inches='tight')