RAVE
Lib.rave_hexquant Namespace Reference

Functions

 init ()
 Initializes QUANTITIES by reading content from XML file.
 
 qFromScan (scan)
 Initialize.
 
 qFromPvol (pvol)
 Digs out all the quantities in a PVOL.
 
 qFromFstr (fstr)
 Digs out the quantities from a given file string Assumes the hex string's location is fixed.
 
 q2hex (quants)
 Converts a list of quantities to a hex string.
 
 hex2q (h)
 Converts a hex string to a list of quantities.
 
 bitl2long (bitl)
 Bit list to long integer.
 
 long2bits (l)
 Long integer to bit string.
 
 hex2long (h)
 hex string to long integer
 

Variables

 QUANTFILE = os.path.join(RAVECONFIG, "odim_quantities.xml")
 
list QUANTITIES = []
 
int initialized = 0
 
 bitl = list(np.zeros((128,), np.uint8))
 
bool use_long_type = False
 

Detailed Description

Copyright (C) 2014- Swedish Meteorological and Hydrological Institute (SMHI)

This file is part of RAVE.

RAVE is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

RAVE is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License
along with RAVE.  If not, see <http://www.gnu.org/licenses/>.

Function Documentation

◆ bitl2long()

Lib.rave_hexquant.bitl2long ( bitl)

Bit list to long integer.

Parameters
listof 8-bit bytes, each representing one bit in a 64-bit integer
Returns
long integer

◆ hex2long()

Lib.rave_hexquant.hex2long ( h)

hex string to long integer

Parameters
hexstring
Returns
long integer

◆ hex2q()

Lib.rave_hexquant.hex2q ( h)

Converts a hex string to a list of quantities.

Parameters
hexstring
Returns
list of quantity strings

◆ init()

Lib.rave_hexquant.init ( )

Initializes QUANTITIES by reading content from XML file.

This is done once, after which the QUANTITIES are available in memory.

◆ long2bits()

Lib.rave_hexquant.long2bits ( l)

Long integer to bit string.

Parameters
longinteger
Returns
list of 8-bit bytes, each representing one bit in a 128-bit integer

◆ q2hex()

Lib.rave_hexquant.q2hex ( quants)

Converts a list of quantities to a hex string.

Parameters
listof quantity strings
Returns
hex string

◆ qFromFstr()

Lib.rave_hexquant.qFromFstr ( fstr)

Digs out the quantities from a given file string Assumes the hex string's location is fixed.

Parameters
stringfile name
Returns
list of quantity strings

◆ qFromPvol()

Lib.rave_hexquant.qFromPvol ( pvol)

Digs out all the quantities in a PVOL.

Parameters
PolarVolumeobject
Returns
list of quantity strings

◆ qFromScan()

Lib.rave_hexquant.qFromScan ( scan)

Initialize.

Digs out all the quantities in a SCAN

Parameters
PolarScanobject
Returns
list of quantity strings