MUSE Pipeline Reference Manual  2.1.1
muse_resampling.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_RESAMPLING_H
23 #define MUSE_RESAMPLING_H
24 
25 /*----------------------------------------------------------------------------*
26  * Includes *
27  *----------------------------------------------------------------------------*/
28 #include <cpl.h>
29 
30 #include "muse_cplwrappers.h"
31 #include "muse_datacube.h"
32 #include "muse_image.h"
33 #include "muse_pixgrid.h"
34 #include "muse_pixtable.h"
35 
36 /*----------------------------------------------------------------------------*
37  * Defines *
38  *----------------------------------------------------------------------------*/
39 
43 /*----------------------------------------------------------------------------*/
47 /*----------------------------------------------------------------------------*/
48 typedef enum {
64 
65 /*----------------------------------------------------------------------------*/
69 /*----------------------------------------------------------------------------*/
70 /* keep this in sync with crtypestring[] in muse_resampling.c! */
71 typedef enum {
80 
81 typedef enum {
91 
92 /*----------------------------------------------------------------------------*/
96 /*----------------------------------------------------------------------------*/
97 typedef struct {
103  double crsigma;
104 
106  int ld;
110  double pfx, pfy, pfl;
112  double rc;
113 
116  double dx, dy, dlambda;
118  cpl_wcs *wcs;
122 
125 /*----------------------------------------------------------------------------*
126  * Function prototypes *
127  *----------------------------------------------------------------------------*/
129 cpl_error_code muse_resampling_params_set_pixfrac(muse_resampling_params *, const char *);
130 cpl_error_code muse_resampling_params_set_wcs(muse_resampling_params *, const cpl_propertylist *);
132 
136 
138 cpl_table *muse_resampling_spectrum(muse_pixtable *, double);
139 cpl_table *muse_resampling_spectrum_iterate(muse_pixtable *, double, float, float, unsigned char);
140 
141 #endif /* MUSE_RESAMPLING_H */
muse_image * muse_resampling_collapse_pixgrid(muse_pixtable *, muse_pixgrid *, muse_datacube *, const muse_table *, muse_resampling_params *)
Integrate a pixel table / pixel grid along the wavelength direction.
Structure definition of a MUSE datacube.
Definition: muse_datacube.h:48
muse_image * muse_resampling_image(muse_pixtable *, muse_resampling_type, double, double)
Resample a pixel table onto a two-dimensional regular grid.
cpl_table * muse_resampling_spectrum_iterate(muse_pixtable *, double, float, float, unsigned char)
Iteratively resample selected pixels of a pixel table into spectrum.
cpl_error_code muse_resampling_params_set_wcs(muse_resampling_params *, const cpl_propertylist *)
Set an output WCS (and wavelength scale) in the resampling parameters.
muse_datacube * muse_resampling_cube(muse_pixtable *, muse_resampling_params *, muse_pixgrid **)
Resample a pixel table onto a regular grid structure representing a FITS NAXIS=3 datacube.
The pixel grid.
Definition: muse_pixgrid.h:65
Structure definition of MUSE three extension FITS file.
Definition: muse_image.h:40
muse_resampling_crstats_type crtype
Structure definition of MUSE pixel table.
muse_resampling_crstats_type
Cosmic ray rejection statistics type.
muse_resampling_params * muse_resampling_params_new(muse_resampling_type)
Create the resampling parameters structure.
Structure definition of a Euro3D datacube.
Definition: muse_datacube.h:97
muse_resampling_dispersion_type
Structure to store a table together with a property list.
Definition: muse_table.h:43
muse_resampling_dispersion_type tlambda
cpl_error_code muse_resampling_params_set_pixfrac(muse_resampling_params *, const char *)
Set resampling pixfrac given a string that can contain up to three floating-point values...
muse_resampling_type
Resampling types.
muse_euro3dcube * muse_resampling_euro3d(muse_pixtable *, muse_resampling_params *)
Resample a pixel table onto a regular grid structure representing a Euro3D format file...
Resampling parameters.
void muse_resampling_params_delete(muse_resampling_params *)
Delete a resampling parameters structure.
muse_resampling_type method
cpl_table * muse_resampling_spectrum(muse_pixtable *, double)
Resample the selected pixels of a pixel table into a spectrum.