38TEST_CASE(
"pywfsSlopeReconstructor loads its configured quadrant mask",
"[ao::sim::pywfsSlopeReconstructor]" )
40 const std::filesystem::path testDirectory =
41 std::filesystem::temp_directory_path() /
"mxlib-pywfsSlopeReconstructor-test";
42 std::filesystem::remove_all( testDirectory );
43 std::filesystem::create_directories( testDirectory );
45 const std::filesystem::path previousDirectory = std::filesystem::current_path();
46 std::filesystem::current_path( testDirectory );
49 expectedMask << 1, 0, 1, 0, 1, 0;
51 const std::filesystem::path maskFile = testDirectory /
"quadrant-mask.fits";
55 pywfsSlopeReconstructor_test reconstructor;
56 reconstructor.detRows( 8 );
57 reconstructor.detCols( 8 );
58 reconstructor.maskFile( maskFile.string() );
60 REQUIRE( reconstructor.measurementSize() == 6 );
61 REQUIRE( reconstructor.quadMask().isApprox( expectedMask ) );
63 std::filesystem::current_path( previousDirectory );
64 std::filesystem::remove_all( testDirectory );
error_t write(const dataT *im, int d1, int d2, int d3, fitsHeader< verboseT > *head)
Write the contents of a raw array to the FITS file.