28#ifndef ERIS_IFU_LAMBDA_CORR_H
29#define ERIS_IFU_LAMBDA_CORR_H
38#include "eris_ifu_utils.h"
49 const cpl_propertylist *header,
50 cpl_vector *peaks,
const int pfit_order);
53 const cpl_propertylist *header,
54 const double min_frac,
55 const cpl_vector *range);
59 const cpl_vector *lambda,
60 const cpl_vector *range);
76 cpl_vector *peaks, ifsBand bandId,
const int pfit_order);
78int gauss1d_fnc(
const double x[],
const double a[],
double *result);
79int gauss1d_fncd(
const double x[],
const double a[],
double result[]);
80double fit_peak (
const cpl_bivector *spectrum,
const cpl_size size,
double lambda_in,
int half_width,
double *sigma_par);
cpl_image * eris_ifu_lcorr_create_object_mask(const cpl_imagelist *cube, double min_frac, const cpl_vector *lambda, const cpl_vector *range)
Create spaxel selection mask for spectrum extraction.
cpl_bivector * eris_ifu_lcorr_extract_spectrum(const cpl_imagelist *cube, const cpl_propertylist *header, const double min_frac, const cpl_vector *range)
Extract integrated spectrum from IFU cube for brightest spaxels.
cpl_polynomial * eris_ifu_lcorr_get(cpl_imagelist *cube, hdrl_imagelist *hdrlCube, const cpl_propertylist *header, cpl_vector *peaks, const int pfit_order)
Create wavelength correction polynomial from IFU cube using OH lines.
void eris_ifu_lcorr_close_debug_file(void)
close ASCII file that hold debug results
cpl_vector * eris_ifu_lcorr_create_lambda_vector(const cpl_propertylist *header)
Create wavelength vector from FITS header WCS keywords.
void eris_ifu_lcorr_open_debug_file(const char *filename)
open ASCII file to hold debug results
cpl_array * eris_ifu_lcorr_get_peak_positions(const cpl_bivector *spectrum, double min_frac, cpl_vector *range)
Detect emission line peak positions in a spectrum.
int gauss1d_fncd(const double x[], const double a[], double result[])
define a Gaussian profile
cpl_vector * eris_ifu_lcorr_get_peak_lambdas(const cpl_bivector *spectrum, double min_frac, cpl_vector *range)
Detect and refine emission line peak wavelengths using Gaussian fitting.
double fit_peak(const cpl_bivector *spectrum, const cpl_size size, double lambda_in, int half_width, double *sigma_par)
fit a peak
int gauss1d_fnc(const double x[], const double a[], double *result)
define a Gaussian profile
cpl_polynomial * eris_ifu_lcorr_crosscorrelate_spectra(cpl_bivector *object, cpl_vector *peaks, ifsBand bandId, const int pfit_order)
cross-correlate two input spectra
cpl_bivector * eris_ifu_lcorr_read_OH_reference_spectrum(const char *filename, cpl_size ext_number)
Read OH reference spectrum from FITS file.