save conf

This commit is contained in:
2025-07-18 11:09:57 +02:00
parent aecc9fe30e
commit 7e894a0628
21 changed files with 756 additions and 218 deletions

View File

@@ -1,9 +1,9 @@
{
"Number_of_cycles": 50,
"Number_of_cycles": 200,
"Amplitude_mm": 1,
"Time_in_beam_s": 5,
"Time_out_of_beam_s": 10,
"Exposure_time": 0.0004,
"Exposure_time": 0.0002,
"Img_Processing": 1,
"pixel_size_mu": 0.275
}

View File

@@ -8,6 +8,7 @@ import sys
import scipy.ndimage as spnd
import threading as th
from scipy.optimize import curve_fit
from skimage.io import imshow
#error chatchign and hard code catch stuff
@@ -82,25 +83,31 @@ def gaussian_2d(coords, amplitude, x0, y0, sigma_x, sigma_y, offset):
return amplitude * np.exp(
-(((x - x0) ** 2) / (2 * sigma_x ** 2) + ((y - y0) ** 2) / (2 * sigma_y ** 2))
) + offset
def compute_gradient(img, pos, h=1e-2):
def compute_gradient(img, pos):
x, y = pos
x_int, y_int = int(x), int(y)
# Ensure position is within bounds
# Ensure within bounds
if x_int <= 0 or x_int >= img.shape[1] - 1 or y_int <= 0 or y_int >= img.shape[0] - 1:
return np.array([0.0, 0.0])
# Use central difference
dx = (img[y_int, x_int + 1] - img[y_int, x_int - 1]) / 2
dy = (img[y_int + 1, x_int] - img[y_int - 1, x_int]) / 2
# Cast to float to avoid overflow
img = img.astype(np.float32)
dx = (img[y_int, x_int + 1] - img[y_int, x_int - 1]) / 2.0
dy = (img[y_int + 1, x_int] - img[y_int - 1, x_int]) / 2.0
return np.array([dx, dy])
def gradient_ascent(img, start_pos, lr=0.8, max_iter=1000, tol=1e-4):
def gradient_ascent(img, start_pos, lr=0.8, max_iter=1000, tol=1e-30):
pos = np.array(start_pos, dtype=float)
path = [tuple(pos)]
for i in range(max_iter):
grad = compute_gradient(img, pos)
if np.linalg.norm(grad) < tol:
print(f"grad: {grad}")
print(f"itteration {i}")
break
pos += lr * grad
@@ -140,32 +147,47 @@ def band_pass_filter(img_float, low_radius, high_radius):
def __process_img(img , retimg=0):
img_np = np.array(img)
img = cv2.GaussianBlur(img,(5,5),0)
img = spnd.zoom(img, 4,order=3)
z = np.float32(img)
#z = band_pass_filter(z,4,25)
# z = band_pass_filter(z, 5, 15)
z = spnd.zoom(z, 4, order=3)
z = cv2.GaussianBlur(z,(11,11),4)
"""img = cv2.GaussianBlur(img,(9,9),7)
img = cv2.GaussianBlur(img, (9, 9), 3)
img = cv2.GaussianBlur(img, (11, 11), 9)
img = cv2.GaussianBlur(img, (13, 13), 11)
img = cv2.GaussianBlur(img, (15, 15), 13)
img = cv2.GaussianBlur(img, (17, 17), 13)"""
z = np.array(img)
#z = band_pass_filter(z,5,10)
# Create a test image (e.g., 2D Gaussian)
x = np.linspace(0, z.shape[0], z.shape[0])
y = np.linspace(0, z.shape[1], z.shape[1])
x, y = np.meshgrid(x, y)
# z = gaussian_2d((x, y), 10, 25, 25, 5, 5, 1) + np.random.normal(0, 0.2, x.shape)
# Flatten and fit
x_gues, y_gues = image_center_of_mass(img, plot=False, verbose=False)
"""
initial_guess = (180, x_gues, y_gues, 10, 10, 1)
popt, _ = curve_fit(gaussian_2d, (x.ravel(), y.ravel()), z.ravel(), p0=initial_guess)
x_gues, y_gues = image_center_of_mass(z, plot=False, verbose=False)
max_a = np.max(z)-2
initial_guess = (max_a, x_gues, y_gues, 10, 10, 0)
popt, _ = curve_fit(gaussian_2d, (x.ravel(), y.ravel()), z.ravel(), p0=initial_guess,maxfev=10000)
x = popt[1]
y = popt[2]"""
result , path = gradient_ascent(img, (x_gues, y_gues))
y = popt[2]
#result , path = gradient_ascent(img, (x_gues, y_gues))
#x,y = result
#y,x = np.unravel_index(np.argmax(z), z.shape)
#ret1, th1 = cv2.threshold(img, 196, 255, cv2.THRESH_BINARY)
#x, y = image_center_of_mass(img, plot=False, verbose=False)
if retimg:
return x,y,img
return x,y,z
return x, y
def aquire_avg(camera_a, nr=10):
@@ -514,7 +536,7 @@ camera_seting.set_ev_time(init_exposure_time())
print(camera_seting.get_exposure_time())"""
image_test()

View File

@@ -139,3 +139,5 @@ def get_latest_measurement_dir(static_dir_yes_no = 0):
return result
# Match measurement folders like 20250715_170343_repeatibility_0
return result

View File

@@ -0,0 +1 @@
{"Number_of_cycles": 100, "Amplitude_mm": 1, "Time_in_beam_s": 5, "Time_out_of_beam_s": 10, "Exposure_time": 0.0001, "Img_Processing": 1, "pixel_size_mu": 0.275}

View File

@@ -0,0 +1,100 @@
1 0.000000 0.000000 104.769 159.519 1752824628.446
2 0.000000 0.000000 104.349 159.287 1752824628.603
3 0.000000 0.000000 104.182 159.279 1752824628.762
4 0.000000 0.000000 104.258 159.149 1752824628.919
5 0.000000 0.000000 104.253 159.435 1752824629.076
6 0.000000 0.000000 104.321 159.388 1752824629.233
7 0.000000 0.000000 104.391 159.097 1752824629.390
8 0.000000 0.000000 104.376 158.801 1752824629.549
9 0.000000 0.000000 104.346 159.579 1752824629.706
10 0.000000 0.000000 104.976 158.954 1752824629.863
11 0.000000 0.000000 104.429 158.805 1752824630.019
12 0.000000 0.000000 104.218 159.710 1752824630.177
13 0.000000 0.000000 104.189 159.483 1752824630.333
14 0.000000 0.000000 104.735 159.191 1752824630.490
15 0.000000 0.000000 104.503 159.466 1752824630.646
16 0.000000 0.000000 104.176 158.902 1752824630.804
17 0.000000 0.000000 104.605 159.290 1752824630.961
18 0.000000 0.000000 104.176 159.267 1752824631.119
19 0.000000 0.000000 104.366 158.949 1752824631.277
20 0.000000 0.000000 104.090 159.747 1752824631.433
21 0.000000 0.000000 104.162 159.060 1752824631.589
22 0.000000 0.000000 103.780 159.018 1752824631.745
23 0.000000 0.000000 104.481 159.075 1752824631.902
24 0.000000 0.000000 104.431 159.092 1752824632.059
25 0.000000 0.000000 103.811 159.008 1752824632.216
26 0.000000 0.000000 104.089 158.896 1752824632.374
27 0.000000 0.000000 104.125 158.853 1752824632.531
28 0.000000 0.000000 104.150 158.974 1752824632.691
29 0.000000 0.000000 104.924 158.782 1752824632.848
30 0.000000 0.000000 104.540 159.128 1752824633.006
31 0.000000 0.000000 104.052 159.457 1752824633.162
32 0.000000 0.000000 104.535 159.108 1752824633.319
33 0.000000 0.000000 103.897 159.273 1752824633.476
34 0.000000 0.000000 104.010 159.321 1752824633.632
35 0.000000 0.000000 104.141 158.891 1752824633.791
36 0.000000 0.000000 104.355 159.292 1752824633.947
37 0.000000 0.000000 104.241 159.192 1752824634.104
38 0.000000 0.000000 104.260 159.431 1752824634.261
39 0.000000 0.000000 104.518 158.934 1752824634.419
40 0.000000 0.000000 104.264 158.927 1752824634.577
41 0.000000 0.000000 103.995 159.201 1752824634.733
42 0.000000 0.000000 104.261 159.469 1752824634.891
43 0.000000 0.000000 104.490 159.324 1752824635.049
44 0.000000 0.000000 104.093 159.413 1752824635.205
45 0.000000 0.000000 104.095 159.423 1752824635.363
46 0.000000 0.000000 104.313 159.192 1752824635.520
47 0.000000 0.000000 104.214 159.490 1752824635.676
48 0.000000 0.000000 104.367 159.114 1752824635.832
49 0.000000 0.000000 104.069 158.867 1752824635.989
50 0.000000 0.000000 104.317 158.953 1752824636.146
51 0.000000 0.000000 104.302 159.495 1752824636.303
52 0.000000 0.000000 104.732 158.794 1752824636.460
53 0.000000 0.000000 104.562 159.610 1752824636.617
54 0.000000 0.000000 104.755 159.546 1752824636.774
55 0.000000 0.000000 104.108 159.238 1752824636.931
56 0.000000 0.000000 104.386 159.073 1752824637.088
57 0.000000 0.000000 103.906 159.609 1752824637.244
58 0.000000 0.000000 103.925 159.337 1752824637.402
59 0.000000 0.000000 104.385 159.107 1752824637.559
60 0.000000 0.000000 104.012 159.240 1752824637.715
61 0.000000 0.000000 104.243 159.074 1752824637.873
62 0.000000 0.000000 104.189 158.926 1752824638.030
63 0.000000 0.000000 104.236 159.038 1752824638.187
64 0.000000 0.000000 104.373 158.937 1752824638.344
65 0.000000 0.000000 104.676 158.988 1752824638.501
66 0.000000 0.000000 104.345 159.051 1752824638.657
67 0.000000 0.000000 104.544 159.221 1752824638.816
68 0.000000 0.000000 104.402 158.803 1752824638.975
69 0.000000 0.000000 103.873 159.294 1752824639.134
70 0.000000 0.000000 104.007 159.244 1752824639.290
71 0.000000 0.000000 103.968 159.345 1752824639.448
72 0.000000 0.000000 103.762 158.647 1752824639.605
73 0.000000 0.000000 104.674 159.477 1752824639.762
74 0.000000 0.000000 104.607 159.510 1752824639.920
75 0.000000 0.000000 104.208 159.232 1752824640.076
76 0.000000 0.000000 104.130 159.466 1752824640.234
77 0.000000 0.000000 104.261 158.926 1752824640.391
78 0.000000 0.000000 104.287 158.885 1752824640.548
79 0.000000 0.000000 104.220 159.239 1752824640.705
80 0.000000 0.000000 104.126 159.146 1752824640.861
81 0.000000 0.000000 104.736 159.085 1752824641.018
82 0.000000 0.000000 104.216 159.120 1752824641.175
83 0.000000 0.000000 104.244 159.091 1752824641.332
84 0.000000 0.000000 104.578 159.126 1752824641.490
85 0.000000 0.000000 104.021 159.134 1752824641.648
86 0.000000 0.000000 104.075 158.915 1752824641.806
87 0.000000 0.000000 104.270 158.761 1752824641.963
88 0.000000 0.000000 104.454 159.597 1752824642.121
89 0.000000 0.000000 103.858 159.420 1752824642.278
90 0.000000 0.000000 104.781 158.519 1752824642.435
91 0.000000 0.000000 104.744 158.902 1752824642.592
92 0.000000 0.000000 104.117 159.173 1752824642.749
93 0.000000 0.000000 104.446 158.971 1752824642.905
94 0.000000 0.000000 104.129 159.363 1752824643.063
95 0.000000 0.000000 104.578 159.386 1752824643.221
96 0.000000 0.000000 104.243 158.880 1752824643.378
97 0.000000 0.000000 104.103 159.616 1752824643.536
98 0.000000 0.000000 104.329 159.434 1752824643.695
99 0.000000 0.000000 104.409 159.318 1752824643.852
100 0.000000 0.000000 104.433 159.307 1752824644.010

View File

@@ -0,0 +1 @@
{"Number_of_cycles": 100, "Amplitude_mm": 1, "Time_in_beam_s": 5, "Time_out_of_beam_s": 10, "Exposure_time": 0.0002, "Img_Processing": 1, "pixel_size_mu": 0.275}

View File

@@ -0,0 +1,100 @@
1 0.000000 0.000000 104.434 159.799 1752826016.308
2 0.000000 0.000000 104.783 159.960 1752826016.465
3 0.000000 0.000000 103.708 160.088 1752826016.628
4 0.000000 0.000000 105.135 159.682 1752826016.789
5 0.000000 0.000000 104.735 159.817 1752826016.945
6 0.000000 0.000000 104.056 160.069 1752826017.101
7 0.000000 0.000000 104.051 159.788 1752826017.263
8 0.000000 0.000000 103.788 160.021 1752826017.419
9 0.000000 0.000000 104.877 159.713 1752826017.576
10 0.000000 0.000000 103.898 159.878 1752826017.732
11 0.000000 0.000000 104.682 159.816 1752826017.888
12 0.000000 0.000000 103.609 159.977 1752826018.046
13 0.000000 0.000000 104.436 159.908 1752826018.203
14 0.000000 0.000000 103.758 160.311 1752826018.360
15 0.000000 0.000000 104.934 159.780 1752826018.517
16 0.000000 0.000000 104.270 159.930 1752826018.674
17 0.000000 0.000000 104.463 160.098 1752826018.830
18 0.000000 0.000000 103.656 160.279 1752826018.987
19 0.000000 0.000000 105.072 160.027 1752826019.143
20 0.000000 0.000000 104.005 160.050 1752826019.299
21 0.000000 0.000000 105.166 159.701 1752826019.456
22 0.000000 0.000000 104.574 159.820 1752826019.613
23 0.000000 0.000000 104.622 159.902 1752826019.770
24 0.000000 0.000000 105.009 159.750 1752826019.928
25 0.000000 0.000000 104.811 159.915 1752826020.085
26 0.000000 0.000000 104.558 159.880 1752826020.243
27 0.000000 0.000000 104.957 160.107 1752826020.400
28 0.000000 0.000000 104.578 159.876 1752826020.557
29 0.000000 0.000000 104.166 160.387 1752826020.714
30 0.000000 0.000000 104.406 160.189 1752826020.873
31 0.000000 0.000000 103.836 160.300 1752826021.032
32 0.000000 0.000000 104.239 159.998 1752826021.188
33 0.000000 0.000000 105.007 159.889 1752826021.348
34 0.000000 0.000000 104.588 159.841 1752826021.508
35 0.000000 0.000000 104.519 159.741 1752826021.665
36 0.000000 0.000000 104.630 159.920 1752826021.822
37 0.000000 0.000000 104.544 159.583 1752826021.979
38 0.000000 0.000000 103.728 159.880 1752826022.136
39 0.000000 0.000000 104.543 159.808 1752826022.293
40 0.000000 0.000000 104.123 160.043 1752826022.450
41 0.000000 0.000000 103.971 159.879 1752826022.606
42 0.000000 0.000000 104.226 160.032 1752826022.763
43 0.000000 0.000000 104.550 159.965 1752826022.920
44 0.000000 0.000000 104.446 160.045 1752826023.080
45 0.000000 0.000000 104.474 159.904 1752826023.237
46 0.000000 0.000000 104.540 160.040 1752826023.393
47 0.000000 0.000000 104.341 160.053 1752826023.549
48 0.000000 0.000000 104.647 159.983 1752826023.706
49 0.000000 0.000000 104.199 160.091 1752826023.863
50 0.000000 0.000000 104.223 160.157 1752826024.020
51 0.000000 0.000000 104.167 159.941 1752826024.178
52 0.000000 0.000000 103.940 159.877 1752826024.334
53 0.000000 0.000000 104.320 160.189 1752826024.490
54 0.000000 0.000000 104.501 159.888 1752826024.646
55 0.000000 0.000000 104.071 160.131 1752826024.808
56 0.000000 0.000000 104.202 159.809 1752826024.965
57 0.000000 0.000000 104.546 159.790 1752826025.123
58 0.000000 0.000000 104.406 159.803 1752826025.281
59 0.000000 0.000000 104.548 160.091 1752826025.437
60 0.000000 0.000000 104.425 159.864 1752826025.595
61 0.000000 0.000000 104.326 159.982 1752826025.753
62 0.000000 0.000000 104.336 159.716 1752826025.909
63 0.000000 0.000000 104.054 160.038 1752826026.066
64 0.000000 0.000000 104.211 159.959 1752826026.224
65 0.000000 0.000000 104.386 159.966 1752826026.380
66 0.000000 0.000000 104.279 159.940 1752826026.537
67 0.000000 0.000000 104.272 159.944 1752826026.694
68 0.000000 0.000000 104.299 159.763 1752826026.852
69 0.000000 0.000000 104.058 160.201 1752826027.008
70 0.000000 0.000000 104.793 159.566 1752826027.165
71 0.000000 0.000000 104.033 160.074 1752826027.322
72 0.000000 0.000000 104.366 160.082 1752826027.479
73 0.000000 0.000000 104.379 159.796 1752826027.636
74 0.000000 0.000000 104.370 159.942 1752826027.795
75 0.000000 0.000000 104.214 159.919 1752826027.953
76 0.000000 0.000000 104.518 160.182 1752826028.111
77 0.000000 0.000000 104.551 160.119 1752826028.268
78 0.000000 0.000000 104.089 160.082 1752826028.427
79 0.000000 0.000000 104.292 160.140 1752826028.584
80 0.000000 0.000000 104.379 159.961 1752826028.742
81 0.000000 0.000000 104.108 160.201 1752826028.898
82 0.000000 0.000000 104.380 160.335 1752826029.057
83 0.000000 0.000000 104.441 159.949 1752826029.215
84 0.000000 0.000000 104.322 160.232 1752826029.373
85 0.000000 0.000000 104.085 160.115 1752826029.532
86 0.000000 0.000000 104.680 160.085 1752826029.689
87 0.000000 0.000000 104.456 159.973 1752826029.846
88 0.000000 0.000000 104.540 160.013 1752826030.004
89 0.000000 0.000000 104.231 160.024 1752826030.163
90 0.000000 0.000000 104.432 159.665 1752826030.320
91 0.000000 0.000000 104.407 160.037 1752826030.478
92 0.000000 0.000000 104.290 160.106 1752826030.635
93 0.000000 0.000000 104.081 159.870 1752826030.791
94 0.000000 0.000000 104.218 160.173 1752826030.949
95 0.000000 0.000000 104.393 160.102 1752826031.106
96 0.000000 0.000000 104.000 160.035 1752826031.264
97 0.000000 0.000000 104.352 160.162 1752826031.421
98 0.000000 0.000000 104.394 160.085 1752826031.579
99 0.000000 0.000000 104.425 159.963 1752826031.736
100 0.000000 0.000000 104.258 160.123 1752826031.892

View File

@@ -0,0 +1 @@
{"Number_of_cycles": 20, "Amplitude_mm": 1, "Time_in_beam_s": 5, "Time_out_of_beam_s": 10, "Exposure_time": 0.0002, "Img_Processing": 1, "pixel_size_mu": 0.275}

View File

@@ -0,0 +1,20 @@
1 0.000000 0.000000 108.788 159.000 1752827812.406
2 0.000000 0.000000 108.543 159.227 1752827812.562
3 0.000000 0.000000 107.872 159.227 1752827812.718
4 0.000000 0.000000 108.756 159.700 1752827812.877
5 0.000000 0.000000 108.825 159.487 1752827813.034
6 0.000000 0.000000 109.301 159.241 1752827813.191
7 0.000000 0.000000 109.485 159.558 1752827813.347
8 0.000000 0.000000 108.817 159.807 1752827813.504
9 0.000000 0.000000 108.209 159.338 1752827813.661
10 0.000000 0.000000 108.370 159.060 1752827813.819
11 0.000000 0.000000 109.038 160.750 1752827813.975
12 0.000000 0.000000 108.359 159.043 1752827814.132
13 0.000000 0.000000 108.697 159.785 1752827814.288
14 0.000000 0.000000 109.430 158.874 1752827814.445
15 0.000000 0.000000 109.521 159.217 1752827814.601
16 0.000000 0.000000 108.586 159.121 1752827814.758
17 0.000000 0.000000 109.044 160.025 1752827814.915
18 0.000000 0.000000 108.210 160.183 1752827815.071
19 0.000000 0.000000 108.148 158.987 1752827815.228
20 0.000000 0.000000 108.505 158.723 1752827815.385

View File

@@ -0,0 +1 @@
{"Number_of_cycles": 20, "Amplitude_mm": 1, "Time_in_beam_s": 5, "Time_out_of_beam_s": 10, "Exposure_time": 0.0002, "Img_Processing": 1, "pixel_size_mu": 0.275}

View File

@@ -0,0 +1,20 @@
1 0.000000 0.000000 109.441 160.689 1752828644.280
2 0.000000 0.000000 109.347 160.656 1752828644.438
3 0.000000 0.000000 109.905 160.547 1752828644.595
4 0.000000 0.000000 109.760 160.536 1752828644.753
5 0.000000 0.000000 109.455 160.605 1752828644.909
6 0.000000 0.000000 109.517 160.620 1752828645.065
7 0.000000 0.000000 109.298 160.467 1752828645.223
8 0.000000 0.000000 109.601 160.476 1752828645.380
9 0.000000 0.000000 109.388 160.702 1752828645.536
10 0.000000 0.000000 109.663 160.550 1752828645.692
11 0.000000 0.000000 109.761 160.647 1752828645.849
12 0.000000 0.000000 109.548 160.699 1752828646.016
13 0.000000 0.000000 109.682 160.445 1752828646.173
14 0.000000 0.000000 109.552 160.304 1752828646.329
15 0.000000 0.000000 109.234 160.888 1752828646.489
16 0.000000 0.000000 109.545 160.496 1752828646.646
17 0.000000 0.000000 109.408 160.563 1752828646.807
18 0.000000 0.000000 109.590 160.286 1752828646.964
19 0.000000 0.000000 109.482 160.643 1752828647.121
20 0.000000 0.000000 109.215 160.607 1752828647.278

View File

@@ -0,0 +1 @@
{"Number_of_cycles": 200, "Amplitude_mm": 1, "Time_in_beam_s": 5, "Time_out_of_beam_s": 10, "Exposure_time": 0.0002, "Img_Processing": 1, "pixel_size_mu": 0.275}

View File

@@ -0,0 +1,200 @@
1 0.000000 0.000000 110.043 160.307 1752828813.153
2 0.000000 0.000000 109.864 160.079 1752828813.309
3 0.000000 0.000000 109.830 160.236 1752828813.466
4 0.000000 0.000000 109.891 160.201 1752828813.622
5 0.000000 0.000000 109.727 160.166 1752828813.779
6 0.000000 0.000000 110.020 159.924 1752828813.937
7 0.000000 0.000000 109.607 160.289 1752828814.094
8 0.000000 0.000000 109.511 160.389 1752828814.253
9 0.000000 0.000000 110.173 160.353 1752828814.409
10 0.000000 0.000000 109.809 160.197 1752828814.567
11 0.000000 0.000000 109.906 160.870 1752828814.724
12 0.000000 0.000000 110.014 160.360 1752828814.880
13 0.000000 0.000000 109.758 160.133 1752828815.037
14 0.000000 0.000000 110.307 160.244 1752828815.194
15 0.000000 0.000000 110.021 160.355 1752828815.350
16 0.000000 0.000000 109.783 160.346 1752828815.508
17 0.000000 0.000000 109.592 160.588 1752828815.665
18 0.000000 0.000000 109.678 160.260 1752828815.822
19 0.000000 0.000000 109.698 160.425 1752828815.979
20 0.000000 0.000000 109.610 160.125 1752828816.136
21 0.000000 0.000000 109.897 160.338 1752828816.294
22 0.000000 0.000000 110.042 160.436 1752828816.450
23 0.000000 0.000000 109.671 160.336 1752828816.608
24 0.000000 0.000000 109.679 160.477 1752828816.764
25 0.000000 0.000000 109.428 160.435 1752828816.921
26 0.000000 0.000000 109.624 160.430 1752828817.078
27 0.000000 0.000000 110.007 160.582 1752828817.234
28 0.000000 0.000000 109.773 160.688 1752828817.392
29 0.000000 0.000000 110.167 160.555 1752828817.550
30 0.000000 0.000000 110.383 160.269 1752828817.706
31 0.000000 0.000000 109.799 160.150 1752828817.863
32 0.000000 0.000000 110.000 160.184 1752828818.020
33 0.000000 0.000000 109.929 160.502 1752828818.177
34 0.000000 0.000000 109.935 160.253 1752828818.334
35 0.000000 0.000000 110.220 160.222 1752828818.492
36 0.000000 0.000000 110.014 160.421 1752828818.649
37 0.000000 0.000000 109.885 160.652 1752828818.805
38 0.000000 0.000000 110.100 160.547 1752828818.963
39 0.000000 0.000000 110.065 160.402 1752828819.120
40 0.000000 0.000000 110.165 160.404 1752828819.276
41 0.000000 0.000000 110.130 160.248 1752828819.433
42 0.000000 0.000000 110.278 160.606 1752828819.589
43 0.000000 0.000000 109.898 160.459 1752828819.746
44 0.000000 0.000000 109.849 160.435 1752828819.902
45 0.000000 0.000000 110.126 160.114 1752828820.059
46 0.000000 0.000000 109.889 160.529 1752828820.216
47 0.000000 0.000000 109.761 160.469 1752828820.372
48 0.000000 0.000000 109.976 160.386 1752828820.528
49 0.000000 0.000000 109.901 160.215 1752828820.685
50 0.000000 0.000000 109.870 160.199 1752828820.842
51 0.000000 0.000000 110.132 160.224 1752828820.999
52 0.000000 0.000000 109.911 160.093 1752828821.155
53 0.000000 0.000000 110.126 160.276 1752828821.312
54 0.000000 0.000000 109.991 160.449 1752828821.469
55 0.000000 0.000000 110.087 160.069 1752828821.626
56 0.000000 0.000000 109.993 160.601 1752828821.783
57 0.000000 0.000000 109.831 160.100 1752828821.939
58 0.000000 0.000000 109.985 160.174 1752828822.095
59 0.000000 0.000000 109.785 160.168 1752828822.252
60 0.000000 0.000000 109.743 160.560 1752828822.409
61 0.000000 0.000000 109.599 160.111 1752828822.569
62 0.000000 0.000000 109.699 160.275 1752828822.725
63 0.000000 0.000000 109.913 159.939 1752828822.882
64 0.000000 0.000000 109.835 160.186 1752828823.039
65 0.000000 0.000000 110.182 160.097 1752828823.196
66 0.000000 0.000000 109.646 160.288 1752828823.352
67 0.000000 0.000000 109.933 159.933 1752828823.509
68 0.000000 0.000000 109.937 160.129 1752828823.665
69 0.000000 0.000000 109.833 160.250 1752828823.822
70 0.000000 0.000000 109.465 160.122 1752828823.979
71 0.000000 0.000000 109.661 160.227 1752828824.134
72 0.000000 0.000000 109.829 159.897 1752828824.291
73 0.000000 0.000000 109.458 160.040 1752828824.448
74 0.000000 0.000000 109.633 160.116 1752828824.604
75 0.000000 0.000000 109.863 160.240 1752828824.760
76 0.000000 0.000000 109.790 160.192 1752828824.917
77 0.000000 0.000000 109.500 160.294 1752828825.074
78 0.000000 0.000000 109.804 160.269 1752828825.230
79 0.000000 0.000000 109.438 160.295 1752828825.389
80 0.000000 0.000000 109.769 160.303 1752828825.546
81 0.000000 0.000000 109.887 159.936 1752828825.703
82 0.000000 0.000000 109.735 160.050 1752828825.860
83 0.000000 0.000000 109.885 160.277 1752828826.016
84 0.000000 0.000000 109.770 160.093 1752828826.173
85 0.000000 0.000000 109.824 159.924 1752828826.329
86 0.000000 0.000000 109.695 160.178 1752828826.486
87 0.000000 0.000000 109.875 160.109 1752828826.643
88 0.000000 0.000000 109.645 160.206 1752828826.800
89 0.000000 0.000000 109.584 159.935 1752828826.956
90 0.000000 0.000000 109.831 160.009 1752828827.112
91 0.000000 0.000000 109.399 160.483 1752828827.272
92 0.000000 0.000000 109.722 160.398 1752828827.430
93 0.000000 0.000000 109.682 159.952 1752828827.592
94 0.000000 0.000000 109.963 159.850 1752828827.748
95 0.000000 0.000000 109.821 160.135 1752828827.905
96 0.000000 0.000000 110.089 159.873 1752828828.061
97 0.000000 0.000000 109.754 160.007 1752828828.219
98 0.000000 0.000000 109.916 160.153 1752828828.376
99 0.000000 0.000000 109.729 159.858 1752828828.532
100 0.000000 0.000000 109.748 160.290 1752828828.689
101 0.000000 0.000000 109.902 160.467 1752828828.848
102 0.000000 0.000000 109.671 160.115 1752828829.004
103 0.000000 0.000000 109.449 160.269 1752828829.160
104 0.000000 0.000000 109.268 160.255 1752828829.318
105 0.000000 0.000000 109.525 160.346 1752828829.485
106 0.000000 0.000000 109.914 160.008 1752828829.649
107 0.000000 0.000000 109.707 160.066 1752828829.805
108 0.000000 0.000000 110.258 159.964 1752828829.962
109 0.000000 0.000000 109.604 160.126 1752828830.118
110 0.000000 0.000000 109.461 160.343 1752828830.274
111 0.000000 0.000000 109.760 160.127 1752828830.431
112 0.000000 0.000000 109.181 160.147 1752828830.589
113 0.000000 0.000000 109.857 159.911 1752828830.745
114 0.000000 0.000000 109.635 160.013 1752828830.901
115 0.000000 0.000000 109.551 159.977 1752828831.057
116 0.000000 0.000000 109.833 160.041 1752828831.218
117 0.000000 0.000000 109.677 160.235 1752828831.375
118 0.000000 0.000000 109.283 159.934 1752828831.532
119 0.000000 0.000000 109.568 159.829 1752828831.689
120 0.000000 0.000000 109.583 160.319 1752828831.846
121 0.000000 0.000000 109.840 160.121 1752828832.003
122 0.000000 0.000000 109.896 160.045 1752828832.160
123 0.000000 0.000000 109.827 160.170 1752828832.318
124 0.000000 0.000000 109.900 160.124 1752828832.475
125 0.000000 0.000000 109.848 160.311 1752828832.632
126 0.000000 0.000000 109.705 159.770 1752828832.789
127 0.000000 0.000000 109.505 160.075 1752828832.945
128 0.000000 0.000000 109.610 159.899 1752828833.102
129 0.000000 0.000000 109.610 160.196 1752828833.259
130 0.000000 0.000000 109.552 160.175 1752828833.416
131 0.000000 0.000000 109.809 160.508 1752828833.572
132 0.000000 0.000000 109.476 160.020 1752828833.730
133 0.000000 0.000000 109.356 160.150 1752828833.886
134 0.000000 0.000000 109.364 159.872 1752828834.042
135 0.000000 0.000000 109.640 160.124 1752828834.199
136 0.000000 0.000000 109.830 160.274 1752828834.357
137 0.000000 0.000000 109.569 160.203 1752828834.514
138 0.000000 0.000000 109.794 160.109 1752828834.671
139 0.000000 0.000000 109.520 160.081 1752828834.828
140 0.000000 0.000000 109.558 160.157 1752828834.985
141 0.000000 0.000000 109.935 160.361 1752828835.142
142 0.000000 0.000000 109.770 160.376 1752828835.299
143 0.000000 0.000000 109.779 160.359 1752828835.457
144 0.000000 0.000000 109.670 160.099 1752828835.616
145 0.000000 0.000000 109.716 160.046 1752828835.849
146 0.000000 0.000000 109.718 160.239 1752828836.006
147 0.000000 0.000000 109.470 160.075 1752828836.162
148 0.000000 0.000000 109.947 160.047 1752828836.319
149 0.000000 0.000000 109.571 160.026 1752828836.476
150 0.000000 0.000000 109.313 160.014 1752828836.632
151 0.000000 0.000000 109.163 160.091 1752828836.789
152 0.000000 0.000000 109.691 160.231 1752828836.946
153 0.000000 0.000000 109.338 160.120 1752828837.103
154 0.000000 0.000000 109.306 159.906 1752828837.260
155 0.000000 0.000000 109.902 160.231 1752828837.417
156 0.000000 0.000000 109.454 160.129 1752828837.575
157 0.000000 0.000000 109.467 160.141 1752828837.731
158 0.000000 0.000000 109.593 160.027 1752828837.889
159 0.000000 0.000000 109.519 160.065 1752828838.045
160 0.000000 0.000000 109.600 159.952 1752828838.202
161 0.000000 0.000000 109.566 160.312 1752828838.359
162 0.000000 0.000000 109.443 159.942 1752828838.516
163 0.000000 0.000000 109.367 160.054 1752828838.673
164 0.000000 0.000000 109.699 160.007 1752828838.829
165 0.000000 0.000000 109.757 160.081 1752828838.986
166 0.000000 0.000000 109.874 159.991 1752828839.143
167 0.000000 0.000000 109.640 160.338 1752828839.301
168 0.000000 0.000000 109.638 160.061 1752828839.457
169 0.000000 0.000000 109.851 160.180 1752828839.614
170 0.000000 0.000000 109.492 160.132 1752828839.771
171 0.000000 0.000000 109.951 159.793 1752828839.930
172 0.000000 0.000000 109.941 159.889 1752828840.086
173 0.000000 0.000000 109.793 159.895 1752828840.244
174 0.000000 0.000000 109.615 160.227 1752828840.401
175 0.000000 0.000000 109.789 159.907 1752828840.557
176 0.000000 0.000000 109.602 159.876 1752828840.722
177 0.000000 0.000000 109.879 160.242 1752828840.880
178 0.000000 0.000000 109.914 160.074 1752828841.045
179 0.000000 0.000000 110.088 159.938 1752828841.207
180 0.000000 0.000000 110.003 160.221 1752828841.373
181 0.000000 0.000000 109.650 160.094 1752828841.529
182 0.000000 0.000000 109.566 160.363 1752828841.696
183 0.000000 0.000000 109.766 160.112 1752828841.852
184 0.000000 0.000000 109.532 160.140 1752828842.009
185 0.000000 0.000000 109.573 160.296 1752828842.166
186 0.000000 0.000000 109.767 160.217 1752828842.322
187 0.000000 0.000000 109.801 160.265 1752828842.479
188 0.000000 0.000000 109.569 159.974 1752828842.636
189 0.000000 0.000000 109.568 160.359 1752828842.792
190 0.000000 0.000000 109.709 160.032 1752828842.949
191 0.000000 0.000000 109.474 160.140 1752828843.110
192 0.000000 0.000000 109.594 160.219 1752828843.266
193 0.000000 0.000000 109.976 160.288 1752828843.423
194 0.000000 0.000000 109.514 160.029 1752828843.579
195 0.000000 0.000000 109.704 160.338 1752828843.736
196 0.000000 0.000000 109.899 160.217 1752828843.892
197 0.000000 0.000000 109.496 160.186 1752828844.049
198 0.000000 0.000000 109.908 160.089 1752828844.206
199 0.000000 0.000000 109.788 160.106 1752828844.363
200 0.000000 0.000000 109.651 159.972 1752828844.520

View File

@@ -0,0 +1 @@
{"Number_of_cycles": 200, "Amplitude_mm": 1, "Time_in_beam_s": 5, "Time_out_of_beam_s": 10, "Exposure_time": 0.0002, "Img_Processing": 0, "pixel_size_mu": 1.1}

View File

@@ -0,0 +1,200 @@
1 0.000000 0.000000 24.825 40.119 1752829182.258
2 0.000000 0.000000 24.766 40.329 1752829182.415
3 0.000000 0.000000 24.881 40.206 1752829182.572
4 0.000000 0.000000 24.840 40.202 1752829182.728
5 0.000000 0.000000 24.730 40.200 1752829182.885
6 0.000000 0.000000 24.842 40.211 1752829183.041
7 0.000000 0.000000 24.795 40.152 1752829183.199
8 0.000000 0.000000 24.822 40.139 1752829183.355
9 0.000000 0.000000 24.752 40.273 1752829183.513
10 0.000000 0.000000 24.720 40.255 1752829183.670
11 0.000000 0.000000 24.941 40.241 1752829183.827
12 0.000000 0.000000 24.808 40.282 1752829183.984
13 0.000000 0.000000 24.759 40.262 1752829184.140
14 0.000000 0.000000 24.751 40.267 1752829184.297
15 0.000000 0.000000 24.782 40.295 1752829184.454
16 0.000000 0.000000 24.799 40.261 1752829184.610
17 0.000000 0.000000 24.709 40.381 1752829184.766
18 0.000000 0.000000 24.841 40.272 1752829184.923
19 0.000000 0.000000 24.868 40.150 1752829185.080
20 0.000000 0.000000 24.799 40.230 1752829185.236
21 0.000000 0.000000 24.796 40.312 1752829185.393
22 0.000000 0.000000 24.855 40.173 1752829185.549
23 0.000000 0.000000 24.787 40.177 1752829185.706
24 0.000000 0.000000 24.819 40.174 1752829185.862
25 0.000000 0.000000 24.751 40.178 1752829186.020
26 0.000000 0.000000 24.847 40.111 1752829186.178
27 0.000000 0.000000 24.761 40.190 1752829186.334
28 0.000000 0.000000 24.808 40.314 1752829186.491
29 0.000000 0.000000 24.757 40.271 1752829186.648
30 0.000000 0.000000 24.809 40.326 1752829186.805
31 0.000000 0.000000 24.785 40.232 1752829186.962
32 0.000000 0.000000 24.757 40.246 1752829187.119
33 0.000000 0.000000 24.851 40.163 1752829187.275
34 0.000000 0.000000 24.748 40.230 1752829187.432
35 0.000000 0.000000 24.835 40.320 1752829187.588
36 0.000000 0.000000 24.754 40.193 1752829187.745
37 0.000000 0.000000 24.763 40.293 1752829187.902
38 0.000000 0.000000 24.881 40.214 1752829188.059
39 0.000000 0.000000 24.674 40.267 1752829188.216
40 0.000000 0.000000 24.858 40.284 1752829188.372
41 0.000000 0.000000 24.880 40.229 1752829188.529
42 0.000000 0.000000 24.813 40.327 1752829188.686
43 0.000000 0.000000 24.802 40.166 1752829188.843
44 0.000000 0.000000 24.853 40.287 1752829188.998
45 0.000000 0.000000 24.905 40.151 1752829189.155
46 0.000000 0.000000 24.819 40.163 1752829189.312
47 0.000000 0.000000 24.734 40.262 1752829189.468
48 0.000000 0.000000 24.859 40.138 1752829189.626
49 0.000000 0.000000 24.832 40.267 1752829189.783
50 0.000000 0.000000 24.884 40.292 1752829189.939
51 0.000000 0.000000 24.811 40.325 1752829190.096
52 0.000000 0.000000 24.885 40.265 1752829190.255
53 0.000000 0.000000 24.818 40.273 1752829190.411
54 0.000000 0.000000 24.795 40.304 1752829190.568
55 0.000000 0.000000 24.769 40.322 1752829190.726
56 0.000000 0.000000 24.765 40.242 1752829190.884
57 0.000000 0.000000 24.696 40.286 1752829191.040
58 0.000000 0.000000 24.873 40.229 1752829191.197
59 0.000000 0.000000 24.765 40.295 1752829191.361
60 0.000000 0.000000 24.747 40.146 1752829191.518
61 0.000000 0.000000 24.818 40.304 1752829191.675
62 0.000000 0.000000 24.823 40.258 1752829191.832
63 0.000000 0.000000 24.815 40.185 1752829191.992
64 0.000000 0.000000 24.733 40.267 1752829192.149
65 0.000000 0.000000 24.727 40.304 1752829192.308
66 0.000000 0.000000 24.808 40.355 1752829192.465
67 0.000000 0.000000 24.818 40.218 1752829192.624
68 0.000000 0.000000 24.858 40.231 1752829192.781
69 0.000000 0.000000 24.742 40.362 1752829192.938
70 0.000000 0.000000 24.858 40.260 1752829193.096
71 0.000000 0.000000 24.870 40.088 1752829193.254
72 0.000000 0.000000 24.912 40.281 1752829193.412
73 0.000000 0.000000 24.774 40.258 1752829193.569
74 0.000000 0.000000 24.907 40.210 1752829193.727
75 0.000000 0.000000 24.779 40.189 1752829193.884
76 0.000000 0.000000 24.818 40.333 1752829194.041
77 0.000000 0.000000 24.865 40.228 1752829194.198
78 0.000000 0.000000 24.833 40.238 1752829194.355
79 0.000000 0.000000 24.742 40.240 1752829194.514
80 0.000000 0.000000 24.864 40.289 1752829194.675
81 0.000000 0.000000 24.926 40.204 1752829194.833
82 0.000000 0.000000 24.827 40.221 1752829194.990
83 0.000000 0.000000 24.858 40.217 1752829195.148
84 0.000000 0.000000 24.848 40.145 1752829195.306
85 0.000000 0.000000 24.838 40.176 1752829195.464
86 0.000000 0.000000 24.858 40.206 1752829195.621
87 0.000000 0.000000 24.786 40.154 1752829195.781
88 0.000000 0.000000 24.926 40.165 1752829195.941
89 0.000000 0.000000 24.780 40.280 1752829196.099
90 0.000000 0.000000 24.757 40.342 1752829196.255
91 0.000000 0.000000 24.896 40.056 1752829196.413
92 0.000000 0.000000 24.833 40.222 1752829196.570
93 0.000000 0.000000 24.737 40.367 1752829196.728
94 0.000000 0.000000 24.933 40.314 1752829196.884
95 0.000000 0.000000 24.798 40.213 1752829197.041
96 0.000000 0.000000 24.854 40.296 1752829197.198
97 0.000000 0.000000 24.818 40.267 1752829197.356
98 0.000000 0.000000 24.794 40.301 1752829197.514
99 0.000000 0.000000 24.753 40.300 1752829197.671
100 0.000000 0.000000 24.780 40.325 1752829197.829
101 0.000000 0.000000 24.823 40.223 1752829197.985
102 0.000000 0.000000 24.763 40.127 1752829198.144
103 0.000000 0.000000 24.827 40.272 1752829198.302
104 0.000000 0.000000 24.825 40.214 1752829198.459
105 0.000000 0.000000 24.788 40.312 1752829198.617
106 0.000000 0.000000 24.872 40.291 1752829198.776
107 0.000000 0.000000 24.720 40.248 1752829198.932
108 0.000000 0.000000 24.808 40.282 1752829199.089
109 0.000000 0.000000 24.832 40.220 1752829199.246
110 0.000000 0.000000 24.931 40.243 1752829199.406
111 0.000000 0.000000 24.877 40.165 1752829199.563
112 0.000000 0.000000 24.791 40.353 1752829199.720
113 0.000000 0.000000 24.834 40.232 1752829199.878
114 0.000000 0.000000 24.888 40.210 1752829200.035
115 0.000000 0.000000 24.721 40.353 1752829200.194
116 0.000000 0.000000 24.864 40.175 1752829200.351
117 0.000000 0.000000 24.801 40.287 1752829200.508
118 0.000000 0.000000 24.825 40.150 1752829200.665
119 0.000000 0.000000 24.863 40.232 1752829200.822
120 0.000000 0.000000 24.742 40.310 1752829200.978
121 0.000000 0.000000 24.840 40.184 1752829201.135
122 0.000000 0.000000 24.868 40.331 1752829201.293
123 0.000000 0.000000 24.869 40.134 1752829201.451
124 0.000000 0.000000 24.874 40.147 1752829201.609
125 0.000000 0.000000 24.783 40.315 1752829201.766
126 0.000000 0.000000 24.947 40.243 1752829201.923
127 0.000000 0.000000 24.840 40.256 1752829202.080
128 0.000000 0.000000 24.810 40.166 1752829202.238
129 0.000000 0.000000 24.920 40.233 1752829202.395
130 0.000000 0.000000 24.768 40.275 1752829202.552
131 0.000000 0.000000 24.853 40.253 1752829202.710
132 0.000000 0.000000 24.822 40.189 1752829202.871
133 0.000000 0.000000 24.804 40.189 1752829203.028
134 0.000000 0.000000 24.835 40.154 1752829203.185
135 0.000000 0.000000 24.715 40.250 1752829203.341
136 0.000000 0.000000 24.767 40.307 1752829203.498
137 0.000000 0.000000 24.757 40.196 1752829203.657
138 0.000000 0.000000 24.910 40.234 1752829203.814
139 0.000000 0.000000 24.852 40.176 1752829203.970
140 0.000000 0.000000 24.892 40.255 1752829204.128
141 0.000000 0.000000 24.800 40.225 1752829204.286
142 0.000000 0.000000 24.702 40.067 1752829204.443
143 0.000000 0.000000 24.831 40.077 1752829204.599
144 0.000000 0.000000 24.838 40.232 1752829204.755
145 0.000000 0.000000 24.768 40.342 1752829204.913
146 0.000000 0.000000 24.812 40.261 1752829205.069
147 0.000000 0.000000 24.808 40.214 1752829205.226
148 0.000000 0.000000 24.756 40.237 1752829205.384
149 0.000000 0.000000 24.846 40.137 1752829205.540
150 0.000000 0.000000 24.901 40.046 1752829205.698
151 0.000000 0.000000 24.811 40.225 1752829205.855
152 0.000000 0.000000 24.823 40.248 1752829206.013
153 0.000000 0.000000 24.713 40.202 1752829206.171
154 0.000000 0.000000 24.726 40.132 1752829206.328
155 0.000000 0.000000 24.763 40.208 1752829206.486
156 0.000000 0.000000 24.805 40.273 1752829206.643
157 0.000000 0.000000 24.779 40.164 1752829206.800
158 0.000000 0.000000 24.818 40.108 1752829206.957
159 0.000000 0.000000 24.747 40.163 1752829207.114
160 0.000000 0.000000 24.767 40.113 1752829207.270
161 0.000000 0.000000 24.820 40.283 1752829207.427
162 0.000000 0.000000 24.790 40.266 1752829207.584
163 0.000000 0.000000 24.767 40.205 1752829207.741
164 0.000000 0.000000 24.786 40.276 1752829207.897
165 0.000000 0.000000 24.851 40.160 1752829208.054
166 0.000000 0.000000 24.851 40.131 1752829208.211
167 0.000000 0.000000 24.881 40.332 1752829208.367
168 0.000000 0.000000 24.794 40.145 1752829208.523
169 0.000000 0.000000 24.842 40.249 1752829208.679
170 0.000000 0.000000 24.789 40.186 1752829208.836
171 0.000000 0.000000 24.752 40.266 1752829208.993
172 0.000000 0.000000 24.811 40.276 1752829209.151
173 0.000000 0.000000 24.863 40.250 1752829209.310
174 0.000000 0.000000 24.874 40.161 1752829209.469
175 0.000000 0.000000 24.924 40.183 1752829209.626
176 0.000000 0.000000 24.825 40.214 1752829209.783
177 0.000000 0.000000 24.715 40.309 1752829209.940
178 0.000000 0.000000 24.826 40.220 1752829210.097
179 0.000000 0.000000 24.667 40.260 1752829210.255
180 0.000000 0.000000 24.782 40.260 1752829210.411
181 0.000000 0.000000 24.841 40.233 1752829210.568
182 0.000000 0.000000 24.755 40.191 1752829210.725
183 0.000000 0.000000 24.799 40.197 1752829210.881
184 0.000000 0.000000 24.662 40.178 1752829211.038
185 0.000000 0.000000 24.800 40.207 1752829211.196
186 0.000000 0.000000 24.775 40.232 1752829211.356
187 0.000000 0.000000 24.834 40.184 1752829211.513
188 0.000000 0.000000 24.857 40.108 1752829211.679
189 0.000000 0.000000 24.813 40.342 1752829211.837
190 0.000000 0.000000 24.916 40.206 1752829211.996
191 0.000000 0.000000 24.823 40.212 1752829212.153
192 0.000000 0.000000 24.806 40.274 1752829212.309
193 0.000000 0.000000 24.864 40.237 1752829212.466
194 0.000000 0.000000 24.858 40.156 1752829212.659
195 0.000000 0.000000 24.806 40.170 1752829212.815
196 0.000000 0.000000 24.805 40.142 1752829212.972
197 0.000000 0.000000 24.864 40.167 1752829213.129
198 0.000000 0.000000 24.811 40.276 1752829213.285
199 0.000000 0.000000 24.728 40.258 1752829213.442
200 0.000000 0.000000 24.788 40.240 1752829213.600

View File

@@ -191,7 +191,7 @@
" return np.array([dx, dy])\n",
"\n",
"# 3. Gradient ascent\n",
"def gradient_ascent(img, start_pos, lr=0.8, max_iter=1000, tol=1e-4):\n",
"def gradient_ascent(img, start_pos, lr=0.8, max_iter=100, tol=1e-4):\n",
" pos = np.array(start_pos, dtype=float)\n",
" path = [tuple(pos)]\n",
"\n",

View File

@@ -18,3 +18,5 @@ timestamp,description,measurement_id,notes
2025-07-16 16:07:33.382085,Tuned PID gains for better damping,meas_20250710_120000,Observed 30% overshoot reduction
2025-07-16 17:25:52.318083,Tuned PID gains for better damping,meas_20250710_120000,Observed 30% overshoot reduction
2025-07-17 15:43:44.147022,Tuned PID gains for better damping,meas_20250710_120000,Observed 30% overshoot reduction
2025-07-18 09:55:17.959710,Tuned PID gains for better damping,meas_20250710_120000,Observed 30% overshoot reduction
2025-07-18 10:01:12.270546,Tuned PID gains for better damping,meas_20250710_120000,Observed 30% overshoot reduction
1 timestamp description measurement_id notes
18 2025-07-16 16:07:33.382085 Tuned PID gains for better damping meas_20250710_120000 Observed 30% overshoot reduction
19 2025-07-16 17:25:52.318083 Tuned PID gains for better damping meas_20250710_120000 Observed 30% overshoot reduction
20 2025-07-17 15:43:44.147022 Tuned PID gains for better damping meas_20250710_120000 Observed 30% overshoot reduction
21 2025-07-18 09:55:17.959710 Tuned PID gains for better damping meas_20250710_120000 Observed 30% overshoot reduction
22 2025-07-18 10:01:12.270546 Tuned PID gains for better damping meas_20250710_120000 Observed 30% overshoot reduction

View File

@@ -87,10 +87,6 @@
"metadata": {
"jupyter": {
"source_hidden": true
},
"ExecuteTime": {
"end_time": "2025-07-18T07:08:19.394842Z",
"start_time": "2025-07-18T07:08:19.144708Z"
}
},
"source": [
@@ -299,195 +295,8 @@
"\n",
"\n"
],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Path exists: C:\\Users\\berti_r\\Python_Projects\\StagePerformaceDocu\\Scripts\n",
"Path exists: C:\\Users\\berti_r\\Python_Projects\\StagePerformaceDocu\\Config\\config.json\n",
"Path exists: C:\\Users\\berti_r\\Python_Projects\\StagePerformaceDocu\\Config\\config.json\n",
"Path exists: C:\\Users\\berti_r\\Python_Projects\\templates\\motion_libs\n",
"Path exists: C:\\Users\\berti_r\\Python_Projects\\StagePerformaceDocu\\Config\\measurement.json\n",
"Constructor for PLC\n",
"Connect to PLC\n",
"is_open()=True\n",
"get_local_address()=None\n",
"read_device_info()=('Plc30 App', <pyads.structs.AdsVersion object at 0x000001EEF4ADD6A0>)\n",
"GVL_APP.nAXIS_NUM=3\n",
"Constructor for axis\n"
]
},
{
"data": {
"text/plain": [
"Dropdown(description='Test Type:', options=('Image Test', 'Repeatability Test', 'Static Test'), value='Image T…"
],
"application/vnd.jupyter.widget-view+json": {
"version_major": 2,
"version_minor": 0,
"model_id": "6828982f64e5493793d19e4eefbbbae1"
}
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"Output()"
],
"application/vnd.jupyter.widget-view+json": {
"version_major": 2,
"version_minor": 0,
"model_id": "396ab16c07ce435ab7d0c2da4e9d7f92"
}
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"BoundedIntText(value=10, description='Nr of cycles:', max=1000, min=1)"
],
"application/vnd.jupyter.widget-view+json": {
"version_major": 2,
"version_minor": 0,
"model_id": "36a81552307445258c2468c5fb0bd6d1"
}
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"Output()"
],
"application/vnd.jupyter.widget-view+json": {
"version_major": 2,
"version_minor": 0,
"model_id": "6df23067d8534062841a367c50a1dba3"
}
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"Text(value='0.0004', description='Exposure [s]:')"
],
"application/vnd.jupyter.widget-view+json": {
"version_major": 2,
"version_minor": 0,
"model_id": "c45b50ce47d443ba87483511c8c1d8c7"
}
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"Output()"
],
"application/vnd.jupyter.widget-view+json": {
"version_major": 2,
"version_minor": 0,
"model_id": "72c6cd1366a14323a2c23111d76895e1"
}
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"ToggleButton(value=True, description='Processing', tooltip='Toggle processing on/off')"
],
"application/vnd.jupyter.widget-view+json": {
"version_major": 2,
"version_minor": 0,
"model_id": "bb2bb30d673b443398a79cb749f93dd7"
}
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"Output()"
],
"application/vnd.jupyter.widget-view+json": {
"version_major": 2,
"version_minor": 0,
"model_id": "e27b10214ab34805abd55d7f597e0303"
}
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"Button(description='Set exposure time', style=ButtonStyle())"
],
"application/vnd.jupyter.widget-view+json": {
"version_major": 2,
"version_minor": 0,
"model_id": "c521adfeb1134ede8a43ff85992c80d0"
}
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"Output()"
],
"application/vnd.jupyter.widget-view+json": {
"version_major": 2,
"version_minor": 0,
"model_id": "76f186ccdfd44632955d378d0cb8d21c"
}
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"Button(description='Start Measurement', style=ButtonStyle())"
],
"application/vnd.jupyter.widget-view+json": {
"version_major": 2,
"version_minor": 0,
"model_id": "f6e7b5a8a82c4219984394c8b34d1a52"
}
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"Output()"
],
"application/vnd.jupyter.widget-view+json": {
"version_major": 2,
"version_minor": 0,
"model_id": "4e8cb912dda4474c9e30d8eaa4a23df4"
}
},
"metadata": {},
"output_type": "display_data"
}
],
"execution_count": 1
"outputs": [],
"execution_count": null
},
{
"cell_type": "markdown",
@@ -743,6 +552,44 @@
"source": [
"pooling = 0\n",
"\n",
"STATIC_LOG_FILE = \"static_tests_log.csv\"\n",
"\n",
"def log_static_test(x_std, y_std, x_p2v, y_p2v, nr_of_cycles=0):\n",
" masiv = myu.get_latest_measurement_dir(1)\n",
" singel = masiv.split(\"\\\\\")\n",
"\n",
" new_entry = pd.DataFrame([{\n",
" \"day_time\":singel[-1],\n",
" \"x_std\": x_std,\n",
" \"y_std\": y_std,\n",
" \"x_p2v\": x_p2v,\n",
" \"y_p2v\": y_p2v,\n",
" \"pooling\": pooling,\n",
" \"nr of measurements\": nr_of_cycles\n",
" }])\n",
" if os.path.exists(STATIC_LOG_FILE):\n",
" old_log = pd.read_csv(STATIC_LOG_FILE)\n",
" new_log = pd.concat([old_log, new_entry], ignore_index=True)\n",
" else:\n",
" new_log = new_entry\n",
" new_log.to_csv(STATIC_LOG_FILE, index=False)\n",
" print(\"Static test logged.\")\n",
"\n",
"def remove_duplicate_static_tests(log_file=\"static_tests_log.csv\"):\n",
" if not os.path.exists(log_file):\n",
" print(f\"No such file: {log_file}\")\n",
" return\n",
"\n",
" # Load the log\n",
" df = pd.read_csv(log_file)\n",
"\n",
" # Drop duplicate rows\n",
" df_clean = df.drop_duplicates(keep='first')\n",
"\n",
" # Save cleaned log back\n",
" df_clean.to_csv(log_file, index=False)\n",
" print(f\"Removed duplicates. {len(df) - len(df_clean)} rows deleted.\")\n",
"\n",
"def get_pixel_size():\n",
" config = myu.load_object(config_path)\n",
" return config.get(\"pixel_size_mu\")\n",
@@ -750,7 +597,7 @@
"\n",
"axis_path_1 = myu.get_latest_measurement_dir(1)\n",
"print(axis_path_1)\n",
"#axis_path_1 = r\"C:\\Users\\berti_r\\Python_Projects\\StagePerformaceDocu\\data\\data20250717_alignment_tests\\20250717_085115_static_0\" #uncomment for specific path\n",
"axis_path_1 = r\"C:\\Users\\berti_r\\Python_Projects\\StagePerformaceDocu\\data\\data20250718_alignment_tests\\20250718_105332_static_0\" #uncomment for specific path\n",
"axis_data_file_path_1 = myu.find_newest_dat_file(axis_path_1)\n",
"print(axis_data_file_path_1)\n",
"#mf.analyze_repeatability(axis_data_file_path_1,1.1)\n",
@@ -770,9 +617,10 @@
"\n",
"if pooling == 1:\n",
" x_vals1, y_vals1, times1 = myu.load_xy_data(axis_data_file_path_1)\n",
" times = times1[:100]\n",
"\n",
" x_vals = pool_average_1d(x_vals1,10)\n",
" y_vals = pool_average_1d(y_vals1,10)\n",
" times = times1[:len(x_vals)]\n",
" x_vals = x_vals*get_pixel_size()\n",
" y_vals = y_vals*get_pixel_size()\n",
"if pooling == 0:\n",
@@ -792,6 +640,10 @@
"x_p2v = max_x-min_x\n",
"y_p2v = max_y-min_y\n",
"\n",
"\n",
"log_static_test(std_x, std_y, x_p2v, y_p2v,len(x_vals))\n",
"remove_duplicate_static_tests()\n",
"\n",
"print(f'Statistics| X | Y |\\n'\n",
" f' STD |{std_x:.2f}|{std_y:.2f}|\\n'\n",
" f' P2V |{x_p2v:.2f}|{y_p2v:.2f}|\\n ')\n",
@@ -866,7 +718,9 @@
"plot_initial()\n",
"update_plot()\n",
"plt.tight_layout()\n",
"plt.show()\n"
"plt.show()\n",
"\n",
"pd.read_csv(STATIC_LOG_FILE)\n"
],
"outputs": [],
"execution_count": null

View File

@@ -0,0 +1,12 @@
day_time,x_std,y_std,x_p2v,y_p2v,pooling,nr of measurements
20250718_094348_static_0,0.2529374357425167,0.253971418864409,1.4139999999999873,1.4279999999999973,,
20250718_100656_static_0,0.3188139386852471,0.16410581068323,1.7569999999999908,1.0209999999999866,,
20250718_103652_static_0,0.4591714930175879,0.4881253194621204,1.848999999999989,2.2269999999999754,,
20250718_105043_static_0,0.1761264886381379,0.135490996010805,0.8899999999999864,0.8019999999999925,,
20250718_105043_static_0,0.1761264886381379,0.135490996010805,0.8899999999999864,0.8019999999999925,0.0,
20250718_105043_static_0,0.004922500000001,0.0037124999999988,0.2098450000000049,0.2074250000000006,1.0,
20250718_105332_static_0,0.0367441106443858,0.032679132404143,0.339672500000006,0.3233099999999922,1.0,
20250718_105332_static_0,0.0367441106443858,0.032679132404143,0.339672500000006,0.3233099999999922,1.0,20.0
20250718_105332_static_0,0.2235625969946675,0.1905487798439019,1.4199999999999875,1.299999999999983,0.0,200.0
20250718_105941_static_0,0.0562077341208484,0.0659889337313464,0.485000000000003,0.5350000000000037,0.0,200.0
20250718_105941_static_0,0.2235625969946675,0.1905487798439019,1.4199999999999875,1.299999999999983,0.0,200.0
1 day_time x_std y_std x_p2v y_p2v pooling nr of measurements
2 20250718_094348_static_0 0.2529374357425167 0.253971418864409 1.4139999999999873 1.4279999999999973
3 20250718_100656_static_0 0.3188139386852471 0.16410581068323 1.7569999999999908 1.0209999999999866
4 20250718_103652_static_0 0.4591714930175879 0.4881253194621204 1.848999999999989 2.2269999999999754
5 20250718_105043_static_0 0.1761264886381379 0.135490996010805 0.8899999999999864 0.8019999999999925
6 20250718_105043_static_0 0.1761264886381379 0.135490996010805 0.8899999999999864 0.8019999999999925 0.0
7 20250718_105043_static_0 0.004922500000001 0.0037124999999988 0.2098450000000049 0.2074250000000006 1.0
8 20250718_105332_static_0 0.0367441106443858 0.032679132404143 0.339672500000006 0.3233099999999922 1.0
9 20250718_105332_static_0 0.0367441106443858 0.032679132404143 0.339672500000006 0.3233099999999922 1.0 20.0
10 20250718_105332_static_0 0.2235625969946675 0.1905487798439019 1.4199999999999875 1.299999999999983 0.0 200.0
11 20250718_105941_static_0 0.0562077341208484 0.0659889337313464 0.485000000000003 0.5350000000000037 0.0 200.0
12 20250718_105941_static_0 0.2235625969946675 0.1905487798439019 1.4199999999999875 1.299999999999983 0.0 200.0