def plot_amplitudes_zpk(zpks, filename_pdf, fmin=0.001, fmax=100., nf=100, fnorm=None): import gmtpy p = gmtpy.LogLogPlot(width=30*gmtpy.cm, yexp=0) for i, (zeros, poles, constant) in enumerate(zpks): f, h = evaluate(zeros, poles, constant, fmin, fmax, nf) if fnorm is not None: h /= evaluate_at(zeros, poles, constant, fnorm) amp = num.abs(h) p.plot((f, amp), '-W2p,%s' % gmtpy.color(i)) p.save(filename_pdf)
def plot_amplitudes(self, filename_pdf, type='displacement'): import gmtpy p = gmtpy.LogLogPlot() f = self.sampled_response.frequencies() atab = num.abs(self.response(f, method='tabulated', type=type)) acom = num.abs(self.response(f, method='gains-and-filters', type=type)) aconst = num.abs(self.response(f, method='gains', type=type)) p.plot((f, atab), '-W2p,red') p.plot((f, acom), '-W1p,blue') p.plot((f, aconst), '-W1p,green') p.save(filename_pdf)