pyrad.prod.generate_monitoring_products#

pyrad.prod.generate_monitoring_products(dataset, prdcfg)[source]#

generates a monitoring product. With the parameter ‘hist_type’ the user may define if the product is computed for each radar volume (‘instant’) or at the end of the processing period (‘cumulative’). Default is ‘cumulative’. Accepted product types:

‘ANGULAR_DENSITY’: For a specified elevation angle, plots a 2D

histogram with the azimuth angle in the X-axis and the data values in the Y-axis. The reference values and the user defined quantiles are also plot on the same figure User defined parameters:

anglenr: int

The elevation angle number to plot

quantiles: list of floats

The quantiles to plot. Default 25., 50., 75.

ref_value: float

The reference value

vmin, vmaxfloats or None

The minimum and maximum values of the data points. If not specified they are obtained from the Py-ART config file

‘CUMUL_VOL_TS’: Plots time series of the average of instantaneous

quantiles stored in a csv file. User defined parameters:

quantiles: list of 3 floats

the quantiles to compute. Default 25., 50., 75.

ref_value: float

The reference value. Default 0

sort_by_date: Bool

If true when reading the csv file containing the statistics the data is sorted by date. Default False

rewrite: Bool

If true the csv file containing the statistics is rewritten

add_data_in_fname: Bool

If true and the data used is cumulative the year is written in the csv file name and the plot file name

npoints_min: int

Minimum number of points to use the data point in the plotting and to send an alarm. Default 0

vmin, vmax: float or None

Limits of the Y-axis (data value). If None the limits are obtained from the Py-ART config file

alarm: Bool

If true an alarm is sent

tol_abs: float

Margin of tolerance from the reference value. If the current value is above this margin an alarm is sent. If the margin is not specified it is not possible to send any alarm

tol_trend: float

Margin of tolerance from the reference value. If the trend of the last X events is above this margin an alarm is sent. If the margin is not specified it is not possible to send any alarm

plot_until_year_end: Bool

If true will always set the xmax of the timeseries to the end of the current year

nevents_min: int

Minimum number of events with sufficient points to send an alarm related to the trend. If not specified it is not possible to send any alarm

sender: str

The mail of the alarm sender. If not specified it is not possible to send any alarm

receiver_list: list of str

The list of emails of the people that will receive the alarm.. If not specified it is not possible to send any alarm

‘PPI_HISTOGRAM’: Plots a histogram of data at a particular

elevation angle. User defined parameters:

anglenr: int

The elevation angle number to plot

‘SAVEVOL’: Saves the monitoring data in a C/F radar file. The data

field contains histograms of data for each pair of azimuth and elevation angles

‘VOL_HISTOGRAM’: Plots a histogram of data collected from all the

radar volume. User defined parameters:

write_data: bool

If true the resultant histogram is also saved in a csv file. Default True.

‘VOL_TS’: Computes statistics of the gathered data and writes them in

a csv file and plots a time series of those statistics. User defined parameters:

quantiles: list of 3 floats

the quantiles to compute. Default 25., 50., 75.

ref_value: float

The reference value. Default 0

sort_by_date: Bool

If true when reading the csv file containing the statistics the data is sorted by date. Default False

rewrite: Bool

If true the csv file containing the statistics is rewritten

add_data_in_fname: Bool

If true and the data used is cumulative the year is written in the csv file name and the plot file name

npoints_min: int

Minimum number of points to use the data point in the plotting and to send an alarm. Default 0

vmin, vmax: float or None

Limits of the Y-axis (data value). If None the limits are obtained from the Py-ART config file

alarm: Bool

If true an alarm is sent

tol_abs: float

Margin of tolerance from the reference value. If the current value is above this margin an alarm is sent. If the margin is not specified it is not possible to send any alarm

tol_trend: float

Margin of tolerance from the reference value. If the trend of the last X events is above this margin an alarm is sent. If the margin is not specified it is not possible to send any alarm

plot_until_year_end: Bool

If true will always set the xmax of the timeseries to the end of the current year

nevents_min: int

Minimum number of events with sufficient points to send an alarm related to the trend. If not specified it is not possible to send any alarm

sender: str

The mail of the alarm sender. If not specified it is not possible to send any alarm

receiver_list: list of str

The list of emails of the people that will receive the alarm.. If not specified it is not possible to send any alarm

Parameters:
  • dataset (dictionary) – dictionary containing a histogram object and some metadata

  • prdcfg (dictionary of dictionaries) – product configuration dictionary of dictionaries

Returns:

filename (str) – the name of the file created. None otherwise