Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
datashape = start_doc['dimensions']
elif 'shape' in start_doc:
datashape = start_doc['shape']
else:
logger.error('No dimension/shape is defined in hdr.start.')
datashape = [datashape[1], datashape[0]] # vertical first, then horizontal
for k in extra_list:
# k = k.encode('utf-8')
if k not in other_data.keys():
continue
_v = np.array(other_data[k])
v = _v.reshape(datashape)
if fly_type in ('pyramid',):
# flip position the same as data flip on det counts
v = flip_data(v, subscan_dims=subscan_dims)
data_dict[k] = v
return data_dict