# this is from sensor test suite zer3 = [0.000000E+00 + 0.000000E+00j, 0.000000E+00 + 0.000000E+00j] pol3 = [ -1.263000E-02 + 1.265000E-02j, -1.263000E-02 + -1.265000E-02j, -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)
pol = [ -3.731580E-02 + -3.670000E-02j, -3.731580E-02 + 3.670000E-02j, -9.738940E+00 + 0.000000E+00j, -2.199110E+02 + 1.382300E+02j, -2.199110E+02 + -1.382300E+02j, -2.199110E+02 + 6.848670E+02j, -2.199110E+02 + -6.848670E+02j ] 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)