Cheetah - SKA - PSS - Prototype Time Domain Search Pipeline
PulsarInjectionConfig.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_GENERATORS_PULSARINJECTIONCONFIG_H
25 #define SKA_CHEETAH_GENERATORS_PULSARINJECTIONCONFIG_H
26 
27 
28 #include "pulse_profile/PulsarProfileId.h"
29 #include "PhaseModelFactory.h"
30 #include "SimplePhaseModelConfig.h"
31 #include "Tempo2PhaseModelConfig.h"
32 #include "cheetah/utils/Config.h"
33 #include "cheetah/data/DedispersionMeasure.h"
34 
35 namespace ska {
36 namespace cheetah {
37 namespace generators {
38 
46 {
47  public:
48  typedef PhaseModelFactory::type PhaseModelType;
49 
50  public:
51  PulsarInjectionConfig(std::string const& tagname = "pulsar");
53 
55  float signal_to_noise() const;
56 
58  void signal_to_noise(float snr);
59 
63  PulsarProfileId const& profile() const;
64 
68  void profile(std::string const& profile_name);
69 
73  void spectral_index(float si);
74 
78  float spectral_index() const;
79 
83  PhaseModelType const& phase_model() const;
84 
89 
95 
99  data::DedispersionMeasureType<double> dm() const;
100 
104  void dm(data::DedispersionMeasureType<double>);
105 
106  protected:
107  void add_options(OptionsDescriptionEasyInit& add_options) override;
108  void phase_model(std::string const&);
109 
110  private:
111  float _signal_to_noise;
112  float _spectral_index;
113  PulsarProfileId _profile_name;
114  mutable PhaseModelFactory _phase_model_factory;
115  data::DedispersionMeasureType<double> _dm;
116  PhaseModelType _phase_model;
117  SimplePhaseModelConfig _simple_phase_model_config;
118  Tempo2PhaseModelConfig _tempo2_phase_model_config;
119 };
120 
121 } // namespace generators
122 } // namespace cheetah
123 } // namespace ska
124 
125 #endif // SKA_CHEETAH_GENERATORS_PULSARINJECTIONCONFIG_H
Configuration parameters for the SimplePhase Model.
Base class for module configuration.
Definition: Config.h:42
PulsarProfileId const & profile() const
the name of the pulse profile to emulate
SimplePhaseModelConfig const & simple_phase_model_config() const
configuration for the simple phase model
data::DedispersionMeasureType< double > dm() const
the dedisperion measure to emulate
configuration parameters for a tempo2 predictor model
Some limits and constants for FLDO.
Definition: Brdz.h:35
Factory to generate known phase models.
Confgiuration Parameters for the pulsar injection generator.
placeholder for specifying pulsar profile database URI
float spectral_index() const
get the spectral index to emulate
void set_phase_model(SimplePhaseModelConfig const &)
set the phase model to single type with the speocife settings
PhaseModelType const & phase_model() const
return the phase model that has benn specified
float signal_to_noise() const
signal to nosie ratio to emulate