Commit 83abb418 authored by David Schimansky's avatar David Schimansky
Browse files

Fix bug in send_test_data function

parent 46d13416
......@@ -171,16 +171,16 @@ class dyn(DintefSubCmd):
# set cycle length to 100
# and number of words to readout to 128
# dev.command('REG 1:0x0C08 6553728')
dev.reg_write(DintefDevice.reg.dyn[2]["num_words_to_read"], 128)
dev.reg_write(DintefDevice.reg.dyn[2]["conf_cycle_length"], 100)
dev.command('REG 1:0x0C08 6553728')
#dev.reg_write(DintefDevice.reg.dyn[2]["num_words_to_read"], 128)
#dev.reg_write(DintefDevice.reg.dyn[2]["conf_cycle_length"], 100)
# set conf_send_test_data to 1
# dev.command('REG 1:0x0C00 2')
dev.reg_write(dev.reg.dyn[0]["conf_send_test_data"], 1)
dev.command('REG 1:0x0C00 2')
#dev.reg_write(dev.reg.dyn[0]["conf_send_test_data"], 1)
# set dyn ctrl input register to command RUN RO
# dev.command('REG 1:0x0C04 3')
dev.reg_write(dev.reg.dyn[1]["dyn_in"], 3)
dev.command('REG 1:0x0C04 3')
#dev.reg_write(dev.reg.dyn[1]["dyn_in"], 3)
self.log.debug('Dyn Ctrl State before write: ' +
# dev.command('?REG 1:0x0C28'))
dev.reg_read(dev.reg.dyn[10]["o_current_state"]))
......@@ -575,30 +575,30 @@ class measurement(DintefSubCmd):
if (pathToDataset == ''):
delim = ''
for i in range(8):
nm = "cntValsFE" + str(i / 2)
hdf5File[pathToDataset + delim + nm][:, currIndex, i % 2] = \
np.int_(data[:, i / 2, i % 2])
# hdf5File[pathToDataset + delim + 'cntValsFE0'][:, currIndex, 0] = \
# np.int_(data[:, 0, 0])
# hdf5File[pathToDataset + delim + 'cntValsFE0'][:, currIndex, 1] = \
# np.int_(data[:, 0, 1])
# hdf5File[pathToDataset + delim + 'cntValsFE1'][:, currIndex, 0] = \
# np.int_(data[:, 1, 0])
# hdf5File[pathToDataset + delim + 'cntValsFE1'][:, currIndex, 1] = \
# np.int_(data[:, 1, 1])
# hdf5File[pathToDataset + delim + 'cntValsFE2'][:, currIndex, 0] = \
# np.int_(data[:, 2, 0])
# hdf5File[pathToDataset + delim + 'cntValsFE2'][:, currIndex, 1] = \
# np.int_(data[:, 2, 1])
# hdf5File[pathToDataset + delim + 'cntValsFE3'][:, currIndex, 0] = \
# np.int_(data[:, 3, 0])
# hdf5File[pathToDataset + delim + 'cntValsFE3'][:, currIndex, 1] = \
# np.int_(data[:, 3, 1])
# for i in range(8):
# nm = "cntValsFE" + str(i / 2)
# hdf5File[pathToDataset + delim + nm][:, currIndex, i % 2] = \
# np.int_(data[:, i / 2, i % 2])
hdf5File[pathToDataset + delim + 'cntValsFE0'][:, currIndex, 0] = \
np.int_(data[:, 0, 0])
hdf5File[pathToDataset + delim + 'cntValsFE0'][:, currIndex, 1] = \
np.int_(data[:, 0, 1])
hdf5File[pathToDataset + delim + 'cntValsFE1'][:, currIndex, 0] = \
np.int_(data[:, 1, 0])
hdf5File[pathToDataset + delim + 'cntValsFE1'][:, currIndex, 1] = \
np.int_(data[:, 1, 1])
hdf5File[pathToDataset + delim + 'cntValsFE2'][:, currIndex, 0] = \
np.int_(data[:, 2, 0])
hdf5File[pathToDataset + delim + 'cntValsFE2'][:, currIndex, 1] = \
np.int_(data[:, 2, 1])
hdf5File[pathToDataset + delim + 'cntValsFE3'][:, currIndex, 0] = \
np.int_(data[:, 3, 0])
hdf5File[pathToDataset + delim + 'cntValsFE3'][:, currIndex, 1] = \
np.int_(data[:, 3, 1])
# print(hdf5File)
......
Supports Markdown
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