Cheetah - SKA - PSS - Prototype Time Domain Search Pipeline
DmConstant.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_DATA_DMCONSTANT_H
25 #define SKA_CHEETAH_DATA_DMCONSTANT_H
26 
27 #pragma GCC diagnostic push
28 #pragma GCC diagnostic ignored "-Wall"
29 #pragma GCC diagnostic ignored "-Wunused-parameter"
30 #pragma GCC diagnostic ignored "-Wpragmas"
31 #include <boost/units/quantity.hpp>
32 #include <boost/units/conversion.hpp>
33 #include <boost/units/io.hpp>
34 #include <boost/units/derived_dimension.hpp>
35 #include <boost/units/systems/cgs/length.hpp>
36 #include <boost/units/systems/cgs/time.hpp>
37 #include <boost/units/systems/si/time.hpp>
38 #include <boost/units/systems/cgs/frequency.hpp>
39 #include <boost/units/physical_dimensions/length.hpp>
40 #include <boost/units/physical_dimensions/frequency.hpp>
41 #include <boost/units/physical_dimensions/time.hpp>
42 #include <boost/units/base_units/astronomical/parsec.hpp>
43 #pragma GCC diagnostic pop
44 
45 namespace ska {
46 namespace cheetah {
47 namespace data {
48 namespace dm_constant {
49 
71 typedef boost::units::scaled_base_unit<boost::units::si::second_base_unit, boost::units::scale<10, boost::units::static_rational<6> > > megaseconds_base_unit;
72 
73 namespace s_mhz {
74 
75 typedef boost::units::derived_dimension<
76  megaseconds_base_unit,-2,
77  boost::units::astronomical::parsec_base_unit, -1,
78  boost::units::length_base_dimension, 3,
79  boost::units::time_base_dimension,1
80  >::type DmConstantDimensionType1;
81 typedef boost::units::unit<DmConstantDimensionType1, boost::units::cgs::system> Unit;
82 
83 
84 } // namespace s_mhz
85 
86 namespace ms_mhz {
87 
88 typedef boost::units::scaled_base_unit<boost::units::si::second_base_unit, boost::units::scale<10, boost::units::static_rational<-3> > > ms_base_unit;
89 
90 typedef boost::units::derived_dimension<
91  megaseconds_base_unit,-2,
92  boost::units::astronomical::parsec_base_unit, -1,
93  boost::units::length_base_dimension, 3,
94  ms_base_unit,1
95  >::type DmConstantDimensionType2;
96 typedef boost::units::unit<DmConstantDimensionType2, boost::units::cgs::system> Unit;
97 
98 
99 } // namespace ms_mhz
100 
101 BOOST_UNITS_STATIC_CONSTANT(s_mhz_squared_cm_cubed_per_pc, s_mhz::Unit);
102 BOOST_UNITS_STATIC_CONSTANT(ms_mhz_squared_cm_cubed_per_pc, ms_mhz::Unit);
103 
104 namespace s_mhz {
105  static const boost::units::quantity<Unit, double> dm_constant = 4.1493775933609e3 * s_mhz_squared_cm_cubed_per_pc;
106 }
107 
108 namespace ms_mhz {
109  static const boost::units::quantity<Unit, double> dm_constant = 4.1493775933609e6 * ms_mhz_squared_cm_cubed_per_pc;
110 }
111 
112 } // namespace dm_constant
113 } // namespace data
114 } // namespace cheetah
115 } // namespace ska
116 
117 #endif // SKA_CHEETAH_DATA_DMCONSTANT_H
Some limits and constants for FLDO.
Definition: Brdz.h:35