RAVE
pycartesianparam.c File Reference

Python version of the Cartesian Parameter API. More...

#include "pyravecompat.h"
#include <limits.h>
#include <math.h>
#include <stdio.h>
#include <string.h>
#include "pyrave_debug.h"
#include "pycartesianparam.h"
#include "pyravefield.h"
#include "pyravelegend.h"
#include "arrayobject.h"
#include "rave_alloc.h"
#include "raveutil.h"
#include "rave.h"

Macros

#define NPY_NO_DEPRECATED_API   NPY_1_7_API_VERSION
 
#define PYCARTESIANPARAM_MODULE
 to get correct part of pycartesianparam.h
 
#define raiseException_gotoTag(tag, type, msg)
 Sets a python exception and goto tag.
 
#define raiseException_returnNULL(type, msg)
 Sets a python exception and return NULL.
 

Functions

 PYRAVE_DEBUG_MODULE ("_cartesianparam")
 Debug this module.
 
 PyDoc_STRVAR (_pycartesianparam_type_doc, "The cartesian parameter represents one cartesian parameter (quantity). The cartesian parameter is the data keeper " "for the cartesian object. The member attributes within the cartesian parameter represents the data content in some way. " "Since the parameter probably should contain a lot of attributes as defined in the ODIM H5 specification, these can be " "added within the attribute mapping (how/, what/, where/) groups. E.g. addAttribute(\"how/sthis\", 1.2).\n" "A list of avilable member attributes are described below. For information about member functions, check each functions doc.\n" "\n" "xsize - The xsize of the area represented. ReadOnly, initialization occurs when setting data using setData().\n" "ysize - The ysize of the area represented. ReadOnly, initialization occurs when setting data using setData().\n" "quantity - The quantity that this parameter represents, like DBZH, TH, ...\n" "gain - The gain value to use when scaling the value.\n" "offset - The offset to use when scaling the value.\n" "nodata - The value that represents a nodata (no coverage, ...)\n" "undetect - The value that represents undetect (coverage, but no hit)\n" "datatype - The data type. ReadOnly, initialization occurs when setting data using setData().\n" "legend - The legend if any." "\n" "Usage:\n" " import _cartesianparam, numpy\n" " p = _cartesianparam.new()\n" " p.setData(numpy.zeros((11,10), numpy.uint8))\n" " p.nodata = 255\n" " p.undetect = 0\n" " p.quantity = \"DBZH\"\n" " p.setValue((1,1), 10)")
 
 MOD_INIT (_cartesianparam)
 

Variables

PyTypeObject PyCartesianParam_Type
 

Detailed Description

Python version of the Cartesian Parameter API.

Author
Anders Henja (Swedish Meteorological and Hydrological Institute, SMHI)
Date
2012-02-07

Macro Definition Documentation

◆ PYCARTESIANPARAM_MODULE

#define PYCARTESIANPARAM_MODULE

to get correct part of pycartesianparam.h

◆ raiseException_gotoTag

#define raiseException_gotoTag ( tag,
type,
msg )
Value:
{PyErr_SetString(type, msg); goto tag;}

Sets a python exception and goto tag.

◆ raiseException_returnNULL

#define raiseException_returnNULL ( type,
msg )
Value:
{PyErr_SetString(type, msg); return NULL;}

Sets a python exception and return NULL.

Function Documentation

◆ PYRAVE_DEBUG_MODULE()

PYRAVE_DEBUG_MODULE ( "_cartesianparam" )

Debug this module.