SINFONI Pipeline Reference Manual  2.5.2
sinfo_bp_lin_config.c
1 /* $Id: sinfo_bp_lin_config.c,v 1.5 2012-03-02 08:42:20 amodigli Exp $
2  *
3  * This file is part of the CPL (Common Pipeline Library)
4  * Copyright (C) 2002 European Southern Observatory
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19  */
20 /*
21  * $Author: amodigli $
22  * $Date: 2012-03-02 08:42:20 $
23  * $Revision: 1.5 $
24  * $Name: not supported by cvs2svn $
25  */
26 
27 #ifdef HAVE_CONFIG_H
28 # include <config.h>
29 #endif
30 /****************************************************************
31  * Bad pixel search (Linear method) *
32  ****************************************************************/
33 
34 #include "sinfo_bp_lin_config.h"
35 
54 /* Bad pixel parameters */
55 
56 void
57 sinfo_bp_lin_config_add(cpl_parameterlist *list)
58 {
59 
60  cpl_parameter *p;
61 
62  if (!list) {
63  return;
64  }
65 
66 
67 
68  /* order of the fit polynomial = number of coefficents - 1 */
69  p = cpl_parameter_new_value("sinfoni.bp_lin.order",
70  CPL_TYPE_INT,
71  "Order: "
72  "order of the fit polynomial = "
73  "number of coefficents - 1",
74  "sinfoni.bp_lin",
75  2);
76 
77  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"bp_lin-order");
78  cpl_parameterlist_append(list, p);
79 
80 
81 
82  p = cpl_parameter_new_value("sinfoni.bp_lin.thresh_sigma_factor",
83  CPL_TYPE_DOUBLE,
84  "Threshold Sigma Factor: "
85  "threshold factor of the clean standard "
86  "deviation. If the deviations of the linear "
87  "polynomial coefficients exceed this threshold "
88  "the corresponding pixels are declared as bad ",
89  "sinfoni.bp_noise",
90  10.);
91 
92  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"bp_lin-thresh_sigma_fct");
93  cpl_parameterlist_append(list, p);
94 
95 
96 
97  /* if a non-linear coefficient exceeds this value the
98  corresponding pixel is declared as bad
99  */
100  p = cpl_parameter_new_value("sinfoni.bp_lin.nlin_threshold",
101  CPL_TYPE_DOUBLE,
102  "Non Linear Threshold",
103  "sinfoni.bp_lin",
104  0.5);
105 
106  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"bp_lin-nlin_threshold");
107  cpl_parameterlist_append(list, p);
108 
109 
110  /* float
111  threshold used in the clean mean percentage of rejection used to reject
112  low and high frame */
113  /* percentage of extreme pixel value to reject when calculating the mean
114  and stdev */
115  p = cpl_parameter_new_range("sinfoni.bp_lin.low_rejection",
116  CPL_TYPE_DOUBLE,
117  "low_rejection: "
118  "percentage of rejected low intensity "
119  "pixels before averaging",
120  "sinfoni.bp_lin",
121  10.,
122  0.,
123  100.);
124 
125  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"bp_lin-lo_rej");
126  cpl_parameterlist_append(list, p);
127 
128  /* float
129  threshold used in the clean mean percentage of rejection used to reject
130  low and high frame */
131  /* percentage of extreme pixel value to reject when calculating the mean
132  and stdev */
133  p = cpl_parameter_new_range("sinfoni.bp_lin.high_rejection",
134  CPL_TYPE_DOUBLE,
135  "high_rejection: "
136  "percentage of rejected high intensity "
137  "pixels before averaging",
138  "sinfoni.bp_lin",
139  10.,0.,100.);
140 
141  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"bp_lin-hi_rej");
142  cpl_parameterlist_append(list, p);
143 
144 
145  return;
146 
147 }