Create figure to visualize valid soiling profiles used in the SRR analysis. .. warning:: The soiling module is currently experimental. The API, results, and default behaviors may change in future releases (including MINOR and PATCH releases) as the code matures.
(soiling_info, normalized_yield, point_alpha=0.5,
profile_alpha=1, ymin=None, ymax=None,
point_color=None, profile_color=None)
| 200 | |
| 201 | |
| 202 | def soiling_interval_plot(soiling_info, normalized_yield, point_alpha=0.5, |
| 203 | profile_alpha=1, ymin=None, ymax=None, |
| 204 | point_color=None, profile_color=None): |
| 205 | ''' |
| 206 | Create figure to visualize valid soiling profiles used in the SRR analysis. |
| 207 | |
| 208 | .. warning:: |
| 209 | The soiling module is currently experimental. The API, results, |
| 210 | and default behaviors may change in future releases (including MINOR |
| 211 | and PATCH releases) as the code matures. |
| 212 | |
| 213 | Parameters |
| 214 | ---------- |
| 215 | soiling_info : dict |
| 216 | ``soiling_info`` returned by :py:meth:`.soiling.SRRAnalysis.run` or |
| 217 | :py:func:`.soiling.soiling_srr`. |
| 218 | normalized_yield : pandas.Series |
| 219 | PV yield data that is normalized, filtered and aggregated. |
| 220 | point_alpha : float, default 0.5 |
| 221 | tranparency of the ``normalized_yield`` points |
| 222 | profile_alpha : float, default 1 |
| 223 | transparency of soiling profile |
| 224 | ymin : float, optional |
| 225 | minimum y coordinate |
| 226 | ymax : float, optional |
| 227 | maximum y coordinate |
| 228 | point_color : str, optional |
| 229 | color of the ``normalized_yield`` points |
| 230 | profile_color : str, optional |
| 231 | color of the soiling intervals |
| 232 | |
| 233 | Returns |
| 234 | ------- |
| 235 | fig : matplotlib.figure.Figure |
| 236 | ''' |
| 237 | warnings.warn( |
| 238 | 'The soiling module is currently experimental. The API, results, ' |
| 239 | 'and default behaviors may change in future releases (including MINOR ' |
| 240 | 'and PATCH releases) as the code matures.', stacklevel=2 |
| 241 | ) |
| 242 | |
| 243 | sratio = soiling_info['soiling_ratio_perfect_clean'] |
| 244 | fig, ax = plt.subplots() |
| 245 | renormalized = normalized_yield / soiling_info['renormalizing_factor'] |
| 246 | ax.plot(renormalized.index, renormalized, 'o', c=point_color, alpha=point_alpha) |
| 247 | ax.plot(sratio.index, sratio, 'o', c=profile_color, alpha=profile_alpha) |
| 248 | ax.set_ylim(ymin, ymax) |
| 249 | ax.set_ylabel('Renormalized energy') |
| 250 | |
| 251 | fig.autofmt_xdate() |
| 252 | |
| 253 | return fig |
| 254 | |
| 255 | |
| 256 | def soiling_rate_histogram(soiling_info, bins=None): |