X-shooter Pipeline Reference Manual 3.8.15
xsh_data_spectrum1D.h
Go to the documentation of this file.
1/* *
2 * This file is part of the ESO X-shooter Pipeline *
3 * Copyright (C) 2006 European Southern Observatory *
4 * *
5 * This library is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
9 * *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
14 * *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the Free Software *
17 * Foundation, 51 Franklin St, Fifth Floor, Boston, MA 02111-1307 USA *
18 * */
19
20/*
21 * $Author: amodigli $
22 * $Date: 2011-12-02 14:15:28 $
23 * $Revision: 1.6 $
24 * $Name: not supported by cvs2svn $
25 */
26#ifndef XSH_DATA_SPECTRUM1D_H
27#define XSH_DATA_SPECTRUM1D_H
28
29#include <cpl.h>
30#include <xsh_data_instrument.h>
31
32#define XSH_SPECTRUM1D_DATA_TYPE CPL_TYPE_FLOAT
33#define XSH_SPECTRUM1D_DATA_BPP CPL_BPP_IEEE_FLOAT
34#define XSH_SPECTRUM1D_ERRS_TYPE CPL_TYPE_FLOAT
35#define XSH_SPECTRUM1D_ERRS_BPP CPL_BPP_IEEE_FLOAT
36#define XSH_SPECTRUM1D_QUAL_TYPE CPL_TYPE_INT
37#define XSH_SPECTRUM1D_QUAL_BPP CPL_BPP_32_SIGNED
38
39typedef struct{
40 /* size of the order */
41 int size;
42 /* Minimal spectrum lambda */
43 double lambda_min;
44 /* Maximal spectrum lambda */
45 double lambda_max;
46 /* step in lambda */
48 /* flux data */
49 cpl_propertylist* flux_header;
50 cpl_image *flux;
51 /* errs */
52 cpl_propertylist* errs_header;
53 cpl_image *errs;
54 /* qual */
55 cpl_propertylist* qual_header;
56 cpl_image *qual;
58
59xsh_spectrum1D* xsh_spectrum1D_create( double lambda_min, double lambda_max,
60 double lambda_step);
61xsh_spectrum1D* xsh_spectrum1D_load( cpl_frame* s1d_frame,
62 xsh_instrument* instr);
70cpl_frame* xsh_spectrum1D_save( xsh_spectrum1D* s, const char* filename);
72cpl_error_code
74cpl_error_code
75xsh_monitor_spectrum1D_extra_qc(cpl_frame* in_frm,xsh_instrument* instrument,cpl_propertylist* qclist);
76
77#endif /* XSH_DATA_SPECTRUM1D_H */
static xsh_instrument * instrument
static float lambda_step
double xsh_spectrum1D_get_lambda_min(xsh_spectrum1D *s)
Get minimum lambda of spectrum.
double xsh_spectrum1D_get_lambda_max(xsh_spectrum1D *s)
Get maximum lambda of spectrum.
cpl_error_code xsh_monitor_spectrum1D_extra_qc(cpl_frame *in_frm, xsh_instrument *instrument, cpl_propertylist *qclist)
double xsh_spectrum1D_get_lambda_step(xsh_spectrum1D *s)
Get bin in lambda of spectrum.
xsh_spectrum1D * xsh_spectrum1D_create(double lambda_min, double lambda_max, double lambda_step)
Create a 1D spectrum structure.
int xsh_spectrum1D_get_size(xsh_spectrum1D *s)
Get size of spectrum.
cpl_frame * xsh_spectrum1D_save(xsh_spectrum1D *s, const char *filename)
save a 1D spectrum
double * xsh_spectrum1D_get_errs(xsh_spectrum1D *s)
Get errs of spectrum.
xsh_spectrum1D * xsh_spectrum1D_load(cpl_frame *s1d_frame, xsh_instrument *instr)
Load a 1D spectrum structure.
void xsh_spectrum1D_free(xsh_spectrum1D **list)
free memory associated to an 1D spectrum
double * xsh_spectrum1D_get_flux(xsh_spectrum1D *s)
Get flux of spectrum.
cpl_error_code xsh_monitor_spectrum1D_flux(cpl_frame *in_frm, xsh_instrument *instrument)
int * xsh_spectrum1D_get_qual(xsh_spectrum1D *s)
Get qual of spectrum.
static SimAnneal s
Definition: xsh_model_sa.c:99
cpl_propertylist * errs_header
cpl_propertylist * flux_header
cpl_propertylist * qual_header