aidas.io.RadarImage#
- class aidas.io.RadarImage[source]#
This class contains the basic data for predicting the lake-breeze front location from radar. It includes parameters for storing the radar data for later analysis in Py-ART and for inference in the lake-breeze prediction model.
- Parameters:
pyart_object (
pyart.core.Radar()or str) – The PyART radar object that stores the radar data. This could also be a link to the radar scan file (useful for batch processing to preserve memory).lat_range (2-tuple) – The minimum and maximum latitude of the inference domain.
lon_range (2-tuple) – The minimum and maximum longitude of the inference domain.
grid_lat (ndarray) – The latitude of each point in the inference domain.
grid_lon (ndarray) – The longitude of each point in the inference domain.
pytorch_image (
torch.Tensor()) – The tensor containing the preprocessed radar scan for inference.lakebreeze_mask (256 x 256 ndarray) – The inferred lake breeze mask, where 1 = lakebreeze and 0 = not a lake breeze.
times (list of np.datetime64('s')) – The epoch time of the radar scans.
velocity_wave_mask (ny x nx ndarray) – The radial velocity wave mask from
aidas.model.detect_velocity_waves(), where 1 = wave signature and 0 = no wave signature. Unlikelakebreeze_mask, which is stored transposed, this mask is indexed[y, x]– the first axis runs north, the second east – so it lines up withwave_grid_latandwave_grid_lonwithout a transpose.wave_grid_x (ndarray) – The east and north distance of each wave mask column and row from the radar in metres.
wave_grid_y (ndarray) – The east and north distance of each wave mask column and row from the radar in metres.
wave_grid_lat (ny x nx ndarray) – The latitude and longitude of every point of the wave mask in degrees. These are two dimensional because the wave mask is on a Cartesian grid centred on the radar rather than on a latitude/longitude grid.
wave_grid_lon (ny x nx ndarray) – The latitude and longitude of every point of the wave mask in degrees. These are two dimensional because the wave mask is on a Cartesian grid centred on the radar rather than on a latitude/longitude grid.
wave_scan_times (2-tuple of np.datetime64('s')) – The times of the two sweeps that were differenced to make the wave mask, earlier first. These are the times of the sweeps themselves rather than of the volumes holding them, which are minutes earlier. The gap between them sets which waves are detectable, so it is kept with the mask.
wave_sweep (int) – The index of the sweep of
pyart_objectthe wave mask was made from. On a NEXRAD split cut this is the Doppler cut, which is not the first sweep at that elevation.wave_sweep_radar (
pyart.core.Radar()) – That sweep on its own, holding the velocity the mask was computed from: censored, despeckled and dealiased. It is a copy, so the volume inpyart_objectstill holds the raw folded velocities.
- __init__()#
Methods
__init__()aggregate([start_time, end_time])This function aggregates the lake breeze mask over a specified time period.
Attributes
aggregated_maskgrid_latgrid_lonlakebreeze_masklat_rangelon_rangepyart_objectpytorch_imagetimesvelocity_wave_maskwave_grid_latwave_grid_lonwave_grid_xwave_grid_ywave_scan_timeswave_sweepwave_sweep_radar