test_quad_plot_v2

wield.control.fitting.SISO.test.v2.test_quad_plot_v2

This is a pytest module needing documentation

pytest-html report

Functions

test_quad_M0_P2V_10Hz_S(request)

This is a pytest needing documentation

Details

test_quad_M0_P2V_10Hz_S(request)[source][github]

This is a pytest needing documentation

code
 1@pytest.mark.skipif(module_import_skip, reason="cannot import IIRrational_test_data")
 2def test_quad_M0_P2V_10Hz_S(request):
 3    data_name = "quad_M0_P2V_10Hz"
 4
 5    dataB = testing_data_dev(
 6        data_name,
 7        instance_num=1,
 8        set_num=2,
 9    )
10
11    out = v2.data2filter(
12        F_Hz=dataB.F_Hz,
13        data=dataB.data,
14        SNR=dataB.SNR,
15        F_nyquist_Hz=None,
16        # order_initial = 80,
17        total_degree_min=None,
18        delay_s=0,
19        mode="rational",
20        baseline_only=True,
21        # SNR_cuttoff = 50,
22        hints=[
23            testing.validate_plot_log(tjoin('error')),
24        ],
25    )
26
27    # out.fitter.matched_pairs_clear(Q_rank_cutoff = .4)
28    def plot():
29        return plots.plot_fit(
30            out.fitter,
31            plot_zp=True,
32            # plot_past_data = False,
33            plot_past_data=True,
34            xscale="log",
35        )
36
37    with testing.plot_on_assert(tjoin('quad_fit'), plot, plot_anyway=True):
38        pass
39        # assert(False)
40    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_quad_plot_v2.test_quad_M0_P2V_10Hz_S

The 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_quad_M0_P2V_10Hz_S
output
{'F_Hz': array([7.81372070e-03, 1.56274414e-02, 2.34411621e-02, ...,
       9.97812134e+00, 9.98593506e+00, 9.99374878e+00]), 'data': array([ 2.5527173e-04-5.4735614e-05j,  1.4490190e-04+9.5448333e-05j,
        1.6089463e-04+4.5499619e-05j, ..., -3.7766365e-06+1.7787797e-06j,
       -3.7128011e-06+2.1219641e-06j, -4.8085726e-06+2.3245782e-06j],
      dtype=complex64), 'SNR': array([0.0000000e+00, 4.8792982e-01, 5.2257023e+01, ..., 9.2707068e+02,
       5.4045636e+02, 6.6327863e+02], dtype=float32), 'F_nyquist_Hz': None, 'total_degree_min': None, 'delay_s': 0, 'mode': 'rational', 'baseline_only': True, 'hints': [{'fitter_update_validate': <function sign_validate_and_plot_hint.<locals>.sign_validate_plot at 0x7fb306a4ede0>, 'fitter_check_validate': <function sign_validate_and_plot_hint.<locals>.sign_validate_plot at 0x7fb306a4ede0>, 'rational_fitter_validate': <function rational_fitter_validate at 0x7fb307867380>, 'log_level_debug': 10, 'log_level': 10, 'log_level_warn': 10}]}
