High-Level Data Reduction Library: tests/hdrl_spectrum1d-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 | Typedefs | Functions
hdrl_spectrum1d-test.c File Reference
`#include "hdrl_spectrum.h"`
`#include "hdrl_spectrumlist.h"`
`#include "hdrl_spectrum_resample.h"`
`#include "hdrl_DER_SNR.h"`
`#include <cpl.h>`
`#include <math.h>`
`#include <time.h>`
`#include <stdlib.h>`
Include dependency graph for hdrl_spectrum1d-test.c:

## Data Structures
struct | sel_window

## Macros
#define | HDRL_DELTA_COMPARE_VALUE CPL_MAX(HDRL_EPS_DATA, HDRL_EPS_ERROR) * 1.
#define | HDRL_DELTA_COMPARE_VALUE_ABS CPL_MAX(HDRL_EPS_DATA, HDRL_EPS_ERROR) * 4.
#define | LENGTH_ARRAY(a) ((cpl_size)(sizeof((a))/sizeof((a[0]))))

## Typedefs
typedef hdrl_spectrum1D *(* | operate_spectra_create) (const hdrl_spectrum1D *self, const hdrl_spectrum1D *other)
typedef cpl_error_code(* | operate_spectra) (hdrl_spectrum1D *self, const hdrl_spectrum1D *other)

## Functions
hdrl_spectrum1D * | select_window (hdrl_spectrum1D *s, const sel_window w)
void | test_spectrum1D_constructor (cpl_type type)
hdrl_value | test_val (hdrl_data_t lambda)
void | test_spectrum1D_constructor_analytical (void)
void | test_spectrum1D_constructor_error (void)
void | test_spectrum1D_duplication (void)
void | test_spectrum1D_calculation_scalar (void)
void | test_spectrum1D_calculation (void)
void | test_spectrum1D_calculation_error (void)
void | test_spectrum1D_conversion_wavelength_scale (void)
void | test_spectrum1D_mul_wavelength (void)
void | test_spectrum1D_shift_wavelength (void)
void | test_spectrum1D_table_conversion (void)
void | test_spectrum1D_resample_spectrum (cpl_boolean add_peak)
void | test_spectrum1D_resample_spectrum_private_funcs (void)
void | test_spectrum1D_resample_spectrum_interpolation_error_test (void)
void | test_spectrum1D_resample_spectrum_fit_error_test_error_interpol (void)
void | test_spectrum1D_resample_spectrum_bpm (cpl_boolean interpolate)
void | test_spectrum1D_resample_spectrum_fit_error_test_shift (cpl_boolean is_error_free)
void | test_spectrum1D_resample_spectrum_fit_windowed (void)
void | test_spectrum1D_wavelength_select (void)
void | test_spectrum1D_test_uniformly_sampled (void)
void | test_spectrum1Dlist (void)
cpl_boolean | contains (const cpl_array *arr, cpl_size idx)
void | test1 (void)
void | test2 (void)
void | test3 (void)
void | test4 (void)
void | test5 (void)
void | test6 (void)
void | test7 (void)
void | test8 (void)
void | test9 (void)
void | test10 (void)
void | test11 (void)
void | test12 (void)
void | test13 (void)
void | test14 (void)
void | test15 (void)
void | test16 (void)
void | test17 (void)
double | get_bin_size (const hdrl_spectrum1D *s, const cpl_size i)
double | calc_total_flux (const hdrl_spectrum1D *s)
void | test18 (void)
void | test_spectrum1D_resample_spectrum_integrate (void)
void | test_parlist (void)
int | main (void)
| Unit tests of Spectrum1D module.

## Macro Definition Documentation

## ◆ HDRL_DELTA_COMPARE_VALUE

#define HDRL_DELTA_COMPARE_VALUE CPL_MAX(HDRL_EPS_DATA, HDRL_EPS_ERROR) * 1.

## ◆ HDRL_DELTA_COMPARE_VALUE_ABS

#define HDRL_DELTA_COMPARE_VALUE_ABS CPL_MAX(HDRL_EPS_DATA, HDRL_EPS_ERROR) * 4.

## ◆ LENGTH_ARRAY

#define LENGTH_ARRAY | ( |  | a | ) | ((cpl_size)(sizeof((a))/sizeof((a[0]))))

## Typedef Documentation

## ◆ operate_spectra

typedef cpl_error_code(* operate_spectra) (hdrl_spectrum1D *self, const hdrl_spectrum1D *other)

## ◆ operate_spectra_create

typedef hdrl_spectrum1D *(* operate_spectra_create) (const hdrl_spectrum1D *self, const hdrl_spectrum1D *other)

## Function Documentation

## ◆ calc_total_flux()

double calc_total_flux | ( | const hdrl_spectrum1D * | s | ) |

## ◆ contains()

cpl_boolean contains | ( | const cpl_array * | arr,
|  | cpl_size | idx
| ) |  |

