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/sps/Config.h"
25 #include "cheetah/ddtr/DedispersionConfig.h"
26 
27 
28 namespace ska {
29 namespace cheetah {
30 namespace sps {
31 
32 Config::Config()
33  : BaseT("sps")
34  , _threshold(10.0)
35  , _dedispersion_samples(0)
36 {
37  add(_rfi_excision_config);
38 }
39 
40 Config::~Config()
41 {
42 }
43 
44 void Config::set_dedispersion_samples(std::size_t nsamples)
45 {
46  _dedispersion_samples = nsamples;
47 }
48 
49 void Config::add_options(OptionsDescriptionEasyInit& add_options)
50 {
51  add_options
52  ("threshold", boost::program_options::value<float>(&_threshold), "single pulse detection threshold in sigmas")
53  ("dedispersion_samples", boost::program_options::value<std::size_t>(&_dedispersion_samples)->default_value(_dedispersion_samples), "number of samples to dedisperse (minimum value)");
54 }
55 
56 float Config::threshold() const
57 {
58  return _threshold;
59 }
60 
61 std::size_t Config::dedispersion_samples() const
62 {
63  return _dedispersion_samples;
64 }
65 
67 {
68  return BaseT::config<astroaccelerate::Config>();
69 }
70 
72 {
73  return BaseT::config<astroaccelerate::Config>();
74 }
75 
76 emulator::Config const& Config::emulator_config() const
77 {
78  return BaseT::config<emulator::Config>();
79 }
80 
81 emulator::Config& Config::emulator_config()
82 {
83  return BaseT::config<emulator::Config>();
84 }
85 
86 RfiExcisionConfig const& Config::rfiexcision_config() const
87 {
88  return _rfi_excision_config;
89 }
90 
91 } // namespace sps
92 } // namespace cheetah
93 } // namespace ska
Configuration for the Sps Cuda algorithms.
Definition: Config.h:40
Configuration for the paramters for flagging RFI during copy to the Aggregate buffer two main paramet...
Some limits and constants for FLDO.
Definition: Brdz.h:35
void set_dedispersion_samples(std::size_t nsamples)
Sets the dedispersion samples.
Definition: Config.cpp:44
std::size_t dedispersion_samples() const
the preferred number of samples to collect before launching the search
Definition: Config.cpp:61
astroaccelerate::Config const & astroaccelerate_config() const
return the astroaccelerate algorithms configuration specifics
Definition: Config.cpp:66
Configuration for the Sps emulator.
Definition: Config.h:40
float threshold() const
single pulse detection threshold in sigmas
Definition: Config.cpp:56