Commit 69aea9f0 authored by Jan Oliver Oelerich's avatar Jan Oliver Oelerich

Changed chunking

parent c4ddc963
......@@ -177,7 +177,7 @@ void IO::initNCFile(const shared_ptr<GridManager> &gridman, const shared_ptr<ato
g.defineVar<double>("adf_detector_grid", vd({angleDim}));
g.defineVar<double>("adf_slice_coords", vd({sliceDim}));
v.chunking(vs({1, adf_points_x, adf_points_y, 1, 1, p.adfNumberOfDetectorAngles()}));
v.chunking(vs({1, adf_points_x, adf_points_y, 1, gridman->adfSliceCoords().size(), p.adfNumberOfDetectorAngles()}));
if(p.outputCompress())
v.deflate(1);
......@@ -210,7 +210,7 @@ void IO::initNCFile(const shared_ptr<GridManager> &gridman, const shared_ptr<ato
g.defineVar<double>("cbed_y_grid", vd({kyDim}));
g.defineVar<double>("cbed_slice_coords", vd({sliceDim}));
v.chunking(vs({1, 1, 1, 1, 1, k_sampling_x, k_sampling_y}));
v.chunking(vs({1, 1, 1, 1, gridman->cbedSliceCoords().size(), k_sampling_x, k_sampling_y}));
if(p.outputCompress())
v.deflate(1);
......
......@@ -53,4 +53,15 @@ TEST_CASE("Distributed bins", "[algorithms]") {
REQUIRE(a[2] == 20);
REQUIRE(std::abs(a[1] - 10.3033) < 0.01);
auto b = algorithms::adaptiveSpace(0, 300, 301, 1.0, true);
std::cout << b[0] << " " << b[1]<< " " << b[300] << std::endl;
auto i = algorithms::getIndexOfAdaptiveSpace(300.5, 0, 300, 301, 1.0, true);
std::cout << i << std::endl;
//REQUIRE(b[0] == 5);
//REQUIRE(b[2] == 20);
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment