X-shooter Pipeline Reference Manual 3.8.15
Functions
Functions for LSS spectra

Functions

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.
 

Detailed Description

Function Documentation

◆ xsh_spectrum_detect_peaks()

cpl_vector * xsh_spectrum_detect_peaks ( const cpl_vector *  in,
int  fwhm,
double  kappa,
int  display 
)

Detect the brightest features in a spectrum.

Parameters
inthe spectrum
fwhmthe FWHM used for the lines convolution
kappaIf max(spectrum) > kappa *stdev(spectrum) +median(spectrum) it is a possible line peak
displaythe flag to display
Returns
The bright lines positions or NULL in error case

Definition at line 255 of file xsh_spectrum.c.

References kappa, and max.

Referenced by xsh_cfg_recover_measure_tab_xy_peaks().

◆ xsh_spectrum_find_brightest()

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.

Parameters
inspectral image with spectra
offsetthe diff. between pos. and neg. spectra
shadowsthe spectral shadows
min_brightmin. bright. required for a spectrum
orient1 for vertical spec. 0 for horizontal ones
posthe computed spectrum position (1->npix)
Returns
int 0 if ok, -1 in error case

Finds the brightest spectrum in an image by collapsing the image orthogonally to the spectrum orientation. Spectra are assumed to be horizontal for orient==0, vertical for 1

Definition at line 86 of file xsh_spectrum.c.

References max, MAX_THRESH_FACT, MIN_THRESH_FACT, select_valid_spectra(), SPEC_MAXWIDTH, SPECTRUM_HW, threshold, and xsh_image_filter_median().