#include <math.h>
#include <float.h>
#include <cpl.h>
#include "xsh_spectrum.h"
#include "xsh_utils_wrappers.h"
Go to the source code of this file.
Defines | |
#define | SPECTRUM_HW 16 |
#define | MIN_THRESH_FACT 0.9 |
#define | MAX_THRESH_FACT 1.1 |
#define | SPEC_SHADOW_FACT 30.0 |
#define | SPEC_MAXWIDTH 48 |
Functions | |
static int | select_valid_spectra (cpl_image *in, cpl_apertures *aperts, int offset, spec_shadows shadows, int max_spec_width, int *n_valid_specs, int **valid_specs) |
Selects the valid spectra in a spectral image. | |
static int | valid_spectrum (cpl_image *in, cpl_apertures *aperts, int offset, spec_shadows shadows, int max_spec_width, int objnum) |
Helper function to select_valid_spectra. | |
int | xsh_spectrum_find_brightest (const cpl_image *in, int offset, spec_shadows shadows, double min_bright, int orient, double *pos) |
Finds the brightest spectrum in an image. | |
cpl_vector * | xsh_spectrum_detect_peaks (const cpl_vector *in, int fwhm, double kappa, int display) |
Detect the brightest features in a spectrum. |
#define MAX_THRESH_FACT 1.1 |
Definition at line 49 of file xsh_spectrum.c.
Referenced by xsh_spectrum_find_brightest().
#define MIN_THRESH_FACT 0.9 |
Definition at line 48 of file xsh_spectrum.c.
Referenced by xsh_spectrum_find_brightest().
#define SPEC_MAXWIDTH 48 |
Definition at line 51 of file xsh_spectrum.c.
Referenced by xsh_spectrum_find_brightest().
#define SPEC_SHADOW_FACT 30.0 |
Definition at line 50 of file xsh_spectrum.c.
Referenced by valid_spectrum().
#define SPECTRUM_HW 16 |
Definition at line 47 of file xsh_spectrum.c.
Referenced by xsh_spectrum_find_brightest().
static int select_valid_spectra | ( | cpl_image * | in, | |
cpl_apertures * | aperts, | |||
int | offset, | |||
spec_shadows | shadows, | |||
int | max_spec_width, | |||
int * | n_valid_specs, | |||
int ** | valid_specs | |||
) | [static] |
Selects the valid spectra in a spectral image.
in | the 1d image | |
aperts | detected objects | |
offset | the distance to the two shadows of the bright spectrum | |
shadows | shadows mode | |
max_spec_width | maximal spectrum width | |
n_valid_specs | number of valid spectra | |
valid_specs | lut giving the object number of a found spectrum |
Definition at line 411 of file xsh_spectrum.c.
References valid_spectrum().
Referenced by xsh_spectrum_find_brightest().
static int valid_spectrum | ( | cpl_image * | in, | |
cpl_apertures * | aperts, | |||
int | offset, | |||
spec_shadows | shadows, | |||
int | max_spec_width, | |||
int | objnum | |||
) | [static] |
Helper function to select_valid_spectra.
in | the 1d image | |
aperts | detected objects | |
offset | the distance to the two shadows of the bright spectrum | |
shadows | shadows mode | |
max_spec_width | maximal spectrum width | |
objnum | index of the object to test (1 for the first) |
Definition at line 464 of file xsh_spectrum.c.
References NO_SHADOW, ONE_SHADOW, SPEC_SHADOW_FACT, and TWO_SHADOWS.
Referenced by select_valid_spectra().