Cheetah - SKA - PSS - Prototype Time Domain Search Pipeline
Config.h
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 #ifndef SKA_CHEETAH_SPS_CONFIG_H
25 #define SKA_CHEETAH_SPS_CONFIG_H
26 
27 
28 #include "cheetah/utils/Config.h"
29 #include "cheetah/sps/emulator/Config.h"
30 #include "cheetah/sps/astroaccelerate/Config.h"
31 #include "cheetah/ddtr/DedispersionTrialPlan.h"
32 #include "cheetah/data/DedispersionMeasure.h"
33 #include "cheetah/sps/RfiExcisionConfig.h"
34 #include "panda/ProcessingEngine.h"
35 #include "panda/ResourcePool.h"
36 #include "panda/arch/nvidia/Nvidia.h"
37 #include "panda/PoolSelector.h"
38 #include "panda/MultipleConfigModule.h"
39 
40 namespace ska {
41 namespace cheetah {
42 namespace sps {
43 
44 typedef panda::MultipleConfigModule<ddtr::DedispersionTrialPlan
45  , emulator::Config
46  , astroaccelerate::Config
47  > SpsAlgoConfigs;
52 class Config : public SpsAlgoConfigs
53 {
54  typedef SpsAlgoConfigs BaseT;
55 
56  public:
57  typedef data::DedispersionMeasureType<float> Dm;
58 
59  public:
60  Config();
61  ~Config();
62 
66  float threshold() const;
67 
72  std::size_t dedispersion_samples() const;
73 
79  emulator::Config const& emulator_config() const;
80  emulator::Config& emulator_config();
81  RfiExcisionConfig const& rfiexcision_config() const;
82 
88  void set_dedispersion_samples(std::size_t nsamples);
89 
90  protected:
91  void add_options(OptionsDescriptionEasyInit& add_options) override;
92 
93  private:
94  float _threshold;
95  std::size_t _dedispersion_samples;
96  RfiExcisionConfig _rfi_excision_config;
97 };
98 
99 // defines a templated ConfigType for Sps that adds on pool selection
100 template<typename PoolManagerType>
101 using ConfigType = panda::PoolSelector<PoolManagerType, Config>;
102 
103 } // namespace sps
104 } // namespace cheetah
105 } // namespace ska
106 
107 #endif // SKA_CHEETAH_SPS_CONFIG_H
all non-templated options for the sps module
Definition: Config.h:52
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
float threshold() const
single pulse detection threshold in sigmas
Definition: Config.cpp:56