ifw-odp  2.0.0-alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Macros | Functions
clipm_test_centroiding.c File Reference
#include <cpl.h>
#include <clipm.h>
#include <clipm_priv_error.h>
#include "clipm_testlib.h"
#include <string.h>

Macros

#define centroiding_moment_check_nice_return_values(void)
 
#define CENTROIDING_CORRECT_FAILURE_VALUES
 
#define centroiding_moment_BODY(TYPE, WDW)
 
#define centroiding_multi_gauss_BODY(TYPE)
 

Functions

void clipm_test_centroiding_gauss (void)
 
void clipm_test_centroiding_moment (void)
 
void clipm_test_centroiding_gauss_action (cpl_type type, const cpl_size size[2], const cpl_size window_xxyy[4], const double in_pos[2], double in_sigma, int robustness)
 
void clipm_test_centroiding_multi_gauss (void)
 
int main (int argc, char **argv)
 

Macro Definition Documentation

#define CENTROIDING_CORRECT_FAILURE_VALUES
Value:
centre[0] == -1.0 && \
centre[1] == -1.0 && \
centre_err[0] == -1.0 && \
centre_err[1] == -1.0 && \
sigma[0] == -1.0 && \
sigma[1] == -1.0 && \
fwhm[0] == -1.0 && \
fwhm[1] == -1.0 && \
centre_intensity == -1.0
#define centroiding_moment_BODY (   TYPE,
  WDW 
)
#define centroiding_moment_check_nice_return_values (   void)
Value:
do { \
CLIPM_TRY_TESTLIB_ASSERT(fabs(in_xpos - centre[0]) < 3*centre_err[0]); \
CLIPM_TRY_TESTLIB_ASSERT(fabs(in_ypos - centre[1]) < 3*centre_err[1]); \
CLIPM_TRY_TESTLIB_ASSERT(centre_err[0] > 0.0); \
CLIPM_TRY_TESTLIB_ASSERT(centre_err[1] > 0.0); \
CLIPM_TRY_TESTLIB_ASSERT(centre_err[0] < 0.1); \
CLIPM_TRY_TESTLIB_ASSERT(centre_err[1] < 0.1); \
CLIPM_TRY_TESTLIB_ASSERT(fabs(sigma[0] - in_sigma) < in_sigma / 10); \
CLIPM_TRY_TESTLIB_ASSERT(fabs(sigma[1] - in_sigma) < in_sigma / 10); \
CLIPM_TRY_TESTLIB_ASSERT( fabs( fabs(fwhm[0] / in_sigma) \
< 0.1); \
CLIPM_TRY_TESTLIB_ASSERT( fabs( fabs(fwhm[1] / in_sigma) \
< 0.1); \
} while (0)
#define CLIPM_TRY_TESTLIB_ASSERT(CONDITION)
Definition: clipm_testlib_defines.h:66
#define CPL_MATH_FWHM_SIG
Definition: clipm_compatibility_replacements.h:240
#define centroiding_multi_gauss_BODY (   TYPE)

Function Documentation

void clipm_test_centroiding_gauss ( void  )
void clipm_test_centroiding_gauss_action ( cpl_type  type,
const cpl_size  size[2],
const cpl_size  window_xxyy[4],
const double  in_pos[2],
double  in_sigma,
int  robustness 
)
void clipm_test_centroiding_moment ( void  )
void clipm_test_centroiding_multi_gauss ( void  )
int main ( int  argc,
char **  argv 
)