| 
24 | 24 | # `Modelling Spectral Irradiance  | 
25 | 25 | # <https://pvlib-python.readthedocs.io/en/stable/gallery/spectrum/plot_spectrl2_fig51A.html>`_  | 
26 | 26 | # example, which reproduces a figure from [4]_. The first step is to  | 
27 |  | -# import the required packages and define some basic system parameters and  | 
 | 27 | +# import the required packages and define some basic system parameters  | 
28 | 28 | # and meteorological conditions.  | 
29 | 29 | 
 
  | 
30 | 30 | # %%  | 
 | 
119 | 119 | plt.xlabel(r"Wavelength (nm)")  | 
120 | 120 | time_labels = times.strftime("%H:%M")  | 
121 | 121 | labels = [  | 
122 |  | -    "{}, AM {:0.02f}".format(*vals)  | 
 | 122 | +    "{}, AM={:0.02f}".format(*vals)  | 
123 | 123 |     for vals in zip(time_labels, relative_airmass)  | 
124 | 124 | ]  | 
125 | 125 | plt.legend(labels)  | 
 | 
138 | 138 | # %%  | 
139 | 139 | # Calculating the average photon energy  | 
140 | 140 | # -------------------------------------  | 
141 |  | -# To calculate the APE, first we must convert our output spectra from from the  | 
 | 141 | +# To calculate the APE, first we must convert our output spectra from the  | 
142 | 142 | # simulation into a compatible input for  | 
143 | 143 | # :py:func:`pvlib.spectrum.average_photon_energy`. Since we have more than one  | 
144 | 144 | # spectral irradiance distribution, a :py:class:`pandas.DataFrame` is  | 
 | 
168 | 168 | plt.xlabel(r"Wavelength (nm)")  | 
169 | 169 | time_labels = times.strftime("%H:%M")  | 
170 | 170 | labels = [  | 
171 |  | -    "{}, APE {:0.02f}".format(*vals)  | 
 | 171 | +    "{}, APE={:0.02f}".format(*vals)  | 
172 | 172 |     for vals in zip(time_labels, ape)  | 
173 | 173 | ]  | 
174 | 174 | plt.legend(labels)  | 
 | 
0 commit comments