MUSE Pipeline Reference Manual  2.1.1
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  * 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_DATACUBE_H
23 #define MUSE_DATACUBE_H
24 
25 /*----------------------------------------------------------------------------*
26  * Includes *
27  *----------------------------------------------------------------------------*/
28 #include <cpl.h>
29 
30 #include "muse_cplwrappers.h"
31 #include "muse_image.h"
32 #include "muse_imagelist.h"
33 #include "muse_table.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 muse_datacube *muse_datacube_load(const char *);
155 cpl_error_code muse_datacube_concat(muse_datacube *, const muse_datacube *);
156 cpl_error_code muse_datacube_save(muse_datacube *, const char *);
157 cpl_error_code muse_datacube_save_recimages(const char *, muse_imagelist *, cpl_array *);
159 
162 
163 #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_datacube_concat(muse_datacube *, const muse_datacube *)
Concatenate one datacube at the end of another one.
cpl_error_code muse_euro3dcube_save(muse_euro3dcube *, const char *)
Save a Euro3D cube object to a file.
muse_datacube * muse_datacube_load(const char *)
Load header, DATA and optionally STAT and DQ extensions as well as the reconstructed images of a MUSE...
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_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:40
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.
cpl_error_code muse_datacube_save_recimages(const char *, muse_imagelist *, cpl_array *)
Save reconstructed images of a cube in extra extensions.
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
Structure to store a table together with a property list.
Definition: muse_table.h:43
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_datacube_collapse(muse_datacube *, const muse_table *)
Integrate a FITS NAXIS=3 datacube along the wavelength direction.
muse_imagelist * recimages
the reconstructed image data
Definition: muse_datacube.h:64
muse_image * muse_euro3dcube_collapse(muse_euro3dcube *, const muse_table *)
Integrate a Euro3D datacube along the wavelength direction.
cpl_imagelist * stat
the cube containing the data variance
Definition: muse_datacube.h:86