TEE_LOGFILE None
A []
B []
------------:SNR Fix Test:
9D   0.01    W:ratio 0.5 0.9995099080886224 0.597958966688072 0 620 20404.3359375
9D   0.01    W:ratio 0.5 0.9964463869011878 0.8315471252786804 0 310 2814.037353515625
9D   0.01    W:ratio 0.5 0.9890873206175042 0.9169700847762567 0 155 916.365234375
9D   0.01    W:ratio 0.5 0.9654810140836999 0.9532016057046675 0 77 289.6956481933594
9D   0.01    W:ratio 0.5 0.761153907689863 0.9767190936390553 38 77 41.86796569824219
9D   0.01    W:ratio 0.5 0.9146018229857736 0.9654356098019682 57 77 117.09851837158203
9D   0.01    W:ratio 0.5 0.9556602946382081 0.9568954896295647 67 77 225.531494140625
9D   0.01    W:ratio 0.5 0.9598963115021694 0.9555790163116282 67 72 249.35362243652344
9D   0.01    W:ratio 0.5 0.9585051074947301 0.9560459182178652 67 69 240.99351501464844
9D   0.01    W:ratio 0.5 0.9574543364136568 0.9563740251428865 67 68 235.0415802001953
------------:rational fitting:
4P   0.02    chebychev rational fit
RELDEG:  0 0 0
--------------:rational fitting:Rational Fit Order Scanning:
8D   0.34      Using last (direct)! 20
3P   0.41    Initial Order: (Z=20, P=20, Z-P=0)
6P   0.46    New representative, Res: 28015.51, from: 28015.51
3P   0.46    Fastdrop Order: (Z=20, P=20, Z-P=0)
4P   0.49    mag fitting and phase patching
5D   2.30    log residuals average 7262.013312564462
--------------:rational fitting:sample variance (from magnitude):
5D   2.37      variance 1.1127366896411943 225.16751933434935
3A   2.37      Weight Scaling determined:  202.35471826399052
3A   2.37      Weight Scaling Used  14.22514387498385
--------------:rational fitting:Phase patching:
6I   2.41      LOCATION  1.9417095947265626
6I   2.41      BW:  0.04688232421875005
8I   2.41      Isep 1.702820851320268
8I   2.41      Icmn -0.1138954776539986
6I   2.41      LOCATION  3.088373107910156
6I   2.41      BW:  0.05664947509765628
8I   2.41      Isep 0.9526219204275956
8I   2.41      Icmn 0.18707666198073072
6I   2.45      LOCATION  4.840599975585938
6I   2.45      BW:  0.003906860351562624
8I   2.45      Isep 0.6225579679838917
8I   2.45      Icmn 0.21019886637086038
8D   2.45      Skipping Pair
6I   2.46      LOCATION  4.840599975585938
6I   2.46      BW:  0.003906860351562624
8I   2.46      Isep 0.6226202212785763
8I   2.46      Icmn 0.21021817351638997
8D   2.46      Skipping Pair
6I   2.46      LOCATION  3.2817626953125005
6I   2.46      BW:  0.011720581054687651
8I   2.46      Isep 1.201416302618696
8I   2.46      Icmn 0.310634171524021
6I   2.46      LOCATION  4.836693115234375
6I   2.46      BW:  0.011720581054687429
8I   2.46      Isep 1.8578845208579549
8I   2.46      Icmn 0.026911116449132966
6I   2.65      LOCATION  3.2895764160156253
6I   2.65      BW:  0.003906860351562624
8I   2.65      Isep 0.13469578937024115
8I   2.65      Icmn -0.01561339142380827
8D   2.65      Skipping Pair
6P   4.98    New representative, Res: 18163.24, from: 18163.24
6P   5.02    New representative, Res: 18163.24, from: 18163.24
6P   6.37  New representative, Res: 18163.24, from: 18163.24
9D   8.36  Residuals N:18163.24, C:18163.24, C2:18163.24
10D   8.37  IMPROVED:  True residuals:  18163.24235947795 18163.24235947795
6P   8.40  New representative, Res: 18163.24, from: 18163.24
6P   8.42  New representative, Res: 18163.24, from: 18163.24
------------:Q-ranked order reduction:
9D   9.64    Residuals N:18163.24, C:18163.24, C2:18163.24
10D   9.64    IMPROVED:  True residuals:  18163.24235947795 18163.24235947795
6P   9.68    New representative, Res: 18163.24, from: 18163.24
6P   9.70    New representative, Res: 18163.24, from: 18163.24
4P   9.71    order reduced annealing
9D  11.98    Residuals N:18163.24, C:18163.24, C2:18163.24
10D  11.98    IMPROVED:  True residuals:  18163.24235947795 18163.24235947795
6P  12.02    New representative, Res: 18163.24, from: 18163.24
6P  12.04    New representative, Res: 18163.24, from: 18163.24
BASELINE:  28
------------:investigations:
2I  12.10    max(z, p)       ChiSq.
                   order    avg. res.    med. res.    max. res.
             -----------  -----------  -----------  -----------
                      28      18163.2      33597.6       282349
Captured stderr call
3W   0.00  38 SNR=0 element(s) dropped (of 1279)
3W   0.01    The number of effective data points N=(ΣW^2)^2/(ΣW^4)=9.47e-03*len(W)
             [where W=SNR] is below the configured 'SNR_regularize_scale'=10,
             given the maximum SNR=299488448.0. Now Finding an SNR ceiling that balances
             the ratio with max SNR.
3W   0.01    Using SNR<225.531494140625 ceiling.
3W   0.44    Fitter_checkpoint improvement succeed, None
5W   2.65    High Confidence that an unstable zero exists at 0.04697607924608089+1.9514717387337885i Hz
             Adding it to the filter. Prevent this with 'never_unstable_zeros'
5W   2.65    High Confidence that an unstable zero exists at 0.036928539974420256+3.0878696965449057i Hz
             Adding it to the filter. Prevent this with 'never_unstable_zeros'
3W   2.65    High Confidence that an unstable pole exists at 0.0026010081779649485+3.268601834819611i Hz!
             Adding it to the filter. Prevent this with 'never_unstable_poles'
5W   2.65    High Confidence that an unstable zero exists at 0.01724550177293621+4.832947656448516i Hz
             Adding it to the filter. Prevent this with 'never_unstable_zeros'
3W   8.40  Fitter_checkpoint improvement succeed, None
3W   9.68    Fitter_checkpoint improvement succeed, None
3W  12.02    Fitter_checkpoint improvement succeed, None