readgssi.dzt (reads DZTs)

readgssi.dzt.header_info(header, data)

Function to print relevant header data.

readgssi.dzt.readdzt(infile, gps=Empty DataFrame Columns: [] Index: [], spm=None, start_scan=0, num_scans=-1, epsr=None, antfreq=[None, None, None, None], verbose=False, zero=[None, None, None, None])

Function to unpack and return things the program needs from the file header, and the data itself.

  • infile (str) – The DZT file location

  • gps (bool) – Whether a GPS file exists. Defaults to False, but changed to pandas.DataFrame if a DZG file with the same name as infile exists.

  • spm (float) – User value of samples per meter, if specified. Defaults to None.

  • epsr (float) – User value of relative permittivity, if specified. Defaults to None.

  • zero (list[int,int,int,int]) – List of time-zero values per channel. Defaults to a list of None values, which resolves to rh_zero.

  • verbose (bool) – Verbose, defaults to False

Return type

header (dict), radar array (numpy.ndarray), gps (False or pandas.DataFrame)


Function to read dates from rfDateByte binary objects in DZT headers.

DZT rfDateByte objects are 32 bits of binary (01001010111110011010011100101111), structured as little endian u5u6u5u5u4u7 where all numbers are base 2 unsigned int (uX) composed of X number of bits. Four bytes is an unnecessarily high level of compression for a single date object in a filetype that often contains tens or hundreds of megabytes of array information anyway.

So this function reads (seconds/2, min, hr, day, month, year-1980) then does seconds*2 and year+1980 and returns a datetime object.

For more information on rfDateByte, see page 55 of GSSI’s SIR 3000 manual.


bytes (bytes) – The rfDateByte to be decoded

Return type