API Reference Manual#
This guide provides documentation for all modules, and functions, within PyScanCf for those in the public API.
- pyscancf.cfrad(input_dir, output_dir, scan_type='B', dualpol=False, gridder=False, plot=None, nf=None)[source]#
Aggregate radar data into CfRadial1 format.
- Parameters:
input_dir (str) – The directory path containing single-sweep radar data files.
output_dir (str) – The directory path where the output data will be saved in CfRadial1 format.
scan_type (str, optional) – The scan type, either “B” for short-range PPI (Plan Position Indicator) or “C” for long-range PPI. Default is “B”.
dualpol (bool, optional) – Specifies whether the radar data contains dual-polarization products such as ZDR (Differential Reflectivity) and RHOHV (Correlation Coefficient). Set to True if present, otherwise False. Default is False.
gridder (bool, optional) – Indicates whether data gridding should be performed. Set to True for data gridding, otherwise False. Default is False.
plot (str, optional) – Type of plots to generate for visualization. Options include “REF” for reflectivity, “VEL” for velocity, “WIDTH” for spectrum width, or “ALL” for all available plots. Default is None, which generates no plots.
nf (int, optional) – Number of data files to group together during aggregation. Default is None, meaning all available files will be aggregated together.
- pyscancf.get_grid(radar, grid_shape=(30, 500, 500), height=15, length=250)[source]#
Transform Cfradial radar data into a three-dimensional grid representation.
- Parameters:
radar (pyart.core.Radar) – The radar object containing the Cfradial data to be transformed.
grid_shape (tuple, optional) – The shape of the grid to be created in terms of the number of bins in the z, y, and x dimensions, respectively. Default is (30, 500, 500).
height (int, optional) – The altitude or height in kilometers to which the grid will extend. Default is 15 km.
length (int, optional) – The maximum range in kilometers for the radar coverage. Default is 250 km.
- Returns:
grid (pyart.core.Grid) – A three-dimensional grid representation of the radar data.
- maxcappi.plot_cappi(grid, moment, cmap=None, vmin=None, vmax=None, title=None, colorbar=True, range_rings=True, crosshair=True, dpi=100, show_progress=True, savedir=None, show_figure=True, **kwargs)[source]#
Plots CAPPI grid: pyart grid object, moment(str): radar moment e.g., “REF”, “VEL”, “WIDTH” cmap: matplotlib colormap, optional vmin: minimum value for color scaling, optional vmax: maximum value for color scaling, optional title: plot title, optional colorbar: bool, plot colorbar or not, (default: True), optional range_rings: bool, (50 km interval), (default: True), optional crosshair: bool, (default: True), optional dpi: int, (default: 100), optional show_progress: bool, (default: True) savedir: string, path to save the plot, optional