13#include <pybind11/numpy.h>
15namespace py = pybind11;
24 py::array_t<uint16_t> ret(256 * nframes);
25 auto ptr =
static_cast<uint16_t*
>(ret.request().ptr);
26 for (
size_t i=0; i<(size_t)nframes; ++i) {
28 for (
size_t j=0; j<256; ++j)
31 ret.resize({nframes, 256});
42 py::array_t<uint64_t> ret(nframes);
43 auto ptr =
static_cast<uint64_t*
>(ret.request().ptr);
44 for (
size_t i=0; i<(size_t)nframes; ++i) {
py::array_t< uint64_t > np_array_timestamp(daqdataformats::Fragment &frag)
Unpacks the timestamps in a Fragment containing WIBFrames into a numpy array with dimension (number o...
py::array_t< uint16_t > np_array_adc(daqdataformats::Fragment &frag)
Unpacks a Fragment containing WIBFrames into a numpy array with the ADC values and dimension (number ...
py::array_t< uint64_t > np_array_timestamp_data(void *data, int nframes)
Unpacks data containing WIBFrames into a numpy array with the timestamps with dimension (number of WI...
py::array_t< uint16_t > np_array_adc_data(void *data, int nframes)
Unpacks data containing WIBFrames into a numpy array with the ADC values and dimension (number of WIB...