MUSE Pipeline Reference Manual  0.18.5
muse_datacube.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_DATACUBE_H
24 #define MUSE_DATACUBE_H
25 
26 /*----------------------------------------------------------------------------*
27  * Includes *
28  *----------------------------------------------------------------------------*/
29 #include <cpl.h>
30 
31 #include "muse_cplwrappers.h"
32 #include "muse_image.h"
33 #include "muse_imagelist.h"
34 
38 /*----------------------------------------------------------------------------*/
47 /*----------------------------------------------------------------------------*/
48 typedef struct {
57  cpl_propertylist *header; /* this has to be the first component! */
58 
64  muse_imagelist *recimages; /* this has to be the second component! */
65 
71  cpl_array *recnames; /* this has to be the third component! */
72 
76  cpl_imagelist *data;
77 
81  cpl_imagelist *dq;
82 
86  cpl_imagelist *stat;
88 
89 /*----------------------------------------------------------------------------*/
96 /*----------------------------------------------------------------------------*/
97 typedef struct {
104  cpl_propertylist *header; /* this has to be the first component! */
105 
111  muse_imagelist *recimages; /* this has to be the second component! */
112 
118  cpl_array *recnames; /* this has to be the third component! */
119 
123  cpl_table *dtable;
124 
131  cpl_propertylist *hdata;
132 
136  cpl_table *gtable;
137 
143  cpl_propertylist *hgroup;
145 
148 /*----------------------------------------------------------------------------*
149  * Function prototypes *
150  *----------------------------------------------------------------------------*/
151 cpl_error_code muse_euro3dcube_save(muse_euro3dcube *, const char *);
153 cpl_error_code muse_datacube_convert_dq(muse_datacube *);
154 cpl_error_code muse_datacube_save(muse_datacube *, const char *);
156 
159 
160 #endif /* MUSE_DATACUBE_H */
Structure definition of a MUSE datacube.
Definition: muse_datacube.h:48
Structure definition for a collection of muse_images.
cpl_error_code muse_euro3dcube_save(muse_euro3dcube *, const char *)
Save a Euro3D cube object to a file.
void muse_datacube_delete(muse_datacube *)
Deallocate memory associated to a muse_datacube object.
cpl_propertylist * hgroup
the group FITS header
cpl_array * recnames
the reconstructed image filter names
muse_image * muse_datacube_collapse(muse_datacube *, cpl_table *)
Integrate a FITS NAXIS=3 datacube along the wavelength direction.
muse_imagelist * recimages
the reconstructed image data
cpl_propertylist * header
the primary FITS header
Structure definition of MUSE three extension FITS file.
Definition: muse_image.h:41
cpl_array * recnames
the reconstructed image filter names
Definition: muse_datacube.h:71
cpl_error_code muse_datacube_save(muse_datacube *, const char *)
Save the three cube extensions and the FITS headers of a MUSE datacube to a file. ...
cpl_error_code muse_datacube_convert_dq(muse_datacube *)
Convert the DQ extension of a datacube to NANs in DATA and STAT.
void muse_euro3dcube_delete(muse_euro3dcube *)
Deallocate memory associated to a muse_euro3dcube object.
cpl_imagelist * data
the cube containing the actual data values
Definition: muse_datacube.h:76
Structure definition of a Euro3D datacube.
Definition: muse_datacube.h:97
cpl_imagelist * dq
the optional cube containing the bad pixel status
Definition: muse_datacube.h:81
cpl_table * dtable
the table containing the actual Euro3D data
cpl_propertylist * hdata
the data FITS header
cpl_table * gtable
the table containing the Euro3D groups
cpl_propertylist * header
the FITS header
Definition: muse_datacube.h:57
muse_image * muse_euro3dcube_collapse(muse_euro3dcube *, cpl_table *)
Integrate a Euro3D datacube along the wavelength direction.
muse_imagelist * recimages
the reconstructed image data
Definition: muse_datacube.h:64
cpl_imagelist * stat
the cube containing the data variance
Definition: muse_datacube.h:86