3#include "../../catch2/catch.hpp"
8#define MX_NO_ERROR_REPORTS
10#include "../../../include/sigproc/signalWindows.hpp"
11#include "../../../include/improc/eigenImage.hpp"
19SCENARIO(
"creating 2D Rectangular Tukey Windows",
"[sigproc::signalWindows::tukey2dSquare]" )
21 GIVEN(
"a centered square array" )
23 WHEN(
"256x256, alpha=0" )
27 win.resize( 256, 256 );
29 mx::sigproc::window::tukey2dSquare<float>( win.data(),
35 0.5 * ( win.rows() - 1.0 ),
36 0.5 * ( win.cols() - 1.0 ) );
38 REQUIRE( win.sum() == 256 * 256 );
41 WHEN(
"256x256, alpha=1" )
45 win.resize( 256, 256 );
47 mx::sigproc::window::tukey2dSquare<float>( win.data(),
53 0.5 * ( win.rows() - 1.0 ),
54 0.5 * ( win.cols() - 1.0 ) );
56 std::vector<float> win1( 256 );
57 mx::sigproc::window::tukey<float>( win1, 1.0 );
59 REQUIRE_THAT( win( 0, 0 ), Catch::Matchers::WithinAbs( win1[0] * win1[0], 1e-6 ) );
60 REQUIRE_THAT( win( 10, 15 ), Catch::Matchers::WithinAbs( win1[10] * win1[15], 1e-6 ) );
62 WHEN(
"256x256, alpha=0.5" )
66 win.resize( 256, 256 );
68 mx::sigproc::window::tukey2dSquare<float>( win.data(),
74 0.5 * ( win.rows() - 1.0 ),
75 0.5 * ( win.cols() - 1.0 ) );
77 std::vector<float> win1( 256 );
78 mx::sigproc::window::tukey<float>( win1, 0.5 );
80 REQUIRE_THAT( win( 0, 0 ), Catch::Matchers::WithinAbs( win1[0] * win1[0], 1e-6 ) );
81 REQUIRE_THAT( win( 10, 15 ), Catch::Matchers::WithinAbs( win1[10] * win1[15], 1e-6 ) );
SCENARIO("Loading aoAtmosphere config settings", "[ao::analysis::aoAtmosphere]")
Eigen::Array< scalarT, -1, -1 > eigenImage
Definition of the eigenImage type, which is an alias for Eigen::Array.