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. Unlike lakebreeze_mask, which is stored transposed, this mask is indexed [y, x] – the first axis runs north, the second east – so it lines up with wave_grid_lat and wave_grid_lon without 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_object the 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 in pyart_object still 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_mask

grid_lat

grid_lon

lakebreeze_mask

lat_range

lon_range

pyart_object

pytorch_image

times

velocity_wave_mask

wave_grid_lat

wave_grid_lon

wave_grid_x

wave_grid_y

wave_scan_times

wave_sweep

wave_sweep_radar