DP3
fSkymodel.h
Go to the documentation of this file.
1 // Copyright (C) 2021
2 // ASTRON (Netherlands Institute for Radio Astronomy)
3 
4 #ifndef DP3_COMMON_TEST_UNIT_FIXTURES_FSKYMODEL_H
5 #define DP3_COMMON_TEST_UNIT_FIXTURES_FSKYMODEL_H
6 
7 #include "model/Patch.h"
8 
9 #include <array>
10 #include <string>
11 
19  public:
24  struct Arguments {
28  std::string skymodel_name;
29 
34  std::string source_db_name = "";
35 
37  std::string skymodel_contents =
38  R"(FORMAT = Name, Type, Ra, Dec, I, MajorAxis, MinorAxis, PositionAngle, ReferenceFrequency='134e6', SpectralIndex='[0.0]'
39 center, POINT, 16:38:28.205000, +63.44.34.314000, 1, , , , ,
40 ra_off, POINT, 16:58:28.205000, +63.44.34.314000, 0.5, , , , ,
41 radec_off, POINT, 16:38:28.205000, +65.44.34.314000, 0.25, , , , ,
42 )";
43  };
44 
45  explicit FixtureSkymodel(const Arguments& arguments);
46 };
47 
49 namespace test_source_db {
50 struct Patch {
51  std::string name;
52  double ra;
53  double dec;
54  double brightness;
56 };
57 
62 extern const std::array<Patch, 3> Expected;
63 
68 void CheckEqual(const dp3::model::Patch& lhs, const Patch& rhs);
69 
70 } // namespace test_source_db
71 #endif // DP3_COMMON_TEST_UNIT_FIXTURES_FSKYMODEL_H
Definition: fSkymodel.h:18
FixtureSkymodel(const Arguments &arguments)
A set of sources for which direction dependent effects are assumed to be equal.
Definition: Patch.h:19
Helper function to be used with FixtureSkymodel.
Definition: fSkymodel.h:49
const std::array< Patch, 3 > Expected
void CheckEqual(const dp3::model::Patch &lhs, const Patch &rhs)
Definition: fSkymodel.h:24
std::string source_db_name
Definition: fSkymodel.h:34
std::string skymodel_contents
The contents of the skymodel file to be written to the disc.
Definition: fSkymodel.h:37
std::string skymodel_name
Definition: fSkymodel.h:28
Definition: fSkymodel.h:50
int n_components
Definition: fSkymodel.h:55
double brightness
Definition: fSkymodel.h:54
double ra
Definition: fSkymodel.h:52
std::string name
Definition: fSkymodel.h:51
double dec
Definition: fSkymodel.h:53