BALTRAD PPC
|
Main routine for the pdp processing based on the algorithm from Vulpiani et al. More...
#include "pdp_processor.h"
#include "rave_debug.h"
#include "rave_alloc.h"
#include "rave_utilities.h"
#include <string.h>
#include <math.h>
#include <rave_data2d.h>
#include <polarvolume.h>
#include <time.h>
#include <sys/time.h>
#include "ppc_radar_options.h"
Classes | |
struct | _PdpProcessor_t |
Represents one transformator. More... | |
Functions | |
RaveData2D_t * | PdpProcessorInternal_getData2DFromParam (PolarScanParam_t *param, double nodata) |
Returns the parameter data field as a converted data 2d field. | |
int | PdpProcessor_setRadarOptions (PdpProcessor_t *self, PpcRadarOptions_t *options) |
Sets the option instance to be used in the processing. | |
PpcRadarOptions_t * | PdpProcessor_getRadarOptions (PdpProcessor_t *self) |
PolarScan_t * | PdpProcessor_process (PdpProcessor_t *self, PolarScan_t *scan, RaveData2D_t *sclutterMap) |
Combines all functions implemented in this class into one process that performs the actual polar data processing chain according to the matlab prototype developed by Gianfranco Vulpiani. | |
void | PdpProcessor_setMeltingLayerBottomHeight (PdpProcessor_t *self, double height) |
Sets the melting layer bottom height. | |
double | PdpProcessor_getMeltingLayerBottomHeight (PdpProcessor_t *self) |
RaveData2D_t * | PdpProcessor_texture (PdpProcessor_t *self, RaveData2D_t *X) |
Calculates the texture from the data 2d field. | |
RaveData2D_t * | PdpProcessor_trap (PdpProcessor_t *self, RaveData2D_t *xarr, double a, double b, double s, double t) |
Trapezoidal function. | |
RaveData2D_t * | PdpProcessor_clutterID (PdpProcessor_t *self, RaveData2D_t *Z, RaveData2D_t *VRADH, RaveData2D_t *texturePHIDP, RaveData2D_t *RHOHV, RaveData2D_t *textureZ, RaveData2D_t *clutterMap, double nodataZ, double nodataVRADH) |
Clutter identificaton function. | |
int | PdpProcessor_clutterCorrection (PdpProcessor_t *self, RaveData2D_t *Z, RaveData2D_t *VRADH, RaveData2D_t *texturePHIDP, RaveData2D_t *RHOHV, RaveData2D_t *textureZ, RaveData2D_t *clutterMap, double nodataZ, double nodataVRADH, double qualityThreshold, RaveData2D_t **outZ, RaveData2D_t **outQuality, RaveData2D_t **outClutterMask) |
Performs the clutter correction. | |
RaveData2D_t * | PdpProcessor_medfilt (PdpProcessor_t *self, RaveData2D_t *Z, double thresh, double nodataZ, long filtXsize, long filtYsize) |
Creates a median filtered field. | |
RaveData2D_t * | PdpProcessor_residualClutterFilter (PdpProcessor_t *self, RaveData2D_t *Z, double thresholdZ, double thresholdTexture, long filtXsize, long filtYsize) |
Runs the residual clutter filter on the image. | |
int | PdpProcessor_pdpProcessing (PdpProcessor_t *self, RaveData2D_t *pdp, double dr, long window, long nrIter, RaveData2D_t **pdpf, RaveData2D_t **kdp) |
int | PdpProcessor_pdpScript (PdpProcessor_t *self, RaveData2D_t *pdp, double dr, double rWin1, double rWin2, long nrIter, RaveData2D_t **pdpf, RaveData2D_t **kdp) |
int | PdpProcessor_attenuation (PdpProcessor_t *self, RaveData2D_t *Z, RaveData2D_t *zdr, RaveData2D_t *dbzh, RaveData2D_t *pdp, RaveData2D_t *mask, double gamma_h, double alpha, double zundetect, double dbzhundetect, RaveData2D_t **outz, RaveData2D_t **outzdr, RaveData2D_t **outPIA, RaveData2D_t **outDBZH) |
int | PdpProcessor_zphi (PdpProcessor_t *self, RaveData2D_t *Z, RaveData2D_t *pdp, RaveData2D_t *mask, double dr, double BB, double gamma_h, RaveData2D_t **outzphi, RaveData2D_t **outAH) |
Variables | |
RaveCoreObjectType | PdpProcessor_TYPE |
Type definition to use when creating a rave object. | |
Main routine for the pdp processing based on the algorithm from Vulpiani et al.
(2012) This object does support #RAVE_OBJECT_CLONE.
int PdpProcessor_clutterCorrection | ( | PdpProcessor_t * | self, |
RaveData2D_t * | Z, | ||
RaveData2D_t * | VRADH, | ||
RaveData2D_t * | texturePHIDP, | ||
RaveData2D_t * | RHOHV, | ||
RaveData2D_t * | textureZ, | ||
RaveData2D_t * | clutterMap, | ||
double | nodataZ, | ||
double | nodataVRADH, | ||
double | qualityThreshold, | ||
RaveData2D_t ** | outZ, | ||
RaveData2D_t ** | outQuality, | ||
RaveData2D_t ** | outClutterMask ) |
Performs the clutter correction.
[in] | self | - self |
[in] | Z | - the Z field |
[in] | VRADH | - the VRADH field |
[in] | texturePHIDP | - the PHIDP texture |
[in] | RHOHV | - the RHOHV field |
[in] | textureZ | - the Z texture |
[in] | clutterMap | - the clutter map |
[in] | nodataZ | - Z nodata value |
[in] | nodataVRADH | - VRADH nodata value |
[in] | qualityThreshold | - quality threshold value |
[out] | outZ | - the resulting Z field |
[out] | outQuality | - the resulting quality field |
[out] | outClutterMask | - the resulting clutter mask |
RaveData2D_t * PdpProcessor_clutterID | ( | PdpProcessor_t * | self, |
RaveData2D_t * | Z, | ||
RaveData2D_t * | VRADH, | ||
RaveData2D_t * | texturePHIDP, | ||
RaveData2D_t * | RHOHV, | ||
RaveData2D_t * | textureZ, | ||
RaveData2D_t * | clutterMap, | ||
double | nodataZ, | ||
double | nodataVRADH ) |
Clutter identificaton function.
[in] | self | - self |
[in] | Z | - the Z field |
[in] | VRADH | - the VRADH field |
[in] | texturePHIDP | - the PHIDP texture |
[in] | RHOHV | - the RHOHV field |
[in] | textureZ | - the Z texture |
[in] | clutterMap | - the clutter map |
[in] | nodataZ | - Z nodata value |
[in] | nodataVRADH | - the VRADH nodata value @returs the identified clutter field |
double PdpProcessor_getMeltingLayerBottomHeight | ( | PdpProcessor_t * | scan | ) |
[in] | scan | - scan |
PpcRadarOptions_t * PdpProcessor_getRadarOptions | ( | PdpProcessor_t * | self | ) |
[in] | self | - self |
RaveData2D_t * PdpProcessor_medfilt | ( | PdpProcessor_t * | self, |
RaveData2D_t * | Z, | ||
double | thresh, | ||
double | nodataZ, | ||
long | filtXsize, | ||
long | filtYsize ) |
Creates a median filtered field.
[in] | self | - self |
[in] | Z | - img to filter |
[in] | thresh | - min Z threshold to know if median filtering should be performed |
[in] | filtXsize | - window x size |
[in] | filtYsize | - window y size |
PolarScan_t * PdpProcessor_process | ( | PdpProcessor_t * | self, |
PolarScan_t * | scan, | ||
RaveData2D_t * | sclutterMap ) |
Combines all functions implemented in this class into one process that performs the actual polar data processing chain according to the matlab prototype developed by Gianfranco Vulpiani.
[in] | self | - self |
[in] | scan | - the polar scan |
[in] | sclutterMap | - the statistical clutter map (if NULL, then default cluttermap with 0s will be used) |
RSP produces inverted data
RaveData2D_t * PdpProcessor_residualClutterFilter | ( | PdpProcessor_t * | self, |
RaveData2D_t * | Z, | ||
double | thresholdZ, | ||
double | thresholdTexture, | ||
long | filtXsize, | ||
long | filtYsize ) |
Runs the residual clutter filter on the image.
[in] | self | - self |
[in] | Z | - the Z field |
[in] | thresholdZ | - the Z threshold |
[in] | thresholdTexture | - the threshold value on the created texture |
[in] | filtXsize | - the window size bin-wise |
[in] | filtYsize | - the window size ray-wise |
void PdpProcessor_setMeltingLayerBottomHeight | ( | PdpProcessor_t * | scan, |
double | height ) |
Sets the melting layer bottom height.
Default is < -1.0 (km) and in that case, the value from the ppc radar options is used.
[in] | scan | - scan |
[in] | height | the melting layer bottom height |
int PdpProcessor_setRadarOptions | ( | PdpProcessor_t * | self, |
PpcRadarOptions_t * | options ) |
Sets the option instance to be used in the processing.
Note, the options will be stored as a reference which means that you can directly modify the options instance to modify behaviour.
[in] | self | - self |
[in] | options | - options (must not be NULL) |
RaveData2D_t * PdpProcessor_texture | ( | PdpProcessor_t * | self, |
RaveData2D_t * | X ) |
Calculates the texture from the data 2d field.
Note, X must have nodata and useNodata set.
[in] | self | - self |
[in] | X | - data 2D field |
RaveData2D_t * PdpProcessor_trap | ( | PdpProcessor_t * | self, |
RaveData2D_t * | x, | ||
double | a, | ||
double | b, | ||
double | s, | ||
double | t ) |
Trapezoidal function.
[in] | self | - self |
[in] | x | - matrix |
[in] | a | - a |
[in] | b | - b |
[in] | s | - s |
[in] | t | - t |
RaveData2D_t * PdpProcessorInternal_getData2DFromParam | ( | PolarScanParam_t * | param, |
double | nodata ) |
Returns the parameter data field as a converted data 2d field.
[in] | param | - the scan param |
[in] | nodata | - the nodata value that should be used for the returned data 2d field |
RaveCoreObjectType PdpProcessor_TYPE |
Type definition to use when creating a rave object.