test_h_infinity¶
wield.control.fitting.SISO.test.v2.test_h_infinity
This is a pytest module needing documentation
Functions
This is a pytest needing documentation |
|
This is a pytest needing documentation |
|
This is a pytest needing documentation |
Details
- test_simple1()[source][github]¶
This is a pytest needing documentation
code
1@pytest.mark.skipif(module_import_skip, reason="cannot import IIRrational_test_data") 2def test_simple1(): 3 data_name = "PUM_long" 4 data = testing_data_dev( 5 data_name, 6 instance_num=1, 7 set_num=1, 8 ) 9 out = v2.data2filter( 10 xfer=data.data, 11 F_Hz=data.F_Hz, 12 SNR=data.SNR, 13 order_initial=10, 14 delay_s=0, 15 F_nyquist_Hz=None, 16 poles=(-100, -50), 17 zeros=(-10, -50), 18 mode="fit", 19 delay_s_max=0.01, 20 h_infinity=0.99, 21 h_infinity_deweight=0.1, 22 # hints = [ 23 # testing.validate_plot_log(__file__, request), 24 # ], 25 ) 26 27 print(out.as_scipy_signal_ZPKsw()) 28 print(out.as_foton_ZPKsf()) 29 print(out.as_foton_str_ZPKsf()) 30 print(out.as_foton_ZPKsn()) 31 print(out.as_foton_str_ZPKsn()) 32 return
pytest information
This code is wrapped in a pytest function using conventions detailed in Pytest Conventions. The full name of this test, as known by the documentation, is:
wield.control.fitting.SISO.test.v2.test_h_infinity.test_simple1The full name is useful when building documentation, to link a reference to this page using
:func:`name`, or directly include it with an autofunction directive. The collapse nodes below show every instance of the test run. There may only be one, but if the test was run multiple times through pytest parametrizations, the list can be longer.test_simple1
output
{'xfer': array([0.99991943+0.01269363j, 0.99898695+0.01334339j, 1.0004262 +0.01652516j, ..., 8.50155565-4.1056289j , 8.52711202-4.10887446j, 8.55579045-4.08723171j]), 'F_Hz': array([1.0000000e-01, 1.3644214e-01, 1.8616456e-01, ..., 6.9980000e+03, 6.9990000e+03, 7.0000000e+03]), 'SNR': 1, 'order_initial': 10, 'delay_s': 0, 'F_nyquist_Hz': None, 'poles': (-100, -50), 'zeros': (-10, -50), 'mode': 'fit', 'delay_s_max': 0.01, 'h_infinity': 0.99, 'h_infinity_deweight': 0.1} TEE_LOGFILE None A [-100. -50.] B [-100. -50.] 4P 0.51 activating delay fitting 2A 2.11 Baseline fit delay: 8.832828631601953e-06 2A 2.11 Baseline fit residuals: 2.78e-03, at order 2 BASELINE: 2 ------------:investigations: 2I 2.14 max(z, p) ChiSq. order avg. res. med. res. max. res. ----------- ----------- ----------- ----------- 2 0.00277603 0.00359344 0.01656 (array([-115528.23909139, -427.4039947 ]), array([-91761.13100259, -5182.78698028]), 9.239894861827983) ([-18386.89031809731, -68.02345845366183], [-14604.23758276572, -824.8661669034184], 9.239894861827983) ZPK([ -18386.89031809731; -68.02345845366183; ],[ -14604.23758276572; -824.8661669034184; ], 9.239894861827983, "f") ([18386.89031809731, 68.02345845366183], [14604.23758276572, 824.8661669034184], 0.9593379907898115) ZPK([ 18386.89031809731; 68.02345845366183; ],[ 14604.23758276572; 824.8661669034184; ], 0.9593379907898115, "n") Captured stderr call 3W 0.50 Fitter_checkpoint improvement succeed, None 3W 1.28 Fitter_checkup improvement succeed 3W 2.10 Fitter_checkpoint improvement succeed, None
- test_simple1_callable()[source][github]¶
This is a pytest needing documentation
code
1@pytest.mark.skipif(module_import_skip, reason="cannot import IIRrational_test_data") 2def test_simple1_callable(): 3 data_name = "PUM_long" 4 data = testing_data_dev( 5 data_name, 6 instance_num=1, 7 set_num=1, 8 ) 9 out = v2.data2filter( 10 xfer=data.data, 11 F_Hz=data.F_Hz, 12 SNR=data.SNR, 13 order_initial=10, 14 delay_s=0, 15 F_nyquist_Hz=None, 16 poles=(-100, -50), 17 zeros=(-10, -50), 18 mode="fit", 19 delay_s_max=0.01, 20 h_infinity=lambda L: abs(1 / (1 + 1j * np.linspace(0, 100, L))), 21 # hints = [ 22 # testing.validate_plot_log(__file__, request), 23 # ], 24 ) 25 26 print(out.as_scipy_signal_ZPKsw()) 27 print(out.as_foton_ZPKsf()) 28 print(out.as_foton_str_ZPKsf()) 29 print(out.as_foton_ZPKsn()) 30 print(out.as_foton_str_ZPKsn()) 31 return
pytest information
This code is wrapped in a pytest function using conventions detailed in Pytest Conventions. The full name of this test, as known by the documentation, is:
wield.control.fitting.SISO.test.v2.test_h_infinity.test_simple1_callableThe full name is useful when building documentation, to link a reference to this page using
:func:`name`, or directly include it with an autofunction directive. The collapse nodes below show every instance of the test run. There may only be one, but if the test was run multiple times through pytest parametrizations, the list can be longer.test_simple1_callable
output
{'xfer': array([0.99991943+0.01269363j, 0.99898695+0.01334339j, 1.0004262 +0.01652516j, ..., 8.50155565-4.1056289j , 8.52711202-4.10887446j, 8.55579045-4.08723171j]), 'F_Hz': array([1.0000000e-01, 1.3644214e-01, 1.8616456e-01, ..., 6.9980000e+03, 6.9990000e+03, 7.0000000e+03]), 'SNR': 1, 'order_initial': 10, 'delay_s': 0, 'F_nyquist_Hz': None, 'poles': (-100, -50), 'zeros': (-10, -50), 'mode': 'fit', 'delay_s_max': 0.01, 'h_infinity': <function test_simple1_callable.<locals>.<lambda> at 0x7f3bef38a8e0>} TEE_LOGFILE None A [-100. -50.] B [-100. -50.] 4P 4.99 activating delay fitting 2A 6.99 Baseline fit delay: 1.0520210894496285e-05 2A 6.99 Baseline fit residuals: 2.35e-04, at order 2 BASELINE: 2 ------------:investigations: 2I 7.00 max(z, p) ChiSq. order avg. res. med. res. max. res. ----------- ----------- ----------- ----------- 2 0.000234943 0.000458709 0.00129045 (array([-5816.23117232, -469.39674113]), array([-4991.09457615+1424.93928758j, -4991.09457615-1424.93928758j]), 9.744008705460436) ([-925.6819412405002, -74.70681162175012], [(-794.357373233703+226.78613122456542j), (-794.357373233703-226.78613122456542j)], 9.744008705460436) ZPK([ -925.6819412405002; -74.70681162175012; ],[ -794.357373233703 + 226.78613122456542*i; -794.357373233703 - 226.78613122456542*i; ], 9.744008705460436, "f") ([925.6819412405002, 74.70681162175012], [(794.357373233703+226.78613122456542j), (794.357373233703-226.78613122456542j)], 0.9874110686735191) ZPK([ 925.6819412405002; 74.70681162175012; ],[ 794.357373233703 + 226.78613122456542*i; 794.357373233703 - 226.78613122456542*i; ], 0.9874110686735191, "n") Captured stderr call 3W 4.98 Fitter_checkpoint improvement succeed, None 3W 6.40 Fitter_checkup improvement succeed 3W 6.98 Fitter_checkpoint improvement succeed, None
- test_simple1_vec()[source][github]¶
This is a pytest needing documentation
code
1@pytest.mark.skipif(module_import_skip, reason="cannot import IIRrational_test_data") 2def test_simple1_vec(): 3 data_name = "PUM_long" 4 data = testing_data_dev( 5 data_name, 6 instance_num=1, 7 set_num=1, 8 ) 9 out = v2.data2filter( 10 xfer=data.data, 11 F_Hz=data.F_Hz, 12 SNR=data.SNR, 13 order_initial=10, 14 delay_s=0, 15 F_nyquist_Hz=None, 16 poles=(-100, -50), 17 zeros=(-10, -50), 18 mode="fit", 19 delay_s_max=0.01, 20 h_infinity=abs(1 / (1 + 1j * data.F_Hz / 1)), 21 # hints = [ 22 # testing.validate_plot_log(__file__, request), 23 # ], 24 ) 25 26 print(out.as_scipy_signal_ZPKsw()) 27 print(out.as_foton_ZPKsf()) 28 print(out.as_foton_str_ZPKsf()) 29 print(out.as_foton_ZPKsn()) 30 print(out.as_foton_str_ZPKsn()) 31 return
pytest information
This code is wrapped in a pytest function using conventions detailed in Pytest Conventions. The full name of this test, as known by the documentation, is:
wield.control.fitting.SISO.test.v2.test_h_infinity.test_simple1_vecThe full name is useful when building documentation, to link a reference to this page using
:func:`name`, or directly include it with an autofunction directive. The collapse nodes below show every instance of the test run. There may only be one, but if the test was run multiple times through pytest parametrizations, the list can be longer.test_simple1_vec
output
{'xfer': array([0.99991943+0.01269363j, 0.99898695+0.01334339j, 1.0004262 +0.01652516j, ..., 8.50155565-4.1056289j , 8.52711202-4.10887446j, 8.55579045-4.08723171j]), 'F_Hz': array([1.0000000e-01, 1.3644214e-01, 1.8616456e-01, ..., 6.9980000e+03, 6.9990000e+03, 7.0000000e+03]), 'SNR': 1, 'order_initial': 10, 'delay_s': 0, 'F_nyquist_Hz': None, 'poles': (-100, -50), 'zeros': (-10, -50), 'mode': 'fit', 'delay_s_max': 0.01, 'h_infinity': array([9.95037190e-01, 9.90819752e-01, 9.83109174e-01, ..., 1.42897969e-04, 1.42877552e-04, 1.42857141e-04])} TEE_LOGFILE None A [-100. -50.] B [-100. -50.] 4P 1.08 activating delay fitting 2A 2.84 Baseline fit delay: 1.0600061760590584e-05 2A 2.84 Baseline fit residuals: 2.48e-04, at order 2 BASELINE: 2 ------------:investigations: 2I 2.86 max(z, p) ChiSq. order avg. res. med. res. max. res. ----------- ----------- ----------- ----------- 2 0.000248181 0.000427187 0.00145852 (array([-506.73028842+125.46494474j, -506.73028842-125.46494474j]), array([-4342.55387043, -613.01664074]), 9.765687607841844) ([(-80.64863021648839+19.968366140459768j), (-80.64863021648839-19.968366140459768j)], [-691.1389141214835, -97.56462857067508], 9.765687607841844) ZPK([ -80.64863021648839 + 19.968366140459768*i; -80.64863021648839 - 19.968366140459768*i; ],[ -691.1389141214835; -97.56462857067508; ], 9.765687607841844, "f") ([(80.64863021648839+19.968366140459768j), (80.64863021648839-19.968366140459768j)], [691.1389141214835, 97.56462857067508], 0.9997214451072677) ZPK([ 80.64863021648839 + 19.968366140459768*i; 80.64863021648839 - 19.968366140459768*i; ],[ 691.1389141214835; 97.56462857067508; ], 0.9997214451072677, "n") Captured stderr call 3W 1.07 Fitter_checkpoint improvement succeed, None 3W 2.38 Fitter_checkup improvement succeed 3W 2.82 Fitter_checkpoint improvement succeed, None