Skip to content

Commit 29218b0

Browse files
authored
Align sine fit comparison fixture (#91)
1 parent 24ac9e4 commit 29218b0

7 files changed

Lines changed: 107 additions & 3 deletions

File tree

python/tests/compare/test_compare_sine_fit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33

44
def test_compare_sine_fit(project_root, comparison_output_root):
55

6-
run_comparison_suite(project_root, matlab_test_name="test_sinfit",
6+
run_comparison_suite(project_root, matlab_test_name="run_sinfit",
77
ref_folder="reference_output", out_folder=comparison_output_root, structure="nested")

python/tests/integration/test_sine_fit.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ def _process_fit_sine(raw_data, sub_folder, dataset_name, figures_folder, test_n
1616
2. Save variables
1717
3. Generate and save plot
1818
"""
19-
# 1. Sine Fitting - using new Pythonic names
20-
fit_result = fit_sine(raw_data)
19+
# MATLAB run_sinfit uses sinfit's default refinement budget.
20+
fit_result = fit_sine(raw_data, max_iterations=100, tolerance=1e-12)
2121
fitted_signal = fit_result['fitted_signal']
2222
frequency = fit_result['frequency']
2323
amplitude = fit_result['amplitude']
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
0.499989291646998
2+
0.966081121787399
3+
0.212355687584689
4+
0.211431979832668
5+
0.965727488204492
6+
0.501131247400625
7+
0.0335652975610015
8+
0.786723878323191
9+
0.789471544241642
10+
0.0346172178693968
11+
0.4977343798332
12+
0.966771973877158
13+
0.214184234100384
14+
0.209612624562827
15+
0.965021772412592
16+
0.503386141229948
17+
0.032879386268058
18+
0.7848923005368
19+
0.791287829489399
20+
0.0353278596224767
21+
0.495479515926729
22+
0.967452940741776
23+
0.216018833460312
24+
0.207799418953346
25+
0.964306208460774
26+
0.505640963275351
27+
0.0322033674370962
28+
0.78305468931649
29+
0.793097945860715
30+
0.0360483419845304
31+
0.49322474768039
32+
0.968124007959948
33+
0.2178594468119
34+
0.205992401403729
35+
0.963580811503029
36+
0.50789566578491
37+
0.0315372553846333
38+
0.781211083578625
39+
0.794901855021503
40+
0.0367786496974048
41+
0.49097012284497
42+
0.96878516132002
43+
0.219706035175205
44+
0.204191610182436
45+
0.962845596901587
46+
0.510150201009242
47+
0.0308810642173816
48+
0.779361522366509
49+
0.796699518769142
50+
0.0375187672948721
51+
0.488715689168207
52+
0.969436386820293
53+
0.221558559443758
54+
0.202397083426059
55+
0.962100580226595
56+
0.512404521202496
57+
0.0302348078319551
58+
0.777506044849578
59+
0.798490899033263
60+
0.0382686791029506
61+
0.4864614943938
62+
0.970077670669314
63+
0.223416980385373
64+
0.200608859138531
65+
0.961345777255785
66+
0.514658578623381
67+
0.0295984999145708
68+
0.775644690322558
69+
0.800275957876566
70+
0.039028369240241
71+
0.484207586260393
72+
0.970708999286174
73+
0.225281258642982
74+
0.19882697519031
75+
0.960581203974142
76+
0.516912325536167
77+
0.0289721539407619
78+
0.773777498204637
79+
0.80205465749564
80+
0.0397978216182616
81+
0.481954012500538
82+
0.971330359300792
83+
0.227151354735492
84+
0.197051469317581
85+
0.959806876573558
86+
0.519165714211703
87+
0.0283557831750849
88+
0.77190450803863
89+
0.803826960221733
90+
0.0405770199417889
91+
0.479700820839727
92+
0.971941737554197
93+
0.229027229058583
94+
0.195282379121455
95+
0.959022811452498
96+
0.521418696928424
97+
0.0277494006708507
98+
0.770025759490141
99+
0.805592828521568
100+
0.0413659477092029
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
0.499996540068455
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
0.299926758066308
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
0.489994764312203
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
-1.57081111964981

0 commit comments

Comments
 (0)