def get_descriptor(self, source_instr_settings, channel_settings):
# Create a channel
channel = X6Channel(channel_settings)
descrip = DataStreamDescriptor()
# If it's an integrated stream, then the time axis has already been eliminated.
# Otherswise, add the time axis.
if channel_settings['stream_type'] == 'Raw':
samp_time = 4.0e-9
descrip.add_axis(DataAxis("time", samp_time*np.arange(source_instr_settings['record_length']//4)))
descrip.dtype = np.float64
elif channel_settings['stream_type'] == 'Demodulated':
samp_time = 32.0e-9
descrip.add_axis(DataAxis("time", samp_time*np.arange(source_instr_settings['record_length']//32)))
descrip.dtype = np.complex128
else: # Integrated
descrip.dtype = np.complex128
return channel, descrip
评论列表
文章目录