keysight.py 文件源码

python
阅读 42 收藏 0 点赞 0 评论 0

项目:Auspex 作者: BBN-Q 项目源码 文件源码
def table(self):
        """Return a 2D array of UInt32 representing the sequence"""
        table = np.zeros((len(self.sequence_items), 6), dtype=np.uint32)
        for ct, entry in enumerate(self.sequence_items):
            control_word = SequenceControlWord(\
                init_marker_sequence = 1 if ct==0 else 0, \
                end_marker_sequence = 1 if ct==(len(self.sequence_items) - 1) else 0, \
                marker_enable = 1 if isinstance(entry, WaveformEntry) else 0, \
                data_cmd_sel = 1 if isinstance(entry, IdleEntry) else 0 \
            )
            table[ct,0] = control_word.packed
            table[ct,1] = self.sequence_loop_ct if ct==0 else 0
            if isinstance(entry, WaveformEntry):
                table[ct, 2] = entry.loop_ct
                table[ct, 3] = entry.segment_id
                table[ct, 5] = 0xffffffff
            elif isinstance(entry, IdleEntry):
                table[ct, 3] = entry.dac_level()
                table[ct, 4] = entry.length
            else:
                raise TypeError("Unhandled sequence entry type")

        return table
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号