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 #include "cheetah/rfim/iqrmcpu/Config.h"
25 
26 
27 namespace ska {
28 namespace cheetah {
29 namespace rfim {
30 namespace iqrmcpu {
31 
32 Config::Config()
33  : utils::Config("rfim_iqrmcpu")
34  , _active(false)
35  , _max_lag(3)
36  , _nsigma(3.0)
37  , _edge_channels(0)
38 {
39 }
40 
41 Config::~Config()
42 {
43 }
44 
45 void Config::add_options(OptionsDescriptionEasyInit& add_options)
46 {
47  add_options
48  ("active", boost::program_options::value<bool>(&_active), "use algorithm for rfi clipping")
49  ("max_lag", boost::program_options::value<std::size_t>(&_max_lag), "widest RFI event in frequency to check for (as numbero of channels)")
50  ("nsigma", boost::program_options::value<float>(&_nsigma), "Set the threshold for flagging in units of standard deviation")
51  ("edge_channels", boost::program_options::value<std::size_t>(&_edge_channels), "Number of channels to flag on band edges");
52 }
53 
54 bool Config::active() const
55 {
56  return _active;
57 }
58 
59 std::size_t Config::max_lag() const
60 {
61  return _max_lag;
62 }
63 
64 float Config::nsigma() const
65 {
66  return _nsigma;
67 }
68 
69 std::size_t Config::edge_channels() const
70 {
71  return _edge_channels;
72 }
73 
74 } // namespace iqrmcpu
75 } // namespace rfim
76 } // namespace cheetah
77 } // namespace ska
Some limits and constants for FLDO.
Definition: Brdz.h:35
bool active() const
indicate if the algorithm is to be used
Definition: Config.cpp:49