Scheduled service maintenance on November 22


On Friday, November 22, 2024, between 06:00 CET and 18:00 CET, GIN services will undergo planned maintenance. Extended service interruptions should be expected. We will try to keep downtimes to a minimum, but recommend that users avoid critical tasks, large data uploads, or DOI requests during this time.

We apologize for any inconvenience.

test_append.py 591 B

12345678910111213141516171819202122232425262728293031
  1. import ctypes
  2. import multiprocessing as mp
  3. import numpy as np
  4. import daq2 as daq
  5. def test_writing():
  6. fname = '/home/ivaz/devel/data/2018-09-06/norm.bin'
  7. np.random.seed(1)
  8. ncols = 96
  9. smp_size = 300
  10. res0 = np.empty([0,ncols], dtype=np.float32)
  11. res = np.fromfile(fname, dtype=np.float32)
  12. res2 = res.reshape(res.size//ncols, ncols)
  13. for ii in range(res2.shape[0]//smp_size):
  14. tmp = daq.get_raw()
  15. res0 = np.append(res0, tmp, axis=0)
  16. assert np.array_equal(res0, res2), 'np arrays are different'
  17. return (res0, res2)
  18. test_writing()