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/tdao/Config.h"
26 
27 
28 namespace ska {
29 namespace cheetah {
30 namespace tdao {
31 
32 Config::Config()
33  : cheetah::utils::Config("tdao")
34  , _threshold(9)
35  , _min_frequency(0.0f * data::hz)
36  , _max_frequency(5000.0f * data::hz)
37 {
38 }
39 
40 Config::~Config()
41 {
42 }
43 
44 cuda::Config const& Config::cuda_config() const
45 {
46  return _cuda_config;
47 }
48 
49 float Config::significance_threshold() const
50 {
51  return _threshold;
52 }
53 
54 void Config::significance_threshold(float val)
55 {
56  _threshold = val;
57 }
58 
59 data::FourierFrequencyType Config::minimum_frequency() const
60 {
61  return _min_frequency;
62 }
63 
64 void Config::minimum_frequency(data::FourierFrequencyType const& min_freq)
65 {
66  _min_frequency = min_freq;
67 }
68 
69 data::FourierFrequencyType Config::maximum_frequency() const
70 {
71  return _max_frequency;
72 }
73 
74 void Config::maximum_frequency(data::FourierFrequencyType const& max_freq)
75 {
76  _max_frequency = max_freq;
77 }
78 
79 void Config::add_options(OptionsDescriptionEasyInit& add_options)
80 {
81 
82  add_options
83  ("significance_threshold", boost::program_options::value<float>(&_threshold)->default_value(9.0f),
84  "The significance threshold for candidate to be selected (single trial significance).")
85  ("minimum_search_frequency", boost::program_options::value<float>()
86  ->default_value(1.0f)
87  ->notifier(
88  [&](float f)
89  {
90  _min_frequency = f * data::hz;
91  }
92  ),
93  "The minimum Fourier frequency to search for pulsed signals at (in Hz).")
94  ("maximum_search_frequency", boost::program_options::value<float>()
95  ->default_value(2000.0f)
96  ->notifier(
97  [&](float f)
98  {
99  _max_frequency = f * data::hz;
100  }
101  ),
102  "The maximum Fourier frequency to search for pulsed signals at (in Hz).");
103 }
104 
105 } // namespace tdao
106 } // namespace cheetah
107 } // namespace ska
Some limits and constants for FLDO.
Definition: Brdz.h:35