MUSE Pipeline Reference Manual  2.1.1
muse_postproc.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_POSTPROC_H
23 #define MUSE_POSTPROC_H
24 
25 /*----------------------------------------------------------------------------*
26  * Includes *
27  *----------------------------------------------------------------------------*/
28 #include <cpl.h>
29 
30 #include "muse_flux.h"
31 #include "muse_lsf.h"
32 #include "muse_lsf_params.h"
33 #include "muse_pixtable.h"
34 #include "muse_processing.h"
35 #include "muse_resampling.h"
36 #include "muse_rvcorrect.h"
37 #include "muse_sky.h"
38 #include "muse_table.h"
39 #include "muse_wcs.h"
40 #include "muse_xcombine.h"
41 
42 /*----------------------------------------------------------------------------*
43  * Defines *
44  *----------------------------------------------------------------------------*/
45 
46 /*----------------------------------------------------------------------------*
47  * Data structures *
48  *----------------------------------------------------------------------------*/
49 
53 /*----------------------------------------------------------------------------*/
57 /*----------------------------------------------------------------------------*/
58 typedef enum {
59  MUSE_POSTPROC_SCIPOST = 0,
60  MUSE_POSTPROC_STANDARD,
61  MUSE_POSTPROC_ASTROMETRY
63 
64 /*----------------------------------------------------------------------------*/
68 /*----------------------------------------------------------------------------*/
69 typedef enum {
70  MUSE_POSTPROC_SKYMETHOD_NONE = 0,
71  MUSE_POSTPROC_SKYMETHOD_MODEL,
72  MUSE_POSTPROC_SKYMETHOD_SIMPLE
74 
75 /*----------------------------------------------------------------------------*/
79 /*----------------------------------------------------------------------------*/
80 typedef enum {
81  MUSE_POSTPROC_DARCHECK_NONE = 0,
82  MUSE_POSTPROC_DARCHECK_CHECK,
83  MUSE_POSTPROC_DARCHECK_CORRECT
85 
86 /*----------------------------------------------------------------------------*/
90 /*----------------------------------------------------------------------------*/
91 typedef struct {
93  cpl_table *exposures;
94  double lambdamin;
95  double lambdamax;
96  double lambdaref;
98  muse_rvcorrect_type rvtype;
101  cpl_table *extinction;
102  cpl_propertylist *wcs;
104  cpl_table *sky_lines;
105  cpl_table *sky_continuum;
107 #ifdef USE_LSF_PARAMS
109 #endif
112  cpl_frame *refframe;
114  cpl_table *tellregions;
118  double detsigma;
119  double radius;
121  double faccuracy;
123  double rejsigma;
124  int niter;
127  double crpix1, crpix2;
129 
130 /*----------------------------------------------------------------------------*/
134 /*----------------------------------------------------------------------------*/
135 typedef struct {
137  cpl_table *spectrum;
138  cpl_table *lines;
139  cpl_table *continuum;
141 
144 /*----------------------------------------------------------------------------*
145  * Function prototypes *
146  *----------------------------------------------------------------------------*/
149 
150 cpl_boolean muse_postproc_check_save_param(const char *, const char *);
155 
156 cpl_table *muse_postproc_load_nearest(const cpl_propertylist *, const cpl_frame *, float, float, double *, double *);
159 
163 
164 #endif /* MUSE_POSTPROC_H */
Structure definition of a MUSE datacube.
Definition: muse_datacube.h:48
muse_rvcorrect_type rvtype
Definition: muse_postproc.h:98
cpl_propertylist * muse_postproc_cube_load_output_wcs(muse_processing *)
Find a file with a usable output WCS in the input frameset.
muse_postproc_properties * muse_postproc_properties_new(muse_postproc_type)
Create a post-processing properties object.
Definition: muse_postproc.c:77
muse_flux_selection_type select
muse_postproc_skymethod
Method of sky subtraction to apply.
Definition: muse_postproc.h:69
muse_flux_smooth_type
Type of response curve smoothing to use.
Definition: muse_flux.h:146
muse_wcs_centroid_type centroid
muse_xcombine_types muse_postproc_get_weight_type(const char *)
Select correct weighting type for weight string.
cpl_error_code muse_postproc_revert_ffspec_maybe(muse_pixtable *, const muse_table *)
Revert correction of on-sky data with the flat-field spectrum.
muse_flux_profile_type
Type of optimal profile to use.
Definition: muse_flux.h:124
muse_resampling_crstats_type muse_postproc_get_cr_type(const char *)
Select correct cosmic ray rejection type for crtype string.
Data cube/stacked image list containing the LSF for one IFU.
Definition: muse_lsf.h:49
cpl_error_code muse_postproc_qc_fwhm(muse_processing *, muse_datacube *)
Compute QC1 parameters for datacubes and save them in the FITS header.
void * muse_postproc_process_exposure(muse_postproc_properties *, unsigned int, muse_postproc_sky_outputs *)
Merge and process pixel tables from one exposure.
cpl_error_code muse_postproc_cube_resample_and_collapse(muse_processing *, muse_pixtable *, muse_cube_type, muse_resampling_params *, const char *)
High level function to resample to a datacube and collapse that to an image of the field of view and ...
muse_flux_profile_type profile
muse_postproc_skymethod skymethod
muse_lsf_params ** lsf_params
muse_wcs_centroid_type
Type of centroiding algorithm to use.
Definition: muse_wcs.h:90
Structure definition of MUSE pixel table.
muse_cube_type muse_postproc_get_cube_format(const char *)
Select correct cube format for format string.
cpl_boolean muse_postproc_check_save_param(const char *, const char *)
Check the –save parameter contents against allowed options.
muse_resampling_crstats_type
Cosmic ray rejection statistics type.
muse_flux_smooth_type smooth
muse_cube_type
cpl_propertylist * wcs
Structure definition of the post-processing properties.
Definition: muse_postproc.h:91
Structure to define the major settable sky parameters.
Definition: muse_sky.h:54
void muse_postproc_properties_delete(muse_postproc_properties *)
Free memory taken by a post-processing properties object and all its components.
cpl_table * muse_postproc_load_nearest(const cpl_propertylist *, const cpl_frame *, float, float, double *, double *)
Load the calibration from a multi-table FITS file that is nearest on the sky.
Structure to store a table together with a property list.
Definition: muse_table.h:43
muse_postproc_darcheck
Method of DAR checking/correction to do.
Definition: muse_postproc.h:80
muse_lsf_cube ** lsf_cube
muse_postproc_type
Type of per-exposure processing to run.
Definition: muse_postproc.h:58
muse_resampling_type muse_postproc_get_resampling_type(const char *)
Select correct resampling type for resample string.
Handling of "mask" files.
Definition: muse_mask.h:43
muse_postproc_type type
Definition: muse_postproc.h:92
muse_resampling_type
Resampling types.
Resampling parameters.
Structure definition of the post-processing output sky data.
muse_sky_params skymodel_params
Structure definition of detector (slice) parameters.
muse_postproc_darcheck darcheck
Definition: muse_postproc.h:97
muse_xcombine_types
Xposure combination types.
Definition: muse_xcombine.h:44
muse_flux_selection_type
Type of star selection to use.
Definition: muse_flux.h:136