MUSE Pipeline Reference Manual  1.0.2
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  * This file is part of the MUSE Instrument Pipeline
5  * Copyright (C) 2005-2014 European Southern Observatory
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20  */
21 
22 #ifndef MUSE_LSF_H
23 #define MUSE_LSF_H
24 
25 /*----------------------------------------------------------------------------*
26  * Includes *
27  *----------------------------------------------------------------------------*/
28 #include <cpl.h>
29 
30 #include "muse_cplwrappers.h"
31 #include "muse_pixtable.h"
32 #include "muse_processing.h"
33 
34 /*----------------------------------------------------------------------------*
35  * Special variable types *
36  *----------------------------------------------------------------------------*/
40 #define MAX_HERMIT_ORDER 4
41 
42 /*----------------------------------------------------------------------------*/
49 /*----------------------------------------------------------------------------*/
50 typedef struct {
51  int ifu;
52  int slice;
53  double refraction;
54  double offset;
56  double lambda_ref;
58  cpl_array *sensitivity;
60  double slit_width;
62  double bin_width;
64  cpl_array *lsf_width;
66  cpl_array *hermit[MAX_HERMIT_ORDER];
68 
71 /*----------------------------------------------------------------------------*
72  * Function prototypes *
73  *----------------------------------------------------------------------------*/
74 
75 muse_lsf_params *muse_lsf_params_new(cpl_size, cpl_size, cpl_size);
79 cpl_error_code muse_lsf_params_save(const muse_lsf_params **, const char *);
83 
84 cpl_array *muse_lsf_spectrum_get_lines(const cpl_array *, const cpl_array *, const cpl_array*, const muse_lsf_params *);
85 
86 double muse_lsf_fwhm_lambda(const muse_lsf_params *, double, double, double, unsigned int, FILE *);
87 
88 #endif /* MUSE_LSF_H */
void muse_lsf_params_delete_one(muse_lsf_params *)
Delete an allocated muse_lsf_params structure.
cpl_error_code muse_lsf_params_save(const muse_lsf_params **, const char *)
Save slice LSF parameters to the extension "slice" on disk.
muse_lsf_params * muse_lsf_params_get(muse_lsf_params **, int, int)
Get the slice LSF parameters for one slice.
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.
double bin_width
Bin width.
Definition: muse_lsf.h:62
muse_lsf_params * muse_lsf_params_new(cpl_size, cpl_size, cpl_size)
Create a new lsf_params structure.
Definition: muse/muse_lsf.c:75
cpl_array * sensitivity
Relative detector sensitivity parametrization.
Definition: muse_lsf.h:58
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.
double slit_width
Slit width.
Definition: muse_lsf.h:60
cpl_array * lsf_width
LSF width.
Definition: muse_lsf.h:64
cpl_size muse_lsf_params_get_size(muse_lsf_params **)
Count the number of entries in the array.
muse_lsf_params ** muse_lsf_params_load(const char *, muse_lsf_params **, int)
Load slice LSF parameters from the extension "SLICE_PARAM".
double lambda_ref
Reference wavelength for polynomial parametrizations.
Definition: muse_lsf.h:56
muse_lsf_params ** muse_processing_lsf_params_load(muse_processing *, int)
Load slice LSF parameters.
Structure definition of detector (slice) parameters.
Definition: muse_lsf.h:50
void muse_lsf_params_delete(muse_lsf_params **)
Delete an allocated array of muse_lsf_params structure.