MUSE Pipeline Reference Manual  0.18.1
muse_combine.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_COMBINE_H
24 #define MUSE_COMBINE_H
25 
26 /*----------------------------------------------------------------------------*
27  * Includes *
28  *----------------------------------------------------------------------------*/
29 #include <cpl.h>
30 
31 #include "muse_dfs.h"
32 #include "muse_image.h"
33 #include "muse_imagelist.h"
34 
35 /*----------------------------------------------------------------------------*
36  * Defines *
37  *----------------------------------------------------------------------------*/
38 
39 /*----------------------------------------------------------------------------*
40  * Special variable types *
41  *----------------------------------------------------------------------------*/
42 /* combination methods, *
43  * keep in sync with kCombinationStrings in muse_combine.c! */
44 enum combinationMethods {
45  MUSE_COMBINE_SUM,
46  MUSE_COMBINE_AVERAGE,
47  MUSE_COMBINE_MEDIAN,
48  MUSE_COMBINE_MINMAX,
49  MUSE_COMBINE_SIGCLIP,
50  MUSE_COMBINE_NONE, /* no combination, for muse_scibasic */
51  MUSE_COMBINE_UNKNOWN
52 };
53 
54 typedef struct {
55  enum combinationMethods combine;
56  int nLow;
57  int nHigh;
58  int nKeep;
59  double lSigma;
60  double hSigma;
61  cpl_boolean scale;
62 } muse_combinepar;
63 
64 /*----------------------------------------------------------------------------*
65  * Function prototypes *
66  *----------------------------------------------------------------------------*/
72 
73 muse_combinepar *muse_combinepar_new(cpl_parameterlist *, const char *);
74 void muse_combinepar_delete(muse_combinepar *);
75 muse_image *muse_combine_images(muse_combinepar *, muse_imagelist *);
76 
77 #endif /* MUSE_COMBINE_H */
Structure definition for a collection of muse_images.
muse_image * muse_combine_minmax_create(muse_imagelist *, int, int, int)
Average a list of input images with minmax rejection.
Definition: muse_combine.c:428
muse_image * muse_combine_median_create(muse_imagelist *)
Median combine a list of input images.
Definition: muse_combine.c:317
muse_image * muse_combine_images(muse_combinepar *, muse_imagelist *)
Combine several images into one.
Definition: muse_combine.c:742
Structure definition of MUSE three extension FITS file.
Definition: muse_image.h:41
muse_image * muse_combine_average_create(muse_imagelist *)
Average a list of input images.
Definition: muse_combine.c:235
void muse_combinepar_delete(muse_combinepar *)
Clear the combination parameters.
Definition: muse_combine.c:716
muse_image * muse_combine_sum_create(muse_imagelist *)
Sum a list of input images.
Definition: muse_combine.c:154
muse_combinepar * muse_combinepar_new(cpl_parameterlist *, const char *)
Create a new set of combination parameters.
Definition: muse_combine.c:673
muse_image * muse_combine_sigclip_create(muse_imagelist *, double, double)
Average a list of input images with sigma clipping rejection.
Definition: muse_combine.c:558