apply_mistnet {bioRad}R Documentation

Apply MistNet segmentation to a polar volume


Apply MistNet segmentation model to a polar volume file on disk, and load the resultant segmentation as a polar volume (pvol) object.


  verbose = FALSE,
  mount = dirname(file),
  load = TRUE,
  mistnet_elevations = c(0.5, 1.5, 2.5, 3.5, 4.5)



character. File path for a radar polar volume.


character. Filename for the polar volume to be stored, including the MistNet segmentation results


logical. When TRUE, pipe Docker stdout to R console. On Windows always TRUE.


character. String with the mount point (a directory path) for the Docker container.


on completion load the data


numeric vector of length 5. Elevation angles to feed to the MistNet segmentation model, which expects exactly 5 elevation scans at 0.5, 1.5, 3.5, 3.5 and 4.5 degrees. Specifying different elevation angles may compromise segmentation results.


MistNet is a deep convolutional neural network that has been trained using labels derived from S-band dual-polarization data across the US NEXRAD network.

It's purpose is to screen out areas of precipitation in weather radar data, primarily legacy data for which dual-polarization data are not available.

Because the network has been trained on S-band data, it may not perform as well on C-band.

MistNet requires three single-polarization parameters as input: reflectivity (DBZH), radial velocity (VRADH), and spectrum width (WRADH), at 5 specific elevation angles (0.5, 1.5, 3.5, 3.5 and 4.5 degrees). Based on these data it can estimate a segmentation mask that identifies pixels with weather that should be removed when interested only in biological data.

MistNet will calculate three class probabilities (from 0 to 1, with 1 corresponding to a 100% probability) as additional scan parameters to the polar volume:


class probability that no signal was detected above the noise level of the radar


class probability that weather was detected


class probability that biological scatterers were detected

These class probabilities are only available for the 5 input elevations used as input for the MistNet model. Based on all the class probabilities a final weather segmentation map calculated, stored as scan parameter CELL, which is available for all elevation scans.


Final weather segmentation, with values > 1 indicating pixels classified as weather, and values equal to 1 indicating pixels that are located within 5 km distance of a weather pixels

A pixel is classified as weather if the class probability WEATHER > 0.45 or when the average class probability for rain across all five MistNet elevation scans at that spatial location > 0.45.

MistNet may run more slowly on Windows than on Linux or Mac OSX.

See Lin et al. 2019 for details.


If parameter load is TRUE an object of class pvol on success. If parameter load is FALSE, TRUE on success.


Please also cite this publication when using MistNet:


## Not run: 
# download a NEXRAD file, save as KBGM_example
  sep = ""
), "~/KBGM_example")

# calculate MistNet segmentation:
mistnet_pvol <- apply_mistnet("~/KBGM_example")

# print summary info for the segmented elevation scan at 0.5 degree,
# verify new parameters BIOLOGY, WEATHER, BACKGROUND and CELL have been added:
my_scan <- get_scan(mistnet_pvol, 0.5)

# project the scan as a ppi:
my_ppi <- project_as_ppi(my_scan, range_max = 100000)

# plot the reflectivity parameter:
plot(my_ppi, param = "DBZH")

# plot the MistNet class probability [0-1] for weather
plot(my_ppi, param = "WEATHER")

# plot the MistNet class probability [0-1] for biology
plot(my_ppi, param = "BIOLOGY")

# plot the final segmentation result, with values >1 indicating
# areas classified as weather, and value 1 pixels that fall within an
# additional 5 km fringe around weather areas.
plot(my_ppi, param = "CELL")

# clean up:

## End(Not run)

[Package bioRad version 0.5.2 Index]