Cheetah - SKA - PSS - Prototype Time Domain Search Pipeline
PsbcTest.cpp
1 #include "cheetah/data/test_utils/DmTrialsGeneratorUtil.h"
2 #include "cheetah/psbc/test/PsbcTest.h"
3 #include "cheetah/psbc/Psbc.h"
4 #include "cheetah/psbc/Config.h"
5 #include "cheetah/utils/NullHandler.h"
6 #include "cheetah/data/Units.h"
7 #include "cheetah/data/DmTrials.h"
8 
9 namespace ska {
10 namespace cheetah {
11 namespace psbc {
12 namespace test {
13 
14 PsbcTest::PsbcTest()
15  : ::testing::Test()
16 {
17 }
18 
19 PsbcTest::~PsbcTest()
20 {
21 }
22 
23 void PsbcTest::SetUp()
24 {
25 }
26 
27 void PsbcTest::TearDown()
28 {
29 }
30 
31 TEST_F(PsbcTest, test_contiguity)
32 {
33  typedef data::DmTrials<cheetah::Cpu,float> DmTrialsType;
34  typedef typename DmTrialsType::DmType Dm;
35  typedef typename DmTrialsType::TimeType Seconds;
36 
37  Config config;
38  utils::NullHandler handler;
39  Psbc<decltype(handler)> buffer(config,handler);
40  data::test::DmTrialsGeneratorUtil<DmTrialsType> trials_generator;
41  config.dump_time(Seconds(10.0 * data::seconds));
42  for (std::size_t block_idx=0; block_idx<10; ++block_idx)
43  {
44  auto trial = trials_generator.generate(Seconds(0.000064*data::seconds),10,3);
45  buffer(trial);
46  }
47  ASSERT_TRUE(buffer.is_contiguous());
48 }
49 
50 } // namespace test
51 } // namespace psbc
52 } // namespace cheetah
53 } // namespace ska
Some limits and constants for FLDO.
Definition: Brdz.h:35