save
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
{
|
||||
"Number_of_cycles": 1000,
|
||||
"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
|
||||
"pixel_size_mu": 0.275,
|
||||
"long_time_interval": 100
|
||||
}
|
||||
Binary file not shown.
@@ -551,6 +551,8 @@ def camera_thread_function( img_queue):
|
||||
del camera
|
||||
|
||||
|
||||
|
||||
|
||||
def static_test(motor_on_off=0):
|
||||
|
||||
|
||||
@@ -583,6 +585,44 @@ def static_test(motor_on_off=0):
|
||||
fh.write(data_str)
|
||||
fh.close()
|
||||
|
||||
def long_term_static(motor_on_off=0):
|
||||
|
||||
|
||||
pixel_size = 1.1
|
||||
|
||||
savedir = os.path.join(workdir,
|
||||
f'{get_timestr()}_logn_term_{motor_on_off}')
|
||||
|
||||
savefile = os.path.join(savedir,
|
||||
f'_logn_term_{motor_on_off}.dat')
|
||||
os.makedirs(savedir)
|
||||
safe_meas_settings(savedir)
|
||||
if os.getenv("EPICS_CA_ADDR_LIST") is not None:
|
||||
pass
|
||||
else:
|
||||
os.environ["EPICS_CA_ADDR_LIST"] = "129.129.181.64"
|
||||
|
||||
camera = ad.AD()
|
||||
|
||||
camera.start()
|
||||
object_longtime = myu.load_object(config_path)
|
||||
sleeptime = object_longtime.get("long_time_interval")
|
||||
|
||||
for i in range(init_nr_of_cycles()):
|
||||
sleep(sleeptime)
|
||||
|
||||
if (1 == init_image_processing_yes_no()):
|
||||
|
||||
com_x, com_y = aquire_avg(camera)
|
||||
else:
|
||||
com_x, com_y = aquire_avg(camera)
|
||||
data_str = " {:6d} {:18f} {:18f} {:8.3f} {:8.3f} {:14.3f}\n".format(
|
||||
i, 0, 0, com_x, com_y, time.time())
|
||||
# -------------------------------------------Save----------------------------------------------------
|
||||
with open(savefile, 'a') as fh:
|
||||
fh.write(data_str)
|
||||
fh.close()
|
||||
|
||||
|
||||
|
||||
def my_set_ev():
|
||||
@@ -618,7 +658,7 @@ camera_seting.set_ev_time(init_exposure_time())
|
||||
|
||||
print(camera_seting.get_exposure_time())"""
|
||||
|
||||
image_test()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -112,6 +112,22 @@ def __get_leatest_repeatibility_measurement_folder(directory):
|
||||
result = os.path.join(directory, latest_measurement)
|
||||
return result
|
||||
|
||||
def __get_long_time_measurement_folder(directory):
|
||||
measurement_dirs = [
|
||||
d for d in os.listdir(directory)
|
||||
if os.path.isdir(os.path.join(directory, d))
|
||||
and re.match(r'\d{8}_\d{6}_long_term_.*', d)
|
||||
]
|
||||
|
||||
if not measurement_dirs:
|
||||
return None
|
||||
|
||||
# Sort by timestamp
|
||||
measurement_dirs.sort(key=lambda d: d[:15], reverse=True)
|
||||
latest_measurement = measurement_dirs[0]
|
||||
|
||||
result = os.path.join(directory, latest_measurement)
|
||||
return result
|
||||
|
||||
|
||||
|
||||
@@ -125,6 +141,8 @@ def get_latest_measurement_dir(static_dir_yes_no = 0):
|
||||
print("static repeatibility measurement folder")
|
||||
if (static_dir_yes_no == 1):
|
||||
result = __get_leatest_static_measurement_folder(latest_day_dir)
|
||||
if (static_dir_yes_no == 2):
|
||||
result = __get_long_time_measurement_folder(latest_day_dir)
|
||||
if result is None:
|
||||
for i in range(7):
|
||||
print("no measruments on that day")
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,2 @@
|
||||
0 4.000000 5.000000 107.725 140.952 1752836091.230
|
||||
1 4.000000 5.000000 107.960 141.050 1752836109.213
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,25 @@
|
||||
0 4.000000 5.000000 107.609 140.506 1752836284.308
|
||||
1 4.000000 5.000000 107.700 140.712 1752836302.388
|
||||
2 4.000000 5.000000 107.920 140.752 1752836320.391
|
||||
3 4.000000 5.000000 107.969 140.375 1752836338.411
|
||||
4 4.000000 5.000000 107.640 140.638 1752836356.433
|
||||
5 4.000000 5.000000 107.151 140.934 1752836374.416
|
||||
6 4.000000 5.000000 107.135 140.923 1752836392.393
|
||||
7 4.000000 5.000000 107.319 141.037 1752836410.385
|
||||
8 4.000000 5.000000 107.474 141.016 1752836428.342
|
||||
9 4.000000 5.000000 107.554 140.974 1752836446.344
|
||||
10 4.000000 5.000000 107.917 140.863 1752836464.361
|
||||
11 4.000000 5.000000 107.002 140.703 1752836482.312
|
||||
12 4.000000 5.000000 107.333 140.810 1752836500.271
|
||||
13 4.000000 5.000000 107.749 141.097 1752836518.234
|
||||
14 4.000000 5.000000 107.642 141.034 1752836536.266
|
||||
15 4.000000 5.000000 107.643 140.898 1752836554.277
|
||||
16 4.000000 5.000000 107.731 140.700 1752836572.375
|
||||
17 4.000000 5.000000 107.762 140.570 1752836590.402
|
||||
18 4.000000 5.000000 107.780 140.558 1752836608.379
|
||||
19 4.000000 5.000000 107.083 140.505 1752836626.373
|
||||
20 4.000000 5.000000 107.189 140.416 1752836644.494
|
||||
21 4.000000 5.000000 107.563 140.617 1752836662.532
|
||||
22 4.000000 5.000000 107.046 140.615 1752836680.735
|
||||
23 4.000000 5.000000 107.526 140.539 1752836698.772
|
||||
24 4.000000 5.000000 106.768 140.339 1752836716.816
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user