Cheetah - SKA - PSS - Prototype Time Domain Search Pipeline
Config.cpp
1 /*
2  * The MIT License (MIT)
3  *
4  * Copyright (c) 2016 The SKA organisation
5  *
6  * Permission is hereby granted, free of charge, to any person obtaining a copy
7  * of this software and associated documentation files (the "Software"), to deal
8  * in the Software without restriction, including without limitation the rights
9  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10  * copies of the Software, and to permit persons to whom the Software is
11  * furnished to do so, subject to the following conditions:
12  *
13  * The above copyright notice and this permission notice shall be included in all
14  * copies or substantial portions of the Software.
15  *
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22  * SOFTWARE.
23  */
24 
25 #include "cheetah/rfim/Config.h"
26 
27 namespace ska {
28 namespace cheetah {
29 namespace rfim {
30 
31 
32 Config::Config()
33  : cheetah::utils::Config("rfim")
34  , _policy(true)
35 {
36  add(_ampp_config);
37  add(_cuda_config);
38  add(_sum_threshold_config);
39  add(_iqrmcpu_config);
40 }
41 
42 Config::~Config()
43 {
44 }
45 
46 void Config::add_options(OptionsDescriptionEasyInit& add_options)
47 {
48  add_options
49  ("flag-policy", boost::program_options::value<bool>(&_policy)->default_value(_policy), "if set true, detected RFI will be marked as a flag mask. Otherwise input data will be modified usinf the LastUnflagged replacement method");
50 }
51 
53 {
54  return _ampp_config;
55 }
56 
58 {
59  return _cuda_config;
60 }
61 
63 {
64  return _sum_threshold_config;
65 }
66 
68 {
69  return _iqrmcpu_config;
70 }
71 
73 {
74  return _ampp_config.active() ||
75  _cuda_config.active() ||
76  _sum_threshold_config.active() ||
77  _iqrmcpu_config.active();
78 }
79 
80 bool Config::flag_policy() const
81 {
82  return _policy;
83 }
84 
85 } // namespace rfim
86 } // namespace cheetah
87 } // namespace ska
iqrmcpu::Config const & iqrmcpu_algo_config() const
Configuration details for the iqrm RFIM algorithm.
Definition: Config.cpp:67
bool flag_policy() const
data policy
Definition: Config.cpp:80
sum_threshold::Config const & sum_threshold_algo_config() const
Configuration details for the sum_threshold based RFIM algorithm.
Definition: Config.cpp:62
bool algo_defined() const
returns true only if one or more algorithms have been marked as active
Definition: Config.cpp:72
bool active() const
indicate if the algorithm is to be used
Definition: Config.cpp:129
Some limits and constants for FLDO.
Definition: Brdz.h:35
cuda::Config const & cuda_algo_config() const
Configuration details for the cuda based RFIM algorithm.
Definition: Config.cpp:57
ampp::Config const & ampp_algo_config() const
Configuration details for the AMPP RFIM algorithm.
Definition: Config.cpp:52
Configuration Options for the ampp rfi clipping algorithm.
Definition: Config.h:40