detect_analysis.py 文件源码

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

项目:Thrifty 作者: swkrueger 项目源码 文件源码
def _plot_samples(self, signal, ax, mag, real, imag, rms, noise=True):
        if mag:
            ax.plot(signal.mag, label='Mag')
        if real:
            ax.plot(np.real(signal), label='Real')
        if imag:
            ax.plot(np.imag(signal), label='Imag')
        if rms:
            ax.axhline(signal.rms, label='RMS', linestyle='--')
        if noise:
            noise_est = self.result.carrier_info.noise / np.sqrt(len(signal))
            ax.axhline(noise_est, label='Noise', linestyle='--', color='g')
        ax.legend()
        ax.set_xlabel('Sample')
        ax.set_ylabel('Value')
        # ax2 = ax.twiny()
        # ax2.set_xlim(0, len(signal) / self.sample_rate * 1e3)
        # ax2.set_xlabel('Time (ms)')
        ax.grid()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号