radar

The radar module is very small, but houses functions used to process radar data. It focuses on UAVSAR data, which is data from a Synthetic Aperture Radar (SAR) on board an Unmanned Aerial Vehicle (UAV). Assists the user in building header data and converting to decibels.

Examples

Building a header file for UAVSAR data

UAVSAR data comes in .grd files that require a text header file with metadata information in order to be displayed in GIS or image processing software. This simple script will read in a folder containing the data and create a header file for each .grd file in it.

from dnppy import radar

folder = r"C:\folder"
radar.create_header(folder)

Converting backscatter values to decibels

Raw radar data has units of backscatter for its given polarization, but it is often more useful to convert these units to decibels (dB). This script will create a new tiff raster in decibel units from the original .grd file (which must also include the .hdr file).

from dnppy import radar

filename = r"C:\folder\file.grd"
radar.decibel_convert(filename)

Code Help

create_header(folder)[source]

Builds a header file for the input UAVSAR .grd file, allowing the data to be read as a raster dataset.

Parameters:folder – the folder containing the UAVSAR .grd and .ann files
decibel_convert(filename)[source]

Converts the input UAVSAR .grd file into units of decibels. Note that a .hdr file must be created and accompany the .grd/.inc files for this to work

Parameters:filename – the full file path string for the .grd data file
Return outname:filepath to output file created by this function.