## ◆ get_bin_size()

double get_bin_size | ( | const hdrl_spectrum1D * | s,
|  | const cpl_size | i
| ) |  |

## ◆ main()

int main | ( | void |  | ) |

Unit tests of Spectrum1D module.

## ◆ select_window()

hdrl_spectrum1D * select_window | ( | hdrl_spectrum1D * | s,
|  | const sel_window | w
| ) |  |

## ◆ test1()

void test1 | ( | void |  | ) |

## ◆ test10()

void test10 | ( | void |  | ) |

## ◆ test11()

void test11 | ( | void |  | ) |

## ◆ test12()

void test12 | ( | void |  | ) |

## ◆ test13()

void test13 | ( | void |  | ) |

## ◆ test14()

void test14 | ( | void |  | ) |

## ◆ test15()

void test15 | ( | void |  | ) |

## ◆ test16()

void test16 | ( | void |  | ) |

## ◆ test17()

void test17 | ( | void |  | ) |

## ◆ test18()

void test18 | ( | void |  | ) |

## ◆ test2()

void test2 | ( | void |  | ) |

## ◆ test3()

void test3 | ( | void |  | ) |

## ◆ test4()

void test4 | ( | void |  | ) |

## ◆ test5()

void test5 | ( | void |  | ) |

## ◆ test6()

void test6 | ( | void |  | ) |

## ◆ test7()

void test7 | ( | void |  | ) |

## ◆ test8()

void test8 | ( | void |  | ) |

## ◆ test9()

void test9 | ( | void |  | ) |

## ◆ test_parlist()

void test_parlist | ( | void |  | ) |

## ◆ test_spectrum1D_calculation()

void test_spectrum1D_calculation | ( | void |  | ) |

## ◆ test_spectrum1D_calculation_error()

void test_spectrum1D_calculation_error | ( | void |  | ) |

## ◆ test_spectrum1D_calculation_scalar()

void test_spectrum1D_calculation_scalar | ( | void |  | ) |

## ◆ test_spectrum1D_constructor()

void test_spectrum1D_constructor | ( | cpl_type | type | ) |

## ◆ test_spectrum1D_constructor_analytical()

void test_spectrum1D_constructor_analytical | ( | void |  | ) |

## ◆ test_spectrum1D_constructor_error()

void test_spectrum1D_constructor_error | ( | void |  | ) |

## ◆ test_spectrum1D_conversion_wavelength_scale()

void test_spectrum1D_conversion_wavelength_scale | ( | void |  | ) |

## ◆ test_spectrum1D_duplication()

void test_spectrum1D_duplication | ( | void |  | ) |

## ◆ test_spectrum1D_mul_wavelength()

void test_spectrum1D_mul_wavelength | ( | void |  | ) |

## ◆ test_spectrum1D_resample_spectrum()

void test_spectrum1D_resample_spectrum | ( | cpl_boolean | add_peak | ) |

## ◆ test_spectrum1D_resample_spectrum_bpm()

void test_spectrum1D_resample_spectrum_bpm | ( | cpl_boolean | interpolate | ) |

## ◆ test_spectrum1D_resample_spectrum_fit_error_test_error_interpol()

void test_spectrum1D_resample_spectrum_fit_error_test_error_interpol | ( | void |  | ) |

## ◆ test_spectrum1D_resample_spectrum_fit_error_test_shift()

void test_spectrum1D_resample_spectrum_fit_error_test_shift | ( | cpl_boolean | is_error_free | ) |

## ◆ test_spectrum1D_resample_spectrum_fit_windowed()

void test_spectrum1D_resample_spectrum_fit_windowed | ( | void |  | ) |

## ◆ test_spectrum1D_resample_spectrum_integrate()

void test_spectrum1D_resample_spectrum_integrate | ( | void |  | ) |

## ◆ test_spectrum1D_resample_spectrum_interpolation_error_test()

void test_spectrum1D_resample_spectrum_interpolation_error_test | ( | void |  | ) |

## ◆ test_spectrum1D_resample_spectrum_private_funcs()

void test_spectrum1D_resample_spectrum_private_funcs | ( | void |  | ) |

## ◆ test_spectrum1D_shift_wavelength()

void test_spectrum1D_shift_wavelength | ( | void |  | ) |

## ◆ test_spectrum1D_table_conversion()

void test_spectrum1D_table_conversion | ( | void |  | ) |

## ◆ test_spectrum1D_test_uniformly_sampled()

void test_spectrum1D_test_uniformly_sampled | ( | void |  | ) |

## ◆ test_spectrum1D_wavelength_select()

void test_spectrum1D_wavelength_select | ( | void |  | ) |

## ◆ test_spectrum1Dlist()

void test_spectrum1Dlist | ( | void |  | ) |

## ◆ test_val()

hdrl_value test_val | ( | hdrl_data_t | lambda | ) |