Cheetah - SKA - PSS - Prototype Time Domain Search Pipeline
ScanConfig.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_PIPELINE_SCANCONFIG_H
25 #define SKA_CHEETAH_PIPELINE_SCANCONFIG_H
26 
27 
28 #include "cheetah/utils/Config.h"
29 #include "cheetah/data/Units.h"
30 #include "cheetah/data/DedispersionMeasure.h"
31 
32 namespace ska {
33 namespace cheetah {
34 namespace pipeline {
35 
43 {
44  public:
45  typedef typename boost::units::make_scaled_unit<boost::units::si::time, boost::units::scale<10, boost::units::static_rational<-6>>>::type MicroSeconds;
46  typedef boost::units::quantity<MicroSeconds, double> MicroSecTimeType;
47  typedef data::DedispersionMeasureType<double> Dm;
48  typedef boost::units::quantity<boost::units::si::time, int> ScanTimeType;
49  public:
50  ScanConfig();
51  ~ScanConfig();
52 
56  data::AccelerationType accel_range() const;
57 
61  data::FrequencyType beam_bw() const;
62 
66  int beam_id() const;
67 
71  int bit_per_sample() const;
72 
76  Dm disp_measure() const;
77 
81  int freq_channels() const;
82 
86  int scan_id() const;
87 
91  ScanTimeType scan_time() const;
92 
96  int sub_array_id() const;
97 
101  MicroSecTimeType time_resolution() const;
102 
106  uint64_t time_samples() const;
107 
108  /*
109  * @brief Returns the maximun number of trials
110  */
111  int trials_number() const;
112 
113  protected:
114  void add_options(OptionsDescriptionEasyInit& add_options) override;
115 
116  private:
117  int _beam_id;
118  int _bit_per_sample;
119  int _freq_channels;
120  int _scan_id;
121  int _sub_array_id;
122  int _trials_number;
123  uint64_t _time_samples;
124  data::AccelerationType _accel_range;
125  data::FrequencyType _beam_bw;
126  Dm _disp_measure;
127  ScanTimeType _scan_time;
128  MicroSecTimeType _time_resolution;
129 };
130 
131 
132 } // namespace pipeline
133 } // namespaceClasscheetah
134 } // namespace ska
135 
136 #endif // SKA_CHEETAH_PIPELINE_SCANCONFIG_H
ScanTimeType scan_time() const
Teturns the global param scanTime in sec.
Definition: ScanConfig.cpp:113
int scan_id() const
Returns the global scan Identifier.
Definition: ScanConfig.cpp:108
Dm disp_measure() const
Returns the Dispersion measure in pc cm-3.
Definition: ScanConfig.cpp:98
Base class for module configuration.
Definition: Config.h:42
MicroSecTimeType time_resolution() const
Definition: ScanConfig.cpp:128
uint64_t time_samples() const
Returns the time samples in each blocks.
Definition: ScanConfig.cpp:123
Class of all common input parameters.
Definition: ScanConfig.h:42
Some limits and constants for FLDO.
Definition: Brdz.h:35
int sub_array_id() const
Returns the Sub-array Identifier.
Definition: ScanConfig.cpp:118
int freq_channels() const
Returns the number of Frequency channels.
Definition: ScanConfig.cpp:103
data::FrequencyType beam_bw() const
Returns Beam Band width in MHz.
Definition: ScanConfig.cpp:83
int beam_id() const
Returns Beam Identifier.
Definition: ScanConfig.cpp:88
int bit_per_sample() const
Returns the number of bits per every sample.
Definition: ScanConfig.cpp:93
data::AccelerationType accel_range() const
Returns acceleration search range (+/-)
Definition: ScanConfig.cpp:78