PURIFY
Next-generation radio interferometric imaging
types.h
Go to the documentation of this file.
1 #ifndef PURIFY_TYPES_H
2 #define PURIFY_TYPES_H
3 
4 #include "purify/config.h"
5 #include <complex>
6 #include <Eigen/Core>
7 #include <Eigen/Dense>
8 #include <Eigen/SparseCore>
9 #include <sopt/types.h>
10 
11 namespace purify {
12 using sopt::Array;
13 using sopt::Image;
14 using sopt::Matrix;
15 using sopt::t_complex;
16 using sopt::t_int;
17 using sopt::t_real;
18 using sopt::t_uint;
19 using sopt::Vector;
20 
21 typedef std::complex<float> t_complexf;
23 typedef Eigen::Triplet<t_complex> t_tripletList;
24 
25 // Different available types of differentiable functions (f)
27 const std::map<std::string, diff_func_type> diff_type_string = {
29 
30 // Different available types of non-differentiable functions (g)
32 const std::map<std::string, nondiff_func_type> nondiff_type_string = {
34  {"denoiser", nondiff_func_type::Denoiser},
35  {"realIndicator", nondiff_func_type::RealIndicator}};
36 
39 template <class T = t_real, class I = t_int>
40 using Sparse = Eigen::SparseMatrix<T, Eigen::RowMajor, I>;
41 template <class T = t_real, class I = t_int>
42 using SparseVector = Eigen::SparseVector<T, Eigen::RowMajor, I>;
43 
44 enum class stokes { I, Q, U, V, XX, YY, XY, YX, LL, RR, LR, RL, P };
45 const std::map<stokes, t_int> stokes_int = {{stokes::I, 1}, {stokes::Q, 2}, {stokes::U, 3},
46  {stokes::V, 4}, {stokes::RR, -1}, {stokes::LL, -2},
47  {stokes::RL, -3}, {stokes::LR, -4}, {stokes::XX, -5},
48  {stokes::YY, -6}, {stokes::XY, -7}, {stokes::YX, -8}};
49 const std::map<std::string, stokes> stokes_string = {
50  {"I", stokes::I}, {"i", stokes::I}, {"Q", stokes::Q}, {"q", stokes::Q},
51  {"U", stokes::U}, {"u", stokes::U}, {"V", stokes::V}, {"v", stokes::V},
52  {"XX", stokes::XX}, {"xx", stokes::XX}, {"YY", stokes::YY}, {"yy", stokes::YY},
53  {"XY", stokes::XY}, {"xy", stokes::XY}, {"YX", stokes::YX}, {"yx", stokes::YX},
54  {"LL", stokes::LL}, {"ll", stokes::LL}, {"RR", stokes::RR}, {"rr", stokes::RR},
55  {"LR", stokes::LR}, {"lr", stokes::LR}, {"RL", stokes::RL}, {"rl", stokes::RL},
56  {"P", stokes::P}, {"p", stokes::P}};
57 
60 
61 namespace wproj_utilities {
62 namespace expansions {
64 enum class series { none, taylor, chebyshev };
65 } // namespace expansions
66 
67 } // namespace wproj_utilities
68 namespace constant {
70 const t_real pi = 3.14159265358979323846;
72 const t_real c = 299792458.0;
74 const t_real omega_e = 0.00007292115090;
75 } // namespace constant
76 } // namespace purify
77 #endif
const t_real c
speed of light in vacuum
Definition: types.h:72
const t_real pi
mathematical constant
Definition: types.h:70
const t_real omega_e
angular velocity of the earth rad/s
Definition: types.h:74
series
Type of series approximation.
Definition: types.h:64
const std::map< stokes, t_int > stokes_int
Definition: types.h:45
nondiff_func_type
Definition: types.h:31
std::complex< float > t_complexf
Definition: types.h:21
Eigen::SparseVector< T, Eigen::RowMajor, I > SparseVector
Definition: types.h:42
const std::map< std::string, stokes > stokes_string
Definition: types.h:49
const std::map< std::string, diff_func_type > diff_type_string
Definition: types.h:27
Eigen::Triplet< t_complex > t_tripletList
Root of the type hierarchy for triplet lists.
Definition: types.h:23
diff_func_type
Definition: types.h:26
stokes
Definition: types.h:44
dde_type
Types of DDEs in purify.
Definition: types.h:59
Eigen::SparseMatrix< T, Eigen::RowMajor, I > Sparse
A matrix of a given type.
Definition: types.h:40
const std::map< std::string, nondiff_func_type > nondiff_type_string
Definition: types.h:32