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