MUSE Pipeline Reference Manual  1.0.2
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 
37 /*----------------------------------------------------------------------------*/
46 /*----------------------------------------------------------------------------*/
47 typedef struct {
56  cpl_propertylist *header; /* this has to be the first component! */
57 
63  muse_imagelist *recimages; /* this has to be the second component! */
64 
70  cpl_array *recnames; /* this has to be the third component! */
71 
75  cpl_imagelist *data;
76 
80  cpl_imagelist *dq;
81 
85  cpl_imagelist *stat;
87 
88 /*----------------------------------------------------------------------------*/
95 /*----------------------------------------------------------------------------*/
96 typedef struct {
103  cpl_propertylist *header; /* this has to be the first component! */
104 
110  muse_imagelist *recimages; /* this has to be the second component! */
111 
117  cpl_array *recnames; /* this has to be the third component! */
118 
122  cpl_table *dtable;
123 
130  cpl_propertylist *hdata;
131 
135  cpl_table *gtable;
136 
142  cpl_propertylist *hgroup;
144 
147 /*----------------------------------------------------------------------------*
148  * Function prototypes *
149  *----------------------------------------------------------------------------*/
150 cpl_error_code muse_euro3dcube_save(muse_euro3dcube *, const char *);
152 cpl_error_code muse_datacube_convert_dq(muse_datacube *);
153 muse_datacube *muse_datacube_load(const char *);
154 cpl_error_code muse_datacube_save(muse_datacube *, const char *);
155 cpl_error_code muse_datacube_save_recimages(const char *, muse_imagelist *, cpl_array *);
157 
160 
161 #endif /* MUSE_DATACUBE_H */
Structure definition of a MUSE datacube.
Definition: muse_datacube.h:47
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.
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_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:40
cpl_array * recnames
the reconstructed image filter names
Definition: muse_datacube.h:70
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:75
Structure definition of a Euro3D datacube.
Definition: muse_datacube.h:96
cpl_imagelist * dq
the optional cube containing the bad pixel status
Definition: muse_datacube.h:80
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:56
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:63
cpl_imagelist * stat
the cube containing the data variance
Definition: muse_datacube.h:85