|
1 | 1 | """ |
2 | 2 | Average Photon Energy Calculation |
3 | | -============================ |
| 3 | +================================= |
4 | 4 |
|
5 | 5 | Calculation of the Average Photon Energy from SPECTRL2 output. |
6 | 6 | """ |
|
85 | 85 | plt.ylim(0, 1.8) |
86 | 86 | plt.ylabel(r"Spectral irradiance (Wm⁻²nm⁻¹)") |
87 | 87 | plt.xlabel(r"Wavelength (nm)") |
88 | | -time_labels = times.strftime("%H:%M") |
| 88 | +time_labels = times.strftime("%H%M") |
89 | 89 | labels = [ |
90 | | - "{}, AM={:0.02f}".format(*vals) |
91 | | - for vals in zip(time_labels, relative_airmass) |
| 90 | + f"{t}, {am_:0.02f}" |
| 91 | + for t, am_ in zip(time_labels, relative_airmass) |
92 | 92 | ] |
93 | | -plt.legend(labels) |
| 93 | +plt.legend(labels, title="Time, AM") |
94 | 94 | plt.show() |
95 | 95 |
|
96 | 96 | # %% |
|
116 | 116 | plt.ylim(0, 0.0018) |
117 | 117 | plt.ylabel(r"Normalised Irradiance (nm⁻¹)") |
118 | 118 | plt.xlabel(r"Wavelength (nm)") |
119 | | -time_labels = times.strftime("%H:%M") |
| 119 | +time_labels = times.strftime("%H%M") |
120 | 120 | labels = [ |
121 | | - "{}, AM={:0.02f}".format(*vals) |
122 | | - for vals in zip(time_labels, relative_airmass) |
| 121 | + f"{t}, {am_:0.02f}" |
| 122 | + for t, am_ in zip(time_labels, relative_airmass) |
123 | 123 | ] |
124 | | -plt.legend(labels) |
| 124 | +plt.legend(labels, title="Time, AM") |
125 | 125 | plt.show() |
126 | 126 |
|
127 | 127 | # %% |
|
165 | 165 | plt.ylim(0, 0.0018) |
166 | 166 | plt.ylabel(r"Normalised Irradiance (nm⁻¹)") |
167 | 167 | plt.xlabel(r"Wavelength (nm)") |
168 | | -time_labels = times.strftime("%H:%M") |
| 168 | +time_labels = times.strftime("%H%M") |
169 | 169 | labels = [ |
170 | | - "{}, APE={:0.02f}".format(*vals) |
171 | | - for vals in zip(time_labels, ape) |
| 170 | + f"{t}, {ape_:0.02f}" |
| 171 | + for t, ape_ in zip(time_labels, ape) |
172 | 172 | ] |
173 | | -plt.legend(labels) |
| 173 | +plt.legend(labels, title="Time, APE (eV)") |
174 | 174 | plt.show() |
175 | 175 |
|
176 | 176 | # %% |
|
0 commit comments