MUSE Pipeline Reference Manual  0.18.5
muse_lsf.h
1 /* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim:set sw=2 sts=2 et cin: */
3 /*
4  *
5  * This file is part of the MUSE Instrument Pipeline
6  * Copyright (C) 2005-2011 European Southern Observatory
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21  */
22 
23 #ifndef MUSE_LSF_H
24 #define MUSE_LSF_H
25 
26 /*----------------------------------------------------------------------------*
27  * Includes *
28  *----------------------------------------------------------------------------*/
29 #include <cpl.h>
30 
31 #include "muse_cplwrappers.h"
32 #include "muse_pixtable.h"
33 #include "muse_processing.h"
34 
35 /*----------------------------------------------------------------------------*
36  * Special variable types *
37  *----------------------------------------------------------------------------*/
41 #define MAX_HERMIT_ORDER 4
42 
43 /*----------------------------------------------------------------------------*/
50 /*----------------------------------------------------------------------------*/
51 typedef struct {
52  int ifu;
53  int slice;
54  double refraction;
55  double offset;
57  double lambda_ref;
59  cpl_array *sensitivity;
61  double slit_width;
63  double bin_width;
65  cpl_array *lsf_width;
67  cpl_array *hermit[MAX_HERMIT_ORDER];
69 
72 /*----------------------------------------------------------------------------*
73  * Function prototypes *
74  *----------------------------------------------------------------------------*/
75 
76 muse_lsf_params *muse_lsf_params_new(cpl_size, cpl_size, cpl_size);
80 cpl_error_code muse_lsf_params_save(const muse_lsf_params **, const char *);
84 
85 cpl_array *muse_lsf_spectrum_get_lines(const cpl_array *, const cpl_array *, const cpl_array*, const muse_lsf_params *);
86 
87 double muse_lsf_fwhm_lambda(const muse_lsf_params *, double, double, double, unsigned int, FILE *);
88 
89 #endif /* MUSE_LSF_H */
void muse_lsf_params_delete_one(muse_lsf_params *)
Delete an allocated muse_lsf_params structure.
Definition: muse_lsf.c:128
cpl_error_code muse_lsf_params_save(const muse_lsf_params **, const char *)
Save slice LSF parameters to the extension "slice" on disk.
Definition: muse_lsf.c:214
muse_lsf_params * muse_lsf_params_get(muse_lsf_params **, int, int)
Get the slice LSF parameters for one slice.
Definition: muse_lsf.c:456
cpl_array * muse_lsf_spectrum_get_lines(const cpl_array *, const cpl_array *, const cpl_array *, const muse_lsf_params *)
Set the lines spectrum from the lines table and the detector LSF.
Definition: muse_lsf.c:653
double bin_width
Bin width.
Definition: muse_lsf.h:63
muse_lsf_params * muse_lsf_params_new(cpl_size, cpl_size, cpl_size)
Create a new lsf_params structure.
Definition: muse_lsf.c:74
cpl_array * sensitivity
Relative detector sensitivity parametrization.
Definition: muse_lsf.h:59
double muse_lsf_fwhm_lambda(const muse_lsf_params *, double, double, double, unsigned int, FILE *)
Measure the FWHM of an LSF at a given wavelength.
Definition: muse_lsf.c:708
double slit_width
Slit width.
Definition: muse_lsf.h:61
cpl_array * lsf_width
LSF width.
Definition: muse_lsf.h:65
cpl_size muse_lsf_params_get_size(muse_lsf_params **)
Count the number of entries in the array.
Definition: muse_lsf.c:110
muse_lsf_params ** muse_lsf_params_load(const char *, muse_lsf_params **, int)
Load slice LSF parameters from the extension "SLICE_PARAM".
Definition: muse_lsf.c:308
double lambda_ref
Reference wavelength for polynomial parametrizations.
Definition: muse_lsf.h:57
muse_lsf_params ** muse_processing_lsf_params_load(muse_processing *, int)
Load slice LSF parameters.
Definition: muse_lsf.c:392
Structure definition of detector (slice) parameters.
Definition: muse_lsf.h:51
void muse_lsf_params_delete(muse_lsf_params **)
Delete an allocated array of muse_lsf_params structure.
Definition: muse_lsf.c:147