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/sift/simple_sift/Config.h"
25 
26 namespace ska {
27 namespace cheetah {
28 namespace sift {
29 namespace simple_sift {
30 
31 Config::Config()
32  : BaseT("simple_sift", "turn on/off the sift algo")
33  , _num_candidate_harmonics(8)
34  , _match_factor(0.001)
35 {
36 }
37 
38 void Config::add_options(OptionsDescriptionEasyInit& add_options)
39 {
40  BaseT::add_options(add_options);
41  add_options("num_candidate_harmonics", boost::program_options::value<std::size_t>(&_num_candidate_harmonics)->default_value(_num_candidate_harmonics), "The max harmonic to use when sifting.");
42  add_options("match_factor", boost::program_options::value<double>(&_match_factor)->default_value(_match_factor), "Closeness factor to determine if a signal is a harmonic of a candidate.");
43 }
44 
45 std::size_t Config::num_candidate_harmonics() const
46 {
47  return _num_candidate_harmonics;
48 }
49 
50 void Config::num_candidate_harmonics(std::size_t const& num_candidate_harmonics)
51 {
52  _num_candidate_harmonics = num_candidate_harmonics;
53 }
54 
55 double Config::match_factor() const
56 {
57  return _match_factor;
58 }
59 
60 void Config::match_factor(double const& match_factor)
61 {
62  _match_factor = match_factor;
63 }
64 
65 } // namespace simple_sift
66 } // namespace sift
67 } // namespace cheetah
68 } // namespace ska
Some limits and constants for FLDO.
Definition: Brdz.h:35