Files
aare/examples/numpy_write_example.cpp
Bechir Braham 91a628cd6c pedestal (#67)
* add config files for multimodule receiving

* read subfiles with unordered and missing frames

* save work debugging

* Revert "save work debugging"

This reverts commit e791992a05.

* Revert "read subfiles with unordered and missing frames"

This reverts commit 1177fd129d.

* throw when two frames have different frame numbers

* write single part RawFile (working beta)

* correct total number of frames in master file

* add new mythen file with syncd frames

* save work

* save work for receive multimodule
multimodule config results in too much packet loss. needs more debugging.

* setup Task Distributiosn/ parallelization programming model

* read frames with same frame number

* clang-tidy fixes, formatting, add tests

* added second receiver

* Synchronize between zmq streams and merge frames

* improve readability in loop

* fix failing tests

* add simple test for merge frames

* restructure files and use top-level header

* working pedestal + tests

* test_pedestal statistics

* QA test pedestal, fix clang-tidy errors

---------

Co-authored-by: Bechir <bechir.brahem420@gmail.com>
Co-authored-by: Erik Frojdh <erik.frojdh@gmail.com>
2024-05-08 12:33:51 +02:00

26 lines
564 B
C++

#include "aare.hpp"
#include "aare/examples/defs.hpp"
#include <iostream>
using aare::File;
using aare::FileConfig;
using aare::Frame;
int main() {
auto path = std::filesystem::path("/tmp/test.npy");
auto dtype = aare::DType(typeid(uint32_t));
FileConfig const cfg = {dtype, 100, 100};
File npy(path, "w", cfg);
Frame f(100, 100, dtype.bitdepth());
for (int i = 0; i < 10000; i++) {
f.set<uint32_t>(i / 100, i % 100, i);
}
npy.write(f);
f.set<uint32_t>(0, 0, 77);
npy.write(f);
npy.write(f);
return 0;
}