MCPcopy Create free account
hub / github.com/NatLabRockies/rdtools / soiling_rate_histogram

Function soiling_rate_histogram

rdtools/plotting.py:256–290  ·  view source on GitHub ↗

Create histogram of soiling rates found 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. Parameters

(soiling_info, bins=None)

Source from the content-addressed store, hash-verified

254
255
256def soiling_rate_histogram(soiling_info, bins=None):
257 '''
258 Create histogram of soiling rates found in the SRR analysis.
259
260 .. warning::
261 The soiling module is currently experimental. The API, results,
262 and default behaviors may change in future releases (including MINOR
263 and PATCH releases) as the code matures.
264
265 Parameters
266 ----------
267 soiling_info : dict
268 ``soiling_info`` returned by :py:meth:`.soiling.SRRAnalysis.run` or
269 :py:func:`.soiling.soiling_srr`.
270 bins : int
271 number of histogram bins to use
272
273 Returns
274 -------
275 fig : matplotlib.figure.Figure
276 '''
277 warnings.warn(
278 'The soiling module is currently experimental. The API, results, '
279 'and default behaviors may change in future releases (including MINOR '
280 'and PATCH releases) as the code matures.', stacklevel=2
281 )
282
283 soiling_summary = soiling_info['soiling_interval_summary']
284 fig, ax = plt.subplots()
285 ax.hist(100.0 * soiling_summary.loc[soiling_summary['valid'],
286 'soiling_rate'], bins=bins)
287 ax.set_xlabel('Soiling rate (%/day)')
288 ax.set_ylabel('Count')
289
290 return fig
291
292
293def tune_filter_plot(signal, mask, display_web_browser=False):

Callers 2

Calls

no outgoing calls

Tested by 2