High-Level Data Reduction Library: tests/hdrl_collapse-test.c File Reference

High-Level Data Reduction Library 1.6.0 High-Level data reduction routines for ESO pipelines

Loading...
Searching...
No Matches
Data Structures | Macros | Functions
hdrl_collapse-test.c File Reference
`#include "hdrl_combine.h"`
`#include "hdrl_types.h"`
`#include <cpl.h>`
`#include <math.h>`
`#include <stdlib.h>`
Include dependency graph for hdrl_collapse-test.c:

## Data Structures
struct | pair

## Macros
#define | ARRAY_LEN(a) sizeof((a))/sizeof((a)[0])
#define | hdrl_test_abs(a, b, tol, rej)
#define | TST_FREE
#define | TST_FREE_MODE

## Functions
void | test_l2i_and_l2v (cpl_imagelist *data, cpl_imagelist *errs, hdrl_collapse_imagelist_to_image_t *l2im, hdrl_collapse_imagelist_to_vector_t *l2vm, cpl_size x, cpl_size y, pair v, pair e, cpl_image *expcontrib)
| test list to image and list to vector collapses
void | test_parameters (void)
void | test_parlist (void)
void | test_eout (void)
void | test_results (void)
void | test_results_mode (void)
int | main (void)
| Unit tests of reduce module.

## Macro Definition Documentation

## ◆ ARRAY_LEN

#define ARRAY_LEN | ( |  | a | ) | sizeof((a))/sizeof((a)[0])

## ◆ hdrl_test_abs

#define hdrl_test_abs | ( |  | a,
|  |  | b,
|  |  | tol,
|  |  | rej
| ) |  |

Value:
if (isnan(a)) { \
cpl_test_eq(isnan(a), isnan(b)); \
cpl_test(rej == -1 || rej != 0); \
} \
else { \
cpl_test_abs(a, b, tol); \
}

## ◆ TST_FREE

#define TST_FREE

Value:
cpl_image_delete(outimg); outimg = NULL; \
cpl_image_delete(outerr); outerr = NULL; \
cpl_image_delete(contrib); contrib = NULL; \
cpl_vector_delete(voutimg); voutimg = NULL; \
cpl_vector_delete(vouterr); vouterr = NULL; \
cpl_array_delete(acontrib); acontrib = NULL; \
hdrl_collapse_imagelist_to_image_delete(method);

## ◆ TST_FREE_MODE

#define TST_FREE_MODE

Value:
cpl_image_delete(outimg); outimg = NULL; \
cpl_image_delete(outerr); outerr = NULL; \
cpl_image_delete(contrib); contrib = NULL; \
cpl_vector_delete(voutimg); voutimg = NULL; \
cpl_vector_delete(vouterr); vouterr = NULL; \
cpl_array_delete(acontrib); acontrib = NULL; \
hdrl_collapse_imagelist_to_image_delete(method);

## Function Documentation

## ◆ main()

int main | ( | void |  | ) |

Unit tests of reduce module.

## ◆ test_eout()

void test_eout | ( | void |  | ) |

## ◆ test_l2i_and_l2v()

void test_l2i_and_l2v | ( | cpl_imagelist * | data,
|  | cpl_imagelist * | errs,
|  | hdrl_collapse_imagelist_to_image_t * | l2im,
|  | hdrl_collapse_imagelist_to_vector_t * | l2vm,
|  | cpl_size | x,
|  | cpl_size | y,
|  | pair | v,
|  | pair | e,
|  | cpl_image * | expcontrib
| ) |  |

test list to image and list to vector collapses

Parameters

  data | data for list to image
  errs | errors for list to image
  l2im | list to image reduction method
  l2vm | list to vector reduction method
  x | x coordinate to extract for l2v (FITS)
  y | y coordinate to extract for l2v (FITS)
  v | value tolerance pair for expected data result at x, y
  e | value tolerance pair for expected error result at x, y
  expcontrib | expected contribution map

## ◆ test_parameters()

void test_parameters | ( | void |  | ) |

## ◆ test_parlist()

void test_parlist | ( | void |  | ) |

## ◆ test_results()

void test_results | ( | void |  | ) |

## ◆ test_results_mode()

void test_results_mode | ( | void |  | ) |