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_FSKY_MODEL_H
5 #define DP3_COMMON_TEST_UNIT_FIXTURES_FSKY_MODEL_H
6 
7 #include "sky_model/Patch.h"
8 
9 #include <array>
10 #include <string>
11 
19  public:
24  struct Arguments {
28  std::string sky_model_name;
29 
31  std::string sky_model_contents =
32  R"(FORMAT = Name, Type, Ra, Dec, I, MajorAxis, MinorAxis, PositionAngle, ReferenceFrequency='134e6', SpectralIndex='[0.0]'
33 center, POINT, 16:38:28.205000, +63.44.34.314000, 1, , , , ,
34 ra_off, POINT, 16:58:28.205000, +63.44.34.314000, 0.5, , , , ,
35 radec_off, POINT, 16:38:28.205000, +65.44.34.314000, 0.25, , , , ,
36 )";
37  };
38 
39  explicit FixtureSkyModel(const Arguments& arguments);
40 };
41 
43 namespace test_source_db {
44 struct Patch {
45  std::string name;
46  double ra;
47  double dec;
48  double brightness;
50 };
51 
56 extern const std::array<Patch, 3> Expected;
57 
62 void CheckEqual(const dp3::sky_model::Patch& lhs, const Patch& rhs);
63 
64 } // namespace test_source_db
65 #endif // DP3_COMMON_TEST_UNIT_FIXTURES_FSKY_MODEL_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:43
void CheckEqual(const dp3::sky_model::Patch &lhs, const Patch &rhs)
const std::array< Patch, 3 > Expected
Definition: fSkyModel.h:24
std::string sky_model_contents
The contents of the skymodel file to be written to the disc.
Definition: fSkyModel.h:31
std::string sky_model_name
Definition: fSkyModel.h:28
Definition: fSkyModel.h:44
int n_components
Definition: fSkyModel.h:49
double brightness
Definition: fSkyModel.h:48
double ra
Definition: fSkyModel.h:46
std::string name
Definition: fSkyModel.h:45
double dec
Definition: fSkyModel.h:47