-3.620107E+01 + 6.850121E+01j, -3.620107E+01 + -6.850121E+01j ] instName = 'SFJD_10' print("calculating info for a " + instName) inst1 = Response(desc=instName, units='Radians') inst1.zeros = zer1 inst1.poles = pol1 #norm_freq=0.02 norm_freq = 1.0 n1, f1 = inst1.check_normalization(freq=norm_freq, nfft=2**26, t_sample=0.001) scale_fac = 1.0 / n1 print('The A0 norm factor is: ' + str(scale_fac) + ' for f=' + str(norm_freq)) #check the value inst1.a0 = 1.0 / n1 A01 = inst1.a0 n, f = inst1.check_normalization(freq=norm_freq, nfft=2**26, t_sample=0.001) print('This should be close to 1: ' + str(1.0 / n)) h1, f1 = paz_to_freq_resp(inst1.poles, inst1.zeros, scale_fac, 0.001, 2**26, freq=True) print(h1) # and now for the second resp.... inst2 = Response(desc=instName, units='Radians') inst2.zeros = zer2 inst2.poles = pol2
] print("calculating info for a " + instName) # use Austin's response class to build the resp from the poles and zeros inst = Response(desc=instName, units='Radians') inst.zeros = zer inst.poles = pol #norm_freq=0.05 #norm_freq=0.02 norm_freq = 1.0 n, f = inst.check_normalization(freq=norm_freq, nfft=2**26, t_sample=0.001) scale_fac = 1.0 / n print('The A0 norm factor is: ' + str(scale_fac) + ' for f=' + str(norm_freq)) #check the value inst.a0 = 1.0 / n n, f = inst.check_normalization(freq=norm_freq, nfft=2**26, t_sample=0.001) print('This should be close to 1: ' + str(1.0 / n)) h, f = paz_to_freq_resp(inst.poles, inst.zeros, scale_fac, 0.001, 2**26, freq=True) plt.figure() plt.subplot(121) plt.semilogx(f, abs(h)) plt.xlabel('Frequency [Hz]') plt.ylabel('Amplitude')